@yahoo/uds 3.125.1 → 3.127.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 (203) hide show
  1. package/dist/automated-config/dist/generated/autoVariants.cjs +60 -0
  2. package/dist/automated-config/dist/generated/autoVariants.d.cts +14 -0
  3. package/dist/automated-config/dist/generated/autoVariants.d.ts +14 -0
  4. package/dist/automated-config/dist/generated/autoVariants.js +60 -0
  5. package/dist/automated-config/dist/generated/generatedConfigs.cjs +5169 -495
  6. package/dist/automated-config/dist/generated/generatedConfigs.d.cts +526 -1
  7. package/dist/automated-config/dist/generated/generatedConfigs.d.ts +526 -1
  8. package/dist/automated-config/dist/generated/generatedConfigs.js +5167 -496
  9. package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +2558 -1490
  10. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +4 -1
  11. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +4 -1
  12. package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +2558 -1490
  13. package/dist/automated-config/dist/properties.cjs +12 -0
  14. package/dist/automated-config/dist/properties.d.cts +4 -0
  15. package/dist/automated-config/dist/properties.d.ts +4 -0
  16. package/dist/automated-config/dist/properties.js +12 -0
  17. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
  18. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
  19. package/dist/automated-config/dist/utils/index.cjs +103 -6
  20. package/dist/automated-config/dist/utils/index.js +103 -6
  21. package/dist/components/Banner/Banner.cjs +167 -0
  22. package/dist/components/Banner/Banner.d.cts +56 -0
  23. package/dist/components/Banner/Banner.d.ts +56 -0
  24. package/dist/components/Banner/Banner.js +165 -0
  25. package/dist/components/Banner/BannerContent.cjs +20 -0
  26. package/dist/components/Banner/BannerContent.d.cts +13 -0
  27. package/dist/components/Banner/BannerContent.d.ts +13 -0
  28. package/dist/components/Banner/BannerContent.js +18 -0
  29. package/dist/components/Banner/BannerDescription.cjs +47 -0
  30. package/dist/components/Banner/BannerDescription.d.cts +36 -0
  31. package/dist/components/Banner/BannerDescription.d.ts +36 -0
  32. package/dist/components/Banner/BannerDescription.js +45 -0
  33. package/dist/components/Banner/BannerTitle.cjs +42 -0
  34. package/dist/components/Banner/BannerTitle.d.cts +34 -0
  35. package/dist/components/Banner/BannerTitle.d.ts +34 -0
  36. package/dist/components/Banner/BannerTitle.js +40 -0
  37. package/dist/components/Banner/index.cjs +11 -0
  38. package/dist/components/Banner/index.d.cts +6 -0
  39. package/dist/components/Banner/index.d.ts +6 -0
  40. package/dist/components/Banner/index.js +7 -0
  41. package/dist/components/Banner/utils.cjs +56 -0
  42. package/dist/components/Banner/utils.d.cts +26 -0
  43. package/dist/components/Banner/utils.d.ts +26 -0
  44. package/dist/components/Banner/utils.js +52 -0
  45. package/dist/components/Divider/DividerCore.cjs +1 -1
  46. package/dist/components/Divider/DividerCore.js +1 -1
  47. package/dist/components/client/Avatar/AvatarIcon.cjs +2 -2
  48. package/dist/components/client/Avatar/AvatarIcon.js +2 -2
  49. package/dist/components/client/Avatar/AvatarText.cjs +1 -1
  50. package/dist/components/client/Avatar/AvatarText.js +1 -1
  51. package/dist/components/client/Badge.cjs +1 -1
  52. package/dist/components/client/Badge.js +1 -1
  53. package/dist/components/client/BottomSheet/BottomSheetHeader.cjs +1 -1
  54. package/dist/components/client/BottomSheet/BottomSheetHeader.js +1 -1
  55. package/dist/components/client/Button.cjs +1 -1
  56. package/dist/components/client/Button.js +1 -1
  57. package/dist/components/client/Checkbox.cjs +2 -2
  58. package/dist/components/client/Checkbox.js +2 -2
  59. package/dist/components/client/Chip/ChipBase.cjs +2 -2
  60. package/dist/components/client/Chip/ChipBase.js +2 -2
  61. package/dist/components/client/Chip/ChipDismissible.cjs +2 -2
  62. package/dist/components/client/Chip/ChipDismissible.js +2 -2
  63. package/dist/components/client/IconButton.cjs +1 -1
  64. package/dist/components/client/IconButton.js +1 -1
  65. package/dist/components/client/Input/Input.cjs +1 -1
  66. package/dist/components/client/Input/Input.js +1 -1
  67. package/dist/components/client/Input/InputHelpTextInternal.cjs +1 -1
  68. package/dist/components/client/Input/InputHelpTextInternal.js +1 -1
  69. package/dist/components/client/Menu/Menu.ItemBase.cjs +2 -2
  70. package/dist/components/client/Menu/Menu.ItemBase.js +2 -2
  71. package/dist/components/client/Menu/Menu.ItemCheckbox.cjs +1 -1
  72. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  73. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  74. package/dist/components/client/Menu/Menu.ItemCheckbox.js +1 -1
  75. package/dist/components/client/Popover/PopoverContent.cjs +3 -3
  76. package/dist/components/client/Popover/PopoverContent.js +3 -3
  77. package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
  78. package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
  79. package/dist/components/client/Switch.cjs +1 -1
  80. package/dist/components/client/Switch.js +1 -1
  81. package/dist/components/client/Tabs/Tab.cjs +80 -0
  82. package/dist/components/client/Tabs/Tab.d.cts +20 -0
  83. package/dist/components/client/Tabs/Tab.d.ts +21 -0
  84. package/dist/components/client/Tabs/Tab.js +78 -0
  85. package/dist/components/client/Tabs/TabList.cjs +132 -0
  86. package/dist/components/client/Tabs/TabList.d.cts +9 -0
  87. package/dist/components/client/Tabs/TabList.d.ts +10 -0
  88. package/dist/components/client/Tabs/TabList.js +130 -0
  89. package/dist/components/client/Tabs/TabPanel.cjs +22 -0
  90. package/dist/components/client/Tabs/TabPanel.d.cts +9 -0
  91. package/dist/components/client/Tabs/TabPanel.d.ts +10 -0
  92. package/dist/components/client/Tabs/TabPanel.js +20 -0
  93. package/dist/components/client/Tabs/Tabs.cjs +53 -0
  94. package/dist/components/client/Tabs/Tabs.d.cts +45 -0
  95. package/dist/components/client/Tabs/Tabs.d.ts +46 -0
  96. package/dist/components/client/Tabs/Tabs.js +51 -0
  97. package/dist/components/client/Tabs/index.cjs +12 -0
  98. package/dist/components/client/Tabs/index.d.cts +7 -0
  99. package/dist/components/client/Tabs/index.d.ts +8 -0
  100. package/dist/components/client/Tabs/index.js +8 -0
  101. package/dist/components/client/Tabs/tabsContext.cjs +18 -0
  102. package/dist/components/client/Tabs/tabsContext.d.cts +15 -0
  103. package/dist/components/client/Tabs/tabsContext.d.ts +16 -0
  104. package/dist/components/client/Tabs/tabsContext.js +15 -0
  105. package/dist/components/client/Toast/Toast.cjs +3 -3
  106. package/dist/components/client/Toast/Toast.js +3 -3
  107. package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +5 -5
  108. package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +5 -5
  109. package/dist/components/client/Tooltip/TooltipContent.cjs +2 -2
  110. package/dist/components/client/Tooltip/TooltipContent.js +2 -2
  111. package/dist/components/client/index.cjs +9 -1
  112. package/dist/components/client/index.d.cts +7 -1
  113. package/dist/components/client/index.d.ts +7 -1
  114. package/dist/components/client/index.js +6 -2
  115. package/dist/components/experimental/Spinner.cjs +1 -1
  116. package/dist/components/experimental/Spinner.js +1 -1
  117. package/dist/components/experimental/Table.cjs +1 -1
  118. package/dist/components/experimental/Table.js +1 -1
  119. package/dist/components/experimental/client/Accordion.cjs +4 -4
  120. package/dist/components/experimental/client/Accordion.js +4 -4
  121. package/dist/components/experimental/client/Modal.cjs +2 -2
  122. package/dist/components/experimental/client/Modal.js +2 -2
  123. package/dist/components/experimental/client/SegmentedControl.cjs +3 -3
  124. package/dist/components/experimental/client/SegmentedControl.js +3 -3
  125. package/dist/components/experimental/client/SwitchV2.cjs +1 -1
  126. package/dist/components/experimental/client/SwitchV2.js +1 -1
  127. package/dist/components/experimental/client/index.cjs +0 -5
  128. package/dist/components/experimental/client/index.d.cts +1 -2
  129. package/dist/components/experimental/client/index.d.ts +1 -2
  130. package/dist/components/experimental/client/index.js +1 -2
  131. package/dist/components/experimental/index.cjs +0 -9
  132. package/dist/components/experimental/index.d.cts +1 -2
  133. package/dist/components/experimental/index.d.ts +1 -2
  134. package/dist/components/experimental/index.js +1 -6
  135. package/dist/components/index.cjs +27 -3
  136. package/dist/components/index.d.cts +11 -1
  137. package/dist/components/index.d.ts +11 -1
  138. package/dist/components/index.js +20 -4
  139. package/dist/config/dist/index.cjs +1496 -339
  140. package/dist/config/dist/index.js +1496 -339
  141. package/dist/index.cjs +22 -3
  142. package/dist/index.d.cts +12 -3
  143. package/dist/index.d.ts +12 -3
  144. package/dist/index.js +13 -5
  145. package/dist/styles/styler.d.cts +107 -93
  146. package/dist/styles/styler.d.ts +107 -93
  147. package/dist/styles/variants.d.cts +74 -0
  148. package/dist/styles/variants.d.ts +74 -0
  149. package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.cjs +60 -0
  150. package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js +60 -0
  151. package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js.map +1 -1
  152. package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.cjs +5169 -495
  153. package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js +5167 -496
  154. package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js.map +1 -1
  155. package/dist/tailwind/dist/automated-config/dist/properties.cjs +12 -0
  156. package/dist/tailwind/dist/automated-config/dist/properties.js +12 -0
  157. package/dist/tailwind/dist/automated-config/dist/properties.js.map +1 -1
  158. package/dist/tailwind/dist/automated-config/dist/utils/index.cjs +103 -6
  159. package/dist/tailwind/dist/automated-config/dist/utils/index.js +103 -6
  160. package/dist/tailwind/dist/automated-config/dist/utils/index.js.map +1 -1
  161. package/dist/tailwind/dist/config/dist/index.cjs +1496 -339
  162. package/dist/tailwind/dist/config/dist/index.js +1496 -339
  163. package/dist/tailwind/dist/config/dist/index.js.map +1 -1
  164. package/dist/tailwind/dist/css/utils.cjs +3 -1
  165. package/dist/tailwind/dist/css/utils.js +3 -1
  166. package/dist/tailwind/dist/css/utils.js.map +1 -1
  167. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +36 -2
  168. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +36 -2
  169. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js.map +1 -1
  170. package/dist/tailwind/dist/tailwind/plugins/components.cjs +3 -0
  171. package/dist/tailwind/dist/tailwind/plugins/components.js +4 -1
  172. package/dist/tailwind/dist/tailwind/plugins/components.js.map +1 -1
  173. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts +4 -4
  174. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts +4 -4
  175. package/dist/tailwind/dist/types/dist/index.d.cts.map +1 -1
  176. package/dist/tailwind/dist/types/dist/index.d.ts.map +1 -1
  177. package/dist/tokens/automation/configs/index.cjs +3 -0
  178. package/dist/tokens/automation/configs/index.d.cts +2 -2
  179. package/dist/tokens/automation/configs/index.d.ts +2 -2
  180. package/dist/tokens/automation/configs/index.js +2 -2
  181. package/dist/tokens/automation/index.cjs +3 -0
  182. package/dist/tokens/automation/index.d.cts +2 -2
  183. package/dist/tokens/automation/index.d.ts +2 -2
  184. package/dist/tokens/automation/index.js +2 -2
  185. package/dist/tokens/index.cjs +3 -0
  186. package/dist/tokens/index.d.cts +3 -3
  187. package/dist/tokens/index.d.ts +3 -3
  188. package/dist/tokens/index.js +2 -2
  189. package/dist/tokens/types.d.cts +2 -2
  190. package/dist/tokens/types.d.ts +2 -2
  191. package/dist/types/dist/index.d.cts +70 -1
  192. package/dist/types/dist/index.d.ts +70 -1
  193. package/dist/uds/generated/componentData.cjs +1030 -774
  194. package/dist/uds/generated/componentData.js +893 -679
  195. package/dist/uds/generated/tailwindPurge.cjs +41 -43
  196. package/dist/uds/generated/tailwindPurge.js +41 -43
  197. package/generated/componentData.json +1693 -1432
  198. package/generated/tailwindPurge.ts +4 -4
  199. package/package.json +1 -1
  200. package/dist/components/experimental/client/Tabs.cjs +0 -76
  201. package/dist/components/experimental/client/Tabs.d.cts +0 -31
  202. package/dist/components/experimental/client/Tabs.d.ts +0 -32
  203. package/dist/components/experimental/client/Tabs.js +0 -71
@@ -155,6 +155,11 @@ const strokeWidth = {
155
155
  name: "strokeWidth",
156
156
  cssProperties: "stroke-width"
157
157
  };
158
+ const underlineWidth = {
159
+ ...borderWidth,
160
+ name: "underlineWidth",
161
+ cssProperties: "border-bottom-width"
162
+ };
158
163
  const borderColor = {
159
164
  name: "borderColor",
160
165
  cssProperties: "border-color",
@@ -175,6 +180,11 @@ const stroke = {
175
180
  name: "stroke",
176
181
  cssProperties: "stroke"
177
182
  };
183
+ const underlineColor = {
184
+ ...borderColor,
185
+ name: "underlineColor",
186
+ cssProperties: "border-bottom-color"
187
+ };
178
188
  const outlineWidth = {
179
189
  name: "outlineWidth",
180
190
  cssProperties: "outline-width",
@@ -328,10 +338,12 @@ const opacity = {
328
338
  const publicProperties = {
329
339
  backgroundColor,
330
340
  borderWidth,
341
+ underlineWidth,
331
342
  strokeWidth,
332
343
  borderRadius,
333
344
  borderRadiusVar,
334
345
  borderColor,
346
+ underlineColor,
335
347
  stroke,
336
348
  buttonSize: {
337
349
  name: "buttonSize",
@@ -25,10 +25,12 @@ interface ConfigurableProperty<T extends AllPossibleProperties, CVR = unknown> {
25
25
  declare const publicProperties: {
26
26
  readonly backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases", unknown>;
27
27
  readonly borderWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
28
+ readonly underlineWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
28
29
  readonly strokeWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
29
30
  readonly borderRadius: ConfigurableProperty<"borderRadii", unknown>;
30
31
  readonly borderRadiusVar: ConfigurableProperty<"borderRadii", unknown>;
31
32
  readonly borderColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
33
+ readonly underlineColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
32
34
  readonly stroke: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
33
35
  readonly buttonSize: ConfigurableProperty<"buttonSizes", unknown>;
34
36
  readonly buttonVariant: ConfigurableProperty<"buttonVariantsFlat", unknown>;
@@ -71,10 +73,12 @@ declare const configurableProperties: {
71
73
  solidOutline: ConfigurableProperty<never, unknown>;
72
74
  backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases", unknown>;
73
75
  borderWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
76
+ underlineWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
74
77
  strokeWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
75
78
  borderRadius: ConfigurableProperty<"borderRadii", unknown>;
76
79
  borderRadiusVar: ConfigurableProperty<"borderRadii", unknown>;
77
80
  borderColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
81
+ underlineColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
78
82
  stroke: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
79
83
  buttonSize: ConfigurableProperty<"buttonSizes", unknown>;
80
84
  buttonVariant: ConfigurableProperty<"buttonVariantsFlat", unknown>;
@@ -25,10 +25,12 @@ interface ConfigurableProperty<T extends AllPossibleProperties, CVR = unknown> {
25
25
  declare const publicProperties: {
26
26
  readonly backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases", unknown>;
27
27
  readonly borderWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
28
+ readonly underlineWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
28
29
  readonly strokeWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
29
30
  readonly borderRadius: ConfigurableProperty<"borderRadii", unknown>;
30
31
  readonly borderRadiusVar: ConfigurableProperty<"borderRadii", unknown>;
31
32
  readonly borderColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
33
+ readonly underlineColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
32
34
  readonly stroke: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
33
35
  readonly buttonSize: ConfigurableProperty<"buttonSizes", unknown>;
34
36
  readonly buttonVariant: ConfigurableProperty<"buttonVariantsFlat", unknown>;
@@ -71,10 +73,12 @@ declare const configurableProperties: {
71
73
  solidOutline: ConfigurableProperty<never, unknown>;
72
74
  backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases", unknown>;
73
75
  borderWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
76
+ underlineWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
74
77
  strokeWidth: ConfigurableProperty<"elevationAliases" | "borderWidths" | "spacingAliases", unknown>;
75
78
  borderRadius: ConfigurableProperty<"borderRadii", unknown>;
76
79
  borderRadiusVar: ConfigurableProperty<"borderRadii", unknown>;
77
80
  borderColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
81
+ underlineColor: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
78
82
  stroke: ConfigurableProperty<"spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors", unknown>;
79
83
  buttonSize: ConfigurableProperty<"buttonSizes", unknown>;
80
84
  buttonVariant: ConfigurableProperty<"buttonVariantsFlat", unknown>;
@@ -155,6 +155,11 @@ const strokeWidth = {
155
155
  name: "strokeWidth",
156
156
  cssProperties: "stroke-width"
157
157
  };
158
+ const underlineWidth = {
159
+ ...borderWidth,
160
+ name: "underlineWidth",
161
+ cssProperties: "border-bottom-width"
162
+ };
158
163
  const borderColor = {
159
164
  name: "borderColor",
160
165
  cssProperties: "border-color",
@@ -175,6 +180,11 @@ const stroke = {
175
180
  name: "stroke",
176
181
  cssProperties: "stroke"
177
182
  };
183
+ const underlineColor = {
184
+ ...borderColor,
185
+ name: "underlineColor",
186
+ cssProperties: "border-bottom-color"
187
+ };
178
188
  const outlineWidth = {
179
189
  name: "outlineWidth",
180
190
  cssProperties: "outline-width",
@@ -328,10 +338,12 @@ const opacity = {
328
338
  const publicProperties = {
329
339
  backgroundColor,
330
340
  borderWidth,
341
+ underlineWidth,
331
342
  strokeWidth,
332
343
  borderRadius,
333
344
  borderRadiusVar,
334
345
  borderColor,
346
+ underlineColor,
335
347
  stroke,
336
348
  buttonSize: {
337
349
  name: "buttonSize",
@@ -11,8 +11,8 @@ import { SelectedConfigurableProperty } from "../properties.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<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
15
- root: Readonly<Record<string, SelectedConfigurableProperty<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "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" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "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" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "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 { SelectedConfigurableProperty } from "../properties.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<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
15
- root: Readonly<Record<string, SelectedConfigurableProperty<"textTransform" | "fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "letterSpacing" | "backgroundColor" | "borderWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontVariationSettings" | "gap" | "color" | "opacity" | "fillOpacity" | "iconSize" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "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" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "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" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity", 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 "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
16
16
  } | null; //#endregion
17
17
  //#endregion
18
18
  export { getConfigVariantProperties };
@@ -24,6 +24,16 @@ const CSS_LINE_HEIGHT = "line-height";
24
24
  const CSS_BORDER_WIDTH = "border-width";
25
25
  const CSS_BORDER_COLOR = "border-color";
26
26
  const CSS_BOX_SHADOW = "box-shadow";
27
+ const CSS_BORDER_TOP_WIDTH = "border-top-width";
28
+ const CSS_BORDER_RIGHT_WIDTH = "border-right-width";
29
+ const CSS_BORDER_BOTTOM_WIDTH = "border-bottom-width";
30
+ const CSS_BORDER_LEFT_WIDTH = "border-left-width";
31
+ const CSS_BORDER_TOP_COLOR = "border-top-color";
32
+ const CSS_BORDER_RIGHT_COLOR = "border-right-color";
33
+ const CSS_BORDER_BOTTOM_COLOR = "border-bottom-color";
34
+ const CSS_BORDER_LEFT_COLOR = "border-left-color";
35
+ const CSS_TAB_UNDERLINE_WIDTH = "--uds-tab-underline-width";
36
+ const CSS_TAB_UNDERLINE_COLOR = "--uds-tab-underline-color";
27
37
  function deepMerge(target, source) {
28
38
  return (0, lodash_es.mergeWith)({}, target, source);
29
39
  }
@@ -39,6 +49,14 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
39
49
  {
40
50
  componentName: "chip",
41
51
  layer: "root"
52
+ },
53
+ {
54
+ componentName: "tab",
55
+ layer: "root"
56
+ },
57
+ {
58
+ componentName: "tabs",
59
+ layer: "root"
42
60
  }
43
61
  ];
44
62
  /**
@@ -99,19 +117,48 @@ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey,
99
117
  * @example
100
118
  * Input: { border-width: '2px', border-color: 'red', box-shadow: '0 2px 4px rgba(0,0,0,0.1)' }
101
119
  * Output: { box-shadow: 'inset 0 0 0 2px red, 0 2px 4px rgba(0,0,0,0.1)' }
120
+ * Renders borders using inset box-shadows instead of CSS border widths.
121
+ * This preserves visual borders without affecting layout dimensions.
102
122
  */
103
123
  function applyBoxShadowBorder(classStyles) {
104
- const borderWidth = classStyles[CSS_BORDER_WIDTH];
105
- const borderColor = classStyles[CSS_BORDER_COLOR];
106
- if (!borderWidth || !borderColor) return classStyles;
107
124
  const stripImportant = (value) => value.replace(/\s*!important\s*$/, "");
108
125
  const hasImportant = (value) => value?.includes("!important") ?? false;
109
- const layers = [`inset 0 0 0 ${stripImportant(borderWidth)} ${stripImportant(borderColor)}`, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
110
- const needsImportant = hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
126
+ const isZeroWidth = (value) => !value || /^(0|0px|0rem|0em|0%)$/i.test(stripImportant(value).trim());
127
+ const negateLength = (value) => {
128
+ const normalized = stripImportant(value).trim();
129
+ if (/^(0|0px|0rem|0em|0%)$/i.test(normalized)) return "0";
130
+ return `calc(${normalized} * -1)`;
131
+ };
132
+ const borderWidth = classStyles[CSS_BORDER_WIDTH];
133
+ const borderColor = classStyles[CSS_BORDER_COLOR];
134
+ const topWidth = classStyles[CSS_BORDER_TOP_WIDTH] ?? borderWidth;
135
+ const rightWidth = classStyles[CSS_BORDER_RIGHT_WIDTH] ?? borderWidth;
136
+ const bottomWidth = classStyles[CSS_BORDER_BOTTOM_WIDTH] ?? borderWidth;
137
+ const leftWidth = classStyles[CSS_BORDER_LEFT_WIDTH] ?? borderWidth;
138
+ const topColor = classStyles[CSS_BORDER_TOP_COLOR] ?? borderColor;
139
+ const rightColor = classStyles[CSS_BORDER_RIGHT_COLOR] ?? borderColor;
140
+ const bottomColor = classStyles[CSS_BORDER_BOTTOM_COLOR] ?? borderColor;
141
+ const leftColor = classStyles[CSS_BORDER_LEFT_COLOR] ?? borderColor;
142
+ const borderLayers = [];
143
+ if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
144
+ if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
145
+ if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
146
+ if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
147
+ if (borderLayers.length === 0) return classStyles;
148
+ const layers = [...borderLayers, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
149
+ 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]);
111
150
  const newStyles = { ...classStyles };
112
151
  newStyles[CSS_BOX_SHADOW] = layers.join(", ") + (needsImportant ? " !important" : "");
113
152
  delete newStyles[CSS_BORDER_WIDTH];
114
153
  delete newStyles[CSS_BORDER_COLOR];
154
+ delete newStyles[CSS_BORDER_TOP_WIDTH];
155
+ delete newStyles[CSS_BORDER_RIGHT_WIDTH];
156
+ delete newStyles[CSS_BORDER_BOTTOM_WIDTH];
157
+ delete newStyles[CSS_BORDER_LEFT_WIDTH];
158
+ delete newStyles[CSS_BORDER_TOP_COLOR];
159
+ delete newStyles[CSS_BORDER_RIGHT_COLOR];
160
+ delete newStyles[CSS_BORDER_BOTTOM_COLOR];
161
+ delete newStyles[CSS_BORDER_LEFT_COLOR];
115
162
  return newStyles;
116
163
  }
117
164
  function generateClassName({ componentName, subComponentName, variantKey, variantValue, componentStateKey, componentStateValue, layer, layerOptionalPseudoSelector }) {
@@ -266,6 +313,43 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
266
313
  });
267
314
  }
268
315
  }
316
+ if ((componentName === "tabs" || componentName === "tab") && layer === "root") {
317
+ const schemaVariablesForKey = schema?.variables?.[schemaKey];
318
+ if (propertyKey === "borderWidth" && schemaVariablesForKey?.underlineWidth) {
319
+ const borderWidth = cssDeclarations[CSS_BORDER_WIDTH];
320
+ if (borderWidth) {
321
+ cssDeclarations[CSS_BORDER_TOP_WIDTH] = borderWidth;
322
+ cssDeclarations[CSS_BORDER_RIGHT_WIDTH] = borderWidth;
323
+ cssDeclarations[CSS_BORDER_BOTTOM_WIDTH] = borderWidth;
324
+ cssDeclarations[CSS_BORDER_LEFT_WIDTH] = borderWidth;
325
+ delete cssDeclarations[CSS_BORDER_WIDTH];
326
+ }
327
+ }
328
+ if (propertyKey === "borderColor" && schemaVariablesForKey?.underlineColor) {
329
+ const borderColor = cssDeclarations[CSS_BORDER_COLOR];
330
+ if (borderColor) {
331
+ cssDeclarations[CSS_BORDER_TOP_COLOR] = borderColor;
332
+ cssDeclarations[CSS_BORDER_RIGHT_COLOR] = borderColor;
333
+ cssDeclarations[CSS_BORDER_BOTTOM_COLOR] = borderColor;
334
+ cssDeclarations[CSS_BORDER_LEFT_COLOR] = borderColor;
335
+ delete cssDeclarations[CSS_BORDER_COLOR];
336
+ }
337
+ }
338
+ if (propertyKey === "underlineWidth") {
339
+ const underlineWidth = cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
340
+ if (underlineWidth) {
341
+ cssDeclarations[CSS_TAB_UNDERLINE_WIDTH] = underlineWidth;
342
+ delete cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
343
+ }
344
+ }
345
+ if (propertyKey === "underlineColor") {
346
+ const underlineColor = cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
347
+ if (underlineColor) {
348
+ cssDeclarations[CSS_TAB_UNDERLINE_COLOR] = underlineColor;
349
+ delete cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
350
+ }
351
+ }
352
+ }
269
353
  if (!styles[fullClassName]) styles[fullClassName] = {
270
354
  ...cssDeclarations,
271
355
  ...styles[fullClassName]
@@ -407,7 +491,20 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
407
491
  */
408
492
  const toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);
409
493
  if (toApply) {
410
- for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) styles[className] = applyBoxShadowBorder(styles[className]);
494
+ for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) {
495
+ const raw = styles[className];
496
+ if (toApply.componentName === "tab") {
497
+ const tabUnderlineWidth = raw[CSS_TAB_UNDERLINE_WIDTH];
498
+ const tabUnderlineColor = raw[CSS_TAB_UNDERLINE_COLOR];
499
+ const withoutTabUnderline = { ...raw };
500
+ delete withoutTabUnderline[CSS_TAB_UNDERLINE_WIDTH];
501
+ delete withoutTabUnderline[CSS_TAB_UNDERLINE_COLOR];
502
+ const merged = applyBoxShadowBorder(withoutTabUnderline);
503
+ if (tabUnderlineWidth !== void 0) merged[CSS_TAB_UNDERLINE_WIDTH] = tabUnderlineWidth;
504
+ if (tabUnderlineColor !== void 0) merged[CSS_TAB_UNDERLINE_COLOR] = tabUnderlineColor;
505
+ styles[className] = merged;
506
+ } else styles[className] = applyBoxShadowBorder(raw);
507
+ }
411
508
  }
412
509
  return styles;
413
510
  }
@@ -23,6 +23,16 @@ const CSS_LINE_HEIGHT = "line-height";
23
23
  const CSS_BORDER_WIDTH = "border-width";
24
24
  const CSS_BORDER_COLOR = "border-color";
25
25
  const CSS_BOX_SHADOW = "box-shadow";
26
+ const CSS_BORDER_TOP_WIDTH = "border-top-width";
27
+ const CSS_BORDER_RIGHT_WIDTH = "border-right-width";
28
+ const CSS_BORDER_BOTTOM_WIDTH = "border-bottom-width";
29
+ const CSS_BORDER_LEFT_WIDTH = "border-left-width";
30
+ const CSS_BORDER_TOP_COLOR = "border-top-color";
31
+ const CSS_BORDER_RIGHT_COLOR = "border-right-color";
32
+ const CSS_BORDER_BOTTOM_COLOR = "border-bottom-color";
33
+ const CSS_BORDER_LEFT_COLOR = "border-left-color";
34
+ const CSS_TAB_UNDERLINE_WIDTH = "--uds-tab-underline-width";
35
+ const CSS_TAB_UNDERLINE_COLOR = "--uds-tab-underline-color";
26
36
  function deepMerge(target, source) {
27
37
  return mergeWith({}, target, source);
28
38
  }
@@ -38,6 +48,14 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
38
48
  {
39
49
  componentName: "chip",
40
50
  layer: "root"
51
+ },
52
+ {
53
+ componentName: "tab",
54
+ layer: "root"
55
+ },
56
+ {
57
+ componentName: "tabs",
58
+ layer: "root"
41
59
  }
42
60
  ];
43
61
  /**
@@ -98,19 +116,48 @@ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey,
98
116
  * @example
99
117
  * Input: { border-width: '2px', border-color: 'red', box-shadow: '0 2px 4px rgba(0,0,0,0.1)' }
100
118
  * Output: { box-shadow: 'inset 0 0 0 2px red, 0 2px 4px rgba(0,0,0,0.1)' }
119
+ * Renders borders using inset box-shadows instead of CSS border widths.
120
+ * This preserves visual borders without affecting layout dimensions.
101
121
  */
102
122
  function applyBoxShadowBorder(classStyles) {
103
- const borderWidth = classStyles[CSS_BORDER_WIDTH];
104
- const borderColor = classStyles[CSS_BORDER_COLOR];
105
- if (!borderWidth || !borderColor) return classStyles;
106
123
  const stripImportant = (value) => value.replace(/\s*!important\s*$/, "");
107
124
  const hasImportant = (value) => value?.includes("!important") ?? false;
108
- const layers = [`inset 0 0 0 ${stripImportant(borderWidth)} ${stripImportant(borderColor)}`, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
109
- const needsImportant = hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
125
+ const isZeroWidth = (value) => !value || /^(0|0px|0rem|0em|0%)$/i.test(stripImportant(value).trim());
126
+ const negateLength = (value) => {
127
+ const normalized = stripImportant(value).trim();
128
+ if (/^(0|0px|0rem|0em|0%)$/i.test(normalized)) return "0";
129
+ return `calc(${normalized} * -1)`;
130
+ };
131
+ const borderWidth = classStyles[CSS_BORDER_WIDTH];
132
+ const borderColor = classStyles[CSS_BORDER_COLOR];
133
+ const topWidth = classStyles[CSS_BORDER_TOP_WIDTH] ?? borderWidth;
134
+ const rightWidth = classStyles[CSS_BORDER_RIGHT_WIDTH] ?? borderWidth;
135
+ const bottomWidth = classStyles[CSS_BORDER_BOTTOM_WIDTH] ?? borderWidth;
136
+ const leftWidth = classStyles[CSS_BORDER_LEFT_WIDTH] ?? borderWidth;
137
+ const topColor = classStyles[CSS_BORDER_TOP_COLOR] ?? borderColor;
138
+ const rightColor = classStyles[CSS_BORDER_RIGHT_COLOR] ?? borderColor;
139
+ const bottomColor = classStyles[CSS_BORDER_BOTTOM_COLOR] ?? borderColor;
140
+ const leftColor = classStyles[CSS_BORDER_LEFT_COLOR] ?? borderColor;
141
+ const borderLayers = [];
142
+ if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
143
+ if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
144
+ if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
145
+ if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
146
+ if (borderLayers.length === 0) return classStyles;
147
+ const layers = [...borderLayers, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
148
+ 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]);
110
149
  const newStyles = { ...classStyles };
111
150
  newStyles[CSS_BOX_SHADOW] = layers.join(", ") + (needsImportant ? " !important" : "");
112
151
  delete newStyles[CSS_BORDER_WIDTH];
113
152
  delete newStyles[CSS_BORDER_COLOR];
153
+ delete newStyles[CSS_BORDER_TOP_WIDTH];
154
+ delete newStyles[CSS_BORDER_RIGHT_WIDTH];
155
+ delete newStyles[CSS_BORDER_BOTTOM_WIDTH];
156
+ delete newStyles[CSS_BORDER_LEFT_WIDTH];
157
+ delete newStyles[CSS_BORDER_TOP_COLOR];
158
+ delete newStyles[CSS_BORDER_RIGHT_COLOR];
159
+ delete newStyles[CSS_BORDER_BOTTOM_COLOR];
160
+ delete newStyles[CSS_BORDER_LEFT_COLOR];
114
161
  return newStyles;
115
162
  }
116
163
  function generateClassName({ componentName, subComponentName, variantKey, variantValue, componentStateKey, componentStateValue, layer, layerOptionalPseudoSelector }) {
@@ -265,6 +312,43 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
265
312
  });
266
313
  }
267
314
  }
315
+ if ((componentName === "tabs" || componentName === "tab") && layer === "root") {
316
+ const schemaVariablesForKey = schema?.variables?.[schemaKey];
317
+ if (propertyKey === "borderWidth" && schemaVariablesForKey?.underlineWidth) {
318
+ const borderWidth = cssDeclarations[CSS_BORDER_WIDTH];
319
+ if (borderWidth) {
320
+ cssDeclarations[CSS_BORDER_TOP_WIDTH] = borderWidth;
321
+ cssDeclarations[CSS_BORDER_RIGHT_WIDTH] = borderWidth;
322
+ cssDeclarations[CSS_BORDER_BOTTOM_WIDTH] = borderWidth;
323
+ cssDeclarations[CSS_BORDER_LEFT_WIDTH] = borderWidth;
324
+ delete cssDeclarations[CSS_BORDER_WIDTH];
325
+ }
326
+ }
327
+ if (propertyKey === "borderColor" && schemaVariablesForKey?.underlineColor) {
328
+ const borderColor = cssDeclarations[CSS_BORDER_COLOR];
329
+ if (borderColor) {
330
+ cssDeclarations[CSS_BORDER_TOP_COLOR] = borderColor;
331
+ cssDeclarations[CSS_BORDER_RIGHT_COLOR] = borderColor;
332
+ cssDeclarations[CSS_BORDER_BOTTOM_COLOR] = borderColor;
333
+ cssDeclarations[CSS_BORDER_LEFT_COLOR] = borderColor;
334
+ delete cssDeclarations[CSS_BORDER_COLOR];
335
+ }
336
+ }
337
+ if (propertyKey === "underlineWidth") {
338
+ const underlineWidth = cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
339
+ if (underlineWidth) {
340
+ cssDeclarations[CSS_TAB_UNDERLINE_WIDTH] = underlineWidth;
341
+ delete cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
342
+ }
343
+ }
344
+ if (propertyKey === "underlineColor") {
345
+ const underlineColor = cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
346
+ if (underlineColor) {
347
+ cssDeclarations[CSS_TAB_UNDERLINE_COLOR] = underlineColor;
348
+ delete cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
349
+ }
350
+ }
351
+ }
268
352
  if (!styles[fullClassName]) styles[fullClassName] = {
269
353
  ...cssDeclarations,
270
354
  ...styles[fullClassName]
@@ -406,7 +490,20 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
406
490
  */
407
491
  const toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);
408
492
  if (toApply) {
409
- for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) styles[className] = applyBoxShadowBorder(styles[className]);
493
+ for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) {
494
+ const raw = styles[className];
495
+ if (toApply.componentName === "tab") {
496
+ const tabUnderlineWidth = raw[CSS_TAB_UNDERLINE_WIDTH];
497
+ const tabUnderlineColor = raw[CSS_TAB_UNDERLINE_COLOR];
498
+ const withoutTabUnderline = { ...raw };
499
+ delete withoutTabUnderline[CSS_TAB_UNDERLINE_WIDTH];
500
+ delete withoutTabUnderline[CSS_TAB_UNDERLINE_COLOR];
501
+ const merged = applyBoxShadowBorder(withoutTabUnderline);
502
+ if (tabUnderlineWidth !== void 0) merged[CSS_TAB_UNDERLINE_WIDTH] = tabUnderlineWidth;
503
+ if (tabUnderlineColor !== void 0) merged[CSS_TAB_UNDERLINE_COLOR] = tabUnderlineColor;
504
+ styles[className] = merged;
505
+ } else styles[className] = applyBoxShadowBorder(raw);
506
+ }
410
507
  }
411
508
  return styles;
412
509
  }