@yahoo/uds 3.67.0-beta.5 → 3.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Box.d.cts +2 -2
- package/dist/components/Box.d.ts +2 -2
- package/dist/components/Divider/Divider.d.cts +2 -2
- package/dist/components/Divider/Divider.d.ts +2 -2
- package/dist/components/Divider/DividerInternal.d.cts +2 -2
- package/dist/components/HStack.d.cts +2 -2
- package/dist/components/HStack.d.ts +2 -2
- package/dist/components/Icon.d.cts +2 -2
- package/dist/components/Icon.d.ts +2 -2
- package/dist/components/Link.d.cts +2 -2
- package/dist/components/Link.d.ts +2 -2
- package/dist/components/Text.d.cts +8 -8
- package/dist/components/Text.d.ts +8 -8
- package/dist/components/VStack.d.cts +2 -2
- package/dist/components/VStack.d.ts +2 -2
- package/dist/components/client/AnimateHeightChange.d.cts +2 -2
- package/dist/components/client/Avatar/Avatar.d.cts +2 -2
- package/dist/components/client/Avatar/Avatar.d.ts +2 -2
- package/dist/components/client/Avatar/AvatarIcon.d.cts +2 -2
- package/dist/components/client/Avatar/AvatarIcon.d.ts +2 -2
- package/dist/components/client/Avatar/AvatarImage.d.cts +2 -2
- package/dist/components/client/Avatar/AvatarImage.d.ts +2 -2
- package/dist/components/client/Avatar/AvatarText.d.cts +2 -2
- package/dist/components/client/Avatar/AvatarText.d.ts +2 -2
- package/dist/components/client/IconButton.d.cts +2 -2
- package/dist/components/client/Input/Input.d.cts +2 -2
- package/dist/components/client/Input/Input.d.ts +2 -2
- package/dist/components/client/Input/InputHelpText.d.cts +2 -2
- package/dist/components/client/Input/InputHelpText.d.ts +2 -2
- package/dist/components/client/Input/InputHelpTextInternal.d.cts +4 -4
- package/dist/components/client/Input/InputHelpTextInternal.d.ts +4 -4
- package/dist/components/client/Menu/Menu.Content.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Content.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Divider.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Divider.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Item.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Item.d.ts +2 -2
- package/dist/components/client/Menu/Menu.ItemBase.d.cts +2 -2
- package/dist/components/client/Menu/Menu.ItemBase.d.ts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Provider.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Provider.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Trigger.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Trigger.d.ts +2 -2
- package/dist/components/client/Pressable.d.cts +2 -2
- package/dist/components/client/Radio/RadioGroupStore.d.cts +2 -2
- package/dist/components/client/Radio/RadioGroupStore.d.ts +2 -2
- package/dist/components/client/SpringMotionConfig.d.cts +3 -3
- package/dist/components/client/SpringMotionConfig.d.ts +2 -2
- package/dist/components/experimental/Spinner.d.cts +2 -2
- package/dist/components/experimental/Table.d.cts +2 -2
- package/dist/components/experimental/client/Accordion.d.cts +2 -2
- package/dist/components/experimental/client/Accordion.d.ts +2 -2
- package/dist/components/experimental/client/AvoidMotionLibraryProvider.d.cts +2 -2
- package/dist/components/experimental/client/Modal.d.cts +3 -3
- package/dist/components/experimental/client/Modal.d.ts +3 -3
- package/dist/components/experimental/client/Popover.d.cts +3 -3
- package/dist/components/experimental/client/Popover.d.ts +3 -3
- package/dist/components/experimental/client/Tabs.d.cts +6 -6
- package/dist/components/experimental/client/Tabs.d.ts +6 -6
- package/dist/components/experimental/client/Toast.d.cts +2 -2
- package/dist/components/experimental/client/Toast.d.ts +2 -2
- package/dist/defaultTokensConfig.cjs +1 -1
- package/dist/defaultTokensConfig.js +1 -1
- package/dist/fixtures.cjs +28 -5
- package/dist/fixtures.d.cts +6 -5
- package/dist/fixtures.d.ts +6 -5
- package/dist/fixtures.js +27 -5
- package/dist/generated/generatedConfigs.cjs +379 -253
- package/dist/generated/generatedConfigs.js +379 -253
- package/dist/generated/tailwindPurge.cjs +163 -61
- package/dist/generated/tailwindPurge.js +163 -61
- package/dist/generated/universalTokensConfigAuto.cjs +1 -1
- package/dist/generated/universalTokensConfigAuto.js +1 -1
- package/dist/index.cjs +5 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/providers/ColorModeProvider.d.cts +4 -4
- package/dist/providers/ColorModeProvider.d.ts +4 -4
- package/dist/providers/ScaleModeProvider.d.cts +4 -4
- package/dist/providers/ScaleModeProvider.d.ts +4 -4
- package/dist/providers/ThemeProvider.d.cts +2 -2
- package/dist/styles/styler.d.cts +14 -14
- package/dist/styles/styler.d.ts +14 -14
- package/dist/styles/variants.cjs +77 -29
- package/dist/styles/variants.d.cts +69 -21
- package/dist/styles/variants.d.ts +69 -21
- package/dist/styles/variants.js +77 -29
- package/dist/tailwind/plugins/a11y.d.ts +3 -3
- package/dist/tailwind/plugins/borders.d.ts +3 -3
- package/dist/tailwind/plugins/colors.cjs +6 -2
- package/dist/tailwind/plugins/colors.d.ts +3 -3
- package/dist/tailwind/plugins/colors.js +5 -2
- package/dist/tailwind/plugins/components.d.ts +3 -3
- package/dist/tailwind/plugins/elevation.d.ts +3 -3
- package/dist/tailwind/plugins/icons.d.ts +3 -3
- package/dist/tailwind/plugins/input.d.ts +3 -3
- package/dist/tailwind/plugins/motion.d.ts +3 -3
- package/dist/tailwind/plugins/nestedBorderRadius.d.ts +3 -3
- package/dist/tailwind/plugins/scaleMode.d.ts +3 -3
- package/dist/tailwind/plugins/shadows.d.ts +3 -3
- package/dist/tailwind/plugins/sizing.d.ts +3 -3
- package/dist/tailwind/plugins/spacing.d.ts +3 -3
- package/dist/tailwind/plugins/typography.d.cts +3 -3
- package/dist/tailwind/plugins/typography.d.ts +3 -3
- package/dist/tailwind/utils/addFontsPlugin.d.cts +3 -3
- package/dist/tailwind/utils/addFontsPlugin.d.ts +3 -3
- package/dist/tailwind/utils/composeTailwindPlugins.d.cts +3 -3
- package/dist/tailwind/utils/composeTailwindPlugins.d.ts +3 -3
- package/dist/tailwind/utils/getShadowPresetValues.cjs +18 -2
- package/dist/tailwind/utils/getShadowPresetValues.js +18 -2
- package/dist/tokens/automation/configs/menu.cjs +1 -1
- package/dist/tokens/automation/configs/menu.js +1 -1
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/tokens/automation/utils/mapColorFixtureToValue.cjs +7 -1
- package/dist/tokens/automation/utils/mapColorFixtureToValue.js +7 -1
- package/dist/tokens/configs/colorMode.cjs +4 -3
- package/dist/tokens/configs/colorMode.js +2 -1
- package/dist/tokens/configs/palette/alwaysPalette.cjs +28 -0
- package/dist/tokens/configs/palette/alwaysPalette.d.cts +54 -0
- package/dist/tokens/configs/palette/alwaysPalette.d.ts +54 -0
- package/dist/tokens/configs/palette/alwaysPalette.js +24 -0
- package/dist/tokens/configs/palette/darkPalette.cjs +200 -0
- package/dist/tokens/configs/palette/darkPalette.d.cts +6 -0
- package/dist/tokens/configs/palette/darkPalette.d.ts +6 -0
- package/dist/tokens/configs/palette/darkPalette.js +199 -0
- package/dist/tokens/configs/palette/index.cjs +11 -0
- package/dist/tokens/configs/palette/index.d.cts +4 -0
- package/dist/tokens/configs/palette/index.d.ts +4 -0
- package/dist/tokens/configs/palette/index.js +6 -0
- package/dist/tokens/configs/palette/lightPalette.cjs +200 -0
- package/dist/tokens/configs/palette/lightPalette.d.cts +6 -0
- package/dist/tokens/configs/palette/lightPalette.d.ts +6 -0
- package/dist/tokens/configs/palette/lightPalette.js +199 -0
- package/dist/tokens/configs/yosConfig.cjs +137 -137
- package/dist/tokens/configs/yosConfig.js +137 -137
- package/dist/tokens/index.cjs +5 -2
- package/dist/tokens/index.d.cts +4 -3
- package/dist/tokens/index.d.ts +4 -3
- package/dist/tokens/index.js +2 -2
- package/dist/tokens/parseTokens.cjs +2 -2
- package/dist/tokens/parseTokens.js +1 -1
- package/dist/tokens/types.d.cts +6 -4
- package/dist/tokens/types.d.ts +6 -4
- package/dist/utils/intersperse.d.cts +2 -2
- package/dist/utils/intersperse.d.ts +2 -2
- package/package.json +1 -1
- package/dist/tokens/configs/palette.cjs +0 -402
- package/dist/tokens/configs/palette.d.cts +0 -13
- package/dist/tokens/configs/palette.d.ts +0 -13
- package/dist/tokens/configs/palette.js +0 -399
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TailwindPluginOptions } from "../utils/composeTailwindPlugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as tailwindcss_types_config11 from "tailwindcss/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tailwind/plugins/nestedBorderRadius.d.ts
|
|
5
5
|
declare const nestedBorderRadiusPlugin: {
|
|
6
6
|
(options: TailwindPluginOptions): {
|
|
7
|
-
handler:
|
|
8
|
-
config?: Partial<
|
|
7
|
+
handler: tailwindcss_types_config11.PluginCreator;
|
|
8
|
+
config?: Partial<tailwindcss_types_config11.Config>;
|
|
9
9
|
};
|
|
10
10
|
__isOptionsFunction: true;
|
|
11
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TailwindPluginOptions } from "../utils/composeTailwindPlugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as tailwindcss_types_config21 from "tailwindcss/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tailwind/plugins/scaleMode.d.ts
|
|
5
5
|
/**
|
|
@@ -7,8 +7,8 @@ import * as tailwindcss_types_config25 from "tailwindcss/types/config";
|
|
|
7
7
|
*/
|
|
8
8
|
declare const scaleModePlugin: {
|
|
9
9
|
(options: TailwindPluginOptions): {
|
|
10
|
-
handler:
|
|
11
|
-
config?: Partial<
|
|
10
|
+
handler: tailwindcss_types_config21.PluginCreator;
|
|
11
|
+
config?: Partial<tailwindcss_types_config21.Config>;
|
|
12
12
|
};
|
|
13
13
|
__isOptionsFunction: true;
|
|
14
14
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TailwindPluginOptions } from "../utils/composeTailwindPlugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as tailwindcss_types_config23 from "tailwindcss/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tailwind/plugins/shadows.d.ts
|
|
5
5
|
declare const shadowsPlugin: {
|
|
6
6
|
(options: TailwindPluginOptions): {
|
|
7
|
-
handler:
|
|
8
|
-
config?: Partial<
|
|
7
|
+
handler: tailwindcss_types_config23.PluginCreator;
|
|
8
|
+
config?: Partial<tailwindcss_types_config23.Config>;
|
|
9
9
|
};
|
|
10
10
|
__isOptionsFunction: true;
|
|
11
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TailwindPluginOptions } from "../utils/composeTailwindPlugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as tailwindcss_types_config25 from "tailwindcss/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tailwind/plugins/sizing.d.ts
|
|
5
5
|
/**
|
|
@@ -7,8 +7,8 @@ import * as tailwindcss_types_config29 from "tailwindcss/types/config";
|
|
|
7
7
|
*/
|
|
8
8
|
declare const sizingPlugin: {
|
|
9
9
|
(options: TailwindPluginOptions): {
|
|
10
|
-
handler:
|
|
11
|
-
config?: Partial<
|
|
10
|
+
handler: tailwindcss_types_config25.PluginCreator;
|
|
11
|
+
config?: Partial<tailwindcss_types_config25.Config>;
|
|
12
12
|
};
|
|
13
13
|
__isOptionsFunction: true;
|
|
14
14
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TailwindPluginOptions } from "../utils/composeTailwindPlugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as tailwindcss_types_config29 from "tailwindcss/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tailwind/plugins/spacing.d.ts
|
|
5
5
|
declare const spacingPlugin: {
|
|
6
6
|
(options: TailwindPluginOptions): {
|
|
7
|
-
handler:
|
|
8
|
-
config?: Partial<
|
|
7
|
+
handler: tailwindcss_types_config29.PluginCreator;
|
|
8
|
+
config?: Partial<tailwindcss_types_config29.Config>;
|
|
9
9
|
};
|
|
10
10
|
__isOptionsFunction: true;
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TailwindPluginOptions } from "../utils/composeTailwindPlugins.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as tailwindcss_types_config29 from "tailwindcss/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tailwind/plugins/typography.d.ts
|
|
5
5
|
declare const typographyPlugin: {
|
|
6
6
|
(options: TailwindPluginOptions): {
|
|
7
|
-
handler:
|
|
8
|
-
config?: Partial<
|
|
7
|
+
handler: tailwindcss_types_config29.PluginCreator;
|
|
8
|
+
config?: Partial<tailwindcss_types_config29.Config>;
|
|
9
9
|
};
|
|
10
10
|
__isOptionsFunction: true;
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TailwindPluginOptions } from "../utils/composeTailwindPlugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as tailwindcss_types_config27 from "tailwindcss/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/tailwind/plugins/typography.d.ts
|
|
5
5
|
declare const typographyPlugin: {
|
|
6
6
|
(options: TailwindPluginOptions): {
|
|
7
|
-
handler:
|
|
8
|
-
config?: Partial<
|
|
7
|
+
handler: tailwindcss_types_config27.PluginCreator;
|
|
8
|
+
config?: Partial<tailwindcss_types_config27.Config>;
|
|
9
9
|
};
|
|
10
10
|
__isOptionsFunction: true;
|
|
11
11
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FontID } from "../../tokens/types.cjs";
|
|
2
2
|
import "../../tokens/index.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as tailwindcss_types_config31 from "tailwindcss/types/config";
|
|
4
4
|
|
|
5
5
|
//#region src/tailwind/utils/addFontsPlugin.d.ts
|
|
6
6
|
interface AddFontsPluginOptions {
|
|
@@ -8,8 +8,8 @@ interface AddFontsPluginOptions {
|
|
|
8
8
|
}
|
|
9
9
|
declare const addFontsPlugin: {
|
|
10
10
|
(options: AddFontsPluginOptions): {
|
|
11
|
-
handler:
|
|
12
|
-
config?: Partial<
|
|
11
|
+
handler: tailwindcss_types_config31.PluginCreator;
|
|
12
|
+
config?: Partial<tailwindcss_types_config31.Config>;
|
|
13
13
|
};
|
|
14
14
|
__isOptionsFunction: true;
|
|
15
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FontID } from "../../tokens/types.js";
|
|
2
2
|
import "../../tokens/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as tailwindcss_types_config31 from "tailwindcss/types/config";
|
|
4
4
|
|
|
5
5
|
//#region src/tailwind/utils/addFontsPlugin.d.ts
|
|
6
6
|
interface AddFontsPluginOptions {
|
|
@@ -8,8 +8,8 @@ interface AddFontsPluginOptions {
|
|
|
8
8
|
}
|
|
9
9
|
declare const addFontsPlugin: {
|
|
10
10
|
(options: AddFontsPluginOptions): {
|
|
11
|
-
handler:
|
|
12
|
-
config?: Partial<
|
|
11
|
+
handler: tailwindcss_types_config31.PluginCreator;
|
|
12
|
+
config?: Partial<tailwindcss_types_config31.Config>;
|
|
13
13
|
};
|
|
14
14
|
__isOptionsFunction: true;
|
|
15
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UniversalTokensConfig } from "../../tokens/types.cjs";
|
|
2
2
|
import "../../tokens/index.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as tailwindcss_types_config33 from "tailwindcss/types/config";
|
|
4
4
|
import { Config } from "tailwindcss";
|
|
5
5
|
import plugin from "tailwindcss/plugin.js";
|
|
6
6
|
|
|
@@ -50,8 +50,8 @@ type PluginWithPrecidate = [Plugin, (options: TailwindPluginOptions) => boolean
|
|
|
50
50
|
type PossiblePlugins = Array<Plugin | PluginWithPrecidate | Falsy>;
|
|
51
51
|
declare const composeTailwindPlugins: (...allPossiblePlugins: PossiblePlugins) => {
|
|
52
52
|
(options: TailwindPluginOptions): {
|
|
53
|
-
handler:
|
|
54
|
-
config?: Partial<
|
|
53
|
+
handler: tailwindcss_types_config33.PluginCreator;
|
|
54
|
+
config?: Partial<tailwindcss_types_config33.Config>;
|
|
55
55
|
};
|
|
56
56
|
__isOptionsFunction: true;
|
|
57
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UniversalTokensConfig } from "../../tokens/types.js";
|
|
2
2
|
import "../../tokens/index.js";
|
|
3
3
|
import plugin from "tailwindcss/plugin.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as tailwindcss_types_config33 from "tailwindcss/types/config";
|
|
5
5
|
import { Config } from "tailwindcss";
|
|
6
6
|
|
|
7
7
|
//#region src/tailwind/utils/composeTailwindPlugins.d.ts
|
|
@@ -50,8 +50,8 @@ type PluginWithPrecidate = [Plugin, (options: TailwindPluginOptions) => boolean
|
|
|
50
50
|
type PossiblePlugins = Array<Plugin | PluginWithPrecidate | Falsy>;
|
|
51
51
|
declare const composeTailwindPlugins: (...allPossiblePlugins: PossiblePlugins) => {
|
|
52
52
|
(options: TailwindPluginOptions): {
|
|
53
|
-
handler:
|
|
54
|
-
config?: Partial<
|
|
53
|
+
handler: tailwindcss_types_config33.PluginCreator;
|
|
54
|
+
config?: Partial<tailwindcss_types_config33.Config>;
|
|
55
55
|
};
|
|
56
56
|
__isOptionsFunction: true;
|
|
57
57
|
};
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_tokens_configs_palette_alwaysPalette = require('../../tokens/configs/palette/alwaysPalette.cjs');
|
|
3
4
|
const require_tokens_utils_entries = require('../../tokens/utils/entries.cjs');
|
|
4
5
|
let __yahoo_uds_fixtures = require("@yahoo/uds/fixtures");
|
|
5
6
|
|
|
6
7
|
//#region src/tailwind/utils/getShadowPresetValues.ts
|
|
8
|
+
function hexToRgb(hex) {
|
|
9
|
+
hex = hex.replace("#", "");
|
|
10
|
+
if (hex.length === 3) hex = hex.split("").map((char) => char + char).join("");
|
|
11
|
+
return `${parseInt(hex.substring(0, 2), 16)} ${parseInt(hex.substring(2, 4), 16)} ${parseInt(hex.substring(4, 6), 16)}`;
|
|
12
|
+
}
|
|
13
|
+
const RGB = {
|
|
14
|
+
white: hexToRgb(require_tokens_configs_palette_alwaysPalette.newAlwaysPalette["always/white"]),
|
|
15
|
+
black: hexToRgb(require_tokens_configs_palette_alwaysPalette.newAlwaysPalette["always/black"]),
|
|
16
|
+
brand: hexToRgb(require_tokens_configs_palette_alwaysPalette.newAlwaysPalette["always/brand"]),
|
|
17
|
+
accent: hexToRgb(require_tokens_configs_palette_alwaysPalette.newAlwaysPalette["always/accent"])
|
|
18
|
+
};
|
|
7
19
|
const ALWAYS_AS_RGB = {
|
|
8
|
-
black:
|
|
9
|
-
white:
|
|
20
|
+
black: RGB.black,
|
|
21
|
+
white: RGB.white,
|
|
22
|
+
"always/black": RGB.black,
|
|
23
|
+
"always/white": RGB.white,
|
|
24
|
+
"always/brand": RGB.brand,
|
|
25
|
+
"always/accent": RGB.accent
|
|
10
26
|
};
|
|
11
27
|
/**
|
|
12
28
|
* Generate a single shadow value from a shadow preset configuration
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
import { newAlwaysPalette } from "../../tokens/configs/palette/alwaysPalette.js";
|
|
2
3
|
import { entries } from "../../tokens/utils/entries.js";
|
|
3
4
|
import { shadowOffsetMap, shadowSpreadRadiusMap, spacingMap } from "@yahoo/uds/fixtures";
|
|
4
5
|
|
|
5
6
|
//#region src/tailwind/utils/getShadowPresetValues.ts
|
|
7
|
+
function hexToRgb(hex) {
|
|
8
|
+
hex = hex.replace("#", "");
|
|
9
|
+
if (hex.length === 3) hex = hex.split("").map((char) => char + char).join("");
|
|
10
|
+
return `${parseInt(hex.substring(0, 2), 16)} ${parseInt(hex.substring(2, 4), 16)} ${parseInt(hex.substring(4, 6), 16)}`;
|
|
11
|
+
}
|
|
12
|
+
const RGB = {
|
|
13
|
+
white: hexToRgb(newAlwaysPalette["always/white"]),
|
|
14
|
+
black: hexToRgb(newAlwaysPalette["always/black"]),
|
|
15
|
+
brand: hexToRgb(newAlwaysPalette["always/brand"]),
|
|
16
|
+
accent: hexToRgb(newAlwaysPalette["always/accent"])
|
|
17
|
+
};
|
|
6
18
|
const ALWAYS_AS_RGB = {
|
|
7
|
-
black:
|
|
8
|
-
white:
|
|
19
|
+
black: RGB.black,
|
|
20
|
+
white: RGB.white,
|
|
21
|
+
"always/black": RGB.black,
|
|
22
|
+
"always/white": RGB.white,
|
|
23
|
+
"always/brand": RGB.brand,
|
|
24
|
+
"always/accent": RGB.accent
|
|
9
25
|
};
|
|
10
26
|
/**
|
|
11
27
|
* Generate a single shadow value from a shadow preset configuration
|
|
@@ -12,8 +12,8 @@ import "../../index.cjs";
|
|
|
12
12
|
* @returns A Record of layer names to their properties, or null if no properties are found
|
|
13
13
|
*/
|
|
14
14
|
declare function getConfigVariantProperties(variant?: VariantConfig): {
|
|
15
|
-
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "
|
|
16
|
-
root: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "
|
|
15
|
+
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "padding" | "fontVariationSettings" | "textDecorationLine" | "iconSize", string, ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[] | ("borderWidths" | "spacingAliases")[] | "borderRadii"[] | ("spectrumColors" | "linePaletteColors" | "alwaysPaletteAliases")[] | "textVariants"[] | "spacingAliases"[] | ("spectrumColors" | "foregroundPaletteColors" | "alwaysPaletteAliases")[] | "opacitySteps"[] | "iconSizes"[] | "textDecorationLines"[] | "shadowVariants"[] | "shadowVariantsWithInvert"[] | "scaleEffects"[], readonly (readonly string[])[]>>>;
|
|
16
|
+
root: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "padding" | "fontVariationSettings" | "textDecorationLine" | "iconSize", string, ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[] | ("borderWidths" | "spacingAliases")[] | "borderRadii"[] | ("spectrumColors" | "linePaletteColors" | "alwaysPaletteAliases")[] | "textVariants"[] | "spacingAliases"[] | ("spectrumColors" | "foregroundPaletteColors" | "alwaysPaletteAliases")[] | "opacitySteps"[] | "iconSizes"[] | "textDecorationLines"[] | "shadowVariants"[] | "shadowVariantsWithInvert"[] | "scaleEffects"[], readonly (readonly string[])[]>>>;
|
|
17
17
|
} | null;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { getConfigVariantProperties };
|
|
@@ -12,8 +12,8 @@ import "../../index.js";
|
|
|
12
12
|
* @returns A Record of layer names to their properties, or null if no properties are found
|
|
13
13
|
*/
|
|
14
14
|
declare function getConfigVariantProperties(variant?: VariantConfig): {
|
|
15
|
-
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "
|
|
16
|
-
root: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "
|
|
15
|
+
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "padding" | "fontVariationSettings" | "textDecorationLine" | "iconSize", string, ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[] | ("borderWidths" | "spacingAliases")[] | "borderRadii"[] | ("spectrumColors" | "linePaletteColors" | "alwaysPaletteAliases")[] | "textVariants"[] | "spacingAliases"[] | ("spectrumColors" | "foregroundPaletteColors" | "alwaysPaletteAliases")[] | "opacitySteps"[] | "iconSizes"[] | "textDecorationLines"[] | "shadowVariants"[] | "shadowVariantsWithInvert"[] | "scaleEffects"[], readonly (readonly string[])[]>>>;
|
|
16
|
+
root: Readonly<Record<string, SelectedConfigurableProperty<"spacingHorizontal" | "spacingVertical" | "gap" | "textVariant" | "shadow" | "insetShadow" | "borderWidth" | "borderRadius" | "borderColor" | "backgroundColor" | "color" | "opacity" | "scaleEffect" | "width" | "height" | "fontFamily" | "fontSize" | "letterSpacing" | "fontWeight" | "lineHeight" | "textTransform" | "padding" | "fontVariationSettings" | "textDecorationLine" | "iconSize", string, ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[] | ("borderWidths" | "spacingAliases")[] | "borderRadii"[] | ("spectrumColors" | "linePaletteColors" | "alwaysPaletteAliases")[] | "textVariants"[] | "spacingAliases"[] | ("spectrumColors" | "foregroundPaletteColors" | "alwaysPaletteAliases")[] | "opacitySteps"[] | "iconSizes"[] | "textDecorationLines"[] | "shadowVariants"[] | "shadowVariantsWithInvert"[] | "scaleEffects"[], readonly (readonly string[])[]>>>;
|
|
17
17
|
} | null;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { getConfigVariantProperties };
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
const require_utils_assertUnreachable = require('../../../utils/assertUnreachable.cjs');
|
|
3
|
+
const require_tokens_configs_palette_alwaysPalette = require('../../configs/palette/alwaysPalette.cjs');
|
|
3
4
|
|
|
4
5
|
//#region src/tokens/automation/utils/mapColorFixtureToValue.ts
|
|
5
6
|
const mapColorFixtureToValue = (selected, value) => {
|
|
6
7
|
switch (selected) {
|
|
7
|
-
case "alwaysPaletteAliases":
|
|
8
|
+
case "alwaysPaletteAliases":
|
|
9
|
+
if (value.startsWith(require_tokens_configs_palette_alwaysPalette.ALWAYS_PREFIX)) {
|
|
10
|
+
const [, subValue] = value.split("/");
|
|
11
|
+
return `colors.always.${subValue}`;
|
|
12
|
+
}
|
|
13
|
+
return `colors.${value}`;
|
|
8
14
|
case "spectrumColors": {
|
|
9
15
|
const [hue, hueStep] = value.split("-");
|
|
10
16
|
return `colors.${hue}.${hueStep}`;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
import { assertUnreachable } from "../../../utils/assertUnreachable.js";
|
|
3
|
+
import { ALWAYS_PREFIX } from "../../configs/palette/alwaysPalette.js";
|
|
3
4
|
|
|
4
5
|
//#region src/tokens/automation/utils/mapColorFixtureToValue.ts
|
|
5
6
|
const mapColorFixtureToValue = (selected, value) => {
|
|
6
7
|
switch (selected) {
|
|
7
|
-
case "alwaysPaletteAliases":
|
|
8
|
+
case "alwaysPaletteAliases":
|
|
9
|
+
if (value.startsWith(ALWAYS_PREFIX)) {
|
|
10
|
+
const [, subValue] = value.split("/");
|
|
11
|
+
return `colors.always.${subValue}`;
|
|
12
|
+
}
|
|
13
|
+
return `colors.${value}`;
|
|
8
14
|
case "spectrumColors": {
|
|
9
15
|
const [hue, hueStep] = value.split("-");
|
|
10
16
|
return `colors.${hue}.${hueStep}`;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
const
|
|
2
|
+
const require_tokens_configs_palette_darkPalette = require('./palette/darkPalette.cjs');
|
|
3
|
+
const require_tokens_configs_palette_lightPalette = require('./palette/lightPalette.cjs');
|
|
3
4
|
const require_tokens_configs_spectrum = require('./spectrum.cjs');
|
|
4
5
|
|
|
5
6
|
//#region src/tokens/configs/colorMode.ts
|
|
6
7
|
const colorMode = {
|
|
7
8
|
light: {
|
|
8
|
-
palette:
|
|
9
|
+
palette: require_tokens_configs_palette_lightPalette.lightPalette,
|
|
9
10
|
spectrum: require_tokens_configs_spectrum.lightSpectrum
|
|
10
11
|
},
|
|
11
12
|
dark: {
|
|
12
|
-
palette:
|
|
13
|
+
palette: require_tokens_configs_palette_darkPalette.darkPalette,
|
|
13
14
|
spectrum: require_tokens_configs_spectrum.darkSpectrum
|
|
14
15
|
}
|
|
15
16
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
import { darkPalette
|
|
2
|
+
import { darkPalette } from "./palette/darkPalette.js";
|
|
3
|
+
import { lightPalette } from "./palette/lightPalette.js";
|
|
3
4
|
import { darkSpectrum, lightSpectrum } from "./spectrum.js";
|
|
4
5
|
|
|
5
6
|
//#region src/tokens/configs/colorMode.ts
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
|
|
3
|
+
//#region src/tokens/configs/palette/alwaysPalette.ts
|
|
4
|
+
const ALWAYS_PREFIX = "always/";
|
|
5
|
+
const deprecatedAlwaysPalette = {
|
|
6
|
+
white: "#ffffff",
|
|
7
|
+
black: "#000000",
|
|
8
|
+
transparent: "transparent",
|
|
9
|
+
current: "currentColor"
|
|
10
|
+
};
|
|
11
|
+
const newAlwaysPalette = {
|
|
12
|
+
"always/white": "#ffffff",
|
|
13
|
+
"always/black": "#000000",
|
|
14
|
+
"always/transparent": "transparent",
|
|
15
|
+
"always/current": "currentColor",
|
|
16
|
+
"always/brand": "#7d2eff",
|
|
17
|
+
"always/accent": "#f8fb4c"
|
|
18
|
+
};
|
|
19
|
+
const alwaysPalette = {
|
|
20
|
+
...deprecatedAlwaysPalette,
|
|
21
|
+
...newAlwaysPalette
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.ALWAYS_PREFIX = ALWAYS_PREFIX;
|
|
26
|
+
exports.alwaysPalette = alwaysPalette;
|
|
27
|
+
exports.deprecatedAlwaysPalette = deprecatedAlwaysPalette;
|
|
28
|
+
exports.newAlwaysPalette = newAlwaysPalette;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/tokens/configs/palette/alwaysPalette.d.ts
|
|
2
|
+
declare const ALWAYS_PREFIX = "always/";
|
|
3
|
+
declare const deprecatedAlwaysPalette: {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use 'always/white' instead
|
|
6
|
+
*/
|
|
7
|
+
readonly white: "#ffffff";
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use 'always/black' instead
|
|
10
|
+
*/
|
|
11
|
+
readonly black: "#000000";
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use 'always/transparent' instead
|
|
14
|
+
*/
|
|
15
|
+
readonly transparent: "transparent";
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use 'always/current' instead
|
|
18
|
+
*/
|
|
19
|
+
readonly current: "currentColor";
|
|
20
|
+
};
|
|
21
|
+
declare const newAlwaysPalette: {
|
|
22
|
+
readonly 'always/white': "#ffffff";
|
|
23
|
+
readonly 'always/black': "#000000";
|
|
24
|
+
readonly 'always/transparent': "transparent";
|
|
25
|
+
readonly 'always/current': "currentColor";
|
|
26
|
+
readonly 'always/brand': "#7d2eff";
|
|
27
|
+
readonly 'always/accent': "#f8fb4c";
|
|
28
|
+
};
|
|
29
|
+
declare const alwaysPalette: {
|
|
30
|
+
readonly 'always/white': "#ffffff";
|
|
31
|
+
readonly 'always/black': "#000000";
|
|
32
|
+
readonly 'always/transparent': "transparent";
|
|
33
|
+
readonly 'always/current': "currentColor";
|
|
34
|
+
readonly 'always/brand': "#7d2eff";
|
|
35
|
+
readonly 'always/accent': "#f8fb4c";
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use 'always/white' instead
|
|
38
|
+
*/
|
|
39
|
+
readonly white: "#ffffff";
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use 'always/black' instead
|
|
42
|
+
*/
|
|
43
|
+
readonly black: "#000000";
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use 'always/transparent' instead
|
|
46
|
+
*/
|
|
47
|
+
readonly transparent: "transparent";
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Use 'always/current' instead
|
|
50
|
+
*/
|
|
51
|
+
readonly current: "currentColor";
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ALWAYS_PREFIX, alwaysPalette, deprecatedAlwaysPalette, newAlwaysPalette };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/tokens/configs/palette/alwaysPalette.d.ts
|
|
2
|
+
declare const ALWAYS_PREFIX = "always/";
|
|
3
|
+
declare const deprecatedAlwaysPalette: {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use 'always/white' instead
|
|
6
|
+
*/
|
|
7
|
+
readonly white: "#ffffff";
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use 'always/black' instead
|
|
10
|
+
*/
|
|
11
|
+
readonly black: "#000000";
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use 'always/transparent' instead
|
|
14
|
+
*/
|
|
15
|
+
readonly transparent: "transparent";
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use 'always/current' instead
|
|
18
|
+
*/
|
|
19
|
+
readonly current: "currentColor";
|
|
20
|
+
};
|
|
21
|
+
declare const newAlwaysPalette: {
|
|
22
|
+
readonly 'always/white': "#ffffff";
|
|
23
|
+
readonly 'always/black': "#000000";
|
|
24
|
+
readonly 'always/transparent': "transparent";
|
|
25
|
+
readonly 'always/current': "currentColor";
|
|
26
|
+
readonly 'always/brand': "#7d2eff";
|
|
27
|
+
readonly 'always/accent': "#f8fb4c";
|
|
28
|
+
};
|
|
29
|
+
declare const alwaysPalette: {
|
|
30
|
+
readonly 'always/white': "#ffffff";
|
|
31
|
+
readonly 'always/black': "#000000";
|
|
32
|
+
readonly 'always/transparent': "transparent";
|
|
33
|
+
readonly 'always/current': "currentColor";
|
|
34
|
+
readonly 'always/brand': "#7d2eff";
|
|
35
|
+
readonly 'always/accent': "#f8fb4c";
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use 'always/white' instead
|
|
38
|
+
*/
|
|
39
|
+
readonly white: "#ffffff";
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use 'always/black' instead
|
|
42
|
+
*/
|
|
43
|
+
readonly black: "#000000";
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use 'always/transparent' instead
|
|
46
|
+
*/
|
|
47
|
+
readonly transparent: "transparent";
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Use 'always/current' instead
|
|
50
|
+
*/
|
|
51
|
+
readonly current: "currentColor";
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ALWAYS_PREFIX, alwaysPalette, deprecatedAlwaysPalette, newAlwaysPalette };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
//#region src/tokens/configs/palette/alwaysPalette.ts
|
|
3
|
+
const ALWAYS_PREFIX = "always/";
|
|
4
|
+
const deprecatedAlwaysPalette = {
|
|
5
|
+
white: "#ffffff",
|
|
6
|
+
black: "#000000",
|
|
7
|
+
transparent: "transparent",
|
|
8
|
+
current: "currentColor"
|
|
9
|
+
};
|
|
10
|
+
const newAlwaysPalette = {
|
|
11
|
+
"always/white": "#ffffff",
|
|
12
|
+
"always/black": "#000000",
|
|
13
|
+
"always/transparent": "transparent",
|
|
14
|
+
"always/current": "currentColor",
|
|
15
|
+
"always/brand": "#7d2eff",
|
|
16
|
+
"always/accent": "#f8fb4c"
|
|
17
|
+
};
|
|
18
|
+
const alwaysPalette = {
|
|
19
|
+
...deprecatedAlwaysPalette,
|
|
20
|
+
...newAlwaysPalette
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ALWAYS_PREFIX, alwaysPalette, deprecatedAlwaysPalette, newAlwaysPalette };
|