Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@yamada-ui/use-token

Package Overview
Dependencies
Maintainers
0
Versions
850
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/use-token - npm Package Compare versions

Comparing version 1.1.27-next-20241005235555 to 1.1.27-next-20241008193728

6

dist/index.d.ts
import { Theme, StyledTheme, ColorMode } from '@yamada-ui/core';
type OmittedTheme = Omit<Theme, "components" | "colorSchemes" | "themeSchemes">;
type OmittedTheme = Omit<Theme, "colorSchemes" | "components" | "themeSchemes">;
/**

@@ -9,5 +9,5 @@ * `useToken` is a custom hook for retrieving tokens from the theme.

*/
declare const useToken: <Y extends string | number = string, M extends keyof OmittedTheme = "animations" | "blurs" | "borders" | "breakpoints" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "gradients" | "layerStyles" | "letterSpacings" | "lineHeights" | "radii" | "shadows" | "sizes" | "spaces" | "textStyles" | "transitionDuration" | "transitionEasing" | "transitionProperty" | "zIndices">(name: M, path: Theme[M] | number | undefined) => Y | undefined;
declare const getToken: <Y extends string | number = string, M extends keyof OmittedTheme = "animations" | "blurs" | "borders" | "breakpoints" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "gradients" | "layerStyles" | "letterSpacings" | "lineHeights" | "radii" | "shadows" | "sizes" | "spaces" | "textStyles" | "transitionDuration" | "transitionEasing" | "transitionProperty" | "zIndices">(name: M, path: Theme[M] | number | undefined) => (theme: StyledTheme, colorMode: ColorMode) => Y | undefined;
declare const useToken: <Y extends number | string = string, M extends keyof OmittedTheme = "animations" | "blurs" | "borders" | "breakpoints" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "gradients" | "layerStyles" | "letterSpacings" | "lineHeights" | "radii" | "shadows" | "sizes" | "spaces" | "textStyles" | "transitionDuration" | "transitionEasing" | "transitionProperty" | "zIndices">(name: M, path: number | Theme[M] | undefined) => Y | undefined;
declare const getToken: <Y extends number | string = string, M extends keyof OmittedTheme = "animations" | "blurs" | "borders" | "breakpoints" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "gradients" | "layerStyles" | "letterSpacings" | "lineHeights" | "radii" | "shadows" | "sizes" | "spaces" | "textStyles" | "transitionDuration" | "transitionEasing" | "transitionProperty" | "zIndices">(name: M, path: number | Theme[M] | undefined) => (theme: StyledTheme, colorMode: ColorMode) => Y | undefined;
export { getToken, useToken };

@@ -40,3 +40,3 @@ "use client"

var getToken = (name, path) => (theme, colorMode) => {
var _a, _b, _c;
var _a;
if (name === "layerStyles") name = "styles.layerStyles";

@@ -59,7 +59,7 @@ if (name === "textStyles") name = "styles.textStyles";

value = [
(_a = (0, import_utils.getMemoizedObject)(theme, `${name}.${value[0]}`)) != null ? _a : value[0],
(_b = (0, import_utils.getMemoizedObject)(theme, `${name}.${value[1]}`)) != null ? _b : value[1]
(0, import_utils.getMemoizedObject)(theme, `${name}.${value[0]}`, value[0]),
(0, import_utils.getMemoizedObject)(theme, `${name}.${value[1]}`, value[1])
];
} else {
value = (_c = (0, import_utils.getMemoizedObject)(theme, `${name}.${value}`)) != null ? _c : value;
value = (_a = (0, import_utils.getMemoizedObject)(theme, `${name}.${value}`)) != null ? _a : value;
}

@@ -66,0 +66,0 @@ if ((0, import_utils.isArray)(value)) {

{
"name": "@yamada-ui/use-token",
"version": "1.1.27-next-20241005235555",
"version": "1.1.27-next-20241008193728",
"description": "Yamada UI useToken custom hook",

@@ -28,4 +28,4 @@ "keywords": [

"dependencies": {
"@yamada-ui/utils": "1.5.2",
"@yamada-ui/core": "1.15.2-next-20241005235555"
"@yamada-ui/core": "1.15.2-next-20241008193728",
"@yamada-ui/utils": "1.5.3-next-20241008193728"
},

@@ -32,0 +32,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc