@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
@@ -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 };
@@ -0,0 +1,110 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ const require_getButtonControlHeight = require("./getButtonControlHeight.cjs");
3
+ const require_getButtonControlHeightPx = require("./getButtonControlHeightPx.cjs");
4
+ //#region ../automated-config/dist/utils/iconButtonMatchButtonHeight.js
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 getIconButtonVariables(config) {
13
+ return config.iconButton?.variables ?? config.variables;
14
+ }
15
+ function isMatchButtonHeightSize(size) {
16
+ return require_getButtonControlHeight.SHARED_BUTTON_ICONBUTTON_SIZES.has(size);
17
+ }
18
+ function isIconButtonMatchButtonHeightEnabled(config, size) {
19
+ if (!isMatchButtonHeightSize(size)) return false;
20
+ return getMatchButtonHeightMap(asMatchButtonHeightConfig(config))?.[size] === true;
21
+ }
22
+ function getIconButtonSpacingRestValue(config, size) {
23
+ const rootKey = `size/${size}/root`;
24
+ const value = (getIconButtonVariables(config)?.[rootKey]?.spacing)?.rest?.value;
25
+ return typeof value === "string" ? value : void 0;
26
+ }
27
+ function setIconButtonSpacingRestValue(config, size, spacing) {
28
+ const matchConfig = asMatchButtonHeightConfig(config);
29
+ const rootKey = `size/${size}/root`;
30
+ const iconButton = matchConfig.iconButton ?? { variables: {} };
31
+ const existingRoot = iconButton.variables?.[rootKey] ?? {};
32
+ return {
33
+ ...config,
34
+ iconButton: {
35
+ ...iconButton,
36
+ variables: {
37
+ ...iconButton.variables,
38
+ [rootKey]: {
39
+ ...existingRoot,
40
+ spacing: { rest: {
41
+ type: "spacingAliases",
42
+ value: spacing,
43
+ valueType: "alias"
44
+ } }
45
+ }
46
+ }
47
+ }
48
+ };
49
+ }
50
+ function removeIconButtonControlHeight(config, size) {
51
+ const matchConfig = asMatchButtonHeightConfig(config);
52
+ const rootKey = `size/${size}/root`;
53
+ const iconButton = matchConfig.iconButton;
54
+ const rootLayer = iconButton?.variables?.[rootKey];
55
+ if (!rootLayer?.controlHeight) return config;
56
+ const { controlHeight: _, ...restRoot } = rootLayer;
57
+ return {
58
+ ...config,
59
+ iconButton: {
60
+ ...iconButton,
61
+ variables: {
62
+ ...iconButton?.variables,
63
+ [rootKey]: restRoot
64
+ }
65
+ }
66
+ };
67
+ }
68
+ function enableIconButtonMatchButtonHeight(config, size) {
69
+ const matchConfig = asMatchButtonHeightConfig(config);
70
+ const currentSpacing = getIconButtonSpacingRestValue(matchConfig, size);
71
+ const iconButton = {
72
+ ...matchConfig.iconButton,
73
+ matchButtonHeight: {
74
+ ...matchConfig.iconButton?.matchButtonHeight,
75
+ [size]: true
76
+ }
77
+ };
78
+ if (currentSpacing !== void 0) iconButton.spacingBeforeMatchButtonHeight = {
79
+ ...matchConfig.iconButton?.spacingBeforeMatchButtonHeight,
80
+ [size]: currentSpacing
81
+ };
82
+ let nextConfig = {
83
+ ...config,
84
+ iconButton
85
+ };
86
+ nextConfig = require_getButtonControlHeightPx.syncButtonControlHeightVarForSize(nextConfig, size);
87
+ return nextConfig;
88
+ }
89
+ function disableIconButtonMatchButtonHeight(config, size) {
90
+ const spacingSnapshot = asMatchButtonHeightConfig(config).iconButton?.spacingBeforeMatchButtonHeight?.[size];
91
+ let nextConfig = removeIconButtonControlHeight(config, size);
92
+ if (spacingSnapshot !== void 0) nextConfig = setIconButtonSpacingRestValue(nextConfig, size, spacingSnapshot);
93
+ nextConfig = require_getButtonControlHeightPx.syncIconButtonOnlyControlHeightVarForSize(nextConfig, size);
94
+ const nextMatchConfig = asMatchButtonHeightConfig(nextConfig);
95
+ const { [size]: _removedFlag, ...remainingMatchButtonHeight } = nextMatchConfig.iconButton?.matchButtonHeight ?? {};
96
+ const { [size]: _removedSnapshot, ...remainingSpacingSnapshot } = nextMatchConfig.iconButton?.spacingBeforeMatchButtonHeight ?? {};
97
+ const iconButton = { ...nextMatchConfig.iconButton };
98
+ if (Object.keys(remainingMatchButtonHeight).length > 0) iconButton.matchButtonHeight = remainingMatchButtonHeight;
99
+ else delete iconButton.matchButtonHeight;
100
+ if (Object.keys(remainingSpacingSnapshot).length > 0) iconButton.spacingBeforeMatchButtonHeight = remainingSpacingSnapshot;
101
+ else delete iconButton.spacingBeforeMatchButtonHeight;
102
+ return {
103
+ ...nextConfig,
104
+ iconButton
105
+ };
106
+ }
107
+ //#endregion
108
+ exports.disableIconButtonMatchButtonHeight = disableIconButtonMatchButtonHeight;
109
+ exports.enableIconButtonMatchButtonHeight = enableIconButtonMatchButtonHeight;
110
+ exports.isIconButtonMatchButtonHeightEnabled = isIconButtonMatchButtonHeightEnabled;
@@ -0,0 +1,19 @@
1
+
2
+ import { ButtonSize } from "../../../types/dist/index.cjs";
3
+
4
+ //#region ../automated-config/dist/utils/iconButtonMatchButtonHeight.d.ts
5
+ //#region src/utils/iconButtonMatchButtonHeight.d.ts
6
+ type IconButtonMatchButtonHeightSize = ButtonSize;
7
+ type IconButtonMatchButtonHeightConfig = {
8
+ iconButton?: {
9
+ matchButtonHeight?: Partial<Record<IconButtonMatchButtonHeightSize, true>>;
10
+ spacingBeforeMatchButtonHeight?: Partial<Record<IconButtonMatchButtonHeightSize, string>>;
11
+ variables?: Record<string, Record<string, unknown>>;
12
+ };
13
+ matchButtonHeight?: Partial<Record<IconButtonMatchButtonHeightSize, true>>;
14
+ };
15
+ declare function isIconButtonMatchButtonHeightEnabled(config: object, size: string): boolean;
16
+ declare function enableIconButtonMatchButtonHeight<T extends object>(config: T, size: IconButtonMatchButtonHeightSize): T;
17
+ declare function disableIconButtonMatchButtonHeight<T extends object>(config: T, size: IconButtonMatchButtonHeightSize): T; //#endregion
18
+ //#endregion
19
+ export { IconButtonMatchButtonHeightConfig, IconButtonMatchButtonHeightSize, disableIconButtonMatchButtonHeight, enableIconButtonMatchButtonHeight, isIconButtonMatchButtonHeightEnabled };
@@ -0,0 +1,19 @@
1
+
2
+ import { ButtonSize } from "../../../types/dist/index.js";
3
+
4
+ //#region ../automated-config/dist/utils/iconButtonMatchButtonHeight.d.ts
5
+ //#region src/utils/iconButtonMatchButtonHeight.d.ts
6
+ type IconButtonMatchButtonHeightSize = ButtonSize;
7
+ type IconButtonMatchButtonHeightConfig = {
8
+ iconButton?: {
9
+ matchButtonHeight?: Partial<Record<IconButtonMatchButtonHeightSize, true>>;
10
+ spacingBeforeMatchButtonHeight?: Partial<Record<IconButtonMatchButtonHeightSize, string>>;
11
+ variables?: Record<string, Record<string, unknown>>;
12
+ };
13
+ matchButtonHeight?: Partial<Record<IconButtonMatchButtonHeightSize, true>>;
14
+ };
15
+ declare function isIconButtonMatchButtonHeightEnabled(config: object, size: string): boolean;
16
+ declare function enableIconButtonMatchButtonHeight<T extends object>(config: T, size: IconButtonMatchButtonHeightSize): T;
17
+ declare function disableIconButtonMatchButtonHeight<T extends object>(config: T, size: IconButtonMatchButtonHeightSize): T; //#endregion
18
+ //#endregion
19
+ export { IconButtonMatchButtonHeightConfig, IconButtonMatchButtonHeightSize, disableIconButtonMatchButtonHeight, enableIconButtonMatchButtonHeight, isIconButtonMatchButtonHeightEnabled };
@@ -0,0 +1,108 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ import { SHARED_BUTTON_ICONBUTTON_SIZES } from "./getButtonControlHeight.js";
3
+ import { syncButtonControlHeightVarForSize, syncIconButtonOnlyControlHeightVarForSize } from "./getButtonControlHeightPx.js";
4
+ //#region ../automated-config/dist/utils/iconButtonMatchButtonHeight.js
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 getIconButtonVariables(config) {
13
+ return config.iconButton?.variables ?? config.variables;
14
+ }
15
+ function isMatchButtonHeightSize(size) {
16
+ return SHARED_BUTTON_ICONBUTTON_SIZES.has(size);
17
+ }
18
+ function isIconButtonMatchButtonHeightEnabled(config, size) {
19
+ if (!isMatchButtonHeightSize(size)) return false;
20
+ return getMatchButtonHeightMap(asMatchButtonHeightConfig(config))?.[size] === true;
21
+ }
22
+ function getIconButtonSpacingRestValue(config, size) {
23
+ const rootKey = `size/${size}/root`;
24
+ const value = (getIconButtonVariables(config)?.[rootKey]?.spacing)?.rest?.value;
25
+ return typeof value === "string" ? value : void 0;
26
+ }
27
+ function setIconButtonSpacingRestValue(config, size, spacing) {
28
+ const matchConfig = asMatchButtonHeightConfig(config);
29
+ const rootKey = `size/${size}/root`;
30
+ const iconButton = matchConfig.iconButton ?? { variables: {} };
31
+ const existingRoot = iconButton.variables?.[rootKey] ?? {};
32
+ return {
33
+ ...config,
34
+ iconButton: {
35
+ ...iconButton,
36
+ variables: {
37
+ ...iconButton.variables,
38
+ [rootKey]: {
39
+ ...existingRoot,
40
+ spacing: { rest: {
41
+ type: "spacingAliases",
42
+ value: spacing,
43
+ valueType: "alias"
44
+ } }
45
+ }
46
+ }
47
+ }
48
+ };
49
+ }
50
+ function removeIconButtonControlHeight(config, size) {
51
+ const matchConfig = asMatchButtonHeightConfig(config);
52
+ const rootKey = `size/${size}/root`;
53
+ const iconButton = matchConfig.iconButton;
54
+ const rootLayer = iconButton?.variables?.[rootKey];
55
+ if (!rootLayer?.controlHeight) return config;
56
+ const { controlHeight: _, ...restRoot } = rootLayer;
57
+ return {
58
+ ...config,
59
+ iconButton: {
60
+ ...iconButton,
61
+ variables: {
62
+ ...iconButton?.variables,
63
+ [rootKey]: restRoot
64
+ }
65
+ }
66
+ };
67
+ }
68
+ function enableIconButtonMatchButtonHeight(config, size) {
69
+ const matchConfig = asMatchButtonHeightConfig(config);
70
+ const currentSpacing = getIconButtonSpacingRestValue(matchConfig, size);
71
+ const iconButton = {
72
+ ...matchConfig.iconButton,
73
+ matchButtonHeight: {
74
+ ...matchConfig.iconButton?.matchButtonHeight,
75
+ [size]: true
76
+ }
77
+ };
78
+ if (currentSpacing !== void 0) iconButton.spacingBeforeMatchButtonHeight = {
79
+ ...matchConfig.iconButton?.spacingBeforeMatchButtonHeight,
80
+ [size]: currentSpacing
81
+ };
82
+ let nextConfig = {
83
+ ...config,
84
+ iconButton
85
+ };
86
+ nextConfig = syncButtonControlHeightVarForSize(nextConfig, size);
87
+ return nextConfig;
88
+ }
89
+ function disableIconButtonMatchButtonHeight(config, size) {
90
+ const spacingSnapshot = asMatchButtonHeightConfig(config).iconButton?.spacingBeforeMatchButtonHeight?.[size];
91
+ let nextConfig = removeIconButtonControlHeight(config, size);
92
+ if (spacingSnapshot !== void 0) nextConfig = setIconButtonSpacingRestValue(nextConfig, size, spacingSnapshot);
93
+ nextConfig = syncIconButtonOnlyControlHeightVarForSize(nextConfig, size);
94
+ const nextMatchConfig = asMatchButtonHeightConfig(nextConfig);
95
+ const { [size]: _removedFlag, ...remainingMatchButtonHeight } = nextMatchConfig.iconButton?.matchButtonHeight ?? {};
96
+ const { [size]: _removedSnapshot, ...remainingSpacingSnapshot } = nextMatchConfig.iconButton?.spacingBeforeMatchButtonHeight ?? {};
97
+ const iconButton = { ...nextMatchConfig.iconButton };
98
+ if (Object.keys(remainingMatchButtonHeight).length > 0) iconButton.matchButtonHeight = remainingMatchButtonHeight;
99
+ else delete iconButton.matchButtonHeight;
100
+ if (Object.keys(remainingSpacingSnapshot).length > 0) iconButton.spacingBeforeMatchButtonHeight = remainingSpacingSnapshot;
101
+ else delete iconButton.spacingBeforeMatchButtonHeight;
102
+ return {
103
+ ...nextConfig,
104
+ iconButton
105
+ };
106
+ }
107
+ //#endregion
108
+ export { disableIconButtonMatchButtonHeight, enableIconButtonMatchButtonHeight, isIconButtonMatchButtonHeightEnabled };