@vaneui/ui 0.0.19 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/theme/components/ui/classes/appearanceClasses.d.ts +1 -1
- package/dist/components/theme/components/ui/props/keys.d.ts +16 -14
- package/dist/components/theme/components/ui/props/props.d.ts +4 -3
- package/dist/components/theme/components/ui/theme/common/ComponentTheme.d.ts +9 -1
- package/dist/components/theme/components/ui/theme/containerTheme.d.ts +2 -0
- package/dist/components/theme/components/ui/theme/layout/displayTheme.d.ts +9 -0
- package/dist/components/theme/components/utils/componentUtils.d.ts +1 -1
- package/dist/components/theme/index.js +2893 -137
- package/dist/components/theme/index.js.map +1 -1
- package/dist/components/ui/classes/appearanceClasses.d.ts +1 -1
- package/dist/components/ui/col.d.ts +0 -7
- package/dist/components/ui/props/keys.d.ts +16 -14
- package/dist/components/ui/props/props.d.ts +4 -3
- package/dist/components/ui/theme/common/ComponentTheme.d.ts +9 -1
- package/dist/components/ui/theme/containerTheme.d.ts +2 -0
- package/dist/components/ui/theme/layout/displayTheme.d.ts +9 -0
- package/dist/components/utils/buildComponent.d.ts +6 -7
- package/dist/components/utils/componentUtils.d.ts +1 -1
- package/dist/index.esm.js +3327 -3311
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3326 -3310
- package/dist/index.js.map +1 -1
- package/dist/ui.css +24 -0
- package/dist/vars.css +121 -128
- package/package.json +5 -20
- package/dist/complex.css +0 -2025
- package/dist/components/theme/components/ui/classes/layoutClasses.d.ts +0 -13
- package/dist/components/ui/classes/layoutClasses.d.ts +0 -13
|
@@ -37,6 +37,7 @@ const FLEX_DIRECTION_KEYS = ['row', 'column', 'rowReverse', 'columnReverse'];
|
|
|
37
37
|
const ITEMS_KEYS = ['itemsStart', 'itemsEnd', 'itemsCenter', 'itemsBaseline', 'itemsStretch'];
|
|
38
38
|
const JUSTIFY_KEYS = ['justifyStart', 'justifyEnd', 'justifyCenter', 'justifyBetween', 'justifyAround', 'justifyEvenly', 'justifyStretch', 'justifyBaseline'];
|
|
39
39
|
const WRAP_KEYS = ['flexWrap', 'flexNoWrap', 'flexWrapReverse'];
|
|
40
|
+
const DISPLAY_KEYS = ['inline', 'block', 'inlineBlock', 'flex', 'inlineFlex', 'grid', 'inlineGrid', 'contents', 'table', 'tableCell', 'hidden'];
|
|
40
41
|
// A master list of all groups where only one key can be 'true' at a time.
|
|
41
42
|
const EXCLUSIVE_KEY_GROUPS = [
|
|
42
43
|
MODE_KEYS,
|
|
@@ -63,12 +64,16 @@ const EXCLUSIVE_KEY_GROUPS = [
|
|
|
63
64
|
ITEMS_KEYS,
|
|
64
65
|
JUSTIFY_KEYS,
|
|
65
66
|
WRAP_KEYS,
|
|
67
|
+
DISPLAY_KEYS,
|
|
66
68
|
];
|
|
67
69
|
// Base component keys
|
|
68
70
|
const BASE_COMPONENT_KEYS = [
|
|
69
71
|
...SIZE_KEYS,
|
|
70
72
|
...HIDE_KEYS,
|
|
71
|
-
...
|
|
73
|
+
...ITEMS_KEYS,
|
|
74
|
+
...JUSTIFY_KEYS,
|
|
75
|
+
...POSITION_KEYS,
|
|
76
|
+
...DISPLAY_KEYS
|
|
72
77
|
];
|
|
73
78
|
// Font keys
|
|
74
79
|
const FONT_KEYS = [
|
|
@@ -95,7 +100,6 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
95
100
|
...GAP_KEYS,
|
|
96
101
|
...PADDING_KEYS,
|
|
97
102
|
...VARIANT_KEYS,
|
|
98
|
-
...ITEMS_KEYS,
|
|
99
103
|
...APPEARANCE_KEYS
|
|
100
104
|
];
|
|
101
105
|
// Grid keys
|
|
@@ -110,9 +114,7 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
110
114
|
...WRAP_KEYS,
|
|
111
115
|
...GAP_KEYS,
|
|
112
116
|
...DIRECTION_REVERSE_KEYS,
|
|
113
|
-
...ITEMS_KEYS,
|
|
114
117
|
...BREAKPOINT_KEYS,
|
|
115
|
-
...JUSTIFY_KEYS,
|
|
116
118
|
...APPEARANCE_KEYS
|
|
117
119
|
];
|
|
118
120
|
// Col keys
|
|
@@ -121,14 +123,12 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
121
123
|
...WRAP_KEYS,
|
|
122
124
|
...GAP_KEYS,
|
|
123
125
|
...DIRECTION_REVERSE_KEYS,
|
|
124
|
-
...ITEMS_KEYS,
|
|
125
|
-
...JUSTIFY_KEYS,
|
|
126
126
|
...APPEARANCE_KEYS
|
|
127
127
|
];
|
|
128
128
|
// Card keys
|
|
129
129
|
[
|
|
130
|
+
...TYPOGRAPHY_COMPONENT_KEYS,
|
|
130
131
|
...GAP_KEYS,
|
|
131
|
-
...ITEMS_KEYS,
|
|
132
132
|
...SHARP_KEYS,
|
|
133
133
|
...ROUNDED_KEYS,
|
|
134
134
|
...BREAKPOINT_KEYS,
|
|
@@ -138,9 +138,7 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
138
138
|
...SHADOW_KEYS,
|
|
139
139
|
...PADDING_KEYS,
|
|
140
140
|
...FLEX_DIRECTION_KEYS,
|
|
141
|
-
...TYPOGRAPHY_COMPONENT_KEYS,
|
|
142
141
|
...DIRECTION_REVERSE_KEYS,
|
|
143
|
-
...JUSTIFY_KEYS,
|
|
144
142
|
...WRAP_KEYS
|
|
145
143
|
];
|
|
146
144
|
// Stack keys
|
|
@@ -149,9 +147,7 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
149
147
|
...WRAP_KEYS,
|
|
150
148
|
...GAP_KEYS,
|
|
151
149
|
...DIRECTION_REVERSE_KEYS,
|
|
152
|
-
...ITEMS_KEYS,
|
|
153
150
|
...BREAKPOINT_KEYS,
|
|
154
|
-
...JUSTIFY_KEYS,
|
|
155
151
|
...APPEARANCE_KEYS,
|
|
156
152
|
...FLEX_DIRECTION_KEYS,
|
|
157
153
|
...PADDING_KEYS
|
|
@@ -164,7 +160,6 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
164
160
|
...SHADOW_KEYS,
|
|
165
161
|
...BORDER_KEYS,
|
|
166
162
|
...RING_KEYS,
|
|
167
|
-
...ITEMS_KEYS,
|
|
168
163
|
...GAP_KEYS,
|
|
169
164
|
...PADDING_KEYS,
|
|
170
165
|
...APPEARANCE_KEYS
|
|
@@ -177,7 +172,6 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
177
172
|
...SHADOW_KEYS,
|
|
178
173
|
...BORDER_KEYS,
|
|
179
174
|
...RING_KEYS,
|
|
180
|
-
...ITEMS_KEYS,
|
|
181
175
|
...GAP_KEYS,
|
|
182
176
|
...PADDING_KEYS,
|
|
183
177
|
...APPEARANCE_KEYS
|
|
@@ -190,22 +184,20 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
190
184
|
// Container keys
|
|
191
185
|
[
|
|
192
186
|
...BASE_COMPONENT_KEYS,
|
|
193
|
-
...ITEMS_KEYS,
|
|
194
187
|
...APPEARANCE_KEYS,
|
|
195
188
|
...BORDER_KEYS,
|
|
196
189
|
...SHADOW_KEYS,
|
|
197
190
|
...RING_KEYS,
|
|
198
191
|
...GAP_KEYS,
|
|
192
|
+
...SHAPE_KEYS
|
|
199
193
|
];
|
|
200
194
|
// Section keys
|
|
201
195
|
[
|
|
202
196
|
...BASE_COMPONENT_KEYS,
|
|
203
197
|
...FLEX_DIRECTION_KEYS,
|
|
204
|
-
...ITEMS_KEYS,
|
|
205
198
|
...APPEARANCE_KEYS,
|
|
206
199
|
...PADDING_KEYS,
|
|
207
200
|
...DIRECTION_REVERSE_KEYS,
|
|
208
|
-
...JUSTIFY_KEYS,
|
|
209
201
|
...WRAP_KEYS,
|
|
210
202
|
...BREAKPOINT_KEYS,
|
|
211
203
|
...GAP_KEYS,
|
|
@@ -215,105 +207,23 @@ const TYPOGRAPHY_COMPONENT_KEYS = [
|
|
|
215
207
|
...SHAPE_KEYS,
|
|
216
208
|
];
|
|
217
209
|
|
|
218
|
-
const rowToColumnBreakpointClasses = {
|
|
219
|
-
xsCol: "max-xs:flex-col",
|
|
220
|
-
smCol: "max-sm:flex-col",
|
|
221
|
-
mdCol: "max-md:flex-col",
|
|
222
|
-
lgCol: "max-lg:flex-col",
|
|
223
|
-
xlCol: "max-xl:flex-col"
|
|
224
|
-
};
|
|
225
|
-
const justifyClasses = {
|
|
226
|
-
justifyStart: "justify-start",
|
|
227
|
-
justifyEnd: "justify-end",
|
|
228
|
-
justifyCenter: "justify-center",
|
|
229
|
-
justifyBetween: "justify-between",
|
|
230
|
-
justifyAround: "justify-around",
|
|
231
|
-
justifyEvenly: "justify-evenly",
|
|
232
|
-
justifyStretch: "justify-stretch",
|
|
233
|
-
justifyBaseline: "justify-baseline",
|
|
234
|
-
};
|
|
235
|
-
const wrapClasses = {
|
|
236
|
-
flexWrap: "flex-wrap",
|
|
237
|
-
flexNoWrap: "flex-nowrap",
|
|
238
|
-
flexWrapReverse: "flex-wrap-reverse"
|
|
239
|
-
};
|
|
240
|
-
const roundedClasses = {
|
|
241
|
-
xs: "rounded-sm",
|
|
242
|
-
sm: "rounded-md",
|
|
243
|
-
md: "rounded-lg",
|
|
244
|
-
lg: "rounded-xl",
|
|
245
|
-
xl: "rounded-2xl",
|
|
246
|
-
};
|
|
247
|
-
const hideClasses = {
|
|
248
|
-
xsHide: "max-xs:hidden",
|
|
249
|
-
smHide: "max-sm:hidden",
|
|
250
|
-
mdHide: "max-md:hidden",
|
|
251
|
-
lgHide: "max-lg:hidden",
|
|
252
|
-
xlHide: "max-xl:hidden"
|
|
253
|
-
};
|
|
254
|
-
const positionClasses = {
|
|
255
|
-
relative: "relative",
|
|
256
|
-
absolute: "absolute",
|
|
257
|
-
fixed: "fixed",
|
|
258
|
-
sticky: "sticky",
|
|
259
|
-
static: "static"
|
|
260
|
-
};
|
|
261
|
-
const shadowClasses = {
|
|
262
|
-
xs: "shadow-2xs",
|
|
263
|
-
sm: "shadow-xs",
|
|
264
|
-
md: "shadow-sm",
|
|
265
|
-
lg: "shadow-md",
|
|
266
|
-
xl: "shadow-lg"
|
|
267
|
-
};
|
|
268
|
-
const hoverShadowClasses = {
|
|
269
|
-
xs: "hover:shadow-xs",
|
|
270
|
-
sm: "hover:shadow-sm",
|
|
271
|
-
md: "hover:shadow-md",
|
|
272
|
-
lg: "hover:shadow-lg",
|
|
273
|
-
xl: "hover:shadow-xl"
|
|
274
|
-
};
|
|
275
|
-
const activeShadowClasses = {
|
|
276
|
-
xs: "active:shadow-xs",
|
|
277
|
-
sm: "active:shadow-sm",
|
|
278
|
-
md: "active:shadow-md",
|
|
279
|
-
lg: "active:shadow-lg",
|
|
280
|
-
xl: "active:shadow-xl"
|
|
281
|
-
};
|
|
282
|
-
const noRingModeClasses = {
|
|
283
|
-
base: "ring-0",
|
|
284
|
-
hover: "hover:ring-0",
|
|
285
|
-
active: "active:ring-0",
|
|
286
|
-
};
|
|
287
|
-
const ringModeClasses = {
|
|
288
|
-
base: "ring ring-inset",
|
|
289
|
-
hover: "hover:ring hover:ring-inset",
|
|
290
|
-
active: "active:ring active:ring-inset",
|
|
291
|
-
};
|
|
292
|
-
const noShadowModeClasses = {
|
|
293
|
-
base: "shadow-none",
|
|
294
|
-
hover: "hover:shadow-none",
|
|
295
|
-
active: "active:shadow-none",
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
function pickFirstTruthyKeyOptional(collection, keys) {
|
|
299
|
-
for (const k of keys) {
|
|
300
|
-
if (collection[k] === true)
|
|
301
|
-
return k;
|
|
302
|
-
}
|
|
303
|
-
return undefined;
|
|
304
|
-
}
|
|
305
210
|
/**
|
|
306
|
-
* Pick the first truthy key from props, then from defaults, then
|
|
211
|
+
* Pick the first truthy key from props, then from defaults, then undefined.
|
|
307
212
|
*/
|
|
308
213
|
function pickFirstTruthyKey(props, defaults, keys) {
|
|
309
|
-
|
|
310
|
-
const
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
214
|
+
let falsyKeys = [];
|
|
215
|
+
for (const k of keys) {
|
|
216
|
+
const p = props[k];
|
|
217
|
+
if (p === true)
|
|
218
|
+
return k;
|
|
219
|
+
if (p === false)
|
|
220
|
+
falsyKeys.push(k);
|
|
221
|
+
}
|
|
222
|
+
for (const k of keys) {
|
|
223
|
+
const d = defaults[k];
|
|
224
|
+
if (d === true && !falsyKeys.includes(k))
|
|
225
|
+
return k;
|
|
226
|
+
}
|
|
317
227
|
return undefined;
|
|
318
228
|
}
|
|
319
229
|
|
|
@@ -330,7 +240,13 @@ class HideTheme extends BaseTheme {
|
|
|
330
240
|
return [key ? this[key] : ''];
|
|
331
241
|
}
|
|
332
242
|
}
|
|
333
|
-
HideTheme.defaultClasses =
|
|
243
|
+
HideTheme.defaultClasses = {
|
|
244
|
+
xsHide: "max-xs:hidden",
|
|
245
|
+
smHide: "max-sm:hidden",
|
|
246
|
+
mdHide: "max-md:hidden",
|
|
247
|
+
lgHide: "max-lg:hidden",
|
|
248
|
+
xlHide: "max-xl:hidden"
|
|
249
|
+
};
|
|
334
250
|
|
|
335
251
|
class ItemsTheme extends BaseTheme {
|
|
336
252
|
constructor(initialConfig) {
|
|
@@ -366,7 +282,16 @@ class JustifyTheme extends BaseTheme {
|
|
|
366
282
|
return [key ? this[key] : ''];
|
|
367
283
|
}
|
|
368
284
|
}
|
|
369
|
-
JustifyTheme.defaultClasses =
|
|
285
|
+
JustifyTheme.defaultClasses = {
|
|
286
|
+
justifyStart: "justify-start",
|
|
287
|
+
justifyEnd: "justify-end",
|
|
288
|
+
justifyCenter: "justify-center",
|
|
289
|
+
justifyBetween: "justify-between",
|
|
290
|
+
justifyAround: "justify-around",
|
|
291
|
+
justifyEvenly: "justify-evenly",
|
|
292
|
+
justifyStretch: "justify-stretch",
|
|
293
|
+
justifyBaseline: "justify-baseline",
|
|
294
|
+
};
|
|
370
295
|
|
|
371
296
|
class PositionTheme extends BaseTheme {
|
|
372
297
|
constructor(initialConfig) {
|
|
@@ -381,7 +306,13 @@ class PositionTheme extends BaseTheme {
|
|
|
381
306
|
return [key ? this[key] : ''];
|
|
382
307
|
}
|
|
383
308
|
}
|
|
384
|
-
PositionTheme.defaultClasses =
|
|
309
|
+
PositionTheme.defaultClasses = {
|
|
310
|
+
relative: "relative",
|
|
311
|
+
absolute: "absolute",
|
|
312
|
+
fixed: "fixed",
|
|
313
|
+
sticky: "sticky",
|
|
314
|
+
static: "static"
|
|
315
|
+
};
|
|
385
316
|
|
|
386
317
|
const fontWeightClasses = {
|
|
387
318
|
thin: "font-thin",
|
|
@@ -619,6 +550,2744 @@ const mergeDefaults = (baseDefaults, overrideDefaults) => {
|
|
|
619
550
|
return finalDefaults;
|
|
620
551
|
};
|
|
621
552
|
|
|
553
|
+
class DisplayTheme extends BaseTheme {
|
|
554
|
+
constructor(initialConfig) {
|
|
555
|
+
super();
|
|
556
|
+
DISPLAY_KEYS.forEach((key) => {
|
|
557
|
+
var _a;
|
|
558
|
+
this[key] = (_a = initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig[key]) !== null && _a !== void 0 ? _a : DisplayTheme.defaultClasses[key];
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
getClasses(props, defaults) {
|
|
562
|
+
const pickedKey = pickFirstTruthyKey(props, defaults, DISPLAY_KEYS);
|
|
563
|
+
return [pickedKey && this[pickedKey] ? this[pickedKey] : ''];
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
DisplayTheme.defaultClasses = {
|
|
567
|
+
inline: "inline",
|
|
568
|
+
block: "block",
|
|
569
|
+
inlineBlock: "inline-block",
|
|
570
|
+
flex: "flex",
|
|
571
|
+
inlineFlex: "inline-flex",
|
|
572
|
+
grid: "grid",
|
|
573
|
+
inlineGrid: "inline-grid",
|
|
574
|
+
contents: "contents",
|
|
575
|
+
table: "table",
|
|
576
|
+
tableCell: "table-cell",
|
|
577
|
+
hidden: "hidden"
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
const CLASS_PART_SEPARATOR = '-';
|
|
581
|
+
const createClassGroupUtils = config => {
|
|
582
|
+
const classMap = createClassMap(config);
|
|
583
|
+
const {
|
|
584
|
+
conflictingClassGroups,
|
|
585
|
+
conflictingClassGroupModifiers
|
|
586
|
+
} = config;
|
|
587
|
+
const getClassGroupId = className => {
|
|
588
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
589
|
+
// 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.
|
|
590
|
+
if (classParts[0] === '' && classParts.length !== 1) {
|
|
591
|
+
classParts.shift();
|
|
592
|
+
}
|
|
593
|
+
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
|
|
594
|
+
};
|
|
595
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
596
|
+
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
597
|
+
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
598
|
+
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
599
|
+
}
|
|
600
|
+
return conflicts;
|
|
601
|
+
};
|
|
602
|
+
return {
|
|
603
|
+
getClassGroupId,
|
|
604
|
+
getConflictingClassGroupIds
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
const getGroupRecursive = (classParts, classPartObject) => {
|
|
608
|
+
if (classParts.length === 0) {
|
|
609
|
+
return classPartObject.classGroupId;
|
|
610
|
+
}
|
|
611
|
+
const currentClassPart = classParts[0];
|
|
612
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
613
|
+
const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
|
|
614
|
+
if (classGroupFromNextClassPart) {
|
|
615
|
+
return classGroupFromNextClassPart;
|
|
616
|
+
}
|
|
617
|
+
if (classPartObject.validators.length === 0) {
|
|
618
|
+
return undefined;
|
|
619
|
+
}
|
|
620
|
+
const classRest = classParts.join(CLASS_PART_SEPARATOR);
|
|
621
|
+
return classPartObject.validators.find(({
|
|
622
|
+
validator
|
|
623
|
+
}) => validator(classRest))?.classGroupId;
|
|
624
|
+
};
|
|
625
|
+
const arbitraryPropertyRegex = /^\[(.+)\]$/;
|
|
626
|
+
const getGroupIdForArbitraryProperty = className => {
|
|
627
|
+
if (arbitraryPropertyRegex.test(className)) {
|
|
628
|
+
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
629
|
+
const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
|
|
630
|
+
if (property) {
|
|
631
|
+
// I use two dots here because one dot is used as prefix for class groups in plugins
|
|
632
|
+
return 'arbitrary..' + property;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* Exported for testing only
|
|
638
|
+
*/
|
|
639
|
+
const createClassMap = config => {
|
|
640
|
+
const {
|
|
641
|
+
theme,
|
|
642
|
+
classGroups
|
|
643
|
+
} = config;
|
|
644
|
+
const classMap = {
|
|
645
|
+
nextPart: new Map(),
|
|
646
|
+
validators: []
|
|
647
|
+
};
|
|
648
|
+
for (const classGroupId in classGroups) {
|
|
649
|
+
processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
|
|
650
|
+
}
|
|
651
|
+
return classMap;
|
|
652
|
+
};
|
|
653
|
+
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
654
|
+
classGroup.forEach(classDefinition => {
|
|
655
|
+
if (typeof classDefinition === 'string') {
|
|
656
|
+
const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
|
|
657
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
if (typeof classDefinition === 'function') {
|
|
661
|
+
if (isThemeGetter(classDefinition)) {
|
|
662
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
classPartObject.validators.push({
|
|
666
|
+
validator: classDefinition,
|
|
667
|
+
classGroupId
|
|
668
|
+
});
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
Object.entries(classDefinition).forEach(([key, classGroup]) => {
|
|
672
|
+
processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
|
|
673
|
+
});
|
|
674
|
+
});
|
|
675
|
+
};
|
|
676
|
+
const getPart = (classPartObject, path) => {
|
|
677
|
+
let currentClassPartObject = classPartObject;
|
|
678
|
+
path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
|
|
679
|
+
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
680
|
+
currentClassPartObject.nextPart.set(pathPart, {
|
|
681
|
+
nextPart: new Map(),
|
|
682
|
+
validators: []
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
686
|
+
});
|
|
687
|
+
return currentClassPartObject;
|
|
688
|
+
};
|
|
689
|
+
const isThemeGetter = func => func.isThemeGetter;
|
|
690
|
+
|
|
691
|
+
// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
|
|
692
|
+
const createLruCache = maxCacheSize => {
|
|
693
|
+
if (maxCacheSize < 1) {
|
|
694
|
+
return {
|
|
695
|
+
get: () => undefined,
|
|
696
|
+
set: () => {}
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
let cacheSize = 0;
|
|
700
|
+
let cache = new Map();
|
|
701
|
+
let previousCache = new Map();
|
|
702
|
+
const update = (key, value) => {
|
|
703
|
+
cache.set(key, value);
|
|
704
|
+
cacheSize++;
|
|
705
|
+
if (cacheSize > maxCacheSize) {
|
|
706
|
+
cacheSize = 0;
|
|
707
|
+
previousCache = cache;
|
|
708
|
+
cache = new Map();
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
return {
|
|
712
|
+
get(key) {
|
|
713
|
+
let value = cache.get(key);
|
|
714
|
+
if (value !== undefined) {
|
|
715
|
+
return value;
|
|
716
|
+
}
|
|
717
|
+
if ((value = previousCache.get(key)) !== undefined) {
|
|
718
|
+
update(key, value);
|
|
719
|
+
return value;
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
set(key, value) {
|
|
723
|
+
if (cache.has(key)) {
|
|
724
|
+
cache.set(key, value);
|
|
725
|
+
} else {
|
|
726
|
+
update(key, value);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
const IMPORTANT_MODIFIER = '!';
|
|
732
|
+
const MODIFIER_SEPARATOR = ':';
|
|
733
|
+
const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
|
|
734
|
+
const createParseClassName = config => {
|
|
735
|
+
const {
|
|
736
|
+
prefix,
|
|
737
|
+
experimentalParseClassName
|
|
738
|
+
} = config;
|
|
739
|
+
/**
|
|
740
|
+
* Parse class name into parts.
|
|
741
|
+
*
|
|
742
|
+
* Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
|
|
743
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
|
|
744
|
+
*/
|
|
745
|
+
let parseClassName = className => {
|
|
746
|
+
const modifiers = [];
|
|
747
|
+
let bracketDepth = 0;
|
|
748
|
+
let parenDepth = 0;
|
|
749
|
+
let modifierStart = 0;
|
|
750
|
+
let postfixModifierPosition;
|
|
751
|
+
for (let index = 0; index < className.length; index++) {
|
|
752
|
+
let currentCharacter = className[index];
|
|
753
|
+
if (bracketDepth === 0 && parenDepth === 0) {
|
|
754
|
+
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
755
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
756
|
+
modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
|
|
757
|
+
continue;
|
|
758
|
+
}
|
|
759
|
+
if (currentCharacter === '/') {
|
|
760
|
+
postfixModifierPosition = index;
|
|
761
|
+
continue;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
if (currentCharacter === '[') {
|
|
765
|
+
bracketDepth++;
|
|
766
|
+
} else if (currentCharacter === ']') {
|
|
767
|
+
bracketDepth--;
|
|
768
|
+
} else if (currentCharacter === '(') {
|
|
769
|
+
parenDepth++;
|
|
770
|
+
} else if (currentCharacter === ')') {
|
|
771
|
+
parenDepth--;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
|
|
775
|
+
const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
|
|
776
|
+
const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
|
|
777
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
|
|
778
|
+
return {
|
|
779
|
+
modifiers,
|
|
780
|
+
hasImportantModifier,
|
|
781
|
+
baseClassName,
|
|
782
|
+
maybePostfixModifierPosition
|
|
783
|
+
};
|
|
784
|
+
};
|
|
785
|
+
if (prefix) {
|
|
786
|
+
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
787
|
+
const parseClassNameOriginal = parseClassName;
|
|
788
|
+
parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
|
|
789
|
+
isExternal: true,
|
|
790
|
+
modifiers: [],
|
|
791
|
+
hasImportantModifier: false,
|
|
792
|
+
baseClassName: className,
|
|
793
|
+
maybePostfixModifierPosition: undefined
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
if (experimentalParseClassName) {
|
|
797
|
+
const parseClassNameOriginal = parseClassName;
|
|
798
|
+
parseClassName = className => experimentalParseClassName({
|
|
799
|
+
className,
|
|
800
|
+
parseClassName: parseClassNameOriginal
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
return parseClassName;
|
|
804
|
+
};
|
|
805
|
+
const stripImportantModifier = baseClassName => {
|
|
806
|
+
if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
|
|
807
|
+
return baseClassName.substring(0, baseClassName.length - 1);
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
811
|
+
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
812
|
+
*/
|
|
813
|
+
if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
|
|
814
|
+
return baseClassName.substring(1);
|
|
815
|
+
}
|
|
816
|
+
return baseClassName;
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Sorts modifiers according to following schema:
|
|
821
|
+
* - Predefined modifiers are sorted alphabetically
|
|
822
|
+
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
|
|
823
|
+
*/
|
|
824
|
+
const createSortModifiers = config => {
|
|
825
|
+
const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(modifier => [modifier, true]));
|
|
826
|
+
const sortModifiers = modifiers => {
|
|
827
|
+
if (modifiers.length <= 1) {
|
|
828
|
+
return modifiers;
|
|
829
|
+
}
|
|
830
|
+
const sortedModifiers = [];
|
|
831
|
+
let unsortedModifiers = [];
|
|
832
|
+
modifiers.forEach(modifier => {
|
|
833
|
+
const isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];
|
|
834
|
+
if (isPositionSensitive) {
|
|
835
|
+
sortedModifiers.push(...unsortedModifiers.sort(), modifier);
|
|
836
|
+
unsortedModifiers = [];
|
|
837
|
+
} else {
|
|
838
|
+
unsortedModifiers.push(modifier);
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
sortedModifiers.push(...unsortedModifiers.sort());
|
|
842
|
+
return sortedModifiers;
|
|
843
|
+
};
|
|
844
|
+
return sortModifiers;
|
|
845
|
+
};
|
|
846
|
+
const createConfigUtils = config => ({
|
|
847
|
+
cache: createLruCache(config.cacheSize),
|
|
848
|
+
parseClassName: createParseClassName(config),
|
|
849
|
+
sortModifiers: createSortModifiers(config),
|
|
850
|
+
...createClassGroupUtils(config)
|
|
851
|
+
});
|
|
852
|
+
const SPLIT_CLASSES_REGEX = /\s+/;
|
|
853
|
+
const mergeClassList = (classList, configUtils) => {
|
|
854
|
+
const {
|
|
855
|
+
parseClassName,
|
|
856
|
+
getClassGroupId,
|
|
857
|
+
getConflictingClassGroupIds,
|
|
858
|
+
sortModifiers
|
|
859
|
+
} = configUtils;
|
|
860
|
+
/**
|
|
861
|
+
* Set of classGroupIds in following format:
|
|
862
|
+
* `{importantModifier}{variantModifiers}{classGroupId}`
|
|
863
|
+
* @example 'float'
|
|
864
|
+
* @example 'hover:focus:bg-color'
|
|
865
|
+
* @example 'md:!pr'
|
|
866
|
+
*/
|
|
867
|
+
const classGroupsInConflict = [];
|
|
868
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
869
|
+
let result = '';
|
|
870
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
871
|
+
const originalClassName = classNames[index];
|
|
872
|
+
const {
|
|
873
|
+
isExternal,
|
|
874
|
+
modifiers,
|
|
875
|
+
hasImportantModifier,
|
|
876
|
+
baseClassName,
|
|
877
|
+
maybePostfixModifierPosition
|
|
878
|
+
} = parseClassName(originalClassName);
|
|
879
|
+
if (isExternal) {
|
|
880
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
881
|
+
continue;
|
|
882
|
+
}
|
|
883
|
+
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
|
884
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
885
|
+
if (!classGroupId) {
|
|
886
|
+
if (!hasPostfixModifier) {
|
|
887
|
+
// Not a Tailwind class
|
|
888
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
889
|
+
continue;
|
|
890
|
+
}
|
|
891
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
892
|
+
if (!classGroupId) {
|
|
893
|
+
// Not a Tailwind class
|
|
894
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
895
|
+
continue;
|
|
896
|
+
}
|
|
897
|
+
hasPostfixModifier = false;
|
|
898
|
+
}
|
|
899
|
+
const variantModifier = sortModifiers(modifiers).join(':');
|
|
900
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
901
|
+
const classId = modifierId + classGroupId;
|
|
902
|
+
if (classGroupsInConflict.includes(classId)) {
|
|
903
|
+
// Tailwind class omitted due to conflict
|
|
904
|
+
continue;
|
|
905
|
+
}
|
|
906
|
+
classGroupsInConflict.push(classId);
|
|
907
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
908
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
909
|
+
const group = conflictGroups[i];
|
|
910
|
+
classGroupsInConflict.push(modifierId + group);
|
|
911
|
+
}
|
|
912
|
+
// Tailwind class not in conflict
|
|
913
|
+
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
914
|
+
}
|
|
915
|
+
return result;
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
|
|
920
|
+
*
|
|
921
|
+
* Specifically:
|
|
922
|
+
* - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
|
|
923
|
+
* - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
|
|
924
|
+
*
|
|
925
|
+
* Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
926
|
+
*/
|
|
927
|
+
function twJoin() {
|
|
928
|
+
let index = 0;
|
|
929
|
+
let argument;
|
|
930
|
+
let resolvedValue;
|
|
931
|
+
let string = '';
|
|
932
|
+
while (index < arguments.length) {
|
|
933
|
+
if (argument = arguments[index++]) {
|
|
934
|
+
if (resolvedValue = toValue(argument)) {
|
|
935
|
+
string && (string += ' ');
|
|
936
|
+
string += resolvedValue;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
return string;
|
|
941
|
+
}
|
|
942
|
+
const toValue = mix => {
|
|
943
|
+
if (typeof mix === 'string') {
|
|
944
|
+
return mix;
|
|
945
|
+
}
|
|
946
|
+
let resolvedValue;
|
|
947
|
+
let string = '';
|
|
948
|
+
for (let k = 0; k < mix.length; k++) {
|
|
949
|
+
if (mix[k]) {
|
|
950
|
+
if (resolvedValue = toValue(mix[k])) {
|
|
951
|
+
string && (string += ' ');
|
|
952
|
+
string += resolvedValue;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
return string;
|
|
957
|
+
};
|
|
958
|
+
function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
959
|
+
let configUtils;
|
|
960
|
+
let cacheGet;
|
|
961
|
+
let cacheSet;
|
|
962
|
+
let functionToCall = initTailwindMerge;
|
|
963
|
+
function initTailwindMerge(classList) {
|
|
964
|
+
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
965
|
+
configUtils = createConfigUtils(config);
|
|
966
|
+
cacheGet = configUtils.cache.get;
|
|
967
|
+
cacheSet = configUtils.cache.set;
|
|
968
|
+
functionToCall = tailwindMerge;
|
|
969
|
+
return tailwindMerge(classList);
|
|
970
|
+
}
|
|
971
|
+
function tailwindMerge(classList) {
|
|
972
|
+
const cachedResult = cacheGet(classList);
|
|
973
|
+
if (cachedResult) {
|
|
974
|
+
return cachedResult;
|
|
975
|
+
}
|
|
976
|
+
const result = mergeClassList(classList, configUtils);
|
|
977
|
+
cacheSet(classList, result);
|
|
978
|
+
return result;
|
|
979
|
+
}
|
|
980
|
+
return function callTailwindMerge() {
|
|
981
|
+
return functionToCall(twJoin.apply(null, arguments));
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
const fromTheme = key => {
|
|
985
|
+
const themeGetter = theme => theme[key] || [];
|
|
986
|
+
themeGetter.isThemeGetter = true;
|
|
987
|
+
return themeGetter;
|
|
988
|
+
};
|
|
989
|
+
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
990
|
+
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
991
|
+
const fractionRegex = /^\d+\/\d+$/;
|
|
992
|
+
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
993
|
+
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$/;
|
|
994
|
+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
995
|
+
// Shadow always begins with x and y offset separated by underscore optionally prepended by inset
|
|
996
|
+
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
997
|
+
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
998
|
+
const isFraction = value => fractionRegex.test(value);
|
|
999
|
+
const isNumber = value => Boolean(value) && !Number.isNaN(Number(value));
|
|
1000
|
+
const isInteger = value => Boolean(value) && Number.isInteger(Number(value));
|
|
1001
|
+
const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
|
|
1002
|
+
const isTshirtSize = value => tshirtUnitRegex.test(value);
|
|
1003
|
+
const isAny = () => true;
|
|
1004
|
+
const isLengthOnly = value =>
|
|
1005
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
1006
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
1007
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1008
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
|
|
1009
|
+
const isNever = () => false;
|
|
1010
|
+
const isShadow = value => shadowRegex.test(value);
|
|
1011
|
+
const isImage = value => imageRegex.test(value);
|
|
1012
|
+
const isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
|
1013
|
+
const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
1014
|
+
const isArbitraryValue = value => arbitraryValueRegex.test(value);
|
|
1015
|
+
const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
1016
|
+
const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
1017
|
+
const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
1018
|
+
const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
1019
|
+
const isArbitraryShadow = value => getIsArbitraryValue(value, isNever, isShadow);
|
|
1020
|
+
const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
|
|
1021
|
+
const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
|
|
1022
|
+
const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
1023
|
+
const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);
|
|
1024
|
+
const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
|
|
1025
|
+
const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
|
|
1026
|
+
const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
|
|
1027
|
+
// Helpers
|
|
1028
|
+
const getIsArbitraryValue = (value, testLabel, testValue) => {
|
|
1029
|
+
const result = arbitraryValueRegex.exec(value);
|
|
1030
|
+
if (result) {
|
|
1031
|
+
if (result[1]) {
|
|
1032
|
+
return testLabel(result[1]);
|
|
1033
|
+
}
|
|
1034
|
+
return testValue(result[2]);
|
|
1035
|
+
}
|
|
1036
|
+
return false;
|
|
1037
|
+
};
|
|
1038
|
+
const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
|
|
1039
|
+
const result = arbitraryVariableRegex.exec(value);
|
|
1040
|
+
if (result) {
|
|
1041
|
+
if (result[1]) {
|
|
1042
|
+
return testLabel(result[1]);
|
|
1043
|
+
}
|
|
1044
|
+
return shouldMatchNoLabel;
|
|
1045
|
+
}
|
|
1046
|
+
return false;
|
|
1047
|
+
};
|
|
1048
|
+
// Labels
|
|
1049
|
+
const isLabelPosition = label => label === 'position';
|
|
1050
|
+
const imageLabels = /*#__PURE__*/new Set(['image', 'url']);
|
|
1051
|
+
const isLabelImage = label => imageLabels.has(label);
|
|
1052
|
+
const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
|
|
1053
|
+
const isLabelSize = label => sizeLabels.has(label);
|
|
1054
|
+
const isLabelLength = label => label === 'length';
|
|
1055
|
+
const isLabelNumber = label => label === 'number';
|
|
1056
|
+
const isLabelFamilyName = label => label === 'family-name';
|
|
1057
|
+
const isLabelShadow = label => label === 'shadow';
|
|
1058
|
+
const getDefaultConfig = () => {
|
|
1059
|
+
/**
|
|
1060
|
+
* Theme getters for theme variable namespaces
|
|
1061
|
+
* @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
|
|
1062
|
+
*/
|
|
1063
|
+
/***/
|
|
1064
|
+
const themeColor = fromTheme('color');
|
|
1065
|
+
const themeFont = fromTheme('font');
|
|
1066
|
+
const themeText = fromTheme('text');
|
|
1067
|
+
const themeFontWeight = fromTheme('font-weight');
|
|
1068
|
+
const themeTracking = fromTheme('tracking');
|
|
1069
|
+
const themeLeading = fromTheme('leading');
|
|
1070
|
+
const themeBreakpoint = fromTheme('breakpoint');
|
|
1071
|
+
const themeContainer = fromTheme('container');
|
|
1072
|
+
const themeSpacing = fromTheme('spacing');
|
|
1073
|
+
const themeRadius = fromTheme('radius');
|
|
1074
|
+
const themeShadow = fromTheme('shadow');
|
|
1075
|
+
const themeInsetShadow = fromTheme('inset-shadow');
|
|
1076
|
+
const themeDropShadow = fromTheme('drop-shadow');
|
|
1077
|
+
const themeBlur = fromTheme('blur');
|
|
1078
|
+
const themePerspective = fromTheme('perspective');
|
|
1079
|
+
const themeAspect = fromTheme('aspect');
|
|
1080
|
+
const themeEase = fromTheme('ease');
|
|
1081
|
+
const themeAnimate = fromTheme('animate');
|
|
1082
|
+
/**
|
|
1083
|
+
* Helpers to avoid repeating the same scales
|
|
1084
|
+
*
|
|
1085
|
+
* We use functions that create a new array every time they're called instead of static arrays.
|
|
1086
|
+
* 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.
|
|
1087
|
+
*/
|
|
1088
|
+
/***/
|
|
1089
|
+
const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
|
|
1090
|
+
const scalePosition = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
|
|
1091
|
+
const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
|
|
1092
|
+
const scaleOverscroll = () => ['auto', 'contain', 'none'];
|
|
1093
|
+
const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
|
|
1094
|
+
const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];
|
|
1095
|
+
const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];
|
|
1096
|
+
const scaleGridColRowStartAndEnd = () => ['auto', {
|
|
1097
|
+
span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]
|
|
1098
|
+
}, isInteger, isArbitraryVariable, isArbitraryValue];
|
|
1099
|
+
const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
|
|
1100
|
+
const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
|
|
1101
|
+
const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline'];
|
|
1102
|
+
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch'];
|
|
1103
|
+
const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
|
|
1104
|
+
const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
|
1105
|
+
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
|
|
1106
|
+
const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
|
|
1107
|
+
const scaleRadius = () => [
|
|
1108
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
1109
|
+
'', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];
|
|
1110
|
+
const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
|
|
1111
|
+
const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
|
|
1112
|
+
const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
|
|
1113
|
+
const scaleBlur = () => [
|
|
1114
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
1115
|
+
'', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
|
|
1116
|
+
const scaleOrigin = () => ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryVariable, isArbitraryValue];
|
|
1117
|
+
const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
1118
|
+
const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
1119
|
+
const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
|
|
1120
|
+
const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];
|
|
1121
|
+
return {
|
|
1122
|
+
cacheSize: 500,
|
|
1123
|
+
theme: {
|
|
1124
|
+
animate: ['spin', 'ping', 'pulse', 'bounce'],
|
|
1125
|
+
aspect: ['video'],
|
|
1126
|
+
blur: [isTshirtSize],
|
|
1127
|
+
breakpoint: [isTshirtSize],
|
|
1128
|
+
color: [isAny],
|
|
1129
|
+
container: [isTshirtSize],
|
|
1130
|
+
'drop-shadow': [isTshirtSize],
|
|
1131
|
+
ease: ['in', 'out', 'in-out'],
|
|
1132
|
+
font: [isAnyNonArbitrary],
|
|
1133
|
+
'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],
|
|
1134
|
+
'inset-shadow': [isTshirtSize],
|
|
1135
|
+
leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],
|
|
1136
|
+
perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],
|
|
1137
|
+
radius: [isTshirtSize],
|
|
1138
|
+
shadow: [isTshirtSize],
|
|
1139
|
+
spacing: ['px', isNumber],
|
|
1140
|
+
text: [isTshirtSize],
|
|
1141
|
+
tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
|
|
1142
|
+
},
|
|
1143
|
+
classGroups: {
|
|
1144
|
+
// --------------
|
|
1145
|
+
// --- Layout ---
|
|
1146
|
+
// --------------
|
|
1147
|
+
/**
|
|
1148
|
+
* Aspect Ratio
|
|
1149
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
1150
|
+
*/
|
|
1151
|
+
aspect: [{
|
|
1152
|
+
aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
|
|
1153
|
+
}],
|
|
1154
|
+
/**
|
|
1155
|
+
* Container
|
|
1156
|
+
* @see https://tailwindcss.com/docs/container
|
|
1157
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
1158
|
+
*/
|
|
1159
|
+
container: ['container'],
|
|
1160
|
+
/**
|
|
1161
|
+
* Columns
|
|
1162
|
+
* @see https://tailwindcss.com/docs/columns
|
|
1163
|
+
*/
|
|
1164
|
+
columns: [{
|
|
1165
|
+
columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
|
|
1166
|
+
}],
|
|
1167
|
+
/**
|
|
1168
|
+
* Break After
|
|
1169
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
1170
|
+
*/
|
|
1171
|
+
'break-after': [{
|
|
1172
|
+
'break-after': scaleBreak()
|
|
1173
|
+
}],
|
|
1174
|
+
/**
|
|
1175
|
+
* Break Before
|
|
1176
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
1177
|
+
*/
|
|
1178
|
+
'break-before': [{
|
|
1179
|
+
'break-before': scaleBreak()
|
|
1180
|
+
}],
|
|
1181
|
+
/**
|
|
1182
|
+
* Break Inside
|
|
1183
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
1184
|
+
*/
|
|
1185
|
+
'break-inside': [{
|
|
1186
|
+
'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']
|
|
1187
|
+
}],
|
|
1188
|
+
/**
|
|
1189
|
+
* Box Decoration Break
|
|
1190
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
1191
|
+
*/
|
|
1192
|
+
'box-decoration': [{
|
|
1193
|
+
'box-decoration': ['slice', 'clone']
|
|
1194
|
+
}],
|
|
1195
|
+
/**
|
|
1196
|
+
* Box Sizing
|
|
1197
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
1198
|
+
*/
|
|
1199
|
+
box: [{
|
|
1200
|
+
box: ['border', 'content']
|
|
1201
|
+
}],
|
|
1202
|
+
/**
|
|
1203
|
+
* Display
|
|
1204
|
+
* @see https://tailwindcss.com/docs/display
|
|
1205
|
+
*/
|
|
1206
|
+
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'],
|
|
1207
|
+
/**
|
|
1208
|
+
* Screen Reader Only
|
|
1209
|
+
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
1210
|
+
*/
|
|
1211
|
+
sr: ['sr-only', 'not-sr-only'],
|
|
1212
|
+
/**
|
|
1213
|
+
* Floats
|
|
1214
|
+
* @see https://tailwindcss.com/docs/float
|
|
1215
|
+
*/
|
|
1216
|
+
float: [{
|
|
1217
|
+
float: ['right', 'left', 'none', 'start', 'end']
|
|
1218
|
+
}],
|
|
1219
|
+
/**
|
|
1220
|
+
* Clear
|
|
1221
|
+
* @see https://tailwindcss.com/docs/clear
|
|
1222
|
+
*/
|
|
1223
|
+
clear: [{
|
|
1224
|
+
clear: ['left', 'right', 'both', 'none', 'start', 'end']
|
|
1225
|
+
}],
|
|
1226
|
+
/**
|
|
1227
|
+
* Isolation
|
|
1228
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
1229
|
+
*/
|
|
1230
|
+
isolation: ['isolate', 'isolation-auto'],
|
|
1231
|
+
/**
|
|
1232
|
+
* Object Fit
|
|
1233
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
1234
|
+
*/
|
|
1235
|
+
'object-fit': [{
|
|
1236
|
+
object: ['contain', 'cover', 'fill', 'none', 'scale-down']
|
|
1237
|
+
}],
|
|
1238
|
+
/**
|
|
1239
|
+
* Object Position
|
|
1240
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
1241
|
+
*/
|
|
1242
|
+
'object-position': [{
|
|
1243
|
+
object: [...scalePosition(), isArbitraryValue, isArbitraryVariable]
|
|
1244
|
+
}],
|
|
1245
|
+
/**
|
|
1246
|
+
* Overflow
|
|
1247
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1248
|
+
*/
|
|
1249
|
+
overflow: [{
|
|
1250
|
+
overflow: scaleOverflow()
|
|
1251
|
+
}],
|
|
1252
|
+
/**
|
|
1253
|
+
* Overflow X
|
|
1254
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1255
|
+
*/
|
|
1256
|
+
'overflow-x': [{
|
|
1257
|
+
'overflow-x': scaleOverflow()
|
|
1258
|
+
}],
|
|
1259
|
+
/**
|
|
1260
|
+
* Overflow Y
|
|
1261
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1262
|
+
*/
|
|
1263
|
+
'overflow-y': [{
|
|
1264
|
+
'overflow-y': scaleOverflow()
|
|
1265
|
+
}],
|
|
1266
|
+
/**
|
|
1267
|
+
* Overscroll Behavior
|
|
1268
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1269
|
+
*/
|
|
1270
|
+
overscroll: [{
|
|
1271
|
+
overscroll: scaleOverscroll()
|
|
1272
|
+
}],
|
|
1273
|
+
/**
|
|
1274
|
+
* Overscroll Behavior X
|
|
1275
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1276
|
+
*/
|
|
1277
|
+
'overscroll-x': [{
|
|
1278
|
+
'overscroll-x': scaleOverscroll()
|
|
1279
|
+
}],
|
|
1280
|
+
/**
|
|
1281
|
+
* Overscroll Behavior Y
|
|
1282
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1283
|
+
*/
|
|
1284
|
+
'overscroll-y': [{
|
|
1285
|
+
'overscroll-y': scaleOverscroll()
|
|
1286
|
+
}],
|
|
1287
|
+
/**
|
|
1288
|
+
* Position
|
|
1289
|
+
* @see https://tailwindcss.com/docs/position
|
|
1290
|
+
*/
|
|
1291
|
+
position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
|
|
1292
|
+
/**
|
|
1293
|
+
* Top / Right / Bottom / Left
|
|
1294
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1295
|
+
*/
|
|
1296
|
+
inset: [{
|
|
1297
|
+
inset: scaleInset()
|
|
1298
|
+
}],
|
|
1299
|
+
/**
|
|
1300
|
+
* Right / Left
|
|
1301
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1302
|
+
*/
|
|
1303
|
+
'inset-x': [{
|
|
1304
|
+
'inset-x': scaleInset()
|
|
1305
|
+
}],
|
|
1306
|
+
/**
|
|
1307
|
+
* Top / Bottom
|
|
1308
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1309
|
+
*/
|
|
1310
|
+
'inset-y': [{
|
|
1311
|
+
'inset-y': scaleInset()
|
|
1312
|
+
}],
|
|
1313
|
+
/**
|
|
1314
|
+
* Start
|
|
1315
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1316
|
+
*/
|
|
1317
|
+
start: [{
|
|
1318
|
+
start: scaleInset()
|
|
1319
|
+
}],
|
|
1320
|
+
/**
|
|
1321
|
+
* End
|
|
1322
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1323
|
+
*/
|
|
1324
|
+
end: [{
|
|
1325
|
+
end: scaleInset()
|
|
1326
|
+
}],
|
|
1327
|
+
/**
|
|
1328
|
+
* Top
|
|
1329
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1330
|
+
*/
|
|
1331
|
+
top: [{
|
|
1332
|
+
top: scaleInset()
|
|
1333
|
+
}],
|
|
1334
|
+
/**
|
|
1335
|
+
* Right
|
|
1336
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1337
|
+
*/
|
|
1338
|
+
right: [{
|
|
1339
|
+
right: scaleInset()
|
|
1340
|
+
}],
|
|
1341
|
+
/**
|
|
1342
|
+
* Bottom
|
|
1343
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1344
|
+
*/
|
|
1345
|
+
bottom: [{
|
|
1346
|
+
bottom: scaleInset()
|
|
1347
|
+
}],
|
|
1348
|
+
/**
|
|
1349
|
+
* Left
|
|
1350
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1351
|
+
*/
|
|
1352
|
+
left: [{
|
|
1353
|
+
left: scaleInset()
|
|
1354
|
+
}],
|
|
1355
|
+
/**
|
|
1356
|
+
* Visibility
|
|
1357
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
1358
|
+
*/
|
|
1359
|
+
visibility: ['visible', 'invisible', 'collapse'],
|
|
1360
|
+
/**
|
|
1361
|
+
* Z-Index
|
|
1362
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
1363
|
+
*/
|
|
1364
|
+
z: [{
|
|
1365
|
+
z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]
|
|
1366
|
+
}],
|
|
1367
|
+
// ------------------------
|
|
1368
|
+
// --- Flexbox and Grid ---
|
|
1369
|
+
// ------------------------
|
|
1370
|
+
/**
|
|
1371
|
+
* Flex Basis
|
|
1372
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
1373
|
+
*/
|
|
1374
|
+
basis: [{
|
|
1375
|
+
basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]
|
|
1376
|
+
}],
|
|
1377
|
+
/**
|
|
1378
|
+
* Flex Direction
|
|
1379
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
1380
|
+
*/
|
|
1381
|
+
'flex-direction': [{
|
|
1382
|
+
flex: ['row', 'row-reverse', 'col', 'col-reverse']
|
|
1383
|
+
}],
|
|
1384
|
+
/**
|
|
1385
|
+
* Flex Wrap
|
|
1386
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
1387
|
+
*/
|
|
1388
|
+
'flex-wrap': [{
|
|
1389
|
+
flex: ['nowrap', 'wrap', 'wrap-reverse']
|
|
1390
|
+
}],
|
|
1391
|
+
/**
|
|
1392
|
+
* Flex
|
|
1393
|
+
* @see https://tailwindcss.com/docs/flex
|
|
1394
|
+
*/
|
|
1395
|
+
flex: [{
|
|
1396
|
+
flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]
|
|
1397
|
+
}],
|
|
1398
|
+
/**
|
|
1399
|
+
* Flex Grow
|
|
1400
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
1401
|
+
*/
|
|
1402
|
+
grow: [{
|
|
1403
|
+
grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
1404
|
+
}],
|
|
1405
|
+
/**
|
|
1406
|
+
* Flex Shrink
|
|
1407
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
1408
|
+
*/
|
|
1409
|
+
shrink: [{
|
|
1410
|
+
shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
1411
|
+
}],
|
|
1412
|
+
/**
|
|
1413
|
+
* Order
|
|
1414
|
+
* @see https://tailwindcss.com/docs/order
|
|
1415
|
+
*/
|
|
1416
|
+
order: [{
|
|
1417
|
+
order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]
|
|
1418
|
+
}],
|
|
1419
|
+
/**
|
|
1420
|
+
* Grid Template Columns
|
|
1421
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1422
|
+
*/
|
|
1423
|
+
'grid-cols': [{
|
|
1424
|
+
'grid-cols': scaleGridTemplateColsRows()
|
|
1425
|
+
}],
|
|
1426
|
+
/**
|
|
1427
|
+
* Grid Column Start / End
|
|
1428
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1429
|
+
*/
|
|
1430
|
+
'col-start-end': [{
|
|
1431
|
+
col: scaleGridColRowStartAndEnd()
|
|
1432
|
+
}],
|
|
1433
|
+
/**
|
|
1434
|
+
* Grid Column Start
|
|
1435
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1436
|
+
*/
|
|
1437
|
+
'col-start': [{
|
|
1438
|
+
'col-start': scaleGridColRowStartOrEnd()
|
|
1439
|
+
}],
|
|
1440
|
+
/**
|
|
1441
|
+
* Grid Column End
|
|
1442
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1443
|
+
*/
|
|
1444
|
+
'col-end': [{
|
|
1445
|
+
'col-end': scaleGridColRowStartOrEnd()
|
|
1446
|
+
}],
|
|
1447
|
+
/**
|
|
1448
|
+
* Grid Template Rows
|
|
1449
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1450
|
+
*/
|
|
1451
|
+
'grid-rows': [{
|
|
1452
|
+
'grid-rows': scaleGridTemplateColsRows()
|
|
1453
|
+
}],
|
|
1454
|
+
/**
|
|
1455
|
+
* Grid Row Start / End
|
|
1456
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1457
|
+
*/
|
|
1458
|
+
'row-start-end': [{
|
|
1459
|
+
row: scaleGridColRowStartAndEnd()
|
|
1460
|
+
}],
|
|
1461
|
+
/**
|
|
1462
|
+
* Grid Row Start
|
|
1463
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1464
|
+
*/
|
|
1465
|
+
'row-start': [{
|
|
1466
|
+
'row-start': scaleGridColRowStartOrEnd()
|
|
1467
|
+
}],
|
|
1468
|
+
/**
|
|
1469
|
+
* Grid Row End
|
|
1470
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1471
|
+
*/
|
|
1472
|
+
'row-end': [{
|
|
1473
|
+
'row-end': scaleGridColRowStartOrEnd()
|
|
1474
|
+
}],
|
|
1475
|
+
/**
|
|
1476
|
+
* Grid Auto Flow
|
|
1477
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
1478
|
+
*/
|
|
1479
|
+
'grid-flow': [{
|
|
1480
|
+
'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']
|
|
1481
|
+
}],
|
|
1482
|
+
/**
|
|
1483
|
+
* Grid Auto Columns
|
|
1484
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1485
|
+
*/
|
|
1486
|
+
'auto-cols': [{
|
|
1487
|
+
'auto-cols': scaleGridAutoColsRows()
|
|
1488
|
+
}],
|
|
1489
|
+
/**
|
|
1490
|
+
* Grid Auto Rows
|
|
1491
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1492
|
+
*/
|
|
1493
|
+
'auto-rows': [{
|
|
1494
|
+
'auto-rows': scaleGridAutoColsRows()
|
|
1495
|
+
}],
|
|
1496
|
+
/**
|
|
1497
|
+
* Gap
|
|
1498
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1499
|
+
*/
|
|
1500
|
+
gap: [{
|
|
1501
|
+
gap: scaleUnambiguousSpacing()
|
|
1502
|
+
}],
|
|
1503
|
+
/**
|
|
1504
|
+
* Gap X
|
|
1505
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1506
|
+
*/
|
|
1507
|
+
'gap-x': [{
|
|
1508
|
+
'gap-x': scaleUnambiguousSpacing()
|
|
1509
|
+
}],
|
|
1510
|
+
/**
|
|
1511
|
+
* Gap Y
|
|
1512
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1513
|
+
*/
|
|
1514
|
+
'gap-y': [{
|
|
1515
|
+
'gap-y': scaleUnambiguousSpacing()
|
|
1516
|
+
}],
|
|
1517
|
+
/**
|
|
1518
|
+
* Justify Content
|
|
1519
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
1520
|
+
*/
|
|
1521
|
+
'justify-content': [{
|
|
1522
|
+
justify: [...scaleAlignPrimaryAxis(), 'normal']
|
|
1523
|
+
}],
|
|
1524
|
+
/**
|
|
1525
|
+
* Justify Items
|
|
1526
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
1527
|
+
*/
|
|
1528
|
+
'justify-items': [{
|
|
1529
|
+
'justify-items': [...scaleAlignSecondaryAxis(), 'normal']
|
|
1530
|
+
}],
|
|
1531
|
+
/**
|
|
1532
|
+
* Justify Self
|
|
1533
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
1534
|
+
*/
|
|
1535
|
+
'justify-self': [{
|
|
1536
|
+
'justify-self': ['auto', ...scaleAlignSecondaryAxis()]
|
|
1537
|
+
}],
|
|
1538
|
+
/**
|
|
1539
|
+
* Align Content
|
|
1540
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
1541
|
+
*/
|
|
1542
|
+
'align-content': [{
|
|
1543
|
+
content: ['normal', ...scaleAlignPrimaryAxis()]
|
|
1544
|
+
}],
|
|
1545
|
+
/**
|
|
1546
|
+
* Align Items
|
|
1547
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
1548
|
+
*/
|
|
1549
|
+
'align-items': [{
|
|
1550
|
+
items: [...scaleAlignSecondaryAxis(), 'baseline']
|
|
1551
|
+
}],
|
|
1552
|
+
/**
|
|
1553
|
+
* Align Self
|
|
1554
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
1555
|
+
*/
|
|
1556
|
+
'align-self': [{
|
|
1557
|
+
self: ['auto', ...scaleAlignSecondaryAxis(), 'baseline']
|
|
1558
|
+
}],
|
|
1559
|
+
/**
|
|
1560
|
+
* Place Content
|
|
1561
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
1562
|
+
*/
|
|
1563
|
+
'place-content': [{
|
|
1564
|
+
'place-content': scaleAlignPrimaryAxis()
|
|
1565
|
+
}],
|
|
1566
|
+
/**
|
|
1567
|
+
* Place Items
|
|
1568
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
1569
|
+
*/
|
|
1570
|
+
'place-items': [{
|
|
1571
|
+
'place-items': [...scaleAlignSecondaryAxis(), 'baseline']
|
|
1572
|
+
}],
|
|
1573
|
+
/**
|
|
1574
|
+
* Place Self
|
|
1575
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
1576
|
+
*/
|
|
1577
|
+
'place-self': [{
|
|
1578
|
+
'place-self': ['auto', ...scaleAlignSecondaryAxis()]
|
|
1579
|
+
}],
|
|
1580
|
+
// Spacing
|
|
1581
|
+
/**
|
|
1582
|
+
* Padding
|
|
1583
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1584
|
+
*/
|
|
1585
|
+
p: [{
|
|
1586
|
+
p: scaleUnambiguousSpacing()
|
|
1587
|
+
}],
|
|
1588
|
+
/**
|
|
1589
|
+
* Padding X
|
|
1590
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1591
|
+
*/
|
|
1592
|
+
px: [{
|
|
1593
|
+
px: scaleUnambiguousSpacing()
|
|
1594
|
+
}],
|
|
1595
|
+
/**
|
|
1596
|
+
* Padding Y
|
|
1597
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1598
|
+
*/
|
|
1599
|
+
py: [{
|
|
1600
|
+
py: scaleUnambiguousSpacing()
|
|
1601
|
+
}],
|
|
1602
|
+
/**
|
|
1603
|
+
* Padding Start
|
|
1604
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1605
|
+
*/
|
|
1606
|
+
ps: [{
|
|
1607
|
+
ps: scaleUnambiguousSpacing()
|
|
1608
|
+
}],
|
|
1609
|
+
/**
|
|
1610
|
+
* Padding End
|
|
1611
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1612
|
+
*/
|
|
1613
|
+
pe: [{
|
|
1614
|
+
pe: scaleUnambiguousSpacing()
|
|
1615
|
+
}],
|
|
1616
|
+
/**
|
|
1617
|
+
* Padding Top
|
|
1618
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1619
|
+
*/
|
|
1620
|
+
pt: [{
|
|
1621
|
+
pt: scaleUnambiguousSpacing()
|
|
1622
|
+
}],
|
|
1623
|
+
/**
|
|
1624
|
+
* Padding Right
|
|
1625
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1626
|
+
*/
|
|
1627
|
+
pr: [{
|
|
1628
|
+
pr: scaleUnambiguousSpacing()
|
|
1629
|
+
}],
|
|
1630
|
+
/**
|
|
1631
|
+
* Padding Bottom
|
|
1632
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1633
|
+
*/
|
|
1634
|
+
pb: [{
|
|
1635
|
+
pb: scaleUnambiguousSpacing()
|
|
1636
|
+
}],
|
|
1637
|
+
/**
|
|
1638
|
+
* Padding Left
|
|
1639
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1640
|
+
*/
|
|
1641
|
+
pl: [{
|
|
1642
|
+
pl: scaleUnambiguousSpacing()
|
|
1643
|
+
}],
|
|
1644
|
+
/**
|
|
1645
|
+
* Margin
|
|
1646
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1647
|
+
*/
|
|
1648
|
+
m: [{
|
|
1649
|
+
m: scaleMargin()
|
|
1650
|
+
}],
|
|
1651
|
+
/**
|
|
1652
|
+
* Margin X
|
|
1653
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1654
|
+
*/
|
|
1655
|
+
mx: [{
|
|
1656
|
+
mx: scaleMargin()
|
|
1657
|
+
}],
|
|
1658
|
+
/**
|
|
1659
|
+
* Margin Y
|
|
1660
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1661
|
+
*/
|
|
1662
|
+
my: [{
|
|
1663
|
+
my: scaleMargin()
|
|
1664
|
+
}],
|
|
1665
|
+
/**
|
|
1666
|
+
* Margin Start
|
|
1667
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1668
|
+
*/
|
|
1669
|
+
ms: [{
|
|
1670
|
+
ms: scaleMargin()
|
|
1671
|
+
}],
|
|
1672
|
+
/**
|
|
1673
|
+
* Margin End
|
|
1674
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1675
|
+
*/
|
|
1676
|
+
me: [{
|
|
1677
|
+
me: scaleMargin()
|
|
1678
|
+
}],
|
|
1679
|
+
/**
|
|
1680
|
+
* Margin Top
|
|
1681
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1682
|
+
*/
|
|
1683
|
+
mt: [{
|
|
1684
|
+
mt: scaleMargin()
|
|
1685
|
+
}],
|
|
1686
|
+
/**
|
|
1687
|
+
* Margin Right
|
|
1688
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1689
|
+
*/
|
|
1690
|
+
mr: [{
|
|
1691
|
+
mr: scaleMargin()
|
|
1692
|
+
}],
|
|
1693
|
+
/**
|
|
1694
|
+
* Margin Bottom
|
|
1695
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1696
|
+
*/
|
|
1697
|
+
mb: [{
|
|
1698
|
+
mb: scaleMargin()
|
|
1699
|
+
}],
|
|
1700
|
+
/**
|
|
1701
|
+
* Margin Left
|
|
1702
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1703
|
+
*/
|
|
1704
|
+
ml: [{
|
|
1705
|
+
ml: scaleMargin()
|
|
1706
|
+
}],
|
|
1707
|
+
/**
|
|
1708
|
+
* Space Between X
|
|
1709
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1710
|
+
*/
|
|
1711
|
+
'space-x': [{
|
|
1712
|
+
'space-x': scaleUnambiguousSpacing()
|
|
1713
|
+
}],
|
|
1714
|
+
/**
|
|
1715
|
+
* Space Between X Reverse
|
|
1716
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1717
|
+
*/
|
|
1718
|
+
'space-x-reverse': ['space-x-reverse'],
|
|
1719
|
+
/**
|
|
1720
|
+
* Space Between Y
|
|
1721
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1722
|
+
*/
|
|
1723
|
+
'space-y': [{
|
|
1724
|
+
'space-y': scaleUnambiguousSpacing()
|
|
1725
|
+
}],
|
|
1726
|
+
/**
|
|
1727
|
+
* Space Between Y Reverse
|
|
1728
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1729
|
+
*/
|
|
1730
|
+
'space-y-reverse': ['space-y-reverse'],
|
|
1731
|
+
// --------------
|
|
1732
|
+
// --- Sizing ---
|
|
1733
|
+
// --------------
|
|
1734
|
+
/**
|
|
1735
|
+
* Size
|
|
1736
|
+
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
1737
|
+
*/
|
|
1738
|
+
size: [{
|
|
1739
|
+
size: scaleSizing()
|
|
1740
|
+
}],
|
|
1741
|
+
/**
|
|
1742
|
+
* Width
|
|
1743
|
+
* @see https://tailwindcss.com/docs/width
|
|
1744
|
+
*/
|
|
1745
|
+
w: [{
|
|
1746
|
+
w: [themeContainer, 'screen', ...scaleSizing()]
|
|
1747
|
+
}],
|
|
1748
|
+
/**
|
|
1749
|
+
* Min-Width
|
|
1750
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1751
|
+
*/
|
|
1752
|
+
'min-w': [{
|
|
1753
|
+
'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1754
|
+
'none', ...scaleSizing()]
|
|
1755
|
+
}],
|
|
1756
|
+
/**
|
|
1757
|
+
* Max-Width
|
|
1758
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1759
|
+
*/
|
|
1760
|
+
'max-w': [{
|
|
1761
|
+
'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1762
|
+
'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1763
|
+
{
|
|
1764
|
+
screen: [themeBreakpoint]
|
|
1765
|
+
}, ...scaleSizing()]
|
|
1766
|
+
}],
|
|
1767
|
+
/**
|
|
1768
|
+
* Height
|
|
1769
|
+
* @see https://tailwindcss.com/docs/height
|
|
1770
|
+
*/
|
|
1771
|
+
h: [{
|
|
1772
|
+
h: ['screen', ...scaleSizing()]
|
|
1773
|
+
}],
|
|
1774
|
+
/**
|
|
1775
|
+
* Min-Height
|
|
1776
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
1777
|
+
*/
|
|
1778
|
+
'min-h': [{
|
|
1779
|
+
'min-h': ['screen', 'none', ...scaleSizing()]
|
|
1780
|
+
}],
|
|
1781
|
+
/**
|
|
1782
|
+
* Max-Height
|
|
1783
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
1784
|
+
*/
|
|
1785
|
+
'max-h': [{
|
|
1786
|
+
'max-h': ['screen', ...scaleSizing()]
|
|
1787
|
+
}],
|
|
1788
|
+
// ------------------
|
|
1789
|
+
// --- Typography ---
|
|
1790
|
+
// ------------------
|
|
1791
|
+
/**
|
|
1792
|
+
* Font Size
|
|
1793
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
1794
|
+
*/
|
|
1795
|
+
'font-size': [{
|
|
1796
|
+
text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]
|
|
1797
|
+
}],
|
|
1798
|
+
/**
|
|
1799
|
+
* Font Smoothing
|
|
1800
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
1801
|
+
*/
|
|
1802
|
+
'font-smoothing': ['antialiased', 'subpixel-antialiased'],
|
|
1803
|
+
/**
|
|
1804
|
+
* Font Style
|
|
1805
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
1806
|
+
*/
|
|
1807
|
+
'font-style': ['italic', 'not-italic'],
|
|
1808
|
+
/**
|
|
1809
|
+
* Font Weight
|
|
1810
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
1811
|
+
*/
|
|
1812
|
+
'font-weight': [{
|
|
1813
|
+
font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
|
|
1814
|
+
}],
|
|
1815
|
+
/**
|
|
1816
|
+
* Font Stretch
|
|
1817
|
+
* @see https://tailwindcss.com/docs/font-stretch
|
|
1818
|
+
*/
|
|
1819
|
+
'font-stretch': [{
|
|
1820
|
+
'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]
|
|
1821
|
+
}],
|
|
1822
|
+
/**
|
|
1823
|
+
* Font Family
|
|
1824
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
1825
|
+
*/
|
|
1826
|
+
'font-family': [{
|
|
1827
|
+
font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
|
|
1828
|
+
}],
|
|
1829
|
+
/**
|
|
1830
|
+
* Font Variant Numeric
|
|
1831
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1832
|
+
*/
|
|
1833
|
+
'fvn-normal': ['normal-nums'],
|
|
1834
|
+
/**
|
|
1835
|
+
* Font Variant Numeric
|
|
1836
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1837
|
+
*/
|
|
1838
|
+
'fvn-ordinal': ['ordinal'],
|
|
1839
|
+
/**
|
|
1840
|
+
* Font Variant Numeric
|
|
1841
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1842
|
+
*/
|
|
1843
|
+
'fvn-slashed-zero': ['slashed-zero'],
|
|
1844
|
+
/**
|
|
1845
|
+
* Font Variant Numeric
|
|
1846
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1847
|
+
*/
|
|
1848
|
+
'fvn-figure': ['lining-nums', 'oldstyle-nums'],
|
|
1849
|
+
/**
|
|
1850
|
+
* Font Variant Numeric
|
|
1851
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1852
|
+
*/
|
|
1853
|
+
'fvn-spacing': ['proportional-nums', 'tabular-nums'],
|
|
1854
|
+
/**
|
|
1855
|
+
* Font Variant Numeric
|
|
1856
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1857
|
+
*/
|
|
1858
|
+
'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],
|
|
1859
|
+
/**
|
|
1860
|
+
* Letter Spacing
|
|
1861
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
1862
|
+
*/
|
|
1863
|
+
tracking: [{
|
|
1864
|
+
tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
|
|
1865
|
+
}],
|
|
1866
|
+
/**
|
|
1867
|
+
* Line Clamp
|
|
1868
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
1869
|
+
*/
|
|
1870
|
+
'line-clamp': [{
|
|
1871
|
+
'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]
|
|
1872
|
+
}],
|
|
1873
|
+
/**
|
|
1874
|
+
* Line Height
|
|
1875
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
1876
|
+
*/
|
|
1877
|
+
leading: [{
|
|
1878
|
+
leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1879
|
+
themeLeading, ...scaleUnambiguousSpacing()]
|
|
1880
|
+
}],
|
|
1881
|
+
/**
|
|
1882
|
+
* List Style Image
|
|
1883
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
1884
|
+
*/
|
|
1885
|
+
'list-image': [{
|
|
1886
|
+
'list-image': ['none', isArbitraryVariable, isArbitraryValue]
|
|
1887
|
+
}],
|
|
1888
|
+
/**
|
|
1889
|
+
* List Style Position
|
|
1890
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
1891
|
+
*/
|
|
1892
|
+
'list-style-position': [{
|
|
1893
|
+
list: ['inside', 'outside']
|
|
1894
|
+
}],
|
|
1895
|
+
/**
|
|
1896
|
+
* List Style Type
|
|
1897
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
1898
|
+
*/
|
|
1899
|
+
'list-style-type': [{
|
|
1900
|
+
list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]
|
|
1901
|
+
}],
|
|
1902
|
+
/**
|
|
1903
|
+
* Text Alignment
|
|
1904
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
1905
|
+
*/
|
|
1906
|
+
'text-alignment': [{
|
|
1907
|
+
text: ['left', 'center', 'right', 'justify', 'start', 'end']
|
|
1908
|
+
}],
|
|
1909
|
+
/**
|
|
1910
|
+
* Placeholder Color
|
|
1911
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
1912
|
+
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
1913
|
+
*/
|
|
1914
|
+
'placeholder-color': [{
|
|
1915
|
+
placeholder: scaleColor()
|
|
1916
|
+
}],
|
|
1917
|
+
/**
|
|
1918
|
+
* Text Color
|
|
1919
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
1920
|
+
*/
|
|
1921
|
+
'text-color': [{
|
|
1922
|
+
text: scaleColor()
|
|
1923
|
+
}],
|
|
1924
|
+
/**
|
|
1925
|
+
* Text Decoration
|
|
1926
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
1927
|
+
*/
|
|
1928
|
+
'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],
|
|
1929
|
+
/**
|
|
1930
|
+
* Text Decoration Style
|
|
1931
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1932
|
+
*/
|
|
1933
|
+
'text-decoration-style': [{
|
|
1934
|
+
decoration: [...scaleLineStyle(), 'wavy']
|
|
1935
|
+
}],
|
|
1936
|
+
/**
|
|
1937
|
+
* Text Decoration Thickness
|
|
1938
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1939
|
+
*/
|
|
1940
|
+
'text-decoration-thickness': [{
|
|
1941
|
+
decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]
|
|
1942
|
+
}],
|
|
1943
|
+
/**
|
|
1944
|
+
* Text Decoration Color
|
|
1945
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
1946
|
+
*/
|
|
1947
|
+
'text-decoration-color': [{
|
|
1948
|
+
decoration: scaleColor()
|
|
1949
|
+
}],
|
|
1950
|
+
/**
|
|
1951
|
+
* Text Underline Offset
|
|
1952
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1953
|
+
*/
|
|
1954
|
+
'underline-offset': [{
|
|
1955
|
+
'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]
|
|
1956
|
+
}],
|
|
1957
|
+
/**
|
|
1958
|
+
* Text Transform
|
|
1959
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
1960
|
+
*/
|
|
1961
|
+
'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
|
|
1962
|
+
/**
|
|
1963
|
+
* Text Overflow
|
|
1964
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
1965
|
+
*/
|
|
1966
|
+
'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
|
|
1967
|
+
/**
|
|
1968
|
+
* Text Wrap
|
|
1969
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
1970
|
+
*/
|
|
1971
|
+
'text-wrap': [{
|
|
1972
|
+
text: ['wrap', 'nowrap', 'balance', 'pretty']
|
|
1973
|
+
}],
|
|
1974
|
+
/**
|
|
1975
|
+
* Text Indent
|
|
1976
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
1977
|
+
*/
|
|
1978
|
+
indent: [{
|
|
1979
|
+
indent: scaleUnambiguousSpacing()
|
|
1980
|
+
}],
|
|
1981
|
+
/**
|
|
1982
|
+
* Vertical Alignment
|
|
1983
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
1984
|
+
*/
|
|
1985
|
+
'vertical-align': [{
|
|
1986
|
+
align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]
|
|
1987
|
+
}],
|
|
1988
|
+
/**
|
|
1989
|
+
* Whitespace
|
|
1990
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
1991
|
+
*/
|
|
1992
|
+
whitespace: [{
|
|
1993
|
+
whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']
|
|
1994
|
+
}],
|
|
1995
|
+
/**
|
|
1996
|
+
* Word Break
|
|
1997
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
1998
|
+
*/
|
|
1999
|
+
break: [{
|
|
2000
|
+
break: ['normal', 'words', 'all', 'keep']
|
|
2001
|
+
}],
|
|
2002
|
+
/**
|
|
2003
|
+
* Hyphens
|
|
2004
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
2005
|
+
*/
|
|
2006
|
+
hyphens: [{
|
|
2007
|
+
hyphens: ['none', 'manual', 'auto']
|
|
2008
|
+
}],
|
|
2009
|
+
/**
|
|
2010
|
+
* Content
|
|
2011
|
+
* @see https://tailwindcss.com/docs/content
|
|
2012
|
+
*/
|
|
2013
|
+
content: [{
|
|
2014
|
+
content: ['none', isArbitraryVariable, isArbitraryValue]
|
|
2015
|
+
}],
|
|
2016
|
+
// -------------------
|
|
2017
|
+
// --- Backgrounds ---
|
|
2018
|
+
// -------------------
|
|
2019
|
+
/**
|
|
2020
|
+
* Background Attachment
|
|
2021
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
2022
|
+
*/
|
|
2023
|
+
'bg-attachment': [{
|
|
2024
|
+
bg: ['fixed', 'local', 'scroll']
|
|
2025
|
+
}],
|
|
2026
|
+
/**
|
|
2027
|
+
* Background Clip
|
|
2028
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
2029
|
+
*/
|
|
2030
|
+
'bg-clip': [{
|
|
2031
|
+
'bg-clip': ['border', 'padding', 'content', 'text']
|
|
2032
|
+
}],
|
|
2033
|
+
/**
|
|
2034
|
+
* Background Origin
|
|
2035
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
2036
|
+
*/
|
|
2037
|
+
'bg-origin': [{
|
|
2038
|
+
'bg-origin': ['border', 'padding', 'content']
|
|
2039
|
+
}],
|
|
2040
|
+
/**
|
|
2041
|
+
* Background Position
|
|
2042
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
2043
|
+
*/
|
|
2044
|
+
'bg-position': [{
|
|
2045
|
+
bg: [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition]
|
|
2046
|
+
}],
|
|
2047
|
+
/**
|
|
2048
|
+
* Background Repeat
|
|
2049
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
2050
|
+
*/
|
|
2051
|
+
'bg-repeat': [{
|
|
2052
|
+
bg: ['no-repeat', {
|
|
2053
|
+
repeat: ['', 'x', 'y', 'space', 'round']
|
|
2054
|
+
}]
|
|
2055
|
+
}],
|
|
2056
|
+
/**
|
|
2057
|
+
* Background Size
|
|
2058
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
2059
|
+
*/
|
|
2060
|
+
'bg-size': [{
|
|
2061
|
+
bg: ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize]
|
|
2062
|
+
}],
|
|
2063
|
+
/**
|
|
2064
|
+
* Background Image
|
|
2065
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
2066
|
+
*/
|
|
2067
|
+
'bg-image': [{
|
|
2068
|
+
bg: ['none', {
|
|
2069
|
+
linear: [{
|
|
2070
|
+
to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
|
|
2071
|
+
}, isInteger, isArbitraryVariable, isArbitraryValue],
|
|
2072
|
+
radial: ['', isArbitraryVariable, isArbitraryValue],
|
|
2073
|
+
conic: [isInteger, isArbitraryVariable, isArbitraryValue]
|
|
2074
|
+
}, isArbitraryVariableImage, isArbitraryImage]
|
|
2075
|
+
}],
|
|
2076
|
+
/**
|
|
2077
|
+
* Background Color
|
|
2078
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
2079
|
+
*/
|
|
2080
|
+
'bg-color': [{
|
|
2081
|
+
bg: scaleColor()
|
|
2082
|
+
}],
|
|
2083
|
+
/**
|
|
2084
|
+
* Gradient Color Stops From Position
|
|
2085
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2086
|
+
*/
|
|
2087
|
+
'gradient-from-pos': [{
|
|
2088
|
+
from: scaleGradientStopPosition()
|
|
2089
|
+
}],
|
|
2090
|
+
/**
|
|
2091
|
+
* Gradient Color Stops Via Position
|
|
2092
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2093
|
+
*/
|
|
2094
|
+
'gradient-via-pos': [{
|
|
2095
|
+
via: scaleGradientStopPosition()
|
|
2096
|
+
}],
|
|
2097
|
+
/**
|
|
2098
|
+
* Gradient Color Stops To Position
|
|
2099
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2100
|
+
*/
|
|
2101
|
+
'gradient-to-pos': [{
|
|
2102
|
+
to: scaleGradientStopPosition()
|
|
2103
|
+
}],
|
|
2104
|
+
/**
|
|
2105
|
+
* Gradient Color Stops From
|
|
2106
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2107
|
+
*/
|
|
2108
|
+
'gradient-from': [{
|
|
2109
|
+
from: scaleColor()
|
|
2110
|
+
}],
|
|
2111
|
+
/**
|
|
2112
|
+
* Gradient Color Stops Via
|
|
2113
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2114
|
+
*/
|
|
2115
|
+
'gradient-via': [{
|
|
2116
|
+
via: scaleColor()
|
|
2117
|
+
}],
|
|
2118
|
+
/**
|
|
2119
|
+
* Gradient Color Stops To
|
|
2120
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2121
|
+
*/
|
|
2122
|
+
'gradient-to': [{
|
|
2123
|
+
to: scaleColor()
|
|
2124
|
+
}],
|
|
2125
|
+
// ---------------
|
|
2126
|
+
// --- Borders ---
|
|
2127
|
+
// ---------------
|
|
2128
|
+
/**
|
|
2129
|
+
* Border Radius
|
|
2130
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2131
|
+
*/
|
|
2132
|
+
rounded: [{
|
|
2133
|
+
rounded: scaleRadius()
|
|
2134
|
+
}],
|
|
2135
|
+
/**
|
|
2136
|
+
* Border Radius Start
|
|
2137
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2138
|
+
*/
|
|
2139
|
+
'rounded-s': [{
|
|
2140
|
+
'rounded-s': scaleRadius()
|
|
2141
|
+
}],
|
|
2142
|
+
/**
|
|
2143
|
+
* Border Radius End
|
|
2144
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2145
|
+
*/
|
|
2146
|
+
'rounded-e': [{
|
|
2147
|
+
'rounded-e': scaleRadius()
|
|
2148
|
+
}],
|
|
2149
|
+
/**
|
|
2150
|
+
* Border Radius Top
|
|
2151
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2152
|
+
*/
|
|
2153
|
+
'rounded-t': [{
|
|
2154
|
+
'rounded-t': scaleRadius()
|
|
2155
|
+
}],
|
|
2156
|
+
/**
|
|
2157
|
+
* Border Radius Right
|
|
2158
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2159
|
+
*/
|
|
2160
|
+
'rounded-r': [{
|
|
2161
|
+
'rounded-r': scaleRadius()
|
|
2162
|
+
}],
|
|
2163
|
+
/**
|
|
2164
|
+
* Border Radius Bottom
|
|
2165
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2166
|
+
*/
|
|
2167
|
+
'rounded-b': [{
|
|
2168
|
+
'rounded-b': scaleRadius()
|
|
2169
|
+
}],
|
|
2170
|
+
/**
|
|
2171
|
+
* Border Radius Left
|
|
2172
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2173
|
+
*/
|
|
2174
|
+
'rounded-l': [{
|
|
2175
|
+
'rounded-l': scaleRadius()
|
|
2176
|
+
}],
|
|
2177
|
+
/**
|
|
2178
|
+
* Border Radius Start Start
|
|
2179
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2180
|
+
*/
|
|
2181
|
+
'rounded-ss': [{
|
|
2182
|
+
'rounded-ss': scaleRadius()
|
|
2183
|
+
}],
|
|
2184
|
+
/**
|
|
2185
|
+
* Border Radius Start End
|
|
2186
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2187
|
+
*/
|
|
2188
|
+
'rounded-se': [{
|
|
2189
|
+
'rounded-se': scaleRadius()
|
|
2190
|
+
}],
|
|
2191
|
+
/**
|
|
2192
|
+
* Border Radius End End
|
|
2193
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2194
|
+
*/
|
|
2195
|
+
'rounded-ee': [{
|
|
2196
|
+
'rounded-ee': scaleRadius()
|
|
2197
|
+
}],
|
|
2198
|
+
/**
|
|
2199
|
+
* Border Radius End Start
|
|
2200
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2201
|
+
*/
|
|
2202
|
+
'rounded-es': [{
|
|
2203
|
+
'rounded-es': scaleRadius()
|
|
2204
|
+
}],
|
|
2205
|
+
/**
|
|
2206
|
+
* Border Radius Top Left
|
|
2207
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2208
|
+
*/
|
|
2209
|
+
'rounded-tl': [{
|
|
2210
|
+
'rounded-tl': scaleRadius()
|
|
2211
|
+
}],
|
|
2212
|
+
/**
|
|
2213
|
+
* Border Radius Top Right
|
|
2214
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2215
|
+
*/
|
|
2216
|
+
'rounded-tr': [{
|
|
2217
|
+
'rounded-tr': scaleRadius()
|
|
2218
|
+
}],
|
|
2219
|
+
/**
|
|
2220
|
+
* Border Radius Bottom Right
|
|
2221
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2222
|
+
*/
|
|
2223
|
+
'rounded-br': [{
|
|
2224
|
+
'rounded-br': scaleRadius()
|
|
2225
|
+
}],
|
|
2226
|
+
/**
|
|
2227
|
+
* Border Radius Bottom Left
|
|
2228
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2229
|
+
*/
|
|
2230
|
+
'rounded-bl': [{
|
|
2231
|
+
'rounded-bl': scaleRadius()
|
|
2232
|
+
}],
|
|
2233
|
+
/**
|
|
2234
|
+
* Border Width
|
|
2235
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2236
|
+
*/
|
|
2237
|
+
'border-w': [{
|
|
2238
|
+
border: scaleBorderWidth()
|
|
2239
|
+
}],
|
|
2240
|
+
/**
|
|
2241
|
+
* Border Width X
|
|
2242
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2243
|
+
*/
|
|
2244
|
+
'border-w-x': [{
|
|
2245
|
+
'border-x': scaleBorderWidth()
|
|
2246
|
+
}],
|
|
2247
|
+
/**
|
|
2248
|
+
* Border Width Y
|
|
2249
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2250
|
+
*/
|
|
2251
|
+
'border-w-y': [{
|
|
2252
|
+
'border-y': scaleBorderWidth()
|
|
2253
|
+
}],
|
|
2254
|
+
/**
|
|
2255
|
+
* Border Width Start
|
|
2256
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2257
|
+
*/
|
|
2258
|
+
'border-w-s': [{
|
|
2259
|
+
'border-s': scaleBorderWidth()
|
|
2260
|
+
}],
|
|
2261
|
+
/**
|
|
2262
|
+
* Border Width End
|
|
2263
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2264
|
+
*/
|
|
2265
|
+
'border-w-e': [{
|
|
2266
|
+
'border-e': scaleBorderWidth()
|
|
2267
|
+
}],
|
|
2268
|
+
/**
|
|
2269
|
+
* Border Width Top
|
|
2270
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2271
|
+
*/
|
|
2272
|
+
'border-w-t': [{
|
|
2273
|
+
'border-t': scaleBorderWidth()
|
|
2274
|
+
}],
|
|
2275
|
+
/**
|
|
2276
|
+
* Border Width Right
|
|
2277
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2278
|
+
*/
|
|
2279
|
+
'border-w-r': [{
|
|
2280
|
+
'border-r': scaleBorderWidth()
|
|
2281
|
+
}],
|
|
2282
|
+
/**
|
|
2283
|
+
* Border Width Bottom
|
|
2284
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2285
|
+
*/
|
|
2286
|
+
'border-w-b': [{
|
|
2287
|
+
'border-b': scaleBorderWidth()
|
|
2288
|
+
}],
|
|
2289
|
+
/**
|
|
2290
|
+
* Border Width Left
|
|
2291
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2292
|
+
*/
|
|
2293
|
+
'border-w-l': [{
|
|
2294
|
+
'border-l': scaleBorderWidth()
|
|
2295
|
+
}],
|
|
2296
|
+
/**
|
|
2297
|
+
* Divide Width X
|
|
2298
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2299
|
+
*/
|
|
2300
|
+
'divide-x': [{
|
|
2301
|
+
'divide-x': scaleBorderWidth()
|
|
2302
|
+
}],
|
|
2303
|
+
/**
|
|
2304
|
+
* Divide Width X Reverse
|
|
2305
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2306
|
+
*/
|
|
2307
|
+
'divide-x-reverse': ['divide-x-reverse'],
|
|
2308
|
+
/**
|
|
2309
|
+
* Divide Width Y
|
|
2310
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2311
|
+
*/
|
|
2312
|
+
'divide-y': [{
|
|
2313
|
+
'divide-y': scaleBorderWidth()
|
|
2314
|
+
}],
|
|
2315
|
+
/**
|
|
2316
|
+
* Divide Width Y Reverse
|
|
2317
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2318
|
+
*/
|
|
2319
|
+
'divide-y-reverse': ['divide-y-reverse'],
|
|
2320
|
+
/**
|
|
2321
|
+
* Border Style
|
|
2322
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
2323
|
+
*/
|
|
2324
|
+
'border-style': [{
|
|
2325
|
+
border: [...scaleLineStyle(), 'hidden', 'none']
|
|
2326
|
+
}],
|
|
2327
|
+
/**
|
|
2328
|
+
* Divide Style
|
|
2329
|
+
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
2330
|
+
*/
|
|
2331
|
+
'divide-style': [{
|
|
2332
|
+
divide: [...scaleLineStyle(), 'hidden', 'none']
|
|
2333
|
+
}],
|
|
2334
|
+
/**
|
|
2335
|
+
* Border Color
|
|
2336
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2337
|
+
*/
|
|
2338
|
+
'border-color': [{
|
|
2339
|
+
border: scaleColor()
|
|
2340
|
+
}],
|
|
2341
|
+
/**
|
|
2342
|
+
* Border Color X
|
|
2343
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2344
|
+
*/
|
|
2345
|
+
'border-color-x': [{
|
|
2346
|
+
'border-x': scaleColor()
|
|
2347
|
+
}],
|
|
2348
|
+
/**
|
|
2349
|
+
* Border Color Y
|
|
2350
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2351
|
+
*/
|
|
2352
|
+
'border-color-y': [{
|
|
2353
|
+
'border-y': scaleColor()
|
|
2354
|
+
}],
|
|
2355
|
+
/**
|
|
2356
|
+
* Border Color S
|
|
2357
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2358
|
+
*/
|
|
2359
|
+
'border-color-s': [{
|
|
2360
|
+
'border-s': scaleColor()
|
|
2361
|
+
}],
|
|
2362
|
+
/**
|
|
2363
|
+
* Border Color E
|
|
2364
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2365
|
+
*/
|
|
2366
|
+
'border-color-e': [{
|
|
2367
|
+
'border-e': scaleColor()
|
|
2368
|
+
}],
|
|
2369
|
+
/**
|
|
2370
|
+
* Border Color Top
|
|
2371
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2372
|
+
*/
|
|
2373
|
+
'border-color-t': [{
|
|
2374
|
+
'border-t': scaleColor()
|
|
2375
|
+
}],
|
|
2376
|
+
/**
|
|
2377
|
+
* Border Color Right
|
|
2378
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2379
|
+
*/
|
|
2380
|
+
'border-color-r': [{
|
|
2381
|
+
'border-r': scaleColor()
|
|
2382
|
+
}],
|
|
2383
|
+
/**
|
|
2384
|
+
* Border Color Bottom
|
|
2385
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2386
|
+
*/
|
|
2387
|
+
'border-color-b': [{
|
|
2388
|
+
'border-b': scaleColor()
|
|
2389
|
+
}],
|
|
2390
|
+
/**
|
|
2391
|
+
* Border Color Left
|
|
2392
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2393
|
+
*/
|
|
2394
|
+
'border-color-l': [{
|
|
2395
|
+
'border-l': scaleColor()
|
|
2396
|
+
}],
|
|
2397
|
+
/**
|
|
2398
|
+
* Divide Color
|
|
2399
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
2400
|
+
*/
|
|
2401
|
+
'divide-color': [{
|
|
2402
|
+
divide: scaleColor()
|
|
2403
|
+
}],
|
|
2404
|
+
/**
|
|
2405
|
+
* Outline Style
|
|
2406
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
2407
|
+
*/
|
|
2408
|
+
'outline-style': [{
|
|
2409
|
+
outline: [...scaleLineStyle(), 'none', 'hidden']
|
|
2410
|
+
}],
|
|
2411
|
+
/**
|
|
2412
|
+
* Outline Offset
|
|
2413
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
2414
|
+
*/
|
|
2415
|
+
'outline-offset': [{
|
|
2416
|
+
'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2417
|
+
}],
|
|
2418
|
+
/**
|
|
2419
|
+
* Outline Width
|
|
2420
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
2421
|
+
*/
|
|
2422
|
+
'outline-w': [{
|
|
2423
|
+
outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]
|
|
2424
|
+
}],
|
|
2425
|
+
/**
|
|
2426
|
+
* Outline Color
|
|
2427
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
2428
|
+
*/
|
|
2429
|
+
'outline-color': [{
|
|
2430
|
+
outline: [themeColor]
|
|
2431
|
+
}],
|
|
2432
|
+
// ---------------
|
|
2433
|
+
// --- Effects ---
|
|
2434
|
+
// ---------------
|
|
2435
|
+
/**
|
|
2436
|
+
* Box Shadow
|
|
2437
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
2438
|
+
*/
|
|
2439
|
+
shadow: [{
|
|
2440
|
+
shadow: [
|
|
2441
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
2442
|
+
'', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2443
|
+
}],
|
|
2444
|
+
/**
|
|
2445
|
+
* Box Shadow Color
|
|
2446
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
2447
|
+
*/
|
|
2448
|
+
'shadow-color': [{
|
|
2449
|
+
shadow: scaleColor()
|
|
2450
|
+
}],
|
|
2451
|
+
/**
|
|
2452
|
+
* Inset Box Shadow
|
|
2453
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
2454
|
+
*/
|
|
2455
|
+
'inset-shadow': [{
|
|
2456
|
+
'inset-shadow': ['none', isArbitraryVariable, isArbitraryValue, themeInsetShadow]
|
|
2457
|
+
}],
|
|
2458
|
+
/**
|
|
2459
|
+
* Inset Box Shadow Color
|
|
2460
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
2461
|
+
*/
|
|
2462
|
+
'inset-shadow-color': [{
|
|
2463
|
+
'inset-shadow': scaleColor()
|
|
2464
|
+
}],
|
|
2465
|
+
/**
|
|
2466
|
+
* Ring Width
|
|
2467
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
2468
|
+
*/
|
|
2469
|
+
'ring-w': [{
|
|
2470
|
+
ring: scaleBorderWidth()
|
|
2471
|
+
}],
|
|
2472
|
+
/**
|
|
2473
|
+
* Ring Width Inset
|
|
2474
|
+
* @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
|
|
2475
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2476
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2477
|
+
*/
|
|
2478
|
+
'ring-w-inset': ['ring-inset'],
|
|
2479
|
+
/**
|
|
2480
|
+
* Ring Color
|
|
2481
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
2482
|
+
*/
|
|
2483
|
+
'ring-color': [{
|
|
2484
|
+
ring: scaleColor()
|
|
2485
|
+
}],
|
|
2486
|
+
/**
|
|
2487
|
+
* Ring Offset Width
|
|
2488
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-width
|
|
2489
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2490
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2491
|
+
*/
|
|
2492
|
+
'ring-offset-w': [{
|
|
2493
|
+
'ring-offset': [isNumber, isArbitraryLength]
|
|
2494
|
+
}],
|
|
2495
|
+
/**
|
|
2496
|
+
* Ring Offset Color
|
|
2497
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-color
|
|
2498
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2499
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2500
|
+
*/
|
|
2501
|
+
'ring-offset-color': [{
|
|
2502
|
+
'ring-offset': scaleColor()
|
|
2503
|
+
}],
|
|
2504
|
+
/**
|
|
2505
|
+
* Inset Ring Width
|
|
2506
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
2507
|
+
*/
|
|
2508
|
+
'inset-ring-w': [{
|
|
2509
|
+
'inset-ring': scaleBorderWidth()
|
|
2510
|
+
}],
|
|
2511
|
+
/**
|
|
2512
|
+
* Inset Ring Color
|
|
2513
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
2514
|
+
*/
|
|
2515
|
+
'inset-ring-color': [{
|
|
2516
|
+
'inset-ring': scaleColor()
|
|
2517
|
+
}],
|
|
2518
|
+
/**
|
|
2519
|
+
* Opacity
|
|
2520
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
2521
|
+
*/
|
|
2522
|
+
opacity: [{
|
|
2523
|
+
opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2524
|
+
}],
|
|
2525
|
+
/**
|
|
2526
|
+
* Mix Blend Mode
|
|
2527
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2528
|
+
*/
|
|
2529
|
+
'mix-blend': [{
|
|
2530
|
+
'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']
|
|
2531
|
+
}],
|
|
2532
|
+
/**
|
|
2533
|
+
* Background Blend Mode
|
|
2534
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2535
|
+
*/
|
|
2536
|
+
'bg-blend': [{
|
|
2537
|
+
'bg-blend': scaleBlendMode()
|
|
2538
|
+
}],
|
|
2539
|
+
// ---------------
|
|
2540
|
+
// --- Filters ---
|
|
2541
|
+
// ---------------
|
|
2542
|
+
/**
|
|
2543
|
+
* Filter
|
|
2544
|
+
* @see https://tailwindcss.com/docs/filter
|
|
2545
|
+
*/
|
|
2546
|
+
filter: [{
|
|
2547
|
+
filter: [
|
|
2548
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
2549
|
+
'', 'none', isArbitraryVariable, isArbitraryValue]
|
|
2550
|
+
}],
|
|
2551
|
+
/**
|
|
2552
|
+
* Blur
|
|
2553
|
+
* @see https://tailwindcss.com/docs/blur
|
|
2554
|
+
*/
|
|
2555
|
+
blur: [{
|
|
2556
|
+
blur: scaleBlur()
|
|
2557
|
+
}],
|
|
2558
|
+
/**
|
|
2559
|
+
* Brightness
|
|
2560
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
2561
|
+
*/
|
|
2562
|
+
brightness: [{
|
|
2563
|
+
brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2564
|
+
}],
|
|
2565
|
+
/**
|
|
2566
|
+
* Contrast
|
|
2567
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
2568
|
+
*/
|
|
2569
|
+
contrast: [{
|
|
2570
|
+
contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2571
|
+
}],
|
|
2572
|
+
/**
|
|
2573
|
+
* Drop Shadow
|
|
2574
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
2575
|
+
*/
|
|
2576
|
+
'drop-shadow': [{
|
|
2577
|
+
'drop-shadow': [
|
|
2578
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
2579
|
+
'', 'none', themeDropShadow, isArbitraryVariable, isArbitraryValue]
|
|
2580
|
+
}],
|
|
2581
|
+
/**
|
|
2582
|
+
* Grayscale
|
|
2583
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
2584
|
+
*/
|
|
2585
|
+
grayscale: [{
|
|
2586
|
+
grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2587
|
+
}],
|
|
2588
|
+
/**
|
|
2589
|
+
* Hue Rotate
|
|
2590
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
2591
|
+
*/
|
|
2592
|
+
'hue-rotate': [{
|
|
2593
|
+
'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2594
|
+
}],
|
|
2595
|
+
/**
|
|
2596
|
+
* Invert
|
|
2597
|
+
* @see https://tailwindcss.com/docs/invert
|
|
2598
|
+
*/
|
|
2599
|
+
invert: [{
|
|
2600
|
+
invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2601
|
+
}],
|
|
2602
|
+
/**
|
|
2603
|
+
* Saturate
|
|
2604
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
2605
|
+
*/
|
|
2606
|
+
saturate: [{
|
|
2607
|
+
saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2608
|
+
}],
|
|
2609
|
+
/**
|
|
2610
|
+
* Sepia
|
|
2611
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
2612
|
+
*/
|
|
2613
|
+
sepia: [{
|
|
2614
|
+
sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2615
|
+
}],
|
|
2616
|
+
/**
|
|
2617
|
+
* Backdrop Filter
|
|
2618
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
2619
|
+
*/
|
|
2620
|
+
'backdrop-filter': [{
|
|
2621
|
+
'backdrop-filter': [
|
|
2622
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
2623
|
+
'', 'none', isArbitraryVariable, isArbitraryValue]
|
|
2624
|
+
}],
|
|
2625
|
+
/**
|
|
2626
|
+
* Backdrop Blur
|
|
2627
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
2628
|
+
*/
|
|
2629
|
+
'backdrop-blur': [{
|
|
2630
|
+
'backdrop-blur': scaleBlur()
|
|
2631
|
+
}],
|
|
2632
|
+
/**
|
|
2633
|
+
* Backdrop Brightness
|
|
2634
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
2635
|
+
*/
|
|
2636
|
+
'backdrop-brightness': [{
|
|
2637
|
+
'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2638
|
+
}],
|
|
2639
|
+
/**
|
|
2640
|
+
* Backdrop Contrast
|
|
2641
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
2642
|
+
*/
|
|
2643
|
+
'backdrop-contrast': [{
|
|
2644
|
+
'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2645
|
+
}],
|
|
2646
|
+
/**
|
|
2647
|
+
* Backdrop Grayscale
|
|
2648
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
2649
|
+
*/
|
|
2650
|
+
'backdrop-grayscale': [{
|
|
2651
|
+
'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2652
|
+
}],
|
|
2653
|
+
/**
|
|
2654
|
+
* Backdrop Hue Rotate
|
|
2655
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
2656
|
+
*/
|
|
2657
|
+
'backdrop-hue-rotate': [{
|
|
2658
|
+
'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2659
|
+
}],
|
|
2660
|
+
/**
|
|
2661
|
+
* Backdrop Invert
|
|
2662
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
2663
|
+
*/
|
|
2664
|
+
'backdrop-invert': [{
|
|
2665
|
+
'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2666
|
+
}],
|
|
2667
|
+
/**
|
|
2668
|
+
* Backdrop Opacity
|
|
2669
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
2670
|
+
*/
|
|
2671
|
+
'backdrop-opacity': [{
|
|
2672
|
+
'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2673
|
+
}],
|
|
2674
|
+
/**
|
|
2675
|
+
* Backdrop Saturate
|
|
2676
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
2677
|
+
*/
|
|
2678
|
+
'backdrop-saturate': [{
|
|
2679
|
+
'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2680
|
+
}],
|
|
2681
|
+
/**
|
|
2682
|
+
* Backdrop Sepia
|
|
2683
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
2684
|
+
*/
|
|
2685
|
+
'backdrop-sepia': [{
|
|
2686
|
+
'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2687
|
+
}],
|
|
2688
|
+
// --------------
|
|
2689
|
+
// --- Tables ---
|
|
2690
|
+
// --------------
|
|
2691
|
+
/**
|
|
2692
|
+
* Border Collapse
|
|
2693
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
2694
|
+
*/
|
|
2695
|
+
'border-collapse': [{
|
|
2696
|
+
border: ['collapse', 'separate']
|
|
2697
|
+
}],
|
|
2698
|
+
/**
|
|
2699
|
+
* Border Spacing
|
|
2700
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2701
|
+
*/
|
|
2702
|
+
'border-spacing': [{
|
|
2703
|
+
'border-spacing': scaleUnambiguousSpacing()
|
|
2704
|
+
}],
|
|
2705
|
+
/**
|
|
2706
|
+
* Border Spacing X
|
|
2707
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2708
|
+
*/
|
|
2709
|
+
'border-spacing-x': [{
|
|
2710
|
+
'border-spacing-x': scaleUnambiguousSpacing()
|
|
2711
|
+
}],
|
|
2712
|
+
/**
|
|
2713
|
+
* Border Spacing Y
|
|
2714
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2715
|
+
*/
|
|
2716
|
+
'border-spacing-y': [{
|
|
2717
|
+
'border-spacing-y': scaleUnambiguousSpacing()
|
|
2718
|
+
}],
|
|
2719
|
+
/**
|
|
2720
|
+
* Table Layout
|
|
2721
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
2722
|
+
*/
|
|
2723
|
+
'table-layout': [{
|
|
2724
|
+
table: ['auto', 'fixed']
|
|
2725
|
+
}],
|
|
2726
|
+
/**
|
|
2727
|
+
* Caption Side
|
|
2728
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
2729
|
+
*/
|
|
2730
|
+
caption: [{
|
|
2731
|
+
caption: ['top', 'bottom']
|
|
2732
|
+
}],
|
|
2733
|
+
// ---------------------------------
|
|
2734
|
+
// --- Transitions and Animation ---
|
|
2735
|
+
// ---------------------------------
|
|
2736
|
+
/**
|
|
2737
|
+
* Transition Property
|
|
2738
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
2739
|
+
*/
|
|
2740
|
+
transition: [{
|
|
2741
|
+
transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]
|
|
2742
|
+
}],
|
|
2743
|
+
/**
|
|
2744
|
+
* Transition Behavior
|
|
2745
|
+
* @see https://tailwindcss.com/docs/transition-behavior
|
|
2746
|
+
*/
|
|
2747
|
+
'transition-behavior': [{
|
|
2748
|
+
transition: ['normal', 'discrete']
|
|
2749
|
+
}],
|
|
2750
|
+
/**
|
|
2751
|
+
* Transition Duration
|
|
2752
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
2753
|
+
*/
|
|
2754
|
+
duration: [{
|
|
2755
|
+
duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]
|
|
2756
|
+
}],
|
|
2757
|
+
/**
|
|
2758
|
+
* Transition Timing Function
|
|
2759
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2760
|
+
*/
|
|
2761
|
+
ease: [{
|
|
2762
|
+
ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]
|
|
2763
|
+
}],
|
|
2764
|
+
/**
|
|
2765
|
+
* Transition Delay
|
|
2766
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
2767
|
+
*/
|
|
2768
|
+
delay: [{
|
|
2769
|
+
delay: [isNumber, isArbitraryVariable, isArbitraryValue]
|
|
2770
|
+
}],
|
|
2771
|
+
/**
|
|
2772
|
+
* Animation
|
|
2773
|
+
* @see https://tailwindcss.com/docs/animation
|
|
2774
|
+
*/
|
|
2775
|
+
animate: [{
|
|
2776
|
+
animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]
|
|
2777
|
+
}],
|
|
2778
|
+
// ------------------
|
|
2779
|
+
// --- Transforms ---
|
|
2780
|
+
// ------------------
|
|
2781
|
+
/**
|
|
2782
|
+
* Backface Visibility
|
|
2783
|
+
* @see https://tailwindcss.com/docs/backface-visibility
|
|
2784
|
+
*/
|
|
2785
|
+
backface: [{
|
|
2786
|
+
backface: ['hidden', 'visible']
|
|
2787
|
+
}],
|
|
2788
|
+
/**
|
|
2789
|
+
* Perspective
|
|
2790
|
+
* @see https://tailwindcss.com/docs/perspective
|
|
2791
|
+
*/
|
|
2792
|
+
perspective: [{
|
|
2793
|
+
perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
|
|
2794
|
+
}],
|
|
2795
|
+
/**
|
|
2796
|
+
* Perspective Origin
|
|
2797
|
+
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2798
|
+
*/
|
|
2799
|
+
'perspective-origin': [{
|
|
2800
|
+
'perspective-origin': scaleOrigin()
|
|
2801
|
+
}],
|
|
2802
|
+
/**
|
|
2803
|
+
* Rotate
|
|
2804
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2805
|
+
*/
|
|
2806
|
+
rotate: [{
|
|
2807
|
+
rotate: scaleRotate()
|
|
2808
|
+
}],
|
|
2809
|
+
/**
|
|
2810
|
+
* Rotate X
|
|
2811
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2812
|
+
*/
|
|
2813
|
+
'rotate-x': [{
|
|
2814
|
+
'rotate-x': scaleRotate()
|
|
2815
|
+
}],
|
|
2816
|
+
/**
|
|
2817
|
+
* Rotate Y
|
|
2818
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2819
|
+
*/
|
|
2820
|
+
'rotate-y': [{
|
|
2821
|
+
'rotate-y': scaleRotate()
|
|
2822
|
+
}],
|
|
2823
|
+
/**
|
|
2824
|
+
* Rotate Z
|
|
2825
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2826
|
+
*/
|
|
2827
|
+
'rotate-z': [{
|
|
2828
|
+
'rotate-z': scaleRotate()
|
|
2829
|
+
}],
|
|
2830
|
+
/**
|
|
2831
|
+
* Scale
|
|
2832
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2833
|
+
*/
|
|
2834
|
+
scale: [{
|
|
2835
|
+
scale: scaleScale()
|
|
2836
|
+
}],
|
|
2837
|
+
/**
|
|
2838
|
+
* Scale X
|
|
2839
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2840
|
+
*/
|
|
2841
|
+
'scale-x': [{
|
|
2842
|
+
'scale-x': scaleScale()
|
|
2843
|
+
}],
|
|
2844
|
+
/**
|
|
2845
|
+
* Scale Y
|
|
2846
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2847
|
+
*/
|
|
2848
|
+
'scale-y': [{
|
|
2849
|
+
'scale-y': scaleScale()
|
|
2850
|
+
}],
|
|
2851
|
+
/**
|
|
2852
|
+
* Scale Z
|
|
2853
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2854
|
+
*/
|
|
2855
|
+
'scale-z': [{
|
|
2856
|
+
'scale-z': scaleScale()
|
|
2857
|
+
}],
|
|
2858
|
+
/**
|
|
2859
|
+
* Scale 3D
|
|
2860
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2861
|
+
*/
|
|
2862
|
+
'scale-3d': ['scale-3d'],
|
|
2863
|
+
/**
|
|
2864
|
+
* Skew
|
|
2865
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2866
|
+
*/
|
|
2867
|
+
skew: [{
|
|
2868
|
+
skew: scaleSkew()
|
|
2869
|
+
}],
|
|
2870
|
+
/**
|
|
2871
|
+
* Skew X
|
|
2872
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2873
|
+
*/
|
|
2874
|
+
'skew-x': [{
|
|
2875
|
+
'skew-x': scaleSkew()
|
|
2876
|
+
}],
|
|
2877
|
+
/**
|
|
2878
|
+
* Skew Y
|
|
2879
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2880
|
+
*/
|
|
2881
|
+
'skew-y': [{
|
|
2882
|
+
'skew-y': scaleSkew()
|
|
2883
|
+
}],
|
|
2884
|
+
/**
|
|
2885
|
+
* Transform
|
|
2886
|
+
* @see https://tailwindcss.com/docs/transform
|
|
2887
|
+
*/
|
|
2888
|
+
transform: [{
|
|
2889
|
+
transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']
|
|
2890
|
+
}],
|
|
2891
|
+
/**
|
|
2892
|
+
* Transform Origin
|
|
2893
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
2894
|
+
*/
|
|
2895
|
+
'transform-origin': [{
|
|
2896
|
+
origin: scaleOrigin()
|
|
2897
|
+
}],
|
|
2898
|
+
/**
|
|
2899
|
+
* Transform Style
|
|
2900
|
+
* @see https://tailwindcss.com/docs/transform-style
|
|
2901
|
+
*/
|
|
2902
|
+
'transform-style': [{
|
|
2903
|
+
transform: ['3d', 'flat']
|
|
2904
|
+
}],
|
|
2905
|
+
/**
|
|
2906
|
+
* Translate
|
|
2907
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2908
|
+
*/
|
|
2909
|
+
translate: [{
|
|
2910
|
+
translate: scaleTranslate()
|
|
2911
|
+
}],
|
|
2912
|
+
/**
|
|
2913
|
+
* Translate X
|
|
2914
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2915
|
+
*/
|
|
2916
|
+
'translate-x': [{
|
|
2917
|
+
'translate-x': scaleTranslate()
|
|
2918
|
+
}],
|
|
2919
|
+
/**
|
|
2920
|
+
* Translate Y
|
|
2921
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2922
|
+
*/
|
|
2923
|
+
'translate-y': [{
|
|
2924
|
+
'translate-y': scaleTranslate()
|
|
2925
|
+
}],
|
|
2926
|
+
/**
|
|
2927
|
+
* Translate Z
|
|
2928
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2929
|
+
*/
|
|
2930
|
+
'translate-z': [{
|
|
2931
|
+
'translate-z': scaleTranslate()
|
|
2932
|
+
}],
|
|
2933
|
+
/**
|
|
2934
|
+
* Translate None
|
|
2935
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2936
|
+
*/
|
|
2937
|
+
'translate-none': ['translate-none'],
|
|
2938
|
+
// ---------------------
|
|
2939
|
+
// --- Interactivity ---
|
|
2940
|
+
// ---------------------
|
|
2941
|
+
/**
|
|
2942
|
+
* Accent Color
|
|
2943
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
2944
|
+
*/
|
|
2945
|
+
accent: [{
|
|
2946
|
+
accent: scaleColor()
|
|
2947
|
+
}],
|
|
2948
|
+
/**
|
|
2949
|
+
* Appearance
|
|
2950
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
2951
|
+
*/
|
|
2952
|
+
appearance: [{
|
|
2953
|
+
appearance: ['none', 'auto']
|
|
2954
|
+
}],
|
|
2955
|
+
/**
|
|
2956
|
+
* Caret Color
|
|
2957
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
2958
|
+
*/
|
|
2959
|
+
'caret-color': [{
|
|
2960
|
+
caret: scaleColor()
|
|
2961
|
+
}],
|
|
2962
|
+
/**
|
|
2963
|
+
* Color Scheme
|
|
2964
|
+
* @see https://tailwindcss.com/docs/color-scheme
|
|
2965
|
+
*/
|
|
2966
|
+
'color-scheme': [{
|
|
2967
|
+
scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']
|
|
2968
|
+
}],
|
|
2969
|
+
/**
|
|
2970
|
+
* Cursor
|
|
2971
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
2972
|
+
*/
|
|
2973
|
+
cursor: [{
|
|
2974
|
+
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]
|
|
2975
|
+
}],
|
|
2976
|
+
/**
|
|
2977
|
+
* Field Sizing
|
|
2978
|
+
* @see https://tailwindcss.com/docs/field-sizing
|
|
2979
|
+
*/
|
|
2980
|
+
'field-sizing': [{
|
|
2981
|
+
'field-sizing': ['fixed', 'content']
|
|
2982
|
+
}],
|
|
2983
|
+
/**
|
|
2984
|
+
* Pointer Events
|
|
2985
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
2986
|
+
*/
|
|
2987
|
+
'pointer-events': [{
|
|
2988
|
+
'pointer-events': ['auto', 'none']
|
|
2989
|
+
}],
|
|
2990
|
+
/**
|
|
2991
|
+
* Resize
|
|
2992
|
+
* @see https://tailwindcss.com/docs/resize
|
|
2993
|
+
*/
|
|
2994
|
+
resize: [{
|
|
2995
|
+
resize: ['none', '', 'y', 'x']
|
|
2996
|
+
}],
|
|
2997
|
+
/**
|
|
2998
|
+
* Scroll Behavior
|
|
2999
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
3000
|
+
*/
|
|
3001
|
+
'scroll-behavior': [{
|
|
3002
|
+
scroll: ['auto', 'smooth']
|
|
3003
|
+
}],
|
|
3004
|
+
/**
|
|
3005
|
+
* Scroll Margin
|
|
3006
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3007
|
+
*/
|
|
3008
|
+
'scroll-m': [{
|
|
3009
|
+
'scroll-m': scaleUnambiguousSpacing()
|
|
3010
|
+
}],
|
|
3011
|
+
/**
|
|
3012
|
+
* Scroll Margin X
|
|
3013
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3014
|
+
*/
|
|
3015
|
+
'scroll-mx': [{
|
|
3016
|
+
'scroll-mx': scaleUnambiguousSpacing()
|
|
3017
|
+
}],
|
|
3018
|
+
/**
|
|
3019
|
+
* Scroll Margin Y
|
|
3020
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3021
|
+
*/
|
|
3022
|
+
'scroll-my': [{
|
|
3023
|
+
'scroll-my': scaleUnambiguousSpacing()
|
|
3024
|
+
}],
|
|
3025
|
+
/**
|
|
3026
|
+
* Scroll Margin Start
|
|
3027
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3028
|
+
*/
|
|
3029
|
+
'scroll-ms': [{
|
|
3030
|
+
'scroll-ms': scaleUnambiguousSpacing()
|
|
3031
|
+
}],
|
|
3032
|
+
/**
|
|
3033
|
+
* Scroll Margin End
|
|
3034
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3035
|
+
*/
|
|
3036
|
+
'scroll-me': [{
|
|
3037
|
+
'scroll-me': scaleUnambiguousSpacing()
|
|
3038
|
+
}],
|
|
3039
|
+
/**
|
|
3040
|
+
* Scroll Margin Top
|
|
3041
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3042
|
+
*/
|
|
3043
|
+
'scroll-mt': [{
|
|
3044
|
+
'scroll-mt': scaleUnambiguousSpacing()
|
|
3045
|
+
}],
|
|
3046
|
+
/**
|
|
3047
|
+
* Scroll Margin Right
|
|
3048
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3049
|
+
*/
|
|
3050
|
+
'scroll-mr': [{
|
|
3051
|
+
'scroll-mr': scaleUnambiguousSpacing()
|
|
3052
|
+
}],
|
|
3053
|
+
/**
|
|
3054
|
+
* Scroll Margin Bottom
|
|
3055
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3056
|
+
*/
|
|
3057
|
+
'scroll-mb': [{
|
|
3058
|
+
'scroll-mb': scaleUnambiguousSpacing()
|
|
3059
|
+
}],
|
|
3060
|
+
/**
|
|
3061
|
+
* Scroll Margin Left
|
|
3062
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3063
|
+
*/
|
|
3064
|
+
'scroll-ml': [{
|
|
3065
|
+
'scroll-ml': scaleUnambiguousSpacing()
|
|
3066
|
+
}],
|
|
3067
|
+
/**
|
|
3068
|
+
* Scroll Padding
|
|
3069
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3070
|
+
*/
|
|
3071
|
+
'scroll-p': [{
|
|
3072
|
+
'scroll-p': scaleUnambiguousSpacing()
|
|
3073
|
+
}],
|
|
3074
|
+
/**
|
|
3075
|
+
* Scroll Padding X
|
|
3076
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3077
|
+
*/
|
|
3078
|
+
'scroll-px': [{
|
|
3079
|
+
'scroll-px': scaleUnambiguousSpacing()
|
|
3080
|
+
}],
|
|
3081
|
+
/**
|
|
3082
|
+
* Scroll Padding Y
|
|
3083
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3084
|
+
*/
|
|
3085
|
+
'scroll-py': [{
|
|
3086
|
+
'scroll-py': scaleUnambiguousSpacing()
|
|
3087
|
+
}],
|
|
3088
|
+
/**
|
|
3089
|
+
* Scroll Padding Start
|
|
3090
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3091
|
+
*/
|
|
3092
|
+
'scroll-ps': [{
|
|
3093
|
+
'scroll-ps': scaleUnambiguousSpacing()
|
|
3094
|
+
}],
|
|
3095
|
+
/**
|
|
3096
|
+
* Scroll Padding End
|
|
3097
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3098
|
+
*/
|
|
3099
|
+
'scroll-pe': [{
|
|
3100
|
+
'scroll-pe': scaleUnambiguousSpacing()
|
|
3101
|
+
}],
|
|
3102
|
+
/**
|
|
3103
|
+
* Scroll Padding Top
|
|
3104
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3105
|
+
*/
|
|
3106
|
+
'scroll-pt': [{
|
|
3107
|
+
'scroll-pt': scaleUnambiguousSpacing()
|
|
3108
|
+
}],
|
|
3109
|
+
/**
|
|
3110
|
+
* Scroll Padding Right
|
|
3111
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3112
|
+
*/
|
|
3113
|
+
'scroll-pr': [{
|
|
3114
|
+
'scroll-pr': scaleUnambiguousSpacing()
|
|
3115
|
+
}],
|
|
3116
|
+
/**
|
|
3117
|
+
* Scroll Padding Bottom
|
|
3118
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3119
|
+
*/
|
|
3120
|
+
'scroll-pb': [{
|
|
3121
|
+
'scroll-pb': scaleUnambiguousSpacing()
|
|
3122
|
+
}],
|
|
3123
|
+
/**
|
|
3124
|
+
* Scroll Padding Left
|
|
3125
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3126
|
+
*/
|
|
3127
|
+
'scroll-pl': [{
|
|
3128
|
+
'scroll-pl': scaleUnambiguousSpacing()
|
|
3129
|
+
}],
|
|
3130
|
+
/**
|
|
3131
|
+
* Scroll Snap Align
|
|
3132
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
3133
|
+
*/
|
|
3134
|
+
'snap-align': [{
|
|
3135
|
+
snap: ['start', 'end', 'center', 'align-none']
|
|
3136
|
+
}],
|
|
3137
|
+
/**
|
|
3138
|
+
* Scroll Snap Stop
|
|
3139
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
3140
|
+
*/
|
|
3141
|
+
'snap-stop': [{
|
|
3142
|
+
snap: ['normal', 'always']
|
|
3143
|
+
}],
|
|
3144
|
+
/**
|
|
3145
|
+
* Scroll Snap Type
|
|
3146
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
3147
|
+
*/
|
|
3148
|
+
'snap-type': [{
|
|
3149
|
+
snap: ['none', 'x', 'y', 'both']
|
|
3150
|
+
}],
|
|
3151
|
+
/**
|
|
3152
|
+
* Scroll Snap Type Strictness
|
|
3153
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
3154
|
+
*/
|
|
3155
|
+
'snap-strictness': [{
|
|
3156
|
+
snap: ['mandatory', 'proximity']
|
|
3157
|
+
}],
|
|
3158
|
+
/**
|
|
3159
|
+
* Touch Action
|
|
3160
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3161
|
+
*/
|
|
3162
|
+
touch: [{
|
|
3163
|
+
touch: ['auto', 'none', 'manipulation']
|
|
3164
|
+
}],
|
|
3165
|
+
/**
|
|
3166
|
+
* Touch Action X
|
|
3167
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3168
|
+
*/
|
|
3169
|
+
'touch-x': [{
|
|
3170
|
+
'touch-pan': ['x', 'left', 'right']
|
|
3171
|
+
}],
|
|
3172
|
+
/**
|
|
3173
|
+
* Touch Action Y
|
|
3174
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3175
|
+
*/
|
|
3176
|
+
'touch-y': [{
|
|
3177
|
+
'touch-pan': ['y', 'up', 'down']
|
|
3178
|
+
}],
|
|
3179
|
+
/**
|
|
3180
|
+
* Touch Action Pinch Zoom
|
|
3181
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3182
|
+
*/
|
|
3183
|
+
'touch-pz': ['touch-pinch-zoom'],
|
|
3184
|
+
/**
|
|
3185
|
+
* User Select
|
|
3186
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
3187
|
+
*/
|
|
3188
|
+
select: [{
|
|
3189
|
+
select: ['none', 'text', 'all', 'auto']
|
|
3190
|
+
}],
|
|
3191
|
+
/**
|
|
3192
|
+
* Will Change
|
|
3193
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
3194
|
+
*/
|
|
3195
|
+
'will-change': [{
|
|
3196
|
+
'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]
|
|
3197
|
+
}],
|
|
3198
|
+
// -----------
|
|
3199
|
+
// --- SVG ---
|
|
3200
|
+
// -----------
|
|
3201
|
+
/**
|
|
3202
|
+
* Fill
|
|
3203
|
+
* @see https://tailwindcss.com/docs/fill
|
|
3204
|
+
*/
|
|
3205
|
+
fill: [{
|
|
3206
|
+
fill: ['none', ...scaleColor()]
|
|
3207
|
+
}],
|
|
3208
|
+
/**
|
|
3209
|
+
* Stroke Width
|
|
3210
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
3211
|
+
*/
|
|
3212
|
+
'stroke-w': [{
|
|
3213
|
+
stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
|
|
3214
|
+
}],
|
|
3215
|
+
/**
|
|
3216
|
+
* Stroke
|
|
3217
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
3218
|
+
*/
|
|
3219
|
+
stroke: [{
|
|
3220
|
+
stroke: ['none', ...scaleColor()]
|
|
3221
|
+
}],
|
|
3222
|
+
// ---------------------
|
|
3223
|
+
// --- Accessibility ---
|
|
3224
|
+
// ---------------------
|
|
3225
|
+
/**
|
|
3226
|
+
* Forced Color Adjust
|
|
3227
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
3228
|
+
*/
|
|
3229
|
+
'forced-color-adjust': [{
|
|
3230
|
+
'forced-color-adjust': ['auto', 'none']
|
|
3231
|
+
}]
|
|
3232
|
+
},
|
|
3233
|
+
conflictingClassGroups: {
|
|
3234
|
+
overflow: ['overflow-x', 'overflow-y'],
|
|
3235
|
+
overscroll: ['overscroll-x', 'overscroll-y'],
|
|
3236
|
+
inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
|
|
3237
|
+
'inset-x': ['right', 'left'],
|
|
3238
|
+
'inset-y': ['top', 'bottom'],
|
|
3239
|
+
flex: ['basis', 'grow', 'shrink'],
|
|
3240
|
+
gap: ['gap-x', 'gap-y'],
|
|
3241
|
+
p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
|
|
3242
|
+
px: ['pr', 'pl'],
|
|
3243
|
+
py: ['pt', 'pb'],
|
|
3244
|
+
m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
|
|
3245
|
+
mx: ['mr', 'ml'],
|
|
3246
|
+
my: ['mt', 'mb'],
|
|
3247
|
+
size: ['w', 'h'],
|
|
3248
|
+
'font-size': ['leading'],
|
|
3249
|
+
'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
|
|
3250
|
+
'fvn-ordinal': ['fvn-normal'],
|
|
3251
|
+
'fvn-slashed-zero': ['fvn-normal'],
|
|
3252
|
+
'fvn-figure': ['fvn-normal'],
|
|
3253
|
+
'fvn-spacing': ['fvn-normal'],
|
|
3254
|
+
'fvn-fraction': ['fvn-normal'],
|
|
3255
|
+
'line-clamp': ['display', 'overflow'],
|
|
3256
|
+
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'],
|
|
3257
|
+
'rounded-s': ['rounded-ss', 'rounded-es'],
|
|
3258
|
+
'rounded-e': ['rounded-se', 'rounded-ee'],
|
|
3259
|
+
'rounded-t': ['rounded-tl', 'rounded-tr'],
|
|
3260
|
+
'rounded-r': ['rounded-tr', 'rounded-br'],
|
|
3261
|
+
'rounded-b': ['rounded-br', 'rounded-bl'],
|
|
3262
|
+
'rounded-l': ['rounded-tl', 'rounded-bl'],
|
|
3263
|
+
'border-spacing': ['border-spacing-x', 'border-spacing-y'],
|
|
3264
|
+
'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
|
3265
|
+
'border-w-x': ['border-w-r', 'border-w-l'],
|
|
3266
|
+
'border-w-y': ['border-w-t', 'border-w-b'],
|
|
3267
|
+
'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
|
3268
|
+
'border-color-x': ['border-color-r', 'border-color-l'],
|
|
3269
|
+
'border-color-y': ['border-color-t', 'border-color-b'],
|
|
3270
|
+
translate: ['translate-x', 'translate-y', 'translate-none'],
|
|
3271
|
+
'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
|
|
3272
|
+
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
|
|
3273
|
+
'scroll-mx': ['scroll-mr', 'scroll-ml'],
|
|
3274
|
+
'scroll-my': ['scroll-mt', 'scroll-mb'],
|
|
3275
|
+
'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
|
|
3276
|
+
'scroll-px': ['scroll-pr', 'scroll-pl'],
|
|
3277
|
+
'scroll-py': ['scroll-pt', 'scroll-pb'],
|
|
3278
|
+
touch: ['touch-x', 'touch-y', 'touch-pz'],
|
|
3279
|
+
'touch-x': ['touch'],
|
|
3280
|
+
'touch-y': ['touch'],
|
|
3281
|
+
'touch-pz': ['touch']
|
|
3282
|
+
},
|
|
3283
|
+
conflictingClassGroupModifiers: {
|
|
3284
|
+
'font-size': ['leading']
|
|
3285
|
+
},
|
|
3286
|
+
orderSensitiveModifiers: ['before', 'after', 'placeholder', 'file', 'marker', 'selection', 'first-line', 'first-letter', 'backdrop', '*', '**']
|
|
3287
|
+
};
|
|
3288
|
+
};
|
|
3289
|
+
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
|
|
3290
|
+
|
|
622
3291
|
class ComponentTheme {
|
|
623
3292
|
constructor(tag, base, subThemes, defaults = {}) {
|
|
624
3293
|
this.tag = tag;
|
|
@@ -630,6 +3299,7 @@ class ComponentTheme {
|
|
|
630
3299
|
items: new ItemsTheme(),
|
|
631
3300
|
justify: new JustifyTheme(),
|
|
632
3301
|
position: new PositionTheme(),
|
|
3302
|
+
display: new DisplayTheme()
|
|
633
3303
|
},
|
|
634
3304
|
typography: {
|
|
635
3305
|
fontFamily: new FontFamilyTheme(),
|
|
@@ -663,6 +3333,22 @@ class ComponentTheme {
|
|
|
663
3333
|
walk(this.themes);
|
|
664
3334
|
return classes.filter(Boolean);
|
|
665
3335
|
}
|
|
3336
|
+
getComponentConfig(props, propsToOmit = []) {
|
|
3337
|
+
var _a;
|
|
3338
|
+
const cleanProps = { ...props };
|
|
3339
|
+
for (const k of propsToOmit) {
|
|
3340
|
+
delete cleanProps[k];
|
|
3341
|
+
}
|
|
3342
|
+
const { className, tag, ...other } = cleanProps;
|
|
3343
|
+
const componentTag = (_a = tag !== null && tag !== void 0 ? tag : this.tag) !== null && _a !== void 0 ? _a : "div";
|
|
3344
|
+
const themeGeneratedClasses = this.getClasses(props);
|
|
3345
|
+
const finalClasses = twMerge(...themeGeneratedClasses, className);
|
|
3346
|
+
return {
|
|
3347
|
+
Tag: componentTag,
|
|
3348
|
+
finalClasses,
|
|
3349
|
+
finalProps: other,
|
|
3350
|
+
};
|
|
3351
|
+
}
|
|
666
3352
|
}
|
|
667
3353
|
|
|
668
3354
|
class SizeTheme extends BaseTheme {
|
|
@@ -728,7 +3414,13 @@ class RadiusTheme extends BaseTheme {
|
|
|
728
3414
|
RadiusTheme.defaultClasses = {
|
|
729
3415
|
pill: "rounded-full",
|
|
730
3416
|
sharp: "rounded-none",
|
|
731
|
-
rounded:
|
|
3417
|
+
rounded: {
|
|
3418
|
+
xs: "rounded-sm",
|
|
3419
|
+
sm: "rounded-md",
|
|
3420
|
+
md: "rounded-lg",
|
|
3421
|
+
lg: "rounded-xl",
|
|
3422
|
+
xl: "rounded-2xl",
|
|
3423
|
+
}
|
|
732
3424
|
};
|
|
733
3425
|
|
|
734
3426
|
class ShadowTheme extends BaseTheme {
|
|
@@ -753,11 +3445,33 @@ class ShadowTheme extends BaseTheme {
|
|
|
753
3445
|
}
|
|
754
3446
|
ShadowTheme.defaultClasses = {
|
|
755
3447
|
shadow: {
|
|
756
|
-
base:
|
|
757
|
-
|
|
758
|
-
|
|
3448
|
+
base: {
|
|
3449
|
+
xs: "shadow-2xs",
|
|
3450
|
+
sm: "shadow-xs",
|
|
3451
|
+
md: "shadow-sm",
|
|
3452
|
+
lg: "shadow-md",
|
|
3453
|
+
xl: "shadow-lg"
|
|
3454
|
+
},
|
|
3455
|
+
hover: {
|
|
3456
|
+
xs: "hover:shadow-xs",
|
|
3457
|
+
sm: "hover:shadow-sm",
|
|
3458
|
+
md: "hover:shadow-md",
|
|
3459
|
+
lg: "hover:shadow-lg",
|
|
3460
|
+
xl: "hover:shadow-xl"
|
|
3461
|
+
},
|
|
3462
|
+
active: {
|
|
3463
|
+
xs: "active:shadow-xs",
|
|
3464
|
+
sm: "active:shadow-sm",
|
|
3465
|
+
md: "active:shadow-md",
|
|
3466
|
+
lg: "active:shadow-lg",
|
|
3467
|
+
xl: "active:shadow-xl"
|
|
3468
|
+
},
|
|
759
3469
|
},
|
|
760
|
-
noShadow:
|
|
3470
|
+
noShadow: {
|
|
3471
|
+
base: "shadow-none",
|
|
3472
|
+
hover: "hover:shadow-none",
|
|
3473
|
+
active: "active:shadow-none",
|
|
3474
|
+
}
|
|
761
3475
|
};
|
|
762
3476
|
|
|
763
3477
|
class BorderTheme extends BaseTheme {
|
|
@@ -815,8 +3529,16 @@ class RingTheme extends BaseTheme {
|
|
|
815
3529
|
}
|
|
816
3530
|
}
|
|
817
3531
|
RingTheme.defaultClasses = {
|
|
818
|
-
ring:
|
|
819
|
-
|
|
3532
|
+
ring: {
|
|
3533
|
+
base: "ring ring-inset",
|
|
3534
|
+
hover: "hover:ring hover:ring-inset",
|
|
3535
|
+
active: "active:ring active:ring-inset",
|
|
3536
|
+
},
|
|
3537
|
+
noRing: {
|
|
3538
|
+
base: "ring-0",
|
|
3539
|
+
hover: "hover:ring-0",
|
|
3540
|
+
active: "active:ring-0",
|
|
3541
|
+
},
|
|
820
3542
|
};
|
|
821
3543
|
|
|
822
3544
|
class PxTheme extends BaseTheme {
|
|
@@ -1023,7 +3745,7 @@ const layoutBackgroundAppearanceClasses = {
|
|
|
1023
3745
|
info: "bg-(--layout-background-info)",
|
|
1024
3746
|
transparent: "bg-transparent",
|
|
1025
3747
|
};
|
|
1026
|
-
const
|
|
3748
|
+
const bgBorderAppearanceClasses = {
|
|
1027
3749
|
default: "bg-(--border-color-default)",
|
|
1028
3750
|
primary: "bg-(--border-color-primary)",
|
|
1029
3751
|
secondary: "bg-(--border-color-secondary)",
|
|
@@ -1156,7 +3878,7 @@ VariantTheme.defaultInstances = Object.fromEntries(VARIANT_KEYS.map(variantKey =
|
|
|
1156
3878
|
new TextAppearanceTheme()
|
|
1157
3879
|
]));
|
|
1158
3880
|
|
|
1159
|
-
const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer
|
|
3881
|
+
const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
|
|
1160
3882
|
size: {
|
|
1161
3883
|
px: new PxTheme({
|
|
1162
3884
|
padding: {
|
|
@@ -1215,6 +3937,9 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
1215
3937
|
},
|
|
1216
3938
|
}, {
|
|
1217
3939
|
md: true,
|
|
3940
|
+
inlineFlex: true,
|
|
3941
|
+
itemsCenter: true,
|
|
3942
|
+
justifyCenter: true,
|
|
1218
3943
|
outline: true,
|
|
1219
3944
|
default: true,
|
|
1220
3945
|
rounded: true,
|
|
@@ -1228,7 +3953,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
1228
3953
|
shadow: true,
|
|
1229
3954
|
});
|
|
1230
3955
|
|
|
1231
|
-
const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit
|
|
3956
|
+
const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
1232
3957
|
size: {
|
|
1233
3958
|
px: new PxTheme({
|
|
1234
3959
|
padding: {
|
|
@@ -1294,6 +4019,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit inline-flex tr
|
|
|
1294
4019
|
},
|
|
1295
4020
|
}, {
|
|
1296
4021
|
md: true,
|
|
4022
|
+
inlineFlex: true,
|
|
1297
4023
|
outline: true,
|
|
1298
4024
|
pill: true,
|
|
1299
4025
|
sans: true,
|
|
@@ -1306,7 +4032,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit inline-flex tr
|
|
|
1306
4032
|
ring: true,
|
|
1307
4033
|
});
|
|
1308
4034
|
|
|
1309
|
-
const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit
|
|
4035
|
+
const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
1310
4036
|
size: {
|
|
1311
4037
|
px: new PxTheme({
|
|
1312
4038
|
padding: {
|
|
@@ -1372,6 +4098,8 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit inline-flex gap
|
|
|
1372
4098
|
},
|
|
1373
4099
|
}, {
|
|
1374
4100
|
md: true,
|
|
4101
|
+
inlineFlex: true,
|
|
4102
|
+
itemsCenter: true,
|
|
1375
4103
|
outline: true,
|
|
1376
4104
|
secondary: true,
|
|
1377
4105
|
rounded: true,
|
|
@@ -1475,7 +4203,11 @@ class WrapTheme extends BaseTheme {
|
|
|
1475
4203
|
return key ? [this[key]] : [];
|
|
1476
4204
|
}
|
|
1477
4205
|
}
|
|
1478
|
-
WrapTheme.defaultClasses =
|
|
4206
|
+
WrapTheme.defaultClasses = {
|
|
4207
|
+
flexWrap: "flex-wrap",
|
|
4208
|
+
flexNoWrap: "flex-nowrap",
|
|
4209
|
+
flexWrapReverse: "flex-wrap-reverse"
|
|
4210
|
+
};
|
|
1479
4211
|
|
|
1480
4212
|
const commonGaps = {
|
|
1481
4213
|
xs: 'gap-2',
|
|
@@ -1552,9 +4284,15 @@ class BreakpointTheme extends BaseTheme {
|
|
|
1552
4284
|
return [this[key] || ''];
|
|
1553
4285
|
}
|
|
1554
4286
|
}
|
|
1555
|
-
BreakpointTheme.defaultClasses =
|
|
4287
|
+
BreakpointTheme.defaultClasses = {
|
|
4288
|
+
xsCol: "max-xs:flex-col",
|
|
4289
|
+
smCol: "max-sm:flex-col",
|
|
4290
|
+
mdCol: "max-md:flex-col",
|
|
4291
|
+
lgCol: "max-lg:flex-col",
|
|
4292
|
+
xlCol: "max-xl:flex-col"
|
|
4293
|
+
};
|
|
1556
4294
|
|
|
1557
|
-
const defaultCardTheme = new ComponentTheme("div", "
|
|
4295
|
+
const defaultCardTheme = new ComponentTheme("div", "overflow-hidden", {
|
|
1558
4296
|
size: {
|
|
1559
4297
|
px: new PxTheme({
|
|
1560
4298
|
padding: {
|
|
@@ -1603,6 +4341,7 @@ const defaultCardTheme = new ComponentTheme("div", "flex overflow-hidden", {
|
|
|
1603
4341
|
}
|
|
1604
4342
|
}, {
|
|
1605
4343
|
md: true,
|
|
4344
|
+
flex: true,
|
|
1606
4345
|
default: true,
|
|
1607
4346
|
rounded: true,
|
|
1608
4347
|
normal: true,
|
|
@@ -1612,7 +4351,7 @@ const defaultCardTheme = new ComponentTheme("div", "flex overflow-hidden", {
|
|
|
1612
4351
|
padding: true,
|
|
1613
4352
|
});
|
|
1614
4353
|
|
|
1615
|
-
const defaultRowTheme = new ComponentTheme("div", "flex
|
|
4354
|
+
const defaultRowTheme = new ComponentTheme("div", "flex-row", {
|
|
1616
4355
|
size: {
|
|
1617
4356
|
gap: new GapTheme({ gap: commonGaps }),
|
|
1618
4357
|
breakpoint: new BreakpointTheme(),
|
|
@@ -1622,6 +4361,7 @@ const defaultRowTheme = new ComponentTheme("div", "flex flex-row", {
|
|
|
1622
4361
|
},
|
|
1623
4362
|
}, {
|
|
1624
4363
|
md: true,
|
|
4364
|
+
flex: true,
|
|
1625
4365
|
transparent: true,
|
|
1626
4366
|
itemsCenter: true,
|
|
1627
4367
|
gap: true,
|
|
@@ -1630,7 +4370,7 @@ const defaultRowTheme = new ComponentTheme("div", "flex flex-row", {
|
|
|
1630
4370
|
const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
|
|
1631
4371
|
appearance: {
|
|
1632
4372
|
background: TextAppearanceTheme.createDefaultStyle({
|
|
1633
|
-
base:
|
|
4373
|
+
base: bgBorderAppearanceClasses,
|
|
1634
4374
|
}),
|
|
1635
4375
|
}
|
|
1636
4376
|
}, {
|
|
@@ -1638,7 +4378,7 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
|
|
|
1638
4378
|
default: true,
|
|
1639
4379
|
});
|
|
1640
4380
|
|
|
1641
|
-
const defaultContainerTheme = new ComponentTheme("div", "flex
|
|
4381
|
+
const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
|
|
1642
4382
|
size: {
|
|
1643
4383
|
gap: new GapTheme({
|
|
1644
4384
|
gap: {
|
|
@@ -1662,6 +4402,15 @@ const defaultContainerTheme = new ComponentTheme("div", "flex flex-col mx-auto w
|
|
|
1662
4402
|
ring: new RingTheme(),
|
|
1663
4403
|
wrap: new WrapTheme(),
|
|
1664
4404
|
direction: new DirectionTheme(),
|
|
4405
|
+
radius: new RadiusTheme({
|
|
4406
|
+
rounded: {
|
|
4407
|
+
xs: "rounded-md",
|
|
4408
|
+
sm: "rounded-lg",
|
|
4409
|
+
md: "rounded-xl",
|
|
4410
|
+
lg: "rounded-2xl",
|
|
4411
|
+
xl: "rounded-3xl"
|
|
4412
|
+
}
|
|
4413
|
+
}),
|
|
1665
4414
|
},
|
|
1666
4415
|
appearance: {
|
|
1667
4416
|
background: LayoutAppearanceTheme.createDefaultStyle({
|
|
@@ -1673,12 +4422,15 @@ const defaultContainerTheme = new ComponentTheme("div", "flex flex-col mx-auto w
|
|
|
1673
4422
|
}
|
|
1674
4423
|
}, {
|
|
1675
4424
|
transparent: true,
|
|
4425
|
+
noRing: true,
|
|
4426
|
+
flex: true,
|
|
1676
4427
|
md: true,
|
|
1677
4428
|
itemsCenter: true,
|
|
1678
4429
|
gap: true,
|
|
4430
|
+
sharp: true,
|
|
1679
4431
|
});
|
|
1680
4432
|
|
|
1681
|
-
const defaultColTheme = new ComponentTheme("div", "flex
|
|
4433
|
+
const defaultColTheme = new ComponentTheme("div", "flex-col", {
|
|
1682
4434
|
size: {
|
|
1683
4435
|
gap: new GapTheme({ gap: commonGaps }),
|
|
1684
4436
|
},
|
|
@@ -1688,11 +4440,12 @@ const defaultColTheme = new ComponentTheme("div", "flex flex-col", {
|
|
|
1688
4440
|
},
|
|
1689
4441
|
}, {
|
|
1690
4442
|
md: true,
|
|
4443
|
+
flex: true,
|
|
1691
4444
|
transparent: true,
|
|
1692
4445
|
gap: true,
|
|
1693
4446
|
});
|
|
1694
4447
|
|
|
1695
|
-
const defaultStackTheme = new ComponentTheme("div", "
|
|
4448
|
+
const defaultStackTheme = new ComponentTheme("div", "", {
|
|
1696
4449
|
size: {
|
|
1697
4450
|
px: new PxTheme({
|
|
1698
4451
|
padding: {
|
|
@@ -1722,6 +4475,7 @@ const defaultStackTheme = new ComponentTheme("div", "flex", {
|
|
|
1722
4475
|
},
|
|
1723
4476
|
}, {
|
|
1724
4477
|
md: true,
|
|
4478
|
+
flex: true,
|
|
1725
4479
|
transparent: true,
|
|
1726
4480
|
column: true,
|
|
1727
4481
|
flexWrap: true,
|
|
@@ -1729,7 +4483,7 @@ const defaultStackTheme = new ComponentTheme("div", "flex", {
|
|
|
1729
4483
|
padding: true,
|
|
1730
4484
|
});
|
|
1731
4485
|
|
|
1732
|
-
const defaultSectionTheme = new ComponentTheme("div", "w-full flex
|
|
4486
|
+
const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
|
|
1733
4487
|
size: {
|
|
1734
4488
|
px: new PxTheme({
|
|
1735
4489
|
padding: {
|
|
@@ -1785,6 +4539,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex flex-col", {
|
|
|
1785
4539
|
},
|
|
1786
4540
|
}, {
|
|
1787
4541
|
md: true,
|
|
4542
|
+
flex: true,
|
|
1788
4543
|
default: true,
|
|
1789
4544
|
itemsStart: true,
|
|
1790
4545
|
gap: true,
|
|
@@ -1798,6 +4553,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex flex-col", {
|
|
|
1798
4553
|
const gridDefaults = {
|
|
1799
4554
|
md: true,
|
|
1800
4555
|
gap: true,
|
|
4556
|
+
grid: true,
|
|
1801
4557
|
};
|
|
1802
4558
|
const gridSubThemes = {
|
|
1803
4559
|
size: {
|
|
@@ -1812,8 +4568,8 @@ const gridSubThemes = {
|
|
|
1812
4568
|
}),
|
|
1813
4569
|
},
|
|
1814
4570
|
};
|
|
1815
|
-
const defaultGrid3Theme = new ComponentTheme("div", "grid
|
|
1816
|
-
const defaultGrid4Theme = new ComponentTheme("div", "grid
|
|
4571
|
+
const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, gridDefaults);
|
|
4572
|
+
const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, gridDefaults);
|
|
1817
4573
|
|
|
1818
4574
|
const defaultTheme = {
|
|
1819
4575
|
button: defaultButtonTheme,
|