@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.
Files changed (161) hide show
  1. package/dist/styles/styler.d.cts +41 -41
  2. package/dist/styles/styler.d.ts +41 -41
  3. package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.cjs +637 -0
  4. package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js +637 -0
  5. package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js.map +1 -0
  6. package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.cjs +36541 -0
  7. package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js +36524 -0
  8. package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js.map +1 -0
  9. package/dist/tailwind/dist/automated-config/dist/mapTextVariantFixtureToValue.cjs +20 -0
  10. package/dist/tailwind/dist/automated-config/dist/mapTextVariantFixtureToValue.js +21 -0
  11. package/dist/tailwind/dist/automated-config/dist/mapTextVariantFixtureToValue.js.map +1 -0
  12. package/dist/tailwind/dist/automated-config/dist/properties.cjs +480 -0
  13. package/dist/tailwind/dist/automated-config/dist/properties.js +481 -0
  14. package/dist/tailwind/dist/automated-config/dist/properties.js.map +1 -0
  15. package/dist/tailwind/dist/automated-config/dist/utils/assertUnreachable.cjs +10 -0
  16. package/dist/tailwind/dist/automated-config/dist/utils/assertUnreachable.js +10 -0
  17. package/dist/tailwind/dist/automated-config/dist/utils/assertUnreachable.js.map +1 -0
  18. package/dist/tailwind/dist/automated-config/dist/utils/generateDefaultClassName.cjs +18 -0
  19. package/dist/tailwind/dist/automated-config/dist/utils/generateDefaultClassName.js +18 -0
  20. package/dist/tailwind/dist/automated-config/dist/utils/generateDefaultClassName.js.map +1 -0
  21. package/dist/tailwind/dist/automated-config/dist/utils/generateSchemaKey.cjs +15 -0
  22. package/dist/tailwind/dist/automated-config/dist/utils/generateSchemaKey.js +15 -0
  23. package/dist/tailwind/dist/automated-config/dist/utils/generateSchemaKey.js.map +1 -0
  24. package/dist/tailwind/dist/automated-config/dist/utils/index.cjs +479 -0
  25. package/dist/tailwind/dist/automated-config/dist/utils/index.js +479 -0
  26. package/dist/tailwind/dist/automated-config/dist/utils/index.js.map +1 -0
  27. package/dist/tailwind/dist/automated-config/dist/utils/mapColorFixtureToValue.cjs +28 -0
  28. package/dist/tailwind/dist/automated-config/dist/utils/mapColorFixtureToValue.js +29 -0
  29. package/dist/tailwind/dist/automated-config/dist/utils/mapColorFixtureToValue.js.map +1 -0
  30. package/dist/tailwind/dist/automated-config/dist/utils/variantConfigGuards.cjs +10 -0
  31. package/dist/tailwind/dist/automated-config/dist/utils/variantConfigGuards.js +9 -0
  32. package/dist/tailwind/dist/automated-config/dist/utils/variantConfigGuards.js.map +1 -0
  33. package/dist/tailwind/dist/config/dist/index.cjs +27057 -0
  34. package/dist/tailwind/dist/config/dist/index.d.cts +11 -0
  35. package/dist/tailwind/dist/config/dist/index.d.cts.map +1 -0
  36. package/dist/tailwind/dist/config/dist/index.d.ts +11 -0
  37. package/dist/tailwind/dist/config/dist/index.d.ts.map +1 -0
  38. package/dist/tailwind/dist/config/dist/index.js +27057 -0
  39. package/dist/tailwind/dist/config/dist/index.js.map +1 -0
  40. package/dist/tailwind/dist/css/generate.cjs +2 -2
  41. package/dist/tailwind/dist/css/generate.d.cts +0 -1
  42. package/dist/tailwind/dist/css/generate.d.cts.map +1 -1
  43. package/dist/tailwind/dist/css/generate.d.ts +0 -1
  44. package/dist/tailwind/dist/css/generate.d.ts.map +1 -1
  45. package/dist/tailwind/dist/css/generate.js +1 -1
  46. package/dist/tailwind/dist/css/runner.cjs +3 -3
  47. package/dist/tailwind/dist/css/runner.js +1 -1
  48. package/dist/tailwind/dist/css/utils.cjs +2 -3
  49. package/dist/tailwind/dist/css/utils.js +1 -1
  50. package/dist/tailwind/dist/css-tokens/dist/index.cjs +168 -0
  51. package/dist/tailwind/dist/css-tokens/dist/index.js +127 -0
  52. package/dist/tailwind/dist/css-tokens/dist/index.js.map +1 -0
  53. package/dist/tailwind/dist/fixtures/dist/index.cjs +596 -0
  54. package/dist/tailwind/dist/fixtures/dist/index.js +589 -0
  55. package/dist/tailwind/dist/fixtures/dist/index.js.map +1 -0
  56. package/dist/tailwind/dist/fonts/dist/index.cjs +809 -0
  57. package/dist/tailwind/dist/fonts/dist/index.d.cts +632 -0
  58. package/dist/tailwind/dist/fonts/dist/index.d.cts.map +1 -0
  59. package/dist/tailwind/dist/fonts/dist/index.d.ts +632 -0
  60. package/dist/tailwind/dist/fonts/dist/index.d.ts.map +1 -0
  61. package/dist/tailwind/dist/fonts/dist/index.js +809 -0
  62. package/dist/tailwind/dist/fonts/dist/index.js.map +1 -0
  63. package/dist/tailwind/dist/modes/dist/index.cjs +9 -0
  64. package/dist/tailwind/dist/modes/dist/index.js +8 -0
  65. package/dist/tailwind/dist/modes/dist/index.js.map +1 -0
  66. package/dist/tailwind/dist/motion-tokens/dist/index.cjs +27 -0
  67. package/dist/tailwind/dist/motion-tokens/dist/index.js +26 -0
  68. package/dist/tailwind/dist/motion-tokens/dist/index.js.map +1 -0
  69. package/dist/tailwind/dist/palette/dist/index.cjs +29 -0
  70. package/dist/tailwind/dist/palette/dist/index.js +26 -0
  71. package/dist/tailwind/dist/palette/dist/index.js.map +1 -0
  72. package/dist/tailwind/dist/purger/legacy/purgeCSS.cjs +10 -10
  73. package/dist/tailwind/dist/purger/legacy/purgeCSS.js +1 -1
  74. package/dist/tailwind/dist/purger/legacy/purgeFromCode.cjs +4 -4
  75. package/dist/tailwind/dist/purger/legacy/purgeFromCode.js +1 -1
  76. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +3 -3
  77. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +1 -1
  78. package/dist/tailwind/dist/purger/optimized/utils/safelist.cjs +3 -3
  79. package/dist/tailwind/dist/purger/optimized/utils/safelist.js +1 -1
  80. package/dist/tailwind/dist/tailwind/base/addColorModeVars.cjs +5 -5
  81. package/dist/tailwind/dist/tailwind/base/addColorModeVars.js +2 -2
  82. package/dist/tailwind/dist/tailwind/base/addColorModeVarsV2.cjs +8 -8
  83. package/dist/tailwind/dist/tailwind/base/addColorModeVarsV2.js +2 -2
  84. package/dist/tailwind/dist/tailwind/base/addScaleModeVars.cjs +10 -11
  85. package/dist/tailwind/dist/tailwind/base/addScaleModeVars.js +2 -2
  86. package/dist/tailwind/dist/tailwind/components/getFocusRingStyles.cjs +3 -4
  87. package/dist/tailwind/dist/tailwind/components/getFocusRingStyles.js +1 -1
  88. package/dist/tailwind/dist/tailwind/components/getGroupedTextStyles.cjs +9 -10
  89. package/dist/tailwind/dist/tailwind/components/getGroupedTextStyles.js +2 -2
  90. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.cjs +23 -23
  91. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.cts +1 -1
  92. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.ts +1 -1
  93. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.js +2 -2
  94. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.cts +3 -3
  95. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.cts.map +1 -1
  96. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.ts +3 -3
  97. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.ts.map +1 -1
  98. package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.cjs +4 -4
  99. package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.js +1 -1
  100. package/dist/tailwind/dist/tailwind/plugins/borderRadius.cjs +4 -4
  101. package/dist/tailwind/dist/tailwind/plugins/borderRadius.js +2 -2
  102. package/dist/tailwind/dist/tailwind/plugins/borderWidth.cjs +4 -4
  103. package/dist/tailwind/dist/tailwind/plugins/borderWidth.js +2 -2
  104. package/dist/tailwind/dist/tailwind/plugins/colors.cjs +12 -12
  105. package/dist/tailwind/dist/tailwind/plugins/colors.js +3 -3
  106. package/dist/tailwind/dist/tailwind/plugins/components.cjs +22 -22
  107. package/dist/tailwind/dist/tailwind/plugins/components.js +3 -3
  108. package/dist/tailwind/dist/tailwind/plugins/elevation.cjs +3 -3
  109. package/dist/tailwind/dist/tailwind/plugins/elevation.js +1 -1
  110. package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.cjs +2 -3
  111. package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js +1 -1
  112. package/dist/tailwind/dist/tailwind/plugins/shadows.cjs +5 -5
  113. package/dist/tailwind/dist/tailwind/plugins/shadows.js +1 -1
  114. package/dist/tailwind/dist/tailwind/plugins/sizing.cjs +2 -2
  115. package/dist/tailwind/dist/tailwind/plugins/sizing.js +1 -1
  116. package/dist/tailwind/dist/tailwind/plugins/typography.cjs +6 -6
  117. package/dist/tailwind/dist/tailwind/plugins/typography.js +2 -2
  118. package/dist/tailwind/dist/tailwind/theme/getFontFamilyTheme.cjs +6 -7
  119. package/dist/tailwind/dist/tailwind/theme/getFontFamilyTheme.js +2 -2
  120. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.cts +1 -1
  121. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.ts +1 -1
  122. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.cts +1 -1
  123. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.ts +1 -1
  124. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.cjs +6 -7
  125. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.cts +1 -1
  126. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.ts +1 -1
  127. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.js +1 -1
  128. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.cjs +2 -3
  129. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.cts +1 -1
  130. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.ts +1 -1
  131. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.js +1 -1
  132. package/dist/tailwind/dist/tailwind/utils/getFontStyles.cjs +4 -5
  133. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.cts +1 -1
  134. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.ts +1 -1
  135. package/dist/tailwind/dist/tailwind/utils/getFontStyles.js +2 -2
  136. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.cjs +4 -5
  137. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.cts +1 -1
  138. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.ts +1 -1
  139. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.js +2 -2
  140. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.cjs +2 -3
  141. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.cts +2 -2
  142. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.ts +2 -2
  143. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.js +1 -1
  144. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.cjs +3 -4
  145. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts +2 -2
  146. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts +2 -2
  147. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.js +1 -1
  148. package/dist/tailwind/dist/types/dist/index.d.cts +295 -0
  149. package/dist/tailwind/dist/types/dist/index.d.cts.map +1 -0
  150. package/dist/tailwind/dist/types/dist/index.d.ts +295 -0
  151. package/dist/tailwind/dist/types/dist/index.d.ts.map +1 -0
  152. package/dist/tailwind/dist/utils/generatePurgeCSSData.cjs +5 -5
  153. package/dist/tailwind/dist/utils/generatePurgeCSSData.js +2 -2
  154. package/dist/tailwind/dist/utils/parseTokens.cjs +29 -30
  155. package/dist/tailwind/dist/utils/parseTokens.d.cts +2 -2
  156. package/dist/tailwind/dist/utils/parseTokens.d.ts +2 -2
  157. package/dist/tailwind/dist/utils/parseTokens.js +2 -2
  158. package/dist/uds/generated/componentData.cjs +1105 -1105
  159. package/dist/uds/generated/componentData.js +1105 -1105
  160. package/generated/componentData.json +1508 -1508
  161. package/package.json +1 -1
@@ -0,0 +1,479 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ import { BUTTON_GAP_VAR, BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED, BUTTON_SCALE_EFFECT_REST } from "../../../css-tokens/dist/index.js";
3
+ import { configurableProperties } from "../properties.js";
4
+ import { generateDefaultClassName } from "./generateDefaultClassName.js";
5
+ import { generateSchemaKey } from "./generateSchemaKey.js";
6
+ import { isVariantConfigWithComponentStates, isVariantConfigWithProperties } from "./variantConfigGuards.js";
7
+ import { isFunction, mergeWith } from "lodash-es";
8
+
9
+ //#region ../automated-config/dist/utils/index.js
10
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
11
+ const CSS_GAP = "gap";
12
+ const CSS_LINE_HEIGHT = "line-height";
13
+ const CSS_BORDER_WIDTH = "border-width";
14
+ const CSS_BORDER_COLOR = "border-color";
15
+ const CSS_BOX_SHADOW = "box-shadow";
16
+ function deepMerge(target, source) {
17
+ return mergeWith({}, target, source);
18
+ }
19
+ const COMPONENTS_WITH_SHADOW_BORDERS = [
20
+ {
21
+ componentName: "button",
22
+ layer: "root"
23
+ },
24
+ {
25
+ componentName: "iconbutton",
26
+ layer: "root"
27
+ },
28
+ {
29
+ componentName: "chip",
30
+ layer: "root"
31
+ }
32
+ ];
33
+ /**
34
+ * Map our "states" to pseudo-classes (hover => :hover, pressed => :active, etc.).
35
+ * Adjust or extend as needed.
36
+ */
37
+ const statePseudoMap = {
38
+ rest: "",
39
+ hover: ":hover:not(:active, :disabled, :has(:disabled))",
40
+ pressed: ":active:not(:disabled, :has(:disabled))",
41
+ disabled: ":is(:disabled, :has(:disabled))",
42
+ visited: ":visited",
43
+ focused: ":focus",
44
+ "focus-within": ":focus-within",
45
+ "focused-keyboard": ":focus-visible",
46
+ readonly: ":has(input:read-only)",
47
+ invalid: ":has(input[aria-invalid=\"true\"])",
48
+ "invalid&hover": ":has(input[aria-invalid=\"true\"]):hover:not(:active, :disabled, :has(:disabled))",
49
+ "invalid&pressed": ":has(input[aria-invalid=\"true\"]):active:not(:disabled, :has(:disabled))"
50
+ };
51
+ const statePseudoMapDocsMode = {
52
+ rest: "",
53
+ hover: "hover",
54
+ pressed: "active",
55
+ disabled: "has-disabled",
56
+ visited: "visited",
57
+ focused: "focus",
58
+ "focus-within": "focus-within",
59
+ "focused-keyboard": "focus-visible",
60
+ readonly: "input-readonly",
61
+ invalid: "has-input-invalid",
62
+ "invalid&hover": "has-input-invalid-and-hover",
63
+ "invalid&pressed": "has-input-invalid-and-active"
64
+ };
65
+ /**
66
+ * Generates button line-height with icon size minimum.
67
+ * Ensures button line-height is at least as tall as the icon to prevent clipping.
68
+ * @returns Enhanced line-height CSS value with max(), or original value if icon size unavailable
69
+ */
70
+ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey, state, theme }) {
71
+ const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
72
+ if (iconSizeValue) return `max(${lineHeight}, ${theme(configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue))})`;
73
+ return lineHeight;
74
+ }
75
+ /**
76
+ * Forces button borders to use box-shadow instead of border properties.
77
+ * Converts border-width and border-color into an inset box-shadow layer.
78
+ *
79
+ * Why box-shadow for borders?
80
+ * - Respects border-radius (unlike outline which stays rectangular)
81
+ * - Allows layering multiple shadows in a single property
82
+ * - GPU-accelerated and performant
83
+ * - Works perfectly with rounded/circular buttons
84
+ *
85
+ * @param classStyles - The CSS declarations for a button class
86
+ * @returns Modified styles with box-shadow layers, or original if no border
87
+ *
88
+ * @example
89
+ * Input: { border-width: '2px', border-color: 'red', box-shadow: '0 2px 4px rgba(0,0,0,0.1)' }
90
+ * Output: { box-shadow: 'inset 0 0 0 2px red, 0 2px 4px rgba(0,0,0,0.1)' }
91
+ */
92
+ function applyBoxShadowBorder(classStyles) {
93
+ const borderWidth = classStyles[CSS_BORDER_WIDTH];
94
+ const borderColor = classStyles[CSS_BORDER_COLOR];
95
+ if (!borderWidth || !borderColor) return classStyles;
96
+ const stripImportant = (value) => value.replace(/\s*!important\s*$/, "");
97
+ const hasImportant = (value) => value?.includes("!important") ?? false;
98
+ const layers = [`inset 0 0 0 ${stripImportant(borderWidth)} ${stripImportant(borderColor)}`, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
99
+ const needsImportant = hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
100
+ const newStyles = { ...classStyles };
101
+ newStyles[CSS_BOX_SHADOW] = layers.join(", ") + (needsImportant ? " !important" : "");
102
+ delete newStyles[CSS_BORDER_WIDTH];
103
+ delete newStyles[CSS_BORDER_COLOR];
104
+ return newStyles;
105
+ }
106
+ function generateClassName({ componentName, subComponentName, variantKey, variantValue, componentStateKey, componentStateValue, layer, layerOptionalPseudoSelector }) {
107
+ let className = "";
108
+ if (subComponentName) className = `uds-${componentName}-${subComponentName}-${variantKey}`.toLowerCase();
109
+ else className = `uds-${componentName}-${variantKey}`.toLowerCase();
110
+ if (variantValue) className = `${className}-${variantValue}`.toLowerCase();
111
+ if (componentStateKey && componentStateValue) className = `${className}-${componentStateKey}-${componentStateValue}`.toLowerCase();
112
+ className = `${className}-${layer}`.toLowerCase();
113
+ if (layerOptionalPseudoSelector) className = `${className}${layerOptionalPseudoSelector}`;
114
+ return className.replaceAll(/\s+/g, "-");
115
+ }
116
+ const getTheCssPropertyValue = (schema, theme, propertyName, schemaStateValue, existingValue, originalPropertyDefinition) => {
117
+ const { value, type } = schemaStateValue;
118
+ const propertyConfig = configurableProperties[propertyName];
119
+ let newValue;
120
+ if (propertyConfig.customValueRenderer) newValue = propertyConfig.customValueRenderer(schemaStateValue, schema, theme, originalPropertyDefinition);
121
+ else {
122
+ const safeTwThemePath = propertyConfig.twThemePath;
123
+ newValue = theme(safeTwThemePath(type, String(value)));
124
+ }
125
+ if (propertyConfig.concatenate && existingValue) return `${existingValue}${propertyConfig.concatenationDelimiter || ", "}${newValue}`;
126
+ return newValue;
127
+ };
128
+ function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions }) {
129
+ const schemaKey = generateSchemaKey({
130
+ variantKey,
131
+ variantValue,
132
+ layer,
133
+ subComponentName,
134
+ componentStateKey,
135
+ componentStateValue
136
+ });
137
+ let className = generateClassName({
138
+ componentName,
139
+ variantKey,
140
+ variantValue,
141
+ layer,
142
+ subComponentName,
143
+ componentStateKey,
144
+ componentStateValue
145
+ });
146
+ const propertyStateMap = schema.variables?.[schemaKey]?.[propertyKey];
147
+ if (!propertyStateMap) throw new Error(`Prop definition (${componentName} - ${schemaKey} - ${propertyKey}) not found, this is not expected, please report the bug to the UDS team`);
148
+ const styles = {};
149
+ for (const propStateStr in propertyStateMap) {
150
+ const propertyState = propStateStr;
151
+ const propertyStateSelector = statePseudoMap[propertyState] ?? "";
152
+ const schemaValueForState = propertyStateMap[propertyState];
153
+ let fullClassName = ``;
154
+ if (layer === "root") if (componentStateKey && componentStateValue) {
155
+ const rootVariantClass = generateClassName({
156
+ componentName,
157
+ variantKey,
158
+ variantValue,
159
+ layer,
160
+ subComponentName
161
+ });
162
+ className = generateClassName({
163
+ componentName,
164
+ variantKey,
165
+ layer,
166
+ subComponentName,
167
+ componentStateKey,
168
+ componentStateValue
169
+ });
170
+ fullClassName = `.${rootVariantClass}${propertyStateSelector}.${className}`;
171
+ } else fullClassName = `.${className}${propertyStateSelector}`;
172
+ else {
173
+ const rootVariantClassName = generateClassName({
174
+ componentName,
175
+ variantKey,
176
+ variantValue,
177
+ layer: "root",
178
+ subComponentName
179
+ });
180
+ if (componentStateKey && componentStateValue) {
181
+ const rootVariantClassNameWithComponentState = generateClassName({
182
+ componentName,
183
+ variantKey,
184
+ layer: "root",
185
+ subComponentName,
186
+ componentStateKey,
187
+ componentStateValue
188
+ });
189
+ className = generateClassName({
190
+ componentName,
191
+ variantKey,
192
+ variantValue,
193
+ layer,
194
+ layerOptionalPseudoSelector,
195
+ subComponentName
196
+ });
197
+ fullClassName = `.${rootVariantClassName}${propertyStateSelector}.${rootVariantClassNameWithComponentState} .${className}`;
198
+ } else fullClassName = `.${rootVariantClassName}${propertyStateSelector} .${className}`;
199
+ }
200
+ const { cssProperties, extendedProperties: extendedPropertiesGetter } = configurableProperties[originalPropertyDefinition.name];
201
+ const cssDeclarations = {};
202
+ const isExtendedPropertiesFunction = isFunction(extendedPropertiesGetter);
203
+ const extendedProperties = isExtendedPropertiesFunction ? extendedPropertiesGetter({
204
+ componentName,
205
+ subComponentName,
206
+ layer,
207
+ propertyKey
208
+ }) : extendedPropertiesGetter;
209
+ if (extendedProperties && extendedProperties.length) {
210
+ if (!isExtendedPropertiesFunction && (typeof cssProperties === "string" || Array.isArray(cssProperties) && cssProperties.length > 0)) throw new Error("Invalid configuration: cssProperties should not be configured when extendedProperties are defined. Please update your property configuration accordingly.");
211
+ for (const extendedProp of extendedProperties) {
212
+ const cssPropertiesRef = configurableProperties[extendedProp].cssProperties;
213
+ if (typeof cssPropertiesRef === "string") {
214
+ const existingValue = currentStyles?.[fullClassName]?.[cssPropertiesRef];
215
+ cssDeclarations[cssPropertiesRef] = getTheCssPropertyValue(schema, theme, extendedProp, schemaValueForState, existingValue);
216
+ } else if (Array.isArray(cssPropertiesRef)) for (const cssProp of cssPropertiesRef) {
217
+ const existingValue = currentStyles?.[fullClassName]?.[cssProp];
218
+ cssDeclarations[cssProp] = getTheCssPropertyValue(schema, theme, extendedProp, schemaValueForState, existingValue);
219
+ }
220
+ }
221
+ } else if (typeof cssProperties === "string") {
222
+ const existingValue = currentStyles?.[fullClassName]?.[cssProperties];
223
+ cssDeclarations[cssProperties] = getTheCssPropertyValue(schema, theme, originalPropertyDefinition.name, schemaValueForState, existingValue, originalPropertyDefinition);
224
+ } else if (Array.isArray(cssProperties)) for (const cssProp of cssProperties) {
225
+ const existingValue = currentStyles?.[fullClassName]?.[cssProp];
226
+ cssDeclarations[cssProp] = getTheCssPropertyValue(schema, theme, originalPropertyDefinition.name, schemaValueForState, existingValue, originalPropertyDefinition);
227
+ }
228
+ /**
229
+ * Button root layer workarounds & enhancements.
230
+ * These handle Motion animation bridges and visual fixes until better config-to-component solutions exist.
231
+ */
232
+ if (componentName === "button" && layer === "root") {
233
+ if (propertyKey === CSS_GAP) cssDeclarations[BUTTON_GAP_VAR] = cssDeclarations[CSS_GAP];
234
+ if (propertyKey === "scaleEffect" && propertyState === "hover") {
235
+ const rootClassName = `.${className}`;
236
+ const renderValue = (schemaValue) => configurableProperties.scaleEffect.customValueRenderer?.(schemaValue, schema, () => "") ?? "1";
237
+ if (!styles[rootClassName]) styles[rootClassName] = {};
238
+ styles[rootClassName][BUTTON_SCALE_EFFECT_REST] = "1";
239
+ if (propertyStateMap.hover) styles[rootClassName][BUTTON_SCALE_EFFECT_HOVER] = renderValue(propertyStateMap.hover);
240
+ if (propertyStateMap.pressed) styles[rootClassName][BUTTON_SCALE_EFFECT_PRESSED] = renderValue(propertyStateMap.pressed);
241
+ }
242
+ if (cssDeclarations[CSS_LINE_HEIGHT]) {
243
+ const iconLayerKey = generateSchemaKey({
244
+ variantKey,
245
+ variantValue,
246
+ layer: "icon",
247
+ subComponentName
248
+ });
249
+ cssDeclarations[CSS_LINE_HEIGHT] = getButtonLineHeightWithIconMinimum({
250
+ lineHeight: cssDeclarations[CSS_LINE_HEIGHT],
251
+ schema,
252
+ iconLayerKey,
253
+ state: propertyState,
254
+ theme
255
+ });
256
+ }
257
+ }
258
+ if (!styles[fullClassName]) styles[fullClassName] = {
259
+ ...cssDeclarations,
260
+ ...styles[fullClassName]
261
+ };
262
+ if (previewOptions?.generatePseudoStateClassModifier) {
263
+ const pseudoPrefixClass = statePseudoMapDocsMode[propertyState] ?? "";
264
+ if (pseudoPrefixClass.length) {
265
+ const importantCssDeclarations = Object.fromEntries(Object.entries(cssDeclarations).map(([prop, value]) => {
266
+ const strValue = String(value).trimEnd().replace(/;$/, "");
267
+ if (strValue.includes("!important")) return [prop, strValue];
268
+ return [prop, `${strValue} !important`];
269
+ }));
270
+ styles[`.${pseudoPrefixClass}${fullClassName}`.replace(propertyStateSelector, "")] = {
271
+ ...importantCssDeclarations,
272
+ ...styles[`.${pseudoPrefixClass}${fullClassName}`.replace(propertyStateSelector, "")]
273
+ };
274
+ }
275
+ }
276
+ }
277
+ return styles;
278
+ }
279
+ function generateConfigStyles(config, schema, theme, previewOptions) {
280
+ const componentName = config.label.toLowerCase();
281
+ let styles = {};
282
+ for (const variantKey in config.variants) {
283
+ const variantConfig = config.variants[variantKey];
284
+ for (const variantOption of variantConfig.options) if (isVariantConfigWithComponentStates(variantConfig)) {
285
+ const componentStates = variantConfig.componentStates;
286
+ for (const componentStateKey in componentStates) {
287
+ const componentState = componentStates[componentStateKey];
288
+ for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
289
+ const layer = componentState.layers[layerKey];
290
+ for (const propertyKey in layer.properties) {
291
+ const originalPropertyDefinition = layer.properties[propertyKey];
292
+ const declarations = generateDeclaration({
293
+ componentName,
294
+ variantKey,
295
+ variantValue: variantOption,
296
+ componentStateKey,
297
+ componentStateValue: componentStateOption,
298
+ layer: layerKey,
299
+ layerOptionalPseudoSelector: layer.pseudoSelector,
300
+ propertyKey,
301
+ originalPropertyDefinition,
302
+ theme,
303
+ schema,
304
+ currentStyles: styles,
305
+ previewOptions
306
+ });
307
+ styles = deepMerge(styles, declarations);
308
+ }
309
+ }
310
+ }
311
+ } else if (isVariantConfigWithProperties(variantConfig)) {
312
+ const layers = variantConfig.layers;
313
+ for (const layerKey in layers) {
314
+ const layer = layers[layerKey];
315
+ for (const propertyKey in layer.properties) {
316
+ const originalPropertyDefinition = layer.properties[propertyKey];
317
+ const declarations = generateDeclaration({
318
+ componentName,
319
+ variantKey,
320
+ variantValue: variantOption,
321
+ layer: layerKey,
322
+ layerOptionalPseudoSelector: layer.pseudoSelector,
323
+ propertyKey,
324
+ originalPropertyDefinition,
325
+ theme,
326
+ schema,
327
+ currentStyles: styles,
328
+ previewOptions
329
+ });
330
+ styles = deepMerge(styles, declarations);
331
+ }
332
+ }
333
+ }
334
+ }
335
+ if (config.subComponents) {
336
+ const { subComponents } = config;
337
+ for (const subComponentKey in subComponents) for (const variantKey in subComponents[subComponentKey].variants) {
338
+ const variantConfig = subComponents[subComponentKey].variants[variantKey];
339
+ for (const variantOption of variantConfig.options) if (isVariantConfigWithComponentStates(variantConfig)) {
340
+ const componentStates = variantConfig.componentStates;
341
+ for (const componentStateKey in componentStates) {
342
+ const componentState = componentStates[componentStateKey];
343
+ for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
344
+ const layer = componentState.layers[layerKey];
345
+ for (const propertyKey in layer.properties) {
346
+ const originalPropertyDefinition = layer.properties[propertyKey];
347
+ const declarations = generateDeclaration({
348
+ componentName,
349
+ variantKey,
350
+ variantValue: variantOption,
351
+ componentStateKey,
352
+ componentStateValue: componentStateOption,
353
+ subComponentName: subComponentKey,
354
+ layer: layerKey,
355
+ layerOptionalPseudoSelector: layer.pseudoSelector,
356
+ propertyKey,
357
+ originalPropertyDefinition,
358
+ theme,
359
+ schema,
360
+ currentStyles: styles,
361
+ previewOptions
362
+ });
363
+ styles = deepMerge(styles, declarations);
364
+ }
365
+ }
366
+ }
367
+ } else if (isVariantConfigWithProperties(variantConfig)) {
368
+ const layers = variantConfig.layers;
369
+ for (const layerKey in layers) {
370
+ const layer = layers[layerKey];
371
+ for (const propertyKey in layer.properties) {
372
+ const originalPropertyDefinition = layer.properties[propertyKey];
373
+ const declarations = generateDeclaration({
374
+ componentName,
375
+ subComponentName: subComponentKey,
376
+ variantKey,
377
+ variantValue: variantOption,
378
+ layer: layerKey,
379
+ layerOptionalPseudoSelector: layer.pseudoSelector,
380
+ propertyKey,
381
+ originalPropertyDefinition,
382
+ theme,
383
+ schema,
384
+ currentStyles: styles,
385
+ previewOptions
386
+ });
387
+ styles = deepMerge(styles, declarations);
388
+ }
389
+ }
390
+ }
391
+ }
392
+ }
393
+ /**
394
+ * Post-process button/iconbutton styles to force box-shadow for borders.
395
+ * This runs AFTER all properties have been processed and merged.
396
+ */
397
+ const toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);
398
+ if (toApply) {
399
+ for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) styles[className] = applyBoxShadowBorder(styles[className]);
400
+ }
401
+ return styles;
402
+ }
403
+ /**
404
+ * @param config - Component configuration (Button, IconButton, etc.)
405
+ * @param schema - Production schema with defaults and variables
406
+ * @param theme - Tailwind theme function to resolve design tokens
407
+ * @param previewOptions - Options for generating preview mode class modifiers
408
+ * @returns CSS styles object with grouped selectors for default aliases
409
+ */
410
+ const generateStyles = (config, schema, theme, previewOptions) => {
411
+ const styles = generateConfigStyles(config, schema, theme, previewOptions);
412
+ if (!config.variants && !config.subComponents) return styles;
413
+ const componentName = config.label.toLowerCase();
414
+ if (componentName !== "button" && componentName !== "iconbutton") return styles;
415
+ const replacementMap = /* @__PURE__ */ new Map();
416
+ /**
417
+ * Helper: Extract all layer keys from a variant configuration
418
+ * Handles both simple variants (with direct layers) and variants with component states
419
+ */
420
+ const getLayerKeys = (variantConfig) => {
421
+ if (isVariantConfigWithProperties(variantConfig)) return Object.keys(variantConfig.layers);
422
+ else if (isVariantConfigWithComponentStates(variantConfig)) {
423
+ const layerKeysSet = /* @__PURE__ */ new Set();
424
+ for (const componentStateConfig of Object.values(variantConfig.componentStates)) Object.keys(componentStateConfig.layers).forEach((key) => layerKeysSet.add(key));
425
+ return Array.from(layerKeysSet);
426
+ }
427
+ return [];
428
+ };
429
+ /**
430
+ * Helper: Build replacement map for default variant values
431
+ * For each default variant + layer combination, creates an entry like:
432
+ * "uds-button-size-sm-root" → ".uds-button-size-sm-root, .uds-button-size-default-root"
433
+ */
434
+ const buildReplacements = (variants, subComponentName) => {
435
+ for (const [variantType, variantConfig] of Object.entries(variants)) {
436
+ if (!isVariantConfigWithProperties(variantConfig) && !isVariantConfigWithComponentStates(variantConfig)) continue;
437
+ const layerKeys = getLayerKeys(variantConfig);
438
+ if (layerKeys.length) {
439
+ const defaultValue = schema.defaults?.[variantType];
440
+ if (defaultValue) for (const layerKey of layerKeys) {
441
+ const baseClass = generateClassName({
442
+ componentName,
443
+ variantKey: variantType,
444
+ variantValue: defaultValue,
445
+ layer: layerKey,
446
+ subComponentName
447
+ });
448
+ const defaultClass = generateDefaultClassName(componentName, variantType, layerKey, subComponentName);
449
+ replacementMap.set(baseClass, `.${baseClass}, .${defaultClass}`);
450
+ }
451
+ }
452
+ }
453
+ };
454
+ if (config.variants) buildReplacements(config.variants);
455
+ if (config.subComponents) for (const [subComponentName, subComponentConfig] of Object.entries(config.subComponents)) buildReplacements(subComponentConfig.variants, subComponentName);
456
+ const finalStyles = {};
457
+ for (const [selector, declarations] of Object.entries(styles)) {
458
+ let defaultsSelector = selector;
459
+ let hasMatch = false;
460
+ for (const [defaultVariantClass, replacement] of replacementMap.entries()) if (selector.includes(defaultVariantClass)) {
461
+ hasMatch = true;
462
+ const defaultMatch = replacement.match(/,\s*\.([a-z0-9-]+)/);
463
+ if (defaultMatch) {
464
+ const defaultClass = defaultMatch[1];
465
+ defaultsSelector = defaultsSelector.replaceAll(defaultVariantClass, defaultClass);
466
+ }
467
+ }
468
+ if (!hasMatch) {
469
+ finalStyles[selector] = declarations;
470
+ continue;
471
+ }
472
+ finalStyles[`${selector}, ${defaultsSelector}`] = declarations;
473
+ }
474
+ return finalStyles;
475
+ };
476
+
477
+ //#endregion
478
+ export { generateStyles };
479
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../automated-config/dist/utils/index.js"],"sourcesContent":["/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */\nimport { configurableProperties } from \"../properties.js\";\nimport { generateDefaultClassName } from \"./generateDefaultClassName.js\";\nimport { generateSchemaKey } from \"./generateSchemaKey.js\";\nimport { isVariantConfigWithComponentStates, isVariantConfigWithProperties } from \"./variantConfigGuards.js\";\nimport { buildConfigSchema, findFixtureType } from \"./buildConfigSchema.js\";\nimport { cartesianProduct } from \"./cartesianProduct.js\";\nimport { getConfigSubcomponents } from \"./subcomponents.js\";\nimport { coalesceConfigVariant } from \"./coalesceConfigVariant.js\";\nimport { getConfigDefaultValue, isConfigDefaultValue } from \"./defaults.js\";\nimport { generateKeyFromFlatConfigPath } from \"./generateKeyFromFlatConfigPath.js\";\nimport { getConfigVariantComponentStates, getConfigVariantComponentStatesMatrix } from \"./getConfigVariantComponentStatesMatrix.js\";\nimport { getConfigVariantProperties } from \"./getConfigVariantProperties.js\";\nimport { getConfigVariantPseudoStates } from \"./getConfigVariantPseudoStates.js\";\nimport { getConfigVariants } from \"./getConfigVariants.js\";\nimport { BUTTON_GAP_VAR, BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED, BUTTON_SCALE_EFFECT_REST } from \"@yahoo/uds-css-tokens\";\nimport { isFunction, mergeWith } from \"lodash-es\";\n\n//#region src/utils/index.ts\nconst CSS_GAP = \"gap\";\nconst CSS_LINE_HEIGHT = \"line-height\";\nconst CSS_BORDER_WIDTH = \"border-width\";\nconst CSS_BORDER_COLOR = \"border-color\";\nconst CSS_BOX_SHADOW = \"box-shadow\";\nfunction deepMerge(target, source) {\n\treturn mergeWith({}, target, source);\n}\nconst COMPONENTS_WITH_SHADOW_BORDERS = [\n\t{\n\t\tcomponentName: \"button\",\n\t\tlayer: \"root\"\n\t},\n\t{\n\t\tcomponentName: \"iconbutton\",\n\t\tlayer: \"root\"\n\t},\n\t{\n\t\tcomponentName: \"chip\",\n\t\tlayer: \"root\"\n\t}\n];\n/**\n* Map our \"states\" to pseudo-classes (hover => :hover, pressed => :active, etc.).\n* Adjust or extend as needed.\n*/\nconst statePseudoMap = {\n\trest: \"\",\n\thover: \":hover:not(:active, :disabled, :has(:disabled))\",\n\tpressed: \":active:not(:disabled, :has(:disabled))\",\n\tdisabled: \":is(:disabled, :has(:disabled))\",\n\tvisited: \":visited\",\n\tfocused: \":focus\",\n\t\"focus-within\": \":focus-within\",\n\t\"focused-keyboard\": \":focus-visible\",\n\treadonly: \":has(input:read-only)\",\n\tinvalid: \":has(input[aria-invalid=\\\"true\\\"])\",\n\t\"invalid&hover\": \":has(input[aria-invalid=\\\"true\\\"]):hover:not(:active, :disabled, :has(:disabled))\",\n\t\"invalid&pressed\": \":has(input[aria-invalid=\\\"true\\\"]):active:not(:disabled, :has(:disabled))\"\n};\nconst statePseudoMapDocsMode = {\n\trest: \"\",\n\thover: \"hover\",\n\tpressed: \"active\",\n\tdisabled: \"has-disabled\",\n\tvisited: \"visited\",\n\tfocused: \"focus\",\n\t\"focus-within\": \"focus-within\",\n\t\"focused-keyboard\": \"focus-visible\",\n\treadonly: \"input-readonly\",\n\tinvalid: \"has-input-invalid\",\n\t\"invalid&hover\": \"has-input-invalid-and-hover\",\n\t\"invalid&pressed\": \"has-input-invalid-and-active\"\n};\n/**\n* Generates button line-height with icon size minimum.\n* Ensures button line-height is at least as tall as the icon to prevent clipping.\n* @returns Enhanced line-height CSS value with max(), or original value if icon size unavailable\n*/\nfunction getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey, state, theme }) {\n\tconst iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;\n\tif (iconSizeValue) return `max(${lineHeight}, ${theme(configurableProperties.iconSize.twThemePath(\"iconSizes\", iconSizeValue))})`;\n\treturn lineHeight;\n}\n/**\n* Forces button borders to use box-shadow instead of border properties.\n* Converts border-width and border-color into an inset box-shadow layer.\n*\n* Why box-shadow for borders?\n* - Respects border-radius (unlike outline which stays rectangular)\n* - Allows layering multiple shadows in a single property\n* - GPU-accelerated and performant\n* - Works perfectly with rounded/circular buttons\n*\n* @param classStyles - The CSS declarations for a button class\n* @returns Modified styles with box-shadow layers, or original if no border\n*\n* @example\n* Input: { border-width: '2px', border-color: 'red', box-shadow: '0 2px 4px rgba(0,0,0,0.1)' }\n* Output: { box-shadow: 'inset 0 0 0 2px red, 0 2px 4px rgba(0,0,0,0.1)' }\n*/\nfunction applyBoxShadowBorder(classStyles) {\n\tconst borderWidth = classStyles[CSS_BORDER_WIDTH];\n\tconst borderColor = classStyles[CSS_BORDER_COLOR];\n\tif (!borderWidth || !borderColor) return classStyles;\n\tconst stripImportant = (value) => value.replace(/\\s*!important\\s*$/, \"\");\n\tconst hasImportant = (value) => value?.includes(\"!important\") ?? false;\n\tconst layers = [`inset 0 0 0 ${stripImportant(borderWidth)} ${stripImportant(borderColor)}`, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);\n\tconst needsImportant = hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);\n\tconst newStyles = { ...classStyles };\n\tnewStyles[CSS_BOX_SHADOW] = layers.join(\", \") + (needsImportant ? \" !important\" : \"\");\n\tdelete newStyles[CSS_BORDER_WIDTH];\n\tdelete newStyles[CSS_BORDER_COLOR];\n\treturn newStyles;\n}\nfunction generateClassName({ componentName, subComponentName, variantKey, variantValue, componentStateKey, componentStateValue, layer, layerOptionalPseudoSelector }) {\n\tlet className = \"\";\n\tif (subComponentName) className = `uds-${componentName}-${subComponentName}-${variantKey}`.toLowerCase();\n\telse className = `uds-${componentName}-${variantKey}`.toLowerCase();\n\tif (variantValue) className = `${className}-${variantValue}`.toLowerCase();\n\tif (componentStateKey && componentStateValue) className = `${className}-${componentStateKey}-${componentStateValue}`.toLowerCase();\n\tclassName = `${className}-${layer}`.toLowerCase();\n\tif (layerOptionalPseudoSelector) className = `${className}${layerOptionalPseudoSelector}`;\n\treturn className.replaceAll(/\\s+/g, \"-\");\n}\nconst getTheCssPropertyValue = (schema, theme, propertyName, schemaStateValue, existingValue, originalPropertyDefinition) => {\n\tconst { value, type } = schemaStateValue;\n\tconst propertyConfig = configurableProperties[propertyName];\n\tlet newValue;\n\tif (propertyConfig.customValueRenderer) newValue = propertyConfig.customValueRenderer(schemaStateValue, schema, theme, originalPropertyDefinition);\n\telse {\n\t\tconst safeTwThemePath = propertyConfig.twThemePath;\n\t\tnewValue = theme(safeTwThemePath(type, String(value)));\n\t}\n\tif (propertyConfig.concatenate && existingValue) return `${existingValue}${propertyConfig.concatenationDelimiter || \", \"}${newValue}`;\n\treturn newValue;\n};\nfunction generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions }) {\n\tconst schemaKey = generateSchemaKey({\n\t\tvariantKey,\n\t\tvariantValue,\n\t\tlayer,\n\t\tsubComponentName,\n\t\tcomponentStateKey,\n\t\tcomponentStateValue\n\t});\n\tlet className = generateClassName({\n\t\tcomponentName,\n\t\tvariantKey,\n\t\tvariantValue,\n\t\tlayer,\n\t\tsubComponentName,\n\t\tcomponentStateKey,\n\t\tcomponentStateValue\n\t});\n\tconst propertyStateMap = schema.variables?.[schemaKey]?.[propertyKey];\n\tif (!propertyStateMap) throw new Error(`Prop definition (${componentName} - ${schemaKey} - ${propertyKey}) not found, this is not expected, please report the bug to the UDS team`);\n\tconst styles = {};\n\tfor (const propStateStr in propertyStateMap) {\n\t\tconst propertyState = propStateStr;\n\t\tconst propertyStateSelector = statePseudoMap[propertyState] ?? \"\";\n\t\tconst schemaValueForState = propertyStateMap[propertyState];\n\t\tlet fullClassName = ``;\n\t\tif (layer === \"root\") if (componentStateKey && componentStateValue) {\n\t\t\tconst rootVariantClass = generateClassName({\n\t\t\t\tcomponentName,\n\t\t\t\tvariantKey,\n\t\t\t\tvariantValue,\n\t\t\t\tlayer,\n\t\t\t\tsubComponentName\n\t\t\t});\n\t\t\tclassName = generateClassName({\n\t\t\t\tcomponentName,\n\t\t\t\tvariantKey,\n\t\t\t\tlayer,\n\t\t\t\tsubComponentName,\n\t\t\t\tcomponentStateKey,\n\t\t\t\tcomponentStateValue\n\t\t\t});\n\t\t\tfullClassName = `.${rootVariantClass}${propertyStateSelector}.${className}`;\n\t\t} else fullClassName = `.${className}${propertyStateSelector}`;\n\t\telse {\n\t\t\tconst rootVariantClassName = generateClassName({\n\t\t\t\tcomponentName,\n\t\t\t\tvariantKey,\n\t\t\t\tvariantValue,\n\t\t\t\tlayer: \"root\",\n\t\t\t\tsubComponentName\n\t\t\t});\n\t\t\tif (componentStateKey && componentStateValue) {\n\t\t\t\tconst rootVariantClassNameWithComponentState = generateClassName({\n\t\t\t\t\tcomponentName,\n\t\t\t\t\tvariantKey,\n\t\t\t\t\tlayer: \"root\",\n\t\t\t\t\tsubComponentName,\n\t\t\t\t\tcomponentStateKey,\n\t\t\t\t\tcomponentStateValue\n\t\t\t\t});\n\t\t\t\tclassName = generateClassName({\n\t\t\t\t\tcomponentName,\n\t\t\t\t\tvariantKey,\n\t\t\t\t\tvariantValue,\n\t\t\t\t\tlayer,\n\t\t\t\t\tlayerOptionalPseudoSelector,\n\t\t\t\t\tsubComponentName\n\t\t\t\t});\n\t\t\t\tfullClassName = `.${rootVariantClassName}${propertyStateSelector}.${rootVariantClassNameWithComponentState} .${className}`;\n\t\t\t} else fullClassName = `.${rootVariantClassName}${propertyStateSelector} .${className}`;\n\t\t}\n\t\tconst { cssProperties, extendedProperties: extendedPropertiesGetter } = configurableProperties[originalPropertyDefinition.name];\n\t\tconst cssDeclarations = {};\n\t\tconst isExtendedPropertiesFunction = isFunction(extendedPropertiesGetter);\n\t\tconst extendedProperties = isExtendedPropertiesFunction ? extendedPropertiesGetter({\n\t\t\tcomponentName,\n\t\t\tsubComponentName,\n\t\t\tlayer,\n\t\t\tpropertyKey\n\t\t}) : extendedPropertiesGetter;\n\t\tif (extendedProperties && extendedProperties.length) {\n\t\t\tif (!isExtendedPropertiesFunction && (typeof cssProperties === \"string\" || Array.isArray(cssProperties) && cssProperties.length > 0)) throw new Error(\"Invalid configuration: cssProperties should not be configured when extendedProperties are defined. Please update your property configuration accordingly.\");\n\t\t\tfor (const extendedProp of extendedProperties) {\n\t\t\t\tconst cssPropertiesRef = configurableProperties[extendedProp].cssProperties;\n\t\t\t\tif (typeof cssPropertiesRef === \"string\") {\n\t\t\t\t\tconst existingValue = currentStyles?.[fullClassName]?.[cssPropertiesRef];\n\t\t\t\t\tcssDeclarations[cssPropertiesRef] = getTheCssPropertyValue(schema, theme, extendedProp, schemaValueForState, existingValue);\n\t\t\t\t} else if (Array.isArray(cssPropertiesRef)) for (const cssProp of cssPropertiesRef) {\n\t\t\t\t\tconst existingValue = currentStyles?.[fullClassName]?.[cssProp];\n\t\t\t\t\tcssDeclarations[cssProp] = getTheCssPropertyValue(schema, theme, extendedProp, schemaValueForState, existingValue);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof cssProperties === \"string\") {\n\t\t\tconst existingValue = currentStyles?.[fullClassName]?.[cssProperties];\n\t\t\tcssDeclarations[cssProperties] = getTheCssPropertyValue(schema, theme, originalPropertyDefinition.name, schemaValueForState, existingValue, originalPropertyDefinition);\n\t\t} else if (Array.isArray(cssProperties)) for (const cssProp of cssProperties) {\n\t\t\tconst existingValue = currentStyles?.[fullClassName]?.[cssProp];\n\t\t\tcssDeclarations[cssProp] = getTheCssPropertyValue(schema, theme, originalPropertyDefinition.name, schemaValueForState, existingValue, originalPropertyDefinition);\n\t\t}\n\t\t/**\n\t\t* Button root layer workarounds & enhancements.\n\t\t* These handle Motion animation bridges and visual fixes until better config-to-component solutions exist.\n\t\t*/\n\t\tif (componentName === \"button\" && layer === \"root\") {\n\t\t\tif (propertyKey === CSS_GAP) cssDeclarations[BUTTON_GAP_VAR] = cssDeclarations[CSS_GAP];\n\t\t\tif (propertyKey === \"scaleEffect\" && propertyState === \"hover\") {\n\t\t\t\tconst rootClassName = `.${className}`;\n\t\t\t\tconst renderValue = (schemaValue) => configurableProperties.scaleEffect.customValueRenderer?.(schemaValue, schema, () => \"\") ?? \"1\";\n\t\t\t\tif (!styles[rootClassName]) styles[rootClassName] = {};\n\t\t\t\tstyles[rootClassName][BUTTON_SCALE_EFFECT_REST] = \"1\";\n\t\t\t\tif (propertyStateMap.hover) styles[rootClassName][BUTTON_SCALE_EFFECT_HOVER] = renderValue(propertyStateMap.hover);\n\t\t\t\tif (propertyStateMap.pressed) styles[rootClassName][BUTTON_SCALE_EFFECT_PRESSED] = renderValue(propertyStateMap.pressed);\n\t\t\t}\n\t\t\tif (cssDeclarations[CSS_LINE_HEIGHT]) {\n\t\t\t\tconst iconLayerKey = generateSchemaKey({\n\t\t\t\t\tvariantKey,\n\t\t\t\t\tvariantValue,\n\t\t\t\t\tlayer: \"icon\",\n\t\t\t\t\tsubComponentName\n\t\t\t\t});\n\t\t\t\tcssDeclarations[CSS_LINE_HEIGHT] = getButtonLineHeightWithIconMinimum({\n\t\t\t\t\tlineHeight: cssDeclarations[CSS_LINE_HEIGHT],\n\t\t\t\t\tschema,\n\t\t\t\t\ticonLayerKey,\n\t\t\t\t\tstate: propertyState,\n\t\t\t\t\ttheme\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (!styles[fullClassName]) styles[fullClassName] = {\n\t\t\t...cssDeclarations,\n\t\t\t...styles[fullClassName]\n\t\t};\n\t\tif (previewOptions?.generatePseudoStateClassModifier) {\n\t\t\tconst pseudoPrefixClass = statePseudoMapDocsMode[propertyState] ?? \"\";\n\t\t\tif (pseudoPrefixClass.length) {\n\t\t\t\tconst importantCssDeclarations = Object.fromEntries(Object.entries(cssDeclarations).map(([prop, value]) => {\n\t\t\t\t\tconst strValue = String(value).trimEnd().replace(/;$/, \"\");\n\t\t\t\t\tif (strValue.includes(\"!important\")) return [prop, strValue];\n\t\t\t\t\treturn [prop, `${strValue} !important`];\n\t\t\t\t}));\n\t\t\t\tstyles[`.${pseudoPrefixClass}${fullClassName}`.replace(propertyStateSelector, \"\")] = {\n\t\t\t\t\t...importantCssDeclarations,\n\t\t\t\t\t...styles[`.${pseudoPrefixClass}${fullClassName}`.replace(propertyStateSelector, \"\")]\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\treturn styles;\n}\nfunction generateConfigStyles(config, schema, theme, previewOptions) {\n\tconst componentName = config.label.toLowerCase();\n\tlet styles = {};\n\tfor (const variantKey in config.variants) {\n\t\tconst variantConfig = config.variants[variantKey];\n\t\tfor (const variantOption of variantConfig.options) if (isVariantConfigWithComponentStates(variantConfig)) {\n\t\t\tconst componentStates = variantConfig.componentStates;\n\t\t\tfor (const componentStateKey in componentStates) {\n\t\t\t\tconst componentState = componentStates[componentStateKey];\n\t\t\t\tfor (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {\n\t\t\t\t\tconst layer = componentState.layers[layerKey];\n\t\t\t\t\tfor (const propertyKey in layer.properties) {\n\t\t\t\t\t\tconst originalPropertyDefinition = layer.properties[propertyKey];\n\t\t\t\t\t\tconst declarations = generateDeclaration({\n\t\t\t\t\t\t\tcomponentName,\n\t\t\t\t\t\t\tvariantKey,\n\t\t\t\t\t\t\tvariantValue: variantOption,\n\t\t\t\t\t\t\tcomponentStateKey,\n\t\t\t\t\t\t\tcomponentStateValue: componentStateOption,\n\t\t\t\t\t\t\tlayer: layerKey,\n\t\t\t\t\t\t\tlayerOptionalPseudoSelector: layer.pseudoSelector,\n\t\t\t\t\t\t\tpropertyKey,\n\t\t\t\t\t\t\toriginalPropertyDefinition,\n\t\t\t\t\t\t\ttheme,\n\t\t\t\t\t\t\tschema,\n\t\t\t\t\t\t\tcurrentStyles: styles,\n\t\t\t\t\t\t\tpreviewOptions\n\t\t\t\t\t\t});\n\t\t\t\t\t\tstyles = deepMerge(styles, declarations);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (isVariantConfigWithProperties(variantConfig)) {\n\t\t\tconst layers = variantConfig.layers;\n\t\t\tfor (const layerKey in layers) {\n\t\t\t\tconst layer = layers[layerKey];\n\t\t\t\tfor (const propertyKey in layer.properties) {\n\t\t\t\t\tconst originalPropertyDefinition = layer.properties[propertyKey];\n\t\t\t\t\tconst declarations = generateDeclaration({\n\t\t\t\t\t\tcomponentName,\n\t\t\t\t\t\tvariantKey,\n\t\t\t\t\t\tvariantValue: variantOption,\n\t\t\t\t\t\tlayer: layerKey,\n\t\t\t\t\t\tlayerOptionalPseudoSelector: layer.pseudoSelector,\n\t\t\t\t\t\tpropertyKey,\n\t\t\t\t\t\toriginalPropertyDefinition,\n\t\t\t\t\t\ttheme,\n\t\t\t\t\t\tschema,\n\t\t\t\t\t\tcurrentStyles: styles,\n\t\t\t\t\t\tpreviewOptions\n\t\t\t\t\t});\n\t\t\t\t\tstyles = deepMerge(styles, declarations);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (config.subComponents) {\n\t\tconst { subComponents } = config;\n\t\tfor (const subComponentKey in subComponents) for (const variantKey in subComponents[subComponentKey].variants) {\n\t\t\tconst variantConfig = subComponents[subComponentKey].variants[variantKey];\n\t\t\tfor (const variantOption of variantConfig.options) if (isVariantConfigWithComponentStates(variantConfig)) {\n\t\t\t\tconst componentStates = variantConfig.componentStates;\n\t\t\t\tfor (const componentStateKey in componentStates) {\n\t\t\t\t\tconst componentState = componentStates[componentStateKey];\n\t\t\t\t\tfor (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {\n\t\t\t\t\t\tconst layer = componentState.layers[layerKey];\n\t\t\t\t\t\tfor (const propertyKey in layer.properties) {\n\t\t\t\t\t\t\tconst originalPropertyDefinition = layer.properties[propertyKey];\n\t\t\t\t\t\t\tconst declarations = generateDeclaration({\n\t\t\t\t\t\t\t\tcomponentName,\n\t\t\t\t\t\t\t\tvariantKey,\n\t\t\t\t\t\t\t\tvariantValue: variantOption,\n\t\t\t\t\t\t\t\tcomponentStateKey,\n\t\t\t\t\t\t\t\tcomponentStateValue: componentStateOption,\n\t\t\t\t\t\t\t\tsubComponentName: subComponentKey,\n\t\t\t\t\t\t\t\tlayer: layerKey,\n\t\t\t\t\t\t\t\tlayerOptionalPseudoSelector: layer.pseudoSelector,\n\t\t\t\t\t\t\t\tpropertyKey,\n\t\t\t\t\t\t\t\toriginalPropertyDefinition,\n\t\t\t\t\t\t\t\ttheme,\n\t\t\t\t\t\t\t\tschema,\n\t\t\t\t\t\t\t\tcurrentStyles: styles,\n\t\t\t\t\t\t\t\tpreviewOptions\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tstyles = deepMerge(styles, declarations);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (isVariantConfigWithProperties(variantConfig)) {\n\t\t\t\tconst layers = variantConfig.layers;\n\t\t\t\tfor (const layerKey in layers) {\n\t\t\t\t\tconst layer = layers[layerKey];\n\t\t\t\t\tfor (const propertyKey in layer.properties) {\n\t\t\t\t\t\tconst originalPropertyDefinition = layer.properties[propertyKey];\n\t\t\t\t\t\tconst declarations = generateDeclaration({\n\t\t\t\t\t\t\tcomponentName,\n\t\t\t\t\t\t\tsubComponentName: subComponentKey,\n\t\t\t\t\t\t\tvariantKey,\n\t\t\t\t\t\t\tvariantValue: variantOption,\n\t\t\t\t\t\t\tlayer: layerKey,\n\t\t\t\t\t\t\tlayerOptionalPseudoSelector: layer.pseudoSelector,\n\t\t\t\t\t\t\tpropertyKey,\n\t\t\t\t\t\t\toriginalPropertyDefinition,\n\t\t\t\t\t\t\ttheme,\n\t\t\t\t\t\t\tschema,\n\t\t\t\t\t\t\tcurrentStyles: styles,\n\t\t\t\t\t\t\tpreviewOptions\n\t\t\t\t\t\t});\n\t\t\t\t\t\tstyles = deepMerge(styles, declarations);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Post-process button/iconbutton styles to force box-shadow for borders.\n\t* This runs AFTER all properties have been processed and merged.\n\t*/\n\tconst toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);\n\tif (toApply) {\n\t\tfor (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) styles[className] = applyBoxShadowBorder(styles[className]);\n\t}\n\treturn styles;\n}\n/**\n* @param config - Component configuration (Button, IconButton, etc.)\n* @param schema - Production schema with defaults and variables\n* @param theme - Tailwind theme function to resolve design tokens\n* @param previewOptions - Options for generating preview mode class modifiers\n* @returns CSS styles object with grouped selectors for default aliases\n*/\nconst generateStyles = (config, schema, theme, previewOptions) => {\n\tconst styles = generateConfigStyles(config, schema, theme, previewOptions);\n\tif (!config.variants && !config.subComponents) return styles;\n\tconst componentName = config.label.toLowerCase();\n\tif (componentName !== \"button\" && componentName !== \"iconbutton\") return styles;\n\tconst replacementMap = /* @__PURE__ */ new Map();\n\t/**\n\t* Helper: Extract all layer keys from a variant configuration\n\t* Handles both simple variants (with direct layers) and variants with component states\n\t*/\n\tconst getLayerKeys = (variantConfig) => {\n\t\tif (isVariantConfigWithProperties(variantConfig)) return Object.keys(variantConfig.layers);\n\t\telse if (isVariantConfigWithComponentStates(variantConfig)) {\n\t\t\tconst layerKeysSet = /* @__PURE__ */ new Set();\n\t\t\tfor (const componentStateConfig of Object.values(variantConfig.componentStates)) Object.keys(componentStateConfig.layers).forEach((key) => layerKeysSet.add(key));\n\t\t\treturn Array.from(layerKeysSet);\n\t\t}\n\t\treturn [];\n\t};\n\t/**\n\t* Helper: Build replacement map for default variant values\n\t* For each default variant + layer combination, creates an entry like:\n\t* \"uds-button-size-sm-root\" → \".uds-button-size-sm-root, .uds-button-size-default-root\"\n\t*/\n\tconst buildReplacements = (variants, subComponentName) => {\n\t\tfor (const [variantType, variantConfig] of Object.entries(variants)) {\n\t\t\tif (!isVariantConfigWithProperties(variantConfig) && !isVariantConfigWithComponentStates(variantConfig)) continue;\n\t\t\tconst layerKeys = getLayerKeys(variantConfig);\n\t\t\tif (layerKeys.length) {\n\t\t\t\tconst defaultValue = schema.defaults?.[variantType];\n\t\t\t\tif (defaultValue) for (const layerKey of layerKeys) {\n\t\t\t\t\tconst baseClass = generateClassName({\n\t\t\t\t\t\tcomponentName,\n\t\t\t\t\t\tvariantKey: variantType,\n\t\t\t\t\t\tvariantValue: defaultValue,\n\t\t\t\t\t\tlayer: layerKey,\n\t\t\t\t\t\tsubComponentName\n\t\t\t\t\t});\n\t\t\t\t\tconst defaultClass = generateDefaultClassName(componentName, variantType, layerKey, subComponentName);\n\t\t\t\t\treplacementMap.set(baseClass, `.${baseClass}, .${defaultClass}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\tif (config.variants) buildReplacements(config.variants);\n\tif (config.subComponents) for (const [subComponentName, subComponentConfig] of Object.entries(config.subComponents)) buildReplacements(subComponentConfig.variants, subComponentName);\n\tconst finalStyles = {};\n\tfor (const [selector, declarations] of Object.entries(styles)) {\n\t\tlet defaultsSelector = selector;\n\t\tlet hasMatch = false;\n\t\tfor (const [defaultVariantClass, replacement] of replacementMap.entries()) if (selector.includes(defaultVariantClass)) {\n\t\t\thasMatch = true;\n\t\t\tconst defaultMatch = replacement.match(/,\\s*\\.([a-z0-9-]+)/);\n\t\t\tif (defaultMatch) {\n\t\t\t\tconst defaultClass = defaultMatch[1];\n\t\t\t\tdefaultsSelector = defaultsSelector.replaceAll(defaultVariantClass, defaultClass);\n\t\t\t}\n\t\t}\n\t\tif (!hasMatch) {\n\t\t\tfinalStyles[selector] = declarations;\n\t\t\tcontinue;\n\t\t}\n\t\tfinalStyles[`${selector}, ${defaultsSelector}`] = declarations;\n\t}\n\treturn finalStyles;\n};\nfunction createConfigurableProperty(prop) {\n\treturn prop;\n}\nfunction createVariantConfig(config) {\n\treturn config;\n}\nfunction createVariantConfigWithProperties(config) {\n\treturn config;\n}\nfunction createVariantConfigWithComponentStates(config) {\n\treturn config;\n}\nfunction createComponentStates(config) {\n\treturn config;\n}\nfunction createLayerConfig(config) {\n\treturn config;\n}\nfunction createSubComponentConfig(config) {\n\treturn config;\n}\n\n//#endregion\nexport { buildConfigSchema, cartesianProduct, coalesceConfigVariant, createComponentStates, createConfigurableProperty, createLayerConfig, createSubComponentConfig, createVariantConfig, createVariantConfigWithComponentStates, createVariantConfigWithProperties, findFixtureType, generateClassName, generateConfigStyles, generateDeclaration, generateDefaultClassName, generateKeyFromFlatConfigPath, generateSchemaKey, generateStyles, getConfigDefaultValue, getConfigSubcomponents, getConfigVariantComponentStates, getConfigVariantComponentStatesMatrix, getConfigVariantProperties, getConfigVariantPseudoStates, getConfigVariants, isConfigDefaultValue, statePseudoMapDocsMode };\n//# sourceMappingURL=index.js.map"],"mappings":";;;;;;;;;;AAmBA,MAAM,UAAU;AAChB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,iBAAiB;AACvB,SAAS,UAAU,QAAQ,QAAQ;AAClC,QAAO,UAAU,EAAE,EAAE,QAAQ,OAAO;;AAErC,MAAM,iCAAiC;CACtC;EACC,eAAe;EACf,OAAO;EACP;CACD;EACC,eAAe;EACf,OAAO;EACP;CACD;EACC,eAAe;EACf,OAAO;EACP;CACD;;;;;AAKD,MAAM,iBAAiB;CACtB,MAAM;CACN,OAAO;CACP,SAAS;CACT,UAAU;CACV,SAAS;CACT,SAAS;CACT,gBAAgB;CAChB,oBAAoB;CACpB,UAAU;CACV,SAAS;CACT,iBAAiB;CACjB,mBAAmB;CACnB;AACD,MAAM,yBAAyB;CAC9B,MAAM;CACN,OAAO;CACP,SAAS;CACT,UAAU;CACV,SAAS;CACT,SAAS;CACT,gBAAgB;CAChB,oBAAoB;CACpB,UAAU;CACV,SAAS;CACT,iBAAiB;CACjB,mBAAmB;CACnB;;;;;;AAMD,SAAS,mCAAmC,EAAE,YAAY,QAAQ,cAAc,OAAO,SAAS;CAC/F,MAAM,g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Ac,EAAE;AACtB,MAAK,MAAM,CAAC,UAAU,iBAAiB,OAAO,QAAQ,OAAO,EAAE;EAC9D,IAAI,mBAAmB;EACvB,IAAI,WAAW;AACf,OAAK,MAAM,CAAC,qBAAqB,gBAAgB,eAAe,SAAS,CAAE,KAAI,SAAS,SAAS,oBAAoB,EAAE;AACtH,cAAW;GACX,MAAM,eAAe,YAAY,MAAM,qBAAqB;AAC5D,OAAI,cAAc;IACjB,MAAM,eAAe,aAAa;AAClC,uBAAmB,iBAAiB,WAAW,qBAAqB,aAAa;;;AAGnF,MAAI,CAAC,UAAU;AACd,eAAY,YAAY;AACxB;;AAED,cAAY,GAAG,SAAS,IAAI,sBAAsB;;AAEnD,QAAO"}
@@ -0,0 +1,28 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ const require_index = require('../../../palette/dist/index.cjs');
3
+ const require_assertUnreachable = require('./assertUnreachable.cjs');
4
+
5
+ //#region ../automated-config/dist/utils/mapColorFixtureToValue.js
6
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
7
+ const mapColorFixtureToValue = (fixtureType, value) => {
8
+ switch (fixtureType) {
9
+ case "alwaysPaletteAliases":
10
+ if (value.startsWith(require_index.ALWAYS_PREFIX)) {
11
+ const [, subValue] = value.split("/");
12
+ return `colors.always.${subValue}`;
13
+ }
14
+ return `colors.${value}`;
15
+ case "spectrumColors": {
16
+ const [hue, hueStep] = value.split("-");
17
+ return `colors.${hue}.${hueStep}`;
18
+ }
19
+ case "foregroundPaletteColors": return `textColor.${value}`;
20
+ case "backgroundPaletteColors": return `backgroundColor.${value}`;
21
+ case "linePaletteColors":
22
+ case "elevationAliases": return `borderColor.${value}`;
23
+ }
24
+ return require_assertUnreachable.assertUnreachable(fixtureType);
25
+ };
26
+
27
+ //#endregion
28
+ exports.mapColorFixtureToValue = mapColorFixtureToValue;
@@ -0,0 +1,29 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ import { ALWAYS_PREFIX } from "../../../palette/dist/index.js";
3
+ import { assertUnreachable } from "./assertUnreachable.js";
4
+
5
+ //#region ../automated-config/dist/utils/mapColorFixtureToValue.js
6
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
7
+ const mapColorFixtureToValue = (fixtureType, value) => {
8
+ switch (fixtureType) {
9
+ case "alwaysPaletteAliases":
10
+ if (value.startsWith(ALWAYS_PREFIX)) {
11
+ const [, subValue] = value.split("/");
12
+ return `colors.always.${subValue}`;
13
+ }
14
+ return `colors.${value}`;
15
+ case "spectrumColors": {
16
+ const [hue, hueStep] = value.split("-");
17
+ return `colors.${hue}.${hueStep}`;
18
+ }
19
+ case "foregroundPaletteColors": return `textColor.${value}`;
20
+ case "backgroundPaletteColors": return `backgroundColor.${value}`;
21
+ case "linePaletteColors":
22
+ case "elevationAliases": return `borderColor.${value}`;
23
+ }
24
+ return assertUnreachable(fixtureType);
25
+ };
26
+
27
+ //#endregion
28
+ export { mapColorFixtureToValue };
29
+ //# sourceMappingURL=mapColorFixtureToValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapColorFixtureToValue.js","names":[],"sources":["../../../../../automated-config/dist/utils/mapColorFixtureToValue.js"],"sourcesContent":["/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */\nimport { assertUnreachable } from \"./assertUnreachable.js\";\nimport { ALWAYS_PREFIX } from \"@yahoo/uds-palette\";\n\n//#region src/utils/mapColorFixtureToValue.ts\nconst mapColorFixtureToValue = (fixtureType, value) => {\n\tswitch (fixtureType) {\n\t\tcase \"alwaysPaletteAliases\":\n\t\t\tif (value.startsWith(ALWAYS_PREFIX)) {\n\t\t\t\tconst [, subValue] = value.split(\"/\");\n\t\t\t\treturn `colors.always.${subValue}`;\n\t\t\t}\n\t\t\treturn `colors.${value}`;\n\t\tcase \"spectrumColors\": {\n\t\t\tconst [hue, hueStep] = value.split(\"-\");\n\t\t\treturn `colors.${hue}.${hueStep}`;\n\t\t}\n\t\tcase \"foregroundPaletteColors\": return `textColor.${value}`;\n\t\tcase \"backgroundPaletteColors\": return `backgroundColor.${value}`;\n\t\tcase \"linePaletteColors\":\n\t\tcase \"elevationAliases\": return `borderColor.${value}`;\n\t}\n\treturn assertUnreachable(fixtureType);\n};\n\n//#endregion\nexport { mapColorFixtureToValue };\n//# sourceMappingURL=mapColorFixtureToValue.js.map"],"mappings":";;;;;;AAKA,MAAM,0BAA0B,aAAa,UAAU;AACtD,SAAQ,aAAR;EACC,KAAK;AACJ,OAAI,MAAM,WAAW,cAAc,EAAE;IACpC,MAAM,GAAG,YAAY,MAAM,MAAM,IAAI;AACrC,WAAO,iBAAiB;;AAEzB,UAAO,UAAU;EAClB,KAAK,kBAAkB;GACtB,MAAM,CAAC,KAAK,WAAW,MAAM,MAAM,IAAI;AACvC,UAAO,UAAU,IAAI,GAAG;;EAEzB,KAAK,0BAA2B,QAAO,aAAa;EACpD,KAAK,0BAA2B,QAAO,mBAAmB;EAC1D,KAAK;EACL,KAAK,mBAAoB,QAAO,eAAe;;AAEhD,QAAO,kBAAkB,YAAY"}
@@ -0,0 +1,10 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+
3
+ //#region ../automated-config/dist/utils/variantConfigGuards.js
4
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
5
+ const isVariantConfigWithProperties = (v) => !!v?.layers;
6
+ const isVariantConfigWithComponentStates = (v) => !!v?.componentStates;
7
+
8
+ //#endregion
9
+ exports.isVariantConfigWithComponentStates = isVariantConfigWithComponentStates;
10
+ exports.isVariantConfigWithProperties = isVariantConfigWithProperties;
@@ -0,0 +1,9 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ //#region ../automated-config/dist/utils/variantConfigGuards.js
3
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
4
+ const isVariantConfigWithProperties = (v) => !!v?.layers;
5
+ const isVariantConfigWithComponentStates = (v) => !!v?.componentStates;
6
+
7
+ //#endregion
8
+ export { isVariantConfigWithComponentStates, isVariantConfigWithProperties };
9
+ //# sourceMappingURL=variantConfigGuards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variantConfigGuards.js","names":[],"sources":["../../../../../automated-config/dist/utils/variantConfigGuards.js"],"sourcesContent":["/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */\n//#region src/utils/variantConfigGuards.ts\nconst isVariantConfigWithProperties = (v) => !!v?.layers;\nconst isVariantConfigWithComponentStates = (v) => !!v?.componentStates;\n\n//#endregion\nexport { isVariantConfigWithComponentStates, isVariantConfigWithProperties };\n//# sourceMappingURL=variantConfigGuards.js.map"],"mappings":";;;AAEA,MAAM,iCAAiC,MAAM,CAAC,CAAC,GAAG;AAClD,MAAM,sCAAsC,MAAM,CAAC,CAAC,GAAG"}