@yahoo/uds 3.157.0 → 3.157.1

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 (96) hide show
  1. package/dist/automated-config/dist/generated/generatedConfigs.cjs +67 -51
  2. package/dist/automated-config/dist/generated/generatedConfigs.d.cts +15 -1
  3. package/dist/automated-config/dist/generated/generatedConfigs.d.ts +15 -1
  4. package/dist/automated-config/dist/generated/generatedConfigs.js +67 -51
  5. package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +1 -1
  6. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +4 -1
  7. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +4 -1
  8. package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +1 -1
  9. package/dist/automated-config/dist/properties.cjs +8 -1
  10. package/dist/automated-config/dist/properties.d.cts +8 -0
  11. package/dist/automated-config/dist/properties.d.ts +8 -0
  12. package/dist/automated-config/dist/properties.js +8 -1
  13. package/dist/automated-config/dist/utils/buildConfigSchema.cjs +7 -0
  14. package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +10 -3
  15. package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +10 -3
  16. package/dist/automated-config/dist/utils/buildConfigSchema.js +7 -0
  17. package/dist/automated-config/dist/utils/getButtonControlHeight.cjs +129 -0
  18. package/dist/automated-config/dist/utils/getButtonControlHeight.d.cts +133 -0
  19. package/dist/automated-config/dist/utils/getButtonControlHeight.d.ts +133 -0
  20. package/dist/automated-config/dist/utils/getButtonControlHeight.js +122 -0
  21. package/dist/automated-config/dist/utils/getButtonControlHeightPx.cjs +114 -0
  22. package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.cts +78 -0
  23. package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.ts +78 -0
  24. package/dist/automated-config/dist/utils/getButtonControlHeightPx.js +108 -0
  25. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
  26. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
  27. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +110 -0
  28. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.cts +19 -0
  29. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.ts +19 -0
  30. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.js +108 -0
  31. package/dist/automated-config/dist/utils/index.cjs +85 -28
  32. package/dist/automated-config/dist/utils/index.d.cts +15 -4
  33. package/dist/automated-config/dist/utils/index.d.ts +15 -4
  34. package/dist/automated-config/dist/utils/index.js +85 -28
  35. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.cjs +15 -0
  36. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.cts +20 -0
  37. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.ts +20 -0
  38. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.js +15 -0
  39. package/dist/components/client/Button.cjs +3 -3
  40. package/dist/components/client/Button.js +3 -3
  41. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  42. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  43. package/dist/config/dist/index.cjs +5 -5
  44. package/dist/config/dist/index.js +5 -5
  45. package/dist/css/dist/packages/automated-config/dist/properties.cjs +8 -1
  46. package/dist/css/dist/packages/automated-config/dist/properties.js +8 -1
  47. package/dist/css/dist/packages/config/dist/index.cjs +5 -5
  48. package/dist/css/dist/packages/config/dist/index.js +5 -5
  49. package/dist/css-tokens/dist/index.cjs +2 -0
  50. package/dist/css-tokens/dist/index.d.cts +2 -1
  51. package/dist/css-tokens/dist/index.d.ts +2 -1
  52. package/dist/css-tokens/dist/index.js +2 -1
  53. package/dist/index.cjs +23 -0
  54. package/dist/index.d.cts +6 -2
  55. package/dist/index.d.ts +6 -2
  56. package/dist/index.js +6 -2
  57. package/dist/styles/styler.d.cts +12 -12
  58. package/dist/styles/styler.d.ts +12 -12
  59. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +67 -51
  60. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +67 -51
  61. package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.cjs +8 -1
  62. package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.js +8 -1
  63. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.cjs +126 -0
  64. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.js +123 -0
  65. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +20 -0
  66. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.js +20 -0
  67. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +82 -28
  68. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +82 -28
  69. package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +5 -5
  70. package/dist/tailwind-internal/dist/packages/config/dist/index.js +5 -5
  71. package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.cjs +2 -0
  72. package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.js +2 -1
  73. package/dist/tailwind-internal/dist/plugins/components.cjs +1 -1
  74. package/dist/tailwind-internal/dist/plugins/components.js +1 -1
  75. package/dist/tokens/automation/index.cjs +22 -0
  76. package/dist/tokens/automation/index.d.cts +5 -1
  77. package/dist/tokens/automation/index.d.ts +5 -1
  78. package/dist/tokens/automation/index.js +5 -1
  79. package/dist/tokens/consts/cssTokens.cjs +1 -0
  80. package/dist/tokens/consts/cssTokens.d.cts +2 -2
  81. package/dist/tokens/consts/cssTokens.d.ts +2 -2
  82. package/dist/tokens/consts/cssTokens.js +2 -2
  83. package/dist/tokens/index.cjs +23 -0
  84. package/dist/tokens/index.d.cts +6 -2
  85. package/dist/tokens/index.d.ts +6 -2
  86. package/dist/tokens/index.js +6 -2
  87. package/dist/uds/generated/componentData.cjs +133 -130
  88. package/dist/uds/generated/componentData.js +133 -130
  89. package/dist/uds/generated/migrationSchemaVersion.cjs +1 -1
  90. package/dist/uds/generated/migrationSchemaVersion.js +1 -1
  91. package/dist/uds/generated/tailwindPurge.cjs +5 -5
  92. package/dist/uds/generated/tailwindPurge.js +5 -5
  93. package/generated/componentData.json +191 -188
  94. package/generated/migrationSchemaVersion.ts +1 -1
  95. package/generated/tailwindPurge.ts +1 -1
  96. package/package.json +1 -1
@@ -434,6 +434,12 @@ const paginationWidthVar = {
434
434
  possibleFixtures: ["positiveIntegers"],
435
435
  twThemePath: (_, value) => `${value}px`
436
436
  };
437
+ const controlHeight = {
438
+ name: "controlHeight",
439
+ cssProperties: [],
440
+ possibleFixtures: ["positiveIntegers"],
441
+ twThemePath: (_, value) => `${value}px`
442
+ };
437
443
  const publicProperties = {
438
444
  backgroundColor,
439
445
  borderWidth,
@@ -530,7 +536,8 @@ const publicProperties = {
530
536
  twThemePath: () => "",
531
537
  customValueRenderer: ({ value }) => `${String(value)}%`
532
538
  },
533
- paginationWidthVar
539
+ paginationWidthVar,
540
+ controlHeight
534
541
  };
535
542
  const internalProperties = {
536
543
  outlineWidth,
@@ -434,6 +434,12 @@ const paginationWidthVar = {
434
434
  possibleFixtures: ["positiveIntegers"],
435
435
  twThemePath: (_, value) => `${value}px`
436
436
  };
437
+ const controlHeight = {
438
+ name: "controlHeight",
439
+ cssProperties: [],
440
+ possibleFixtures: ["positiveIntegers"],
441
+ twThemePath: (_, value) => `${value}px`
442
+ };
437
443
  const publicProperties = {
438
444
  backgroundColor,
439
445
  borderWidth,
@@ -530,7 +536,8 @@ const publicProperties = {
530
536
  twThemePath: () => "",
531
537
  customValueRenderer: ({ value }) => `${String(value)}%`
532
538
  },
533
- paginationWidthVar
539
+ paginationWidthVar,
540
+ controlHeight
534
541
  };
535
542
  const internalProperties = {
536
543
  outlineWidth,
@@ -0,0 +1,126 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ const require_index = require("../../../css-tokens/dist/index.cjs");
3
+ const require_mapTextVariantFixtureToValue = require("../mapTextVariantFixtureToValue.cjs");
4
+ const require_properties = require("../properties.cjs");
5
+ const require_iconButtonMatchButtonHeight = require("./iconButtonMatchButtonHeight.cjs");
6
+ //#region ../tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.js
7
+ /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
8
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
9
+ /** Sizes where IconButton control height should match Button. */
10
+ const SHARED_BUTTON_ICONBUTTON_SIZES = new Set([
11
+ "xs",
12
+ "sm",
13
+ "md",
14
+ "lg"
15
+ ]);
16
+ function getButtonIconSizeVar({ schema, iconLayerKey, state, theme }) {
17
+ const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
18
+ if (typeof iconSizeValue === "string" && iconSizeValue) return theme(require_properties.configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue));
19
+ }
20
+ /**
21
+ * Button content box: max(icon size, text line-height).
22
+ * Matches Figma auto-layout and keeps IconButton height aligned with Button.
23
+ */
24
+ function getButtonControlContentSize({ schema, rootLayerKey, iconLayerKey, state, theme }) {
25
+ const iconSizeVar = getButtonIconSizeVar({
26
+ schema,
27
+ iconLayerKey,
28
+ state,
29
+ theme
30
+ });
31
+ const textVariantValue = schema.variables?.[rootLayerKey]?.textVariant?.[state]?.value;
32
+ if (iconSizeVar && typeof textVariantValue === "string" && textVariantValue) return `max(${iconSizeVar}, ${theme(require_mapTextVariantFixtureToValue.mapTextVariantFixtureToValue("lineHeight")("textVariants", textVariantValue))})`;
33
+ if (iconSizeVar) return iconSizeVar;
34
+ }
35
+ /** `round(up, …, 1px)` matches Math.ceil in getButtonControlHeightPx and Figma hug height. */
36
+ function formatControlHeightCalc(calcExpression) {
37
+ return `round(up, ${calcExpression}, 1px)`;
38
+ }
39
+ /**
40
+ * Button control height: vertical padding on both sides plus max(icon size, text line-height).
41
+ */
42
+ function getButtonControlHeight({ paddingVertical, schema, rootLayerKey, iconLayerKey, state, theme }) {
43
+ const contentSize = getButtonControlContentSize({
44
+ schema,
45
+ rootLayerKey,
46
+ iconLayerKey,
47
+ state,
48
+ theme
49
+ });
50
+ if (!contentSize) return;
51
+ return formatControlHeightCalc(`calc(2 * ${paddingVertical} + ${contentSize})`);
52
+ }
53
+ /**
54
+ * IconButton control height: uniform padding plus icon size only (no typography).
55
+ */
56
+ function getIconButtonControlHeight({ paddingVertical, schema, iconLayerKey, state, theme }) {
57
+ const iconSizeVar = getButtonIconSizeVar({
58
+ schema,
59
+ iconLayerKey,
60
+ state,
61
+ theme
62
+ });
63
+ if (!iconSizeVar) return;
64
+ return formatControlHeightCalc(`calc(2 * ${paddingVertical} + ${iconSizeVar})`);
65
+ }
66
+ /**
67
+ * Layout line-height for button root: max(icon size, text line-height).
68
+ */
69
+ function getButtonContentLineHeight({ schema, rootLayerKey, iconLayerKey, state, theme }) {
70
+ return getButtonControlContentSize({
71
+ schema,
72
+ rootLayerKey,
73
+ iconLayerKey,
74
+ state,
75
+ theme
76
+ }) ?? "1em";
77
+ }
78
+ function applyButtonControlHeightDeclarations({ cssDeclarations, paddingVertical, schema, rootLayerKey, iconLayerKey, state, theme }) {
79
+ const controlHeight = rootLayerKey ? getButtonControlHeight({
80
+ paddingVertical,
81
+ schema,
82
+ rootLayerKey,
83
+ iconLayerKey,
84
+ state,
85
+ theme
86
+ }) : getIconButtonControlHeight({
87
+ paddingVertical,
88
+ schema,
89
+ iconLayerKey,
90
+ state,
91
+ theme
92
+ });
93
+ if (controlHeight) {
94
+ cssDeclarations[require_index.BUTTON_CONTROL_HEIGHT_VAR] = controlHeight;
95
+ cssDeclarations.height = `var(${require_index.BUTTON_CONTROL_HEIGHT_VAR})`;
96
+ }
97
+ }
98
+ function applyIconButtonSquareDimensions(cssDeclarations) {
99
+ if (cssDeclarations[require_index.BUTTON_CONTROL_HEIGHT_VAR]) cssDeclarations.width = `var(${require_index.BUTTON_CONTROL_HEIGHT_VAR})`;
100
+ }
101
+ /**
102
+ * IconButton height for xs–lg mirrors Button (padding + max(icon, line-height)).
103
+ * xl uses icon-only height from IconButton tokens.
104
+ */
105
+ function applyIconButtonControlHeightDeclarations({ cssDeclarations, paddingVertical, iconButtonSchema, buttonHeightReferenceSchema, variantValue, iconLayerKey: _iconLayerKey, state, theme }) {
106
+ if (buttonHeightReferenceSchema && SHARED_BUTTON_ICONBUTTON_SIZES.has(variantValue) && require_iconButtonMatchButtonHeight.isIconButtonMatchButtonHeightEnabled(iconButtonSchema, variantValue)) {
107
+ const buttonRootLayerKey = `size/${variantValue}/root`;
108
+ const buttonIconLayerKey = `size/${variantValue}/icon`;
109
+ const buttonSpacingValue = buttonHeightReferenceSchema.variables?.[buttonRootLayerKey]?.spacingVertical?.[state]?.value;
110
+ applyButtonControlHeightDeclarations({
111
+ cssDeclarations,
112
+ paddingVertical: typeof buttonSpacingValue === "string" && buttonSpacingValue ? theme(require_properties.configurableProperties.spacingVertical.twThemePath("spacingAliases", buttonSpacingValue)) : paddingVertical,
113
+ schema: buttonHeightReferenceSchema,
114
+ rootLayerKey: buttonRootLayerKey,
115
+ iconLayerKey: buttonIconLayerKey,
116
+ state,
117
+ theme
118
+ });
119
+ applyIconButtonSquareDimensions(cssDeclarations);
120
+ }
121
+ }
122
+ //#endregion
123
+ exports.SHARED_BUTTON_ICONBUTTON_SIZES = SHARED_BUTTON_ICONBUTTON_SIZES;
124
+ exports.applyButtonControlHeightDeclarations = applyButtonControlHeightDeclarations;
125
+ exports.applyIconButtonControlHeightDeclarations = applyIconButtonControlHeightDeclarations;
126
+ exports.getButtonContentLineHeight = getButtonContentLineHeight;
@@ -0,0 +1,123 @@
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 ../tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.js
7
+ /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
8
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
9
+ /** Sizes where IconButton control height should match Button. */
10
+ const SHARED_BUTTON_ICONBUTTON_SIZES = new Set([
11
+ "xs",
12
+ "sm",
13
+ "md",
14
+ "lg"
15
+ ]);
16
+ function getButtonIconSizeVar({ schema, iconLayerKey, state, theme }) {
17
+ const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
18
+ if (typeof iconSizeValue === "string" && iconSizeValue) return theme(configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue));
19
+ }
20
+ /**
21
+ * Button content box: max(icon size, text line-height).
22
+ * Matches Figma auto-layout and keeps IconButton height aligned with Button.
23
+ */
24
+ function getButtonControlContentSize({ schema, rootLayerKey, iconLayerKey, state, theme }) {
25
+ const iconSizeVar = getButtonIconSizeVar({
26
+ schema,
27
+ iconLayerKey,
28
+ state,
29
+ theme
30
+ });
31
+ const textVariantValue = schema.variables?.[rootLayerKey]?.textVariant?.[state]?.value;
32
+ if (iconSizeVar && typeof textVariantValue === "string" && textVariantValue) return `max(${iconSizeVar}, ${theme(mapTextVariantFixtureToValue("lineHeight")("textVariants", textVariantValue))})`;
33
+ if (iconSizeVar) return iconSizeVar;
34
+ }
35
+ /** `round(up, …, 1px)` matches Math.ceil in getButtonControlHeightPx and Figma hug height. */
36
+ function formatControlHeightCalc(calcExpression) {
37
+ return `round(up, ${calcExpression}, 1px)`;
38
+ }
39
+ /**
40
+ * Button control height: vertical padding on both sides plus max(icon size, text line-height).
41
+ */
42
+ function getButtonControlHeight({ paddingVertical, schema, rootLayerKey, iconLayerKey, state, theme }) {
43
+ const contentSize = getButtonControlContentSize({
44
+ schema,
45
+ rootLayerKey,
46
+ iconLayerKey,
47
+ state,
48
+ theme
49
+ });
50
+ if (!contentSize) return;
51
+ return formatControlHeightCalc(`calc(2 * ${paddingVertical} + ${contentSize})`);
52
+ }
53
+ /**
54
+ * IconButton control height: uniform padding plus icon size only (no typography).
55
+ */
56
+ function getIconButtonControlHeight({ paddingVertical, schema, iconLayerKey, state, theme }) {
57
+ const iconSizeVar = getButtonIconSizeVar({
58
+ schema,
59
+ iconLayerKey,
60
+ state,
61
+ theme
62
+ });
63
+ if (!iconSizeVar) return;
64
+ return formatControlHeightCalc(`calc(2 * ${paddingVertical} + ${iconSizeVar})`);
65
+ }
66
+ /**
67
+ * Layout line-height for button root: max(icon size, text line-height).
68
+ */
69
+ function getButtonContentLineHeight({ schema, rootLayerKey, iconLayerKey, state, theme }) {
70
+ return getButtonControlContentSize({
71
+ schema,
72
+ rootLayerKey,
73
+ iconLayerKey,
74
+ state,
75
+ theme
76
+ }) ?? "1em";
77
+ }
78
+ function applyButtonControlHeightDeclarations({ cssDeclarations, paddingVertical, schema, rootLayerKey, iconLayerKey, state, theme }) {
79
+ const controlHeight = rootLayerKey ? getButtonControlHeight({
80
+ paddingVertical,
81
+ schema,
82
+ rootLayerKey,
83
+ iconLayerKey,
84
+ state,
85
+ theme
86
+ }) : getIconButtonControlHeight({
87
+ paddingVertical,
88
+ schema,
89
+ iconLayerKey,
90
+ state,
91
+ theme
92
+ });
93
+ if (controlHeight) {
94
+ cssDeclarations[BUTTON_CONTROL_HEIGHT_VAR] = controlHeight;
95
+ cssDeclarations.height = `var(${BUTTON_CONTROL_HEIGHT_VAR})`;
96
+ }
97
+ }
98
+ function applyIconButtonSquareDimensions(cssDeclarations) {
99
+ if (cssDeclarations[BUTTON_CONTROL_HEIGHT_VAR]) cssDeclarations.width = `var(${BUTTON_CONTROL_HEIGHT_VAR})`;
100
+ }
101
+ /**
102
+ * IconButton height for xs–lg mirrors Button (padding + max(icon, line-height)).
103
+ * xl uses icon-only height from IconButton tokens.
104
+ */
105
+ function applyIconButtonControlHeightDeclarations({ cssDeclarations, paddingVertical, iconButtonSchema, buttonHeightReferenceSchema, variantValue, iconLayerKey: _iconLayerKey, state, theme }) {
106
+ if (buttonHeightReferenceSchema && SHARED_BUTTON_ICONBUTTON_SIZES.has(variantValue) && isIconButtonMatchButtonHeightEnabled(iconButtonSchema, variantValue)) {
107
+ const buttonRootLayerKey = `size/${variantValue}/root`;
108
+ const buttonIconLayerKey = `size/${variantValue}/icon`;
109
+ const buttonSpacingValue = buttonHeightReferenceSchema.variables?.[buttonRootLayerKey]?.spacingVertical?.[state]?.value;
110
+ applyButtonControlHeightDeclarations({
111
+ cssDeclarations,
112
+ paddingVertical: typeof buttonSpacingValue === "string" && buttonSpacingValue ? theme(configurableProperties.spacingVertical.twThemePath("spacingAliases", buttonSpacingValue)) : paddingVertical,
113
+ schema: buttonHeightReferenceSchema,
114
+ rootLayerKey: buttonRootLayerKey,
115
+ iconLayerKey: buttonIconLayerKey,
116
+ state,
117
+ theme
118
+ });
119
+ applyIconButtonSquareDimensions(cssDeclarations);
120
+ }
121
+ }
122
+ //#endregion
123
+ export { SHARED_BUTTON_ICONBUTTON_SIZES, applyButtonControlHeightDeclarations, applyIconButtonControlHeightDeclarations, getButtonContentLineHeight };
@@ -0,0 +1,20 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ const require_getButtonControlHeight = require("./getButtonControlHeight.cjs");
3
+ //#region ../tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.js
4
+ /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
5
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
6
+ function asMatchButtonHeightConfig(config) {
7
+ return config;
8
+ }
9
+ function getMatchButtonHeightMap(config) {
10
+ return config.iconButton?.matchButtonHeight ?? config.matchButtonHeight;
11
+ }
12
+ function isMatchButtonHeightSize(size) {
13
+ return require_getButtonControlHeight.SHARED_BUTTON_ICONBUTTON_SIZES.has(size);
14
+ }
15
+ function isIconButtonMatchButtonHeightEnabled(config, size) {
16
+ if (!isMatchButtonHeightSize(size)) return false;
17
+ return getMatchButtonHeightMap(asMatchButtonHeightConfig(config))?.[size] === true;
18
+ }
19
+ //#endregion
20
+ exports.isIconButtonMatchButtonHeightEnabled = isIconButtonMatchButtonHeightEnabled;
@@ -0,0 +1,20 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ import { SHARED_BUTTON_ICONBUTTON_SIZES } from "./getButtonControlHeight.js";
3
+ //#region ../tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.js
4
+ /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
5
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
6
+ function asMatchButtonHeightConfig(config) {
7
+ return config;
8
+ }
9
+ function getMatchButtonHeightMap(config) {
10
+ return config.iconButton?.matchButtonHeight ?? config.matchButtonHeight;
11
+ }
12
+ function isMatchButtonHeightSize(size) {
13
+ return SHARED_BUTTON_ICONBUTTON_SIZES.has(size);
14
+ }
15
+ function isIconButtonMatchButtonHeightEnabled(config, size) {
16
+ if (!isMatchButtonHeightSize(size)) return false;
17
+ return getMatchButtonHeightMap(asMatchButtonHeightConfig(config))?.[size] === true;
18
+ }
19
+ //#endregion
20
+ export { isIconButtonMatchButtonHeightEnabled };
@@ -10,6 +10,7 @@ const require_resolvePropertyStates = require("./resolvePropertyStates.cjs");
10
10
  const require_variantConfigGuards = require("./variantConfigGuards.cjs");
11
11
  const require_buildConfigSchema = require("./buildConfigSchema.cjs");
12
12
  const require_generateDefaultClassName = require("./generateDefaultClassName.cjs");
13
+ const require_getButtonControlHeight = require("./getButtonControlHeight.cjs");
13
14
  const require_pseudoStateSelectors = require("./pseudoStateSelectors.cjs");
14
15
  const require_resolveSlotByCascade = require("./resolveSlotByCascade.cjs");
15
16
  let lodash_es = require("lodash-es");
@@ -116,15 +117,9 @@ function buildStateRecord(transform) {
116
117
  }
117
118
  buildStateRecord(require_pseudoStateSelectors.getStateDocsClass);
118
119
  /**
119
- * Generates button line-height with icon size minimum.
120
- * Ensures button line-height is at least as tall as the icon to prevent clipping.
121
- * @returns Enhanced line-height CSS value with max(), or original value if icon size unavailable
120
+ * Layout line-height for button root: icon size only (not textVariant line-height).
121
+ * @see getButtonContentLineHeight
122
122
  */
123
- function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey, state, theme }) {
124
- const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
125
- if (iconSizeValue) return `max(${lineHeight}, ${theme(require_properties.configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue))})`;
126
- return lineHeight;
127
- }
128
123
  /**
129
124
  * Shared pagination control content size: max(icon size, text line-height).
130
125
  * Keeps page numbers and prev/next icons vertically centered when typography exceeds icon height.
@@ -306,8 +301,16 @@ function selectiveEmittedStates(stateMap, orderedStateKeys, emittableStates) {
306
301
  }
307
302
  return emitted;
308
303
  }
309
- function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, declaredStates, layerUsesAtomicStates, theme, currentStyles, previewOptions, excludedPseudoStates = [], emit, fallbackStateMap, bumpRootSpecificity }) {
304
+ function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, declaredStates, layerUsesAtomicStates, theme, currentStyles, previewOptions, excludedPseudoStates = [], emit, fallbackStateMap, bumpRootSpecificity, buttonHeightReferenceSchema }) {
310
305
  const shouldUseExhaustive = (emit ?? "exhaustive") === "exhaustive" && layerUsesAtomicStates;
306
+ const { cssProperties: configuredCssProperties, extendedProperties: configuredExtendedGetter } = require_properties.configurableProperties[originalPropertyDefinition.name];
307
+ const configuredExtendedProperties = (0, lodash_es.isFunction)(configuredExtendedGetter) ? configuredExtendedGetter({
308
+ componentName,
309
+ subComponentName,
310
+ layer,
311
+ propertyKey
312
+ }) : configuredExtendedGetter;
313
+ if (!(typeof configuredCssProperties === "string" && configuredCssProperties.length > 0 || Array.isArray(configuredCssProperties) && configuredCssProperties.length > 0 || Array.isArray(configuredExtendedProperties) && configuredExtendedProperties.length > 0)) return {};
311
314
  const schemaKey = require_generateSchemaKey.generateSchemaKey({
312
315
  variantKey,
313
316
  variantValue,
@@ -442,6 +445,28 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
442
445
  */
443
446
  if (componentName === "button" && layer === "root") {
444
447
  if (propertyKey === CSS_GAP) cssDeclarations[require_index.BUTTON_GAP_VAR] = cssDeclarations[CSS_GAP];
448
+ if (propertyKey === "spacingVertical") {
449
+ const paddingVertical = cssDeclarations["padding-top"];
450
+ if (paddingVertical) require_getButtonControlHeight.applyButtonControlHeightDeclarations({
451
+ cssDeclarations,
452
+ paddingVertical,
453
+ schema,
454
+ rootLayerKey: require_generateSchemaKey.generateSchemaKey({
455
+ variantKey,
456
+ variantValue,
457
+ layer: "root",
458
+ subComponentName
459
+ }),
460
+ iconLayerKey: require_generateSchemaKey.generateSchemaKey({
461
+ variantKey,
462
+ variantValue,
463
+ layer: "icon",
464
+ subComponentName
465
+ }),
466
+ state: propertyState,
467
+ theme
468
+ });
469
+ }
445
470
  if (propertyKey === "scaleEffect" && propertyState === "hover") {
446
471
  const rootClassName = `.${className}`;
447
472
  const renderValue = (schemaValue) => require_properties.configurableProperties.scaleEffect.customValueRenderer?.(schemaValue, schema, () => "") ?? "1";
@@ -450,17 +475,39 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
450
475
  if (propertyStateMap.hover) styles[rootClassName][require_index.BUTTON_SCALE_EFFECT_HOVER] = renderValue(propertyStateMap.hover);
451
476
  if (propertyStateMap.pressed) styles[rootClassName][require_index.BUTTON_SCALE_EFFECT_PRESSED] = renderValue(propertyStateMap.pressed);
452
477
  }
453
- if (cssDeclarations[CSS_LINE_HEIGHT]) {
454
- const iconLayerKey = require_generateSchemaKey.generateSchemaKey({
478
+ if (cssDeclarations[CSS_LINE_HEIGHT]) cssDeclarations[CSS_LINE_HEIGHT] = require_getButtonControlHeight.getButtonContentLineHeight({
479
+ schema,
480
+ rootLayerKey: require_generateSchemaKey.generateSchemaKey({
481
+ variantKey,
482
+ variantValue,
483
+ layer: "root",
484
+ subComponentName
485
+ }),
486
+ iconLayerKey: require_generateSchemaKey.generateSchemaKey({
455
487
  variantKey,
456
488
  variantValue,
457
489
  layer: "icon",
458
490
  subComponentName
459
- });
460
- cssDeclarations[CSS_LINE_HEIGHT] = getButtonLineHeightWithIconMinimum({
461
- lineHeight: cssDeclarations[CSS_LINE_HEIGHT],
462
- schema,
463
- iconLayerKey,
491
+ }),
492
+ state: propertyState,
493
+ theme
494
+ });
495
+ }
496
+ if (componentName === "iconbutton" && layer === "root") {
497
+ if (propertyKey === "spacing") {
498
+ const paddingVertical = cssDeclarations[CSS_PADDING];
499
+ if (paddingVertical) require_getButtonControlHeight.applyIconButtonControlHeightDeclarations({
500
+ cssDeclarations,
501
+ paddingVertical,
502
+ iconButtonSchema: schema,
503
+ buttonHeightReferenceSchema,
504
+ variantValue,
505
+ iconLayerKey: require_generateSchemaKey.generateSchemaKey({
506
+ variantKey,
507
+ variantValue,
508
+ layer: "icon",
509
+ subComponentName
510
+ }),
464
511
  state: propertyState,
465
512
  theme
466
513
  });
@@ -639,7 +686,7 @@ function emitSchemaOverrideStyles({ componentName, subComponentName, variantKey,
639
686
  * layers express the variant's universal baseline, with per-state overrides
640
687
  * winning via class-compound specificity).
641
688
  */
642
- function emitUniversalLayers({ componentName, subComponentName, variantKey, variantOption, layers, schema, theme, previewOptions, emit, currentStyles, bumpRootSpecificity }) {
689
+ function emitUniversalLayers({ componentName, subComponentName, variantKey, variantOption, layers, schema, theme, previewOptions, emit, currentStyles, bumpRootSpecificity, buttonHeightReferenceSchema }) {
643
690
  let styles = currentStyles;
644
691
  const variables = schema.variables;
645
692
  for (const layerKey in layers) {
@@ -670,14 +717,15 @@ function emitUniversalLayers({ componentName, subComponentName, variantKey, vari
670
717
  currentStyles: styles,
671
718
  previewOptions,
672
719
  emit,
673
- bumpRootSpecificity
720
+ bumpRootSpecificity,
721
+ buttonHeightReferenceSchema
674
722
  });
675
723
  styles = deepMerge(styles, declarations);
676
724
  }
677
725
  }
678
726
  return styles;
679
727
  }
680
- function generateConfigStyles(config, schema, theme, previewOptions, emit) {
728
+ function generateConfigStyles(config, schema, theme, previewOptions, emit, generateStylesContext) {
681
729
  const componentName = config.label.toLowerCase();
682
730
  let styles = {};
683
731
  for (const variantKey in config.variants) {
@@ -693,7 +741,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
693
741
  previewOptions,
694
742
  emit,
695
743
  currentStyles: styles,
696
- bumpRootSpecificity: true
744
+ bumpRootSpecificity: true,
745
+ buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
697
746
  });
698
747
  const componentStates = variantConfig.componentStates;
699
748
  for (const componentStateKey in componentStates) {
@@ -721,7 +770,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
721
770
  currentStyles: styles,
722
771
  previewOptions,
723
772
  excludedPseudoStates,
724
- emit
773
+ emit,
774
+ buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
725
775
  });
726
776
  styles = deepMerge(styles, declarations);
727
777
  }
@@ -748,7 +798,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
748
798
  theme,
749
799
  previewOptions,
750
800
  emit,
751
- currentStyles: styles
801
+ currentStyles: styles,
802
+ buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
752
803
  });
753
804
  }
754
805
  if (config.subComponents) {
@@ -767,7 +818,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
767
818
  previewOptions,
768
819
  emit,
769
820
  currentStyles: styles,
770
- bumpRootSpecificity: true
821
+ bumpRootSpecificity: true,
822
+ buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
771
823
  });
772
824
  const componentStates = variantConfig.componentStates;
773
825
  for (const componentStateKey in componentStates) {
@@ -796,7 +848,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
796
848
  currentStyles: styles,
797
849
  previewOptions,
798
850
  excludedPseudoStates,
799
- emit
851
+ emit,
852
+ buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
800
853
  });
801
854
  styles = deepMerge(styles, declarations);
802
855
  }
@@ -825,7 +878,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
825
878
  theme,
826
879
  previewOptions,
827
880
  emit,
828
- currentStyles: styles
881
+ currentStyles: styles,
882
+ buttonHeightReferenceSchema: generateStylesContext?.buttonHeightReferenceSchema
829
883
  });
830
884
  }
831
885
  }
@@ -859,8 +913,8 @@ function generateConfigStyles(config, schema, theme, previewOptions, emit) {
859
913
  * @param previewOptions - Options for generating preview mode class modifiers
860
914
  * @returns CSS styles object with grouped selectors for default aliases
861
915
  */
862
- const generateStylesInner = (config, schema, theme, previewOptions) => {
863
- const styles = generateConfigStyles(config, schema, theme, previewOptions, previewOptions.emit ?? "exhaustive");
916
+ const generateStylesInner = (config, schema, theme, previewOptions, generateStylesContext) => {
917
+ const styles = generateConfigStyles(config, schema, theme, previewOptions, previewOptions.emit ?? "exhaustive", generateStylesContext);
864
918
  if (!config.variants && !config.subComponents) return styles;
865
919
  const componentName = config.label.toLowerCase();
866
920
  if (componentName !== "button" && componentName !== "iconbutton") return styles;
@@ -941,6 +995,6 @@ const generateStylesInner = (config, schema, theme, previewOptions) => {
941
995
  * list, so minifiers leave their specificity intact. (gzip already collapses the
942
996
  * repeated declaration blocks, so the shipped-size cost is minimal.)
943
997
  */
944
- const generateStyles = (config, schema, theme, previewOptions) => generateStylesInner(config, schema, theme, previewOptions);
998
+ const generateStyles = (config, schema, theme, previewOptions, generateStylesContext) => generateStylesInner(config, schema, theme, previewOptions, generateStylesContext);
945
999
  //#endregion
946
1000
  exports.generateStyles = generateStyles;