@yahoo/uds 3.169.1 → 3.170.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 (47) hide show
  1. package/dist/automated-config/dist/generated/autoVariantTemplates.cjs +218 -0
  2. package/dist/automated-config/dist/generated/autoVariantTemplates.js +218 -0
  3. package/dist/components/IconSlot.cjs +1 -1
  4. package/dist/components/IconSlot.js +1 -1
  5. package/dist/components/client/Button/Button.cjs +1 -1
  6. package/dist/components/client/Button/Button.js +1 -1
  7. package/dist/components/client/IconButton/IconButton.cjs +1 -1
  8. package/dist/components/client/IconButton/IconButton.js +1 -1
  9. package/dist/components/client/Menu/Menu.Content.cjs +1 -1
  10. package/dist/components/client/Menu/Menu.Content.js +1 -1
  11. package/dist/components/client/Popover/PopoverContent.cjs +1 -1
  12. package/dist/components/client/Popover/PopoverContent.js +1 -1
  13. package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
  14. package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
  15. package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +5 -5
  16. package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +5 -5
  17. package/dist/index.cjs +3 -3
  18. package/dist/index.js +3 -3
  19. package/dist/styles/styleVariantTemplates.cjs +146 -0
  20. package/dist/styles/styleVariantTemplates.d.cts +161 -0
  21. package/dist/styles/styleVariantTemplates.d.ts +161 -0
  22. package/dist/styles/styleVariantTemplates.js +145 -0
  23. package/dist/styles/styler.cjs +27 -32
  24. package/dist/styles/styler.d.cts +13 -289
  25. package/dist/styles/styler.d.ts +13 -289
  26. package/dist/styles/styler.js +27 -32
  27. package/dist/styles/stylerTypes.d.cts +1 -1
  28. package/dist/styles/stylerTypes.d.ts +1 -1
  29. package/dist/styles/udsTailwindMerge.cjs +522 -0
  30. package/dist/styles/udsTailwindMerge.d.cts +7 -0
  31. package/dist/styles/udsTailwindMerge.d.ts +7 -0
  32. package/dist/styles/udsTailwindMerge.js +520 -0
  33. package/dist/styles/variantClass.cjs +31 -0
  34. package/dist/styles/variantClass.d.cts +12 -0
  35. package/dist/styles/variantClass.d.ts +12 -0
  36. package/dist/styles/variantClass.js +30 -0
  37. package/dist/styles/variants.cjs +3 -2
  38. package/dist/styles/variants.js +1 -1
  39. package/dist/tokens/index.cjs +1 -1
  40. package/dist/tokens/index.js +1 -1
  41. package/dist/uds/generated/componentData.cjs +205 -205
  42. package/dist/uds/generated/componentData.js +205 -205
  43. package/dist/uds/generated/tailwindPurge.cjs +79 -79
  44. package/dist/uds/generated/tailwindPurge.js +79 -79
  45. package/generated/componentData.json +335 -335
  46. package/generated/tailwindPurge.ts +1 -1
  47. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
 
2
- import { CVA, CX } from "./stylerTypes.js";
2
+ import { variants } from "./variants.js";
3
+ import { CVA, CVAVariantSchema, CX } from "./stylerTypes.js";
3
4
 
4
5
  //#region src/styles/styler.d.ts
5
6
  /**
@@ -7,296 +8,19 @@ import { CVA, CX } from "./stylerTypes.js";
7
8
  * Code uses old-school JS to hyper optimize component rendering hot paths.
8
9
  **/
9
10
  declare function normalizeObject(props: Record<string, unknown>): Record<string, unknown>;
10
- declare const cx: CX<string>;
11
- declare const cva: CVA<string>;
12
11
  /**
13
- * !WARNING: The `@__PURE__` annotation below is load-bearing for tree-shaking — do not remove it.
14
- *
15
- * Without it, importing anything from this module (e.g. just `cx`) drags the full `variants`
16
- * map and the auto-generated `autoVariants` (~70 kB minified) into the bundle, because bundlers
17
- * must assume the module-level `cva(...)` call has side effects. With it, `getStylesInternal`
18
- * and its `variants` import are dropped when `getStyles` is unused.
12
+ * !WARNING: The `@__PURE__` annotation on the `createTailwindMerge(...)` call
13
+ * inside `./udsTailwindMerge.ts` is load-bearing for tree-shaking — without
14
+ * it, bundlers must assume the module-level call has side effects and keep
15
+ * the merge engine in any bundle that imports anything from this module. Do
16
+ * not remove it without re-checking bundle output (e.g. `esbuild --bundle
17
+ * --minify` an entry that imports a single lightweight export).
19
18
  */
20
- declare const getStylesInternal: (props?: ({
21
- avatarIconVariantRoot?: "primary" | "secondary" | "default" | undefined;
22
- avatarImageVariantRoot?: "primary" | "secondary" | "default" | undefined;
23
- avatarSizeIcon?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "default" | "2xs" | "3xl" | undefined;
24
- avatarSizeRoot?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "default" | "2xs" | "3xl" | undefined;
25
- avatarTextVariantRoot?: "primary" | "secondary" | "default" | undefined;
26
- badgeSizeIcon?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
27
- badgeSizeRoot?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
28
- badgeVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | undefined;
29
- badgeVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | undefined;
30
- bannerSizeClose?: "default" | undefined;
31
- bannerSizeDescription?: "default" | undefined;
32
- bannerSizeIcon?: "default" | undefined;
33
- bannerSizeRoot?: "default" | undefined;
34
- bannerSizeTitle?: "default" | undefined;
35
- bannerVariantDescription?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
36
- bannerVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
37
- bannerVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
38
- bannerVariantTitle?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
39
- bottomsheetVariantHandleIndicator?: "default" | undefined;
40
- bottomsheetVariantHeader?: "default" | undefined;
41
- bottomsheetVariantRoot?: "default" | undefined;
42
- buttonSizeIcon?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
43
- buttonSizeRoot?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
44
- buttonVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
45
- buttonVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
46
- checkboxSizeCheckbox?: "sm" | "md" | "default" | undefined;
47
- checkboxSizeRoot?: "sm" | "md" | "default" | undefined;
48
- checkboxVariantCheckbox?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
49
- checkboxVariantCheckboxIcon?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
50
- checkboxVariantRoot?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
51
- checkboxVariantValueCheckbox?: "checked" | "indeterminate" | "unchecked" | undefined;
52
- checkboxVariantValueCheckboxIcon?: "checked" | "indeterminate" | "unchecked" | undefined;
53
- checkboxVariantValueRoot?: "checked" | "indeterminate" | "unchecked" | undefined;
54
- chipDismissibleVariantIcon?: "primary" | "secondary" | "brand" | "brand-secondary" | "default" | undefined;
55
- chipDismissibleVariantRoot?: "primary" | "secondary" | "brand" | "brand-secondary" | "default" | undefined;
56
- chipLinkVariantIcon?: "primary" | "secondary" | "brand" | "brand-secondary" | "default" | undefined;
57
- chipLinkVariantRoot?: "primary" | "secondary" | "brand" | "brand-secondary" | "default" | undefined;
58
- chipSizeIcon?: "sm" | "md" | "default" | undefined;
59
- chipSizeRoot?: "sm" | "md" | "default" | undefined;
60
- chipToggleVariantActiveIcon?: "off" | "on" | undefined;
61
- chipToggleVariantActiveRoot?: "off" | "on" | undefined;
62
- chipToggleVariantIcon?: "primary" | "secondary" | "brand" | "brand-secondary" | "default" | undefined;
63
- chipToggleVariantRoot?: "primary" | "secondary" | "brand" | "brand-secondary" | "default" | undefined;
64
- dividerVariantLabel?: "primary" | "secondary" | "tertiary" | "muted" | "default" | undefined;
65
- dividerVariantLine?: "primary" | "secondary" | "tertiary" | "muted" | "default" | undefined;
66
- dividerVariantRoot?: "primary" | "secondary" | "tertiary" | "muted" | "default" | undefined;
67
- iconbuttonSizeIcon?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | undefined;
68
- iconbuttonSizeRoot?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | undefined;
69
- inputSizeEndIcon?: "md" | "lg" | "default" | undefined;
70
- inputSizeHelperIcon?: "md" | "lg" | "default" | undefined;
71
- inputSizeHelperText?: "md" | "lg" | "default" | undefined;
72
- inputSizeInput?: "md" | "lg" | "default" | undefined;
73
- inputSizeInputWrapperDynamic?: "md" | "lg" | "default" | undefined;
74
- inputSizeInputWrapperStatic?: "md" | "lg" | "default" | undefined;
75
- inputSizeLabel?: "md" | "lg" | "default" | undefined;
76
- inputSizeRoot?: "md" | "lg" | "default" | undefined;
77
- inputSizeStartIcon?: "md" | "lg" | "default" | undefined;
78
- inputVariantEndIcon?: "default" | undefined;
79
- inputVariantHelperIcon?: "default" | undefined;
80
- inputVariantHelperText?: "default" | undefined;
81
- inputVariantInput?: "default" | undefined;
82
- inputVariantInputPlaceholder?: "default" | undefined;
83
- inputVariantInputWrapper?: "default" | undefined;
84
- inputVariantLabel?: "default" | undefined;
85
- inputVariantLabelRequired?: "default" | undefined;
86
- inputVariantRoot?: "default" | undefined;
87
- inputVariantStartIcon?: "default" | undefined;
88
- inputVariantValueEndIcon?: "empty" | "filled" | undefined;
89
- inputVariantValueHelperIcon?: "empty" | "filled" | undefined;
90
- inputVariantValueHelperText?: "empty" | "filled" | undefined;
91
- inputVariantValueInput?: "empty" | "filled" | undefined;
92
- inputVariantValueInputPlaceholder?: "empty" | "filled" | undefined;
93
- inputVariantValueInputWrapper?: "empty" | "filled" | undefined;
94
- inputVariantValueLabel?: "empty" | "filled" | undefined;
95
- inputVariantValueLabelRequired?: "empty" | "filled" | undefined;
96
- inputVariantValueRoot?: "empty" | "filled" | undefined;
97
- inputVariantValueStartIcon?: "empty" | "filled" | undefined;
98
- linkTextStyleIcon?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "default" | undefined;
99
- linkTextStyleRoot?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "default" | undefined;
100
- linkVariantIconEnd?: "primary" | "secondary" | "tertiary" | "on-color" | "default" | undefined;
101
- linkVariantIconStart?: "primary" | "secondary" | "tertiary" | "on-color" | "default" | undefined;
102
- linkVariantRoot?: "primary" | "secondary" | "tertiary" | "on-color" | "default" | undefined;
103
- menucontentSizeRoot?: "default" | undefined;
104
- menucontentVariantRoot?: "default" | undefined;
105
- menuitemDividerVariantLine?: "default" | undefined;
106
- menuitemDividerVariantRoot?: "default" | undefined;
107
- menuitemDividerVariantText?: "default" | undefined;
108
- menuitemItemCheckboxVariantActiveEndIcon?: "off" | "on" | undefined;
109
- menuitemItemCheckboxVariantActiveRoot?: "off" | "on" | undefined;
110
- menuitemItemCheckboxVariantActiveStartIcon?: "off" | "on" | undefined;
111
- menuitemItemCheckboxVariantActiveText?: "off" | "on" | undefined;
112
- menuitemItemCheckboxVariantEndIcon?: "default" | undefined;
113
- menuitemItemCheckboxVariantRoot?: "default" | undefined;
114
- menuitemItemCheckboxVariantStartIcon?: "default" | undefined;
115
- menuitemItemCheckboxVariantText?: "default" | undefined;
116
- menuitemItemVariantActiveIcon?: "off" | "on" | undefined;
117
- menuitemItemVariantActiveRoot?: "off" | "on" | undefined;
118
- menuitemItemVariantActiveText?: "off" | "on" | undefined;
119
- menuitemItemVariantIcon?: "default" | undefined;
120
- menuitemItemVariantRoot?: "default" | undefined;
121
- menuitemItemVariantText?: "default" | undefined;
122
- menuitemSizeEndIcon?: "default" | undefined;
123
- menuitemSizeRoot?: "default" | undefined;
124
- menuitemSizeStartIcon?: "default" | undefined;
125
- menuitemSizeText?: "default" | undefined;
126
- modalSizeActions?: "default" | undefined;
127
- modalSizeCloseIcon?: "default" | undefined;
128
- modalSizeCloseIconContainer?: "default" | undefined;
129
- modalSizeDescription?: "default" | undefined;
130
- modalSizeHeader?: "default" | undefined;
131
- modalSizeRoot?: "default" | undefined;
132
- modalSizeScrim?: "default" | undefined;
133
- modalSizeSpacingHorizontal?: "default" | undefined;
134
- modalSizeTitle?: "default" | undefined;
135
- modalSizeTitleDescriptionWrapper?: "default" | undefined;
136
- modalVariantCloseIcon?: "default" | undefined;
137
- modalVariantDescription?: "default" | undefined;
138
- modalVariantRoot?: "default" | undefined;
139
- modalVariantTitle?: "default" | undefined;
140
- paddlenavSizeIcon?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | undefined;
141
- paddlenavSizeRoot?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | undefined;
142
- paddlenavVariantBackground?: "primary" | "secondary" | "tertiary" | "default" | undefined;
143
- paddlenavVariantIcon?: "primary" | "secondary" | "tertiary" | "default" | undefined;
144
- paddlenavVariantRoot?: "primary" | "secondary" | "tertiary" | "default" | undefined;
145
- paginationSizeIcon?: "sm" | "md" | "default" | undefined;
146
- paginationSizeItem?: "sm" | "md" | "default" | undefined;
147
- paginationSizeRoot?: "sm" | "md" | "default" | undefined;
148
- paginationSizeText?: "sm" | "md" | "default" | undefined;
149
- paginationVariantActiveRoot?: "off" | "on" | undefined;
150
- paginationVariantRoot?: "default" | undefined;
151
- popoverSizeCloseIcon?: "default" | undefined;
152
- popoverSizeCloseIconContainer?: "default" | undefined;
153
- popoverSizeContentWrapper?: "default" | undefined;
154
- popoverSizeRoot?: "default" | undefined;
155
- popoverSizeSvgBase?: "default" | undefined;
156
- popoverSizeSvgBorder?: "default" | undefined;
157
- popoverVariantBlur?: "default" | undefined;
158
- popoverVariantCloseIcon?: "default" | undefined;
159
- popoverVariantRoot?: "default" | undefined;
160
- popoverVariantSvgBase?: "default" | undefined;
161
- popoverVariantSvgBorder?: "default" | undefined;
162
- radioSizeRadio?: "sm" | "md" | "default" | undefined;
163
- radioSizeRoot?: "sm" | "md" | "default" | undefined;
164
- radioVariantRadio?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
165
- radioVariantRadioCircle?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
166
- radioVariantRoot?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
167
- radioVariantValueRadio?: "checked" | "unchecked" | undefined;
168
- radioVariantValueRadioCircle?: "checked" | "unchecked" | undefined;
169
- radioVariantValueRoot?: "checked" | "unchecked" | undefined;
170
- scrimVariantRoot?: "default" | undefined;
171
- selectVariantRoot?: "default" | undefined;
172
- selectcontentSizeRoot?: "default" | undefined;
173
- selectcontentVariantRoot?: "default" | undefined;
174
- selectitemDividerVariantLine?: "default" | undefined;
175
- selectitemDividerVariantRoot?: "default" | undefined;
176
- selectitemDividerVariantText?: "default" | undefined;
177
- selectitemItemVariantActiveIcon?: "off" | "on" | undefined;
178
- selectitemItemVariantActiveRoot?: "off" | "on" | undefined;
179
- selectitemItemVariantActiveText?: "off" | "on" | undefined;
180
- selectitemItemVariantIcon?: "default" | undefined;
181
- selectitemItemVariantRoot?: "default" | undefined;
182
- selectitemItemVariantText?: "default" | undefined;
183
- selectitemSizeEndIcon?: "default" | undefined;
184
- selectitemSizeRoot?: "default" | undefined;
185
- selectitemSizeStartIcon?: "default" | undefined;
186
- selectitemSizeText?: "default" | undefined;
187
- switchSizeHandle?: "sm" | "md" | "default" | undefined;
188
- switchSizeHandleIcon?: "sm" | "md" | "default" | undefined;
189
- switchSizeRoot?: "sm" | "md" | "default" | undefined;
190
- switchSizeSwitch?: "sm" | "md" | "default" | undefined;
191
- switchVariantActiveHandle?: "off" | "on" | undefined;
192
- switchVariantActiveHandleIcon?: "off" | "on" | undefined;
193
- switchVariantActiveRoot?: "off" | "on" | undefined;
194
- switchVariantActiveSwitch?: "off" | "on" | undefined;
195
- switchVariantHandle?: "default" | undefined;
196
- switchVariantHandleIcon?: "default" | undefined;
197
- switchVariantRoot?: "default" | undefined;
198
- switchVariantSwitch?: "default" | undefined;
199
- tabSizeIcon?: "default" | undefined;
200
- tabSizeRoot?: "default" | undefined;
201
- tabVariantActiveIcon?: "off" | "on" | undefined;
202
- tabVariantActiveRoot?: "off" | "on" | undefined;
203
- tabVariantIcon?: "primary" | "secondary" | "default" | undefined;
204
- tabVariantRoot?: "primary" | "secondary" | "default" | undefined;
205
- tabsVariantRoot?: "primary" | "secondary" | "default" | undefined;
206
- toastSizeActionButton?: "default" | undefined;
207
- toastSizeCloseIcon?: "default" | undefined;
208
- toastSizeIcon?: "default" | undefined;
209
- toastSizeLabel?: "default" | undefined;
210
- toastSizeRoot?: "default" | undefined;
211
- toastVariantActionButton?: "warning" | "info" | "loading" | "default" | "success" | "error" | undefined;
212
- toastVariantCloseIcon?: "warning" | "info" | "loading" | "default" | "success" | "error" | undefined;
213
- toastVariantIcon?: "warning" | "info" | "loading" | "default" | "success" | "error" | undefined;
214
- toastVariantRoot?: "warning" | "info" | "loading" | "default" | "success" | "error" | undefined;
215
- tooltipSizeBody?: "default" | undefined;
216
- tooltipSizeEndContent?: "default" | undefined;
217
- tooltipSizeIcon?: "default" | undefined;
218
- tooltipSizeRoot?: "default" | undefined;
219
- tooltipSizeSvg?: "default" | undefined;
220
- tooltipSizeTitle?: "default" | undefined;
221
- tooltipVariantBlur?: "default" | undefined;
222
- tooltipVariantIcon?: "default" | undefined;
223
- tooltipVariantRoot?: "default" | undefined;
224
- tooltipVariantSvg?: "default" | undefined;
225
- color?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "tertiary" | "muted" | "on-color" | undefined;
226
- placeholderColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "tertiary" | "muted" | "on-color" | undefined;
227
- fontFamily?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "sans" | "sans-alt" | "serif" | "serif-alt" | "mono" | undefined;
228
- fontSize?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
229
- fontWeight?: "black" | "thin" | "medium" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "bold" | "extralight" | "light" | "regular" | "semibold" | "extrabold" | undefined;
230
- lineHeight?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
231
- letterSpacing?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
232
- textAlign?: "center" | "justify" | "start" | "end" | undefined;
233
- textTransform?: "none" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "uppercase" | "lowercase" | "capitalize" | undefined;
234
- spacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
235
- spacingHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
236
- spacingVertical?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
237
- spacingBottom?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
238
- spacingEnd?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
239
- spacingStart?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
240
- spacingTop?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
241
- offset?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
242
- offsetVertical?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
243
- offsetHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
244
- offsetBottom?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
245
- offsetEnd?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
246
- offsetStart?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
247
- offsetTop?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
248
- columnGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
249
- rowGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
250
- backgroundColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
251
- borderColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
252
- borderStartColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
253
- borderEndColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
254
- borderBottomColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
255
- borderTopColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
256
- borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
257
- borderTopStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
258
- borderTopEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
259
- borderBottomStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
260
- borderBottomEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
261
- borderWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
262
- borderVerticalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
263
- borderHorizontalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
264
- borderStartWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
265
- borderEndWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
266
- borderTopWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
267
- borderBottomWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
268
- avatarSize?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "2xs" | "3xl" | undefined;
269
- iconSize?: "xs" | "sm" | "md" | "lg" | undefined;
270
- alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
271
- alignItems?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
272
- alignSelf?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | "auto" | undefined;
273
- flex?: "1" | "none" | "auto" | "initial" | undefined;
274
- flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
275
- flexGrow?: "0" | "1" | "2" | "3" | undefined;
276
- flexShrink?: "0" | "1" | undefined;
277
- flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
278
- justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | undefined;
279
- flexBasis?: "min-content" | undefined;
280
- display?: "flex" | "table" | "none" | "block" | "inline-block" | "inline" | "inline-flex" | "inline-table" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row-group" | "table-row" | "flow-root" | "grid" | "contents" | undefined;
281
- overflow?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
282
- overflowX?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
283
- overflowY?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
284
- position?: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined;
285
- contentFit?: "none" | "fill" | "cover" | "contain" | "scale-down" | undefined;
286
- colorMode?: "light" | "dark" | undefined;
287
- scaleMode?: "small" | "medium" | "xSmall" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
288
- width?: "full" | "fit" | "screen" | undefined;
289
- height?: "full" | "fit" | "screen" | undefined;
290
- dropShadow?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
291
- insetShadow?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "xs-invert" | "sm-invert" | "md-invert" | "lg-invert" | "xl-invert" | "2xl-invert" | undefined;
292
- nestedBorderRadiusSize?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
293
- nestedBorderRadiusWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
294
- nestedBorderRadiusSpacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
295
- nestedBorderRadius?: boolean | "first" | "last" | undefined;
296
- } & {
297
- className?: string | undefined;
298
- }) | undefined) => string;
299
- type GetStylesInternalProps = Parameters<typeof getStylesInternal>[0];
19
+ declare const cx: CX<string>;
20
+ declare const cva: CVA<string>;
21
+ type GetStylesInternalProps = (CVAVariantSchema<string, typeof variants> & {
22
+ className?: string;
23
+ }) | undefined;
300
24
  declare const getStylesCacheKeySymbol: unique symbol;
301
25
  declare const getStyles: (props: GetStylesInternalProps, onHit?: () => void) => string;
302
26
  //#endregion
@@ -1,10 +1,9 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  import { getFeatureFlags } from "../flags.js";
3
3
  import { falsyToString } from "../utils/falsyToString.js";
4
- import { variants } from "./variants.js";
5
- import { backgroundColors, borderRadii, borderWidthsWithElevation, foregroundColors, lineColors, spectrumColors, textVariants } from "@yahoo/uds/fixtures";
4
+ import { udsTwMerge } from "./udsTailwindMerge.js";
5
+ import { resolveVariantClass } from "./variantClass.js";
6
6
  import { clsx } from "clsx";
7
- import { extendTailwindMerge } from "tailwind-merge";
8
7
  //#region src/styles/styler.ts
9
8
  const createObjectWithoutPrototype = () => Object.create(null);
10
9
  const { useGetStylesCache, skipTailwindMerge } = getFeatureFlags();
@@ -22,32 +21,16 @@ function normalizeObject(props) {
22
21
  return sorted;
23
22
  }
24
23
  /**
25
- * !WARNING: The `@__PURE__` annotation below is load-bearing for tree-shaking — do not remove it.
26
- *
27
- * Without it, bundlers must assume this module-level call has side effects and keep it (plus
28
- * `tailwind-merge` and the fixtures color lists it references) in any bundle that imports
29
- * anything from this module. Do not rename/wrap the call without re-checking bundle output
30
- * (e.g. `esbuild --bundle --minify` an entry that imports a single lightweight export).
24
+ * !WARNING: The `@__PURE__` annotation on the `createTailwindMerge(...)` call
25
+ * inside `./udsTailwindMerge.ts` is load-bearing for tree-shaking — without
26
+ * it, bundlers must assume the module-level call has side effects and keep
27
+ * the merge engine in any bundle that imports anything from this module. Do
28
+ * not remove it without re-checking bundle output (e.g. `esbuild --bundle
29
+ * --minify` an entry that imports a single lightweight export).
31
30
  */
32
- const twMerge = /* @__PURE__ */ extendTailwindMerge({
33
- extend: { theme: {
34
- borderColor: lineColors,
35
- borderWidth: borderWidthsWithElevation,
36
- borderRadius: borderRadii
37
- } },
38
- override: {
39
- classGroups: {
40
- "text-color": [{ text: [...foregroundColors, ...spectrumColors] }],
41
- "bg-color": [{ bg: backgroundColors }],
42
- "font-family": [{ font: ["icons", ...textVariants] }],
43
- leading: [{ leading: textVariants }]
44
- },
45
- conflictingClassGroups: {}
46
- }
47
- });
48
31
  const cx = (...inputs) => {
49
32
  const finalClassName = clsx(inputs);
50
- return skipTailwindMerge ? finalClassName : twMerge(finalClassName);
33
+ return skipTailwindMerge ? finalClassName : udsTwMerge(finalClassName);
51
34
  };
52
35
  const cva = (config) => {
53
36
  const { base, variants, defaultVariants, compoundVariants } = config;
@@ -92,14 +75,26 @@ const cva = (config) => {
92
75
  };
93
76
  };
94
77
  /**
95
- * !WARNING: The `@__PURE__` annotation below is load-bearing for tree-shaking — do not remove it.
78
+ * Resolves style/variant props to class names via template substitution
79
+ * (`./variantClass.ts`) instead of a `cva({ variants })` lookup, so neither
80
+ * the hand-written `variants` map nor the auto-generated `autoVariants` map
81
+ * (~70 kB minified combined) ships in the client bundle. Output is identical:
82
+ * the templates are exhaustively verified against the maps in
83
+ * `variantClass.test.ts`.
96
84
  *
97
- * Without it, importing anything from this module (e.g. just `cx`) drags the full `variants`
98
- * map and the auto-generated `autoVariants` (~70 kB minified) into the bundle, because bundlers
99
- * must assume the module-level `cva(...)` call has side effects. With it, `getStylesInternal`
100
- * and its `variants` import are dropped when `getStyles` is unused.
85
+ * !WARNING: This mirrors the `cva()` hot path same iteration order, same
86
+ * `cx` merge and is equally performance-sensitive. Benchmark before changing.
101
87
  */
102
- const getStylesInternal = /* @__PURE__ */ cva({ variants });
88
+ const getStylesInternal = (maybeProps) => {
89
+ if (!maybeProps) return cx();
90
+ const { className, ...props } = maybeProps;
91
+ const variantClassNames = [];
92
+ for (const prop in props) {
93
+ const propValue = props[prop];
94
+ variantClassNames.push(resolveVariantClass(prop, falsyToString(propValue)));
95
+ }
96
+ return cx(variantClassNames, className);
97
+ };
103
98
  const styleCache = /* @__PURE__ */ new Map();
104
99
  const getStylesCacheKeySymbol = Symbol("getStylesCacheKey");
105
100
  const generateCacheKey = (props) => {
@@ -36,4 +36,4 @@ type StylePropsVariants<ReturnType> = { [key in keyof Required<StyleProps>]: Rec
36
36
  scaleMode: Record<ScaleMode, string>;
37
37
  } & StylePropsVariantsAuto<ReturnType>;
38
38
  //#endregion
39
- export { type CVA, type CX, type StylePropsVariants };
39
+ export { type CVA, type CVAVariantSchema, type CX, type StylePropsVariants };
@@ -36,4 +36,4 @@ type StylePropsVariants<ReturnType> = { [key in keyof Required<StyleProps>]: Rec
36
36
  scaleMode: Record<ScaleMode, string>;
37
37
  } & StylePropsVariantsAuto<ReturnType>;
38
38
  //#endregion
39
- export { type CVA, type CX, type StylePropsVariants };
39
+ export { type CVA, type CVAVariantSchema, type CX, type StylePropsVariants };