@vaneui/ui 0.1.2 → 0.1.4

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 (77) hide show
  1. package/README.md +13 -1
  2. package/dist/components/complex/index.d.ts +1 -0
  3. package/dist/components/complex/index.js +132 -0
  4. package/dist/components/complex/index.js.map +1 -0
  5. package/dist/components/complex/sharer.d.ts +39 -0
  6. package/dist/components/themeContext.d.ts +50 -0
  7. package/dist/components/themedComponent.d.ts +7 -0
  8. package/dist/components/ui/badge.d.ts +3 -0
  9. package/dist/components/ui/button.d.ts +3 -0
  10. package/dist/components/ui/card.d.ts +3 -0
  11. package/dist/components/ui/chip.d.ts +3 -0
  12. package/dist/components/ui/classes/appearanceClasses.d.ts +13 -0
  13. package/dist/components/ui/classes/spacingClasses.d.ts +2 -0
  14. package/dist/components/ui/classes/typographyClasses.d.ts +4 -0
  15. package/dist/components/ui/col.d.ts +3 -0
  16. package/dist/components/ui/container.d.ts +3 -0
  17. package/dist/components/ui/divider.d.ts +3 -0
  18. package/dist/components/ui/grid.d.ts +4 -0
  19. package/dist/components/ui/layout.d.ts +7 -0
  20. package/dist/components/ui/props/index.d.ts +1 -0
  21. package/dist/components/ui/props/keys.d.ts +83 -0
  22. package/dist/components/ui/props/props.d.ts +43 -0
  23. package/dist/components/ui/row.d.ts +3 -0
  24. package/dist/components/ui/section.d.ts +3 -0
  25. package/dist/components/ui/stack.d.ts +3 -0
  26. package/dist/components/ui/theme/appearance/layoutAppearanceTheme.d.ts +10 -0
  27. package/dist/components/ui/theme/appearance/textAppearanceTheme.d.ts +10 -0
  28. package/dist/components/ui/theme/appearance/variantTheme.d.ts +15 -0
  29. package/dist/components/ui/theme/badgeTheme.d.ts +32 -0
  30. package/dist/components/ui/theme/buttonTheme.d.ts +32 -0
  31. package/dist/components/ui/theme/cardTheme.d.ts +37 -0
  32. package/dist/components/ui/theme/chipTheme.d.ts +32 -0
  33. package/dist/components/ui/theme/colTheme.d.ts +15 -0
  34. package/dist/components/ui/theme/common/ComponentTheme.d.ts +52 -0
  35. package/dist/components/ui/theme/common/baseTheme.d.ts +12 -0
  36. package/dist/components/ui/theme/containerTheme.d.ts +31 -0
  37. package/dist/components/ui/theme/dividerTheme.d.ts +9 -0
  38. package/dist/components/ui/theme/gridTheme.d.ts +10 -0
  39. package/dist/components/ui/theme/layout/borderTheme.d.ts +9 -0
  40. package/dist/components/ui/theme/layout/directionTheme.d.ts +9 -0
  41. package/dist/components/ui/theme/layout/displayTheme.d.ts +9 -0
  42. package/dist/components/ui/theme/layout/hideTheme.d.ts +9 -0
  43. package/dist/components/ui/theme/layout/itemsTheme.d.ts +9 -0
  44. package/dist/components/ui/theme/layout/justifyTheme.d.ts +9 -0
  45. package/dist/components/ui/theme/layout/positionTheme.d.ts +9 -0
  46. package/dist/components/ui/theme/layout/radiusTheme.d.ts +9 -0
  47. package/dist/components/ui/theme/layout/ringTheme.d.ts +9 -0
  48. package/dist/components/ui/theme/layout/shadowTheme.d.ts +9 -0
  49. package/dist/components/ui/theme/layout/wrapTheme.d.ts +9 -0
  50. package/dist/components/ui/theme/rowTheme.d.ts +15 -0
  51. package/dist/components/ui/theme/sectionTheme.d.ts +34 -0
  52. package/dist/components/ui/theme/size/breakpointTheme.d.ts +9 -0
  53. package/dist/components/ui/theme/size/gapTheme.d.ts +9 -0
  54. package/dist/components/ui/theme/size/pxTheme.d.ts +9 -0
  55. package/dist/components/ui/theme/size/pyTheme.d.ts +9 -0
  56. package/dist/components/ui/theme/size/sizeTheme.d.ts +9 -0
  57. package/dist/components/ui/theme/stackTheme.d.ts +19 -0
  58. package/dist/components/ui/theme/typography/fontFamilyTheme.d.ts +9 -0
  59. package/dist/components/ui/theme/typography/fontStyleTheme.d.ts +9 -0
  60. package/dist/components/ui/theme/typography/fontWeightTheme.d.ts +9 -0
  61. package/dist/components/ui/theme/typography/textAlignTheme.d.ts +9 -0
  62. package/dist/components/ui/theme/typography/textDecorationTheme.d.ts +9 -0
  63. package/dist/components/ui/theme/typography/textTransformTheme.d.ts +9 -0
  64. package/dist/components/ui/theme/typographyComponentTheme.d.ts +22 -0
  65. package/dist/components/ui/typography.d.ts +9 -0
  66. package/dist/components/utils/componentUtils.d.ts +4 -0
  67. package/dist/components/utils/deepMerge.d.ts +4 -0
  68. package/dist/components/utils/deepPartial.d.ts +3 -0
  69. package/dist/components/utils/tests/deepMerge.test.d.ts +1 -0
  70. package/dist/index.d.ts +8 -0
  71. package/dist/index.esm.js +4690 -0
  72. package/dist/index.esm.js.map +1 -0
  73. package/dist/index.js +4759 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/ui.css +1968 -0
  76. package/dist/vars.css +132 -0
  77. package/package.json +19 -5
package/dist/index.js ADDED
@@ -0,0 +1,4759 @@
1
+ 'use client';
2
+
3
+ 'use strict';
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var react = require('react');
7
+
8
+ /**
9
+ * Base Theme class that all theme types will extend
10
+ */
11
+ class BaseTheme {
12
+ }
13
+
14
+ const MODE_KEYS = ['base', 'hover', 'active'];
15
+ const SIZE_KEYS = ['xs', 'sm', 'md', 'lg', 'xl'];
16
+ const VARIANT_KEYS = ['filled', 'outline'];
17
+ const UI_APPEARANCE_KEYS = ['default', 'accent', 'primary', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info'];
18
+ const BG_APPEARANCE_KEYS = [...UI_APPEARANCE_KEYS, 'transparent'];
19
+ const TEXT_APPEARANCE_KEYS = [...UI_APPEARANCE_KEYS, 'muted', 'link'];
20
+ const FONT_FAMILY_KEYS = ['sans', 'serif', 'mono'];
21
+ const FONT_WEIGHT_KEYS = ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'];
22
+ const FONT_STYLE_KEYS = ['italic', 'notItalic'];
23
+ const TEXT_DECORATION_KEYS = ['underline', 'lineThrough', 'noUnderline', 'overline'];
24
+ const TEXT_TRANSFORM_KEYS = ['uppercase', 'lowercase', 'capitalize', 'normalCase'];
25
+ const TEXT_ALIGN_KEYS = ['textLeft', 'textCenter', 'textRight', 'textJustify'];
26
+ const BORDER_KEYS = ['border', 'noBorder'];
27
+ const SHADOW_KEYS = ['shadow', 'noShadow'];
28
+ const RING_KEYS = ['ring', 'noRing'];
29
+ const PADDING_KEYS = ['padding', 'noPadding'];
30
+ const BREAKPOINT_KEYS = ['xsCol', 'smCol', 'mdCol', 'lgCol', 'xlCol'];
31
+ const HIDE_KEYS = ['xsHide', 'smHide', 'mdHide', 'lgHide', 'xlHide'];
32
+ const POSITION_KEYS = ['relative', 'absolute', 'fixed', 'sticky', 'static'];
33
+ const DIRECTION_REVERSE_KEYS = ['reverse'];
34
+ const GAP_KEYS = ['gap', 'noGap'];
35
+ const PILL_KEYS = ['pill'];
36
+ const SHARP_KEYS = ['sharp'];
37
+ const ROUNDED_KEYS = ['rounded'];
38
+ const SHAPE_KEYS = [...PILL_KEYS, ...SHARP_KEYS, ...ROUNDED_KEYS];
39
+ const FLEX_DIRECTION_KEYS = ['row', 'column', 'rowReverse', 'columnReverse'];
40
+ const ITEMS_KEYS = ['itemsStart', 'itemsEnd', 'itemsCenter', 'itemsBaseline', 'itemsStretch'];
41
+ const JUSTIFY_KEYS = ['justifyStart', 'justifyEnd', 'justifyCenter', 'justifyBetween', 'justifyAround', 'justifyEvenly', 'justifyStretch', 'justifyBaseline'];
42
+ const WRAP_KEYS = ['flexWrap', 'flexNoWrap', 'flexWrapReverse'];
43
+ const DISPLAY_KEYS = ['inline', 'block', 'inlineBlock', 'flex', 'inlineFlex', 'grid', 'inlineGrid', 'contents', 'table', 'tableCell', 'hidden'];
44
+ // A master list of all groups where only one key can be 'true' at a time.
45
+ const EXCLUSIVE_KEY_GROUPS = [
46
+ MODE_KEYS,
47
+ SIZE_KEYS,
48
+ TEXT_APPEARANCE_KEYS,
49
+ BG_APPEARANCE_KEYS,
50
+ UI_APPEARANCE_KEYS,
51
+ VARIANT_KEYS,
52
+ FONT_FAMILY_KEYS,
53
+ FONT_WEIGHT_KEYS,
54
+ FONT_STYLE_KEYS,
55
+ TEXT_DECORATION_KEYS,
56
+ TEXT_TRANSFORM_KEYS,
57
+ TEXT_ALIGN_KEYS,
58
+ BORDER_KEYS,
59
+ SHADOW_KEYS,
60
+ RING_KEYS,
61
+ PADDING_KEYS,
62
+ BREAKPOINT_KEYS,
63
+ HIDE_KEYS,
64
+ POSITION_KEYS,
65
+ DIRECTION_REVERSE_KEYS,
66
+ GAP_KEYS,
67
+ SHAPE_KEYS,
68
+ FLEX_DIRECTION_KEYS,
69
+ ITEMS_KEYS,
70
+ JUSTIFY_KEYS,
71
+ WRAP_KEYS,
72
+ DISPLAY_KEYS,
73
+ ];
74
+ // Base component keys
75
+ const BASE_COMPONENT_KEYS = [
76
+ ...SIZE_KEYS,
77
+ ...HIDE_KEYS,
78
+ ...ITEMS_KEYS,
79
+ ...JUSTIFY_KEYS,
80
+ ...POSITION_KEYS,
81
+ ...DISPLAY_KEYS
82
+ ];
83
+ // Font keys
84
+ const FONT_KEYS = [
85
+ ...FONT_WEIGHT_KEYS,
86
+ ...FONT_STYLE_KEYS,
87
+ ...TEXT_DECORATION_KEYS,
88
+ ...TEXT_TRANSFORM_KEYS,
89
+ ...FONT_FAMILY_KEYS,
90
+ ...TEXT_APPEARANCE_KEYS,
91
+ ...TEXT_ALIGN_KEYS
92
+ ];
93
+ // Typography component keys
94
+ const TYPOGRAPHY_COMPONENT_KEYS = [
95
+ ...BASE_COMPONENT_KEYS,
96
+ ...FONT_KEYS
97
+ ];
98
+ // Button keys
99
+ const BUTTON_KEYS = [
100
+ ...TYPOGRAPHY_COMPONENT_KEYS,
101
+ ...SHAPE_KEYS,
102
+ ...BORDER_KEYS,
103
+ ...SHADOW_KEYS,
104
+ ...RING_KEYS,
105
+ ...GAP_KEYS,
106
+ ...PADDING_KEYS,
107
+ ...VARIANT_KEYS,
108
+ ...TEXT_APPEARANCE_KEYS
109
+ ];
110
+ // Grid keys
111
+ const GRID_KEYS = [
112
+ ...BASE_COMPONENT_KEYS,
113
+ ...GAP_KEYS,
114
+ ...BG_APPEARANCE_KEYS
115
+ ];
116
+ // Row keys
117
+ const ROW_KEYS = [
118
+ ...BASE_COMPONENT_KEYS,
119
+ ...WRAP_KEYS,
120
+ ...GAP_KEYS,
121
+ ...DIRECTION_REVERSE_KEYS,
122
+ ...BREAKPOINT_KEYS,
123
+ ...BG_APPEARANCE_KEYS
124
+ ];
125
+ // Col keys
126
+ const COL_KEYS = [
127
+ ...BASE_COMPONENT_KEYS,
128
+ ...WRAP_KEYS,
129
+ ...GAP_KEYS,
130
+ ...DIRECTION_REVERSE_KEYS,
131
+ ...BG_APPEARANCE_KEYS
132
+ ];
133
+ // Card keys
134
+ const CARD_KEYS = [
135
+ ...TYPOGRAPHY_COMPONENT_KEYS,
136
+ ...GAP_KEYS,
137
+ ...SHARP_KEYS,
138
+ ...ROUNDED_KEYS,
139
+ ...BREAKPOINT_KEYS,
140
+ ...BG_APPEARANCE_KEYS,
141
+ ...BORDER_KEYS,
142
+ ...RING_KEYS,
143
+ ...SHADOW_KEYS,
144
+ ...PADDING_KEYS,
145
+ ...FLEX_DIRECTION_KEYS,
146
+ ...DIRECTION_REVERSE_KEYS,
147
+ ...WRAP_KEYS
148
+ ];
149
+ // Stack keys
150
+ const STACK_KEYS = [
151
+ ...BASE_COMPONENT_KEYS,
152
+ ...WRAP_KEYS,
153
+ ...GAP_KEYS,
154
+ ...DIRECTION_REVERSE_KEYS,
155
+ ...BREAKPOINT_KEYS,
156
+ ...BG_APPEARANCE_KEYS,
157
+ ...FLEX_DIRECTION_KEYS,
158
+ ...PADDING_KEYS
159
+ ];
160
+ // Badge keys
161
+ const BADGE_KEYS = [
162
+ ...TYPOGRAPHY_COMPONENT_KEYS,
163
+ ...SHAPE_KEYS,
164
+ ...VARIANT_KEYS,
165
+ ...SHADOW_KEYS,
166
+ ...BORDER_KEYS,
167
+ ...RING_KEYS,
168
+ ...GAP_KEYS,
169
+ ...PADDING_KEYS,
170
+ ...TEXT_APPEARANCE_KEYS
171
+ ];
172
+ // Chip keys
173
+ const CHIP_KEYS = [
174
+ ...TYPOGRAPHY_COMPONENT_KEYS,
175
+ ...SHAPE_KEYS,
176
+ ...VARIANT_KEYS,
177
+ ...SHADOW_KEYS,
178
+ ...BORDER_KEYS,
179
+ ...RING_KEYS,
180
+ ...GAP_KEYS,
181
+ ...PADDING_KEYS,
182
+ ...TEXT_APPEARANCE_KEYS
183
+ ];
184
+ // Divider keys
185
+ const DIVIDER_KEYS = [
186
+ ...BASE_COMPONENT_KEYS,
187
+ ...BG_APPEARANCE_KEYS
188
+ ];
189
+ // Container keys
190
+ const CONTAINER_KEYS = [
191
+ ...BASE_COMPONENT_KEYS,
192
+ ...BG_APPEARANCE_KEYS,
193
+ ...BORDER_KEYS,
194
+ ...SHADOW_KEYS,
195
+ ...RING_KEYS,
196
+ ...GAP_KEYS,
197
+ ...SHAPE_KEYS
198
+ ];
199
+ // Section keys
200
+ const SECTION_KEYS = [
201
+ ...BASE_COMPONENT_KEYS,
202
+ ...FLEX_DIRECTION_KEYS,
203
+ ...BG_APPEARANCE_KEYS,
204
+ ...PADDING_KEYS,
205
+ ...DIRECTION_REVERSE_KEYS,
206
+ ...WRAP_KEYS,
207
+ ...BREAKPOINT_KEYS,
208
+ ...GAP_KEYS,
209
+ ...BORDER_KEYS,
210
+ ...SHADOW_KEYS,
211
+ ...RING_KEYS,
212
+ ...SHAPE_KEYS,
213
+ ];
214
+
215
+ /**
216
+ * Pick the first truthy key from props, then from defaults, then undefined.
217
+ */
218
+ function pickFirstTruthyKey(props, defaults, keys) {
219
+ let falsyKeys = [];
220
+ for (const k of keys) {
221
+ const p = props[k];
222
+ if (p === true)
223
+ return k;
224
+ if (p === false)
225
+ falsyKeys.push(k);
226
+ }
227
+ for (const k of keys) {
228
+ const d = defaults[k];
229
+ if (d === true && !falsyKeys.includes(k))
230
+ return k;
231
+ }
232
+ return undefined;
233
+ }
234
+
235
+ class HideTheme extends BaseTheme {
236
+ constructor(initialConfig) {
237
+ super();
238
+ HIDE_KEYS.forEach((key) => {
239
+ var _a;
240
+ this[key] = (_a = initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig[key]) !== null && _a !== void 0 ? _a : HideTheme.defaultClasses[key];
241
+ });
242
+ }
243
+ getClasses(props, defaults) {
244
+ const key = pickFirstTruthyKey(props, defaults, HIDE_KEYS);
245
+ return [key ? this[key] : ''];
246
+ }
247
+ }
248
+ HideTheme.defaultClasses = {
249
+ xsHide: "max-xs:hidden",
250
+ smHide: "max-sm:hidden",
251
+ mdHide: "max-md:hidden",
252
+ lgHide: "max-lg:hidden",
253
+ xlHide: "max-xl:hidden"
254
+ };
255
+
256
+ class ItemsTheme extends BaseTheme {
257
+ constructor(initialConfig) {
258
+ super();
259
+ ITEMS_KEYS.forEach((key) => {
260
+ var _a;
261
+ this[key] = (_a = initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig[key]) !== null && _a !== void 0 ? _a : ItemsTheme.defaultClasses[key];
262
+ });
263
+ }
264
+ getClasses(props, defaults) {
265
+ const pickedKey = pickFirstTruthyKey(props, defaults, ITEMS_KEYS);
266
+ return [pickedKey && this[pickedKey] ? this[pickedKey] : ''];
267
+ }
268
+ }
269
+ ItemsTheme.defaultClasses = {
270
+ itemsStart: "items-start",
271
+ itemsEnd: "items-end",
272
+ itemsCenter: "items-center",
273
+ itemsBaseline: "items-baseline",
274
+ itemsStretch: "items-stretch",
275
+ };
276
+
277
+ class JustifyTheme extends BaseTheme {
278
+ constructor(initialConfig) {
279
+ super();
280
+ JUSTIFY_KEYS.forEach((key) => {
281
+ var _a;
282
+ this[key] = (_a = initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig[key]) !== null && _a !== void 0 ? _a : JustifyTheme.defaultClasses[key];
283
+ });
284
+ }
285
+ getClasses(props, defaults) {
286
+ const key = pickFirstTruthyKey(props, defaults, JUSTIFY_KEYS);
287
+ return [key ? this[key] : ''];
288
+ }
289
+ }
290
+ JustifyTheme.defaultClasses = {
291
+ justifyStart: "justify-start",
292
+ justifyEnd: "justify-end",
293
+ justifyCenter: "justify-center",
294
+ justifyBetween: "justify-between",
295
+ justifyAround: "justify-around",
296
+ justifyEvenly: "justify-evenly",
297
+ justifyStretch: "justify-stretch",
298
+ justifyBaseline: "justify-baseline",
299
+ };
300
+
301
+ class PositionTheme extends BaseTheme {
302
+ constructor(initialConfig) {
303
+ super();
304
+ POSITION_KEYS.forEach((key) => {
305
+ var _a;
306
+ this[key] = (_a = initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig[key]) !== null && _a !== void 0 ? _a : PositionTheme.defaultClasses[key];
307
+ });
308
+ }
309
+ getClasses(props, defaults) {
310
+ const key = pickFirstTruthyKey(props, defaults, POSITION_KEYS);
311
+ return [key ? this[key] : ''];
312
+ }
313
+ }
314
+ PositionTheme.defaultClasses = {
315
+ relative: "relative",
316
+ absolute: "absolute",
317
+ fixed: "fixed",
318
+ sticky: "sticky",
319
+ static: "static"
320
+ };
321
+
322
+ class FontStyleTheme extends BaseTheme {
323
+ constructor(initial) {
324
+ super();
325
+ FONT_STYLE_KEYS.forEach((key) => {
326
+ var _a;
327
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : FontStyleTheme.defaultClasses[key];
328
+ });
329
+ }
330
+ getClasses(props, defaults) {
331
+ const key = pickFirstTruthyKey(props, defaults, FONT_STYLE_KEYS);
332
+ return [key ? this[key] : '']; // No default for font style
333
+ }
334
+ }
335
+ FontStyleTheme.defaultClasses = {
336
+ italic: "italic",
337
+ notItalic: "not-italic",
338
+ };
339
+
340
+ class FontFamilyTheme extends BaseTheme {
341
+ constructor(initial) {
342
+ super();
343
+ FONT_FAMILY_KEYS.forEach((key) => {
344
+ var _a;
345
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : FontFamilyTheme.defaultClasses[key];
346
+ });
347
+ }
348
+ getClasses(props, defaults) {
349
+ const key = pickFirstTruthyKey(props, defaults, FONT_FAMILY_KEYS);
350
+ return [this[key !== null && key !== void 0 ? key : 'sans'] || ''];
351
+ }
352
+ }
353
+ FontFamilyTheme.defaultClasses = {
354
+ sans: "font-sans",
355
+ serif: "font-serif",
356
+ mono: "font-mono",
357
+ };
358
+
359
+ class FontWeightTheme extends BaseTheme {
360
+ constructor(initial) {
361
+ super();
362
+ FONT_WEIGHT_KEYS.forEach((key) => {
363
+ var _a;
364
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : FontWeightTheme.defaultClasses[key];
365
+ });
366
+ }
367
+ getClasses(props, defaults) {
368
+ const key = pickFirstTruthyKey(props, defaults, FONT_WEIGHT_KEYS);
369
+ return [this[key !== null && key !== void 0 ? key : 'normal'] || '']; // Default to 'normal' if no key is provided
370
+ }
371
+ }
372
+ FontWeightTheme.defaultClasses = {
373
+ thin: "font-thin",
374
+ extralight: "font-extralight",
375
+ light: "font-light",
376
+ normal: "font-normal",
377
+ medium: "font-medium",
378
+ semibold: "font-semibold",
379
+ bold: "font-bold",
380
+ extrabold: "font-extrabold",
381
+ black: "font-black",
382
+ };
383
+
384
+ class TextDecorationTheme extends BaseTheme {
385
+ constructor(initial) {
386
+ super();
387
+ TEXT_DECORATION_KEYS.forEach((key) => {
388
+ var _a;
389
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : TextDecorationTheme.defaultClasses[key];
390
+ });
391
+ }
392
+ getClasses(props, defaults) {
393
+ const key = pickFirstTruthyKey(props, defaults, TEXT_DECORATION_KEYS);
394
+ return [key ? this[key] : '']; // No default for text decoration
395
+ }
396
+ }
397
+ TextDecorationTheme.defaultClasses = {
398
+ underline: "underline",
399
+ lineThrough: "line-through",
400
+ noUnderline: "no-underline",
401
+ overline: "overline",
402
+ };
403
+
404
+ class TextTransformTheme extends BaseTheme {
405
+ constructor(initial) {
406
+ super();
407
+ TEXT_TRANSFORM_KEYS.forEach((key) => {
408
+ var _a;
409
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : TextTransformTheme.defaultClasses[key];
410
+ });
411
+ }
412
+ getClasses(props, defaults) {
413
+ const key = pickFirstTruthyKey(props, defaults, TEXT_TRANSFORM_KEYS);
414
+ return [key ? this[key] : '']; // No default for text transform
415
+ }
416
+ }
417
+ TextTransformTheme.defaultClasses = {
418
+ uppercase: "uppercase",
419
+ lowercase: "lowercase",
420
+ capitalize: "capitalize",
421
+ normalCase: "normal-case",
422
+ };
423
+
424
+ class TextAlignTheme extends BaseTheme {
425
+ constructor(initial) {
426
+ super();
427
+ TEXT_ALIGN_KEYS.forEach((key) => {
428
+ var _a;
429
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : TextAlignTheme.defaultClasses[key];
430
+ });
431
+ }
432
+ getClasses(props, defaults) {
433
+ const key = pickFirstTruthyKey(props, defaults, TEXT_ALIGN_KEYS);
434
+ return [key ? this[key] : '']; // No default for text align
435
+ }
436
+ }
437
+ TextAlignTheme.defaultClasses = {
438
+ textLeft: "text-left",
439
+ textCenter: "text-center",
440
+ textRight: "text-right",
441
+ textJustify: "text-justify",
442
+ };
443
+
444
+ const isObject = (item) => {
445
+ return item !== null && typeof item === 'object' && !Array.isArray(item);
446
+ };
447
+ const deepMerge = (target, source) => {
448
+ const output = Object.assign(Object.create(Object.getPrototypeOf(target)), target);
449
+ for (const key in source) {
450
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
451
+ const sourceValue = source[key];
452
+ const targetValue = output[key];
453
+ if (sourceValue === undefined) {
454
+ continue;
455
+ }
456
+ // Special case: If the key is 'defaults', use the contextual mergeDefaults function.
457
+ if (key === 'defaults' &&
458
+ isObject(targetValue) &&
459
+ isObject(sourceValue)) {
460
+ output[key] = mergeDefaults(targetValue, sourceValue);
461
+ }
462
+ // For all other objects, use the standard recursive deep merge.
463
+ else if (isObject(targetValue) && isObject(sourceValue)) {
464
+ output[key] = deepMerge(targetValue, sourceValue);
465
+ }
466
+ // For non-object values, just assign the value from the source.
467
+ else {
468
+ output[key] = sourceValue;
469
+ }
470
+ }
471
+ }
472
+ return output;
473
+ };
474
+ const deepClone = (source) => {
475
+ if (!isObject(source)) {
476
+ return source;
477
+ }
478
+ const output = Object.assign(Object.create(Object.getPrototypeOf(source)), source);
479
+ for (const key in output) {
480
+ if (Object.prototype.hasOwnProperty.call(output, key)) {
481
+ output[key] = deepClone(output[key]);
482
+ }
483
+ }
484
+ return output;
485
+ };
486
+ const findGroup = (key) => EXCLUSIVE_KEY_GROUPS.find(group => group.includes(key));
487
+ const mergeDefaults = (baseDefaults, overrideDefaults) => {
488
+ const finalDefaults = { ...baseDefaults };
489
+ // Iterate over the override keys to apply them.
490
+ for (const key in overrideDefaults) {
491
+ if (Object.prototype.hasOwnProperty.call(overrideDefaults, key)) {
492
+ const overrideValue = overrideDefaults[key];
493
+ // If the override is setting a key to true...
494
+ if (overrideValue) {
495
+ // Find the exclusive group this key belongs to (e.g., SIZE_KEYS).
496
+ const group = findGroup(key);
497
+ // If the key is part of an exclusive group...
498
+ if (group) {
499
+ // ...set all other keys in that group to false.
500
+ group.forEach(groupKey => {
501
+ if (groupKey !== key) {
502
+ finalDefaults[groupKey] = false;
503
+ }
504
+ });
505
+ }
506
+ }
507
+ finalDefaults[key] = overrideValue;
508
+ }
509
+ }
510
+ return finalDefaults;
511
+ };
512
+
513
+ class DisplayTheme extends BaseTheme {
514
+ constructor(initialConfig) {
515
+ super();
516
+ DISPLAY_KEYS.forEach((key) => {
517
+ var _a;
518
+ this[key] = (_a = initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig[key]) !== null && _a !== void 0 ? _a : DisplayTheme.defaultClasses[key];
519
+ });
520
+ }
521
+ getClasses(props, defaults) {
522
+ const pickedKey = pickFirstTruthyKey(props, defaults, DISPLAY_KEYS);
523
+ return [pickedKey && this[pickedKey] ? this[pickedKey] : ''];
524
+ }
525
+ }
526
+ DisplayTheme.defaultClasses = {
527
+ inline: "inline",
528
+ block: "block",
529
+ inlineBlock: "inline-block",
530
+ flex: "flex",
531
+ inlineFlex: "inline-flex",
532
+ grid: "grid",
533
+ inlineGrid: "inline-grid",
534
+ contents: "contents",
535
+ table: "table",
536
+ tableCell: "table-cell",
537
+ hidden: "hidden"
538
+ };
539
+
540
+ const CLASS_PART_SEPARATOR = '-';
541
+ const createClassGroupUtils = config => {
542
+ const classMap = createClassMap(config);
543
+ const {
544
+ conflictingClassGroups,
545
+ conflictingClassGroupModifiers
546
+ } = config;
547
+ const getClassGroupId = className => {
548
+ const classParts = className.split(CLASS_PART_SEPARATOR);
549
+ // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.
550
+ if (classParts[0] === '' && classParts.length !== 1) {
551
+ classParts.shift();
552
+ }
553
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
554
+ };
555
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
556
+ const conflicts = conflictingClassGroups[classGroupId] || [];
557
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
558
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
559
+ }
560
+ return conflicts;
561
+ };
562
+ return {
563
+ getClassGroupId,
564
+ getConflictingClassGroupIds
565
+ };
566
+ };
567
+ const getGroupRecursive = (classParts, classPartObject) => {
568
+ if (classParts.length === 0) {
569
+ return classPartObject.classGroupId;
570
+ }
571
+ const currentClassPart = classParts[0];
572
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
573
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
574
+ if (classGroupFromNextClassPart) {
575
+ return classGroupFromNextClassPart;
576
+ }
577
+ if (classPartObject.validators.length === 0) {
578
+ return undefined;
579
+ }
580
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
581
+ return classPartObject.validators.find(({
582
+ validator
583
+ }) => validator(classRest))?.classGroupId;
584
+ };
585
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
586
+ const getGroupIdForArbitraryProperty = className => {
587
+ if (arbitraryPropertyRegex.test(className)) {
588
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
589
+ const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
590
+ if (property) {
591
+ // I use two dots here because one dot is used as prefix for class groups in plugins
592
+ return 'arbitrary..' + property;
593
+ }
594
+ }
595
+ };
596
+ /**
597
+ * Exported for testing only
598
+ */
599
+ const createClassMap = config => {
600
+ const {
601
+ theme,
602
+ classGroups
603
+ } = config;
604
+ const classMap = {
605
+ nextPart: new Map(),
606
+ validators: []
607
+ };
608
+ for (const classGroupId in classGroups) {
609
+ processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
610
+ }
611
+ return classMap;
612
+ };
613
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
614
+ classGroup.forEach(classDefinition => {
615
+ if (typeof classDefinition === 'string') {
616
+ const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
617
+ classPartObjectToEdit.classGroupId = classGroupId;
618
+ return;
619
+ }
620
+ if (typeof classDefinition === 'function') {
621
+ if (isThemeGetter(classDefinition)) {
622
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
623
+ return;
624
+ }
625
+ classPartObject.validators.push({
626
+ validator: classDefinition,
627
+ classGroupId
628
+ });
629
+ return;
630
+ }
631
+ Object.entries(classDefinition).forEach(([key, classGroup]) => {
632
+ processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
633
+ });
634
+ });
635
+ };
636
+ const getPart = (classPartObject, path) => {
637
+ let currentClassPartObject = classPartObject;
638
+ path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
639
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
640
+ currentClassPartObject.nextPart.set(pathPart, {
641
+ nextPart: new Map(),
642
+ validators: []
643
+ });
644
+ }
645
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
646
+ });
647
+ return currentClassPartObject;
648
+ };
649
+ const isThemeGetter = func => func.isThemeGetter;
650
+
651
+ // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
652
+ const createLruCache = maxCacheSize => {
653
+ if (maxCacheSize < 1) {
654
+ return {
655
+ get: () => undefined,
656
+ set: () => {}
657
+ };
658
+ }
659
+ let cacheSize = 0;
660
+ let cache = new Map();
661
+ let previousCache = new Map();
662
+ const update = (key, value) => {
663
+ cache.set(key, value);
664
+ cacheSize++;
665
+ if (cacheSize > maxCacheSize) {
666
+ cacheSize = 0;
667
+ previousCache = cache;
668
+ cache = new Map();
669
+ }
670
+ };
671
+ return {
672
+ get(key) {
673
+ let value = cache.get(key);
674
+ if (value !== undefined) {
675
+ return value;
676
+ }
677
+ if ((value = previousCache.get(key)) !== undefined) {
678
+ update(key, value);
679
+ return value;
680
+ }
681
+ },
682
+ set(key, value) {
683
+ if (cache.has(key)) {
684
+ cache.set(key, value);
685
+ } else {
686
+ update(key, value);
687
+ }
688
+ }
689
+ };
690
+ };
691
+ const IMPORTANT_MODIFIER = '!';
692
+ const MODIFIER_SEPARATOR = ':';
693
+ const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
694
+ const createParseClassName = config => {
695
+ const {
696
+ prefix,
697
+ experimentalParseClassName
698
+ } = config;
699
+ /**
700
+ * Parse class name into parts.
701
+ *
702
+ * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
703
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
704
+ */
705
+ let parseClassName = className => {
706
+ const modifiers = [];
707
+ let bracketDepth = 0;
708
+ let parenDepth = 0;
709
+ let modifierStart = 0;
710
+ let postfixModifierPosition;
711
+ for (let index = 0; index < className.length; index++) {
712
+ let currentCharacter = className[index];
713
+ if (bracketDepth === 0 && parenDepth === 0) {
714
+ if (currentCharacter === MODIFIER_SEPARATOR) {
715
+ modifiers.push(className.slice(modifierStart, index));
716
+ modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
717
+ continue;
718
+ }
719
+ if (currentCharacter === '/') {
720
+ postfixModifierPosition = index;
721
+ continue;
722
+ }
723
+ }
724
+ if (currentCharacter === '[') {
725
+ bracketDepth++;
726
+ } else if (currentCharacter === ']') {
727
+ bracketDepth--;
728
+ } else if (currentCharacter === '(') {
729
+ parenDepth++;
730
+ } else if (currentCharacter === ')') {
731
+ parenDepth--;
732
+ }
733
+ }
734
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
735
+ const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
736
+ const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
737
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
738
+ return {
739
+ modifiers,
740
+ hasImportantModifier,
741
+ baseClassName,
742
+ maybePostfixModifierPosition
743
+ };
744
+ };
745
+ if (prefix) {
746
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
747
+ const parseClassNameOriginal = parseClassName;
748
+ parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
749
+ isExternal: true,
750
+ modifiers: [],
751
+ hasImportantModifier: false,
752
+ baseClassName: className,
753
+ maybePostfixModifierPosition: undefined
754
+ };
755
+ }
756
+ if (experimentalParseClassName) {
757
+ const parseClassNameOriginal = parseClassName;
758
+ parseClassName = className => experimentalParseClassName({
759
+ className,
760
+ parseClassName: parseClassNameOriginal
761
+ });
762
+ }
763
+ return parseClassName;
764
+ };
765
+ const stripImportantModifier = baseClassName => {
766
+ if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
767
+ return baseClassName.substring(0, baseClassName.length - 1);
768
+ }
769
+ /**
770
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
771
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
772
+ */
773
+ if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
774
+ return baseClassName.substring(1);
775
+ }
776
+ return baseClassName;
777
+ };
778
+
779
+ /**
780
+ * Sorts modifiers according to following schema:
781
+ * - Predefined modifiers are sorted alphabetically
782
+ * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
783
+ */
784
+ const createSortModifiers = config => {
785
+ const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(modifier => [modifier, true]));
786
+ const sortModifiers = modifiers => {
787
+ if (modifiers.length <= 1) {
788
+ return modifiers;
789
+ }
790
+ const sortedModifiers = [];
791
+ let unsortedModifiers = [];
792
+ modifiers.forEach(modifier => {
793
+ const isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];
794
+ if (isPositionSensitive) {
795
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
796
+ unsortedModifiers = [];
797
+ } else {
798
+ unsortedModifiers.push(modifier);
799
+ }
800
+ });
801
+ sortedModifiers.push(...unsortedModifiers.sort());
802
+ return sortedModifiers;
803
+ };
804
+ return sortModifiers;
805
+ };
806
+ const createConfigUtils = config => ({
807
+ cache: createLruCache(config.cacheSize),
808
+ parseClassName: createParseClassName(config),
809
+ sortModifiers: createSortModifiers(config),
810
+ ...createClassGroupUtils(config)
811
+ });
812
+ const SPLIT_CLASSES_REGEX = /\s+/;
813
+ const mergeClassList = (classList, configUtils) => {
814
+ const {
815
+ parseClassName,
816
+ getClassGroupId,
817
+ getConflictingClassGroupIds,
818
+ sortModifiers
819
+ } = configUtils;
820
+ /**
821
+ * Set of classGroupIds in following format:
822
+ * `{importantModifier}{variantModifiers}{classGroupId}`
823
+ * @example 'float'
824
+ * @example 'hover:focus:bg-color'
825
+ * @example 'md:!pr'
826
+ */
827
+ const classGroupsInConflict = [];
828
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
829
+ let result = '';
830
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
831
+ const originalClassName = classNames[index];
832
+ const {
833
+ isExternal,
834
+ modifiers,
835
+ hasImportantModifier,
836
+ baseClassName,
837
+ maybePostfixModifierPosition
838
+ } = parseClassName(originalClassName);
839
+ if (isExternal) {
840
+ result = originalClassName + (result.length > 0 ? ' ' + result : result);
841
+ continue;
842
+ }
843
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
844
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
845
+ if (!classGroupId) {
846
+ if (!hasPostfixModifier) {
847
+ // Not a Tailwind class
848
+ result = originalClassName + (result.length > 0 ? ' ' + result : result);
849
+ continue;
850
+ }
851
+ classGroupId = getClassGroupId(baseClassName);
852
+ if (!classGroupId) {
853
+ // Not a Tailwind class
854
+ result = originalClassName + (result.length > 0 ? ' ' + result : result);
855
+ continue;
856
+ }
857
+ hasPostfixModifier = false;
858
+ }
859
+ const variantModifier = sortModifiers(modifiers).join(':');
860
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
861
+ const classId = modifierId + classGroupId;
862
+ if (classGroupsInConflict.includes(classId)) {
863
+ // Tailwind class omitted due to conflict
864
+ continue;
865
+ }
866
+ classGroupsInConflict.push(classId);
867
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
868
+ for (let i = 0; i < conflictGroups.length; ++i) {
869
+ const group = conflictGroups[i];
870
+ classGroupsInConflict.push(modifierId + group);
871
+ }
872
+ // Tailwind class not in conflict
873
+ result = originalClassName + (result.length > 0 ? ' ' + result : result);
874
+ }
875
+ return result;
876
+ };
877
+
878
+ /**
879
+ * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
880
+ *
881
+ * Specifically:
882
+ * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
883
+ * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
884
+ *
885
+ * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
886
+ */
887
+ function twJoin() {
888
+ let index = 0;
889
+ let argument;
890
+ let resolvedValue;
891
+ let string = '';
892
+ while (index < arguments.length) {
893
+ if (argument = arguments[index++]) {
894
+ if (resolvedValue = toValue(argument)) {
895
+ string && (string += ' ');
896
+ string += resolvedValue;
897
+ }
898
+ }
899
+ }
900
+ return string;
901
+ }
902
+ const toValue = mix => {
903
+ if (typeof mix === 'string') {
904
+ return mix;
905
+ }
906
+ let resolvedValue;
907
+ let string = '';
908
+ for (let k = 0; k < mix.length; k++) {
909
+ if (mix[k]) {
910
+ if (resolvedValue = toValue(mix[k])) {
911
+ string && (string += ' ');
912
+ string += resolvedValue;
913
+ }
914
+ }
915
+ }
916
+ return string;
917
+ };
918
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
919
+ let configUtils;
920
+ let cacheGet;
921
+ let cacheSet;
922
+ let functionToCall = initTailwindMerge;
923
+ function initTailwindMerge(classList) {
924
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
925
+ configUtils = createConfigUtils(config);
926
+ cacheGet = configUtils.cache.get;
927
+ cacheSet = configUtils.cache.set;
928
+ functionToCall = tailwindMerge;
929
+ return tailwindMerge(classList);
930
+ }
931
+ function tailwindMerge(classList) {
932
+ const cachedResult = cacheGet(classList);
933
+ if (cachedResult) {
934
+ return cachedResult;
935
+ }
936
+ const result = mergeClassList(classList, configUtils);
937
+ cacheSet(classList, result);
938
+ return result;
939
+ }
940
+ return function callTailwindMerge() {
941
+ return functionToCall(twJoin.apply(null, arguments));
942
+ };
943
+ }
944
+ const fromTheme = key => {
945
+ const themeGetter = theme => theme[key] || [];
946
+ themeGetter.isThemeGetter = true;
947
+ return themeGetter;
948
+ };
949
+ const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
950
+ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
951
+ const fractionRegex = /^\d+\/\d+$/;
952
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
953
+ const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
954
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
955
+ // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
956
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
957
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
958
+ const isFraction = value => fractionRegex.test(value);
959
+ const isNumber = value => Boolean(value) && !Number.isNaN(Number(value));
960
+ const isInteger = value => Boolean(value) && Number.isInteger(Number(value));
961
+ const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
962
+ const isTshirtSize = value => tshirtUnitRegex.test(value);
963
+ const isAny = () => true;
964
+ const isLengthOnly = value =>
965
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
966
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
967
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
968
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
969
+ const isNever = () => false;
970
+ const isShadow = value => shadowRegex.test(value);
971
+ const isImage = value => imageRegex.test(value);
972
+ const isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);
973
+ const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);
974
+ const isArbitraryValue = value => arbitraryValueRegex.test(value);
975
+ const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
976
+ const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
977
+ const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
978
+ const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
979
+ const isArbitraryShadow = value => getIsArbitraryValue(value, isNever, isShadow);
980
+ const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
981
+ const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
982
+ const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
983
+ const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);
984
+ const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
985
+ const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
986
+ const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
987
+ // Helpers
988
+ const getIsArbitraryValue = (value, testLabel, testValue) => {
989
+ const result = arbitraryValueRegex.exec(value);
990
+ if (result) {
991
+ if (result[1]) {
992
+ return testLabel(result[1]);
993
+ }
994
+ return testValue(result[2]);
995
+ }
996
+ return false;
997
+ };
998
+ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
999
+ const result = arbitraryVariableRegex.exec(value);
1000
+ if (result) {
1001
+ if (result[1]) {
1002
+ return testLabel(result[1]);
1003
+ }
1004
+ return shouldMatchNoLabel;
1005
+ }
1006
+ return false;
1007
+ };
1008
+ // Labels
1009
+ const isLabelPosition = label => label === 'position';
1010
+ const imageLabels = /*#__PURE__*/new Set(['image', 'url']);
1011
+ const isLabelImage = label => imageLabels.has(label);
1012
+ const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
1013
+ const isLabelSize = label => sizeLabels.has(label);
1014
+ const isLabelLength = label => label === 'length';
1015
+ const isLabelNumber = label => label === 'number';
1016
+ const isLabelFamilyName = label => label === 'family-name';
1017
+ const isLabelShadow = label => label === 'shadow';
1018
+ const getDefaultConfig = () => {
1019
+ /**
1020
+ * Theme getters for theme variable namespaces
1021
+ * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
1022
+ */
1023
+ /***/
1024
+ const themeColor = fromTheme('color');
1025
+ const themeFont = fromTheme('font');
1026
+ const themeText = fromTheme('text');
1027
+ const themeFontWeight = fromTheme('font-weight');
1028
+ const themeTracking = fromTheme('tracking');
1029
+ const themeLeading = fromTheme('leading');
1030
+ const themeBreakpoint = fromTheme('breakpoint');
1031
+ const themeContainer = fromTheme('container');
1032
+ const themeSpacing = fromTheme('spacing');
1033
+ const themeRadius = fromTheme('radius');
1034
+ const themeShadow = fromTheme('shadow');
1035
+ const themeInsetShadow = fromTheme('inset-shadow');
1036
+ const themeDropShadow = fromTheme('drop-shadow');
1037
+ const themeBlur = fromTheme('blur');
1038
+ const themePerspective = fromTheme('perspective');
1039
+ const themeAspect = fromTheme('aspect');
1040
+ const themeEase = fromTheme('ease');
1041
+ const themeAnimate = fromTheme('animate');
1042
+ /**
1043
+ * Helpers to avoid repeating the same scales
1044
+ *
1045
+ * We use functions that create a new array every time they're called instead of static arrays.
1046
+ * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
1047
+ */
1048
+ /***/
1049
+ const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
1050
+ const scalePosition = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
1051
+ const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
1052
+ const scaleOverscroll = () => ['auto', 'contain', 'none'];
1053
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
1054
+ const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];
1055
+ const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];
1056
+ const scaleGridColRowStartAndEnd = () => ['auto', {
1057
+ span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]
1058
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
1059
+ const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
1060
+ const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
1061
+ const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline'];
1062
+ const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch'];
1063
+ const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
1064
+ const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
1065
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
1066
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
1067
+ const scaleRadius = () => [
1068
+ // Deprecated since Tailwind CSS v4.0.0
1069
+ '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];
1070
+ const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
1071
+ const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
1072
+ const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
1073
+ const scaleBlur = () => [
1074
+ // Deprecated since Tailwind CSS v4.0.0
1075
+ '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
1076
+ const scaleOrigin = () => ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryVariable, isArbitraryValue];
1077
+ const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
1078
+ const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
1079
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
1080
+ const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];
1081
+ return {
1082
+ cacheSize: 500,
1083
+ theme: {
1084
+ animate: ['spin', 'ping', 'pulse', 'bounce'],
1085
+ aspect: ['video'],
1086
+ blur: [isTshirtSize],
1087
+ breakpoint: [isTshirtSize],
1088
+ color: [isAny],
1089
+ container: [isTshirtSize],
1090
+ 'drop-shadow': [isTshirtSize],
1091
+ ease: ['in', 'out', 'in-out'],
1092
+ font: [isAnyNonArbitrary],
1093
+ 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],
1094
+ 'inset-shadow': [isTshirtSize],
1095
+ leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],
1096
+ perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],
1097
+ radius: [isTshirtSize],
1098
+ shadow: [isTshirtSize],
1099
+ spacing: ['px', isNumber],
1100
+ text: [isTshirtSize],
1101
+ tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
1102
+ },
1103
+ classGroups: {
1104
+ // --------------
1105
+ // --- Layout ---
1106
+ // --------------
1107
+ /**
1108
+ * Aspect Ratio
1109
+ * @see https://tailwindcss.com/docs/aspect-ratio
1110
+ */
1111
+ aspect: [{
1112
+ aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
1113
+ }],
1114
+ /**
1115
+ * Container
1116
+ * @see https://tailwindcss.com/docs/container
1117
+ * @deprecated since Tailwind CSS v4.0.0
1118
+ */
1119
+ container: ['container'],
1120
+ /**
1121
+ * Columns
1122
+ * @see https://tailwindcss.com/docs/columns
1123
+ */
1124
+ columns: [{
1125
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
1126
+ }],
1127
+ /**
1128
+ * Break After
1129
+ * @see https://tailwindcss.com/docs/break-after
1130
+ */
1131
+ 'break-after': [{
1132
+ 'break-after': scaleBreak()
1133
+ }],
1134
+ /**
1135
+ * Break Before
1136
+ * @see https://tailwindcss.com/docs/break-before
1137
+ */
1138
+ 'break-before': [{
1139
+ 'break-before': scaleBreak()
1140
+ }],
1141
+ /**
1142
+ * Break Inside
1143
+ * @see https://tailwindcss.com/docs/break-inside
1144
+ */
1145
+ 'break-inside': [{
1146
+ 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']
1147
+ }],
1148
+ /**
1149
+ * Box Decoration Break
1150
+ * @see https://tailwindcss.com/docs/box-decoration-break
1151
+ */
1152
+ 'box-decoration': [{
1153
+ 'box-decoration': ['slice', 'clone']
1154
+ }],
1155
+ /**
1156
+ * Box Sizing
1157
+ * @see https://tailwindcss.com/docs/box-sizing
1158
+ */
1159
+ box: [{
1160
+ box: ['border', 'content']
1161
+ }],
1162
+ /**
1163
+ * Display
1164
+ * @see https://tailwindcss.com/docs/display
1165
+ */
1166
+ display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', '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', 'inline-grid', 'contents', 'list-item', 'hidden'],
1167
+ /**
1168
+ * Screen Reader Only
1169
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
1170
+ */
1171
+ sr: ['sr-only', 'not-sr-only'],
1172
+ /**
1173
+ * Floats
1174
+ * @see https://tailwindcss.com/docs/float
1175
+ */
1176
+ float: [{
1177
+ float: ['right', 'left', 'none', 'start', 'end']
1178
+ }],
1179
+ /**
1180
+ * Clear
1181
+ * @see https://tailwindcss.com/docs/clear
1182
+ */
1183
+ clear: [{
1184
+ clear: ['left', 'right', 'both', 'none', 'start', 'end']
1185
+ }],
1186
+ /**
1187
+ * Isolation
1188
+ * @see https://tailwindcss.com/docs/isolation
1189
+ */
1190
+ isolation: ['isolate', 'isolation-auto'],
1191
+ /**
1192
+ * Object Fit
1193
+ * @see https://tailwindcss.com/docs/object-fit
1194
+ */
1195
+ 'object-fit': [{
1196
+ object: ['contain', 'cover', 'fill', 'none', 'scale-down']
1197
+ }],
1198
+ /**
1199
+ * Object Position
1200
+ * @see https://tailwindcss.com/docs/object-position
1201
+ */
1202
+ 'object-position': [{
1203
+ object: [...scalePosition(), isArbitraryValue, isArbitraryVariable]
1204
+ }],
1205
+ /**
1206
+ * Overflow
1207
+ * @see https://tailwindcss.com/docs/overflow
1208
+ */
1209
+ overflow: [{
1210
+ overflow: scaleOverflow()
1211
+ }],
1212
+ /**
1213
+ * Overflow X
1214
+ * @see https://tailwindcss.com/docs/overflow
1215
+ */
1216
+ 'overflow-x': [{
1217
+ 'overflow-x': scaleOverflow()
1218
+ }],
1219
+ /**
1220
+ * Overflow Y
1221
+ * @see https://tailwindcss.com/docs/overflow
1222
+ */
1223
+ 'overflow-y': [{
1224
+ 'overflow-y': scaleOverflow()
1225
+ }],
1226
+ /**
1227
+ * Overscroll Behavior
1228
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1229
+ */
1230
+ overscroll: [{
1231
+ overscroll: scaleOverscroll()
1232
+ }],
1233
+ /**
1234
+ * Overscroll Behavior X
1235
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1236
+ */
1237
+ 'overscroll-x': [{
1238
+ 'overscroll-x': scaleOverscroll()
1239
+ }],
1240
+ /**
1241
+ * Overscroll Behavior Y
1242
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1243
+ */
1244
+ 'overscroll-y': [{
1245
+ 'overscroll-y': scaleOverscroll()
1246
+ }],
1247
+ /**
1248
+ * Position
1249
+ * @see https://tailwindcss.com/docs/position
1250
+ */
1251
+ position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
1252
+ /**
1253
+ * Top / Right / Bottom / Left
1254
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1255
+ */
1256
+ inset: [{
1257
+ inset: scaleInset()
1258
+ }],
1259
+ /**
1260
+ * Right / Left
1261
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1262
+ */
1263
+ 'inset-x': [{
1264
+ 'inset-x': scaleInset()
1265
+ }],
1266
+ /**
1267
+ * Top / Bottom
1268
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1269
+ */
1270
+ 'inset-y': [{
1271
+ 'inset-y': scaleInset()
1272
+ }],
1273
+ /**
1274
+ * Start
1275
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1276
+ */
1277
+ start: [{
1278
+ start: scaleInset()
1279
+ }],
1280
+ /**
1281
+ * End
1282
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1283
+ */
1284
+ end: [{
1285
+ end: scaleInset()
1286
+ }],
1287
+ /**
1288
+ * Top
1289
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1290
+ */
1291
+ top: [{
1292
+ top: scaleInset()
1293
+ }],
1294
+ /**
1295
+ * Right
1296
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1297
+ */
1298
+ right: [{
1299
+ right: scaleInset()
1300
+ }],
1301
+ /**
1302
+ * Bottom
1303
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1304
+ */
1305
+ bottom: [{
1306
+ bottom: scaleInset()
1307
+ }],
1308
+ /**
1309
+ * Left
1310
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1311
+ */
1312
+ left: [{
1313
+ left: scaleInset()
1314
+ }],
1315
+ /**
1316
+ * Visibility
1317
+ * @see https://tailwindcss.com/docs/visibility
1318
+ */
1319
+ visibility: ['visible', 'invisible', 'collapse'],
1320
+ /**
1321
+ * Z-Index
1322
+ * @see https://tailwindcss.com/docs/z-index
1323
+ */
1324
+ z: [{
1325
+ z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]
1326
+ }],
1327
+ // ------------------------
1328
+ // --- Flexbox and Grid ---
1329
+ // ------------------------
1330
+ /**
1331
+ * Flex Basis
1332
+ * @see https://tailwindcss.com/docs/flex-basis
1333
+ */
1334
+ basis: [{
1335
+ basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]
1336
+ }],
1337
+ /**
1338
+ * Flex Direction
1339
+ * @see https://tailwindcss.com/docs/flex-direction
1340
+ */
1341
+ 'flex-direction': [{
1342
+ flex: ['row', 'row-reverse', 'col', 'col-reverse']
1343
+ }],
1344
+ /**
1345
+ * Flex Wrap
1346
+ * @see https://tailwindcss.com/docs/flex-wrap
1347
+ */
1348
+ 'flex-wrap': [{
1349
+ flex: ['nowrap', 'wrap', 'wrap-reverse']
1350
+ }],
1351
+ /**
1352
+ * Flex
1353
+ * @see https://tailwindcss.com/docs/flex
1354
+ */
1355
+ flex: [{
1356
+ flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]
1357
+ }],
1358
+ /**
1359
+ * Flex Grow
1360
+ * @see https://tailwindcss.com/docs/flex-grow
1361
+ */
1362
+ grow: [{
1363
+ grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]
1364
+ }],
1365
+ /**
1366
+ * Flex Shrink
1367
+ * @see https://tailwindcss.com/docs/flex-shrink
1368
+ */
1369
+ shrink: [{
1370
+ shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]
1371
+ }],
1372
+ /**
1373
+ * Order
1374
+ * @see https://tailwindcss.com/docs/order
1375
+ */
1376
+ order: [{
1377
+ order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]
1378
+ }],
1379
+ /**
1380
+ * Grid Template Columns
1381
+ * @see https://tailwindcss.com/docs/grid-template-columns
1382
+ */
1383
+ 'grid-cols': [{
1384
+ 'grid-cols': scaleGridTemplateColsRows()
1385
+ }],
1386
+ /**
1387
+ * Grid Column Start / End
1388
+ * @see https://tailwindcss.com/docs/grid-column
1389
+ */
1390
+ 'col-start-end': [{
1391
+ col: scaleGridColRowStartAndEnd()
1392
+ }],
1393
+ /**
1394
+ * Grid Column Start
1395
+ * @see https://tailwindcss.com/docs/grid-column
1396
+ */
1397
+ 'col-start': [{
1398
+ 'col-start': scaleGridColRowStartOrEnd()
1399
+ }],
1400
+ /**
1401
+ * Grid Column End
1402
+ * @see https://tailwindcss.com/docs/grid-column
1403
+ */
1404
+ 'col-end': [{
1405
+ 'col-end': scaleGridColRowStartOrEnd()
1406
+ }],
1407
+ /**
1408
+ * Grid Template Rows
1409
+ * @see https://tailwindcss.com/docs/grid-template-rows
1410
+ */
1411
+ 'grid-rows': [{
1412
+ 'grid-rows': scaleGridTemplateColsRows()
1413
+ }],
1414
+ /**
1415
+ * Grid Row Start / End
1416
+ * @see https://tailwindcss.com/docs/grid-row
1417
+ */
1418
+ 'row-start-end': [{
1419
+ row: scaleGridColRowStartAndEnd()
1420
+ }],
1421
+ /**
1422
+ * Grid Row Start
1423
+ * @see https://tailwindcss.com/docs/grid-row
1424
+ */
1425
+ 'row-start': [{
1426
+ 'row-start': scaleGridColRowStartOrEnd()
1427
+ }],
1428
+ /**
1429
+ * Grid Row End
1430
+ * @see https://tailwindcss.com/docs/grid-row
1431
+ */
1432
+ 'row-end': [{
1433
+ 'row-end': scaleGridColRowStartOrEnd()
1434
+ }],
1435
+ /**
1436
+ * Grid Auto Flow
1437
+ * @see https://tailwindcss.com/docs/grid-auto-flow
1438
+ */
1439
+ 'grid-flow': [{
1440
+ 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']
1441
+ }],
1442
+ /**
1443
+ * Grid Auto Columns
1444
+ * @see https://tailwindcss.com/docs/grid-auto-columns
1445
+ */
1446
+ 'auto-cols': [{
1447
+ 'auto-cols': scaleGridAutoColsRows()
1448
+ }],
1449
+ /**
1450
+ * Grid Auto Rows
1451
+ * @see https://tailwindcss.com/docs/grid-auto-rows
1452
+ */
1453
+ 'auto-rows': [{
1454
+ 'auto-rows': scaleGridAutoColsRows()
1455
+ }],
1456
+ /**
1457
+ * Gap
1458
+ * @see https://tailwindcss.com/docs/gap
1459
+ */
1460
+ gap: [{
1461
+ gap: scaleUnambiguousSpacing()
1462
+ }],
1463
+ /**
1464
+ * Gap X
1465
+ * @see https://tailwindcss.com/docs/gap
1466
+ */
1467
+ 'gap-x': [{
1468
+ 'gap-x': scaleUnambiguousSpacing()
1469
+ }],
1470
+ /**
1471
+ * Gap Y
1472
+ * @see https://tailwindcss.com/docs/gap
1473
+ */
1474
+ 'gap-y': [{
1475
+ 'gap-y': scaleUnambiguousSpacing()
1476
+ }],
1477
+ /**
1478
+ * Justify Content
1479
+ * @see https://tailwindcss.com/docs/justify-content
1480
+ */
1481
+ 'justify-content': [{
1482
+ justify: [...scaleAlignPrimaryAxis(), 'normal']
1483
+ }],
1484
+ /**
1485
+ * Justify Items
1486
+ * @see https://tailwindcss.com/docs/justify-items
1487
+ */
1488
+ 'justify-items': [{
1489
+ 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']
1490
+ }],
1491
+ /**
1492
+ * Justify Self
1493
+ * @see https://tailwindcss.com/docs/justify-self
1494
+ */
1495
+ 'justify-self': [{
1496
+ 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]
1497
+ }],
1498
+ /**
1499
+ * Align Content
1500
+ * @see https://tailwindcss.com/docs/align-content
1501
+ */
1502
+ 'align-content': [{
1503
+ content: ['normal', ...scaleAlignPrimaryAxis()]
1504
+ }],
1505
+ /**
1506
+ * Align Items
1507
+ * @see https://tailwindcss.com/docs/align-items
1508
+ */
1509
+ 'align-items': [{
1510
+ items: [...scaleAlignSecondaryAxis(), 'baseline']
1511
+ }],
1512
+ /**
1513
+ * Align Self
1514
+ * @see https://tailwindcss.com/docs/align-self
1515
+ */
1516
+ 'align-self': [{
1517
+ self: ['auto', ...scaleAlignSecondaryAxis(), 'baseline']
1518
+ }],
1519
+ /**
1520
+ * Place Content
1521
+ * @see https://tailwindcss.com/docs/place-content
1522
+ */
1523
+ 'place-content': [{
1524
+ 'place-content': scaleAlignPrimaryAxis()
1525
+ }],
1526
+ /**
1527
+ * Place Items
1528
+ * @see https://tailwindcss.com/docs/place-items
1529
+ */
1530
+ 'place-items': [{
1531
+ 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']
1532
+ }],
1533
+ /**
1534
+ * Place Self
1535
+ * @see https://tailwindcss.com/docs/place-self
1536
+ */
1537
+ 'place-self': [{
1538
+ 'place-self': ['auto', ...scaleAlignSecondaryAxis()]
1539
+ }],
1540
+ // Spacing
1541
+ /**
1542
+ * Padding
1543
+ * @see https://tailwindcss.com/docs/padding
1544
+ */
1545
+ p: [{
1546
+ p: scaleUnambiguousSpacing()
1547
+ }],
1548
+ /**
1549
+ * Padding X
1550
+ * @see https://tailwindcss.com/docs/padding
1551
+ */
1552
+ px: [{
1553
+ px: scaleUnambiguousSpacing()
1554
+ }],
1555
+ /**
1556
+ * Padding Y
1557
+ * @see https://tailwindcss.com/docs/padding
1558
+ */
1559
+ py: [{
1560
+ py: scaleUnambiguousSpacing()
1561
+ }],
1562
+ /**
1563
+ * Padding Start
1564
+ * @see https://tailwindcss.com/docs/padding
1565
+ */
1566
+ ps: [{
1567
+ ps: scaleUnambiguousSpacing()
1568
+ }],
1569
+ /**
1570
+ * Padding End
1571
+ * @see https://tailwindcss.com/docs/padding
1572
+ */
1573
+ pe: [{
1574
+ pe: scaleUnambiguousSpacing()
1575
+ }],
1576
+ /**
1577
+ * Padding Top
1578
+ * @see https://tailwindcss.com/docs/padding
1579
+ */
1580
+ pt: [{
1581
+ pt: scaleUnambiguousSpacing()
1582
+ }],
1583
+ /**
1584
+ * Padding Right
1585
+ * @see https://tailwindcss.com/docs/padding
1586
+ */
1587
+ pr: [{
1588
+ pr: scaleUnambiguousSpacing()
1589
+ }],
1590
+ /**
1591
+ * Padding Bottom
1592
+ * @see https://tailwindcss.com/docs/padding
1593
+ */
1594
+ pb: [{
1595
+ pb: scaleUnambiguousSpacing()
1596
+ }],
1597
+ /**
1598
+ * Padding Left
1599
+ * @see https://tailwindcss.com/docs/padding
1600
+ */
1601
+ pl: [{
1602
+ pl: scaleUnambiguousSpacing()
1603
+ }],
1604
+ /**
1605
+ * Margin
1606
+ * @see https://tailwindcss.com/docs/margin
1607
+ */
1608
+ m: [{
1609
+ m: scaleMargin()
1610
+ }],
1611
+ /**
1612
+ * Margin X
1613
+ * @see https://tailwindcss.com/docs/margin
1614
+ */
1615
+ mx: [{
1616
+ mx: scaleMargin()
1617
+ }],
1618
+ /**
1619
+ * Margin Y
1620
+ * @see https://tailwindcss.com/docs/margin
1621
+ */
1622
+ my: [{
1623
+ my: scaleMargin()
1624
+ }],
1625
+ /**
1626
+ * Margin Start
1627
+ * @see https://tailwindcss.com/docs/margin
1628
+ */
1629
+ ms: [{
1630
+ ms: scaleMargin()
1631
+ }],
1632
+ /**
1633
+ * Margin End
1634
+ * @see https://tailwindcss.com/docs/margin
1635
+ */
1636
+ me: [{
1637
+ me: scaleMargin()
1638
+ }],
1639
+ /**
1640
+ * Margin Top
1641
+ * @see https://tailwindcss.com/docs/margin
1642
+ */
1643
+ mt: [{
1644
+ mt: scaleMargin()
1645
+ }],
1646
+ /**
1647
+ * Margin Right
1648
+ * @see https://tailwindcss.com/docs/margin
1649
+ */
1650
+ mr: [{
1651
+ mr: scaleMargin()
1652
+ }],
1653
+ /**
1654
+ * Margin Bottom
1655
+ * @see https://tailwindcss.com/docs/margin
1656
+ */
1657
+ mb: [{
1658
+ mb: scaleMargin()
1659
+ }],
1660
+ /**
1661
+ * Margin Left
1662
+ * @see https://tailwindcss.com/docs/margin
1663
+ */
1664
+ ml: [{
1665
+ ml: scaleMargin()
1666
+ }],
1667
+ /**
1668
+ * Space Between X
1669
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1670
+ */
1671
+ 'space-x': [{
1672
+ 'space-x': scaleUnambiguousSpacing()
1673
+ }],
1674
+ /**
1675
+ * Space Between X Reverse
1676
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1677
+ */
1678
+ 'space-x-reverse': ['space-x-reverse'],
1679
+ /**
1680
+ * Space Between Y
1681
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1682
+ */
1683
+ 'space-y': [{
1684
+ 'space-y': scaleUnambiguousSpacing()
1685
+ }],
1686
+ /**
1687
+ * Space Between Y Reverse
1688
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1689
+ */
1690
+ 'space-y-reverse': ['space-y-reverse'],
1691
+ // --------------
1692
+ // --- Sizing ---
1693
+ // --------------
1694
+ /**
1695
+ * Size
1696
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1697
+ */
1698
+ size: [{
1699
+ size: scaleSizing()
1700
+ }],
1701
+ /**
1702
+ * Width
1703
+ * @see https://tailwindcss.com/docs/width
1704
+ */
1705
+ w: [{
1706
+ w: [themeContainer, 'screen', ...scaleSizing()]
1707
+ }],
1708
+ /**
1709
+ * Min-Width
1710
+ * @see https://tailwindcss.com/docs/min-width
1711
+ */
1712
+ 'min-w': [{
1713
+ 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1714
+ 'none', ...scaleSizing()]
1715
+ }],
1716
+ /**
1717
+ * Max-Width
1718
+ * @see https://tailwindcss.com/docs/max-width
1719
+ */
1720
+ 'max-w': [{
1721
+ 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1722
+ 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1723
+ {
1724
+ screen: [themeBreakpoint]
1725
+ }, ...scaleSizing()]
1726
+ }],
1727
+ /**
1728
+ * Height
1729
+ * @see https://tailwindcss.com/docs/height
1730
+ */
1731
+ h: [{
1732
+ h: ['screen', ...scaleSizing()]
1733
+ }],
1734
+ /**
1735
+ * Min-Height
1736
+ * @see https://tailwindcss.com/docs/min-height
1737
+ */
1738
+ 'min-h': [{
1739
+ 'min-h': ['screen', 'none', ...scaleSizing()]
1740
+ }],
1741
+ /**
1742
+ * Max-Height
1743
+ * @see https://tailwindcss.com/docs/max-height
1744
+ */
1745
+ 'max-h': [{
1746
+ 'max-h': ['screen', ...scaleSizing()]
1747
+ }],
1748
+ // ------------------
1749
+ // --- Typography ---
1750
+ // ------------------
1751
+ /**
1752
+ * Font Size
1753
+ * @see https://tailwindcss.com/docs/font-size
1754
+ */
1755
+ 'font-size': [{
1756
+ text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]
1757
+ }],
1758
+ /**
1759
+ * Font Smoothing
1760
+ * @see https://tailwindcss.com/docs/font-smoothing
1761
+ */
1762
+ 'font-smoothing': ['antialiased', 'subpixel-antialiased'],
1763
+ /**
1764
+ * Font Style
1765
+ * @see https://tailwindcss.com/docs/font-style
1766
+ */
1767
+ 'font-style': ['italic', 'not-italic'],
1768
+ /**
1769
+ * Font Weight
1770
+ * @see https://tailwindcss.com/docs/font-weight
1771
+ */
1772
+ 'font-weight': [{
1773
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
1774
+ }],
1775
+ /**
1776
+ * Font Stretch
1777
+ * @see https://tailwindcss.com/docs/font-stretch
1778
+ */
1779
+ 'font-stretch': [{
1780
+ 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]
1781
+ }],
1782
+ /**
1783
+ * Font Family
1784
+ * @see https://tailwindcss.com/docs/font-family
1785
+ */
1786
+ 'font-family': [{
1787
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
1788
+ }],
1789
+ /**
1790
+ * Font Variant Numeric
1791
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1792
+ */
1793
+ 'fvn-normal': ['normal-nums'],
1794
+ /**
1795
+ * Font Variant Numeric
1796
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1797
+ */
1798
+ 'fvn-ordinal': ['ordinal'],
1799
+ /**
1800
+ * Font Variant Numeric
1801
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1802
+ */
1803
+ 'fvn-slashed-zero': ['slashed-zero'],
1804
+ /**
1805
+ * Font Variant Numeric
1806
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1807
+ */
1808
+ 'fvn-figure': ['lining-nums', 'oldstyle-nums'],
1809
+ /**
1810
+ * Font Variant Numeric
1811
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1812
+ */
1813
+ 'fvn-spacing': ['proportional-nums', 'tabular-nums'],
1814
+ /**
1815
+ * Font Variant Numeric
1816
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1817
+ */
1818
+ 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],
1819
+ /**
1820
+ * Letter Spacing
1821
+ * @see https://tailwindcss.com/docs/letter-spacing
1822
+ */
1823
+ tracking: [{
1824
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1825
+ }],
1826
+ /**
1827
+ * Line Clamp
1828
+ * @see https://tailwindcss.com/docs/line-clamp
1829
+ */
1830
+ 'line-clamp': [{
1831
+ 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]
1832
+ }],
1833
+ /**
1834
+ * Line Height
1835
+ * @see https://tailwindcss.com/docs/line-height
1836
+ */
1837
+ leading: [{
1838
+ leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1839
+ themeLeading, ...scaleUnambiguousSpacing()]
1840
+ }],
1841
+ /**
1842
+ * List Style Image
1843
+ * @see https://tailwindcss.com/docs/list-style-image
1844
+ */
1845
+ 'list-image': [{
1846
+ 'list-image': ['none', isArbitraryVariable, isArbitraryValue]
1847
+ }],
1848
+ /**
1849
+ * List Style Position
1850
+ * @see https://tailwindcss.com/docs/list-style-position
1851
+ */
1852
+ 'list-style-position': [{
1853
+ list: ['inside', 'outside']
1854
+ }],
1855
+ /**
1856
+ * List Style Type
1857
+ * @see https://tailwindcss.com/docs/list-style-type
1858
+ */
1859
+ 'list-style-type': [{
1860
+ list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]
1861
+ }],
1862
+ /**
1863
+ * Text Alignment
1864
+ * @see https://tailwindcss.com/docs/text-align
1865
+ */
1866
+ 'text-alignment': [{
1867
+ text: ['left', 'center', 'right', 'justify', 'start', 'end']
1868
+ }],
1869
+ /**
1870
+ * Placeholder Color
1871
+ * @deprecated since Tailwind CSS v3.0.0
1872
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1873
+ */
1874
+ 'placeholder-color': [{
1875
+ placeholder: scaleColor()
1876
+ }],
1877
+ /**
1878
+ * Text Color
1879
+ * @see https://tailwindcss.com/docs/text-color
1880
+ */
1881
+ 'text-color': [{
1882
+ text: scaleColor()
1883
+ }],
1884
+ /**
1885
+ * Text Decoration
1886
+ * @see https://tailwindcss.com/docs/text-decoration
1887
+ */
1888
+ 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],
1889
+ /**
1890
+ * Text Decoration Style
1891
+ * @see https://tailwindcss.com/docs/text-decoration-style
1892
+ */
1893
+ 'text-decoration-style': [{
1894
+ decoration: [...scaleLineStyle(), 'wavy']
1895
+ }],
1896
+ /**
1897
+ * Text Decoration Thickness
1898
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1899
+ */
1900
+ 'text-decoration-thickness': [{
1901
+ decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]
1902
+ }],
1903
+ /**
1904
+ * Text Decoration Color
1905
+ * @see https://tailwindcss.com/docs/text-decoration-color
1906
+ */
1907
+ 'text-decoration-color': [{
1908
+ decoration: scaleColor()
1909
+ }],
1910
+ /**
1911
+ * Text Underline Offset
1912
+ * @see https://tailwindcss.com/docs/text-underline-offset
1913
+ */
1914
+ 'underline-offset': [{
1915
+ 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]
1916
+ }],
1917
+ /**
1918
+ * Text Transform
1919
+ * @see https://tailwindcss.com/docs/text-transform
1920
+ */
1921
+ 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
1922
+ /**
1923
+ * Text Overflow
1924
+ * @see https://tailwindcss.com/docs/text-overflow
1925
+ */
1926
+ 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
1927
+ /**
1928
+ * Text Wrap
1929
+ * @see https://tailwindcss.com/docs/text-wrap
1930
+ */
1931
+ 'text-wrap': [{
1932
+ text: ['wrap', 'nowrap', 'balance', 'pretty']
1933
+ }],
1934
+ /**
1935
+ * Text Indent
1936
+ * @see https://tailwindcss.com/docs/text-indent
1937
+ */
1938
+ indent: [{
1939
+ indent: scaleUnambiguousSpacing()
1940
+ }],
1941
+ /**
1942
+ * Vertical Alignment
1943
+ * @see https://tailwindcss.com/docs/vertical-align
1944
+ */
1945
+ 'vertical-align': [{
1946
+ align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]
1947
+ }],
1948
+ /**
1949
+ * Whitespace
1950
+ * @see https://tailwindcss.com/docs/whitespace
1951
+ */
1952
+ whitespace: [{
1953
+ whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']
1954
+ }],
1955
+ /**
1956
+ * Word Break
1957
+ * @see https://tailwindcss.com/docs/word-break
1958
+ */
1959
+ break: [{
1960
+ break: ['normal', 'words', 'all', 'keep']
1961
+ }],
1962
+ /**
1963
+ * Hyphens
1964
+ * @see https://tailwindcss.com/docs/hyphens
1965
+ */
1966
+ hyphens: [{
1967
+ hyphens: ['none', 'manual', 'auto']
1968
+ }],
1969
+ /**
1970
+ * Content
1971
+ * @see https://tailwindcss.com/docs/content
1972
+ */
1973
+ content: [{
1974
+ content: ['none', isArbitraryVariable, isArbitraryValue]
1975
+ }],
1976
+ // -------------------
1977
+ // --- Backgrounds ---
1978
+ // -------------------
1979
+ /**
1980
+ * Background Attachment
1981
+ * @see https://tailwindcss.com/docs/background-attachment
1982
+ */
1983
+ 'bg-attachment': [{
1984
+ bg: ['fixed', 'local', 'scroll']
1985
+ }],
1986
+ /**
1987
+ * Background Clip
1988
+ * @see https://tailwindcss.com/docs/background-clip
1989
+ */
1990
+ 'bg-clip': [{
1991
+ 'bg-clip': ['border', 'padding', 'content', 'text']
1992
+ }],
1993
+ /**
1994
+ * Background Origin
1995
+ * @see https://tailwindcss.com/docs/background-origin
1996
+ */
1997
+ 'bg-origin': [{
1998
+ 'bg-origin': ['border', 'padding', 'content']
1999
+ }],
2000
+ /**
2001
+ * Background Position
2002
+ * @see https://tailwindcss.com/docs/background-position
2003
+ */
2004
+ 'bg-position': [{
2005
+ bg: [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition]
2006
+ }],
2007
+ /**
2008
+ * Background Repeat
2009
+ * @see https://tailwindcss.com/docs/background-repeat
2010
+ */
2011
+ 'bg-repeat': [{
2012
+ bg: ['no-repeat', {
2013
+ repeat: ['', 'x', 'y', 'space', 'round']
2014
+ }]
2015
+ }],
2016
+ /**
2017
+ * Background Size
2018
+ * @see https://tailwindcss.com/docs/background-size
2019
+ */
2020
+ 'bg-size': [{
2021
+ bg: ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize]
2022
+ }],
2023
+ /**
2024
+ * Background Image
2025
+ * @see https://tailwindcss.com/docs/background-image
2026
+ */
2027
+ 'bg-image': [{
2028
+ bg: ['none', {
2029
+ linear: [{
2030
+ to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
2031
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
2032
+ radial: ['', isArbitraryVariable, isArbitraryValue],
2033
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
2034
+ }, isArbitraryVariableImage, isArbitraryImage]
2035
+ }],
2036
+ /**
2037
+ * Background Color
2038
+ * @see https://tailwindcss.com/docs/background-color
2039
+ */
2040
+ 'bg-color': [{
2041
+ bg: scaleColor()
2042
+ }],
2043
+ /**
2044
+ * Gradient Color Stops From Position
2045
+ * @see https://tailwindcss.com/docs/gradient-color-stops
2046
+ */
2047
+ 'gradient-from-pos': [{
2048
+ from: scaleGradientStopPosition()
2049
+ }],
2050
+ /**
2051
+ * Gradient Color Stops Via Position
2052
+ * @see https://tailwindcss.com/docs/gradient-color-stops
2053
+ */
2054
+ 'gradient-via-pos': [{
2055
+ via: scaleGradientStopPosition()
2056
+ }],
2057
+ /**
2058
+ * Gradient Color Stops To Position
2059
+ * @see https://tailwindcss.com/docs/gradient-color-stops
2060
+ */
2061
+ 'gradient-to-pos': [{
2062
+ to: scaleGradientStopPosition()
2063
+ }],
2064
+ /**
2065
+ * Gradient Color Stops From
2066
+ * @see https://tailwindcss.com/docs/gradient-color-stops
2067
+ */
2068
+ 'gradient-from': [{
2069
+ from: scaleColor()
2070
+ }],
2071
+ /**
2072
+ * Gradient Color Stops Via
2073
+ * @see https://tailwindcss.com/docs/gradient-color-stops
2074
+ */
2075
+ 'gradient-via': [{
2076
+ via: scaleColor()
2077
+ }],
2078
+ /**
2079
+ * Gradient Color Stops To
2080
+ * @see https://tailwindcss.com/docs/gradient-color-stops
2081
+ */
2082
+ 'gradient-to': [{
2083
+ to: scaleColor()
2084
+ }],
2085
+ // ---------------
2086
+ // --- Borders ---
2087
+ // ---------------
2088
+ /**
2089
+ * Border Radius
2090
+ * @see https://tailwindcss.com/docs/border-radius
2091
+ */
2092
+ rounded: [{
2093
+ rounded: scaleRadius()
2094
+ }],
2095
+ /**
2096
+ * Border Radius Start
2097
+ * @see https://tailwindcss.com/docs/border-radius
2098
+ */
2099
+ 'rounded-s': [{
2100
+ 'rounded-s': scaleRadius()
2101
+ }],
2102
+ /**
2103
+ * Border Radius End
2104
+ * @see https://tailwindcss.com/docs/border-radius
2105
+ */
2106
+ 'rounded-e': [{
2107
+ 'rounded-e': scaleRadius()
2108
+ }],
2109
+ /**
2110
+ * Border Radius Top
2111
+ * @see https://tailwindcss.com/docs/border-radius
2112
+ */
2113
+ 'rounded-t': [{
2114
+ 'rounded-t': scaleRadius()
2115
+ }],
2116
+ /**
2117
+ * Border Radius Right
2118
+ * @see https://tailwindcss.com/docs/border-radius
2119
+ */
2120
+ 'rounded-r': [{
2121
+ 'rounded-r': scaleRadius()
2122
+ }],
2123
+ /**
2124
+ * Border Radius Bottom
2125
+ * @see https://tailwindcss.com/docs/border-radius
2126
+ */
2127
+ 'rounded-b': [{
2128
+ 'rounded-b': scaleRadius()
2129
+ }],
2130
+ /**
2131
+ * Border Radius Left
2132
+ * @see https://tailwindcss.com/docs/border-radius
2133
+ */
2134
+ 'rounded-l': [{
2135
+ 'rounded-l': scaleRadius()
2136
+ }],
2137
+ /**
2138
+ * Border Radius Start Start
2139
+ * @see https://tailwindcss.com/docs/border-radius
2140
+ */
2141
+ 'rounded-ss': [{
2142
+ 'rounded-ss': scaleRadius()
2143
+ }],
2144
+ /**
2145
+ * Border Radius Start End
2146
+ * @see https://tailwindcss.com/docs/border-radius
2147
+ */
2148
+ 'rounded-se': [{
2149
+ 'rounded-se': scaleRadius()
2150
+ }],
2151
+ /**
2152
+ * Border Radius End End
2153
+ * @see https://tailwindcss.com/docs/border-radius
2154
+ */
2155
+ 'rounded-ee': [{
2156
+ 'rounded-ee': scaleRadius()
2157
+ }],
2158
+ /**
2159
+ * Border Radius End Start
2160
+ * @see https://tailwindcss.com/docs/border-radius
2161
+ */
2162
+ 'rounded-es': [{
2163
+ 'rounded-es': scaleRadius()
2164
+ }],
2165
+ /**
2166
+ * Border Radius Top Left
2167
+ * @see https://tailwindcss.com/docs/border-radius
2168
+ */
2169
+ 'rounded-tl': [{
2170
+ 'rounded-tl': scaleRadius()
2171
+ }],
2172
+ /**
2173
+ * Border Radius Top Right
2174
+ * @see https://tailwindcss.com/docs/border-radius
2175
+ */
2176
+ 'rounded-tr': [{
2177
+ 'rounded-tr': scaleRadius()
2178
+ }],
2179
+ /**
2180
+ * Border Radius Bottom Right
2181
+ * @see https://tailwindcss.com/docs/border-radius
2182
+ */
2183
+ 'rounded-br': [{
2184
+ 'rounded-br': scaleRadius()
2185
+ }],
2186
+ /**
2187
+ * Border Radius Bottom Left
2188
+ * @see https://tailwindcss.com/docs/border-radius
2189
+ */
2190
+ 'rounded-bl': [{
2191
+ 'rounded-bl': scaleRadius()
2192
+ }],
2193
+ /**
2194
+ * Border Width
2195
+ * @see https://tailwindcss.com/docs/border-width
2196
+ */
2197
+ 'border-w': [{
2198
+ border: scaleBorderWidth()
2199
+ }],
2200
+ /**
2201
+ * Border Width X
2202
+ * @see https://tailwindcss.com/docs/border-width
2203
+ */
2204
+ 'border-w-x': [{
2205
+ 'border-x': scaleBorderWidth()
2206
+ }],
2207
+ /**
2208
+ * Border Width Y
2209
+ * @see https://tailwindcss.com/docs/border-width
2210
+ */
2211
+ 'border-w-y': [{
2212
+ 'border-y': scaleBorderWidth()
2213
+ }],
2214
+ /**
2215
+ * Border Width Start
2216
+ * @see https://tailwindcss.com/docs/border-width
2217
+ */
2218
+ 'border-w-s': [{
2219
+ 'border-s': scaleBorderWidth()
2220
+ }],
2221
+ /**
2222
+ * Border Width End
2223
+ * @see https://tailwindcss.com/docs/border-width
2224
+ */
2225
+ 'border-w-e': [{
2226
+ 'border-e': scaleBorderWidth()
2227
+ }],
2228
+ /**
2229
+ * Border Width Top
2230
+ * @see https://tailwindcss.com/docs/border-width
2231
+ */
2232
+ 'border-w-t': [{
2233
+ 'border-t': scaleBorderWidth()
2234
+ }],
2235
+ /**
2236
+ * Border Width Right
2237
+ * @see https://tailwindcss.com/docs/border-width
2238
+ */
2239
+ 'border-w-r': [{
2240
+ 'border-r': scaleBorderWidth()
2241
+ }],
2242
+ /**
2243
+ * Border Width Bottom
2244
+ * @see https://tailwindcss.com/docs/border-width
2245
+ */
2246
+ 'border-w-b': [{
2247
+ 'border-b': scaleBorderWidth()
2248
+ }],
2249
+ /**
2250
+ * Border Width Left
2251
+ * @see https://tailwindcss.com/docs/border-width
2252
+ */
2253
+ 'border-w-l': [{
2254
+ 'border-l': scaleBorderWidth()
2255
+ }],
2256
+ /**
2257
+ * Divide Width X
2258
+ * @see https://tailwindcss.com/docs/border-width#between-children
2259
+ */
2260
+ 'divide-x': [{
2261
+ 'divide-x': scaleBorderWidth()
2262
+ }],
2263
+ /**
2264
+ * Divide Width X Reverse
2265
+ * @see https://tailwindcss.com/docs/border-width#between-children
2266
+ */
2267
+ 'divide-x-reverse': ['divide-x-reverse'],
2268
+ /**
2269
+ * Divide Width Y
2270
+ * @see https://tailwindcss.com/docs/border-width#between-children
2271
+ */
2272
+ 'divide-y': [{
2273
+ 'divide-y': scaleBorderWidth()
2274
+ }],
2275
+ /**
2276
+ * Divide Width Y Reverse
2277
+ * @see https://tailwindcss.com/docs/border-width#between-children
2278
+ */
2279
+ 'divide-y-reverse': ['divide-y-reverse'],
2280
+ /**
2281
+ * Border Style
2282
+ * @see https://tailwindcss.com/docs/border-style
2283
+ */
2284
+ 'border-style': [{
2285
+ border: [...scaleLineStyle(), 'hidden', 'none']
2286
+ }],
2287
+ /**
2288
+ * Divide Style
2289
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
2290
+ */
2291
+ 'divide-style': [{
2292
+ divide: [...scaleLineStyle(), 'hidden', 'none']
2293
+ }],
2294
+ /**
2295
+ * Border Color
2296
+ * @see https://tailwindcss.com/docs/border-color
2297
+ */
2298
+ 'border-color': [{
2299
+ border: scaleColor()
2300
+ }],
2301
+ /**
2302
+ * Border Color X
2303
+ * @see https://tailwindcss.com/docs/border-color
2304
+ */
2305
+ 'border-color-x': [{
2306
+ 'border-x': scaleColor()
2307
+ }],
2308
+ /**
2309
+ * Border Color Y
2310
+ * @see https://tailwindcss.com/docs/border-color
2311
+ */
2312
+ 'border-color-y': [{
2313
+ 'border-y': scaleColor()
2314
+ }],
2315
+ /**
2316
+ * Border Color S
2317
+ * @see https://tailwindcss.com/docs/border-color
2318
+ */
2319
+ 'border-color-s': [{
2320
+ 'border-s': scaleColor()
2321
+ }],
2322
+ /**
2323
+ * Border Color E
2324
+ * @see https://tailwindcss.com/docs/border-color
2325
+ */
2326
+ 'border-color-e': [{
2327
+ 'border-e': scaleColor()
2328
+ }],
2329
+ /**
2330
+ * Border Color Top
2331
+ * @see https://tailwindcss.com/docs/border-color
2332
+ */
2333
+ 'border-color-t': [{
2334
+ 'border-t': scaleColor()
2335
+ }],
2336
+ /**
2337
+ * Border Color Right
2338
+ * @see https://tailwindcss.com/docs/border-color
2339
+ */
2340
+ 'border-color-r': [{
2341
+ 'border-r': scaleColor()
2342
+ }],
2343
+ /**
2344
+ * Border Color Bottom
2345
+ * @see https://tailwindcss.com/docs/border-color
2346
+ */
2347
+ 'border-color-b': [{
2348
+ 'border-b': scaleColor()
2349
+ }],
2350
+ /**
2351
+ * Border Color Left
2352
+ * @see https://tailwindcss.com/docs/border-color
2353
+ */
2354
+ 'border-color-l': [{
2355
+ 'border-l': scaleColor()
2356
+ }],
2357
+ /**
2358
+ * Divide Color
2359
+ * @see https://tailwindcss.com/docs/divide-color
2360
+ */
2361
+ 'divide-color': [{
2362
+ divide: scaleColor()
2363
+ }],
2364
+ /**
2365
+ * Outline Style
2366
+ * @see https://tailwindcss.com/docs/outline-style
2367
+ */
2368
+ 'outline-style': [{
2369
+ outline: [...scaleLineStyle(), 'none', 'hidden']
2370
+ }],
2371
+ /**
2372
+ * Outline Offset
2373
+ * @see https://tailwindcss.com/docs/outline-offset
2374
+ */
2375
+ 'outline-offset': [{
2376
+ 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]
2377
+ }],
2378
+ /**
2379
+ * Outline Width
2380
+ * @see https://tailwindcss.com/docs/outline-width
2381
+ */
2382
+ 'outline-w': [{
2383
+ outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]
2384
+ }],
2385
+ /**
2386
+ * Outline Color
2387
+ * @see https://tailwindcss.com/docs/outline-color
2388
+ */
2389
+ 'outline-color': [{
2390
+ outline: [themeColor]
2391
+ }],
2392
+ // ---------------
2393
+ // --- Effects ---
2394
+ // ---------------
2395
+ /**
2396
+ * Box Shadow
2397
+ * @see https://tailwindcss.com/docs/box-shadow
2398
+ */
2399
+ shadow: [{
2400
+ shadow: [
2401
+ // Deprecated since Tailwind CSS v4.0.0
2402
+ '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]
2403
+ }],
2404
+ /**
2405
+ * Box Shadow Color
2406
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
2407
+ */
2408
+ 'shadow-color': [{
2409
+ shadow: scaleColor()
2410
+ }],
2411
+ /**
2412
+ * Inset Box Shadow
2413
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
2414
+ */
2415
+ 'inset-shadow': [{
2416
+ 'inset-shadow': ['none', isArbitraryVariable, isArbitraryValue, themeInsetShadow]
2417
+ }],
2418
+ /**
2419
+ * Inset Box Shadow Color
2420
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
2421
+ */
2422
+ 'inset-shadow-color': [{
2423
+ 'inset-shadow': scaleColor()
2424
+ }],
2425
+ /**
2426
+ * Ring Width
2427
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
2428
+ */
2429
+ 'ring-w': [{
2430
+ ring: scaleBorderWidth()
2431
+ }],
2432
+ /**
2433
+ * Ring Width Inset
2434
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
2435
+ * @deprecated since Tailwind CSS v4.0.0
2436
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2437
+ */
2438
+ 'ring-w-inset': ['ring-inset'],
2439
+ /**
2440
+ * Ring Color
2441
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
2442
+ */
2443
+ 'ring-color': [{
2444
+ ring: scaleColor()
2445
+ }],
2446
+ /**
2447
+ * Ring Offset Width
2448
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
2449
+ * @deprecated since Tailwind CSS v4.0.0
2450
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2451
+ */
2452
+ 'ring-offset-w': [{
2453
+ 'ring-offset': [isNumber, isArbitraryLength]
2454
+ }],
2455
+ /**
2456
+ * Ring Offset Color
2457
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
2458
+ * @deprecated since Tailwind CSS v4.0.0
2459
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2460
+ */
2461
+ 'ring-offset-color': [{
2462
+ 'ring-offset': scaleColor()
2463
+ }],
2464
+ /**
2465
+ * Inset Ring Width
2466
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
2467
+ */
2468
+ 'inset-ring-w': [{
2469
+ 'inset-ring': scaleBorderWidth()
2470
+ }],
2471
+ /**
2472
+ * Inset Ring Color
2473
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
2474
+ */
2475
+ 'inset-ring-color': [{
2476
+ 'inset-ring': scaleColor()
2477
+ }],
2478
+ /**
2479
+ * Opacity
2480
+ * @see https://tailwindcss.com/docs/opacity
2481
+ */
2482
+ opacity: [{
2483
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
2484
+ }],
2485
+ /**
2486
+ * Mix Blend Mode
2487
+ * @see https://tailwindcss.com/docs/mix-blend-mode
2488
+ */
2489
+ 'mix-blend': [{
2490
+ 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']
2491
+ }],
2492
+ /**
2493
+ * Background Blend Mode
2494
+ * @see https://tailwindcss.com/docs/background-blend-mode
2495
+ */
2496
+ 'bg-blend': [{
2497
+ 'bg-blend': scaleBlendMode()
2498
+ }],
2499
+ // ---------------
2500
+ // --- Filters ---
2501
+ // ---------------
2502
+ /**
2503
+ * Filter
2504
+ * @see https://tailwindcss.com/docs/filter
2505
+ */
2506
+ filter: [{
2507
+ filter: [
2508
+ // Deprecated since Tailwind CSS v3.0.0
2509
+ '', 'none', isArbitraryVariable, isArbitraryValue]
2510
+ }],
2511
+ /**
2512
+ * Blur
2513
+ * @see https://tailwindcss.com/docs/blur
2514
+ */
2515
+ blur: [{
2516
+ blur: scaleBlur()
2517
+ }],
2518
+ /**
2519
+ * Brightness
2520
+ * @see https://tailwindcss.com/docs/brightness
2521
+ */
2522
+ brightness: [{
2523
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
2524
+ }],
2525
+ /**
2526
+ * Contrast
2527
+ * @see https://tailwindcss.com/docs/contrast
2528
+ */
2529
+ contrast: [{
2530
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
2531
+ }],
2532
+ /**
2533
+ * Drop Shadow
2534
+ * @see https://tailwindcss.com/docs/drop-shadow
2535
+ */
2536
+ 'drop-shadow': [{
2537
+ 'drop-shadow': [
2538
+ // Deprecated since Tailwind CSS v4.0.0
2539
+ '', 'none', themeDropShadow, isArbitraryVariable, isArbitraryValue]
2540
+ }],
2541
+ /**
2542
+ * Grayscale
2543
+ * @see https://tailwindcss.com/docs/grayscale
2544
+ */
2545
+ grayscale: [{
2546
+ grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]
2547
+ }],
2548
+ /**
2549
+ * Hue Rotate
2550
+ * @see https://tailwindcss.com/docs/hue-rotate
2551
+ */
2552
+ 'hue-rotate': [{
2553
+ 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
2554
+ }],
2555
+ /**
2556
+ * Invert
2557
+ * @see https://tailwindcss.com/docs/invert
2558
+ */
2559
+ invert: [{
2560
+ invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]
2561
+ }],
2562
+ /**
2563
+ * Saturate
2564
+ * @see https://tailwindcss.com/docs/saturate
2565
+ */
2566
+ saturate: [{
2567
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
2568
+ }],
2569
+ /**
2570
+ * Sepia
2571
+ * @see https://tailwindcss.com/docs/sepia
2572
+ */
2573
+ sepia: [{
2574
+ sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]
2575
+ }],
2576
+ /**
2577
+ * Backdrop Filter
2578
+ * @see https://tailwindcss.com/docs/backdrop-filter
2579
+ */
2580
+ 'backdrop-filter': [{
2581
+ 'backdrop-filter': [
2582
+ // Deprecated since Tailwind CSS v3.0.0
2583
+ '', 'none', isArbitraryVariable, isArbitraryValue]
2584
+ }],
2585
+ /**
2586
+ * Backdrop Blur
2587
+ * @see https://tailwindcss.com/docs/backdrop-blur
2588
+ */
2589
+ 'backdrop-blur': [{
2590
+ 'backdrop-blur': scaleBlur()
2591
+ }],
2592
+ /**
2593
+ * Backdrop Brightness
2594
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2595
+ */
2596
+ 'backdrop-brightness': [{
2597
+ 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]
2598
+ }],
2599
+ /**
2600
+ * Backdrop Contrast
2601
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2602
+ */
2603
+ 'backdrop-contrast': [{
2604
+ 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]
2605
+ }],
2606
+ /**
2607
+ * Backdrop Grayscale
2608
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2609
+ */
2610
+ 'backdrop-grayscale': [{
2611
+ 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]
2612
+ }],
2613
+ /**
2614
+ * Backdrop Hue Rotate
2615
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2616
+ */
2617
+ 'backdrop-hue-rotate': [{
2618
+ 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
2619
+ }],
2620
+ /**
2621
+ * Backdrop Invert
2622
+ * @see https://tailwindcss.com/docs/backdrop-invert
2623
+ */
2624
+ 'backdrop-invert': [{
2625
+ 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]
2626
+ }],
2627
+ /**
2628
+ * Backdrop Opacity
2629
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2630
+ */
2631
+ 'backdrop-opacity': [{
2632
+ 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]
2633
+ }],
2634
+ /**
2635
+ * Backdrop Saturate
2636
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2637
+ */
2638
+ 'backdrop-saturate': [{
2639
+ 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]
2640
+ }],
2641
+ /**
2642
+ * Backdrop Sepia
2643
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2644
+ */
2645
+ 'backdrop-sepia': [{
2646
+ 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]
2647
+ }],
2648
+ // --------------
2649
+ // --- Tables ---
2650
+ // --------------
2651
+ /**
2652
+ * Border Collapse
2653
+ * @see https://tailwindcss.com/docs/border-collapse
2654
+ */
2655
+ 'border-collapse': [{
2656
+ border: ['collapse', 'separate']
2657
+ }],
2658
+ /**
2659
+ * Border Spacing
2660
+ * @see https://tailwindcss.com/docs/border-spacing
2661
+ */
2662
+ 'border-spacing': [{
2663
+ 'border-spacing': scaleUnambiguousSpacing()
2664
+ }],
2665
+ /**
2666
+ * Border Spacing X
2667
+ * @see https://tailwindcss.com/docs/border-spacing
2668
+ */
2669
+ 'border-spacing-x': [{
2670
+ 'border-spacing-x': scaleUnambiguousSpacing()
2671
+ }],
2672
+ /**
2673
+ * Border Spacing Y
2674
+ * @see https://tailwindcss.com/docs/border-spacing
2675
+ */
2676
+ 'border-spacing-y': [{
2677
+ 'border-spacing-y': scaleUnambiguousSpacing()
2678
+ }],
2679
+ /**
2680
+ * Table Layout
2681
+ * @see https://tailwindcss.com/docs/table-layout
2682
+ */
2683
+ 'table-layout': [{
2684
+ table: ['auto', 'fixed']
2685
+ }],
2686
+ /**
2687
+ * Caption Side
2688
+ * @see https://tailwindcss.com/docs/caption-side
2689
+ */
2690
+ caption: [{
2691
+ caption: ['top', 'bottom']
2692
+ }],
2693
+ // ---------------------------------
2694
+ // --- Transitions and Animation ---
2695
+ // ---------------------------------
2696
+ /**
2697
+ * Transition Property
2698
+ * @see https://tailwindcss.com/docs/transition-property
2699
+ */
2700
+ transition: [{
2701
+ transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]
2702
+ }],
2703
+ /**
2704
+ * Transition Behavior
2705
+ * @see https://tailwindcss.com/docs/transition-behavior
2706
+ */
2707
+ 'transition-behavior': [{
2708
+ transition: ['normal', 'discrete']
2709
+ }],
2710
+ /**
2711
+ * Transition Duration
2712
+ * @see https://tailwindcss.com/docs/transition-duration
2713
+ */
2714
+ duration: [{
2715
+ duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]
2716
+ }],
2717
+ /**
2718
+ * Transition Timing Function
2719
+ * @see https://tailwindcss.com/docs/transition-timing-function
2720
+ */
2721
+ ease: [{
2722
+ ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]
2723
+ }],
2724
+ /**
2725
+ * Transition Delay
2726
+ * @see https://tailwindcss.com/docs/transition-delay
2727
+ */
2728
+ delay: [{
2729
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2730
+ }],
2731
+ /**
2732
+ * Animation
2733
+ * @see https://tailwindcss.com/docs/animation
2734
+ */
2735
+ animate: [{
2736
+ animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]
2737
+ }],
2738
+ // ------------------
2739
+ // --- Transforms ---
2740
+ // ------------------
2741
+ /**
2742
+ * Backface Visibility
2743
+ * @see https://tailwindcss.com/docs/backface-visibility
2744
+ */
2745
+ backface: [{
2746
+ backface: ['hidden', 'visible']
2747
+ }],
2748
+ /**
2749
+ * Perspective
2750
+ * @see https://tailwindcss.com/docs/perspective
2751
+ */
2752
+ perspective: [{
2753
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2754
+ }],
2755
+ /**
2756
+ * Perspective Origin
2757
+ * @see https://tailwindcss.com/docs/perspective-origin
2758
+ */
2759
+ 'perspective-origin': [{
2760
+ 'perspective-origin': scaleOrigin()
2761
+ }],
2762
+ /**
2763
+ * Rotate
2764
+ * @see https://tailwindcss.com/docs/rotate
2765
+ */
2766
+ rotate: [{
2767
+ rotate: scaleRotate()
2768
+ }],
2769
+ /**
2770
+ * Rotate X
2771
+ * @see https://tailwindcss.com/docs/rotate
2772
+ */
2773
+ 'rotate-x': [{
2774
+ 'rotate-x': scaleRotate()
2775
+ }],
2776
+ /**
2777
+ * Rotate Y
2778
+ * @see https://tailwindcss.com/docs/rotate
2779
+ */
2780
+ 'rotate-y': [{
2781
+ 'rotate-y': scaleRotate()
2782
+ }],
2783
+ /**
2784
+ * Rotate Z
2785
+ * @see https://tailwindcss.com/docs/rotate
2786
+ */
2787
+ 'rotate-z': [{
2788
+ 'rotate-z': scaleRotate()
2789
+ }],
2790
+ /**
2791
+ * Scale
2792
+ * @see https://tailwindcss.com/docs/scale
2793
+ */
2794
+ scale: [{
2795
+ scale: scaleScale()
2796
+ }],
2797
+ /**
2798
+ * Scale X
2799
+ * @see https://tailwindcss.com/docs/scale
2800
+ */
2801
+ 'scale-x': [{
2802
+ 'scale-x': scaleScale()
2803
+ }],
2804
+ /**
2805
+ * Scale Y
2806
+ * @see https://tailwindcss.com/docs/scale
2807
+ */
2808
+ 'scale-y': [{
2809
+ 'scale-y': scaleScale()
2810
+ }],
2811
+ /**
2812
+ * Scale Z
2813
+ * @see https://tailwindcss.com/docs/scale
2814
+ */
2815
+ 'scale-z': [{
2816
+ 'scale-z': scaleScale()
2817
+ }],
2818
+ /**
2819
+ * Scale 3D
2820
+ * @see https://tailwindcss.com/docs/scale
2821
+ */
2822
+ 'scale-3d': ['scale-3d'],
2823
+ /**
2824
+ * Skew
2825
+ * @see https://tailwindcss.com/docs/skew
2826
+ */
2827
+ skew: [{
2828
+ skew: scaleSkew()
2829
+ }],
2830
+ /**
2831
+ * Skew X
2832
+ * @see https://tailwindcss.com/docs/skew
2833
+ */
2834
+ 'skew-x': [{
2835
+ 'skew-x': scaleSkew()
2836
+ }],
2837
+ /**
2838
+ * Skew Y
2839
+ * @see https://tailwindcss.com/docs/skew
2840
+ */
2841
+ 'skew-y': [{
2842
+ 'skew-y': scaleSkew()
2843
+ }],
2844
+ /**
2845
+ * Transform
2846
+ * @see https://tailwindcss.com/docs/transform
2847
+ */
2848
+ transform: [{
2849
+ transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']
2850
+ }],
2851
+ /**
2852
+ * Transform Origin
2853
+ * @see https://tailwindcss.com/docs/transform-origin
2854
+ */
2855
+ 'transform-origin': [{
2856
+ origin: scaleOrigin()
2857
+ }],
2858
+ /**
2859
+ * Transform Style
2860
+ * @see https://tailwindcss.com/docs/transform-style
2861
+ */
2862
+ 'transform-style': [{
2863
+ transform: ['3d', 'flat']
2864
+ }],
2865
+ /**
2866
+ * Translate
2867
+ * @see https://tailwindcss.com/docs/translate
2868
+ */
2869
+ translate: [{
2870
+ translate: scaleTranslate()
2871
+ }],
2872
+ /**
2873
+ * Translate X
2874
+ * @see https://tailwindcss.com/docs/translate
2875
+ */
2876
+ 'translate-x': [{
2877
+ 'translate-x': scaleTranslate()
2878
+ }],
2879
+ /**
2880
+ * Translate Y
2881
+ * @see https://tailwindcss.com/docs/translate
2882
+ */
2883
+ 'translate-y': [{
2884
+ 'translate-y': scaleTranslate()
2885
+ }],
2886
+ /**
2887
+ * Translate Z
2888
+ * @see https://tailwindcss.com/docs/translate
2889
+ */
2890
+ 'translate-z': [{
2891
+ 'translate-z': scaleTranslate()
2892
+ }],
2893
+ /**
2894
+ * Translate None
2895
+ * @see https://tailwindcss.com/docs/translate
2896
+ */
2897
+ 'translate-none': ['translate-none'],
2898
+ // ---------------------
2899
+ // --- Interactivity ---
2900
+ // ---------------------
2901
+ /**
2902
+ * Accent Color
2903
+ * @see https://tailwindcss.com/docs/accent-color
2904
+ */
2905
+ accent: [{
2906
+ accent: scaleColor()
2907
+ }],
2908
+ /**
2909
+ * Appearance
2910
+ * @see https://tailwindcss.com/docs/appearance
2911
+ */
2912
+ appearance: [{
2913
+ appearance: ['none', 'auto']
2914
+ }],
2915
+ /**
2916
+ * Caret Color
2917
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2918
+ */
2919
+ 'caret-color': [{
2920
+ caret: scaleColor()
2921
+ }],
2922
+ /**
2923
+ * Color Scheme
2924
+ * @see https://tailwindcss.com/docs/color-scheme
2925
+ */
2926
+ 'color-scheme': [{
2927
+ scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']
2928
+ }],
2929
+ /**
2930
+ * Cursor
2931
+ * @see https://tailwindcss.com/docs/cursor
2932
+ */
2933
+ cursor: [{
2934
+ cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]
2935
+ }],
2936
+ /**
2937
+ * Field Sizing
2938
+ * @see https://tailwindcss.com/docs/field-sizing
2939
+ */
2940
+ 'field-sizing': [{
2941
+ 'field-sizing': ['fixed', 'content']
2942
+ }],
2943
+ /**
2944
+ * Pointer Events
2945
+ * @see https://tailwindcss.com/docs/pointer-events
2946
+ */
2947
+ 'pointer-events': [{
2948
+ 'pointer-events': ['auto', 'none']
2949
+ }],
2950
+ /**
2951
+ * Resize
2952
+ * @see https://tailwindcss.com/docs/resize
2953
+ */
2954
+ resize: [{
2955
+ resize: ['none', '', 'y', 'x']
2956
+ }],
2957
+ /**
2958
+ * Scroll Behavior
2959
+ * @see https://tailwindcss.com/docs/scroll-behavior
2960
+ */
2961
+ 'scroll-behavior': [{
2962
+ scroll: ['auto', 'smooth']
2963
+ }],
2964
+ /**
2965
+ * Scroll Margin
2966
+ * @see https://tailwindcss.com/docs/scroll-margin
2967
+ */
2968
+ 'scroll-m': [{
2969
+ 'scroll-m': scaleUnambiguousSpacing()
2970
+ }],
2971
+ /**
2972
+ * Scroll Margin X
2973
+ * @see https://tailwindcss.com/docs/scroll-margin
2974
+ */
2975
+ 'scroll-mx': [{
2976
+ 'scroll-mx': scaleUnambiguousSpacing()
2977
+ }],
2978
+ /**
2979
+ * Scroll Margin Y
2980
+ * @see https://tailwindcss.com/docs/scroll-margin
2981
+ */
2982
+ 'scroll-my': [{
2983
+ 'scroll-my': scaleUnambiguousSpacing()
2984
+ }],
2985
+ /**
2986
+ * Scroll Margin Start
2987
+ * @see https://tailwindcss.com/docs/scroll-margin
2988
+ */
2989
+ 'scroll-ms': [{
2990
+ 'scroll-ms': scaleUnambiguousSpacing()
2991
+ }],
2992
+ /**
2993
+ * Scroll Margin End
2994
+ * @see https://tailwindcss.com/docs/scroll-margin
2995
+ */
2996
+ 'scroll-me': [{
2997
+ 'scroll-me': scaleUnambiguousSpacing()
2998
+ }],
2999
+ /**
3000
+ * Scroll Margin Top
3001
+ * @see https://tailwindcss.com/docs/scroll-margin
3002
+ */
3003
+ 'scroll-mt': [{
3004
+ 'scroll-mt': scaleUnambiguousSpacing()
3005
+ }],
3006
+ /**
3007
+ * Scroll Margin Right
3008
+ * @see https://tailwindcss.com/docs/scroll-margin
3009
+ */
3010
+ 'scroll-mr': [{
3011
+ 'scroll-mr': scaleUnambiguousSpacing()
3012
+ }],
3013
+ /**
3014
+ * Scroll Margin Bottom
3015
+ * @see https://tailwindcss.com/docs/scroll-margin
3016
+ */
3017
+ 'scroll-mb': [{
3018
+ 'scroll-mb': scaleUnambiguousSpacing()
3019
+ }],
3020
+ /**
3021
+ * Scroll Margin Left
3022
+ * @see https://tailwindcss.com/docs/scroll-margin
3023
+ */
3024
+ 'scroll-ml': [{
3025
+ 'scroll-ml': scaleUnambiguousSpacing()
3026
+ }],
3027
+ /**
3028
+ * Scroll Padding
3029
+ * @see https://tailwindcss.com/docs/scroll-padding
3030
+ */
3031
+ 'scroll-p': [{
3032
+ 'scroll-p': scaleUnambiguousSpacing()
3033
+ }],
3034
+ /**
3035
+ * Scroll Padding X
3036
+ * @see https://tailwindcss.com/docs/scroll-padding
3037
+ */
3038
+ 'scroll-px': [{
3039
+ 'scroll-px': scaleUnambiguousSpacing()
3040
+ }],
3041
+ /**
3042
+ * Scroll Padding Y
3043
+ * @see https://tailwindcss.com/docs/scroll-padding
3044
+ */
3045
+ 'scroll-py': [{
3046
+ 'scroll-py': scaleUnambiguousSpacing()
3047
+ }],
3048
+ /**
3049
+ * Scroll Padding Start
3050
+ * @see https://tailwindcss.com/docs/scroll-padding
3051
+ */
3052
+ 'scroll-ps': [{
3053
+ 'scroll-ps': scaleUnambiguousSpacing()
3054
+ }],
3055
+ /**
3056
+ * Scroll Padding End
3057
+ * @see https://tailwindcss.com/docs/scroll-padding
3058
+ */
3059
+ 'scroll-pe': [{
3060
+ 'scroll-pe': scaleUnambiguousSpacing()
3061
+ }],
3062
+ /**
3063
+ * Scroll Padding Top
3064
+ * @see https://tailwindcss.com/docs/scroll-padding
3065
+ */
3066
+ 'scroll-pt': [{
3067
+ 'scroll-pt': scaleUnambiguousSpacing()
3068
+ }],
3069
+ /**
3070
+ * Scroll Padding Right
3071
+ * @see https://tailwindcss.com/docs/scroll-padding
3072
+ */
3073
+ 'scroll-pr': [{
3074
+ 'scroll-pr': scaleUnambiguousSpacing()
3075
+ }],
3076
+ /**
3077
+ * Scroll Padding Bottom
3078
+ * @see https://tailwindcss.com/docs/scroll-padding
3079
+ */
3080
+ 'scroll-pb': [{
3081
+ 'scroll-pb': scaleUnambiguousSpacing()
3082
+ }],
3083
+ /**
3084
+ * Scroll Padding Left
3085
+ * @see https://tailwindcss.com/docs/scroll-padding
3086
+ */
3087
+ 'scroll-pl': [{
3088
+ 'scroll-pl': scaleUnambiguousSpacing()
3089
+ }],
3090
+ /**
3091
+ * Scroll Snap Align
3092
+ * @see https://tailwindcss.com/docs/scroll-snap-align
3093
+ */
3094
+ 'snap-align': [{
3095
+ snap: ['start', 'end', 'center', 'align-none']
3096
+ }],
3097
+ /**
3098
+ * Scroll Snap Stop
3099
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
3100
+ */
3101
+ 'snap-stop': [{
3102
+ snap: ['normal', 'always']
3103
+ }],
3104
+ /**
3105
+ * Scroll Snap Type
3106
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3107
+ */
3108
+ 'snap-type': [{
3109
+ snap: ['none', 'x', 'y', 'both']
3110
+ }],
3111
+ /**
3112
+ * Scroll Snap Type Strictness
3113
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3114
+ */
3115
+ 'snap-strictness': [{
3116
+ snap: ['mandatory', 'proximity']
3117
+ }],
3118
+ /**
3119
+ * Touch Action
3120
+ * @see https://tailwindcss.com/docs/touch-action
3121
+ */
3122
+ touch: [{
3123
+ touch: ['auto', 'none', 'manipulation']
3124
+ }],
3125
+ /**
3126
+ * Touch Action X
3127
+ * @see https://tailwindcss.com/docs/touch-action
3128
+ */
3129
+ 'touch-x': [{
3130
+ 'touch-pan': ['x', 'left', 'right']
3131
+ }],
3132
+ /**
3133
+ * Touch Action Y
3134
+ * @see https://tailwindcss.com/docs/touch-action
3135
+ */
3136
+ 'touch-y': [{
3137
+ 'touch-pan': ['y', 'up', 'down']
3138
+ }],
3139
+ /**
3140
+ * Touch Action Pinch Zoom
3141
+ * @see https://tailwindcss.com/docs/touch-action
3142
+ */
3143
+ 'touch-pz': ['touch-pinch-zoom'],
3144
+ /**
3145
+ * User Select
3146
+ * @see https://tailwindcss.com/docs/user-select
3147
+ */
3148
+ select: [{
3149
+ select: ['none', 'text', 'all', 'auto']
3150
+ }],
3151
+ /**
3152
+ * Will Change
3153
+ * @see https://tailwindcss.com/docs/will-change
3154
+ */
3155
+ 'will-change': [{
3156
+ 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]
3157
+ }],
3158
+ // -----------
3159
+ // --- SVG ---
3160
+ // -----------
3161
+ /**
3162
+ * Fill
3163
+ * @see https://tailwindcss.com/docs/fill
3164
+ */
3165
+ fill: [{
3166
+ fill: ['none', ...scaleColor()]
3167
+ }],
3168
+ /**
3169
+ * Stroke Width
3170
+ * @see https://tailwindcss.com/docs/stroke-width
3171
+ */
3172
+ 'stroke-w': [{
3173
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
3174
+ }],
3175
+ /**
3176
+ * Stroke
3177
+ * @see https://tailwindcss.com/docs/stroke
3178
+ */
3179
+ stroke: [{
3180
+ stroke: ['none', ...scaleColor()]
3181
+ }],
3182
+ // ---------------------
3183
+ // --- Accessibility ---
3184
+ // ---------------------
3185
+ /**
3186
+ * Forced Color Adjust
3187
+ * @see https://tailwindcss.com/docs/forced-color-adjust
3188
+ */
3189
+ 'forced-color-adjust': [{
3190
+ 'forced-color-adjust': ['auto', 'none']
3191
+ }]
3192
+ },
3193
+ conflictingClassGroups: {
3194
+ overflow: ['overflow-x', 'overflow-y'],
3195
+ overscroll: ['overscroll-x', 'overscroll-y'],
3196
+ inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
3197
+ 'inset-x': ['right', 'left'],
3198
+ 'inset-y': ['top', 'bottom'],
3199
+ flex: ['basis', 'grow', 'shrink'],
3200
+ gap: ['gap-x', 'gap-y'],
3201
+ p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
3202
+ px: ['pr', 'pl'],
3203
+ py: ['pt', 'pb'],
3204
+ m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
3205
+ mx: ['mr', 'ml'],
3206
+ my: ['mt', 'mb'],
3207
+ size: ['w', 'h'],
3208
+ 'font-size': ['leading'],
3209
+ 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
3210
+ 'fvn-ordinal': ['fvn-normal'],
3211
+ 'fvn-slashed-zero': ['fvn-normal'],
3212
+ 'fvn-figure': ['fvn-normal'],
3213
+ 'fvn-spacing': ['fvn-normal'],
3214
+ 'fvn-fraction': ['fvn-normal'],
3215
+ 'line-clamp': ['display', 'overflow'],
3216
+ rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],
3217
+ 'rounded-s': ['rounded-ss', 'rounded-es'],
3218
+ 'rounded-e': ['rounded-se', 'rounded-ee'],
3219
+ 'rounded-t': ['rounded-tl', 'rounded-tr'],
3220
+ 'rounded-r': ['rounded-tr', 'rounded-br'],
3221
+ 'rounded-b': ['rounded-br', 'rounded-bl'],
3222
+ 'rounded-l': ['rounded-tl', 'rounded-bl'],
3223
+ 'border-spacing': ['border-spacing-x', 'border-spacing-y'],
3224
+ 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
3225
+ 'border-w-x': ['border-w-r', 'border-w-l'],
3226
+ 'border-w-y': ['border-w-t', 'border-w-b'],
3227
+ 'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
3228
+ 'border-color-x': ['border-color-r', 'border-color-l'],
3229
+ 'border-color-y': ['border-color-t', 'border-color-b'],
3230
+ translate: ['translate-x', 'translate-y', 'translate-none'],
3231
+ 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
3232
+ 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
3233
+ 'scroll-mx': ['scroll-mr', 'scroll-ml'],
3234
+ 'scroll-my': ['scroll-mt', 'scroll-mb'],
3235
+ 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
3236
+ 'scroll-px': ['scroll-pr', 'scroll-pl'],
3237
+ 'scroll-py': ['scroll-pt', 'scroll-pb'],
3238
+ touch: ['touch-x', 'touch-y', 'touch-pz'],
3239
+ 'touch-x': ['touch'],
3240
+ 'touch-y': ['touch'],
3241
+ 'touch-pz': ['touch']
3242
+ },
3243
+ conflictingClassGroupModifiers: {
3244
+ 'font-size': ['leading']
3245
+ },
3246
+ orderSensitiveModifiers: ['before', 'after', 'placeholder', 'file', 'marker', 'selection', 'first-line', 'first-letter', 'backdrop', '*', '**']
3247
+ };
3248
+ };
3249
+ const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
3250
+
3251
+ class ComponentTheme {
3252
+ constructor(tag, base, subThemes, defaults = {}) {
3253
+ this.tag = tag;
3254
+ this.base = base;
3255
+ this.defaults = defaults;
3256
+ const defaultInternalThemes = {
3257
+ layout: {
3258
+ hide: new HideTheme(),
3259
+ items: new ItemsTheme(),
3260
+ justify: new JustifyTheme(),
3261
+ position: new PositionTheme(),
3262
+ display: new DisplayTheme()
3263
+ },
3264
+ typography: {
3265
+ fontFamily: new FontFamilyTheme(),
3266
+ fontWeight: new FontWeightTheme(),
3267
+ fontStyle: new FontStyleTheme(),
3268
+ textDecoration: new TextDecorationTheme(),
3269
+ textTransform: new TextTransformTheme(),
3270
+ textAlign: new TextAlignTheme()
3271
+ }
3272
+ };
3273
+ this.themes = deepMerge(defaultInternalThemes, subThemes);
3274
+ }
3275
+ getClasses(props, defaults = this.defaults) {
3276
+ const user = props;
3277
+ const defs = defaults;
3278
+ const classes = [];
3279
+ if (this.base) {
3280
+ classes.push(...this.base.split(/\s+/));
3281
+ }
3282
+ const walk = (map) => {
3283
+ for (const key of Object.keys(map)) {
3284
+ const node = map[key];
3285
+ if (node instanceof BaseTheme) {
3286
+ classes.push(...node.getClasses(user, defs));
3287
+ }
3288
+ else if (node && typeof node === "object" && !Array.isArray(node)) {
3289
+ walk(node);
3290
+ }
3291
+ }
3292
+ };
3293
+ walk(this.themes);
3294
+ return classes.filter(Boolean);
3295
+ }
3296
+ getComponentConfig(props, propsToOmit = []) {
3297
+ var _a;
3298
+ const cleanProps = { ...props };
3299
+ for (const k of propsToOmit) {
3300
+ delete cleanProps[k];
3301
+ }
3302
+ const { className, tag, ...other } = cleanProps;
3303
+ const componentTag = (_a = tag !== null && tag !== void 0 ? tag : this.tag) !== null && _a !== void 0 ? _a : "div";
3304
+ const themeGeneratedClasses = this.getClasses(props);
3305
+ const finalClasses = twMerge(...themeGeneratedClasses, className);
3306
+ return {
3307
+ Tag: componentTag,
3308
+ finalClasses,
3309
+ finalProps: other,
3310
+ };
3311
+ }
3312
+ }
3313
+
3314
+ class SizeTheme extends BaseTheme {
3315
+ constructor(initial) {
3316
+ super();
3317
+ SIZE_KEYS.forEach((key) => {
3318
+ var _a;
3319
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : SizeTheme.defaultClasses[key];
3320
+ });
3321
+ }
3322
+ getClasses(props, defaults) {
3323
+ const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS);
3324
+ return [this[size !== null && size !== void 0 ? size : 'md'] || ''];
3325
+ }
3326
+ }
3327
+ SizeTheme.defaultClasses = {
3328
+ xs: '',
3329
+ sm: '',
3330
+ md: '',
3331
+ lg: '',
3332
+ xl: ''
3333
+ };
3334
+
3335
+ class GapTheme extends BaseTheme {
3336
+ constructor(initial) {
3337
+ super();
3338
+ GAP_KEYS.forEach((key) => {
3339
+ var _a;
3340
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : GapTheme.defaultClasses[key];
3341
+ });
3342
+ }
3343
+ getClasses(props, defaults) {
3344
+ const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS) || 'md';
3345
+ const key = pickFirstTruthyKey(props, defaults, GAP_KEYS) || 'noGap';
3346
+ return [typeof this[key] === 'string' ? this[key] : this[key][size]];
3347
+ }
3348
+ }
3349
+ GapTheme.defaultClasses = {
3350
+ gap: {
3351
+ xs: 'gap-2',
3352
+ sm: 'gap-3',
3353
+ md: 'gap-4',
3354
+ lg: 'gap-5',
3355
+ xl: 'gap-6',
3356
+ },
3357
+ noGap: "gap-0"
3358
+ };
3359
+
3360
+ class RadiusTheme extends BaseTheme {
3361
+ constructor(initial) {
3362
+ super();
3363
+ SHAPE_KEYS.forEach((key) => {
3364
+ var _a;
3365
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : RadiusTheme.defaultClasses[key];
3366
+ });
3367
+ }
3368
+ getClasses(props, defaults) {
3369
+ const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS) || 'md';
3370
+ const shape = pickFirstTruthyKey(props, defaults, SHAPE_KEYS) || 'rounded';
3371
+ return [typeof this[shape] === 'string' ? this[shape] : this[shape][size]];
3372
+ }
3373
+ }
3374
+ RadiusTheme.defaultClasses = {
3375
+ pill: "rounded-full",
3376
+ sharp: "rounded-none",
3377
+ rounded: {
3378
+ xs: "rounded-sm",
3379
+ sm: "rounded-md",
3380
+ md: "rounded-lg",
3381
+ lg: "rounded-xl",
3382
+ xl: "rounded-2xl",
3383
+ }
3384
+ };
3385
+
3386
+ class ShadowTheme extends BaseTheme {
3387
+ constructor(initial) {
3388
+ super();
3389
+ SHADOW_KEYS.forEach((key) => {
3390
+ var _a;
3391
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : ShadowTheme.defaultClasses[key];
3392
+ });
3393
+ }
3394
+ getClasses(props, defaults) {
3395
+ const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS) || 'md';
3396
+ const key = pickFirstTruthyKey(props, defaults, SHADOW_KEYS);
3397
+ if (key === undefined) {
3398
+ return [];
3399
+ }
3400
+ const isModeStringMap = MODE_KEYS.every(m => typeof this[key][m] === "string");
3401
+ return MODE_KEYS.map(mode => isModeStringMap
3402
+ ? this[key][mode]
3403
+ : this[key][mode][size]);
3404
+ }
3405
+ }
3406
+ ShadowTheme.defaultClasses = {
3407
+ shadow: {
3408
+ base: {
3409
+ xs: "shadow-2xs",
3410
+ sm: "shadow-xs",
3411
+ md: "shadow-sm",
3412
+ lg: "shadow-md",
3413
+ xl: "shadow-lg"
3414
+ },
3415
+ hover: {
3416
+ xs: "hover:shadow-xs",
3417
+ sm: "hover:shadow-sm",
3418
+ md: "hover:shadow-md",
3419
+ lg: "hover:shadow-lg",
3420
+ xl: "hover:shadow-xl"
3421
+ },
3422
+ active: {
3423
+ xs: "active:shadow-xs",
3424
+ sm: "active:shadow-sm",
3425
+ md: "active:shadow-md",
3426
+ lg: "active:shadow-lg",
3427
+ xl: "active:shadow-xl"
3428
+ },
3429
+ },
3430
+ noShadow: {
3431
+ base: "shadow-none",
3432
+ hover: "hover:shadow-none",
3433
+ active: "active:shadow-none",
3434
+ }
3435
+ };
3436
+
3437
+ class BorderTheme extends BaseTheme {
3438
+ constructor(initial) {
3439
+ super();
3440
+ BORDER_KEYS.forEach((key) => {
3441
+ this[key] = {
3442
+ ...BorderTheme.defaultClasses[key],
3443
+ ...((initial === null || initial === void 0 ? void 0 : initial[key]) || {}),
3444
+ };
3445
+ });
3446
+ }
3447
+ getClasses(props, defaults) {
3448
+ const key = pickFirstTruthyKey(props, defaults, BORDER_KEYS);
3449
+ if (!key || !this[key]) {
3450
+ return MODE_KEYS.map(() => '');
3451
+ }
3452
+ return MODE_KEYS.map(mode => this[key][mode] || '');
3453
+ }
3454
+ }
3455
+ BorderTheme.defaultClasses = {
3456
+ border: {
3457
+ base: "border",
3458
+ hover: "hover:border",
3459
+ active: "active:border",
3460
+ },
3461
+ noBorder: {
3462
+ base: "",
3463
+ hover: "",
3464
+ active: "",
3465
+ },
3466
+ //noBorder: {
3467
+ // base: "border-none",
3468
+ // hover: "hover:border-none",
3469
+ // active: "active:border-none",
3470
+ //},
3471
+ };
3472
+
3473
+ class RingTheme extends BaseTheme {
3474
+ constructor(initial) {
3475
+ super();
3476
+ RING_KEYS.forEach((key) => {
3477
+ this[key] = {
3478
+ ...RingTheme.defaultClasses[key],
3479
+ ...((initial === null || initial === void 0 ? void 0 : initial[key]) || {}),
3480
+ };
3481
+ });
3482
+ }
3483
+ getClasses(props, defaults) {
3484
+ const key = pickFirstTruthyKey(props, defaults, RING_KEYS);
3485
+ if (!key || !this[key]) {
3486
+ return MODE_KEYS.map(() => '');
3487
+ }
3488
+ return MODE_KEYS.map(mode => this[key][mode] || '');
3489
+ }
3490
+ }
3491
+ RingTheme.defaultClasses = {
3492
+ ring: {
3493
+ base: "ring ring-inset",
3494
+ hover: "hover:ring hover:ring-inset",
3495
+ active: "active:ring active:ring-inset",
3496
+ },
3497
+ noRing: {
3498
+ base: "ring-0",
3499
+ hover: "hover:ring-0",
3500
+ active: "active:ring-0",
3501
+ },
3502
+ };
3503
+
3504
+ class PxTheme extends BaseTheme {
3505
+ constructor(initial) {
3506
+ super();
3507
+ PADDING_KEYS.forEach((key) => {
3508
+ var _a;
3509
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : PxTheme.defaultClasses[key];
3510
+ });
3511
+ }
3512
+ getClasses(props, defaults) {
3513
+ const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS) || 'md';
3514
+ const key = pickFirstTruthyKey(props, defaults, PADDING_KEYS) || 'noPadding';
3515
+ return [typeof this[key] === 'string' ? this[key] : this[key][size]];
3516
+ }
3517
+ }
3518
+ PxTheme.defaultClasses = {
3519
+ padding: {
3520
+ xs: "px-2",
3521
+ sm: "px-4",
3522
+ md: "px-6",
3523
+ lg: "px-8",
3524
+ xl: "px-10"
3525
+ },
3526
+ noPadding: "px-0"
3527
+ };
3528
+
3529
+ class PyTheme extends BaseTheme {
3530
+ constructor(initial) {
3531
+ super();
3532
+ PADDING_KEYS.forEach((key) => {
3533
+ var _a;
3534
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : PyTheme.defaultClasses[key];
3535
+ });
3536
+ }
3537
+ getClasses(props, defaults) {
3538
+ const size = pickFirstTruthyKey(props, defaults, SIZE_KEYS) || 'md';
3539
+ const key = pickFirstTruthyKey(props, defaults, PADDING_KEYS) || 'noPadding';
3540
+ return [typeof this[key] === 'string' ? this[key] : this[key][size]];
3541
+ }
3542
+ }
3543
+ PyTheme.defaultClasses = {
3544
+ padding: {
3545
+ xs: "py-2",
3546
+ sm: "py-4",
3547
+ md: "py-6",
3548
+ lg: "py-8",
3549
+ xl: "py-10"
3550
+ },
3551
+ noPadding: "py-0"
3552
+ };
3553
+
3554
+ const filledTextAppearanceClasses = {
3555
+ default: "text-white",
3556
+ primary: "text-white",
3557
+ secondary: "text-white",
3558
+ tertiary: "text-white",
3559
+ muted: "text-white",
3560
+ link: "text-white",
3561
+ accent: "text-white",
3562
+ success: "text-white",
3563
+ danger: "text-white",
3564
+ warning: "text-white",
3565
+ info: "text-white",
3566
+ };
3567
+ const textAppearanceClasses = {
3568
+ default: "text-(--text-color-default)",
3569
+ primary: "text-(--text-color-primary)",
3570
+ secondary: "text-(--text-color-secondary)",
3571
+ tertiary: "text-(--text-color-tertiary)",
3572
+ muted: "text-(--text-color-muted)",
3573
+ link: "text-(--text-color-link)",
3574
+ accent: "text-(--text-color-accent)",
3575
+ success: "text-(--text-color-success)",
3576
+ danger: "text-(--text-color-danger)",
3577
+ warning: "text-(--text-color-warning)",
3578
+ info: "text-(--text-color-info)",
3579
+ };
3580
+ const textSizeClasses = {
3581
+ xs: "text-xs",
3582
+ sm: "text-sm",
3583
+ md: "text-base",
3584
+ lg: "text-lg",
3585
+ xl: "text-xl",
3586
+ };
3587
+
3588
+ class TextAppearanceTheme extends BaseTheme {
3589
+ constructor(initialOverrides) {
3590
+ super();
3591
+ TEXT_APPEARANCE_KEYS.forEach((textKey) => {
3592
+ const defaultModesForKey = TextAppearanceTheme.defaultFullConfig[textKey];
3593
+ const overrideModesForKey = initialOverrides === null || initialOverrides === void 0 ? void 0 : initialOverrides[textKey];
3594
+ this[textKey] = {
3595
+ ...defaultModesForKey,
3596
+ ...(overrideModesForKey || {}),
3597
+ };
3598
+ });
3599
+ }
3600
+ getClasses(props, defaults) {
3601
+ const pickedAppearanceKey = pickFirstTruthyKey(props, defaults, TEXT_APPEARANCE_KEYS) || 'default';
3602
+ const modesForAppearance = this[pickedAppearanceKey];
3603
+ if (!modesForAppearance) {
3604
+ return MODE_KEYS.map(() => '');
3605
+ }
3606
+ return MODE_KEYS.map(mode => modesForAppearance[mode] || '');
3607
+ }
3608
+ static createDefaultStyle(src = {}) {
3609
+ const initialOverridesForConstructor = {};
3610
+ TEXT_APPEARANCE_KEYS.forEach((textKey) => {
3611
+ const modesForCurrentTextKey = {};
3612
+ let keyHasDataInSrc = false;
3613
+ MODE_KEYS.forEach((modeKey) => {
3614
+ var _a;
3615
+ const classValue = (_a = src[modeKey]) === null || _a === void 0 ? void 0 : _a[textKey];
3616
+ if (classValue !== undefined) {
3617
+ modesForCurrentTextKey[modeKey] = classValue;
3618
+ keyHasDataInSrc = true;
3619
+ }
3620
+ });
3621
+ if (keyHasDataInSrc) {
3622
+ initialOverridesForConstructor[textKey] = modesForCurrentTextKey;
3623
+ }
3624
+ });
3625
+ return new TextAppearanceTheme(initialOverridesForConstructor);
3626
+ }
3627
+ }
3628
+ TextAppearanceTheme.defaultFullConfig = (() => {
3629
+ const config = {};
3630
+ TEXT_APPEARANCE_KEYS.forEach((key) => {
3631
+ config[key] = {
3632
+ base: textAppearanceClasses[key] || '',
3633
+ hover: '',
3634
+ active: '',
3635
+ };
3636
+ });
3637
+ return config;
3638
+ })();
3639
+
3640
+ const filledBackgroundAppearanceClasses = {
3641
+ default: "bg-(--filled-background-color-default)",
3642
+ primary: "bg-(--filled-background-color-primary)",
3643
+ secondary: "bg-(--filled-background-color-secondary)",
3644
+ tertiary: "bg-(--filled-background-color-tertiary)",
3645
+ accent: "bg-(--filled-background-color-accent)",
3646
+ success: "bg-(--filled-background-color-success)",
3647
+ danger: "bg-(--filled-background-color-danger)",
3648
+ warning: "bg-(--filled-background-color-warning)",
3649
+ info: "bg-(--filled-background-color-info)",
3650
+ transparent: "bg-transparent",
3651
+ };
3652
+ const filledHoverBackgroundAppearanceClasses = {
3653
+ default: "hover:bg-(--filled-background-color-hover-default)",
3654
+ primary: "hover:bg-(--filled-background-color-hover-primary)",
3655
+ secondary: "hover:bg-(--filled-background-color-hover-secondary)",
3656
+ tertiary: "hover:bg-(--filled-background-color-hover-tertiary)",
3657
+ accent: "hover:bg-(--filled-background-color-hover-accent)",
3658
+ success: "hover:bg-(--filled-background-color-hover-success)",
3659
+ danger: "hover:bg-(--filled-background-color-hover-danger)",
3660
+ warning: "hover:bg-(--filled-background-color-hover-warning)",
3661
+ info: "hover:bg-(--filled-background-color-hover-info)",
3662
+ transparent: "hover:bg-transparent",
3663
+ };
3664
+ const filledActiveBackgroundAppearanceClasses = {
3665
+ default: "active:bg-(--filled-background-color-active-default)",
3666
+ primary: "active:bg-(--filled-background-color-active-primary)",
3667
+ secondary: "active:bg-(--filled-background-color-active-secondary)",
3668
+ tertiary: "active:bg-(--filled-background-color-active-tertiary)",
3669
+ accent: "active:bg-(--filled-background-color-active-accent)",
3670
+ success: "active:bg-(--filled-background-color-active-success)",
3671
+ danger: "active:bg-(--filled-background-color-active-danger)",
3672
+ warning: "active:bg-(--filled-background-color-active-warning)",
3673
+ info: "active:bg-(--filled-background-color-active-info)",
3674
+ transparent: "active:bg-transparent",
3675
+ };
3676
+ const backgroundAppearanceClasses = {
3677
+ default: "bg-(--background-color-default)",
3678
+ primary: "bg-(--background-color-primary)",
3679
+ secondary: "bg-(--background-color-secondary)",
3680
+ tertiary: "bg-(--background-color-tertiary)",
3681
+ accent: "bg-(--background-color-accent)",
3682
+ success: "bg-(--background-color-success)",
3683
+ danger: "bg-(--background-color-danger)",
3684
+ warning: "bg-(--background-color-warning)",
3685
+ info: "bg-(--background-color-info)",
3686
+ transparent: "bg-transparent",
3687
+ };
3688
+ const hoverBackgroundAppearanceClasses = {
3689
+ default: "hover:bg-(--background-color-hover-default)",
3690
+ primary: "hover:bg-(--background-color-hover-primary)",
3691
+ secondary: "hover:bg-(--background-color-hover-secondary)",
3692
+ tertiary: "hover:bg-(--background-color-hover-tertiary)",
3693
+ accent: "hover:bg-(--background-color-hover-accent)",
3694
+ success: "hover:bg-(--background-color-hover-success)",
3695
+ danger: "hover:bg-(--background-color-hover-danger)",
3696
+ warning: "hover:bg-(--background-color-hover-warning)",
3697
+ info: "hover:bg-(--background-color-hover-info)",
3698
+ transparent: "hover:bg-transparent",
3699
+ };
3700
+ const activeBackgroundAppearanceClasses = {
3701
+ default: "active:bg-(--background-color-active-default)",
3702
+ primary: "active:bg-(--background-color-active-primary)",
3703
+ secondary: "active:bg-(--background-color-active-secondary)",
3704
+ tertiary: "active:bg-(--background-color-active-tertiary)",
3705
+ accent: "active:bg-(--background-color-active-accent)",
3706
+ success: "active:bg-(--background-color-active-success)",
3707
+ danger: "active:bg-(--background-color-active-danger)",
3708
+ warning: "active:bg-(--background-color-active-warning)",
3709
+ info: "active:bg-(--background-color-active-info)",
3710
+ transparent: "active:bg-transparent",
3711
+ };
3712
+ const layoutBackgroundAppearanceClasses = {
3713
+ default: "bg-(--layout-background-default)",
3714
+ primary: "bg-(--layout-background-primary)",
3715
+ secondary: "bg-(--layout-background-secondary)",
3716
+ tertiary: "bg-(--layout-background-tertiary)",
3717
+ accent: "bg-(--layout-background-accent)",
3718
+ success: "bg-(--layout-background-success)",
3719
+ danger: "bg-(--layout-background-danger)",
3720
+ warning: "bg-(--layout-background-warning)",
3721
+ info: "bg-(--layout-background-info)",
3722
+ transparent: "bg-transparent",
3723
+ };
3724
+ const bgBorderAppearanceClasses = {
3725
+ default: "bg-(--border-color-default)",
3726
+ primary: "bg-(--border-color-primary)",
3727
+ secondary: "bg-(--border-color-secondary)",
3728
+ tertiary: "bg-(--border-color-tertiary)",
3729
+ accent: "bg-(--border-color-accent)",
3730
+ success: "bg-(--border-color-success)",
3731
+ danger: "bg-(--border-color-danger)",
3732
+ warning: "bg-(--border-color-warning)",
3733
+ info: "bg-(--border-color-info)",
3734
+ muted: "bg-(--border-color-muted)",
3735
+ link: "bg-(--border-color-link)",
3736
+ };
3737
+ const borderAppearanceClasses = {
3738
+ default: "border-(--border-color-default)",
3739
+ primary: "border-(--border-color-primary)",
3740
+ secondary: "border-(--border-color-secondary)",
3741
+ tertiary: "border-(--border-color-tertiary)",
3742
+ accent: "border-(--border-color-accent)",
3743
+ success: "border-(--border-color-success)",
3744
+ danger: "border-(--border-color-danger)",
3745
+ warning: "border-(--border-color-warning)",
3746
+ info: "border-(--border-color-info)",
3747
+ muted: "border-(--border-color-muted)",
3748
+ link: "border-(--border-color-link)",
3749
+ };
3750
+ const filledBorderAppearanceClasses = {
3751
+ default: "border-(--filled-border-color-default)",
3752
+ primary: "border-(--filled-border-color-primary)",
3753
+ secondary: "border-(--filled-border-color-secondary)",
3754
+ tertiary: "border-(--filled-border-color-tertiary)",
3755
+ accent: "border-(--filled-border-color-accent)",
3756
+ success: "border-(--filled-border-color-success)",
3757
+ danger: "border-(--filled-border-color-danger)",
3758
+ warning: "border-(--filled-border-color-warning)",
3759
+ info: "border-(--filled-border-color-info)",
3760
+ muted: "border-(--filled-border-color-muted)",
3761
+ link: "border-(--filled-border-color-link)",
3762
+ };
3763
+ const ringAppearanceClasses = {
3764
+ default: "ring-(--border-color-default)",
3765
+ primary: "ring-(--border-color-primary)",
3766
+ secondary: "ring-(--border-color-secondary)",
3767
+ tertiary: "ring-(--border-color-tertiary)",
3768
+ accent: "ring-(--border-color-accent)",
3769
+ success: "ring-(--border-color-success)",
3770
+ danger: "ring-(--border-color-danger)",
3771
+ warning: "ring-(--border-color-warning)",
3772
+ info: "ring-(--border-color-info)",
3773
+ muted: "ring-(--border-color-muted)",
3774
+ link: "ring-(--border-color-link)",
3775
+ };
3776
+ const filledRingAppearanceClasses = {
3777
+ default: "ring-(--filled-border-color-default)",
3778
+ primary: "ring-(--filled-border-color-primary)",
3779
+ secondary: "ring-(--filled-border-color-secondary)",
3780
+ tertiary: "ring-(--filled-border-color-tertiary)",
3781
+ accent: "ring-(--filled-border-color-accent)",
3782
+ success: "ring-(--filled-border-color-success)",
3783
+ danger: "ring-(--filled-border-color-danger)",
3784
+ warning: "ring-(--filled-border-color-warning)",
3785
+ info: "ring-(--filled-border-color-info)",
3786
+ muted: "ring-(--filled-border-color-muted)",
3787
+ link: "ring-(--filled-border-color-link)",
3788
+ };
3789
+
3790
+ class VariantTheme extends BaseTheme {
3791
+ constructor(variantInstances = VariantTheme.defaultInstances) {
3792
+ super();
3793
+ VARIANT_KEYS.forEach((variantKey) => {
3794
+ this[variantKey] = variantInstances[variantKey] || VariantTheme.defaultInstances[variantKey];
3795
+ });
3796
+ }
3797
+ getClasses(props, defaults) {
3798
+ const activeVariantKey = pickFirstTruthyKey(props, defaults, VARIANT_KEYS) || 'outline';
3799
+ const activeTextAppearanceTheme = this[activeVariantKey];
3800
+ if (!activeTextAppearanceTheme) {
3801
+ return [];
3802
+ }
3803
+ return activeTextAppearanceTheme.getClasses(props, defaults);
3804
+ }
3805
+ static createDefault(initialInstances) {
3806
+ const fullInitialInstances = {
3807
+ ...VariantTheme.defaultInstances,
3808
+ ...(initialInstances || {})
3809
+ };
3810
+ return new VariantTheme(fullInitialInstances);
3811
+ }
3812
+ static createDefaultBackground() {
3813
+ return this.createDefault({
3814
+ outline: TextAppearanceTheme.createDefaultStyle({
3815
+ base: backgroundAppearanceClasses,
3816
+ hover: hoverBackgroundAppearanceClasses,
3817
+ active: activeBackgroundAppearanceClasses
3818
+ }),
3819
+ filled: TextAppearanceTheme.createDefaultStyle({
3820
+ base: filledBackgroundAppearanceClasses,
3821
+ hover: filledHoverBackgroundAppearanceClasses,
3822
+ active: filledActiveBackgroundAppearanceClasses
3823
+ })
3824
+ });
3825
+ }
3826
+ static createDefaultText() {
3827
+ return this.createDefault({
3828
+ outline: TextAppearanceTheme.createDefaultStyle({ base: textAppearanceClasses }),
3829
+ filled: TextAppearanceTheme.createDefaultStyle({ base: filledTextAppearanceClasses })
3830
+ });
3831
+ }
3832
+ static createDefaultBorder() {
3833
+ return this.createDefault({
3834
+ outline: TextAppearanceTheme.createDefaultStyle({ base: borderAppearanceClasses }),
3835
+ filled: TextAppearanceTheme.createDefaultStyle({ base: filledBorderAppearanceClasses })
3836
+ });
3837
+ }
3838
+ static createDefaultRing() {
3839
+ return this.createDefault({
3840
+ outline: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
3841
+ filled: TextAppearanceTheme.createDefaultStyle({ base: filledRingAppearanceClasses })
3842
+ });
3843
+ }
3844
+ }
3845
+ VariantTheme.defaultInstances = Object.fromEntries(VARIANT_KEYS.map(variantKey => [
3846
+ variantKey,
3847
+ new TextAppearanceTheme()
3848
+ ]));
3849
+
3850
+ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
3851
+ size: {
3852
+ px: new PxTheme({
3853
+ padding: {
3854
+ xs: 'px-2',
3855
+ sm: 'px-3',
3856
+ md: 'px-4',
3857
+ lg: 'px-5',
3858
+ xl: 'px-6',
3859
+ }
3860
+ }),
3861
+ py: new PyTheme({
3862
+ padding: {
3863
+ xs: 'py-1',
3864
+ sm: 'py-1.5',
3865
+ md: 'py-2',
3866
+ lg: 'py-2.5',
3867
+ xl: 'py-3',
3868
+ }
3869
+ }),
3870
+ gap: new GapTheme({
3871
+ gap: {
3872
+ xs: 'gap-1',
3873
+ sm: 'gap-1.5',
3874
+ md: 'gap-2',
3875
+ lg: 'gap-2.5',
3876
+ xl: 'gap-3',
3877
+ }
3878
+ }),
3879
+ text: new SizeTheme({
3880
+ xs: 'text-xs',
3881
+ sm: 'text-sm',
3882
+ md: 'text-base',
3883
+ lg: 'text-lg',
3884
+ xl: 'text-xl',
3885
+ }),
3886
+ shadow: new ShadowTheme(),
3887
+ },
3888
+ appearance: {
3889
+ background: VariantTheme.createDefaultBackground(),
3890
+ text: VariantTheme.createDefaultText(),
3891
+ border: VariantTheme.createDefaultBorder(),
3892
+ ring: VariantTheme.createDefaultRing(),
3893
+ },
3894
+ layout: {
3895
+ border: new BorderTheme(),
3896
+ ring: new RingTheme(),
3897
+ radius: new RadiusTheme({
3898
+ rounded: {
3899
+ xs: 'rounded-sm',
3900
+ sm: 'rounded-md',
3901
+ md: 'rounded-md',
3902
+ lg: 'rounded-lg',
3903
+ xl: 'rounded-xl',
3904
+ }
3905
+ }),
3906
+ },
3907
+ }, {
3908
+ md: true,
3909
+ inlineFlex: true,
3910
+ itemsCenter: true,
3911
+ justifyCenter: true,
3912
+ outline: true,
3913
+ default: true,
3914
+ rounded: true,
3915
+ sans: true,
3916
+ semibold: true,
3917
+ textCenter: true,
3918
+ noBorder: true,
3919
+ gap: true,
3920
+ padding: true,
3921
+ ring: true,
3922
+ shadow: true,
3923
+ });
3924
+
3925
+ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
3926
+ size: {
3927
+ px: new PxTheme({
3928
+ padding: {
3929
+ xs: "px-2",
3930
+ sm: "px-3",
3931
+ md: "px-4",
3932
+ lg: "px-5",
3933
+ xl: "px-6"
3934
+ }
3935
+ }),
3936
+ py: new PyTheme({
3937
+ padding: {
3938
+ xs: 'py-1',
3939
+ sm: 'py-1.5',
3940
+ md: 'py-2',
3941
+ lg: 'py-2.5',
3942
+ xl: 'py-3',
3943
+ }
3944
+ }),
3945
+ gap: new GapTheme({
3946
+ gap: {
3947
+ xs: 'gap-1',
3948
+ sm: 'gap-1.5',
3949
+ md: 'gap-2',
3950
+ lg: 'gap-2.5',
3951
+ xl: 'gap-3',
3952
+ }
3953
+ }),
3954
+ text: new SizeTheme({
3955
+ xs: 'text-xs',
3956
+ sm: 'text-sm',
3957
+ md: 'text-base',
3958
+ lg: 'text-lg',
3959
+ xl: 'text-xl',
3960
+ }),
3961
+ shadow: new ShadowTheme(),
3962
+ },
3963
+ appearance: {
3964
+ background: VariantTheme.createDefault({
3965
+ outline: TextAppearanceTheme.createDefaultStyle({
3966
+ base: backgroundAppearanceClasses,
3967
+ }),
3968
+ filled: TextAppearanceTheme.createDefaultStyle({
3969
+ base: filledBackgroundAppearanceClasses,
3970
+ })
3971
+ }),
3972
+ text: VariantTheme.createDefaultText(),
3973
+ border: VariantTheme.createDefaultBorder(),
3974
+ ring: VariantTheme.createDefaultRing(),
3975
+ },
3976
+ layout: {
3977
+ border: new BorderTheme(),
3978
+ ring: new RingTheme(),
3979
+ radius: new RadiusTheme({
3980
+ rounded: {
3981
+ xs: "rounded-xs",
3982
+ sm: "rounded-sm",
3983
+ md: "rounded-md",
3984
+ lg: "rounded-lg",
3985
+ xl: "rounded-xl"
3986
+ }
3987
+ }),
3988
+ },
3989
+ }, {
3990
+ md: true,
3991
+ inlineFlex: true,
3992
+ outline: true,
3993
+ pill: true,
3994
+ sans: true,
3995
+ semibold: true,
3996
+ uppercase: true,
3997
+ noShadow: true,
3998
+ itemsCenter: true,
3999
+ padding: true,
4000
+ gap: true,
4001
+ ring: true,
4002
+ });
4003
+
4004
+ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
4005
+ size: {
4006
+ px: new PxTheme({
4007
+ padding: {
4008
+ xs: 'px-2',
4009
+ sm: 'px-2.5',
4010
+ md: 'px-3',
4011
+ lg: 'px-3.5',
4012
+ xl: 'px-4',
4013
+ }
4014
+ }),
4015
+ py: new PyTheme({
4016
+ padding: {
4017
+ xs: 'py-0.5',
4018
+ sm: 'py-1',
4019
+ md: 'py-1.5',
4020
+ lg: 'py-2',
4021
+ xl: 'py-2.5',
4022
+ }
4023
+ }),
4024
+ text: new SizeTheme({
4025
+ xs: 'text-xs',
4026
+ sm: 'text-sm',
4027
+ md: 'text-base',
4028
+ lg: 'text-lg',
4029
+ xl: 'text-xl',
4030
+ }),
4031
+ gap: new GapTheme({
4032
+ gap: {
4033
+ xs: 'gap-1',
4034
+ sm: 'gap-1.5',
4035
+ md: 'gap-2',
4036
+ lg: 'gap-2.5',
4037
+ xl: 'gap-3',
4038
+ }
4039
+ }),
4040
+ shadow: new ShadowTheme(),
4041
+ },
4042
+ appearance: {
4043
+ background: VariantTheme.createDefault({
4044
+ outline: TextAppearanceTheme.createDefaultStyle({
4045
+ base: backgroundAppearanceClasses,
4046
+ }),
4047
+ filled: TextAppearanceTheme.createDefaultStyle({
4048
+ base: filledBackgroundAppearanceClasses,
4049
+ })
4050
+ }),
4051
+ text: VariantTheme.createDefaultText(),
4052
+ border: VariantTheme.createDefaultBorder(),
4053
+ ring: VariantTheme.createDefaultRing(),
4054
+ },
4055
+ layout: {
4056
+ radius: new RadiusTheme({
4057
+ rounded: {
4058
+ xs: 'rounded-sm',
4059
+ sm: 'rounded-md',
4060
+ md: 'rounded-lg',
4061
+ lg: 'rounded-xl',
4062
+ xl: 'rounded-2xl',
4063
+ }
4064
+ }),
4065
+ border: new BorderTheme(),
4066
+ ring: new RingTheme(),
4067
+ },
4068
+ }, {
4069
+ md: true,
4070
+ inlineFlex: true,
4071
+ itemsCenter: true,
4072
+ outline: true,
4073
+ secondary: true,
4074
+ rounded: true,
4075
+ mono: true,
4076
+ normal: true,
4077
+ noShadow: true,
4078
+ padding: true,
4079
+ gap: true,
4080
+ ring: true,
4081
+ });
4082
+
4083
+ const typographyThemeDefaults = {
4084
+ md: true,
4085
+ default: true,
4086
+ sans: true,
4087
+ normal: true,
4088
+ };
4089
+ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap = textSizeClasses, defaults = typographyThemeDefaults) => {
4090
+ return new ComponentTheme(tag, base, {
4091
+ size: {
4092
+ text: new SizeTheme(textSizeMap),
4093
+ },
4094
+ appearance: {
4095
+ text: TextAppearanceTheme.createDefaultStyle({ base: textAppearanceClasses }),
4096
+ }
4097
+ }, defaults);
4098
+ };
4099
+ // Page title specific theme
4100
+ const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-tight w-fit", {
4101
+ xs: "text-3xl max-lg:text-2xl max-md:text-xl",
4102
+ sm: "text-4xl max-lg:text-3xl max-md:text-2xl",
4103
+ md: "text-5xl max-lg:text-4xl max-md:text-3xl",
4104
+ lg: "text-6xl max-lg:text-5xl max-md:text-4xl",
4105
+ xl: "text-7xl max-lg:text-6xl max-md:text-5xl",
4106
+ }, mergeDefaults(typographyThemeDefaults, { semibold: true }));
4107
+ // Section title specific theme
4108
+ const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-fit", {
4109
+ xs: "text-2xl max-lg:text-xl max-md:text-lg",
4110
+ sm: "text-3xl max-lg:text-2xl max-md:text-xl",
4111
+ md: "text-4xl max-lg:text-3xl max-md:text-2xl",
4112
+ lg: "text-5xl max-lg:text-4xl max-md:text-3xl",
4113
+ xl: "text-6xl max-lg:text-5xl max-md:text-4xl",
4114
+ }, mergeDefaults(typographyThemeDefaults, { semibold: true }));
4115
+ // Title specific theme
4116
+ const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", {
4117
+ xs: "text-lg",
4118
+ sm: "text-xl",
4119
+ md: "text-2xl",
4120
+ lg: "text-3xl",
4121
+ xl: "text-4xl",
4122
+ }, mergeDefaults(typographyThemeDefaults, { semibold: true }));
4123
+ // Text specific theme
4124
+ const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", textSizeClasses, mergeDefaults(typographyThemeDefaults, { secondary: true }));
4125
+ // Link specific theme
4126
+ const linkTheme = createTypographyComponentTheme("a", "hover:underline w-fit", textSizeClasses, mergeDefaults(typographyThemeDefaults, { link: true }));
4127
+ // List item specific theme
4128
+ const listItemTheme = createTypographyComponentTheme("li");
4129
+ // List specific theme
4130
+ const listTheme = createTypographyComponentTheme("ul", "list-disc list-inside");
4131
+
4132
+ class DirectionTheme extends BaseTheme {
4133
+ constructor(initial) {
4134
+ super();
4135
+ FLEX_DIRECTION_KEYS.forEach((key) => {
4136
+ this[key] = (initial === null || initial === void 0 ? void 0 : initial[key]) || DirectionTheme.defaultClasses[key];
4137
+ });
4138
+ }
4139
+ getClasses(props, defaults) {
4140
+ let direction = pickFirstTruthyKey(props, defaults, FLEX_DIRECTION_KEYS) || 'column';
4141
+ const reverse = pickFirstTruthyKey(props, defaults, DIRECTION_REVERSE_KEYS);
4142
+ if (reverse) {
4143
+ switch (direction) {
4144
+ case "column":
4145
+ direction = "columnReverse";
4146
+ break;
4147
+ case "row":
4148
+ direction = "rowReverse";
4149
+ break;
4150
+ }
4151
+ }
4152
+ return direction ? [this[direction]] : [];
4153
+ }
4154
+ }
4155
+ DirectionTheme.defaultClasses = {
4156
+ row: "flex-row",
4157
+ column: "flex-col",
4158
+ rowReverse: "flex-row-reverse",
4159
+ columnReverse: "flex-col-reverse",
4160
+ };
4161
+
4162
+ class WrapTheme extends BaseTheme {
4163
+ constructor(initialConfig) {
4164
+ super();
4165
+ WRAP_KEYS.forEach((key) => {
4166
+ var _a;
4167
+ this[key] = (_a = initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig[key]) !== null && _a !== void 0 ? _a : WrapTheme.defaultClasses[key];
4168
+ });
4169
+ }
4170
+ getClasses(props, defaults) {
4171
+ const key = pickFirstTruthyKey(props, defaults, WRAP_KEYS);
4172
+ return key ? [this[key]] : [];
4173
+ }
4174
+ }
4175
+ WrapTheme.defaultClasses = {
4176
+ flexWrap: "flex-wrap",
4177
+ flexNoWrap: "flex-nowrap",
4178
+ flexWrapReverse: "flex-wrap-reverse"
4179
+ };
4180
+
4181
+ const commonGaps = {
4182
+ xs: 'gap-2',
4183
+ sm: 'gap-3',
4184
+ md: 'gap-4',
4185
+ lg: 'gap-5',
4186
+ xl: 'gap-6',
4187
+ };
4188
+
4189
+ class LayoutAppearanceTheme extends BaseTheme {
4190
+ constructor(initialOverrides) {
4191
+ super();
4192
+ BG_APPEARANCE_KEYS.forEach((textKey) => {
4193
+ const defaultModesForKey = LayoutAppearanceTheme.defaultFullConfig[textKey];
4194
+ const overrideModesForKey = initialOverrides === null || initialOverrides === void 0 ? void 0 : initialOverrides[textKey];
4195
+ this[textKey] = {
4196
+ ...defaultModesForKey,
4197
+ ...(overrideModesForKey || {}),
4198
+ };
4199
+ });
4200
+ }
4201
+ getClasses(props, defaults) {
4202
+ const pickedAppearanceKey = pickFirstTruthyKey(props, defaults, BG_APPEARANCE_KEYS) || 'default';
4203
+ const modesForAppearance = this[pickedAppearanceKey];
4204
+ if (!modesForAppearance) {
4205
+ return MODE_KEYS.map(() => '');
4206
+ }
4207
+ return MODE_KEYS.map(mode => modesForAppearance[mode] || '');
4208
+ }
4209
+ static createDefaultStyle(src = {}) {
4210
+ const initialOverridesForConstructor = {};
4211
+ BG_APPEARANCE_KEYS.forEach((textKey) => {
4212
+ const modesForCurrentTextKey = {};
4213
+ let keyHasDataInSrc = false;
4214
+ MODE_KEYS.forEach((modeKey) => {
4215
+ var _a;
4216
+ const classValue = (_a = src[modeKey]) === null || _a === void 0 ? void 0 : _a[textKey];
4217
+ if (classValue !== undefined) {
4218
+ modesForCurrentTextKey[modeKey] = classValue;
4219
+ keyHasDataInSrc = true;
4220
+ }
4221
+ });
4222
+ if (keyHasDataInSrc) {
4223
+ initialOverridesForConstructor[textKey] = modesForCurrentTextKey;
4224
+ }
4225
+ });
4226
+ return new LayoutAppearanceTheme(initialOverridesForConstructor);
4227
+ }
4228
+ }
4229
+ LayoutAppearanceTheme.defaultFullConfig = (() => {
4230
+ const config = {};
4231
+ BG_APPEARANCE_KEYS.forEach((key) => {
4232
+ config[key] = {
4233
+ base: backgroundAppearanceClasses[key] || '',
4234
+ hover: '',
4235
+ active: '',
4236
+ };
4237
+ });
4238
+ return config;
4239
+ })();
4240
+
4241
+ class BreakpointTheme extends BaseTheme {
4242
+ constructor(initial) {
4243
+ super();
4244
+ BREAKPOINT_KEYS.forEach((key) => {
4245
+ var _a;
4246
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : BreakpointTheme.defaultClasses[key];
4247
+ });
4248
+ }
4249
+ getClasses(props, defaults) {
4250
+ const key = pickFirstTruthyKey(props, defaults, BREAKPOINT_KEYS);
4251
+ if (!key)
4252
+ return [];
4253
+ return [this[key] || ''];
4254
+ }
4255
+ }
4256
+ BreakpointTheme.defaultClasses = {
4257
+ xsCol: "max-xs:flex-col",
4258
+ smCol: "max-sm:flex-col",
4259
+ mdCol: "max-md:flex-col",
4260
+ lgCol: "max-lg:flex-col",
4261
+ xlCol: "max-xl:flex-col"
4262
+ };
4263
+
4264
+ const defaultCardTheme = new ComponentTheme("div", "overflow-hidden", {
4265
+ size: {
4266
+ px: new PxTheme({
4267
+ padding: {
4268
+ xs: 'px-3',
4269
+ sm: 'px-4',
4270
+ md: 'px-5',
4271
+ lg: 'px-6',
4272
+ xl: 'px-8',
4273
+ }
4274
+ }),
4275
+ py: new PyTheme({
4276
+ padding: {
4277
+ xs: 'py-2',
4278
+ sm: 'py-3',
4279
+ md: 'py-4',
4280
+ lg: 'py-5',
4281
+ xl: 'py-6',
4282
+ }
4283
+ }),
4284
+ gap: new GapTheme({ gap: commonGaps }),
4285
+ shadow: new ShadowTheme(),
4286
+ },
4287
+ layout: {
4288
+ border: new BorderTheme(),
4289
+ ring: new RingTheme(),
4290
+ radius: new RadiusTheme({
4291
+ rounded: {
4292
+ xs: "rounded-md",
4293
+ sm: "rounded-lg",
4294
+ md: "rounded-xl",
4295
+ lg: "rounded-2xl",
4296
+ xl: "rounded-3xl"
4297
+ }
4298
+ }),
4299
+ wrap: new WrapTheme(),
4300
+ direction: new DirectionTheme(),
4301
+ breakpoint: new BreakpointTheme(),
4302
+ },
4303
+ appearance: {
4304
+ background: LayoutAppearanceTheme.createDefaultStyle({
4305
+ base: layoutBackgroundAppearanceClasses,
4306
+ }),
4307
+ text: TextAppearanceTheme.createDefaultStyle({ base: textAppearanceClasses }),
4308
+ border: TextAppearanceTheme.createDefaultStyle({ base: borderAppearanceClasses }),
4309
+ ring: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
4310
+ }
4311
+ }, {
4312
+ md: true,
4313
+ flex: true,
4314
+ default: true,
4315
+ rounded: true,
4316
+ normal: true,
4317
+ column: true,
4318
+ border: true,
4319
+ gap: true,
4320
+ padding: true,
4321
+ });
4322
+
4323
+ const defaultRowTheme = new ComponentTheme("div", "flex-row", {
4324
+ size: {
4325
+ gap: new GapTheme({ gap: commonGaps }),
4326
+ breakpoint: new BreakpointTheme(),
4327
+ },
4328
+ layout: {
4329
+ wrap: new WrapTheme(),
4330
+ },
4331
+ }, {
4332
+ md: true,
4333
+ flex: true,
4334
+ transparent: true,
4335
+ itemsCenter: true,
4336
+ gap: true,
4337
+ });
4338
+
4339
+ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
4340
+ appearance: {
4341
+ background: TextAppearanceTheme.createDefaultStyle({
4342
+ base: bgBorderAppearanceClasses,
4343
+ }),
4344
+ }
4345
+ }, {
4346
+ md: true,
4347
+ default: true,
4348
+ });
4349
+
4350
+ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
4351
+ size: {
4352
+ gap: new GapTheme({
4353
+ gap: {
4354
+ xs: 'gap-2 max-lg:gap-1',
4355
+ sm: 'gap-4 max-lg:gap-3 max-md:gap-2',
4356
+ md: 'gap-6 max-lg:gap-5 max-md:gap-4',
4357
+ lg: 'gap-8 max-lg:gap-7 max-md:gap-6',
4358
+ xl: 'gap-10 max-lg:gap-9 max-md:gap-8',
4359
+ }
4360
+ }),
4361
+ maxWidth: new SizeTheme({
4362
+ xs: 'max-w-3xl',
4363
+ sm: 'max-w-4xl',
4364
+ md: 'max-w-5xl',
4365
+ lg: 'max-w-6xl',
4366
+ xl: 'max-w-7xl',
4367
+ }),
4368
+ },
4369
+ layout: {
4370
+ border: new BorderTheme(),
4371
+ ring: new RingTheme(),
4372
+ wrap: new WrapTheme(),
4373
+ direction: new DirectionTheme(),
4374
+ radius: new RadiusTheme({
4375
+ rounded: {
4376
+ xs: "rounded-md",
4377
+ sm: "rounded-lg",
4378
+ md: "rounded-xl",
4379
+ lg: "rounded-2xl",
4380
+ xl: "rounded-3xl"
4381
+ }
4382
+ }),
4383
+ },
4384
+ appearance: {
4385
+ background: LayoutAppearanceTheme.createDefaultStyle({
4386
+ base: layoutBackgroundAppearanceClasses,
4387
+ }),
4388
+ text: TextAppearanceTheme.createDefaultStyle({ base: textAppearanceClasses }),
4389
+ border: TextAppearanceTheme.createDefaultStyle({ base: borderAppearanceClasses }),
4390
+ ring: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
4391
+ }
4392
+ }, {
4393
+ transparent: true,
4394
+ noRing: true,
4395
+ flex: true,
4396
+ md: true,
4397
+ itemsCenter: true,
4398
+ gap: true,
4399
+ sharp: true,
4400
+ });
4401
+
4402
+ const defaultColTheme = new ComponentTheme("div", "flex-col", {
4403
+ size: {
4404
+ gap: new GapTheme({ gap: commonGaps }),
4405
+ },
4406
+ layout: {
4407
+ wrap: new WrapTheme(),
4408
+ direction: new DirectionTheme(),
4409
+ },
4410
+ }, {
4411
+ md: true,
4412
+ flex: true,
4413
+ transparent: true,
4414
+ gap: true,
4415
+ });
4416
+
4417
+ const defaultStackTheme = new ComponentTheme("div", "", {
4418
+ size: {
4419
+ px: new PxTheme({
4420
+ padding: {
4421
+ xs: 'px-2',
4422
+ sm: 'px-3',
4423
+ md: 'px-4',
4424
+ lg: 'px-5',
4425
+ xl: 'px-6',
4426
+ }
4427
+ }),
4428
+ py: new PyTheme({
4429
+ padding: {
4430
+ xs: 'py-2',
4431
+ sm: 'py-3',
4432
+ md: 'py-4',
4433
+ lg: 'py-5',
4434
+ xl: 'py-6',
4435
+ }
4436
+ }),
4437
+ gap: new GapTheme({
4438
+ gap: commonGaps
4439
+ }),
4440
+ },
4441
+ layout: {
4442
+ wrap: new WrapTheme(),
4443
+ direction: new DirectionTheme(),
4444
+ },
4445
+ }, {
4446
+ md: true,
4447
+ flex: true,
4448
+ transparent: true,
4449
+ column: true,
4450
+ flexWrap: true,
4451
+ gap: true,
4452
+ padding: true,
4453
+ });
4454
+
4455
+ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
4456
+ size: {
4457
+ px: new PxTheme({
4458
+ padding: {
4459
+ xs: 'px-5 max-lg:px-4 max-md:px-3',
4460
+ sm: 'px-6 max-lg:px-5 max-md:px-4',
4461
+ md: 'px-7 max-lg:px-6 max-md:px-5',
4462
+ lg: 'px-8 max-lg:px-7 max-md:px-6',
4463
+ xl: 'px-9 max-lg:px-8 max-md:px-7',
4464
+ }
4465
+ }),
4466
+ py: new PyTheme({
4467
+ padding: {
4468
+ xs: 'py-4 max-md:py-3',
4469
+ sm: 'py-8 max-md:py-6',
4470
+ md: 'py-12 max-md:py-6',
4471
+ lg: 'py-16 max-lg:py-14 max-md:py-12',
4472
+ xl: 'py-20 max-lg:py-16 max-md:py-12',
4473
+ }
4474
+ }),
4475
+ gap: new GapTheme({
4476
+ gap: {
4477
+ xs: 'gap-4',
4478
+ sm: 'gap-6',
4479
+ md: 'gap-8',
4480
+ lg: 'gap-12',
4481
+ xl: 'gap-16',
4482
+ }
4483
+ }),
4484
+ shadow: new ShadowTheme(),
4485
+ },
4486
+ appearance: {
4487
+ background: LayoutAppearanceTheme.createDefaultStyle({
4488
+ base: layoutBackgroundAppearanceClasses,
4489
+ }),
4490
+ text: TextAppearanceTheme.createDefaultStyle({ base: textAppearanceClasses }),
4491
+ border: TextAppearanceTheme.createDefaultStyle({ base: borderAppearanceClasses }),
4492
+ ring: TextAppearanceTheme.createDefaultStyle({ base: ringAppearanceClasses }),
4493
+ },
4494
+ layout: {
4495
+ wrap: new WrapTheme(),
4496
+ direction: new DirectionTheme(),
4497
+ border: new BorderTheme(),
4498
+ ring: new RingTheme(),
4499
+ radius: new RadiusTheme({
4500
+ rounded: {
4501
+ xs: 'rounded-md',
4502
+ sm: 'rounded-lg',
4503
+ md: 'rounded-xl',
4504
+ lg: 'rounded-2xl',
4505
+ xl: 'rounded-3xl',
4506
+ }
4507
+ }),
4508
+ },
4509
+ }, {
4510
+ md: true,
4511
+ flex: true,
4512
+ default: true,
4513
+ itemsStart: true,
4514
+ gap: true,
4515
+ padding: true,
4516
+ noBorder: true,
4517
+ noRing: true,
4518
+ noShadow: true,
4519
+ sharp: true,
4520
+ });
4521
+
4522
+ const gridDefaults = {
4523
+ md: true,
4524
+ gap: true,
4525
+ grid: true,
4526
+ };
4527
+ const gridSubThemes = {
4528
+ size: {
4529
+ gap: new GapTheme({
4530
+ gap: {
4531
+ xs: "gap-2",
4532
+ sm: "gap-4 max-lg:gap-2",
4533
+ md: "gap-6 max-lg:gap-4",
4534
+ lg: "gap-8 max-lg:gap-6 max-md:gap-4",
4535
+ xl: "gap-10 max-lg:gap-8 max-md:gap-6"
4536
+ }
4537
+ }),
4538
+ },
4539
+ };
4540
+ const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, gridDefaults);
4541
+ const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, gridDefaults);
4542
+
4543
+ const COMPONENT_KEYS = ['button', 'badge', 'chip', 'card', 'divider', 'row', 'col', 'stack', 'section',
4544
+ 'grid3', 'grid4', 'pageTitle', 'sectionTitle', 'title', 'text', 'link', 'list', 'listItem'];
4545
+ const defaultTheme = {
4546
+ button: defaultButtonTheme,
4547
+ badge: defaultBadgeTheme,
4548
+ chip: defaultChipTheme,
4549
+ card: defaultCardTheme,
4550
+ divider: defaultDividerTheme,
4551
+ container: defaultContainerTheme,
4552
+ row: defaultRowTheme,
4553
+ col: defaultColTheme,
4554
+ stack: defaultStackTheme,
4555
+ section: defaultSectionTheme,
4556
+ grid3: defaultGrid3Theme,
4557
+ grid4: defaultGrid4Theme,
4558
+ pageTitle: pageTitleTheme,
4559
+ sectionTitle: sectionTitleTheme,
4560
+ title: titleTheme,
4561
+ text: textTheme,
4562
+ link: linkTheme,
4563
+ listItem: listItemTheme,
4564
+ list: listTheme,
4565
+ };
4566
+ const ThemeContext = react.createContext(defaultTheme);
4567
+ function ThemeProvider({ children, theme: themeObject = {}, themeDefaults, themeOverride }) {
4568
+ const mergedTheme = react.useMemo(() => {
4569
+ let finalTheme = themeObject
4570
+ ? deepMerge(defaultTheme, themeObject)
4571
+ : defaultTheme;
4572
+ if (typeof themeOverride === 'function') {
4573
+ const themeToModify = deepClone(finalTheme);
4574
+ finalTheme = themeOverride(themeToModify);
4575
+ }
4576
+ if (themeDefaults !== undefined) {
4577
+ for (const key in themeDefaults) {
4578
+ const componentKey = key;
4579
+ const componentTheme = finalTheme[componentKey];
4580
+ const themeDefault = themeDefaults[componentKey];
4581
+ if (themeDefault !== undefined) {
4582
+ finalTheme[componentKey].defaults =
4583
+ mergeDefaults(componentTheme.defaults, themeDefaults[componentKey]);
4584
+ }
4585
+ }
4586
+ }
4587
+ return finalTheme;
4588
+ }, [themeObject, themeOverride]);
4589
+ return (jsxRuntime.jsx(ThemeContext.Provider, { value: mergedTheme, children: children }));
4590
+ }
4591
+ function useTheme() {
4592
+ return react.useContext(ThemeContext);
4593
+ }
4594
+
4595
+ function ThemedComponent({ theme, propsToOmit, ...props }) {
4596
+ const { Tag, finalClasses, finalProps } = react.useMemo(() => {
4597
+ return theme.getComponentConfig(props, propsToOmit);
4598
+ }, [theme, props, propsToOmit]);
4599
+ return (jsxRuntime.jsx(Tag, { className: finalClasses, ...finalProps, children: props.children }));
4600
+ }
4601
+
4602
+ const Button = (props) => {
4603
+ const theme = useTheme();
4604
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.button, propsToOmit: BUTTON_KEYS, ...props });
4605
+ };
4606
+
4607
+ const Badge = (props) => {
4608
+ const theme = useTheme();
4609
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.badge, propsToOmit: BADGE_KEYS, ...props });
4610
+ };
4611
+
4612
+ const Divider = (props) => {
4613
+ const theme = useTheme();
4614
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.divider, propsToOmit: DIVIDER_KEYS, ...props });
4615
+ };
4616
+
4617
+ const Chip = (props) => {
4618
+ const theme = useTheme();
4619
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.chip, propsToOmit: CHIP_KEYS, ...props });
4620
+ };
4621
+
4622
+ const Section = (props) => {
4623
+ const theme = useTheme();
4624
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.section, propsToOmit: SECTION_KEYS, ...props });
4625
+ };
4626
+
4627
+ const Container = (props) => {
4628
+ const theme = useTheme();
4629
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.container, propsToOmit: CONTAINER_KEYS, ...props });
4630
+ };
4631
+
4632
+ const Col = (props) => {
4633
+ const theme = useTheme();
4634
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.col, propsToOmit: COL_KEYS, ...props });
4635
+ };
4636
+
4637
+ const Row = (props) => {
4638
+ const theme = useTheme();
4639
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.row, propsToOmit: ROW_KEYS, ...props });
4640
+ };
4641
+
4642
+ const Grid3 = (props) => {
4643
+ const theme = useTheme();
4644
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid3, propsToOmit: GRID_KEYS, ...props });
4645
+ };
4646
+ const Grid4 = (props) => {
4647
+ const theme = useTheme();
4648
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid4, propsToOmit: GRID_KEYS, ...props });
4649
+ };
4650
+
4651
+ const Card = (props) => {
4652
+ const theme = useTheme();
4653
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.card, propsToOmit: CARD_KEYS, ...props });
4654
+ };
4655
+
4656
+ const Stack = (props) => {
4657
+ const theme = useTheme();
4658
+ const stackTheme = theme.stack;
4659
+ return jsxRuntime.jsx(ThemedComponent, { theme: stackTheme, propsToOmit: STACK_KEYS, ...props });
4660
+ };
4661
+
4662
+ const PageTitle = (props) => {
4663
+ const theme = useTheme();
4664
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.pageTitle, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
4665
+ };
4666
+ const SectionTitle = (props) => {
4667
+ const theme = useTheme();
4668
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.sectionTitle, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
4669
+ };
4670
+ const Title = (props) => {
4671
+ const theme = useTheme();
4672
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.title, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
4673
+ };
4674
+ const Text = (props) => {
4675
+ const theme = useTheme();
4676
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.text, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
4677
+ };
4678
+ const Link = (props) => {
4679
+ const theme = useTheme();
4680
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.link, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
4681
+ };
4682
+ const ListItem = (props) => {
4683
+ const theme = useTheme();
4684
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.listItem, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
4685
+ };
4686
+ const List = (props) => {
4687
+ const theme = useTheme();
4688
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.list, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
4689
+ };
4690
+
4691
+ exports.BADGE_KEYS = BADGE_KEYS;
4692
+ exports.BASE_COMPONENT_KEYS = BASE_COMPONENT_KEYS;
4693
+ exports.BG_APPEARANCE_KEYS = BG_APPEARANCE_KEYS;
4694
+ exports.BORDER_KEYS = BORDER_KEYS;
4695
+ exports.BREAKPOINT_KEYS = BREAKPOINT_KEYS;
4696
+ exports.BUTTON_KEYS = BUTTON_KEYS;
4697
+ exports.Badge = Badge;
4698
+ exports.Button = Button;
4699
+ exports.CARD_KEYS = CARD_KEYS;
4700
+ exports.CHIP_KEYS = CHIP_KEYS;
4701
+ exports.COL_KEYS = COL_KEYS;
4702
+ exports.COMPONENT_KEYS = COMPONENT_KEYS;
4703
+ exports.CONTAINER_KEYS = CONTAINER_KEYS;
4704
+ exports.Card = Card;
4705
+ exports.Chip = Chip;
4706
+ exports.Col = Col;
4707
+ exports.Container = Container;
4708
+ exports.DIRECTION_REVERSE_KEYS = DIRECTION_REVERSE_KEYS;
4709
+ exports.DISPLAY_KEYS = DISPLAY_KEYS;
4710
+ exports.DIVIDER_KEYS = DIVIDER_KEYS;
4711
+ exports.Divider = Divider;
4712
+ exports.EXCLUSIVE_KEY_GROUPS = EXCLUSIVE_KEY_GROUPS;
4713
+ exports.FLEX_DIRECTION_KEYS = FLEX_DIRECTION_KEYS;
4714
+ exports.FONT_FAMILY_KEYS = FONT_FAMILY_KEYS;
4715
+ exports.FONT_KEYS = FONT_KEYS;
4716
+ exports.FONT_STYLE_KEYS = FONT_STYLE_KEYS;
4717
+ exports.FONT_WEIGHT_KEYS = FONT_WEIGHT_KEYS;
4718
+ exports.GAP_KEYS = GAP_KEYS;
4719
+ exports.GRID_KEYS = GRID_KEYS;
4720
+ exports.Grid3 = Grid3;
4721
+ exports.Grid4 = Grid4;
4722
+ exports.HIDE_KEYS = HIDE_KEYS;
4723
+ exports.ITEMS_KEYS = ITEMS_KEYS;
4724
+ exports.JUSTIFY_KEYS = JUSTIFY_KEYS;
4725
+ exports.Link = Link;
4726
+ exports.List = List;
4727
+ exports.ListItem = ListItem;
4728
+ exports.MODE_KEYS = MODE_KEYS;
4729
+ exports.PADDING_KEYS = PADDING_KEYS;
4730
+ exports.PILL_KEYS = PILL_KEYS;
4731
+ exports.POSITION_KEYS = POSITION_KEYS;
4732
+ exports.PageTitle = PageTitle;
4733
+ exports.RING_KEYS = RING_KEYS;
4734
+ exports.ROUNDED_KEYS = ROUNDED_KEYS;
4735
+ exports.ROW_KEYS = ROW_KEYS;
4736
+ exports.Row = Row;
4737
+ exports.SECTION_KEYS = SECTION_KEYS;
4738
+ exports.SHADOW_KEYS = SHADOW_KEYS;
4739
+ exports.SHAPE_KEYS = SHAPE_KEYS;
4740
+ exports.SHARP_KEYS = SHARP_KEYS;
4741
+ exports.SIZE_KEYS = SIZE_KEYS;
4742
+ exports.STACK_KEYS = STACK_KEYS;
4743
+ exports.Section = Section;
4744
+ exports.SectionTitle = SectionTitle;
4745
+ exports.Stack = Stack;
4746
+ exports.TEXT_ALIGN_KEYS = TEXT_ALIGN_KEYS;
4747
+ exports.TEXT_APPEARANCE_KEYS = TEXT_APPEARANCE_KEYS;
4748
+ exports.TEXT_DECORATION_KEYS = TEXT_DECORATION_KEYS;
4749
+ exports.TEXT_TRANSFORM_KEYS = TEXT_TRANSFORM_KEYS;
4750
+ exports.TYPOGRAPHY_COMPONENT_KEYS = TYPOGRAPHY_COMPONENT_KEYS;
4751
+ exports.Text = Text;
4752
+ exports.ThemeProvider = ThemeProvider;
4753
+ exports.Title = Title;
4754
+ exports.UI_APPEARANCE_KEYS = UI_APPEARANCE_KEYS;
4755
+ exports.VARIANT_KEYS = VARIANT_KEYS;
4756
+ exports.WRAP_KEYS = WRAP_KEYS;
4757
+ exports.defaultTheme = defaultTheme;
4758
+ exports.useTheme = useTheme;
4759
+ //# sourceMappingURL=index.js.map