@vaneui/ui 0.1.2 → 0.1.4

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