@yahoo/uds 3.157.0 → 3.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/dist/automated-config/dist/generated/autoVariants.cjs +26 -0
  2. package/dist/automated-config/dist/generated/autoVariants.d.cts +17 -0
  3. package/dist/automated-config/dist/generated/autoVariants.d.ts +17 -0
  4. package/dist/automated-config/dist/generated/autoVariants.js +26 -0
  5. package/dist/automated-config/dist/generated/generatedConfigs.cjs +3287 -596
  6. package/dist/automated-config/dist/generated/generatedConfigs.d.cts +350 -12
  7. package/dist/automated-config/dist/generated/generatedConfigs.d.ts +350 -12
  8. package/dist/automated-config/dist/generated/generatedConfigs.js +3285 -597
  9. package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +276 -45
  10. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +8 -2
  11. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +8 -2
  12. package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +276 -45
  13. package/dist/automated-config/dist/properties.cjs +8 -1
  14. package/dist/automated-config/dist/properties.d.cts +8 -0
  15. package/dist/automated-config/dist/properties.d.ts +8 -0
  16. package/dist/automated-config/dist/properties.js +8 -1
  17. package/dist/automated-config/dist/types/ComponentConfig.d.cts +3 -1
  18. package/dist/automated-config/dist/types/ComponentConfig.d.ts +3 -1
  19. package/dist/automated-config/dist/utils/buildConfigSchema.cjs +48 -33
  20. package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +14 -4
  21. package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +14 -4
  22. package/dist/automated-config/dist/utils/buildConfigSchema.js +49 -34
  23. package/dist/automated-config/dist/utils/componentStatePseudoStates.cjs +4 -0
  24. package/dist/automated-config/dist/utils/componentStatePseudoStates.js +4 -1
  25. package/dist/automated-config/dist/utils/getButtonControlHeight.cjs +129 -0
  26. package/dist/automated-config/dist/utils/getButtonControlHeight.d.cts +133 -0
  27. package/dist/automated-config/dist/utils/getButtonControlHeight.d.ts +133 -0
  28. package/dist/automated-config/dist/utils/getButtonControlHeight.js +122 -0
  29. package/dist/automated-config/dist/utils/getButtonControlHeightPx.cjs +114 -0
  30. package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.cts +78 -0
  31. package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.ts +78 -0
  32. package/dist/automated-config/dist/utils/getButtonControlHeightPx.js +108 -0
  33. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
  34. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
  35. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.cjs +5 -2
  36. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.js +6 -3
  37. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +110 -0
  38. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.cts +19 -0
  39. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.ts +19 -0
  40. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.js +108 -0
  41. package/dist/automated-config/dist/utils/index.cjs +106 -33
  42. package/dist/automated-config/dist/utils/index.d.cts +16 -4
  43. package/dist/automated-config/dist/utils/index.d.ts +16 -4
  44. package/dist/automated-config/dist/utils/index.js +107 -34
  45. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.cjs +15 -0
  46. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.cts +20 -0
  47. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.ts +20 -0
  48. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.js +15 -0
  49. package/dist/automated-config/dist/utils/pseudoStateSelectors.cjs +6 -3
  50. package/dist/automated-config/dist/utils/pseudoStateSelectors.d.cts +1 -1
  51. package/dist/automated-config/dist/utils/pseudoStateSelectors.d.ts +1 -1
  52. package/dist/automated-config/dist/utils/pseudoStateSelectors.js +6 -3
  53. package/dist/components/client/Button.cjs +3 -3
  54. package/dist/components/client/Button.js +3 -3
  55. package/dist/components/client/Input/Input.cjs +1 -1
  56. package/dist/components/client/Input/Input.js +1 -1
  57. package/dist/components/client/Menu/Menu.Item.cjs +1 -0
  58. package/dist/components/client/Menu/Menu.Item.js +1 -0
  59. package/dist/components/client/Select/Select.cjs +179 -0
  60. package/dist/components/client/Select/Select.d.cts +55 -0
  61. package/dist/components/client/Select/Select.d.ts +56 -0
  62. package/dist/components/client/Select/Select.js +176 -0
  63. package/dist/components/client/Select/SelectContent.cjs +75 -0
  64. package/dist/components/client/Select/SelectContent.d.cts +44 -0
  65. package/dist/components/client/Select/SelectContent.d.ts +45 -0
  66. package/dist/components/client/Select/SelectContent.js +73 -0
  67. package/dist/components/client/Select/SelectDivider.cjs +63 -0
  68. package/dist/components/client/Select/SelectDivider.d.cts +44 -0
  69. package/dist/components/client/Select/SelectDivider.d.ts +45 -0
  70. package/dist/components/client/Select/SelectDivider.js +61 -0
  71. package/dist/components/client/Select/SelectHelpText.cjs +51 -0
  72. package/dist/components/client/Select/SelectHelpText.d.cts +27 -0
  73. package/dist/components/client/Select/SelectHelpText.d.ts +28 -0
  74. package/dist/components/client/Select/SelectHelpText.js +48 -0
  75. package/dist/components/client/Select/SelectItem.cjs +172 -0
  76. package/dist/components/client/Select/SelectItem.d.cts +29 -0
  77. package/dist/components/client/Select/SelectItem.d.ts +30 -0
  78. package/dist/components/client/Select/SelectItem.js +170 -0
  79. package/dist/components/client/Select/SelectTrigger.cjs +138 -0
  80. package/dist/components/client/Select/SelectTrigger.d.cts +27 -0
  81. package/dist/components/client/Select/SelectTrigger.d.ts +28 -0
  82. package/dist/components/client/Select/SelectTrigger.js +136 -0
  83. package/dist/components/client/Select/SelectValue.cjs +28 -0
  84. package/dist/components/client/Select/SelectValue.d.cts +19 -0
  85. package/dist/components/client/Select/SelectValue.d.ts +20 -0
  86. package/dist/components/client/Select/SelectValue.js +26 -0
  87. package/dist/components/client/Select/index.cjs +11 -0
  88. package/dist/components/client/Select/index.d.cts +6 -0
  89. package/dist/components/client/Select/index.d.ts +7 -0
  90. package/dist/components/client/Select/index.js +7 -0
  91. package/dist/components/client/Select/selectContext.cjs +20 -0
  92. package/dist/components/client/Select/selectContext.d.cts +23 -0
  93. package/dist/components/client/Select/selectContext.d.ts +24 -0
  94. package/dist/components/client/Select/selectContext.js +16 -0
  95. package/dist/components/client/Select/selectFieldStyles.cjs +85 -0
  96. package/dist/components/client/Select/selectFieldStyles.d.cts +37 -0
  97. package/dist/components/client/Select/selectFieldStyles.d.ts +38 -0
  98. package/dist/components/client/Select/selectFieldStyles.js +75 -0
  99. package/dist/components/client/index.cjs +8 -0
  100. package/dist/components/client/index.d.cts +5 -1
  101. package/dist/components/client/index.d.ts +5 -1
  102. package/dist/components/client/index.js +5 -1
  103. package/dist/components/index.cjs +8 -0
  104. package/dist/components/index.d.cts +5 -1
  105. package/dist/components/index.d.ts +5 -1
  106. package/dist/components/index.js +5 -1
  107. package/dist/config/dist/index.cjs +383 -73
  108. package/dist/config/dist/index.js +383 -73
  109. package/dist/css/dist/css/utils.cjs +3 -0
  110. package/dist/css/dist/css/utils.js +3 -0
  111. package/dist/css/dist/packages/automated-config/dist/properties.cjs +8 -1
  112. package/dist/css/dist/packages/automated-config/dist/properties.js +8 -1
  113. package/dist/css/dist/packages/config/dist/index.cjs +383 -73
  114. package/dist/css/dist/packages/config/dist/index.js +383 -73
  115. package/dist/css-tokens/dist/index.cjs +2 -0
  116. package/dist/css-tokens/dist/index.d.cts +2 -1
  117. package/dist/css-tokens/dist/index.d.ts +2 -1
  118. package/dist/css-tokens/dist/index.js +2 -1
  119. package/dist/index.cjs +34 -0
  120. package/dist/index.d.cts +12 -4
  121. package/dist/index.d.ts +12 -4
  122. package/dist/index.js +11 -3
  123. package/dist/styles/styler.d.cts +29 -12
  124. package/dist/styles/styler.d.ts +29 -12
  125. package/dist/styles/variants.d.cts +54 -0
  126. package/dist/styles/variants.d.ts +54 -0
  127. package/dist/tailwind/utils/index.cjs +3 -0
  128. package/dist/tailwind/utils/index.d.cts +2 -1
  129. package/dist/tailwind/utils/index.d.ts +2 -1
  130. package/dist/tailwind/utils/index.js +2 -1
  131. package/dist/tailwind-internal/dist/base/addColorModeVars.cjs +1 -1
  132. package/dist/tailwind-internal/dist/base/addColorModeVars.js +1 -1
  133. package/dist/tailwind-internal/dist/base/addColorModeVarsV2.cjs +1 -1
  134. package/dist/tailwind-internal/dist/base/addColorModeVarsV2.js +1 -1
  135. package/dist/tailwind-internal/dist/components/getFocusRingStyles.cjs +74 -6
  136. package/dist/tailwind-internal/dist/components/getFocusRingStyles.d.cts +14 -0
  137. package/dist/tailwind-internal/dist/components/getFocusRingStyles.d.ts +14 -0
  138. package/dist/tailwind-internal/dist/components/getFocusRingStyles.js +74 -7
  139. package/dist/tailwind-internal/dist/components/getResponsiveTextStyles.cjs +1 -1
  140. package/dist/tailwind-internal/dist/components/getResponsiveTextStyles.js +1 -1
  141. package/dist/tailwind-internal/dist/index.d.cts +1 -0
  142. package/dist/tailwind-internal/dist/index.d.ts +1 -0
  143. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +3287 -596
  144. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +3285 -597
  145. package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.cjs +8 -1
  146. package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.js +8 -1
  147. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.cjs +4 -0
  148. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js +4 -1
  149. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.cjs +126 -0
  150. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.js +123 -0
  151. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +20 -0
  152. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.js +20 -0
  153. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +103 -33
  154. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +104 -34
  155. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/pseudoStateSelectors.cjs +6 -3
  156. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/pseudoStateSelectors.js +6 -3
  157. package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +383 -73
  158. package/dist/tailwind-internal/dist/packages/config/dist/index.js +383 -73
  159. package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.cjs +12 -10
  160. package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.js +3 -2
  161. package/dist/tailwind-internal/dist/plugins/a11y.cjs +6 -2
  162. package/dist/tailwind-internal/dist/plugins/a11y.js +6 -2
  163. package/dist/tailwind-internal/dist/plugins/blurBgFallback.cjs +1 -1
  164. package/dist/tailwind-internal/dist/plugins/blurBgFallback.js +1 -1
  165. package/dist/tailwind-internal/dist/plugins/borderRadius.cjs +1 -1
  166. package/dist/tailwind-internal/dist/plugins/borderRadius.js +1 -1
  167. package/dist/tailwind-internal/dist/plugins/borderWidth.cjs +1 -1
  168. package/dist/tailwind-internal/dist/plugins/borderWidth.js +1 -1
  169. package/dist/tailwind-internal/dist/plugins/colors.cjs +2 -2
  170. package/dist/tailwind-internal/dist/plugins/colors.js +2 -2
  171. package/dist/tailwind-internal/dist/plugins/components.cjs +5 -2
  172. package/dist/tailwind-internal/dist/plugins/components.js +6 -3
  173. package/dist/tailwind-internal/dist/plugins/elevation.cjs +1 -1
  174. package/dist/tailwind-internal/dist/plugins/elevation.js +1 -1
  175. package/dist/tailwind-internal/dist/plugins/shadows.cjs +1 -1
  176. package/dist/tailwind-internal/dist/plugins/shadows.js +1 -1
  177. package/dist/tailwind-internal/dist/plugins/typography.cjs +2 -2
  178. package/dist/tailwind-internal/dist/plugins/typography.js +2 -2
  179. package/dist/tailwind-internal/dist/utils/getElevationStyles.cjs +1 -1
  180. package/dist/tailwind-internal/dist/utils/getElevationStyles.js +1 -1
  181. package/dist/tailwind-internal/dist/utils/getFontStyles.cjs +1 -1
  182. package/dist/tailwind-internal/dist/utils/getFontStyles.js +1 -1
  183. package/dist/tailwind-internal/dist/utils/getMotionStyles.cjs +1 -1
  184. package/dist/tailwind-internal/dist/utils/getMotionStyles.js +1 -1
  185. package/dist/tailwind-internal/dist/utils/getShadowPresetValues.cjs +1 -1
  186. package/dist/tailwind-internal/dist/utils/getShadowPresetValues.js +1 -1
  187. package/dist/tailwind-internal/dist/utils/getShadowStyles.cjs +1 -1
  188. package/dist/tailwind-internal/dist/utils/getShadowStyles.js +1 -1
  189. package/dist/tailwind-internal/dist/utils/parseTokens.cjs +2 -2
  190. package/dist/tailwind-internal/dist/utils/parseTokens.js +2 -2
  191. package/dist/tokens/automation/configs/index.cjs +3 -0
  192. package/dist/tokens/automation/configs/index.d.cts +2 -2
  193. package/dist/tokens/automation/configs/index.d.ts +2 -2
  194. package/dist/tokens/automation/configs/index.js +2 -2
  195. package/dist/tokens/automation/index.cjs +25 -0
  196. package/dist/tokens/automation/index.d.cts +6 -2
  197. package/dist/tokens/automation/index.d.ts +6 -2
  198. package/dist/tokens/automation/index.js +6 -2
  199. package/dist/tokens/consts/cssTokens.cjs +1 -0
  200. package/dist/tokens/consts/cssTokens.d.cts +2 -2
  201. package/dist/tokens/consts/cssTokens.d.ts +2 -2
  202. package/dist/tokens/consts/cssTokens.js +2 -2
  203. package/dist/tokens/index.cjs +26 -0
  204. package/dist/tokens/index.d.cts +8 -4
  205. package/dist/tokens/index.d.ts +8 -4
  206. package/dist/tokens/index.js +7 -3
  207. package/dist/tokens/types.d.cts +2 -2
  208. package/dist/tokens/types.d.ts +2 -2
  209. package/dist/types/dist/index.d.cts +36 -1
  210. package/dist/types/dist/index.d.ts +36 -1
  211. package/dist/uds/generated/componentData.cjs +718 -308
  212. package/dist/uds/generated/componentData.js +718 -308
  213. package/dist/uds/generated/migrationSchemaVersion.cjs +1 -1
  214. package/dist/uds/generated/migrationSchemaVersion.js +1 -1
  215. package/dist/uds/generated/tailwindPurge.cjs +1501 -315
  216. package/dist/uds/generated/tailwindPurge.js +1501 -315
  217. package/generated/componentData.json +897 -398
  218. package/generated/migrationSchemaVersion.ts +1 -1
  219. package/generated/tailwindPurge.ts +4 -4
  220. package/package.json +1 -1
@@ -0,0 +1,122 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ import { BUTTON_CONTROL_HEIGHT_VAR } from "../../../css-tokens/dist/index.js";
3
+ import { mapTextVariantFixtureToValue } from "../mapTextVariantFixtureToValue.js";
4
+ import { configurableProperties } from "../properties.js";
5
+ import { isIconButtonMatchButtonHeightEnabled } from "./iconButtonMatchButtonHeight.js";
6
+ //#region ../automated-config/dist/utils/getButtonControlHeight.js
7
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
8
+ /** Sizes where IconButton control height should match Button. */
9
+ const SHARED_BUTTON_ICONBUTTON_SIZES = new Set([
10
+ "xs",
11
+ "sm",
12
+ "md",
13
+ "lg"
14
+ ]);
15
+ function getButtonIconSizeVar({ schema, iconLayerKey, state, theme }) {
16
+ const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
17
+ if (typeof iconSizeValue === "string" && iconSizeValue) return theme(configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue));
18
+ }
19
+ /**
20
+ * Button content box: max(icon size, text line-height).
21
+ * Matches Figma auto-layout and keeps IconButton height aligned with Button.
22
+ */
23
+ function getButtonControlContentSize({ schema, rootLayerKey, iconLayerKey, state, theme }) {
24
+ const iconSizeVar = getButtonIconSizeVar({
25
+ schema,
26
+ iconLayerKey,
27
+ state,
28
+ theme
29
+ });
30
+ const textVariantValue = schema.variables?.[rootLayerKey]?.textVariant?.[state]?.value;
31
+ if (iconSizeVar && typeof textVariantValue === "string" && textVariantValue) return `max(${iconSizeVar}, ${theme(mapTextVariantFixtureToValue("lineHeight")("textVariants", textVariantValue))})`;
32
+ if (iconSizeVar) return iconSizeVar;
33
+ }
34
+ /** `round(up, …, 1px)` matches Math.ceil in getButtonControlHeightPx and Figma hug height. */
35
+ function formatControlHeightCalc(calcExpression) {
36
+ return `round(up, ${calcExpression}, 1px)`;
37
+ }
38
+ /**
39
+ * Button control height: vertical padding on both sides plus max(icon size, text line-height).
40
+ */
41
+ function getButtonControlHeight({ paddingVertical, schema, rootLayerKey, iconLayerKey, state, theme }) {
42
+ const contentSize = getButtonControlContentSize({
43
+ schema,
44
+ rootLayerKey,
45
+ iconLayerKey,
46
+ state,
47
+ theme
48
+ });
49
+ if (!contentSize) return;
50
+ return formatControlHeightCalc(`calc(2 * ${paddingVertical} + ${contentSize})`);
51
+ }
52
+ /**
53
+ * IconButton control height: uniform padding plus icon size only (no typography).
54
+ */
55
+ function getIconButtonControlHeight({ paddingVertical, schema, iconLayerKey, state, theme }) {
56
+ const iconSizeVar = getButtonIconSizeVar({
57
+ schema,
58
+ iconLayerKey,
59
+ state,
60
+ theme
61
+ });
62
+ if (!iconSizeVar) return;
63
+ return formatControlHeightCalc(`calc(2 * ${paddingVertical} + ${iconSizeVar})`);
64
+ }
65
+ /**
66
+ * Layout line-height for button root: max(icon size, text line-height).
67
+ */
68
+ function getButtonContentLineHeight({ schema, rootLayerKey, iconLayerKey, state, theme }) {
69
+ return getButtonControlContentSize({
70
+ schema,
71
+ rootLayerKey,
72
+ iconLayerKey,
73
+ state,
74
+ theme
75
+ }) ?? "1em";
76
+ }
77
+ function applyButtonControlHeightDeclarations({ cssDeclarations, paddingVertical, schema, rootLayerKey, iconLayerKey, state, theme }) {
78
+ const controlHeight = rootLayerKey ? getButtonControlHeight({
79
+ paddingVertical,
80
+ schema,
81
+ rootLayerKey,
82
+ iconLayerKey,
83
+ state,
84
+ theme
85
+ }) : getIconButtonControlHeight({
86
+ paddingVertical,
87
+ schema,
88
+ iconLayerKey,
89
+ state,
90
+ theme
91
+ });
92
+ if (controlHeight) {
93
+ cssDeclarations[BUTTON_CONTROL_HEIGHT_VAR] = controlHeight;
94
+ cssDeclarations.height = `var(${BUTTON_CONTROL_HEIGHT_VAR})`;
95
+ }
96
+ }
97
+ function applyIconButtonSquareDimensions(cssDeclarations) {
98
+ if (cssDeclarations[BUTTON_CONTROL_HEIGHT_VAR]) cssDeclarations.width = `var(${BUTTON_CONTROL_HEIGHT_VAR})`;
99
+ }
100
+ /**
101
+ * IconButton height for xs–lg mirrors Button (padding + max(icon, line-height)).
102
+ * xl uses icon-only height from IconButton tokens.
103
+ */
104
+ function applyIconButtonControlHeightDeclarations({ cssDeclarations, paddingVertical, iconButtonSchema, buttonHeightReferenceSchema, variantValue, iconLayerKey: _iconLayerKey, state, theme }) {
105
+ if (buttonHeightReferenceSchema && SHARED_BUTTON_ICONBUTTON_SIZES.has(variantValue) && isIconButtonMatchButtonHeightEnabled(iconButtonSchema, variantValue)) {
106
+ const buttonRootLayerKey = `size/${variantValue}/root`;
107
+ const buttonIconLayerKey = `size/${variantValue}/icon`;
108
+ const buttonSpacingValue = buttonHeightReferenceSchema.variables?.[buttonRootLayerKey]?.spacingVertical?.[state]?.value;
109
+ applyButtonControlHeightDeclarations({
110
+ cssDeclarations,
111
+ paddingVertical: typeof buttonSpacingValue === "string" && buttonSpacingValue ? theme(configurableProperties.spacingVertical.twThemePath("spacingAliases", buttonSpacingValue)) : paddingVertical,
112
+ schema: buttonHeightReferenceSchema,
113
+ rootLayerKey: buttonRootLayerKey,
114
+ iconLayerKey: buttonIconLayerKey,
115
+ state,
116
+ theme
117
+ });
118
+ applyIconButtonSquareDimensions(cssDeclarations);
119
+ }
120
+ }
121
+ //#endregion
122
+ export { SHARED_BUTTON_ICONBUTTON_SIZES, applyButtonControlHeightDeclarations, applyIconButtonControlHeightDeclarations, getButtonContentLineHeight, getButtonControlContentSize, getButtonControlHeight, getButtonIconSizeVar, getIconButtonControlHeight };
@@ -0,0 +1,114 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ require("../../../_virtual/_rolldown/runtime.cjs");
3
+ const require_index = require("../../../fixtures/dist/index.cjs");
4
+ const require_iconButtonMatchButtonHeight = require("./iconButtonMatchButtonHeight.cjs");
5
+ let _yahoo_uds_icons_tokens = require("@yahoo/uds-icons/tokens");
6
+ let lodash_es = require("lodash-es");
7
+ //#region ../automated-config/dist/utils/getButtonControlHeightPx.js
8
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
9
+ const SHARED_BUTTON_ICONBUTTON_SIZES = new Set([
10
+ "xs",
11
+ "sm",
12
+ "md",
13
+ "lg"
14
+ ]);
15
+ function resolveSpacingPx(config, alias) {
16
+ if (!alias) return 0;
17
+ const scaleValue = (0, lodash_es.get)(config, [
18
+ "scaleMode",
19
+ "large",
20
+ "spacing",
21
+ alias.replace(".", "_")
22
+ ]);
23
+ if (typeof scaleValue === "number") return scaleValue;
24
+ return require_index.spacingMap[alias] ?? 0;
25
+ }
26
+ function resolveTypographyPx(config, textVariant, property) {
27
+ if (!textVariant) return 0;
28
+ const typographyConfig = config.typography[textVariant];
29
+ if (!typographyConfig?.[property]) return 0;
30
+ const defaultBreakpoint = config.globalDefaults.breakpoint;
31
+ const value = defaultBreakpoint === "base" ? typographyConfig[property].base : typographyConfig[property].breakpoints[defaultBreakpoint];
32
+ if (typeof value === "number") return value;
33
+ if (value && typeof value === "object" && "value" in value) return value.value;
34
+ return 0;
35
+ }
36
+ /** Ceil fractional totals so Figma-bound controlHeight matches auto-layout hug (e.g. xs + ui3 15.4lh → 28). */
37
+ function snapControlHeightPx(value) {
38
+ return Math.ceil(value);
39
+ }
40
+ /** Pixel control height for Button: padding + max(icon size, text line-height). */
41
+ function getButtonControlHeightPx(config, size) {
42
+ const button = config.button;
43
+ if (!button?.variables) return 0;
44
+ const layerPrefix = `size/${size}`;
45
+ const paddingAlias = button.variables[`${layerPrefix}/root`]?.spacingVertical?.rest?.value;
46
+ const iconSizeAlias = button.variables[`${layerPrefix}/icon`]?.size?.rest?.value;
47
+ const textVariant = button.variables[`${layerPrefix}/root`]?.textVariant?.rest?.value;
48
+ const padding = resolveSpacingPx(config, paddingAlias);
49
+ const iconSize = _yahoo_uds_icons_tokens.ICON_SIZE_MAP[iconSizeAlias ?? "sm"] ?? 16;
50
+ const lineHeight = resolveTypographyPx(config, textVariant, "lineHeight");
51
+ return snapControlHeightPx(padding * 2 + Math.max(iconSize, lineHeight || iconSize));
52
+ }
53
+ /** Pixel control height for IconButton: uniform padding plus icon size only. */
54
+ function getIconButtonOnlyControlHeightPx(config, size) {
55
+ const iconButton = config.iconButton;
56
+ if (!iconButton?.variables) return 0;
57
+ const layerPrefix = `size/${size}`;
58
+ const paddingAlias = iconButton.variables[`${layerPrefix}/root`]?.spacing?.rest?.value;
59
+ const iconSizeAlias = iconButton.variables[`${layerPrefix}/icon`]?.size?.rest?.value;
60
+ const padding = resolveSpacingPx(config, paddingAlias);
61
+ const iconSize = _yahoo_uds_icons_tokens.ICON_SIZE_MAP[iconSizeAlias ?? "sm"] ?? 16;
62
+ return snapControlHeightPx(padding * 2 + iconSize);
63
+ }
64
+ /** Pixel control height for IconButton when match-button-height is enabled for that size. */
65
+ function getIconButtonControlHeightPx(config, size) {
66
+ if (SHARED_BUTTON_ICONBUTTON_SIZES.has(size)) {
67
+ if (!require_iconButtonMatchButtonHeight.isIconButtonMatchButtonHeightEnabled(config, size)) return 0;
68
+ return getButtonControlHeightPx(config, size);
69
+ }
70
+ return 0;
71
+ }
72
+ function setControlHeightVar(config, componentKey, size, heightPx) {
73
+ const rootKey = `size/${size}/root`;
74
+ const componentConfig = config[componentKey];
75
+ const existingRoot = componentConfig?.variables?.[rootKey] ?? {};
76
+ return {
77
+ ...config,
78
+ [componentKey]: {
79
+ ...componentConfig,
80
+ variables: {
81
+ ...componentConfig?.variables,
82
+ [rootKey]: {
83
+ ...existingRoot,
84
+ controlHeight: { rest: {
85
+ type: "positiveIntegers",
86
+ value: snapControlHeightPx(heightPx),
87
+ valueType: "alias"
88
+ } }
89
+ }
90
+ }
91
+ }
92
+ };
93
+ }
94
+ function syncButtonControlHeightVarForSize(config, size) {
95
+ if (!SHARED_BUTTON_ICONBUTTON_SIZES.has(size) || !require_iconButtonMatchButtonHeight.isIconButtonMatchButtonHeightEnabled(config, size)) return config;
96
+ return setControlHeightVar(config, "iconButton", size, getButtonControlHeightPx(config, size));
97
+ }
98
+ function syncIconButtonControlHeightVarForSize(config, size) {
99
+ const heightPx = getIconButtonControlHeightPx(config, size);
100
+ if (heightPx <= 0) return config;
101
+ return setControlHeightVar(config, "iconButton", size, heightPx);
102
+ }
103
+ function syncIconButtonOnlyControlHeightVarForSize(config, size) {
104
+ const heightPx = getIconButtonOnlyControlHeightPx(config, size);
105
+ if (heightPx <= 0) return config;
106
+ return setControlHeightVar(config, "iconButton", size, heightPx);
107
+ }
108
+ //#endregion
109
+ exports.getButtonControlHeightPx = getButtonControlHeightPx;
110
+ exports.getIconButtonControlHeightPx = getIconButtonControlHeightPx;
111
+ exports.getIconButtonOnlyControlHeightPx = getIconButtonOnlyControlHeightPx;
112
+ exports.syncButtonControlHeightVarForSize = syncButtonControlHeightVarForSize;
113
+ exports.syncIconButtonControlHeightVarForSize = syncIconButtonControlHeightVarForSize;
114
+ exports.syncIconButtonOnlyControlHeightVarForSize = syncIconButtonOnlyControlHeightVarForSize;
@@ -0,0 +1,78 @@
1
+
2
+ import { ButtonSize, IconButtonSize } from "../../../types/dist/index.cjs";
3
+ import { IconButtonMatchButtonHeightConfig } from "./iconButtonMatchButtonHeight.cjs";
4
+
5
+ //#region ../automated-config/dist/utils/getButtonControlHeightPx.d.ts
6
+ //#region src/utils/getButtonControlHeightPx.d.ts
7
+ type ButtonControlHeightConfig = IconButtonMatchButtonHeightConfig & {
8
+ button?: {
9
+ variables?: Record<string, {
10
+ spacingVertical?: {
11
+ rest?: {
12
+ value?: string;
13
+ };
14
+ };
15
+ textVariant?: {
16
+ rest?: {
17
+ value?: string;
18
+ };
19
+ };
20
+ size?: {
21
+ rest?: {
22
+ value?: string;
23
+ };
24
+ };
25
+ }>;
26
+ };
27
+ iconButton?: {
28
+ variables?: Record<string, {
29
+ spacing?: {
30
+ rest?: {
31
+ value?: string;
32
+ };
33
+ };
34
+ size?: {
35
+ rest?: {
36
+ value?: string;
37
+ };
38
+ };
39
+ }>;
40
+ };
41
+ typography: Record<string, {
42
+ fontSize: {
43
+ base: number | {
44
+ value: number;
45
+ };
46
+ breakpoints: Record<string, number | {
47
+ value: number;
48
+ }>;
49
+ };
50
+ lineHeight: {
51
+ base: number | {
52
+ value: number;
53
+ };
54
+ breakpoints: Record<string, number | {
55
+ value: number;
56
+ }>;
57
+ };
58
+ }>;
59
+ scaleMode: {
60
+ large: {
61
+ spacing: Record<string, number>;
62
+ };
63
+ };
64
+ globalDefaults: {
65
+ breakpoint: string;
66
+ };
67
+ };
68
+ /** Pixel control height for Button: padding + max(icon size, text line-height). */
69
+ declare function getButtonControlHeightPx(config: ButtonControlHeightConfig, size: ButtonSize): number;
70
+ /** Pixel control height for IconButton: uniform padding plus icon size only. */
71
+ declare function getIconButtonOnlyControlHeightPx(config: ButtonControlHeightConfig, size: IconButtonSize): number;
72
+ /** Pixel control height for IconButton when match-button-height is enabled for that size. */
73
+ declare function getIconButtonControlHeightPx(config: ButtonControlHeightConfig, size: IconButtonSize): number;
74
+ declare function syncButtonControlHeightVarForSize<T extends object>(config: T, size: ButtonSize): T;
75
+ declare function syncIconButtonControlHeightVarForSize<T extends object>(config: T, size: IconButtonSize): T;
76
+ declare function syncIconButtonOnlyControlHeightVarForSize<T extends object>(config: T, size: IconButtonSize): T; //#endregion
77
+ //#endregion
78
+ export { getButtonControlHeightPx, getIconButtonControlHeightPx, getIconButtonOnlyControlHeightPx, syncButtonControlHeightVarForSize, syncIconButtonControlHeightVarForSize, syncIconButtonOnlyControlHeightVarForSize };
@@ -0,0 +1,78 @@
1
+
2
+ import { ButtonSize, IconButtonSize } from "../../../types/dist/index.js";
3
+ import { IconButtonMatchButtonHeightConfig } from "./iconButtonMatchButtonHeight.js";
4
+
5
+ //#region ../automated-config/dist/utils/getButtonControlHeightPx.d.ts
6
+ //#region src/utils/getButtonControlHeightPx.d.ts
7
+ type ButtonControlHeightConfig = IconButtonMatchButtonHeightConfig & {
8
+ button?: {
9
+ variables?: Record<string, {
10
+ spacingVertical?: {
11
+ rest?: {
12
+ value?: string;
13
+ };
14
+ };
15
+ textVariant?: {
16
+ rest?: {
17
+ value?: string;
18
+ };
19
+ };
20
+ size?: {
21
+ rest?: {
22
+ value?: string;
23
+ };
24
+ };
25
+ }>;
26
+ };
27
+ iconButton?: {
28
+ variables?: Record<string, {
29
+ spacing?: {
30
+ rest?: {
31
+ value?: string;
32
+ };
33
+ };
34
+ size?: {
35
+ rest?: {
36
+ value?: string;
37
+ };
38
+ };
39
+ }>;
40
+ };
41
+ typography: Record<string, {
42
+ fontSize: {
43
+ base: number | {
44
+ value: number;
45
+ };
46
+ breakpoints: Record<string, number | {
47
+ value: number;
48
+ }>;
49
+ };
50
+ lineHeight: {
51
+ base: number | {
52
+ value: number;
53
+ };
54
+ breakpoints: Record<string, number | {
55
+ value: number;
56
+ }>;
57
+ };
58
+ }>;
59
+ scaleMode: {
60
+ large: {
61
+ spacing: Record<string, number>;
62
+ };
63
+ };
64
+ globalDefaults: {
65
+ breakpoint: string;
66
+ };
67
+ };
68
+ /** Pixel control height for Button: padding + max(icon size, text line-height). */
69
+ declare function getButtonControlHeightPx(config: ButtonControlHeightConfig, size: ButtonSize): number;
70
+ /** Pixel control height for IconButton: uniform padding plus icon size only. */
71
+ declare function getIconButtonOnlyControlHeightPx(config: ButtonControlHeightConfig, size: IconButtonSize): number;
72
+ /** Pixel control height for IconButton when match-button-height is enabled for that size. */
73
+ declare function getIconButtonControlHeightPx(config: ButtonControlHeightConfig, size: IconButtonSize): number;
74
+ declare function syncButtonControlHeightVarForSize<T extends object>(config: T, size: ButtonSize): T;
75
+ declare function syncIconButtonControlHeightVarForSize<T extends object>(config: T, size: IconButtonSize): T;
76
+ declare function syncIconButtonOnlyControlHeightVarForSize<T extends object>(config: T, size: IconButtonSize): T; //#endregion
77
+ //#endregion
78
+ export { getButtonControlHeightPx, getIconButtonControlHeightPx, getIconButtonOnlyControlHeightPx, syncButtonControlHeightVarForSize, syncIconButtonControlHeightVarForSize, syncIconButtonOnlyControlHeightVarForSize };
@@ -0,0 +1,108 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ import { spacingMap } from "../../../fixtures/dist/index.js";
3
+ import { isIconButtonMatchButtonHeightEnabled } from "./iconButtonMatchButtonHeight.js";
4
+ import { get } from "lodash-es";
5
+ import { ICON_SIZE_MAP } from "@yahoo/uds-icons/tokens";
6
+ //#region ../automated-config/dist/utils/getButtonControlHeightPx.js
7
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
8
+ const SHARED_BUTTON_ICONBUTTON_SIZES = new Set([
9
+ "xs",
10
+ "sm",
11
+ "md",
12
+ "lg"
13
+ ]);
14
+ function resolveSpacingPx(config, alias) {
15
+ if (!alias) return 0;
16
+ const scaleValue = get(config, [
17
+ "scaleMode",
18
+ "large",
19
+ "spacing",
20
+ alias.replace(".", "_")
21
+ ]);
22
+ if (typeof scaleValue === "number") return scaleValue;
23
+ return spacingMap[alias] ?? 0;
24
+ }
25
+ function resolveTypographyPx(config, textVariant, property) {
26
+ if (!textVariant) return 0;
27
+ const typographyConfig = config.typography[textVariant];
28
+ if (!typographyConfig?.[property]) return 0;
29
+ const defaultBreakpoint = config.globalDefaults.breakpoint;
30
+ const value = defaultBreakpoint === "base" ? typographyConfig[property].base : typographyConfig[property].breakpoints[defaultBreakpoint];
31
+ if (typeof value === "number") return value;
32
+ if (value && typeof value === "object" && "value" in value) return value.value;
33
+ return 0;
34
+ }
35
+ /** Ceil fractional totals so Figma-bound controlHeight matches auto-layout hug (e.g. xs + ui3 15.4lh → 28). */
36
+ function snapControlHeightPx(value) {
37
+ return Math.ceil(value);
38
+ }
39
+ /** Pixel control height for Button: padding + max(icon size, text line-height). */
40
+ function getButtonControlHeightPx(config, size) {
41
+ const button = config.button;
42
+ if (!button?.variables) return 0;
43
+ const layerPrefix = `size/${size}`;
44
+ const paddingAlias = button.variables[`${layerPrefix}/root`]?.spacingVertical?.rest?.value;
45
+ const iconSizeAlias = button.variables[`${layerPrefix}/icon`]?.size?.rest?.value;
46
+ const textVariant = button.variables[`${layerPrefix}/root`]?.textVariant?.rest?.value;
47
+ const padding = resolveSpacingPx(config, paddingAlias);
48
+ const iconSize = ICON_SIZE_MAP[iconSizeAlias ?? "sm"] ?? 16;
49
+ const lineHeight = resolveTypographyPx(config, textVariant, "lineHeight");
50
+ return snapControlHeightPx(padding * 2 + Math.max(iconSize, lineHeight || iconSize));
51
+ }
52
+ /** Pixel control height for IconButton: uniform padding plus icon size only. */
53
+ function getIconButtonOnlyControlHeightPx(config, size) {
54
+ const iconButton = config.iconButton;
55
+ if (!iconButton?.variables) return 0;
56
+ const layerPrefix = `size/${size}`;
57
+ const paddingAlias = iconButton.variables[`${layerPrefix}/root`]?.spacing?.rest?.value;
58
+ const iconSizeAlias = iconButton.variables[`${layerPrefix}/icon`]?.size?.rest?.value;
59
+ const padding = resolveSpacingPx(config, paddingAlias);
60
+ const iconSize = ICON_SIZE_MAP[iconSizeAlias ?? "sm"] ?? 16;
61
+ return snapControlHeightPx(padding * 2 + iconSize);
62
+ }
63
+ /** Pixel control height for IconButton when match-button-height is enabled for that size. */
64
+ function getIconButtonControlHeightPx(config, size) {
65
+ if (SHARED_BUTTON_ICONBUTTON_SIZES.has(size)) {
66
+ if (!isIconButtonMatchButtonHeightEnabled(config, size)) return 0;
67
+ return getButtonControlHeightPx(config, size);
68
+ }
69
+ return 0;
70
+ }
71
+ function setControlHeightVar(config, componentKey, size, heightPx) {
72
+ const rootKey = `size/${size}/root`;
73
+ const componentConfig = config[componentKey];
74
+ const existingRoot = componentConfig?.variables?.[rootKey] ?? {};
75
+ return {
76
+ ...config,
77
+ [componentKey]: {
78
+ ...componentConfig,
79
+ variables: {
80
+ ...componentConfig?.variables,
81
+ [rootKey]: {
82
+ ...existingRoot,
83
+ controlHeight: { rest: {
84
+ type: "positiveIntegers",
85
+ value: snapControlHeightPx(heightPx),
86
+ valueType: "alias"
87
+ } }
88
+ }
89
+ }
90
+ }
91
+ };
92
+ }
93
+ function syncButtonControlHeightVarForSize(config, size) {
94
+ if (!SHARED_BUTTON_ICONBUTTON_SIZES.has(size) || !isIconButtonMatchButtonHeightEnabled(config, size)) return config;
95
+ return setControlHeightVar(config, "iconButton", size, getButtonControlHeightPx(config, size));
96
+ }
97
+ function syncIconButtonControlHeightVarForSize(config, size) {
98
+ const heightPx = getIconButtonControlHeightPx(config, size);
99
+ if (heightPx <= 0) return config;
100
+ return setControlHeightVar(config, "iconButton", size, heightPx);
101
+ }
102
+ function syncIconButtonOnlyControlHeightVarForSize(config, size) {
103
+ const heightPx = getIconButtonOnlyControlHeightPx(config, size);
104
+ if (heightPx <= 0) return config;
105
+ return setControlHeightVar(config, "iconButton", size, heightPx);
106
+ }
107
+ //#endregion
108
+ export { getButtonControlHeightPx, getIconButtonControlHeightPx, getIconButtonOnlyControlHeightPx, syncButtonControlHeightVarForSize, syncIconButtonControlHeightVarForSize, syncIconButtonOnlyControlHeightVarForSize };
@@ -11,8 +11,8 @@ import { VariantConfig } from "../types/ComponentConfig.cjs";
11
11
  * @returns A Record of layer names to their properties, or null if no properties are found
12
12
  */
13
13
  declare function getConfigVariantProperties(variant?: VariantConfig): {
14
- [x: string]: Readonly<Record<string, SelectedConfigurableProperty<"backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "color" | "opacity" | "fillOpacity" | "fontWeight" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
15
- root: Readonly<Record<string, SelectedConfigurableProperty<"backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "color" | "opacity" | "fillOpacity" | "fontWeight" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
14
+ [x: string]: Readonly<Record<string, SelectedConfigurableProperty<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
15
+ root: Readonly<Record<string, SelectedConfigurableProperty<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
16
16
  } | null; //#endregion
17
17
  //#endregion
18
18
  export { getConfigVariantProperties };
@@ -11,8 +11,8 @@ import { VariantConfig } from "../types/ComponentConfig.js";
11
11
  * @returns A Record of layer names to their properties, or null if no properties are found
12
12
  */
13
13
  declare function getConfigVariantProperties(variant?: VariantConfig): {
14
- [x: string]: Readonly<Record<string, SelectedConfigurableProperty<"backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "color" | "opacity" | "fillOpacity" | "fontWeight" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
15
- root: Readonly<Record<string, SelectedConfigurableProperty<"backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "color" | "opacity" | "fillOpacity" | "fontWeight" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
14
+ [x: string]: Readonly<Record<string, SelectedConfigurableProperty<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
15
+ root: Readonly<Record<string, SelectedConfigurableProperty<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
16
16
  } | null; //#endregion
17
17
  //#endregion
18
18
  export { getConfigVariantProperties };
@@ -15,10 +15,13 @@ const require_getConfigComponentVariant = require("./getConfigComponentVariant.c
15
15
  function getConfigVariantPseudoStates(config, variantKey, state, subComponentName, componentStateValue) {
16
16
  const componentVariant = require_getConfigComponentVariant.getConfigComponentVariant(config, variantKey, subComponentName);
17
17
  if (!componentVariant) return null;
18
- const excludedPseudoStates = state && componentStateValue && require_variantConfigGuards.isVariantConfigWithComponentStates(componentVariant) ? require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentVariant.componentStates[state], componentStateValue) : [];
18
+ const componentStateConfig = state && require_variantConfigGuards.isVariantConfigWithComponentStates(componentVariant) ? componentVariant.componentStates[state] : void 0;
19
+ const excludedPseudoStates = componentStateConfig && componentStateValue ? require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentStateConfig, componentStateValue) : [];
20
+ const excludedLayers = componentStateConfig && componentStateValue ? require_componentStatePseudoStates.getExcludedLayersForComponentStateOption(componentStateConfig, componentStateValue) : [];
19
21
  const variantLayers = require_variantConfigGuards.isVariantConfigWithProperties(componentVariant) ? Object.entries(componentVariant?.layers ?? {}) : [];
20
22
  const stateLayers = require_variantConfigGuards.isVariantConfigWithComponentStates(componentVariant) && state ? Object.entries(componentVariant.componentStates[state].layers ?? {}) : [];
21
- return [...variantLayers, ...stateLayers].flatMap(([layerKey, layer]) => Object.entries(layer.properties).map(([propertyKey, property]) => [
23
+ const excludedLayerSet = new Set(excludedLayers);
24
+ return [...variantLayers, ...stateLayers].filter(([layerKey]) => !excludedLayerSet.has(layerKey)).flatMap(([layerKey, layer]) => Object.entries(layer.properties).map(([propertyKey, property]) => [
22
25
  layerKey,
23
26
  layer,
24
27
  propertyKey,
@@ -1,5 +1,5 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- import { filterPseudoStatesByExclusion, getExcludedPseudoStatesForComponentStateOption } from "./componentStatePseudoStates.js";
2
+ import { filterPseudoStatesByExclusion, getExcludedLayersForComponentStateOption, getExcludedPseudoStatesForComponentStateOption } from "./componentStatePseudoStates.js";
3
3
  import { resolvePropertyStates } from "./resolvePropertyStates.js";
4
4
  import { isVariantConfigWithComponentStates, isVariantConfigWithProperties } from "./variantConfigGuards.js";
5
5
  import { getConfigComponentVariant } from "./getConfigComponentVariant.js";
@@ -15,10 +15,13 @@ import { getConfigComponentVariant } from "./getConfigComponentVariant.js";
15
15
  function getConfigVariantPseudoStates(config, variantKey, state, subComponentName, componentStateValue) {
16
16
  const componentVariant = getConfigComponentVariant(config, variantKey, subComponentName);
17
17
  if (!componentVariant) return null;
18
- const excludedPseudoStates = state && componentStateValue && isVariantConfigWithComponentStates(componentVariant) ? getExcludedPseudoStatesForComponentStateOption(componentVariant.componentStates[state], componentStateValue) : [];
18
+ const componentStateConfig = state && isVariantConfigWithComponentStates(componentVariant) ? componentVariant.componentStates[state] : void 0;
19
+ const excludedPseudoStates = componentStateConfig && componentStateValue ? getExcludedPseudoStatesForComponentStateOption(componentStateConfig, componentStateValue) : [];
20
+ const excludedLayers = componentStateConfig && componentStateValue ? getExcludedLayersForComponentStateOption(componentStateConfig, componentStateValue) : [];
19
21
  const variantLayers = isVariantConfigWithProperties(componentVariant) ? Object.entries(componentVariant?.layers ?? {}) : [];
20
22
  const stateLayers = isVariantConfigWithComponentStates(componentVariant) && state ? Object.entries(componentVariant.componentStates[state].layers ?? {}) : [];
21
- return [...variantLayers, ...stateLayers].flatMap(([layerKey, layer]) => Object.entries(layer.properties).map(([propertyKey, property]) => [
23
+ const excludedLayerSet = new Set(excludedLayers);
24
+ return [...variantLayers, ...stateLayers].filter(([layerKey]) => !excludedLayerSet.has(layerKey)).flatMap(([layerKey, layer]) => Object.entries(layer.properties).map(([propertyKey, property]) => [
22
25
  layerKey,
23
26
  layer,
24
27
  propertyKey,