@vaneui/ui 0.1.2 → 0.1.3

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