@yahoo/uds 3.117.4 → 3.117.5
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/styles/styler.d.cts +41 -41
- package/dist/styles/styler.d.ts +41 -41
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.cjs +637 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js +637 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.cjs +36541 -0
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js +36524 -0
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/mapTextVariantFixtureToValue.cjs +20 -0
- package/dist/tailwind/dist/automated-config/dist/mapTextVariantFixtureToValue.js +21 -0
- package/dist/tailwind/dist/automated-config/dist/mapTextVariantFixtureToValue.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/properties.cjs +480 -0
- package/dist/tailwind/dist/automated-config/dist/properties.js +481 -0
- package/dist/tailwind/dist/automated-config/dist/properties.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/utils/assertUnreachable.cjs +10 -0
- package/dist/tailwind/dist/automated-config/dist/utils/assertUnreachable.js +10 -0
- package/dist/tailwind/dist/automated-config/dist/utils/assertUnreachable.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/utils/generateDefaultClassName.cjs +18 -0
- package/dist/tailwind/dist/automated-config/dist/utils/generateDefaultClassName.js +18 -0
- package/dist/tailwind/dist/automated-config/dist/utils/generateDefaultClassName.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/utils/generateSchemaKey.cjs +15 -0
- package/dist/tailwind/dist/automated-config/dist/utils/generateSchemaKey.js +15 -0
- package/dist/tailwind/dist/automated-config/dist/utils/generateSchemaKey.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/utils/index.cjs +479 -0
- package/dist/tailwind/dist/automated-config/dist/utils/index.js +479 -0
- package/dist/tailwind/dist/automated-config/dist/utils/index.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/utils/mapColorFixtureToValue.cjs +28 -0
- package/dist/tailwind/dist/automated-config/dist/utils/mapColorFixtureToValue.js +29 -0
- package/dist/tailwind/dist/automated-config/dist/utils/mapColorFixtureToValue.js.map +1 -0
- package/dist/tailwind/dist/automated-config/dist/utils/variantConfigGuards.cjs +10 -0
- package/dist/tailwind/dist/automated-config/dist/utils/variantConfigGuards.js +9 -0
- package/dist/tailwind/dist/automated-config/dist/utils/variantConfigGuards.js.map +1 -0
- package/dist/tailwind/dist/config/dist/index.cjs +27057 -0
- package/dist/tailwind/dist/config/dist/index.d.cts +11 -0
- package/dist/tailwind/dist/config/dist/index.d.cts.map +1 -0
- package/dist/tailwind/dist/config/dist/index.d.ts +11 -0
- package/dist/tailwind/dist/config/dist/index.d.ts.map +1 -0
- package/dist/tailwind/dist/config/dist/index.js +27057 -0
- package/dist/tailwind/dist/config/dist/index.js.map +1 -0
- package/dist/tailwind/dist/css/generate.cjs +2 -2
- package/dist/tailwind/dist/css/generate.d.cts +0 -1
- package/dist/tailwind/dist/css/generate.d.cts.map +1 -1
- package/dist/tailwind/dist/css/generate.d.ts +0 -1
- package/dist/tailwind/dist/css/generate.d.ts.map +1 -1
- package/dist/tailwind/dist/css/generate.js +1 -1
- package/dist/tailwind/dist/css/runner.cjs +3 -3
- package/dist/tailwind/dist/css/runner.js +1 -1
- package/dist/tailwind/dist/css/utils.cjs +2 -3
- package/dist/tailwind/dist/css/utils.js +1 -1
- package/dist/tailwind/dist/css-tokens/dist/index.cjs +168 -0
- package/dist/tailwind/dist/css-tokens/dist/index.js +127 -0
- package/dist/tailwind/dist/css-tokens/dist/index.js.map +1 -0
- package/dist/tailwind/dist/fixtures/dist/index.cjs +596 -0
- package/dist/tailwind/dist/fixtures/dist/index.js +589 -0
- package/dist/tailwind/dist/fixtures/dist/index.js.map +1 -0
- package/dist/tailwind/dist/fonts/dist/index.cjs +809 -0
- package/dist/tailwind/dist/fonts/dist/index.d.cts +632 -0
- package/dist/tailwind/dist/fonts/dist/index.d.cts.map +1 -0
- package/dist/tailwind/dist/fonts/dist/index.d.ts +632 -0
- package/dist/tailwind/dist/fonts/dist/index.d.ts.map +1 -0
- package/dist/tailwind/dist/fonts/dist/index.js +809 -0
- package/dist/tailwind/dist/fonts/dist/index.js.map +1 -0
- package/dist/tailwind/dist/modes/dist/index.cjs +9 -0
- package/dist/tailwind/dist/modes/dist/index.js +8 -0
- package/dist/tailwind/dist/modes/dist/index.js.map +1 -0
- package/dist/tailwind/dist/motion-tokens/dist/index.cjs +27 -0
- package/dist/tailwind/dist/motion-tokens/dist/index.js +26 -0
- package/dist/tailwind/dist/motion-tokens/dist/index.js.map +1 -0
- package/dist/tailwind/dist/palette/dist/index.cjs +29 -0
- package/dist/tailwind/dist/palette/dist/index.js +26 -0
- package/dist/tailwind/dist/palette/dist/index.js.map +1 -0
- package/dist/tailwind/dist/purger/legacy/purgeCSS.cjs +10 -10
- package/dist/tailwind/dist/purger/legacy/purgeCSS.js +1 -1
- package/dist/tailwind/dist/purger/legacy/purgeFromCode.cjs +4 -4
- package/dist/tailwind/dist/purger/legacy/purgeFromCode.js +1 -1
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +3 -3
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +1 -1
- package/dist/tailwind/dist/purger/optimized/utils/safelist.cjs +3 -3
- package/dist/tailwind/dist/purger/optimized/utils/safelist.js +1 -1
- package/dist/tailwind/dist/tailwind/base/addColorModeVars.cjs +5 -5
- package/dist/tailwind/dist/tailwind/base/addColorModeVars.js +2 -2
- package/dist/tailwind/dist/tailwind/base/addColorModeVarsV2.cjs +8 -8
- package/dist/tailwind/dist/tailwind/base/addColorModeVarsV2.js +2 -2
- package/dist/tailwind/dist/tailwind/base/addScaleModeVars.cjs +10 -11
- package/dist/tailwind/dist/tailwind/base/addScaleModeVars.js +2 -2
- package/dist/tailwind/dist/tailwind/components/getFocusRingStyles.cjs +3 -4
- package/dist/tailwind/dist/tailwind/components/getFocusRingStyles.js +1 -1
- package/dist/tailwind/dist/tailwind/components/getGroupedTextStyles.cjs +9 -10
- package/dist/tailwind/dist/tailwind/components/getGroupedTextStyles.js +2 -2
- package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.cjs +23 -23
- package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.ts +1 -1
- package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.js +2 -2
- package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.cts +3 -3
- package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.cts.map +1 -1
- package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.ts +3 -3
- package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.ts.map +1 -1
- package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.cjs +4 -4
- package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.js +1 -1
- package/dist/tailwind/dist/tailwind/plugins/borderRadius.cjs +4 -4
- package/dist/tailwind/dist/tailwind/plugins/borderRadius.js +2 -2
- package/dist/tailwind/dist/tailwind/plugins/borderWidth.cjs +4 -4
- package/dist/tailwind/dist/tailwind/plugins/borderWidth.js +2 -2
- package/dist/tailwind/dist/tailwind/plugins/colors.cjs +12 -12
- package/dist/tailwind/dist/tailwind/plugins/colors.js +3 -3
- package/dist/tailwind/dist/tailwind/plugins/components.cjs +22 -22
- package/dist/tailwind/dist/tailwind/plugins/components.js +3 -3
- package/dist/tailwind/dist/tailwind/plugins/elevation.cjs +3 -3
- package/dist/tailwind/dist/tailwind/plugins/elevation.js +1 -1
- package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.cjs +2 -3
- package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js +1 -1
- package/dist/tailwind/dist/tailwind/plugins/shadows.cjs +5 -5
- package/dist/tailwind/dist/tailwind/plugins/shadows.js +1 -1
- package/dist/tailwind/dist/tailwind/plugins/sizing.cjs +2 -2
- package/dist/tailwind/dist/tailwind/plugins/sizing.js +1 -1
- package/dist/tailwind/dist/tailwind/plugins/typography.cjs +6 -6
- package/dist/tailwind/dist/tailwind/plugins/typography.js +2 -2
- package/dist/tailwind/dist/tailwind/theme/getFontFamilyTheme.cjs +6 -7
- package/dist/tailwind/dist/tailwind/theme/getFontFamilyTheme.js +2 -2
- package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.ts +1 -1
- package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.ts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getElevationStyles.cjs +6 -7
- package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.ts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getElevationStyles.js +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.cjs +2 -3
- package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.ts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.js +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.cjs +4 -5
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.ts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.js +2 -2
- package/dist/tailwind/dist/tailwind/utils/getMotionStyles.cjs +4 -5
- package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.ts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getMotionStyles.js +2 -2
- package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.cjs +2 -3
- package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.cts +2 -2
- package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.ts +2 -2
- package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.js +1 -1
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.cjs +3 -4
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts +2 -2
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.js +1 -1
- package/dist/tailwind/dist/types/dist/index.d.cts +295 -0
- package/dist/tailwind/dist/types/dist/index.d.cts.map +1 -0
- package/dist/tailwind/dist/types/dist/index.d.ts +295 -0
- package/dist/tailwind/dist/types/dist/index.d.ts.map +1 -0
- package/dist/tailwind/dist/utils/generatePurgeCSSData.cjs +5 -5
- package/dist/tailwind/dist/utils/generatePurgeCSSData.js +2 -2
- package/dist/tailwind/dist/utils/parseTokens.cjs +29 -30
- package/dist/tailwind/dist/utils/parseTokens.d.cts +2 -2
- package/dist/tailwind/dist/utils/parseTokens.d.ts +2 -2
- package/dist/tailwind/dist/utils/parseTokens.js +2 -2
- package/dist/uds/generated/componentData.cjs +1105 -1105
- package/dist/uds/generated/componentData.js +1105 -1105
- package/generated/componentData.json +1508 -1508
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
2
|
+
const require_index = require('../../css-tokens/dist/index.cjs');
|
|
3
|
+
const require_assertUnreachable = require('./utils/assertUnreachable.cjs');
|
|
4
|
+
|
|
5
|
+
//#region ../automated-config/dist/mapTextVariantFixtureToValue.js
|
|
6
|
+
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
|
|
7
|
+
const mapTextVariantFixtureToValue = (key) => (selected, value) => {
|
|
8
|
+
switch (key) {
|
|
9
|
+
case "fontFamily": return `udsFontFamily[${require_index.textVariantsSafe(value)}]`;
|
|
10
|
+
case "fontSize": return `udsFontSize[${require_index.textVariantsSafe(value)}]`;
|
|
11
|
+
case "lineHeight": return `udsLineHeight[${require_index.textVariantsSafe(value)}]`;
|
|
12
|
+
case "letterSpacing": return `udsLetterSpacing[${require_index.textVariantsSafe(value)}]`;
|
|
13
|
+
case "textTransform": return `udsTextTransform[${require_index.textVariantsSafe(value)}]`;
|
|
14
|
+
case "fontWeight": return `udsFontWeight[${require_index.textVariantsSafe(value)}]`;
|
|
15
|
+
}
|
|
16
|
+
return require_assertUnreachable.assertUnreachable(key);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.mapTextVariantFixtureToValue = mapTextVariantFixtureToValue;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
2
|
+
import { textVariantsSafe } from "../../css-tokens/dist/index.js";
|
|
3
|
+
import { assertUnreachable } from "./utils/assertUnreachable.js";
|
|
4
|
+
|
|
5
|
+
//#region ../automated-config/dist/mapTextVariantFixtureToValue.js
|
|
6
|
+
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
|
|
7
|
+
const mapTextVariantFixtureToValue = (key) => (selected, value) => {
|
|
8
|
+
switch (key) {
|
|
9
|
+
case "fontFamily": return `udsFontFamily[${textVariantsSafe(value)}]`;
|
|
10
|
+
case "fontSize": return `udsFontSize[${textVariantsSafe(value)}]`;
|
|
11
|
+
case "lineHeight": return `udsLineHeight[${textVariantsSafe(value)}]`;
|
|
12
|
+
case "letterSpacing": return `udsLetterSpacing[${textVariantsSafe(value)}]`;
|
|
13
|
+
case "textTransform": return `udsTextTransform[${textVariantsSafe(value)}]`;
|
|
14
|
+
case "fontWeight": return `udsFontWeight[${textVariantsSafe(value)}]`;
|
|
15
|
+
}
|
|
16
|
+
return assertUnreachable(key);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { mapTextVariantFixtureToValue };
|
|
21
|
+
//# sourceMappingURL=mapTextVariantFixtureToValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapTextVariantFixtureToValue.js","names":[],"sources":["../../../../automated-config/dist/mapTextVariantFixtureToValue.js"],"sourcesContent":["/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */\nimport { assertUnreachable } from \"./utils/assertUnreachable.js\";\nimport { textVariantsSafe } from \"@yahoo/uds-css-tokens\";\n\n//#region src/mapTextVariantFixtureToValue.ts\nconst mapTextVariantFixtureToValue = (key) => (selected, value) => {\n\tswitch (key) {\n\t\tcase \"fontFamily\": return `udsFontFamily[${textVariantsSafe(value)}]`;\n\t\tcase \"fontSize\": return `udsFontSize[${textVariantsSafe(value)}]`;\n\t\tcase \"lineHeight\": return `udsLineHeight[${textVariantsSafe(value)}]`;\n\t\tcase \"letterSpacing\": return `udsLetterSpacing[${textVariantsSafe(value)}]`;\n\t\tcase \"textTransform\": return `udsTextTransform[${textVariantsSafe(value)}]`;\n\t\tcase \"fontWeight\": return `udsFontWeight[${textVariantsSafe(value)}]`;\n\t}\n\treturn assertUnreachable(key);\n};\n\n//#endregion\nexport { mapTextVariantFixtureToValue };\n//# sourceMappingURL=mapTextVariantFixtureToValue.js.map"],"mappings":";;;;;;AAKA,MAAM,gCAAgC,SAAS,UAAU,UAAU;AAClE,SAAQ,KAAR;EACC,KAAK,aAAc,QAAO,iBAAiB,iBAAiB,MAAM,CAAC;EACnE,KAAK,WAAY,QAAO,eAAe,iBAAiB,MAAM,CAAC;EAC/D,KAAK,aAAc,QAAO,iBAAiB,iBAAiB,MAAM,CAAC;EACnE,KAAK,gBAAiB,QAAO,oBAAoB,iBAAiB,MAAM,CAAC;EACzE,KAAK,gBAAiB,QAAO,oBAAoB,iBAAiB,MAAM,CAAC;EACzE,KAAK,aAAc,QAAO,iBAAiB,iBAAiB,MAAM,CAAC;;AAEpE,QAAO,kBAAkB,IAAI"}
|
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
2
|
+
const require_index = require('../../css-tokens/dist/index.cjs');
|
|
3
|
+
const require_assertUnreachable = require('./utils/assertUnreachable.cjs');
|
|
4
|
+
const require_mapTextVariantFixtureToValue = require('./mapTextVariantFixtureToValue.cjs');
|
|
5
|
+
const require_mapColorFixtureToValue = require('./utils/mapColorFixtureToValue.cjs');
|
|
6
|
+
const require_index$1 = require('../../motion-tokens/dist/index.cjs');
|
|
7
|
+
|
|
8
|
+
//#region ../automated-config/dist/properties.js
|
|
9
|
+
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
|
|
10
|
+
const isInputWrapperCtx = (context) => {
|
|
11
|
+
return context.componentName === "input" && context.layer === "inputWrapper";
|
|
12
|
+
};
|
|
13
|
+
const hexToRgb = (hex) => {
|
|
14
|
+
hex = hex.replace("#", "");
|
|
15
|
+
if (hex.length === 3) hex = hex.split("").map((char) => char + char).join("");
|
|
16
|
+
return `${parseInt(hex.substring(0, 2), 16)} ${parseInt(hex.substring(2, 4), 16)} ${parseInt(hex.substring(4, 6), 16)}`;
|
|
17
|
+
};
|
|
18
|
+
const backgroundColor = {
|
|
19
|
+
name: "backgroundColor",
|
|
20
|
+
cssProperties: "background-color",
|
|
21
|
+
twThemePath: () => {
|
|
22
|
+
return ``;
|
|
23
|
+
},
|
|
24
|
+
possibleFixtures: [
|
|
25
|
+
"backgroundPaletteColors",
|
|
26
|
+
"spectrumColors",
|
|
27
|
+
"alwaysPaletteAliases",
|
|
28
|
+
"elevationAliases"
|
|
29
|
+
],
|
|
30
|
+
customValueRenderer: ({ value, type }, schema, theme) => {
|
|
31
|
+
if (type === "elevationAliases") return `var(--uds-background-color-${value})`;
|
|
32
|
+
return theme(require_mapColorFixtureToValue.mapColorFixtureToValue(type, value));
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const color = {
|
|
36
|
+
name: "color",
|
|
37
|
+
cssProperties: "color",
|
|
38
|
+
twThemePath: require_mapColorFixtureToValue.mapColorFixtureToValue,
|
|
39
|
+
possibleFixtures: [
|
|
40
|
+
"alwaysPaletteAliases",
|
|
41
|
+
"spectrumColors",
|
|
42
|
+
"foregroundPaletteColors"
|
|
43
|
+
]
|
|
44
|
+
};
|
|
45
|
+
const fontSize = {
|
|
46
|
+
name: "fontSize",
|
|
47
|
+
cssProperties: "font-size",
|
|
48
|
+
twThemePath: require_mapTextVariantFixtureToValue.mapTextVariantFixtureToValue("fontSize"),
|
|
49
|
+
possibleFixtures: ["textVariants"]
|
|
50
|
+
};
|
|
51
|
+
const fontVariationSettings = {
|
|
52
|
+
name: "fontVariationSettings",
|
|
53
|
+
cssProperties: "font-variation-settings",
|
|
54
|
+
twThemePath: () => {
|
|
55
|
+
return ``;
|
|
56
|
+
},
|
|
57
|
+
possibleFixtures: ["textVariants"],
|
|
58
|
+
customValueRenderer: (schemaValue) => {
|
|
59
|
+
const { value: rawValue } = schemaValue;
|
|
60
|
+
const value = require_index.textVariantsSafe(rawValue);
|
|
61
|
+
return `"wght" var(--uds-font-weight-${value}), "slnt" var(--uds-font-slant-${value}), "ital" var(--uds-font-slant-${value}), "wdth" var(--uds-font-width-${value})`;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const fontWeight = {
|
|
65
|
+
name: "fontWeight",
|
|
66
|
+
cssProperties: "font-weight",
|
|
67
|
+
twThemePath: require_mapTextVariantFixtureToValue.mapTextVariantFixtureToValue("fontWeight"),
|
|
68
|
+
possibleFixtures: ["textVariants"]
|
|
69
|
+
};
|
|
70
|
+
const fontFamily = {
|
|
71
|
+
name: "fontFamily",
|
|
72
|
+
cssProperties: "font-family",
|
|
73
|
+
twThemePath: require_mapTextVariantFixtureToValue.mapTextVariantFixtureToValue("fontFamily"),
|
|
74
|
+
possibleFixtures: ["textVariants"]
|
|
75
|
+
};
|
|
76
|
+
const textTransform = {
|
|
77
|
+
name: "textTransform",
|
|
78
|
+
cssProperties: "text-transform",
|
|
79
|
+
twThemePath: require_mapTextVariantFixtureToValue.mapTextVariantFixtureToValue("textTransform"),
|
|
80
|
+
possibleFixtures: ["textVariants"]
|
|
81
|
+
};
|
|
82
|
+
const lineHeight = {
|
|
83
|
+
name: "lineHeight",
|
|
84
|
+
cssProperties: "line-height",
|
|
85
|
+
twThemePath: require_mapTextVariantFixtureToValue.mapTextVariantFixtureToValue("lineHeight"),
|
|
86
|
+
possibleFixtures: ["textVariants"]
|
|
87
|
+
};
|
|
88
|
+
const letterSpacing = {
|
|
89
|
+
name: "letterSpacing",
|
|
90
|
+
cssProperties: "letter-spacing",
|
|
91
|
+
twThemePath: require_mapTextVariantFixtureToValue.mapTextVariantFixtureToValue("letterSpacing"),
|
|
92
|
+
possibleFixtures: ["textVariants"]
|
|
93
|
+
};
|
|
94
|
+
const textVariant = {
|
|
95
|
+
name: "textVariant",
|
|
96
|
+
cssProperties: [],
|
|
97
|
+
twThemePath: () => {
|
|
98
|
+
return ``;
|
|
99
|
+
},
|
|
100
|
+
possibleFixtures: ["textVariants"],
|
|
101
|
+
extendedProperties: [
|
|
102
|
+
"fontSize",
|
|
103
|
+
"fontWeight",
|
|
104
|
+
"fontFamily",
|
|
105
|
+
"lineHeight",
|
|
106
|
+
"textTransform",
|
|
107
|
+
"fontVariationSettings",
|
|
108
|
+
"letterSpacing"
|
|
109
|
+
]
|
|
110
|
+
};
|
|
111
|
+
const textDecorationLine = {
|
|
112
|
+
name: "textDecorationLine",
|
|
113
|
+
cssProperties: "text-decoration-line",
|
|
114
|
+
possibleFixtures: ["textDecorationLines"],
|
|
115
|
+
twThemePath: () => {
|
|
116
|
+
return ``;
|
|
117
|
+
},
|
|
118
|
+
customValueRenderer: (schemaValue) => {
|
|
119
|
+
return String(schemaValue.value);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const gap = {
|
|
123
|
+
name: "gap",
|
|
124
|
+
cssProperties: "gap",
|
|
125
|
+
twThemePath: (fixtureType, value) => fixtureType === "spacingAliases" ? `spacing[${value}]` : "",
|
|
126
|
+
possibleFixtures: ["spacingAliases"]
|
|
127
|
+
};
|
|
128
|
+
const borderWidth = {
|
|
129
|
+
name: "borderWidth",
|
|
130
|
+
cssProperties: "border-width",
|
|
131
|
+
twThemePath: (fixtureType, value) => {
|
|
132
|
+
switch (fixtureType) {
|
|
133
|
+
case "borderWidths":
|
|
134
|
+
case "elevationAliases": return `udsBorderWidth[${value}]`;
|
|
135
|
+
case "spacingAliases": return `spacing[${value}]`;
|
|
136
|
+
}
|
|
137
|
+
return require_assertUnreachable.assertUnreachable(fixtureType);
|
|
138
|
+
},
|
|
139
|
+
possibleFixtures: [
|
|
140
|
+
"borderWidths",
|
|
141
|
+
"spacingAliases",
|
|
142
|
+
"elevationAliases"
|
|
143
|
+
],
|
|
144
|
+
extendedProperties: (context) => {
|
|
145
|
+
if (isInputWrapperCtx(context)) return [
|
|
146
|
+
"outlineWidth",
|
|
147
|
+
"insetOutlineOffset",
|
|
148
|
+
"solidOutline"
|
|
149
|
+
];
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const strokeWidth = {
|
|
154
|
+
...borderWidth,
|
|
155
|
+
name: "strokeWidth",
|
|
156
|
+
cssProperties: "stroke-width"
|
|
157
|
+
};
|
|
158
|
+
const borderColor = {
|
|
159
|
+
name: "borderColor",
|
|
160
|
+
cssProperties: "border-color",
|
|
161
|
+
twThemePath: require_mapColorFixtureToValue.mapColorFixtureToValue,
|
|
162
|
+
possibleFixtures: [
|
|
163
|
+
"alwaysPaletteAliases",
|
|
164
|
+
"spectrumColors",
|
|
165
|
+
"linePaletteColors",
|
|
166
|
+
"elevationAliases"
|
|
167
|
+
],
|
|
168
|
+
extendedProperties: (context) => {
|
|
169
|
+
if (isInputWrapperCtx(context)) return ["outlineColor"];
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
const stroke = {
|
|
174
|
+
...borderColor,
|
|
175
|
+
name: "stroke",
|
|
176
|
+
cssProperties: "stroke"
|
|
177
|
+
};
|
|
178
|
+
const outlineWidth = {
|
|
179
|
+
name: "outlineWidth",
|
|
180
|
+
cssProperties: "outline-width",
|
|
181
|
+
twThemePath: (type, value) => type === "borderWidths" ? `udsBorderWidth[${value}]` : `spacing[${value}]`,
|
|
182
|
+
possibleFixtures: ["borderWidths", "spacingAliases"]
|
|
183
|
+
};
|
|
184
|
+
const solidOutline = {
|
|
185
|
+
name: "solidOutline",
|
|
186
|
+
cssProperties: "outline-style",
|
|
187
|
+
twThemePath: () => "",
|
|
188
|
+
customValueRenderer: () => "solid",
|
|
189
|
+
possibleFixtures: []
|
|
190
|
+
};
|
|
191
|
+
const insetOutlineOffset = {
|
|
192
|
+
name: "insetOutlineOffset",
|
|
193
|
+
cssProperties: "outline-offset",
|
|
194
|
+
twThemePath: () => "",
|
|
195
|
+
customValueRenderer: ({ value, type }, schema, theme) => {
|
|
196
|
+
return `calc(-1 * ${type === "borderWidths" ? theme(`udsBorderWidth[${value}]`) : theme(`spacing[${value}]`)})`;
|
|
197
|
+
},
|
|
198
|
+
possibleFixtures: ["borderWidths", "spacingAliases"]
|
|
199
|
+
};
|
|
200
|
+
const outlineColor = {
|
|
201
|
+
name: "outlineColor",
|
|
202
|
+
cssProperties: "outline-color",
|
|
203
|
+
twThemePath: require_mapColorFixtureToValue.mapColorFixtureToValue,
|
|
204
|
+
possibleFixtures: [
|
|
205
|
+
"alwaysPaletteAliases",
|
|
206
|
+
"spectrumColors",
|
|
207
|
+
"linePaletteColors"
|
|
208
|
+
]
|
|
209
|
+
};
|
|
210
|
+
const borderRadius = {
|
|
211
|
+
name: "borderRadius",
|
|
212
|
+
cssProperties: "border-radius",
|
|
213
|
+
twThemePath: (_, value) => `udsBorderRadius.${value}`,
|
|
214
|
+
possibleFixtures: ["borderRadii"]
|
|
215
|
+
};
|
|
216
|
+
const borderRadiusVar = {
|
|
217
|
+
...borderRadius,
|
|
218
|
+
name: "borderRadiusVar",
|
|
219
|
+
cssProperties: `--${require_index.BORDER_RADIUS_PREFIX}`
|
|
220
|
+
};
|
|
221
|
+
const spacing = {
|
|
222
|
+
name: "spacing",
|
|
223
|
+
cssProperties: "padding",
|
|
224
|
+
twThemePath: (_, value) => `spacing[${value}]`,
|
|
225
|
+
possibleFixtures: ["spacingAliases"]
|
|
226
|
+
};
|
|
227
|
+
const spacingHorizontal = {
|
|
228
|
+
name: "spacingHorizontal",
|
|
229
|
+
cssProperties: ["padding-right", "padding-left"],
|
|
230
|
+
twThemePath: (_, value) => `spacing[${value}]`,
|
|
231
|
+
possibleFixtures: ["spacingAliases"]
|
|
232
|
+
};
|
|
233
|
+
const spacingVertical = {
|
|
234
|
+
name: "spacingVertical",
|
|
235
|
+
cssProperties: ["padding-top", "padding-bottom"],
|
|
236
|
+
twThemePath: (_, value) => `spacing[${value}]`,
|
|
237
|
+
possibleFixtures: ["spacingAliases"]
|
|
238
|
+
};
|
|
239
|
+
const horizontalMargin = {
|
|
240
|
+
name: "horizontalMargin",
|
|
241
|
+
cssProperties: ["margin-left", "margin-right"],
|
|
242
|
+
twThemePath: (_, value) => `spacing[${value}]`,
|
|
243
|
+
possibleFixtures: ["spacingAliases"]
|
|
244
|
+
};
|
|
245
|
+
const bottomMargin = {
|
|
246
|
+
name: "bottomMargin",
|
|
247
|
+
cssProperties: "margin-bottom",
|
|
248
|
+
twThemePath: (_, value) => `spacing[${value}]`,
|
|
249
|
+
possibleFixtures: ["spacingAliases"]
|
|
250
|
+
};
|
|
251
|
+
const height = {
|
|
252
|
+
name: "height",
|
|
253
|
+
cssProperties: "height",
|
|
254
|
+
twThemePath: (_, value) => {
|
|
255
|
+
return `height[${value}]`;
|
|
256
|
+
},
|
|
257
|
+
possibleFixtures: ["spacingAliases"]
|
|
258
|
+
};
|
|
259
|
+
const width = {
|
|
260
|
+
name: "width",
|
|
261
|
+
cssProperties: "width",
|
|
262
|
+
twThemePath: (_, value) => {
|
|
263
|
+
return `width[${value}]`;
|
|
264
|
+
},
|
|
265
|
+
possibleFixtures: ["spacingAliases"]
|
|
266
|
+
};
|
|
267
|
+
const shadow = {
|
|
268
|
+
name: "drop shadow",
|
|
269
|
+
cssProperties: "box-shadow",
|
|
270
|
+
twThemePath: () => {
|
|
271
|
+
return ``;
|
|
272
|
+
},
|
|
273
|
+
concatenate: true,
|
|
274
|
+
customValueRenderer: (schemaValue) => {
|
|
275
|
+
const shadowType = "drop";
|
|
276
|
+
const noneValue = "0 0 0 transparent";
|
|
277
|
+
if (schemaValue.valueType === "alias") {
|
|
278
|
+
const noneValue = "0 0 0 transparent";
|
|
279
|
+
if (schemaValue.value === "none") return noneValue;
|
|
280
|
+
if (schemaValue.value !== "custom") return `var(--uds-${shadowType}-shadow-${schemaValue.value})`;
|
|
281
|
+
} else if (schemaValue.valueType === "custom") return schemaValue.value.map((preset, index) => require_index.getShadowLayerValue({
|
|
282
|
+
preset,
|
|
283
|
+
shadowType,
|
|
284
|
+
prefix: index > 0 ? `${index + 1}` : void 0
|
|
285
|
+
}))?.join(", ") || noneValue;
|
|
286
|
+
throw new Error("Invalid valueType");
|
|
287
|
+
},
|
|
288
|
+
possibleFixtures: [
|
|
289
|
+
"shadowVariants",
|
|
290
|
+
"shadowVariantConfig",
|
|
291
|
+
"elevationAliases"
|
|
292
|
+
]
|
|
293
|
+
};
|
|
294
|
+
const insetShadow = {
|
|
295
|
+
name: "inset shadow",
|
|
296
|
+
cssProperties: "box-shadow",
|
|
297
|
+
twThemePath: () => {
|
|
298
|
+
return ``;
|
|
299
|
+
},
|
|
300
|
+
concatenate: true,
|
|
301
|
+
customValueRenderer: (schemaValue) => {
|
|
302
|
+
const shadowType = "inset";
|
|
303
|
+
const noneValue = "0 0 0 transparent";
|
|
304
|
+
if (schemaValue.valueType === "alias") {
|
|
305
|
+
const noneValue = "0 0 0 transparent";
|
|
306
|
+
if (schemaValue.value === "none") return noneValue;
|
|
307
|
+
if (schemaValue.value !== "custom") return `var(--uds-${shadowType}-shadow-${schemaValue.value})`;
|
|
308
|
+
} else if (schemaValue.valueType === "custom") return schemaValue.value.map((preset, index) => require_index.getShadowLayerValue({
|
|
309
|
+
preset,
|
|
310
|
+
shadowType,
|
|
311
|
+
prefix: index > 0 ? `${index + 1}` : void 0
|
|
312
|
+
}))?.join(", ") || noneValue;
|
|
313
|
+
throw new Error("Invalid valueType");
|
|
314
|
+
},
|
|
315
|
+
possibleFixtures: ["shadowVariantsWithInvert"]
|
|
316
|
+
};
|
|
317
|
+
const shadowVar = {
|
|
318
|
+
...shadow,
|
|
319
|
+
name: "shadowVar",
|
|
320
|
+
cssProperties: `--${require_index.DROP_SHADOW_PREFIX}`
|
|
321
|
+
};
|
|
322
|
+
const opacity = {
|
|
323
|
+
name: "opacity",
|
|
324
|
+
cssProperties: "opacity",
|
|
325
|
+
twThemePath: (_, value) => `opacity[${value}]`,
|
|
326
|
+
possibleFixtures: ["opacitySteps"]
|
|
327
|
+
};
|
|
328
|
+
const publicProperties = {
|
|
329
|
+
backgroundColor,
|
|
330
|
+
borderWidth,
|
|
331
|
+
strokeWidth,
|
|
332
|
+
borderRadius,
|
|
333
|
+
borderRadiusVar,
|
|
334
|
+
borderColor,
|
|
335
|
+
stroke,
|
|
336
|
+
buttonSize: {
|
|
337
|
+
name: "buttonSize",
|
|
338
|
+
cssProperties: "--uds-button-size",
|
|
339
|
+
possibleFixtures: ["buttonSizes"],
|
|
340
|
+
twThemePath: () => {
|
|
341
|
+
return ``;
|
|
342
|
+
},
|
|
343
|
+
customValueRenderer: (schemaValue) => {
|
|
344
|
+
return String(schemaValue.value);
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
buttonVariant: {
|
|
348
|
+
name: "buttonVariant",
|
|
349
|
+
cssProperties: "--uds-button-variant",
|
|
350
|
+
possibleFixtures: ["buttonVariantsFlat"],
|
|
351
|
+
twThemePath: () => {
|
|
352
|
+
return ``;
|
|
353
|
+
},
|
|
354
|
+
customValueRenderer: (schemaValue) => {
|
|
355
|
+
return String(schemaValue.value);
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
fontFamily,
|
|
359
|
+
fontSize,
|
|
360
|
+
fontVariationSettings,
|
|
361
|
+
lineHeight,
|
|
362
|
+
textTransform,
|
|
363
|
+
letterSpacing,
|
|
364
|
+
gap,
|
|
365
|
+
color,
|
|
366
|
+
opacity,
|
|
367
|
+
fillOpacity: {
|
|
368
|
+
name: "fillOpacity",
|
|
369
|
+
cssProperties: "fill-opacity",
|
|
370
|
+
twThemePath: (_, value) => `opacity[${value}]`,
|
|
371
|
+
possibleFixtures: ["opacitySteps"]
|
|
372
|
+
},
|
|
373
|
+
fontWeight,
|
|
374
|
+
iconSize: {
|
|
375
|
+
name: "iconSize",
|
|
376
|
+
cssProperties: ["width", "height"],
|
|
377
|
+
twThemePath: (_, value) => `sizing.icon.${value}`,
|
|
378
|
+
possibleFixtures: ["iconSizes"]
|
|
379
|
+
},
|
|
380
|
+
spacing,
|
|
381
|
+
iconVariant: {
|
|
382
|
+
name: "iconVariant",
|
|
383
|
+
cssProperties: "--uds-icon-variant",
|
|
384
|
+
possibleFixtures: ["iconVariants"],
|
|
385
|
+
twThemePath: () => {
|
|
386
|
+
return ``;
|
|
387
|
+
},
|
|
388
|
+
customValueRenderer: (schemaValue) => {
|
|
389
|
+
return String(schemaValue.value);
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
horizontalMargin,
|
|
393
|
+
bottomMargin,
|
|
394
|
+
spacingHorizontal,
|
|
395
|
+
spacingVertical,
|
|
396
|
+
textVariant,
|
|
397
|
+
textDecorationLine,
|
|
398
|
+
shadow,
|
|
399
|
+
shadowVar,
|
|
400
|
+
insetShadow,
|
|
401
|
+
height,
|
|
402
|
+
width,
|
|
403
|
+
scaleEffect: {
|
|
404
|
+
name: "scaleEffect",
|
|
405
|
+
cssProperties: require_index.BUTTON_SCALE_EFFECT,
|
|
406
|
+
possibleFixtures: ["scaleEffects"],
|
|
407
|
+
twThemePath: () => {
|
|
408
|
+
return ``;
|
|
409
|
+
},
|
|
410
|
+
customValueRenderer: (schemaValue) => {
|
|
411
|
+
const value = schemaValue.value;
|
|
412
|
+
const stringValue = String(value);
|
|
413
|
+
return String(require_index$1.SCALE_EFFECTS[stringValue] ?? require_index$1.SCALE_EFFECTS.none);
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
backdropBlur: {
|
|
417
|
+
name: "backdropBlur",
|
|
418
|
+
possibleFixtures: ["positiveIntegers"],
|
|
419
|
+
cssProperties: "--uds-backdrop-blur",
|
|
420
|
+
twThemePath: () => {
|
|
421
|
+
return ``;
|
|
422
|
+
},
|
|
423
|
+
customValueRenderer: (schemaValue, schema, _theme, originalPropertyDefinition) => {
|
|
424
|
+
if (originalPropertyDefinition && originalPropertyDefinition.layerReference) {
|
|
425
|
+
const { variablePath, propertyName } = originalPropertyDefinition.layerReference;
|
|
426
|
+
const property = schema.variables[variablePath][propertyName].rest;
|
|
427
|
+
if (property.type === "elevationAliases") return `var(--uds-background-blur-radius-${property.value})`;
|
|
428
|
+
}
|
|
429
|
+
return `blur(${schemaValue.value}px)`;
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
blurBackgroundColor: {
|
|
433
|
+
...backgroundColor,
|
|
434
|
+
name: "blurBackgroundColor",
|
|
435
|
+
cssProperties: `--${require_index.BACKGROUND_BLUR_COLOR_PREFIX}`
|
|
436
|
+
},
|
|
437
|
+
blurBackgroundColorFallback: {
|
|
438
|
+
...backgroundColor,
|
|
439
|
+
name: "blurBackgroundColorFallback",
|
|
440
|
+
cssProperties: `--${require_index.BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX}`
|
|
441
|
+
},
|
|
442
|
+
scrimBackgroundColor: {
|
|
443
|
+
name: "scrimBackgroundColor",
|
|
444
|
+
cssProperties: "--uds-scrim-background-color",
|
|
445
|
+
twThemePath: () => {
|
|
446
|
+
return ``;
|
|
447
|
+
},
|
|
448
|
+
possibleFixtures: [
|
|
449
|
+
"backgroundPaletteColors",
|
|
450
|
+
"spectrumColors",
|
|
451
|
+
"alwaysPaletteAliases"
|
|
452
|
+
],
|
|
453
|
+
customValueRenderer: ({ value, type }, schema, theme) => {
|
|
454
|
+
const resolved = theme(require_mapColorFixtureToValue.mapColorFixtureToValue(type, value));
|
|
455
|
+
if (resolved.startsWith("#")) return hexToRgb(resolved) ?? resolved;
|
|
456
|
+
if (resolved.startsWith("rgb(") && resolved.endsWith(")")) return resolved.slice(4, -1);
|
|
457
|
+
return resolved;
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
scrimOpacity: {
|
|
461
|
+
...opacity,
|
|
462
|
+
name: "scrimOpacity",
|
|
463
|
+
cssProperties: "--uds-scrim-opacity",
|
|
464
|
+
twThemePath: () => "",
|
|
465
|
+
customValueRenderer: ({ value }) => `${String(value)}%`
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
const internalProperties = {
|
|
469
|
+
outlineWidth,
|
|
470
|
+
outlineColor,
|
|
471
|
+
insetOutlineOffset,
|
|
472
|
+
solidOutline
|
|
473
|
+
};
|
|
474
|
+
const configurableProperties = {
|
|
475
|
+
...publicProperties,
|
|
476
|
+
...internalProperties
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
//#endregion
|
|
480
|
+
exports.configurableProperties = configurableProperties;
|