@yahoo/uds 3.152.1 → 3.153.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 (139) hide show
  1. package/dist/automated-config/dist/generated/autoVariants.cjs +25 -0
  2. package/dist/automated-config/dist/generated/autoVariants.d.cts +6 -0
  3. package/dist/automated-config/dist/generated/autoVariants.d.ts +6 -0
  4. package/dist/automated-config/dist/generated/autoVariants.js +25 -0
  5. package/dist/automated-config/dist/generated/generatedConfigs.cjs +1368 -0
  6. package/dist/automated-config/dist/generated/generatedConfigs.d.cts +169 -1
  7. package/dist/automated-config/dist/generated/generatedConfigs.d.ts +169 -1
  8. package/dist/automated-config/dist/generated/generatedConfigs.js +1368 -1
  9. package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +198 -0
  10. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +2 -1
  11. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +2 -1
  12. package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +198 -0
  13. package/dist/automated-config/dist/types/ComponentConfig.d.cts +2 -0
  14. package/dist/automated-config/dist/types/ComponentConfig.d.ts +2 -0
  15. package/dist/automated-config/dist/utils/buildConfigSchema.cjs +13 -20
  16. package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +14 -2
  17. package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +14 -2
  18. package/dist/automated-config/dist/utils/buildConfigSchema.js +13 -20
  19. package/dist/automated-config/dist/utils/componentStatePseudoStates.cjs +15 -0
  20. package/dist/automated-config/dist/utils/componentStatePseudoStates.js +14 -0
  21. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.cjs +4 -2
  22. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.d.cts +1 -1
  23. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.d.ts +1 -1
  24. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.js +4 -2
  25. package/dist/automated-config/dist/utils/index.cjs +114 -48
  26. package/dist/automated-config/dist/utils/index.d.cts +25 -2
  27. package/dist/automated-config/dist/utils/index.d.ts +25 -2
  28. package/dist/automated-config/dist/utils/index.js +114 -49
  29. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  30. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  31. package/dist/components/client/Pagination/Pagination.cjs +62 -0
  32. package/dist/components/client/Pagination/Pagination.d.cts +28 -0
  33. package/dist/components/client/Pagination/Pagination.d.ts +29 -0
  34. package/dist/components/client/Pagination/Pagination.js +60 -0
  35. package/dist/components/client/Pagination/PaginationEllipsis.cjs +24 -0
  36. package/dist/components/client/Pagination/PaginationEllipsis.d.cts +10 -0
  37. package/dist/components/client/Pagination/PaginationEllipsis.d.ts +11 -0
  38. package/dist/components/client/Pagination/PaginationEllipsis.js +22 -0
  39. package/dist/components/client/Pagination/PaginationItem.cjs +52 -0
  40. package/dist/components/client/Pagination/PaginationItem.d.cts +10 -0
  41. package/dist/components/client/Pagination/PaginationItem.d.ts +11 -0
  42. package/dist/components/client/Pagination/PaginationItem.js +50 -0
  43. package/dist/components/client/Pagination/PaginationLink.cjs +53 -0
  44. package/dist/components/client/Pagination/PaginationLink.d.cts +9 -0
  45. package/dist/components/client/Pagination/PaginationLink.d.ts +10 -0
  46. package/dist/components/client/Pagination/PaginationLink.js +51 -0
  47. package/dist/components/client/Pagination/PaginationNext.cjs +56 -0
  48. package/dist/components/client/Pagination/PaginationNext.d.cts +9 -0
  49. package/dist/components/client/Pagination/PaginationNext.d.ts +10 -0
  50. package/dist/components/client/Pagination/PaginationNext.js +54 -0
  51. package/dist/components/client/Pagination/PaginationNumbers.cjs +52 -0
  52. package/dist/components/client/Pagination/PaginationNumbers.d.cts +9 -0
  53. package/dist/components/client/Pagination/PaginationNumbers.d.ts +10 -0
  54. package/dist/components/client/Pagination/PaginationNumbers.js +50 -0
  55. package/dist/components/client/Pagination/PaginationPrev.cjs +56 -0
  56. package/dist/components/client/Pagination/PaginationPrev.d.cts +9 -0
  57. package/dist/components/client/Pagination/PaginationPrev.d.ts +10 -0
  58. package/dist/components/client/Pagination/PaginationPrev.js +54 -0
  59. package/dist/components/client/Pagination/computeVisiblePages.cjs +22 -0
  60. package/dist/components/client/Pagination/computeVisiblePages.d.cts +18 -0
  61. package/dist/components/client/Pagination/computeVisiblePages.d.ts +19 -0
  62. package/dist/components/client/Pagination/computeVisiblePages.js +21 -0
  63. package/dist/components/client/Pagination/ellipsisDefault.cjs +33 -0
  64. package/dist/components/client/Pagination/ellipsisDefault.d.cts +10 -0
  65. package/dist/components/client/Pagination/ellipsisDefault.d.ts +11 -0
  66. package/dist/components/client/Pagination/ellipsisDefault.js +32 -0
  67. package/dist/components/client/Pagination/ellipsisNone.cjs +29 -0
  68. package/dist/components/client/Pagination/ellipsisNone.d.cts +10 -0
  69. package/dist/components/client/Pagination/ellipsisNone.d.ts +11 -0
  70. package/dist/components/client/Pagination/ellipsisNone.js +28 -0
  71. package/dist/components/client/Pagination/index.cjs +19 -0
  72. package/dist/components/client/Pagination/index.d.cts +10 -0
  73. package/dist/components/client/Pagination/index.d.ts +11 -0
  74. package/dist/components/client/Pagination/index.js +11 -0
  75. package/dist/components/client/Pagination/paginationContext.cjs +44 -0
  76. package/dist/components/client/Pagination/paginationContext.d.cts +34 -0
  77. package/dist/components/client/Pagination/paginationContext.d.ts +35 -0
  78. package/dist/components/client/Pagination/paginationContext.js +38 -0
  79. package/dist/components/client/Pagination/paginationStyles.cjs +72 -0
  80. package/dist/components/client/Pagination/paginationStyles.d.cts +14 -0
  81. package/dist/components/client/Pagination/paginationStyles.d.ts +15 -0
  82. package/dist/components/client/Pagination/paginationStyles.js +63 -0
  83. package/dist/components/client/index.cjs +14 -0
  84. package/dist/components/client/index.d.cts +8 -1
  85. package/dist/components/client/index.d.ts +8 -1
  86. package/dist/components/client/index.js +8 -1
  87. package/dist/components/index.cjs +14 -0
  88. package/dist/components/index.d.cts +8 -1
  89. package/dist/components/index.d.ts +8 -1
  90. package/dist/components/index.js +8 -1
  91. package/dist/config/dist/index.cjs +272 -2
  92. package/dist/config/dist/index.js +272 -2
  93. package/dist/css/dist/css/utils.cjs +5 -1
  94. package/dist/css/dist/css/utils.js +5 -1
  95. package/dist/css/dist/packages/config/dist/index.cjs +272 -2
  96. package/dist/css/dist/packages/config/dist/index.js +272 -2
  97. package/dist/index.cjs +16 -0
  98. package/dist/index.d.cts +11 -4
  99. package/dist/index.d.ts +11 -4
  100. package/dist/index.js +10 -3
  101. package/dist/styles/styler.d.cts +28 -22
  102. package/dist/styles/styler.d.ts +28 -22
  103. package/dist/styles/variants.d.cts +27 -0
  104. package/dist/styles/variants.d.ts +27 -0
  105. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +1368 -0
  106. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +1368 -1
  107. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.cjs +16 -0
  108. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js +15 -0
  109. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +113 -48
  110. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +113 -48
  111. package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +272 -2
  112. package/dist/tailwind-internal/dist/packages/config/dist/index.js +272 -2
  113. package/dist/tailwind-internal/dist/plugins/components.cjs +1 -0
  114. package/dist/tailwind-internal/dist/plugins/components.js +2 -1
  115. package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
  116. package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
  117. package/dist/tokens/automation/configs/index.cjs +1 -0
  118. package/dist/tokens/automation/configs/index.d.cts +2 -2
  119. package/dist/tokens/automation/configs/index.d.ts +2 -2
  120. package/dist/tokens/automation/configs/index.js +2 -2
  121. package/dist/tokens/automation/index.cjs +2 -0
  122. package/dist/tokens/automation/index.d.cts +3 -3
  123. package/dist/tokens/automation/index.d.ts +3 -3
  124. package/dist/tokens/automation/index.js +3 -3
  125. package/dist/tokens/index.cjs +2 -0
  126. package/dist/tokens/index.d.cts +4 -4
  127. package/dist/tokens/index.d.ts +4 -4
  128. package/dist/tokens/index.js +3 -3
  129. package/dist/tokens/types.d.cts +2 -2
  130. package/dist/tokens/types.d.ts +2 -2
  131. package/dist/types/dist/index.d.cts +83 -1
  132. package/dist/types/dist/index.d.ts +83 -1
  133. package/dist/uds/generated/componentData.cjs +1238 -858
  134. package/dist/uds/generated/componentData.js +1238 -858
  135. package/dist/uds/generated/tailwindPurge.cjs +31 -0
  136. package/dist/uds/generated/tailwindPurge.js +31 -0
  137. package/generated/componentData.json +2127 -1667
  138. package/generated/tailwindPurge.ts +4 -4
  139. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ //#region ../tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js
3
+ /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
4
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
5
+ function getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption) {
6
+ return componentState.excludePseudoStatesForOptions?.[componentStateOption] ?? [];
7
+ }
8
+ function filterPseudoStatesByExclusion(pseudoStates, excludedPseudoStates) {
9
+ if (!pseudoStates) return [];
10
+ if (excludedPseudoStates.length === 0) return [...pseudoStates];
11
+ const excluded = new Set(excludedPseudoStates);
12
+ return pseudoStates.filter((pseudoState) => !excluded.has(pseudoState));
13
+ }
14
+ //#endregion
15
+ exports.filterPseudoStatesByExclusion = filterPseudoStatesByExclusion;
16
+ exports.getExcludedPseudoStatesForComponentStateOption = getExcludedPseudoStatesForComponentStateOption;
@@ -0,0 +1,15 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ //#region ../tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js
3
+ /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
4
+ /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
5
+ function getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption) {
6
+ return componentState.excludePseudoStatesForOptions?.[componentStateOption] ?? [];
7
+ }
8
+ function filterPseudoStatesByExclusion(pseudoStates, excludedPseudoStates) {
9
+ if (!pseudoStates) return [];
10
+ if (excludedPseudoStates.length === 0) return [...pseudoStates];
11
+ const excluded = new Set(excludedPseudoStates);
12
+ return pseudoStates.filter((pseudoState) => !excluded.has(pseudoState));
13
+ }
14
+ //#endregion
15
+ export { filterPseudoStatesByExclusion, getExcludedPseudoStatesForComponentStateOption };
@@ -2,6 +2,7 @@
2
2
  require("../../../../../../_virtual/_rolldown/runtime.cjs");
3
3
  const require_index = require("../../../css-tokens/dist/index.cjs");
4
4
  const require_properties = require("../properties.cjs");
5
+ const require_componentStatePseudoStates = require("./componentStatePseudoStates.cjs");
5
6
  const require_generateSchemaKey = require("./generateSchemaKey.cjs");
6
7
  const require_variantConfigGuards = require("./variantConfigGuards.cjs");
7
8
  const require_buildConfigSchema = require("./buildConfigSchema.cjs");
@@ -11,7 +12,9 @@ let lodash_es = require("lodash-es");
11
12
  /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
12
13
  /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
13
14
  const CSS_GAP = "gap";
15
+ const CSS_PADDING = "padding";
14
16
  const CSS_LINE_HEIGHT = "line-height";
17
+ const PAGINATION_CONTROL_SIZE_VAR = "--uds-pagination-control-size";
15
18
  const CSS_BORDER_WIDTH = "border-width";
16
19
  const CSS_BORDER_RADIUS = "border-radius";
17
20
  const CSS_BORDER_COLOR = "border-color";
@@ -51,6 +54,10 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
51
54
  {
52
55
  componentName: "tabs",
53
56
  layer: "root"
57
+ },
58
+ {
59
+ componentName: "pagination",
60
+ layer: "root"
54
61
  }
55
62
  ];
56
63
  /**
@@ -96,6 +103,15 @@ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey,
96
103
  return lineHeight;
97
104
  }
98
105
  /**
106
+ * Shared pagination control height: padding on all sides plus icon size.
107
+ * Keeps page circles, prev/next, and ellipsis vertically aligned when spacing changes.
108
+ */
109
+ function getPaginationControlSize({ padding, schema, iconLayerKey, state, theme }) {
110
+ const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
111
+ if (iconSizeValue) return `calc(2 * ${padding} + ${theme(require_properties.configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue))})`;
112
+ return `calc(2 * ${padding} + 1em)`;
113
+ }
114
+ /**
99
115
  * Forces button borders to use box-shadow instead of border properties.
100
116
  * Converts border-width and border-color into an inset box-shadow layer.
101
117
  *
@@ -134,11 +150,37 @@ function applyBoxShadowBorder(classStyles) {
134
150
  const bottomColor = classStyles[CSS_BORDER_BOTTOM_COLOR] ?? borderColor;
135
151
  const leftColor = classStyles[CSS_BORDER_LEFT_COLOR] ?? borderColor;
136
152
  const borderLayers = [];
137
- if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
138
- if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
139
- if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
140
- if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
141
- if (borderLayers.length === 0) return classStyles;
153
+ const sidesWithBorder = [
154
+ topWidth,
155
+ rightWidth,
156
+ bottomWidth,
157
+ leftWidth
158
+ ].map((width, index) => {
159
+ const color = [
160
+ topColor,
161
+ rightColor,
162
+ bottomColor,
163
+ leftColor
164
+ ][index];
165
+ return {
166
+ width: stripImportant(width ?? "").trim(),
167
+ color: stripImportant(color ?? "").trim()
168
+ };
169
+ }).filter(({ width }) => !isZeroWidth(width));
170
+ if (sidesWithBorder.length === 0) return classStyles;
171
+ const uniformWidth = sidesWithBorder.every(({ width }) => width === sidesWithBorder[0].width);
172
+ const uniformColor = sidesWithBorder.every(({ color }) => color && color === sidesWithBorder[0].color);
173
+ const hasBorderWidthShorthand = borderWidth !== void 0 && !isZeroWidth(borderWidth);
174
+ const allSidesBordered = sidesWithBorder.length === 4;
175
+ if ((hasBorderWidthShorthand || allSidesBordered) && uniformWidth && uniformColor) {
176
+ const { width, color } = sidesWithBorder[0];
177
+ borderLayers.push(`inset 0 0 0 ${width} ${color}`);
178
+ } else {
179
+ if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
180
+ if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
181
+ if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
182
+ if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
183
+ }
142
184
  const layers = [...borderLayers, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
143
185
  const needsImportant = hasImportant(topWidth) || hasImportant(rightWidth) || hasImportant(bottomWidth) || hasImportant(leftWidth) || hasImportant(topColor) || hasImportant(rightColor) || hasImportant(bottomColor) || hasImportant(leftColor) || hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
144
186
  const newStyles = { ...classStyles };
@@ -177,7 +219,7 @@ const getTheCssPropertyValue = (schema, theme, propertyName, schemaStateValue, e
177
219
  if (propertyConfig.concatenate && existingValue) return `${existingValue}${propertyConfig.concatenationDelimiter || ", "}${newValue}`;
178
220
  return newValue;
179
221
  };
180
- function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions }) {
222
+ function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions, excludedPseudoStates = [] }) {
181
223
  const schemaKey = require_generateSchemaKey.generateSchemaKey({
182
224
  variantKey,
183
225
  variantValue,
@@ -199,7 +241,7 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
199
241
  if (!propertyStateMap) throw new Error(`Prop definition (${componentName} - ${schemaKey} - ${propertyKey}) not found, this is not expected, please report the bug to the UDS team`);
200
242
  const styles = {};
201
243
  const skipRestForProperty = originalPropertyDefinition.skipRestState === true;
202
- const declaredPseudoStates = originalPropertyDefinition.pseudoStates ?? [];
244
+ const declaredPseudoStates = require_componentStatePseudoStates.filterPseudoStatesByExclusion(originalPropertyDefinition.pseudoStates, excludedPseudoStates);
203
245
  const declaredPropertyStates = new Set([...skipRestForProperty ? [] : ["rest"], ...declaredPseudoStates]);
204
246
  for (const propStateStr in propertyStateMap) {
205
247
  if (!declaredPropertyStates.has(propStateStr)) continue;
@@ -311,6 +353,21 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
311
353
  });
312
354
  }
313
355
  }
356
+ if (componentName === "pagination" && layer === "item" && propertyKey === "spacing") {
357
+ const padding = cssDeclarations[CSS_PADDING];
358
+ if (padding) cssDeclarations[PAGINATION_CONTROL_SIZE_VAR] = getPaginationControlSize({
359
+ padding,
360
+ schema,
361
+ iconLayerKey: require_generateSchemaKey.generateSchemaKey({
362
+ variantKey,
363
+ variantValue,
364
+ layer: "icon",
365
+ subComponentName
366
+ }),
367
+ state: propertyState,
368
+ theme
369
+ });
370
+ }
314
371
  if (componentName === "paddlenav" && layer === "root") {
315
372
  if (propertyKey === "borderRadius" && cssDeclarations[CSS_BORDER_RADIUS]) cssDeclarations[NESTED_BORDER_RADIUS_SIZE_VAR] = cssDeclarations[CSS_BORDER_RADIUS];
316
373
  if (propertyKey === "borderWidth" && cssDeclarations[CSS_BORDER_WIDTH]) cssDeclarations[NESTED_BORDER_RADIUS_WIDTH_VAR] = cssDeclarations[CSS_BORDER_WIDTH];
@@ -382,26 +439,30 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
382
439
  const componentStates = variantConfig.componentStates;
383
440
  for (const componentStateKey in componentStates) {
384
441
  const componentState = componentStates[componentStateKey];
385
- for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
386
- const layer = componentState.layers[layerKey];
387
- for (const propertyKey in layer.properties) {
388
- const originalPropertyDefinition = layer.properties[propertyKey];
389
- const declarations = generateDeclaration({
390
- componentName,
391
- variantKey,
392
- variantValue: variantOption,
393
- componentStateKey,
394
- componentStateValue: componentStateOption,
395
- layer: layerKey,
396
- layerOptionalPseudoSelector: layer.pseudoSelector,
397
- propertyKey,
398
- originalPropertyDefinition,
399
- theme,
400
- schema,
401
- currentStyles: styles,
402
- previewOptions
403
- });
404
- styles = deepMerge(styles, declarations);
442
+ for (const componentStateOption of componentState.options) {
443
+ const excludedPseudoStates = require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
444
+ for (const layerKey in componentState.layers) {
445
+ const layer = componentState.layers[layerKey];
446
+ for (const propertyKey in layer.properties) {
447
+ const originalPropertyDefinition = layer.properties[propertyKey];
448
+ const declarations = generateDeclaration({
449
+ componentName,
450
+ variantKey,
451
+ variantValue: variantOption,
452
+ componentStateKey,
453
+ componentStateValue: componentStateOption,
454
+ layer: layerKey,
455
+ layerOptionalPseudoSelector: layer.pseudoSelector,
456
+ propertyKey,
457
+ originalPropertyDefinition,
458
+ theme,
459
+ schema,
460
+ currentStyles: styles,
461
+ previewOptions,
462
+ excludedPseudoStates
463
+ });
464
+ styles = deepMerge(styles, declarations);
465
+ }
405
466
  }
406
467
  }
407
468
  }
@@ -437,27 +498,31 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
437
498
  const componentStates = variantConfig.componentStates;
438
499
  for (const componentStateKey in componentStates) {
439
500
  const componentState = componentStates[componentStateKey];
440
- for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
441
- const layer = componentState.layers[layerKey];
442
- for (const propertyKey in layer.properties) {
443
- const originalPropertyDefinition = layer.properties[propertyKey];
444
- const declarations = generateDeclaration({
445
- componentName,
446
- variantKey,
447
- variantValue: variantOption,
448
- componentStateKey,
449
- componentStateValue: componentStateOption,
450
- subComponentName: subComponentKey,
451
- layer: layerKey,
452
- layerOptionalPseudoSelector: layer.pseudoSelector,
453
- propertyKey,
454
- originalPropertyDefinition,
455
- theme,
456
- schema,
457
- currentStyles: styles,
458
- previewOptions
459
- });
460
- styles = deepMerge(styles, declarations);
501
+ for (const componentStateOption of componentState.options) {
502
+ const excludedPseudoStates = require_componentStatePseudoStates.getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
503
+ for (const layerKey in componentState.layers) {
504
+ const layer = componentState.layers[layerKey];
505
+ for (const propertyKey in layer.properties) {
506
+ const originalPropertyDefinition = layer.properties[propertyKey];
507
+ const declarations = generateDeclaration({
508
+ componentName,
509
+ variantKey,
510
+ variantValue: variantOption,
511
+ componentStateKey,
512
+ componentStateValue: componentStateOption,
513
+ subComponentName: subComponentKey,
514
+ layer: layerKey,
515
+ layerOptionalPseudoSelector: layer.pseudoSelector,
516
+ propertyKey,
517
+ originalPropertyDefinition,
518
+ theme,
519
+ schema,
520
+ currentStyles: styles,
521
+ previewOptions,
522
+ excludedPseudoStates
523
+ });
524
+ styles = deepMerge(styles, declarations);
525
+ }
461
526
  }
462
527
  }
463
528
  }
@@ -1,6 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  import { BUTTON_GAP_VAR, BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED, BUTTON_SCALE_EFFECT_REST } from "../../../css-tokens/dist/index.js";
3
3
  import { configurableProperties } from "../properties.js";
4
+ import { filterPseudoStatesByExclusion, getExcludedPseudoStatesForComponentStateOption } from "./componentStatePseudoStates.js";
4
5
  import { generateSchemaKey } from "./generateSchemaKey.js";
5
6
  import { isVariantConfigWithComponentStates, isVariantConfigWithProperties } from "./variantConfigGuards.js";
6
7
  import { findFixtureTypeForValue } from "./buildConfigSchema.js";
@@ -10,7 +11,9 @@ import { isFunction, mergeWith } from "lodash-es";
10
11
  /*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
11
12
  /*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
12
13
  const CSS_GAP = "gap";
14
+ const CSS_PADDING = "padding";
13
15
  const CSS_LINE_HEIGHT = "line-height";
16
+ const PAGINATION_CONTROL_SIZE_VAR = "--uds-pagination-control-size";
14
17
  const CSS_BORDER_WIDTH = "border-width";
15
18
  const CSS_BORDER_RADIUS = "border-radius";
16
19
  const CSS_BORDER_COLOR = "border-color";
@@ -50,6 +53,10 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
50
53
  {
51
54
  componentName: "tabs",
52
55
  layer: "root"
56
+ },
57
+ {
58
+ componentName: "pagination",
59
+ layer: "root"
53
60
  }
54
61
  ];
55
62
  /**
@@ -95,6 +102,15 @@ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey,
95
102
  return lineHeight;
96
103
  }
97
104
  /**
105
+ * Shared pagination control height: padding on all sides plus icon size.
106
+ * Keeps page circles, prev/next, and ellipsis vertically aligned when spacing changes.
107
+ */
108
+ function getPaginationControlSize({ padding, schema, iconLayerKey, state, theme }) {
109
+ const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
110
+ if (iconSizeValue) return `calc(2 * ${padding} + ${theme(configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue))})`;
111
+ return `calc(2 * ${padding} + 1em)`;
112
+ }
113
+ /**
98
114
  * Forces button borders to use box-shadow instead of border properties.
99
115
  * Converts border-width and border-color into an inset box-shadow layer.
100
116
  *
@@ -133,11 +149,37 @@ function applyBoxShadowBorder(classStyles) {
133
149
  const bottomColor = classStyles[CSS_BORDER_BOTTOM_COLOR] ?? borderColor;
134
150
  const leftColor = classStyles[CSS_BORDER_LEFT_COLOR] ?? borderColor;
135
151
  const borderLayers = [];
136
- if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
137
- if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
138
- if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
139
- if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
140
- if (borderLayers.length === 0) return classStyles;
152
+ const sidesWithBorder = [
153
+ topWidth,
154
+ rightWidth,
155
+ bottomWidth,
156
+ leftWidth
157
+ ].map((width, index) => {
158
+ const color = [
159
+ topColor,
160
+ rightColor,
161
+ bottomColor,
162
+ leftColor
163
+ ][index];
164
+ return {
165
+ width: stripImportant(width ?? "").trim(),
166
+ color: stripImportant(color ?? "").trim()
167
+ };
168
+ }).filter(({ width }) => !isZeroWidth(width));
169
+ if (sidesWithBorder.length === 0) return classStyles;
170
+ const uniformWidth = sidesWithBorder.every(({ width }) => width === sidesWithBorder[0].width);
171
+ const uniformColor = sidesWithBorder.every(({ color }) => color && color === sidesWithBorder[0].color);
172
+ const hasBorderWidthShorthand = borderWidth !== void 0 && !isZeroWidth(borderWidth);
173
+ const allSidesBordered = sidesWithBorder.length === 4;
174
+ if ((hasBorderWidthShorthand || allSidesBordered) && uniformWidth && uniformColor) {
175
+ const { width, color } = sidesWithBorder[0];
176
+ borderLayers.push(`inset 0 0 0 ${width} ${color}`);
177
+ } else {
178
+ if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
179
+ if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
180
+ if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
181
+ if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
182
+ }
141
183
  const layers = [...borderLayers, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
142
184
  const needsImportant = hasImportant(topWidth) || hasImportant(rightWidth) || hasImportant(bottomWidth) || hasImportant(leftWidth) || hasImportant(topColor) || hasImportant(rightColor) || hasImportant(bottomColor) || hasImportant(leftColor) || hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
143
185
  const newStyles = { ...classStyles };
@@ -176,7 +218,7 @@ const getTheCssPropertyValue = (schema, theme, propertyName, schemaStateValue, e
176
218
  if (propertyConfig.concatenate && existingValue) return `${existingValue}${propertyConfig.concatenationDelimiter || ", "}${newValue}`;
177
219
  return newValue;
178
220
  };
179
- function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions }) {
221
+ function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions, excludedPseudoStates = [] }) {
180
222
  const schemaKey = generateSchemaKey({
181
223
  variantKey,
182
224
  variantValue,
@@ -198,7 +240,7 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
198
240
  if (!propertyStateMap) throw new Error(`Prop definition (${componentName} - ${schemaKey} - ${propertyKey}) not found, this is not expected, please report the bug to the UDS team`);
199
241
  const styles = {};
200
242
  const skipRestForProperty = originalPropertyDefinition.skipRestState === true;
201
- const declaredPseudoStates = originalPropertyDefinition.pseudoStates ?? [];
243
+ const declaredPseudoStates = filterPseudoStatesByExclusion(originalPropertyDefinition.pseudoStates, excludedPseudoStates);
202
244
  const declaredPropertyStates = new Set([...skipRestForProperty ? [] : ["rest"], ...declaredPseudoStates]);
203
245
  for (const propStateStr in propertyStateMap) {
204
246
  if (!declaredPropertyStates.has(propStateStr)) continue;
@@ -310,6 +352,21 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
310
352
  });
311
353
  }
312
354
  }
355
+ if (componentName === "pagination" && layer === "item" && propertyKey === "spacing") {
356
+ const padding = cssDeclarations[CSS_PADDING];
357
+ if (padding) cssDeclarations[PAGINATION_CONTROL_SIZE_VAR] = getPaginationControlSize({
358
+ padding,
359
+ schema,
360
+ iconLayerKey: generateSchemaKey({
361
+ variantKey,
362
+ variantValue,
363
+ layer: "icon",
364
+ subComponentName
365
+ }),
366
+ state: propertyState,
367
+ theme
368
+ });
369
+ }
313
370
  if (componentName === "paddlenav" && layer === "root") {
314
371
  if (propertyKey === "borderRadius" && cssDeclarations[CSS_BORDER_RADIUS]) cssDeclarations[NESTED_BORDER_RADIUS_SIZE_VAR] = cssDeclarations[CSS_BORDER_RADIUS];
315
372
  if (propertyKey === "borderWidth" && cssDeclarations[CSS_BORDER_WIDTH]) cssDeclarations[NESTED_BORDER_RADIUS_WIDTH_VAR] = cssDeclarations[CSS_BORDER_WIDTH];
@@ -381,26 +438,30 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
381
438
  const componentStates = variantConfig.componentStates;
382
439
  for (const componentStateKey in componentStates) {
383
440
  const componentState = componentStates[componentStateKey];
384
- for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
385
- const layer = componentState.layers[layerKey];
386
- for (const propertyKey in layer.properties) {
387
- const originalPropertyDefinition = layer.properties[propertyKey];
388
- const declarations = generateDeclaration({
389
- componentName,
390
- variantKey,
391
- variantValue: variantOption,
392
- componentStateKey,
393
- componentStateValue: componentStateOption,
394
- layer: layerKey,
395
- layerOptionalPseudoSelector: layer.pseudoSelector,
396
- propertyKey,
397
- originalPropertyDefinition,
398
- theme,
399
- schema,
400
- currentStyles: styles,
401
- previewOptions
402
- });
403
- styles = deepMerge(styles, declarations);
441
+ for (const componentStateOption of componentState.options) {
442
+ const excludedPseudoStates = getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
443
+ for (const layerKey in componentState.layers) {
444
+ const layer = componentState.layers[layerKey];
445
+ for (const propertyKey in layer.properties) {
446
+ const originalPropertyDefinition = layer.properties[propertyKey];
447
+ const declarations = generateDeclaration({
448
+ componentName,
449
+ variantKey,
450
+ variantValue: variantOption,
451
+ componentStateKey,
452
+ componentStateValue: componentStateOption,
453
+ layer: layerKey,
454
+ layerOptionalPseudoSelector: layer.pseudoSelector,
455
+ propertyKey,
456
+ originalPropertyDefinition,
457
+ theme,
458
+ schema,
459
+ currentStyles: styles,
460
+ previewOptions,
461
+ excludedPseudoStates
462
+ });
463
+ styles = deepMerge(styles, declarations);
464
+ }
404
465
  }
405
466
  }
406
467
  }
@@ -436,27 +497,31 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
436
497
  const componentStates = variantConfig.componentStates;
437
498
  for (const componentStateKey in componentStates) {
438
499
  const componentState = componentStates[componentStateKey];
439
- for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
440
- const layer = componentState.layers[layerKey];
441
- for (const propertyKey in layer.properties) {
442
- const originalPropertyDefinition = layer.properties[propertyKey];
443
- const declarations = generateDeclaration({
444
- componentName,
445
- variantKey,
446
- variantValue: variantOption,
447
- componentStateKey,
448
- componentStateValue: componentStateOption,
449
- subComponentName: subComponentKey,
450
- layer: layerKey,
451
- layerOptionalPseudoSelector: layer.pseudoSelector,
452
- propertyKey,
453
- originalPropertyDefinition,
454
- theme,
455
- schema,
456
- currentStyles: styles,
457
- previewOptions
458
- });
459
- styles = deepMerge(styles, declarations);
500
+ for (const componentStateOption of componentState.options) {
501
+ const excludedPseudoStates = getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
502
+ for (const layerKey in componentState.layers) {
503
+ const layer = componentState.layers[layerKey];
504
+ for (const propertyKey in layer.properties) {
505
+ const originalPropertyDefinition = layer.properties[propertyKey];
506
+ const declarations = generateDeclaration({
507
+ componentName,
508
+ variantKey,
509
+ variantValue: variantOption,
510
+ componentStateKey,
511
+ componentStateValue: componentStateOption,
512
+ subComponentName: subComponentKey,
513
+ layer: layerKey,
514
+ layerOptionalPseudoSelector: layer.pseudoSelector,
515
+ propertyKey,
516
+ originalPropertyDefinition,
517
+ theme,
518
+ schema,
519
+ currentStyles: styles,
520
+ previewOptions,
521
+ excludedPseudoStates
522
+ });
523
+ styles = deepMerge(styles, declarations);
524
+ }
460
525
  }
461
526
  }
462
527
  }