tailwind-variants 3.2.2 → 3.3.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/README.md +91 -80
- package/dist/chunk-2BFDQGZN.cjs +160 -0
- package/dist/chunk-AUQ4UGQK.js +673 -0
- package/dist/chunk-ICHZ2N3R.cjs +677 -0
- package/dist/chunk-OYFAXDFZ.js +147 -0
- package/dist/config-bO3A8WhU.d.cts +112 -0
- package/dist/config-bO3A8WhU.d.ts +112 -0
- package/dist/config.cjs +2 -0
- package/dist/config.d.cts +1 -0
- package/dist/config.d.ts +1 -23
- package/dist/config.js +1 -0
- package/dist/index.cjs +3312 -32
- package/dist/index.d.cts +35 -0
- package/dist/index.d.ts +17 -121
- package/dist/index.js +3309 -25
- package/dist/lite.cjs +17 -12
- package/dist/lite.d.cts +10 -0
- package/dist/lite.d.ts +8 -11
- package/dist/lite.js +15 -8
- package/dist/types.cjs +2 -0
- package/dist/types.d.cts +168 -0
- package/dist/types.d.ts +122 -291
- package/dist/types.js +1 -0
- package/dist/utils.cjs +12 -12
- package/dist/utils.d.cts +16 -0
- package/dist/utils.d.ts +16 -32
- package/dist/utils.js +1 -1
- package/package.json +62 -66
- package/dist/chunk-2JY7EID6.cjs +0 -124
- package/dist/chunk-52Z2HSI4.cjs +0 -273
- package/dist/chunk-LQJYWU4O.js +0 -112
- package/dist/chunk-RZF76H2U.js +0 -269
package/dist/index.js
CHANGED
|
@@ -1,38 +1,3322 @@
|
|
|
1
|
-
import { getTailwindVariants,
|
|
2
|
-
|
|
3
|
-
import { cx, isEmptyObject } from './chunk-LQJYWU4O.js';
|
|
4
|
-
export { cx } from './chunk-LQJYWU4O.js';
|
|
5
|
-
import { twMerge, extendTailwindMerge } from 'tailwind-merge';
|
|
1
|
+
import { state, getTailwindVariants, defaultConfig } from './chunk-AUQ4UGQK.js';
|
|
2
|
+
import { isEmptyObject, joinClassValue, isEqual, cx } from './chunk-OYFAXDFZ.js';
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
// src/internal/merge/class-group-utils.ts
|
|
5
|
+
var concatArrays = (array1, array2) => {
|
|
6
|
+
const length1 = array1.length;
|
|
7
|
+
const length2 = array2.length;
|
|
8
|
+
const combined = new Array(length1 + length2);
|
|
9
|
+
for (let i = 0; i < length1; i++) combined[i] = array1[i];
|
|
10
|
+
for (let i = 0; i < length2; i++) combined[length1 + i] = array2[i];
|
|
11
|
+
return combined;
|
|
12
|
+
};
|
|
13
|
+
var createClassValidatorObject = (classGroupId, validator) => ({
|
|
14
|
+
classGroupId,
|
|
15
|
+
validator
|
|
16
|
+
});
|
|
17
|
+
var createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
|
|
18
|
+
nextPart,
|
|
19
|
+
validators,
|
|
20
|
+
classGroupId
|
|
21
|
+
});
|
|
22
|
+
var CLASS_PART_SEPARATOR = "-";
|
|
23
|
+
var EMPTY_CONFLICTS = [];
|
|
24
|
+
var ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
25
|
+
var createClassGroupUtils = (config) => {
|
|
26
|
+
const classMap = createClassMap(config);
|
|
27
|
+
const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
|
|
28
|
+
const getClassGroupId = (className) => {
|
|
29
|
+
if (className[0] === "[" && className[className.length - 1] === "]") {
|
|
30
|
+
return getGroupIdForArbitraryProperty(className);
|
|
31
|
+
}
|
|
32
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
33
|
+
const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
|
|
34
|
+
return getGroupRecursive(classParts, startIndex, classMap);
|
|
35
|
+
};
|
|
36
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
37
|
+
if (hasPostfixModifier) {
|
|
38
|
+
const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
|
|
39
|
+
const baseConflicts = conflictingClassGroups[classGroupId];
|
|
40
|
+
if (modifierConflicts) {
|
|
41
|
+
if (baseConflicts) {
|
|
42
|
+
return concatArrays(baseConflicts, modifierConflicts);
|
|
43
|
+
}
|
|
44
|
+
return modifierConflicts;
|
|
45
|
+
}
|
|
46
|
+
return baseConflicts || EMPTY_CONFLICTS;
|
|
16
47
|
}
|
|
17
|
-
|
|
48
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
getClassGroupId,
|
|
52
|
+
getConflictingClassGroupIds
|
|
53
|
+
};
|
|
18
54
|
};
|
|
19
|
-
var
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
55
|
+
var getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
56
|
+
const classPathsLength = classParts.length - startIndex;
|
|
57
|
+
if (classPathsLength === 0) {
|
|
58
|
+
return classPartObject.classGroupId;
|
|
59
|
+
}
|
|
60
|
+
const currentClassPart = classParts[startIndex];
|
|
61
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
62
|
+
if (nextClassPartObject) {
|
|
63
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
64
|
+
if (result) return result;
|
|
65
|
+
}
|
|
66
|
+
const validators = classPartObject.validators;
|
|
67
|
+
if (validators === null) {
|
|
68
|
+
return void 0;
|
|
69
|
+
}
|
|
70
|
+
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
71
|
+
const validatorsLength = validators.length;
|
|
72
|
+
for (let index = 0; index < validatorsLength; index++) {
|
|
73
|
+
const validatorObject = validators[index];
|
|
74
|
+
if (validatorObject.validator(classRest)) {
|
|
75
|
+
return validatorObject.classGroupId;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return void 0;
|
|
79
|
+
};
|
|
80
|
+
var getGroupIdForArbitraryProperty = (className) => {
|
|
81
|
+
const content = className.slice(1, -1);
|
|
82
|
+
const colonIndex = content.indexOf(":");
|
|
83
|
+
if (colonIndex === -1) {
|
|
84
|
+
return void 0;
|
|
85
|
+
}
|
|
86
|
+
const property = content.slice(0, colonIndex);
|
|
87
|
+
return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
|
|
88
|
+
};
|
|
89
|
+
var createClassMap = (config) => {
|
|
90
|
+
const { theme, classGroups } = config;
|
|
91
|
+
return processClassGroups(classGroups, theme);
|
|
92
|
+
};
|
|
93
|
+
var processClassGroups = (classGroups, theme) => {
|
|
94
|
+
const classMap = createClassPartObject();
|
|
95
|
+
for (const classGroupId in classGroups) {
|
|
96
|
+
const group = classGroups[classGroupId];
|
|
97
|
+
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
98
|
+
}
|
|
99
|
+
return classMap;
|
|
100
|
+
};
|
|
101
|
+
var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
102
|
+
const length = classGroup.length;
|
|
103
|
+
for (let index = 0; index < length; index++) {
|
|
104
|
+
const classDefinition = classGroup[index];
|
|
105
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
109
|
+
if (typeof classDefinition === "string") {
|
|
110
|
+
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (typeof classDefinition === "function") {
|
|
114
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
processObjectDefinition(
|
|
118
|
+
classDefinition,
|
|
119
|
+
classPartObject,
|
|
120
|
+
classGroupId,
|
|
121
|
+
theme
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
var processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
125
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
126
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
127
|
+
};
|
|
128
|
+
var processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
129
|
+
if (isThemeGetter(classDefinition)) {
|
|
130
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (classPartObject.validators === null) {
|
|
134
|
+
classPartObject.validators = [];
|
|
135
|
+
}
|
|
136
|
+
classPartObject.validators.push(
|
|
137
|
+
createClassValidatorObject(classGroupId, classDefinition)
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
var processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
141
|
+
const entries = Object.entries(classDefinition);
|
|
142
|
+
const length = entries.length;
|
|
143
|
+
for (let index = 0; index < length; index++) {
|
|
144
|
+
const [key, value] = entries[index];
|
|
145
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
var getPart = (classPartObject, path) => {
|
|
149
|
+
let current = classPartObject;
|
|
150
|
+
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
151
|
+
const length = parts.length;
|
|
152
|
+
for (let index = 0; index < length; index++) {
|
|
153
|
+
const part = parts[index];
|
|
154
|
+
let next = current.nextPart.get(part);
|
|
155
|
+
if (!next) {
|
|
156
|
+
next = createClassPartObject();
|
|
157
|
+
current.nextPart.set(part, next);
|
|
158
|
+
}
|
|
159
|
+
current = next;
|
|
160
|
+
}
|
|
161
|
+
return current;
|
|
162
|
+
};
|
|
163
|
+
var isThemeGetter = (classDefinition) => "isThemeGetter" in classDefinition && classDefinition.isThemeGetter === true;
|
|
164
|
+
|
|
165
|
+
// src/internal/merge/parse-class-name.ts
|
|
166
|
+
var IMPORTANT_MODIFIER = "!";
|
|
167
|
+
var CHAR_MODIFIER_SEPARATOR = 58;
|
|
168
|
+
var CHAR_POSTFIX_SEPARATOR = 47;
|
|
169
|
+
var CHAR_OPEN_BRACKET = 91;
|
|
170
|
+
var CHAR_CLOSE_BRACKET = 93;
|
|
171
|
+
var CHAR_OPEN_PAREN = 40;
|
|
172
|
+
var CHAR_CLOSE_PAREN = 41;
|
|
173
|
+
var CHAR_IMPORTANT = 33;
|
|
174
|
+
var createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition) => ({
|
|
175
|
+
modifiers,
|
|
176
|
+
hasImportantModifier,
|
|
177
|
+
baseClassName,
|
|
178
|
+
maybePostfixModifierPosition,
|
|
179
|
+
isExternal: void 0
|
|
180
|
+
});
|
|
181
|
+
var parseClassName = (className) => {
|
|
182
|
+
const modifiers = [];
|
|
183
|
+
let bracketDepth = 0;
|
|
184
|
+
let parenDepth = 0;
|
|
185
|
+
let modifierStart = 0;
|
|
186
|
+
let postfixModifierPosition;
|
|
187
|
+
const len = className.length;
|
|
188
|
+
for (let index = 0; index < len; index++) {
|
|
189
|
+
const charCode = className.charCodeAt(index);
|
|
190
|
+
if (bracketDepth === 0 && parenDepth === 0) {
|
|
191
|
+
if (charCode === CHAR_MODIFIER_SEPARATOR) {
|
|
192
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
193
|
+
modifierStart = index + 1;
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (charCode === CHAR_POSTFIX_SEPARATOR) {
|
|
197
|
+
postfixModifierPosition = index;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (charCode === CHAR_OPEN_BRACKET) bracketDepth++;
|
|
202
|
+
else if (charCode === CHAR_CLOSE_BRACKET) bracketDepth--;
|
|
203
|
+
else if (charCode === CHAR_OPEN_PAREN) parenDepth++;
|
|
204
|
+
else if (charCode === CHAR_CLOSE_PAREN) parenDepth--;
|
|
205
|
+
}
|
|
206
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
|
|
207
|
+
let baseClassName = baseClassNameWithImportantModifier;
|
|
208
|
+
let hasImportantModifier = false;
|
|
209
|
+
const lastIndex = baseClassNameWithImportantModifier.length - 1;
|
|
210
|
+
if (baseClassNameWithImportantModifier.charCodeAt(lastIndex) === CHAR_IMPORTANT) {
|
|
211
|
+
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
212
|
+
hasImportantModifier = true;
|
|
213
|
+
} else if (
|
|
214
|
+
// Tailwind CSS v3: important modifier at the start of the base class (legacy).
|
|
215
|
+
baseClassNameWithImportantModifier.charCodeAt(0) === CHAR_IMPORTANT
|
|
216
|
+
) {
|
|
217
|
+
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
218
|
+
hasImportantModifier = true;
|
|
219
|
+
}
|
|
220
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
221
|
+
return createResultObject(
|
|
222
|
+
modifiers,
|
|
223
|
+
hasImportantModifier,
|
|
224
|
+
baseClassName,
|
|
225
|
+
maybePostfixModifierPosition
|
|
226
|
+
);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
// src/internal/merge/sort-modifiers.ts
|
|
230
|
+
var createSortModifiers = (config) => {
|
|
231
|
+
const orderSensitiveModifiers = new Set(config.orderSensitiveModifiers);
|
|
232
|
+
return (modifiers) => {
|
|
233
|
+
const result = [];
|
|
234
|
+
let currentSegment = [];
|
|
235
|
+
for (let index = 0; index < modifiers.length; index++) {
|
|
236
|
+
const modifier = modifiers[index];
|
|
237
|
+
const isArbitrary = modifier[0] === "[";
|
|
238
|
+
const isOrderSensitive = orderSensitiveModifiers.has(modifier);
|
|
239
|
+
if (isArbitrary || isOrderSensitive) {
|
|
240
|
+
if (currentSegment.length > 0) {
|
|
241
|
+
currentSegment.sort();
|
|
242
|
+
for (let segmentIndex = 0; segmentIndex < currentSegment.length; segmentIndex++) {
|
|
243
|
+
result.push(currentSegment[segmentIndex]);
|
|
244
|
+
}
|
|
245
|
+
currentSegment = [];
|
|
246
|
+
}
|
|
247
|
+
result.push(modifier);
|
|
248
|
+
} else {
|
|
249
|
+
currentSegment.push(modifier);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (currentSegment.length > 0) {
|
|
253
|
+
currentSegment.sort();
|
|
254
|
+
for (let segmentIndex = 0; segmentIndex < currentSegment.length; segmentIndex++) {
|
|
255
|
+
result.push(currentSegment[segmentIndex]);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return result;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
// src/internal/merge/config-utils.ts
|
|
263
|
+
var EXTERNAL_DESCRIPTOR = { isExternal: true, classId: -1, conflictIds: [] };
|
|
264
|
+
var DESCRIPTOR_CACHE_SIZE = 4096;
|
|
265
|
+
var MAX_CONFLICT_KEYS = 16384;
|
|
266
|
+
var createConfigUtils = (config) => {
|
|
267
|
+
const sortModifiers = createSortModifiers(config);
|
|
268
|
+
const postfixLookupClassGroupIds = createPostfixLookupClassGroupIds(config);
|
|
269
|
+
const { getClassGroupId, getConflictingClassGroupIds } = createClassGroupUtils(config);
|
|
270
|
+
let descriptorCache = /* @__PURE__ */ Object.create(null);
|
|
271
|
+
let previousDescriptorCache = /* @__PURE__ */ Object.create(null);
|
|
272
|
+
let descriptorCacheSize = 0;
|
|
273
|
+
let claimedGeneration = new Int32Array(256);
|
|
274
|
+
let currentGeneration = 0;
|
|
275
|
+
let keepFlags = new Uint8Array(64);
|
|
276
|
+
let splitSawNonSpaceWhitespace = false;
|
|
277
|
+
const splitClassList = (classList) => {
|
|
278
|
+
const tokens = [];
|
|
279
|
+
const length = classList.length;
|
|
280
|
+
let tokenStart = -1;
|
|
281
|
+
splitSawNonSpaceWhitespace = false;
|
|
282
|
+
for (let index = 0; index < length; index++) {
|
|
283
|
+
const charCode = classList.charCodeAt(index);
|
|
284
|
+
if (charCode === 32) {
|
|
285
|
+
if (tokenStart !== -1) {
|
|
286
|
+
tokens.push(classList.slice(tokenStart, index));
|
|
287
|
+
tokenStart = -1;
|
|
288
|
+
}
|
|
289
|
+
} else if (charCode >= 9 && charCode <= 13) {
|
|
290
|
+
splitSawNonSpaceWhitespace = true;
|
|
291
|
+
if (tokenStart !== -1) {
|
|
292
|
+
tokens.push(classList.slice(tokenStart, index));
|
|
293
|
+
tokenStart = -1;
|
|
294
|
+
}
|
|
295
|
+
} else if (tokenStart === -1) {
|
|
296
|
+
tokenStart = index;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (tokenStart !== -1) {
|
|
300
|
+
tokens.push(classList.slice(tokenStart));
|
|
301
|
+
}
|
|
302
|
+
return tokens;
|
|
303
|
+
};
|
|
304
|
+
const conflictKeyIds = /* @__PURE__ */ new Map();
|
|
305
|
+
let nextConflictKeyId = 0;
|
|
306
|
+
const internConflictKey = (conflictKey) => {
|
|
307
|
+
let id = conflictKeyIds.get(conflictKey);
|
|
308
|
+
if (id === void 0) {
|
|
309
|
+
id = nextConflictKeyId++;
|
|
310
|
+
conflictKeyIds.set(conflictKey, id);
|
|
311
|
+
if (id >= claimedGeneration.length) {
|
|
312
|
+
const grown = new Int32Array(claimedGeneration.length * 2);
|
|
313
|
+
grown.set(claimedGeneration);
|
|
314
|
+
claimedGeneration = grown;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return id;
|
|
318
|
+
};
|
|
319
|
+
const computeClassDescriptor = (originalClassName) => {
|
|
320
|
+
const {
|
|
321
|
+
isExternal,
|
|
322
|
+
modifiers,
|
|
323
|
+
hasImportantModifier,
|
|
324
|
+
baseClassName,
|
|
325
|
+
maybePostfixModifierPosition
|
|
326
|
+
} = parseClassName(originalClassName);
|
|
327
|
+
if (isExternal) {
|
|
328
|
+
return EXTERNAL_DESCRIPTOR;
|
|
329
|
+
}
|
|
330
|
+
let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
|
|
331
|
+
let classGroupId;
|
|
332
|
+
if (hasPostfixModifier) {
|
|
333
|
+
const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);
|
|
334
|
+
classGroupId = getClassGroupId(baseClassNameWithoutPostfix);
|
|
335
|
+
const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : void 0;
|
|
336
|
+
if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
|
|
337
|
+
classGroupId = classGroupIdWithPostfix;
|
|
338
|
+
hasPostfixModifier = false;
|
|
339
|
+
}
|
|
340
|
+
} else {
|
|
341
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
342
|
+
}
|
|
343
|
+
if (!classGroupId) {
|
|
344
|
+
if (!hasPostfixModifier) {
|
|
345
|
+
return EXTERNAL_DESCRIPTOR;
|
|
346
|
+
}
|
|
347
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
348
|
+
if (!classGroupId) {
|
|
349
|
+
return EXTERNAL_DESCRIPTOR;
|
|
350
|
+
}
|
|
351
|
+
hasPostfixModifier = false;
|
|
352
|
+
}
|
|
353
|
+
const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
|
|
354
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
355
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
356
|
+
const conflictIds = [];
|
|
357
|
+
for (let index = 0; index < conflictGroups.length; index++) {
|
|
358
|
+
conflictIds.push(internConflictKey(modifierId + conflictGroups[index]));
|
|
359
|
+
}
|
|
360
|
+
return {
|
|
361
|
+
isExternal: false,
|
|
362
|
+
classId: internConflictKey(modifierId + classGroupId),
|
|
363
|
+
conflictIds
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
const getClassDescriptor = (originalClassName) => {
|
|
367
|
+
let descriptor = descriptorCache[originalClassName];
|
|
368
|
+
if (descriptor !== void 0) {
|
|
369
|
+
return descriptor;
|
|
370
|
+
}
|
|
371
|
+
descriptor = previousDescriptorCache[originalClassName];
|
|
372
|
+
if (descriptor === void 0) {
|
|
373
|
+
descriptor = computeClassDescriptor(originalClassName);
|
|
374
|
+
}
|
|
375
|
+
descriptorCache[originalClassName] = descriptor;
|
|
376
|
+
if (++descriptorCacheSize > DESCRIPTOR_CACHE_SIZE) {
|
|
377
|
+
descriptorCacheSize = 0;
|
|
378
|
+
previousDescriptorCache = descriptorCache;
|
|
379
|
+
descriptorCache = /* @__PURE__ */ Object.create(null);
|
|
380
|
+
}
|
|
381
|
+
return descriptor;
|
|
382
|
+
};
|
|
383
|
+
const mergeClassList = (classList) => {
|
|
384
|
+
const classNames = splitClassList(classList);
|
|
385
|
+
const classCount = classNames.length;
|
|
386
|
+
if (classCount === 1) {
|
|
387
|
+
return classNames[0];
|
|
388
|
+
}
|
|
389
|
+
if (nextConflictKeyId > MAX_CONFLICT_KEYS) {
|
|
390
|
+
conflictKeyIds.clear();
|
|
391
|
+
nextConflictKeyId = 0;
|
|
392
|
+
descriptorCache = /* @__PURE__ */ Object.create(null);
|
|
393
|
+
previousDescriptorCache = /* @__PURE__ */ Object.create(null);
|
|
394
|
+
descriptorCacheSize = 0;
|
|
395
|
+
}
|
|
396
|
+
currentGeneration = currentGeneration + 1 | 0;
|
|
397
|
+
if (currentGeneration === 0) currentGeneration = 1;
|
|
398
|
+
const generation = currentGeneration;
|
|
399
|
+
if (classCount > keepFlags.length) {
|
|
400
|
+
let capacity = keepFlags.length;
|
|
401
|
+
while (capacity < classCount) capacity *= 2;
|
|
402
|
+
keepFlags = new Uint8Array(capacity);
|
|
403
|
+
}
|
|
404
|
+
let didDrop = false;
|
|
405
|
+
let tokenCharCount = 0;
|
|
406
|
+
for (let index = classCount - 1; index >= 0; index -= 1) {
|
|
407
|
+
const className = classNames[index];
|
|
408
|
+
tokenCharCount += className.length;
|
|
409
|
+
const descriptor = getClassDescriptor(className);
|
|
410
|
+
if (descriptor.isExternal) {
|
|
411
|
+
keepFlags[index] = 1;
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
const classId = descriptor.classId;
|
|
415
|
+
if (claimedGeneration[classId] === generation) {
|
|
416
|
+
keepFlags[index] = 0;
|
|
417
|
+
didDrop = true;
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
claimedGeneration[classId] = generation;
|
|
421
|
+
const conflictIds = descriptor.conflictIds;
|
|
422
|
+
for (let conflictIndex = 0; conflictIndex < conflictIds.length; conflictIndex++) {
|
|
423
|
+
claimedGeneration[conflictIds[conflictIndex]] = generation;
|
|
424
|
+
}
|
|
425
|
+
keepFlags[index] = 1;
|
|
426
|
+
}
|
|
427
|
+
if (!didDrop && !splitSawNonSpaceWhitespace && classList.length === tokenCharCount + classCount - 1) {
|
|
428
|
+
return classList;
|
|
429
|
+
}
|
|
430
|
+
let result = "";
|
|
431
|
+
for (let index = 0; index < classCount; index++) {
|
|
432
|
+
if (keepFlags[index] === 1) {
|
|
433
|
+
if (result) result += " ";
|
|
434
|
+
result += classNames[index];
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
return result;
|
|
438
|
+
};
|
|
439
|
+
return {
|
|
440
|
+
parseClassName,
|
|
441
|
+
sortModifiers,
|
|
442
|
+
postfixLookupClassGroupIds,
|
|
443
|
+
getClassGroupId,
|
|
444
|
+
getConflictingClassGroupIds,
|
|
445
|
+
getClassDescriptor,
|
|
446
|
+
mergeClassList
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
var createPostfixLookupClassGroupIds = (config) => {
|
|
450
|
+
const lookup = /* @__PURE__ */ Object.create(null);
|
|
451
|
+
const classGroupIds = config.postfixLookupClassGroups;
|
|
452
|
+
if (classGroupIds) {
|
|
453
|
+
for (let index = 0; index < classGroupIds.length; index++) {
|
|
454
|
+
lookup[classGroupIds[index]] = true;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return lookup;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
// src/internal/merge/create-tailwind-merge.ts
|
|
461
|
+
var MERGE_CACHE_SIZE = 500;
|
|
462
|
+
var createTailwindMerge = (createConfig) => {
|
|
463
|
+
let configUtils;
|
|
464
|
+
let mergeClassList;
|
|
465
|
+
let cache = /* @__PURE__ */ Object.create(null);
|
|
466
|
+
let previousCache = /* @__PURE__ */ Object.create(null);
|
|
467
|
+
let cacheSize = 0;
|
|
468
|
+
const initTailwindMerge = (classList) => {
|
|
469
|
+
configUtils = createConfigUtils(createConfig());
|
|
470
|
+
mergeClassList = configUtils.mergeClassList;
|
|
471
|
+
merge.mergeString = tailwindMerge;
|
|
472
|
+
return tailwindMerge(classList);
|
|
473
|
+
};
|
|
474
|
+
const tailwindMerge = (classList) => {
|
|
475
|
+
let result = cache[classList];
|
|
476
|
+
if (result !== void 0) {
|
|
477
|
+
return result;
|
|
478
|
+
}
|
|
479
|
+
result = previousCache[classList];
|
|
480
|
+
if (result === void 0) {
|
|
481
|
+
result = mergeClassList(classList);
|
|
482
|
+
}
|
|
483
|
+
cache[classList] = result;
|
|
484
|
+
if (++cacheSize > MERGE_CACHE_SIZE) {
|
|
485
|
+
cacheSize = 0;
|
|
486
|
+
previousCache = cache;
|
|
487
|
+
cache = /* @__PURE__ */ Object.create(null);
|
|
488
|
+
}
|
|
489
|
+
return result;
|
|
490
|
+
};
|
|
491
|
+
const merge = (...args) => merge.mergeString(joinClassValue(args));
|
|
492
|
+
merge.mergeString = initTailwindMerge;
|
|
493
|
+
return merge;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
// src/internal/merge/from-theme.ts
|
|
497
|
+
var fallbackThemeArr = [];
|
|
498
|
+
var fromTheme = (key) => {
|
|
499
|
+
const themeGetter = (theme) => theme[key] || fallbackThemeArr;
|
|
500
|
+
themeGetter.isThemeGetter = true;
|
|
501
|
+
return themeGetter;
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
// src/internal/merge/validators.ts
|
|
505
|
+
var arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
506
|
+
var arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
507
|
+
var fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
|
|
508
|
+
var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
509
|
+
var 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$/;
|
|
510
|
+
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
511
|
+
var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
512
|
+
var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
513
|
+
var toNumber = Number;
|
|
514
|
+
var numberIsNaN = Number.isNaN;
|
|
515
|
+
var numberIsInteger = Number.isInteger;
|
|
516
|
+
var isFraction = (value) => fractionRegex.test(value);
|
|
517
|
+
var isNumber = (value) => Boolean(value) && !numberIsNaN(toNumber(value));
|
|
518
|
+
var isInteger = (value) => Boolean(value) && numberIsInteger(toNumber(value));
|
|
519
|
+
var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
520
|
+
var isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
521
|
+
var isAny = () => true;
|
|
522
|
+
var isLengthOnly = (value) => (
|
|
523
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
524
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
525
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
526
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
|
|
527
|
+
);
|
|
528
|
+
var isNever = () => false;
|
|
529
|
+
var isShadow = (value) => shadowRegex.test(value);
|
|
530
|
+
var isImage = (value) => imageRegex.test(value);
|
|
531
|
+
var isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
|
532
|
+
var isNamedContainerQuery = (value) => value.startsWith("@container") && (value[10] === "/" && value[11] !== void 0 || value[11] === "s" && value[16] !== void 0 && value.startsWith("-size/", 10) || value[11] === "n" && value[18] !== void 0 && value.startsWith("-normal/", 10));
|
|
533
|
+
var isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
534
|
+
var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
535
|
+
var isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
536
|
+
var isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
537
|
+
var isArbitraryWeight = (value) => getIsArbitraryValue(value, isLabelWeight, isAny);
|
|
538
|
+
var isArbitraryFamilyName = (value) => getIsArbitraryValue(value, isLabelFamilyName, isNever);
|
|
539
|
+
var isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
540
|
+
var isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
541
|
+
var isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
542
|
+
var isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
|
|
543
|
+
var isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
|
|
544
|
+
var isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
545
|
+
var isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
|
|
546
|
+
var isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
|
|
547
|
+
var isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
|
|
548
|
+
var isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
|
|
549
|
+
var isArbitraryVariableWeight = (value) => getIsArbitraryVariable(value, isLabelWeight, true);
|
|
550
|
+
var getIsArbitraryValue = (value, testLabel, testValue) => {
|
|
551
|
+
const result = arbitraryValueRegex.exec(value);
|
|
552
|
+
if (result) {
|
|
553
|
+
if (result[1]) {
|
|
554
|
+
return testLabel(result[1]);
|
|
555
|
+
}
|
|
556
|
+
return testValue(result[2]);
|
|
557
|
+
}
|
|
558
|
+
return false;
|
|
559
|
+
};
|
|
560
|
+
var getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
|
|
561
|
+
const result = arbitraryVariableRegex.exec(value);
|
|
562
|
+
if (result) {
|
|
563
|
+
if (result[1]) {
|
|
564
|
+
return testLabel(result[1]);
|
|
565
|
+
}
|
|
566
|
+
return shouldMatchNoLabel;
|
|
567
|
+
}
|
|
568
|
+
return false;
|
|
569
|
+
};
|
|
570
|
+
var isLabelPosition = (label) => label === "position" || label === "percentage";
|
|
571
|
+
var isLabelImage = (label) => label === "image" || label === "url";
|
|
572
|
+
var isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
|
|
573
|
+
var isLabelLength = (label) => label === "length";
|
|
574
|
+
var isLabelNumber = (label) => label === "number";
|
|
575
|
+
var isLabelFamilyName = (label) => label === "family-name";
|
|
576
|
+
var isLabelWeight = (label) => label === "number" || label === "weight";
|
|
577
|
+
var isLabelShadow = (label) => label === "shadow";
|
|
578
|
+
|
|
579
|
+
// src/internal/merge/default-config.ts
|
|
580
|
+
var getDefaultConfig = () => {
|
|
581
|
+
const themeColor = fromTheme("color");
|
|
582
|
+
const themeFont = fromTheme("font");
|
|
583
|
+
const themeText = fromTheme("text");
|
|
584
|
+
const themeFontWeight = fromTheme("font-weight");
|
|
585
|
+
const themeTracking = fromTheme("tracking");
|
|
586
|
+
const themeLeading = fromTheme("leading");
|
|
587
|
+
const themeBreakpoint = fromTheme("breakpoint");
|
|
588
|
+
const themeContainer = fromTheme("container");
|
|
589
|
+
const themeSpacing = fromTheme("spacing");
|
|
590
|
+
const themeRadius = fromTheme("radius");
|
|
591
|
+
const themeShadow = fromTheme("shadow");
|
|
592
|
+
const themeInsetShadow = fromTheme("inset-shadow");
|
|
593
|
+
const themeTextShadow = fromTheme("text-shadow");
|
|
594
|
+
const themeDropShadow = fromTheme("drop-shadow");
|
|
595
|
+
const themeBlur = fromTheme("blur");
|
|
596
|
+
const themePerspective = fromTheme("perspective");
|
|
597
|
+
const themeAspect = fromTheme("aspect");
|
|
598
|
+
const themeEase = fromTheme("ease");
|
|
599
|
+
const themeAnimate = fromTheme("animate");
|
|
600
|
+
const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
601
|
+
const scalePosition = () => [
|
|
602
|
+
"center",
|
|
603
|
+
"top",
|
|
604
|
+
"bottom",
|
|
605
|
+
"left",
|
|
606
|
+
"right",
|
|
607
|
+
"top-left",
|
|
608
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
609
|
+
"left-top",
|
|
610
|
+
"top-right",
|
|
611
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
612
|
+
"right-top",
|
|
613
|
+
"bottom-right",
|
|
614
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
615
|
+
"right-bottom",
|
|
616
|
+
"bottom-left",
|
|
617
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
618
|
+
"left-bottom"
|
|
619
|
+
];
|
|
620
|
+
const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
|
|
621
|
+
const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
|
|
622
|
+
const scaleOverscroll = () => ["auto", "contain", "none"];
|
|
623
|
+
const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
|
|
624
|
+
const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
|
|
625
|
+
const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
|
|
626
|
+
const scaleGridColRowStartAndEnd = () => [
|
|
627
|
+
"auto",
|
|
628
|
+
{ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue] },
|
|
629
|
+
isInteger,
|
|
630
|
+
isArbitraryVariable,
|
|
631
|
+
isArbitraryValue
|
|
632
|
+
];
|
|
633
|
+
const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
|
|
634
|
+
const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
|
|
635
|
+
const scaleAlignPrimaryAxis = () => [
|
|
636
|
+
"start",
|
|
637
|
+
"end",
|
|
638
|
+
"center",
|
|
639
|
+
"between",
|
|
640
|
+
"around",
|
|
641
|
+
"evenly",
|
|
642
|
+
"stretch",
|
|
643
|
+
"baseline",
|
|
644
|
+
"center-safe",
|
|
645
|
+
"end-safe"
|
|
646
|
+
];
|
|
647
|
+
const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
|
|
648
|
+
const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
|
|
649
|
+
const scaleSizing = () => [
|
|
650
|
+
isFraction,
|
|
651
|
+
"auto",
|
|
652
|
+
"full",
|
|
653
|
+
"dvw",
|
|
654
|
+
"dvh",
|
|
655
|
+
"lvw",
|
|
656
|
+
"lvh",
|
|
657
|
+
"svw",
|
|
658
|
+
"svh",
|
|
659
|
+
"min",
|
|
660
|
+
"max",
|
|
661
|
+
"fit",
|
|
662
|
+
...scaleUnambiguousSpacing()
|
|
663
|
+
];
|
|
664
|
+
const scaleSizingInline = () => [
|
|
665
|
+
isFraction,
|
|
666
|
+
"screen",
|
|
667
|
+
"full",
|
|
668
|
+
"dvw",
|
|
669
|
+
"lvw",
|
|
670
|
+
"svw",
|
|
671
|
+
"min",
|
|
672
|
+
"max",
|
|
673
|
+
"fit",
|
|
674
|
+
...scaleUnambiguousSpacing()
|
|
675
|
+
];
|
|
676
|
+
const scaleSizingBlock = () => [
|
|
677
|
+
isFraction,
|
|
678
|
+
"screen",
|
|
679
|
+
"full",
|
|
680
|
+
"lh",
|
|
681
|
+
"dvh",
|
|
682
|
+
"lvh",
|
|
683
|
+
"svh",
|
|
684
|
+
"min",
|
|
685
|
+
"max",
|
|
686
|
+
"fit",
|
|
687
|
+
...scaleUnambiguousSpacing()
|
|
688
|
+
];
|
|
689
|
+
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
|
|
690
|
+
const scaleBgPosition = () => [
|
|
691
|
+
...scalePosition(),
|
|
692
|
+
isArbitraryVariablePosition,
|
|
693
|
+
isArbitraryPosition,
|
|
694
|
+
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
695
|
+
];
|
|
696
|
+
const scaleBgRepeat = () => ["no-repeat", { repeat: ["", "x", "y", "space", "round"] }];
|
|
697
|
+
const scaleBgSize = () => [
|
|
698
|
+
"auto",
|
|
699
|
+
"cover",
|
|
700
|
+
"contain",
|
|
701
|
+
isArbitraryVariableSize,
|
|
702
|
+
isArbitrarySize,
|
|
703
|
+
{ size: [isArbitraryVariable, isArbitraryValue] }
|
|
704
|
+
];
|
|
705
|
+
const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
|
|
706
|
+
const scaleRadius = () => [
|
|
707
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
708
|
+
"",
|
|
709
|
+
"none",
|
|
710
|
+
"full",
|
|
711
|
+
themeRadius,
|
|
712
|
+
isArbitraryVariable,
|
|
713
|
+
isArbitraryValue
|
|
714
|
+
];
|
|
715
|
+
const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
|
|
716
|
+
const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
|
|
717
|
+
const scaleBlendMode = () => [
|
|
718
|
+
"normal",
|
|
719
|
+
"multiply",
|
|
720
|
+
"screen",
|
|
721
|
+
"overlay",
|
|
722
|
+
"darken",
|
|
723
|
+
"lighten",
|
|
724
|
+
"color-dodge",
|
|
725
|
+
"color-burn",
|
|
726
|
+
"hard-light",
|
|
727
|
+
"soft-light",
|
|
728
|
+
"difference",
|
|
729
|
+
"exclusion",
|
|
730
|
+
"hue",
|
|
731
|
+
"saturation",
|
|
732
|
+
"color",
|
|
733
|
+
"luminosity"
|
|
734
|
+
];
|
|
735
|
+
const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
|
|
736
|
+
const scaleBlur = () => [
|
|
737
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
738
|
+
"",
|
|
739
|
+
"none",
|
|
740
|
+
themeBlur,
|
|
741
|
+
isArbitraryVariable,
|
|
742
|
+
isArbitraryValue
|
|
743
|
+
];
|
|
744
|
+
const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
|
|
745
|
+
const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
|
|
746
|
+
const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
|
|
747
|
+
const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
|
|
748
|
+
return {
|
|
749
|
+
theme: {
|
|
750
|
+
animate: ["spin", "ping", "pulse", "bounce"],
|
|
751
|
+
aspect: ["video"],
|
|
752
|
+
blur: [isTshirtSize],
|
|
753
|
+
breakpoint: [isTshirtSize],
|
|
754
|
+
color: [isAny],
|
|
755
|
+
container: [isTshirtSize],
|
|
756
|
+
"drop-shadow": [isTshirtSize],
|
|
757
|
+
ease: ["in", "out", "in-out"],
|
|
758
|
+
font: [isAnyNonArbitrary],
|
|
759
|
+
"font-weight": [
|
|
760
|
+
"thin",
|
|
761
|
+
"extralight",
|
|
762
|
+
"light",
|
|
763
|
+
"normal",
|
|
764
|
+
"medium",
|
|
765
|
+
"semibold",
|
|
766
|
+
"bold",
|
|
767
|
+
"extrabold",
|
|
768
|
+
"black"
|
|
769
|
+
],
|
|
770
|
+
"inset-shadow": [isTshirtSize],
|
|
771
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
772
|
+
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
|
|
773
|
+
radius: [isTshirtSize],
|
|
774
|
+
shadow: [isTshirtSize],
|
|
775
|
+
spacing: ["px", isNumber],
|
|
776
|
+
text: [isTshirtSize],
|
|
777
|
+
"text-shadow": [isTshirtSize],
|
|
778
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
|
|
779
|
+
},
|
|
780
|
+
classGroups: {
|
|
781
|
+
// --------------
|
|
782
|
+
// --- Layout ---
|
|
783
|
+
// --------------
|
|
784
|
+
/**
|
|
785
|
+
* Aspect Ratio
|
|
786
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
787
|
+
*/
|
|
788
|
+
aspect: [
|
|
789
|
+
{
|
|
790
|
+
aspect: [
|
|
791
|
+
"auto",
|
|
792
|
+
"square",
|
|
793
|
+
isFraction,
|
|
794
|
+
isArbitraryValue,
|
|
795
|
+
isArbitraryVariable,
|
|
796
|
+
themeAspect
|
|
797
|
+
]
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
/**
|
|
801
|
+
* Container
|
|
802
|
+
* @see https://tailwindcss.com/docs/container
|
|
803
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
804
|
+
*/
|
|
805
|
+
container: ["container"],
|
|
806
|
+
/**
|
|
807
|
+
* Container Type
|
|
808
|
+
* @see https://tailwindcss.com/docs/responsive-design#container-queries
|
|
809
|
+
*/
|
|
810
|
+
"container-type": [
|
|
811
|
+
{ "@container": ["", "normal", "size", isArbitraryVariable, isArbitraryValue] }
|
|
812
|
+
],
|
|
813
|
+
/**
|
|
814
|
+
* Container Name
|
|
815
|
+
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
|
816
|
+
*/
|
|
817
|
+
"container-named": [isNamedContainerQuery],
|
|
818
|
+
/**
|
|
819
|
+
* Columns
|
|
820
|
+
* @see https://tailwindcss.com/docs/columns
|
|
821
|
+
*/
|
|
822
|
+
columns: [{ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer] }],
|
|
823
|
+
/**
|
|
824
|
+
* Break After
|
|
825
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
826
|
+
*/
|
|
827
|
+
"break-after": [{ "break-after": scaleBreak() }],
|
|
828
|
+
/**
|
|
829
|
+
* Break Before
|
|
830
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
831
|
+
*/
|
|
832
|
+
"break-before": [{ "break-before": scaleBreak() }],
|
|
833
|
+
/**
|
|
834
|
+
* Break Inside
|
|
835
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
836
|
+
*/
|
|
837
|
+
"break-inside": [{ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] }],
|
|
838
|
+
/**
|
|
839
|
+
* Box Decoration Break
|
|
840
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
841
|
+
*/
|
|
842
|
+
"box-decoration": [{ "box-decoration": ["slice", "clone"] }],
|
|
843
|
+
/**
|
|
844
|
+
* Box Sizing
|
|
845
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
846
|
+
*/
|
|
847
|
+
box: [{ box: ["border", "content"] }],
|
|
848
|
+
/**
|
|
849
|
+
* Display
|
|
850
|
+
* @see https://tailwindcss.com/docs/display
|
|
851
|
+
*/
|
|
852
|
+
display: [
|
|
853
|
+
"block",
|
|
854
|
+
"inline-block",
|
|
855
|
+
"inline",
|
|
856
|
+
"flex",
|
|
857
|
+
"inline-flex",
|
|
858
|
+
"table",
|
|
859
|
+
"inline-table",
|
|
860
|
+
"table-caption",
|
|
861
|
+
"table-cell",
|
|
862
|
+
"table-column",
|
|
863
|
+
"table-column-group",
|
|
864
|
+
"table-footer-group",
|
|
865
|
+
"table-header-group",
|
|
866
|
+
"table-row-group",
|
|
867
|
+
"table-row",
|
|
868
|
+
"flow-root",
|
|
869
|
+
"grid",
|
|
870
|
+
"inline-grid",
|
|
871
|
+
"contents",
|
|
872
|
+
"list-item",
|
|
873
|
+
"hidden"
|
|
874
|
+
],
|
|
875
|
+
/**
|
|
876
|
+
* Screen Reader Only
|
|
877
|
+
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
878
|
+
*/
|
|
879
|
+
sr: ["sr-only", "not-sr-only"],
|
|
880
|
+
/**
|
|
881
|
+
* Floats
|
|
882
|
+
* @see https://tailwindcss.com/docs/float
|
|
883
|
+
*/
|
|
884
|
+
float: [{ float: ["right", "left", "none", "start", "end"] }],
|
|
885
|
+
/**
|
|
886
|
+
* Clear
|
|
887
|
+
* @see https://tailwindcss.com/docs/clear
|
|
888
|
+
*/
|
|
889
|
+
clear: [{ clear: ["left", "right", "both", "none", "start", "end"] }],
|
|
890
|
+
/**
|
|
891
|
+
* Isolation
|
|
892
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
893
|
+
*/
|
|
894
|
+
isolation: ["isolate", "isolation-auto"],
|
|
895
|
+
/**
|
|
896
|
+
* Object Fit
|
|
897
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
898
|
+
*/
|
|
899
|
+
"object-fit": [{ object: ["contain", "cover", "fill", "none", "scale-down"] }],
|
|
900
|
+
/**
|
|
901
|
+
* Object Position
|
|
902
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
903
|
+
*/
|
|
904
|
+
"object-position": [{ object: scalePositionWithArbitrary() }],
|
|
905
|
+
/**
|
|
906
|
+
* Overflow
|
|
907
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
908
|
+
*/
|
|
909
|
+
overflow: [{ overflow: scaleOverflow() }],
|
|
910
|
+
/**
|
|
911
|
+
* Overflow X
|
|
912
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
913
|
+
*/
|
|
914
|
+
"overflow-x": [{ "overflow-x": scaleOverflow() }],
|
|
915
|
+
/**
|
|
916
|
+
* Overflow Y
|
|
917
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
918
|
+
*/
|
|
919
|
+
"overflow-y": [{ "overflow-y": scaleOverflow() }],
|
|
920
|
+
/**
|
|
921
|
+
* Overscroll Behavior
|
|
922
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
923
|
+
*/
|
|
924
|
+
overscroll: [{ overscroll: scaleOverscroll() }],
|
|
925
|
+
/**
|
|
926
|
+
* Overscroll Behavior X
|
|
927
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
928
|
+
*/
|
|
929
|
+
"overscroll-x": [{ "overscroll-x": scaleOverscroll() }],
|
|
930
|
+
/**
|
|
931
|
+
* Overscroll Behavior Y
|
|
932
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
933
|
+
*/
|
|
934
|
+
"overscroll-y": [{ "overscroll-y": scaleOverscroll() }],
|
|
935
|
+
/**
|
|
936
|
+
* Position
|
|
937
|
+
* @see https://tailwindcss.com/docs/position
|
|
938
|
+
*/
|
|
939
|
+
position: ["static", "fixed", "absolute", "relative", "sticky"],
|
|
940
|
+
/**
|
|
941
|
+
* Inset
|
|
942
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
943
|
+
*/
|
|
944
|
+
inset: [{ inset: scaleInset() }],
|
|
945
|
+
/**
|
|
946
|
+
* Inset Inline
|
|
947
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
948
|
+
*/
|
|
949
|
+
"inset-x": [{ "inset-x": scaleInset() }],
|
|
950
|
+
/**
|
|
951
|
+
* Inset Block
|
|
952
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
953
|
+
*/
|
|
954
|
+
"inset-y": [{ "inset-y": scaleInset() }],
|
|
955
|
+
/**
|
|
956
|
+
* Inset Inline Start
|
|
957
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
958
|
+
* @todo class group will be renamed to `inset-s` in next major release
|
|
959
|
+
*/
|
|
960
|
+
start: [
|
|
961
|
+
{
|
|
962
|
+
"inset-s": scaleInset(),
|
|
963
|
+
/**
|
|
964
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
|
|
965
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
966
|
+
*/
|
|
967
|
+
start: scaleInset()
|
|
968
|
+
}
|
|
969
|
+
],
|
|
970
|
+
/**
|
|
971
|
+
* Inset Inline End
|
|
972
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
973
|
+
* @todo class group will be renamed to `inset-e` in next major release
|
|
974
|
+
*/
|
|
975
|
+
end: [
|
|
976
|
+
{
|
|
977
|
+
"inset-e": scaleInset(),
|
|
978
|
+
/**
|
|
979
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
|
|
980
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
981
|
+
*/
|
|
982
|
+
end: scaleInset()
|
|
983
|
+
}
|
|
984
|
+
],
|
|
985
|
+
/**
|
|
986
|
+
* Inset Block Start
|
|
987
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
988
|
+
*/
|
|
989
|
+
"inset-bs": [{ "inset-bs": scaleInset() }],
|
|
990
|
+
/**
|
|
991
|
+
* Inset Block End
|
|
992
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
993
|
+
*/
|
|
994
|
+
"inset-be": [{ "inset-be": scaleInset() }],
|
|
995
|
+
/**
|
|
996
|
+
* Top
|
|
997
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
998
|
+
*/
|
|
999
|
+
top: [{ top: scaleInset() }],
|
|
1000
|
+
/**
|
|
1001
|
+
* Right
|
|
1002
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1003
|
+
*/
|
|
1004
|
+
right: [{ right: scaleInset() }],
|
|
1005
|
+
/**
|
|
1006
|
+
* Bottom
|
|
1007
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1008
|
+
*/
|
|
1009
|
+
bottom: [{ bottom: scaleInset() }],
|
|
1010
|
+
/**
|
|
1011
|
+
* Left
|
|
1012
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1013
|
+
*/
|
|
1014
|
+
left: [{ left: scaleInset() }],
|
|
1015
|
+
/**
|
|
1016
|
+
* Visibility
|
|
1017
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
1018
|
+
*/
|
|
1019
|
+
visibility: ["visible", "invisible", "collapse"],
|
|
1020
|
+
/**
|
|
1021
|
+
* Z-Index
|
|
1022
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
1023
|
+
*/
|
|
1024
|
+
z: [{ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue] }],
|
|
1025
|
+
// ------------------------
|
|
1026
|
+
// --- Flexbox and Grid ---
|
|
1027
|
+
// ------------------------
|
|
1028
|
+
/**
|
|
1029
|
+
* Flex Basis
|
|
1030
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
1031
|
+
*/
|
|
1032
|
+
basis: [
|
|
1033
|
+
{
|
|
1034
|
+
basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
|
|
1035
|
+
}
|
|
1036
|
+
],
|
|
1037
|
+
/**
|
|
1038
|
+
* Flex Direction
|
|
1039
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
1040
|
+
*/
|
|
1041
|
+
"flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }],
|
|
1042
|
+
/**
|
|
1043
|
+
* Flex Wrap
|
|
1044
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
1045
|
+
*/
|
|
1046
|
+
"flex-wrap": [{ flex: ["nowrap", "wrap", "wrap-reverse"] }],
|
|
1047
|
+
/**
|
|
1048
|
+
* Flex
|
|
1049
|
+
* @see https://tailwindcss.com/docs/flex
|
|
1050
|
+
*/
|
|
1051
|
+
flex: [{ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue] }],
|
|
1052
|
+
/**
|
|
1053
|
+
* Flex Grow
|
|
1054
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
1055
|
+
*/
|
|
1056
|
+
grow: [{ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
1057
|
+
/**
|
|
1058
|
+
* Flex Shrink
|
|
1059
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
1060
|
+
*/
|
|
1061
|
+
shrink: [{ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
1062
|
+
/**
|
|
1063
|
+
* Order
|
|
1064
|
+
* @see https://tailwindcss.com/docs/order
|
|
1065
|
+
*/
|
|
1066
|
+
order: [
|
|
1067
|
+
{
|
|
1068
|
+
order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
/**
|
|
1072
|
+
* Grid Template Columns
|
|
1073
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1074
|
+
*/
|
|
1075
|
+
"grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }],
|
|
1076
|
+
/**
|
|
1077
|
+
* Grid Column Start / End
|
|
1078
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1079
|
+
*/
|
|
1080
|
+
"col-start-end": [{ col: scaleGridColRowStartAndEnd() }],
|
|
1081
|
+
/**
|
|
1082
|
+
* Grid Column Start
|
|
1083
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1084
|
+
*/
|
|
1085
|
+
"col-start": [{ "col-start": scaleGridColRowStartOrEnd() }],
|
|
1086
|
+
/**
|
|
1087
|
+
* Grid Column End
|
|
1088
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1089
|
+
*/
|
|
1090
|
+
"col-end": [{ "col-end": scaleGridColRowStartOrEnd() }],
|
|
1091
|
+
/**
|
|
1092
|
+
* Grid Template Rows
|
|
1093
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1094
|
+
*/
|
|
1095
|
+
"grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }],
|
|
1096
|
+
/**
|
|
1097
|
+
* Grid Row Start / End
|
|
1098
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1099
|
+
*/
|
|
1100
|
+
"row-start-end": [{ row: scaleGridColRowStartAndEnd() }],
|
|
1101
|
+
/**
|
|
1102
|
+
* Grid Row Start
|
|
1103
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1104
|
+
*/
|
|
1105
|
+
"row-start": [{ "row-start": scaleGridColRowStartOrEnd() }],
|
|
1106
|
+
/**
|
|
1107
|
+
* Grid Row End
|
|
1108
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1109
|
+
*/
|
|
1110
|
+
"row-end": [{ "row-end": scaleGridColRowStartOrEnd() }],
|
|
1111
|
+
/**
|
|
1112
|
+
* Grid Auto Flow
|
|
1113
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
1114
|
+
*/
|
|
1115
|
+
"grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }],
|
|
1116
|
+
/**
|
|
1117
|
+
* Grid Auto Columns
|
|
1118
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1119
|
+
*/
|
|
1120
|
+
"auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }],
|
|
1121
|
+
/**
|
|
1122
|
+
* Grid Auto Rows
|
|
1123
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1124
|
+
*/
|
|
1125
|
+
"auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }],
|
|
1126
|
+
/**
|
|
1127
|
+
* Gap
|
|
1128
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1129
|
+
*/
|
|
1130
|
+
gap: [{ gap: scaleUnambiguousSpacing() }],
|
|
1131
|
+
/**
|
|
1132
|
+
* Gap X
|
|
1133
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1134
|
+
*/
|
|
1135
|
+
"gap-x": [{ "gap-x": scaleUnambiguousSpacing() }],
|
|
1136
|
+
/**
|
|
1137
|
+
* Gap Y
|
|
1138
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1139
|
+
*/
|
|
1140
|
+
"gap-y": [{ "gap-y": scaleUnambiguousSpacing() }],
|
|
1141
|
+
/**
|
|
1142
|
+
* Justify Content
|
|
1143
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
1144
|
+
*/
|
|
1145
|
+
"justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }],
|
|
1146
|
+
/**
|
|
1147
|
+
* Justify Items
|
|
1148
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
1149
|
+
*/
|
|
1150
|
+
"justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }],
|
|
1151
|
+
/**
|
|
1152
|
+
* Justify Self
|
|
1153
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
1154
|
+
*/
|
|
1155
|
+
"justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
1156
|
+
/**
|
|
1157
|
+
* Align Content
|
|
1158
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
1159
|
+
*/
|
|
1160
|
+
"align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }],
|
|
1161
|
+
/**
|
|
1162
|
+
* Align Items
|
|
1163
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
1164
|
+
*/
|
|
1165
|
+
"align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
|
|
1166
|
+
/**
|
|
1167
|
+
* Align Self
|
|
1168
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
1169
|
+
*/
|
|
1170
|
+
"align-self": [{ self: ["auto", ...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
|
|
1171
|
+
/**
|
|
1172
|
+
* Place Content
|
|
1173
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
1174
|
+
*/
|
|
1175
|
+
"place-content": [{ "place-content": scaleAlignPrimaryAxis() }],
|
|
1176
|
+
/**
|
|
1177
|
+
* Place Items
|
|
1178
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
1179
|
+
*/
|
|
1180
|
+
"place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }],
|
|
1181
|
+
/**
|
|
1182
|
+
* Place Self
|
|
1183
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
1184
|
+
*/
|
|
1185
|
+
"place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
1186
|
+
// Spacing
|
|
1187
|
+
/**
|
|
1188
|
+
* Padding
|
|
1189
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1190
|
+
*/
|
|
1191
|
+
p: [{ p: scaleUnambiguousSpacing() }],
|
|
1192
|
+
/**
|
|
1193
|
+
* Padding Inline
|
|
1194
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1195
|
+
*/
|
|
1196
|
+
px: [{ px: scaleUnambiguousSpacing() }],
|
|
1197
|
+
/**
|
|
1198
|
+
* Padding Block
|
|
1199
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1200
|
+
*/
|
|
1201
|
+
py: [{ py: scaleUnambiguousSpacing() }],
|
|
1202
|
+
/**
|
|
1203
|
+
* Padding Inline Start
|
|
1204
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1205
|
+
*/
|
|
1206
|
+
ps: [{ ps: scaleUnambiguousSpacing() }],
|
|
1207
|
+
/**
|
|
1208
|
+
* Padding Inline End
|
|
1209
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1210
|
+
*/
|
|
1211
|
+
pe: [{ pe: scaleUnambiguousSpacing() }],
|
|
1212
|
+
/**
|
|
1213
|
+
* Padding Block Start
|
|
1214
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1215
|
+
*/
|
|
1216
|
+
pbs: [{ pbs: scaleUnambiguousSpacing() }],
|
|
1217
|
+
/**
|
|
1218
|
+
* Padding Block End
|
|
1219
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1220
|
+
*/
|
|
1221
|
+
pbe: [{ pbe: scaleUnambiguousSpacing() }],
|
|
1222
|
+
/**
|
|
1223
|
+
* Padding Top
|
|
1224
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1225
|
+
*/
|
|
1226
|
+
pt: [{ pt: scaleUnambiguousSpacing() }],
|
|
1227
|
+
/**
|
|
1228
|
+
* Padding Right
|
|
1229
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1230
|
+
*/
|
|
1231
|
+
pr: [{ pr: scaleUnambiguousSpacing() }],
|
|
1232
|
+
/**
|
|
1233
|
+
* Padding Bottom
|
|
1234
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1235
|
+
*/
|
|
1236
|
+
pb: [{ pb: scaleUnambiguousSpacing() }],
|
|
1237
|
+
/**
|
|
1238
|
+
* Padding Left
|
|
1239
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1240
|
+
*/
|
|
1241
|
+
pl: [{ pl: scaleUnambiguousSpacing() }],
|
|
1242
|
+
/**
|
|
1243
|
+
* Margin
|
|
1244
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1245
|
+
*/
|
|
1246
|
+
m: [{ m: scaleMargin() }],
|
|
1247
|
+
/**
|
|
1248
|
+
* Margin Inline
|
|
1249
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1250
|
+
*/
|
|
1251
|
+
mx: [{ mx: scaleMargin() }],
|
|
1252
|
+
/**
|
|
1253
|
+
* Margin Block
|
|
1254
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1255
|
+
*/
|
|
1256
|
+
my: [{ my: scaleMargin() }],
|
|
1257
|
+
/**
|
|
1258
|
+
* Margin Inline Start
|
|
1259
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1260
|
+
*/
|
|
1261
|
+
ms: [{ ms: scaleMargin() }],
|
|
1262
|
+
/**
|
|
1263
|
+
* Margin Inline End
|
|
1264
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1265
|
+
*/
|
|
1266
|
+
me: [{ me: scaleMargin() }],
|
|
1267
|
+
/**
|
|
1268
|
+
* Margin Block Start
|
|
1269
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1270
|
+
*/
|
|
1271
|
+
mbs: [{ mbs: scaleMargin() }],
|
|
1272
|
+
/**
|
|
1273
|
+
* Margin Block End
|
|
1274
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1275
|
+
*/
|
|
1276
|
+
mbe: [{ mbe: scaleMargin() }],
|
|
1277
|
+
/**
|
|
1278
|
+
* Margin Top
|
|
1279
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1280
|
+
*/
|
|
1281
|
+
mt: [{ mt: scaleMargin() }],
|
|
1282
|
+
/**
|
|
1283
|
+
* Margin Right
|
|
1284
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1285
|
+
*/
|
|
1286
|
+
mr: [{ mr: scaleMargin() }],
|
|
1287
|
+
/**
|
|
1288
|
+
* Margin Bottom
|
|
1289
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1290
|
+
*/
|
|
1291
|
+
mb: [{ mb: scaleMargin() }],
|
|
1292
|
+
/**
|
|
1293
|
+
* Margin Left
|
|
1294
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1295
|
+
*/
|
|
1296
|
+
ml: [{ ml: scaleMargin() }],
|
|
1297
|
+
/**
|
|
1298
|
+
* Space Between X
|
|
1299
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1300
|
+
*/
|
|
1301
|
+
"space-x": [{ "space-x": scaleUnambiguousSpacing() }],
|
|
1302
|
+
/**
|
|
1303
|
+
* Space Between X Reverse
|
|
1304
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1305
|
+
*/
|
|
1306
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
1307
|
+
/**
|
|
1308
|
+
* Space Between Y
|
|
1309
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1310
|
+
*/
|
|
1311
|
+
"space-y": [{ "space-y": scaleUnambiguousSpacing() }],
|
|
1312
|
+
/**
|
|
1313
|
+
* Space Between Y Reverse
|
|
1314
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1315
|
+
*/
|
|
1316
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
1317
|
+
// --------------
|
|
1318
|
+
// --- Sizing ---
|
|
1319
|
+
// --------------
|
|
1320
|
+
/**
|
|
1321
|
+
* Size
|
|
1322
|
+
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
1323
|
+
*/
|
|
1324
|
+
size: [{ size: scaleSizing() }],
|
|
1325
|
+
/**
|
|
1326
|
+
* Inline Size
|
|
1327
|
+
* @see https://tailwindcss.com/docs/width
|
|
1328
|
+
*/
|
|
1329
|
+
"inline-size": [{ inline: ["auto", ...scaleSizingInline()] }],
|
|
1330
|
+
/**
|
|
1331
|
+
* Min-Inline Size
|
|
1332
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1333
|
+
*/
|
|
1334
|
+
"min-inline-size": [{ "min-inline": ["auto", ...scaleSizingInline()] }],
|
|
1335
|
+
/**
|
|
1336
|
+
* Max-Inline Size
|
|
1337
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1338
|
+
*/
|
|
1339
|
+
"max-inline-size": [{ "max-inline": ["none", ...scaleSizingInline()] }],
|
|
1340
|
+
/**
|
|
1341
|
+
* Block Size
|
|
1342
|
+
* @see https://tailwindcss.com/docs/height
|
|
1343
|
+
*/
|
|
1344
|
+
"block-size": [{ block: ["auto", ...scaleSizingBlock()] }],
|
|
1345
|
+
/**
|
|
1346
|
+
* Min-Block Size
|
|
1347
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
1348
|
+
*/
|
|
1349
|
+
"min-block-size": [{ "min-block": ["auto", ...scaleSizingBlock()] }],
|
|
1350
|
+
/**
|
|
1351
|
+
* Max-Block Size
|
|
1352
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
1353
|
+
*/
|
|
1354
|
+
"max-block-size": [{ "max-block": ["none", ...scaleSizingBlock()] }],
|
|
1355
|
+
/**
|
|
1356
|
+
* Width
|
|
1357
|
+
* @see https://tailwindcss.com/docs/width
|
|
1358
|
+
*/
|
|
1359
|
+
w: [{ w: [themeContainer, "screen", ...scaleSizing()] }],
|
|
1360
|
+
/**
|
|
1361
|
+
* Min-Width
|
|
1362
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1363
|
+
*/
|
|
1364
|
+
"min-w": [
|
|
1365
|
+
{
|
|
1366
|
+
"min-w": [
|
|
1367
|
+
themeContainer,
|
|
1368
|
+
"screen",
|
|
1369
|
+
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1370
|
+
"none",
|
|
1371
|
+
...scaleSizing()
|
|
1372
|
+
]
|
|
1373
|
+
}
|
|
1374
|
+
],
|
|
1375
|
+
/**
|
|
1376
|
+
* Max-Width
|
|
1377
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1378
|
+
*/
|
|
1379
|
+
"max-w": [
|
|
1380
|
+
{
|
|
1381
|
+
"max-w": [
|
|
1382
|
+
themeContainer,
|
|
1383
|
+
"screen",
|
|
1384
|
+
"none",
|
|
1385
|
+
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1386
|
+
"prose",
|
|
1387
|
+
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1388
|
+
{ screen: [themeBreakpoint] },
|
|
1389
|
+
...scaleSizing()
|
|
1390
|
+
]
|
|
1391
|
+
}
|
|
1392
|
+
],
|
|
1393
|
+
/**
|
|
1394
|
+
* Height
|
|
1395
|
+
* @see https://tailwindcss.com/docs/height
|
|
1396
|
+
*/
|
|
1397
|
+
h: [{ h: ["screen", "lh", ...scaleSizing()] }],
|
|
1398
|
+
/**
|
|
1399
|
+
* Min-Height
|
|
1400
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
1401
|
+
*/
|
|
1402
|
+
"min-h": [{ "min-h": ["screen", "lh", "none", ...scaleSizing()] }],
|
|
1403
|
+
/**
|
|
1404
|
+
* Max-Height
|
|
1405
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
1406
|
+
*/
|
|
1407
|
+
"max-h": [{ "max-h": ["screen", "lh", ...scaleSizing()] }],
|
|
1408
|
+
// ------------------
|
|
1409
|
+
// --- Typography ---
|
|
1410
|
+
// ------------------
|
|
1411
|
+
/**
|
|
1412
|
+
* Font Size
|
|
1413
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
1414
|
+
*/
|
|
1415
|
+
"font-size": [{ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength] }],
|
|
1416
|
+
/**
|
|
1417
|
+
* Font Smoothing
|
|
1418
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
1419
|
+
*/
|
|
1420
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
1421
|
+
/**
|
|
1422
|
+
* Font Style
|
|
1423
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
1424
|
+
*/
|
|
1425
|
+
"font-style": ["italic", "not-italic"],
|
|
1426
|
+
/**
|
|
1427
|
+
* Font Weight
|
|
1428
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
1429
|
+
*/
|
|
1430
|
+
"font-weight": [
|
|
1431
|
+
{
|
|
1432
|
+
font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
|
|
1433
|
+
}
|
|
1434
|
+
],
|
|
1435
|
+
/**
|
|
1436
|
+
* Font Stretch
|
|
1437
|
+
* @see https://tailwindcss.com/docs/font-stretch
|
|
1438
|
+
*/
|
|
1439
|
+
"font-stretch": [
|
|
1440
|
+
{
|
|
1441
|
+
"font-stretch": [
|
|
1442
|
+
"ultra-condensed",
|
|
1443
|
+
"extra-condensed",
|
|
1444
|
+
"condensed",
|
|
1445
|
+
"semi-condensed",
|
|
1446
|
+
"normal",
|
|
1447
|
+
"semi-expanded",
|
|
1448
|
+
"expanded",
|
|
1449
|
+
"extra-expanded",
|
|
1450
|
+
"ultra-expanded",
|
|
1451
|
+
isPercent,
|
|
1452
|
+
isArbitraryValue
|
|
1453
|
+
]
|
|
1454
|
+
}
|
|
1455
|
+
],
|
|
1456
|
+
/**
|
|
1457
|
+
* Font Family
|
|
1458
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
1459
|
+
*/
|
|
1460
|
+
"font-family": [{ font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont] }],
|
|
1461
|
+
/**
|
|
1462
|
+
* Font Feature Settings
|
|
1463
|
+
* @see https://tailwindcss.com/docs/font-feature-settings
|
|
1464
|
+
*/
|
|
1465
|
+
"font-features": [{ "font-features": [isArbitraryValue] }],
|
|
1466
|
+
/**
|
|
1467
|
+
* Font Variant Numeric
|
|
1468
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1469
|
+
*/
|
|
1470
|
+
"fvn-normal": ["normal-nums"],
|
|
1471
|
+
/**
|
|
1472
|
+
* Font Variant Numeric
|
|
1473
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1474
|
+
*/
|
|
1475
|
+
"fvn-ordinal": ["ordinal"],
|
|
1476
|
+
/**
|
|
1477
|
+
* Font Variant Numeric
|
|
1478
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1479
|
+
*/
|
|
1480
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
1481
|
+
/**
|
|
1482
|
+
* Font Variant Numeric
|
|
1483
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1484
|
+
*/
|
|
1485
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
1486
|
+
/**
|
|
1487
|
+
* Font Variant Numeric
|
|
1488
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1489
|
+
*/
|
|
1490
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
1491
|
+
/**
|
|
1492
|
+
* Font Variant Numeric
|
|
1493
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1494
|
+
*/
|
|
1495
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
1496
|
+
/**
|
|
1497
|
+
* Letter Spacing
|
|
1498
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
1499
|
+
*/
|
|
1500
|
+
tracking: [{ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue] }],
|
|
1501
|
+
/**
|
|
1502
|
+
* Line Clamp
|
|
1503
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
1504
|
+
*/
|
|
1505
|
+
"line-clamp": [{ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber] }],
|
|
1506
|
+
/**
|
|
1507
|
+
* Line Height
|
|
1508
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
1509
|
+
*/
|
|
1510
|
+
leading: [
|
|
1511
|
+
{
|
|
1512
|
+
leading: [
|
|
1513
|
+
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1514
|
+
themeLeading,
|
|
1515
|
+
...scaleUnambiguousSpacing()
|
|
1516
|
+
]
|
|
1517
|
+
}
|
|
1518
|
+
],
|
|
1519
|
+
/**
|
|
1520
|
+
* List Style Image
|
|
1521
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
1522
|
+
*/
|
|
1523
|
+
"list-image": [{ "list-image": ["none", isArbitraryVariable, isArbitraryValue] }],
|
|
1524
|
+
/**
|
|
1525
|
+
* List Style Position
|
|
1526
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
1527
|
+
*/
|
|
1528
|
+
"list-style-position": [{ list: ["inside", "outside"] }],
|
|
1529
|
+
/**
|
|
1530
|
+
* List Style Type
|
|
1531
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
1532
|
+
*/
|
|
1533
|
+
"list-style-type": [
|
|
1534
|
+
{ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue] }
|
|
1535
|
+
],
|
|
1536
|
+
/**
|
|
1537
|
+
* Text Alignment
|
|
1538
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
1539
|
+
*/
|
|
1540
|
+
"text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }],
|
|
1541
|
+
/**
|
|
1542
|
+
* Placeholder Color
|
|
1543
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
1544
|
+
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
1545
|
+
*/
|
|
1546
|
+
"placeholder-color": [{ placeholder: scaleColor() }],
|
|
1547
|
+
/**
|
|
1548
|
+
* Text Color
|
|
1549
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
1550
|
+
*/
|
|
1551
|
+
"text-color": [{ text: scaleColor() }],
|
|
1552
|
+
/**
|
|
1553
|
+
* Text Decoration
|
|
1554
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
1555
|
+
*/
|
|
1556
|
+
"text-decoration": ["underline", "overline", "line-through", "no-underline"],
|
|
1557
|
+
/**
|
|
1558
|
+
* Text Decoration Style
|
|
1559
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1560
|
+
*/
|
|
1561
|
+
"text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }],
|
|
1562
|
+
/**
|
|
1563
|
+
* Text Decoration Thickness
|
|
1564
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1565
|
+
*/
|
|
1566
|
+
"text-decoration-thickness": [
|
|
1567
|
+
{
|
|
1568
|
+
decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
|
|
1569
|
+
}
|
|
1570
|
+
],
|
|
1571
|
+
/**
|
|
1572
|
+
* Text Decoration Color
|
|
1573
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
1574
|
+
*/
|
|
1575
|
+
"text-decoration-color": [{ decoration: scaleColor() }],
|
|
1576
|
+
/**
|
|
1577
|
+
* Text Underline Offset
|
|
1578
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1579
|
+
*/
|
|
1580
|
+
"underline-offset": [
|
|
1581
|
+
{ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue] }
|
|
1582
|
+
],
|
|
1583
|
+
/**
|
|
1584
|
+
* Text Transform
|
|
1585
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
1586
|
+
*/
|
|
1587
|
+
"text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
|
|
1588
|
+
/**
|
|
1589
|
+
* Text Overflow
|
|
1590
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
1591
|
+
*/
|
|
1592
|
+
"text-overflow": ["truncate", "text-ellipsis", "text-clip"],
|
|
1593
|
+
/**
|
|
1594
|
+
* Text Wrap
|
|
1595
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
1596
|
+
*/
|
|
1597
|
+
"text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }],
|
|
1598
|
+
/**
|
|
1599
|
+
* Text Indent
|
|
1600
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
1601
|
+
*/
|
|
1602
|
+
indent: [{ indent: scaleUnambiguousSpacing() }],
|
|
1603
|
+
/**
|
|
1604
|
+
* Tab Size
|
|
1605
|
+
* @see https://tailwindcss.com/docs/tab-size
|
|
1606
|
+
*/
|
|
1607
|
+
"tab-size": [{ tab: [isInteger, isArbitraryVariable, isArbitraryValue] }],
|
|
1608
|
+
/**
|
|
1609
|
+
* Vertical Alignment
|
|
1610
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
1611
|
+
*/
|
|
1612
|
+
"vertical-align": [
|
|
1613
|
+
{
|
|
1614
|
+
align: [
|
|
1615
|
+
"baseline",
|
|
1616
|
+
"top",
|
|
1617
|
+
"middle",
|
|
1618
|
+
"bottom",
|
|
1619
|
+
"text-top",
|
|
1620
|
+
"text-bottom",
|
|
1621
|
+
"sub",
|
|
1622
|
+
"super",
|
|
1623
|
+
isArbitraryVariable,
|
|
1624
|
+
isArbitraryValue
|
|
1625
|
+
]
|
|
1626
|
+
}
|
|
1627
|
+
],
|
|
1628
|
+
/**
|
|
1629
|
+
* Whitespace
|
|
1630
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
1631
|
+
*/
|
|
1632
|
+
whitespace: [
|
|
1633
|
+
{ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] }
|
|
1634
|
+
],
|
|
1635
|
+
/**
|
|
1636
|
+
* Word Break
|
|
1637
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
1638
|
+
*/
|
|
1639
|
+
break: [{ break: ["normal", "words", "all", "keep"] }],
|
|
1640
|
+
/**
|
|
1641
|
+
* Overflow Wrap
|
|
1642
|
+
* @see https://tailwindcss.com/docs/overflow-wrap
|
|
1643
|
+
*/
|
|
1644
|
+
wrap: [{ wrap: ["break-word", "anywhere", "normal"] }],
|
|
1645
|
+
/**
|
|
1646
|
+
* Hyphens
|
|
1647
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
1648
|
+
*/
|
|
1649
|
+
hyphens: [{ hyphens: ["none", "manual", "auto"] }],
|
|
1650
|
+
/**
|
|
1651
|
+
* Content
|
|
1652
|
+
* @see https://tailwindcss.com/docs/content
|
|
1653
|
+
*/
|
|
1654
|
+
content: [{ content: ["none", isArbitraryVariable, isArbitraryValue] }],
|
|
1655
|
+
// -------------------
|
|
1656
|
+
// --- Backgrounds ---
|
|
1657
|
+
// -------------------
|
|
1658
|
+
/**
|
|
1659
|
+
* Background Attachment
|
|
1660
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
1661
|
+
*/
|
|
1662
|
+
"bg-attachment": [{ bg: ["fixed", "local", "scroll"] }],
|
|
1663
|
+
/**
|
|
1664
|
+
* Background Clip
|
|
1665
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
1666
|
+
*/
|
|
1667
|
+
"bg-clip": [{ "bg-clip": ["border", "padding", "content", "text"] }],
|
|
1668
|
+
/**
|
|
1669
|
+
* Background Origin
|
|
1670
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
1671
|
+
*/
|
|
1672
|
+
"bg-origin": [{ "bg-origin": ["border", "padding", "content"] }],
|
|
1673
|
+
/**
|
|
1674
|
+
* Background Position
|
|
1675
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
1676
|
+
*/
|
|
1677
|
+
"bg-position": [{ bg: scaleBgPosition() }],
|
|
1678
|
+
/**
|
|
1679
|
+
* Background Repeat
|
|
1680
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
1681
|
+
*/
|
|
1682
|
+
"bg-repeat": [{ bg: scaleBgRepeat() }],
|
|
1683
|
+
/**
|
|
1684
|
+
* Background Size
|
|
1685
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
1686
|
+
*/
|
|
1687
|
+
"bg-size": [{ bg: scaleBgSize() }],
|
|
1688
|
+
/**
|
|
1689
|
+
* Background Image
|
|
1690
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
1691
|
+
*/
|
|
1692
|
+
"bg-image": [
|
|
1693
|
+
{
|
|
1694
|
+
bg: [
|
|
1695
|
+
"none",
|
|
1696
|
+
{
|
|
1697
|
+
linear: [
|
|
1698
|
+
{ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"] },
|
|
1699
|
+
isInteger,
|
|
1700
|
+
isArbitraryVariable,
|
|
1701
|
+
isArbitraryValue
|
|
1702
|
+
],
|
|
1703
|
+
radial: ["", isArbitraryVariable, isArbitraryValue],
|
|
1704
|
+
conic: [isInteger, isArbitraryVariable, isArbitraryValue]
|
|
1705
|
+
},
|
|
1706
|
+
isArbitraryVariableImage,
|
|
1707
|
+
isArbitraryImage
|
|
1708
|
+
]
|
|
1709
|
+
}
|
|
1710
|
+
],
|
|
1711
|
+
/**
|
|
1712
|
+
* Background Color
|
|
1713
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
1714
|
+
*/
|
|
1715
|
+
"bg-color": [{ bg: scaleColor() }],
|
|
1716
|
+
/**
|
|
1717
|
+
* Gradient Color Stops From Position
|
|
1718
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1719
|
+
*/
|
|
1720
|
+
"gradient-from-pos": [{ from: scaleGradientStopPosition() }],
|
|
1721
|
+
/**
|
|
1722
|
+
* Gradient Color Stops Via Position
|
|
1723
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1724
|
+
*/
|
|
1725
|
+
"gradient-via-pos": [{ via: scaleGradientStopPosition() }],
|
|
1726
|
+
/**
|
|
1727
|
+
* Gradient Color Stops To Position
|
|
1728
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1729
|
+
*/
|
|
1730
|
+
"gradient-to-pos": [{ to: scaleGradientStopPosition() }],
|
|
1731
|
+
/**
|
|
1732
|
+
* Gradient Color Stops From
|
|
1733
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1734
|
+
*/
|
|
1735
|
+
"gradient-from": [{ from: scaleColor() }],
|
|
1736
|
+
/**
|
|
1737
|
+
* Gradient Color Stops Via
|
|
1738
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1739
|
+
*/
|
|
1740
|
+
"gradient-via": [{ via: scaleColor() }],
|
|
1741
|
+
/**
|
|
1742
|
+
* Gradient Color Stops To
|
|
1743
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1744
|
+
*/
|
|
1745
|
+
"gradient-to": [{ to: scaleColor() }],
|
|
1746
|
+
// ---------------
|
|
1747
|
+
// --- Borders ---
|
|
1748
|
+
// ---------------
|
|
1749
|
+
/**
|
|
1750
|
+
* Border Radius
|
|
1751
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1752
|
+
*/
|
|
1753
|
+
rounded: [{ rounded: scaleRadius() }],
|
|
1754
|
+
/**
|
|
1755
|
+
* Border Radius Start
|
|
1756
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1757
|
+
*/
|
|
1758
|
+
"rounded-s": [{ "rounded-s": scaleRadius() }],
|
|
1759
|
+
/**
|
|
1760
|
+
* Border Radius End
|
|
1761
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1762
|
+
*/
|
|
1763
|
+
"rounded-e": [{ "rounded-e": scaleRadius() }],
|
|
1764
|
+
/**
|
|
1765
|
+
* Border Radius Top
|
|
1766
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1767
|
+
*/
|
|
1768
|
+
"rounded-t": [{ "rounded-t": scaleRadius() }],
|
|
1769
|
+
/**
|
|
1770
|
+
* Border Radius Right
|
|
1771
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1772
|
+
*/
|
|
1773
|
+
"rounded-r": [{ "rounded-r": scaleRadius() }],
|
|
1774
|
+
/**
|
|
1775
|
+
* Border Radius Bottom
|
|
1776
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1777
|
+
*/
|
|
1778
|
+
"rounded-b": [{ "rounded-b": scaleRadius() }],
|
|
1779
|
+
/**
|
|
1780
|
+
* Border Radius Left
|
|
1781
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1782
|
+
*/
|
|
1783
|
+
"rounded-l": [{ "rounded-l": scaleRadius() }],
|
|
1784
|
+
/**
|
|
1785
|
+
* Border Radius Start Start
|
|
1786
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1787
|
+
*/
|
|
1788
|
+
"rounded-ss": [{ "rounded-ss": scaleRadius() }],
|
|
1789
|
+
/**
|
|
1790
|
+
* Border Radius Start End
|
|
1791
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1792
|
+
*/
|
|
1793
|
+
"rounded-se": [{ "rounded-se": scaleRadius() }],
|
|
1794
|
+
/**
|
|
1795
|
+
* Border Radius End End
|
|
1796
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1797
|
+
*/
|
|
1798
|
+
"rounded-ee": [{ "rounded-ee": scaleRadius() }],
|
|
1799
|
+
/**
|
|
1800
|
+
* Border Radius End Start
|
|
1801
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1802
|
+
*/
|
|
1803
|
+
"rounded-es": [{ "rounded-es": scaleRadius() }],
|
|
1804
|
+
/**
|
|
1805
|
+
* Border Radius Top Left
|
|
1806
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1807
|
+
*/
|
|
1808
|
+
"rounded-tl": [{ "rounded-tl": scaleRadius() }],
|
|
1809
|
+
/**
|
|
1810
|
+
* Border Radius Top Right
|
|
1811
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1812
|
+
*/
|
|
1813
|
+
"rounded-tr": [{ "rounded-tr": scaleRadius() }],
|
|
1814
|
+
/**
|
|
1815
|
+
* Border Radius Bottom Right
|
|
1816
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1817
|
+
*/
|
|
1818
|
+
"rounded-br": [{ "rounded-br": scaleRadius() }],
|
|
1819
|
+
/**
|
|
1820
|
+
* Border Radius Bottom Left
|
|
1821
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1822
|
+
*/
|
|
1823
|
+
"rounded-bl": [{ "rounded-bl": scaleRadius() }],
|
|
1824
|
+
/**
|
|
1825
|
+
* Border Width
|
|
1826
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1827
|
+
*/
|
|
1828
|
+
"border-w": [{ border: scaleBorderWidth() }],
|
|
1829
|
+
/**
|
|
1830
|
+
* Border Width Inline
|
|
1831
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1832
|
+
*/
|
|
1833
|
+
"border-w-x": [{ "border-x": scaleBorderWidth() }],
|
|
1834
|
+
/**
|
|
1835
|
+
* Border Width Block
|
|
1836
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1837
|
+
*/
|
|
1838
|
+
"border-w-y": [{ "border-y": scaleBorderWidth() }],
|
|
1839
|
+
/**
|
|
1840
|
+
* Border Width Inline Start
|
|
1841
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1842
|
+
*/
|
|
1843
|
+
"border-w-s": [{ "border-s": scaleBorderWidth() }],
|
|
1844
|
+
/**
|
|
1845
|
+
* Border Width Inline End
|
|
1846
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1847
|
+
*/
|
|
1848
|
+
"border-w-e": [{ "border-e": scaleBorderWidth() }],
|
|
1849
|
+
/**
|
|
1850
|
+
* Border Width Block Start
|
|
1851
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1852
|
+
*/
|
|
1853
|
+
"border-w-bs": [{ "border-bs": scaleBorderWidth() }],
|
|
1854
|
+
/**
|
|
1855
|
+
* Border Width Block End
|
|
1856
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1857
|
+
*/
|
|
1858
|
+
"border-w-be": [{ "border-be": scaleBorderWidth() }],
|
|
1859
|
+
/**
|
|
1860
|
+
* Border Width Top
|
|
1861
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1862
|
+
*/
|
|
1863
|
+
"border-w-t": [{ "border-t": scaleBorderWidth() }],
|
|
1864
|
+
/**
|
|
1865
|
+
* Border Width Right
|
|
1866
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1867
|
+
*/
|
|
1868
|
+
"border-w-r": [{ "border-r": scaleBorderWidth() }],
|
|
1869
|
+
/**
|
|
1870
|
+
* Border Width Bottom
|
|
1871
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1872
|
+
*/
|
|
1873
|
+
"border-w-b": [{ "border-b": scaleBorderWidth() }],
|
|
1874
|
+
/**
|
|
1875
|
+
* Border Width Left
|
|
1876
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1877
|
+
*/
|
|
1878
|
+
"border-w-l": [{ "border-l": scaleBorderWidth() }],
|
|
1879
|
+
/**
|
|
1880
|
+
* Divide Width X
|
|
1881
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1882
|
+
*/
|
|
1883
|
+
"divide-x": [{ "divide-x": scaleBorderWidth() }],
|
|
1884
|
+
/**
|
|
1885
|
+
* Divide Width X Reverse
|
|
1886
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1887
|
+
*/
|
|
1888
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
1889
|
+
/**
|
|
1890
|
+
* Divide Width Y
|
|
1891
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1892
|
+
*/
|
|
1893
|
+
"divide-y": [{ "divide-y": scaleBorderWidth() }],
|
|
1894
|
+
/**
|
|
1895
|
+
* Divide Width Y Reverse
|
|
1896
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1897
|
+
*/
|
|
1898
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
1899
|
+
/**
|
|
1900
|
+
* Border Style
|
|
1901
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
1902
|
+
*/
|
|
1903
|
+
"border-style": [{ border: [...scaleLineStyle(), "hidden", "none"] }],
|
|
1904
|
+
/**
|
|
1905
|
+
* Divide Style
|
|
1906
|
+
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
1907
|
+
*/
|
|
1908
|
+
"divide-style": [{ divide: [...scaleLineStyle(), "hidden", "none"] }],
|
|
1909
|
+
/**
|
|
1910
|
+
* Border Color
|
|
1911
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1912
|
+
*/
|
|
1913
|
+
"border-color": [{ border: scaleColor() }],
|
|
1914
|
+
/**
|
|
1915
|
+
* Border Color Inline
|
|
1916
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1917
|
+
*/
|
|
1918
|
+
"border-color-x": [{ "border-x": scaleColor() }],
|
|
1919
|
+
/**
|
|
1920
|
+
* Border Color Block
|
|
1921
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1922
|
+
*/
|
|
1923
|
+
"border-color-y": [{ "border-y": scaleColor() }],
|
|
1924
|
+
/**
|
|
1925
|
+
* Border Color Inline Start
|
|
1926
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1927
|
+
*/
|
|
1928
|
+
"border-color-s": [{ "border-s": scaleColor() }],
|
|
1929
|
+
/**
|
|
1930
|
+
* Border Color Inline End
|
|
1931
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1932
|
+
*/
|
|
1933
|
+
"border-color-e": [{ "border-e": scaleColor() }],
|
|
1934
|
+
/**
|
|
1935
|
+
* Border Color Block Start
|
|
1936
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1937
|
+
*/
|
|
1938
|
+
"border-color-bs": [{ "border-bs": scaleColor() }],
|
|
1939
|
+
/**
|
|
1940
|
+
* Border Color Block End
|
|
1941
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1942
|
+
*/
|
|
1943
|
+
"border-color-be": [{ "border-be": scaleColor() }],
|
|
1944
|
+
/**
|
|
1945
|
+
* Border Color Top
|
|
1946
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1947
|
+
*/
|
|
1948
|
+
"border-color-t": [{ "border-t": scaleColor() }],
|
|
1949
|
+
/**
|
|
1950
|
+
* Border Color Right
|
|
1951
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1952
|
+
*/
|
|
1953
|
+
"border-color-r": [{ "border-r": scaleColor() }],
|
|
1954
|
+
/**
|
|
1955
|
+
* Border Color Bottom
|
|
1956
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1957
|
+
*/
|
|
1958
|
+
"border-color-b": [{ "border-b": scaleColor() }],
|
|
1959
|
+
/**
|
|
1960
|
+
* Border Color Left
|
|
1961
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1962
|
+
*/
|
|
1963
|
+
"border-color-l": [{ "border-l": scaleColor() }],
|
|
1964
|
+
/**
|
|
1965
|
+
* Divide Color
|
|
1966
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
1967
|
+
*/
|
|
1968
|
+
"divide-color": [{ divide: scaleColor() }],
|
|
1969
|
+
/**
|
|
1970
|
+
* Outline Style
|
|
1971
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
1972
|
+
*/
|
|
1973
|
+
"outline-style": [{ outline: [...scaleLineStyle(), "none", "hidden"] }],
|
|
1974
|
+
/**
|
|
1975
|
+
* Outline Offset
|
|
1976
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
1977
|
+
*/
|
|
1978
|
+
"outline-offset": [{ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
1979
|
+
/**
|
|
1980
|
+
* Outline Width
|
|
1981
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
1982
|
+
*/
|
|
1983
|
+
"outline-w": [{ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength] }],
|
|
1984
|
+
/**
|
|
1985
|
+
* Outline Color
|
|
1986
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
1987
|
+
*/
|
|
1988
|
+
"outline-color": [{ outline: scaleColor() }],
|
|
1989
|
+
// ---------------
|
|
1990
|
+
// --- Effects ---
|
|
1991
|
+
// ---------------
|
|
1992
|
+
/**
|
|
1993
|
+
* Box Shadow
|
|
1994
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
1995
|
+
*/
|
|
1996
|
+
shadow: [
|
|
1997
|
+
{
|
|
1998
|
+
shadow: [
|
|
1999
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
2000
|
+
"",
|
|
2001
|
+
"none",
|
|
2002
|
+
themeShadow,
|
|
2003
|
+
isArbitraryVariableShadow,
|
|
2004
|
+
isArbitraryShadow
|
|
2005
|
+
]
|
|
2006
|
+
}
|
|
2007
|
+
],
|
|
2008
|
+
/**
|
|
2009
|
+
* Box Shadow Color
|
|
2010
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
2011
|
+
*/
|
|
2012
|
+
"shadow-color": [{ shadow: scaleColor() }],
|
|
2013
|
+
/**
|
|
2014
|
+
* Inset Box Shadow
|
|
2015
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
2016
|
+
*/
|
|
2017
|
+
"inset-shadow": [
|
|
2018
|
+
{
|
|
2019
|
+
"inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2020
|
+
}
|
|
2021
|
+
],
|
|
2022
|
+
/**
|
|
2023
|
+
* Inset Box Shadow Color
|
|
2024
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
2025
|
+
*/
|
|
2026
|
+
"inset-shadow-color": [{ "inset-shadow": scaleColor() }],
|
|
2027
|
+
/**
|
|
2028
|
+
* Ring Width
|
|
2029
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
2030
|
+
*/
|
|
2031
|
+
"ring-w": [{ ring: scaleBorderWidth() }],
|
|
2032
|
+
/**
|
|
2033
|
+
* Ring Width Inset
|
|
2034
|
+
* @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
|
|
2035
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2036
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2037
|
+
*/
|
|
2038
|
+
"ring-w-inset": ["ring-inset"],
|
|
2039
|
+
/**
|
|
2040
|
+
* Ring Color
|
|
2041
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
2042
|
+
*/
|
|
2043
|
+
"ring-color": [{ ring: scaleColor() }],
|
|
2044
|
+
/**
|
|
2045
|
+
* Ring Offset Width
|
|
2046
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-width
|
|
2047
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2048
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2049
|
+
*/
|
|
2050
|
+
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
2051
|
+
/**
|
|
2052
|
+
* Ring Offset Color
|
|
2053
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-color
|
|
2054
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2055
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2056
|
+
*/
|
|
2057
|
+
"ring-offset-color": [{ "ring-offset": scaleColor() }],
|
|
2058
|
+
/**
|
|
2059
|
+
* Inset Ring Width
|
|
2060
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
2061
|
+
*/
|
|
2062
|
+
"inset-ring-w": [{ "inset-ring": scaleBorderWidth() }],
|
|
2063
|
+
/**
|
|
2064
|
+
* Inset Ring Color
|
|
2065
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
2066
|
+
*/
|
|
2067
|
+
"inset-ring-color": [{ "inset-ring": scaleColor() }],
|
|
2068
|
+
/**
|
|
2069
|
+
* Text Shadow
|
|
2070
|
+
* @see https://tailwindcss.com/docs/text-shadow
|
|
2071
|
+
*/
|
|
2072
|
+
"text-shadow": [
|
|
2073
|
+
{
|
|
2074
|
+
"text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2075
|
+
}
|
|
2076
|
+
],
|
|
2077
|
+
/**
|
|
2078
|
+
* Text Shadow Color
|
|
2079
|
+
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
2080
|
+
*/
|
|
2081
|
+
"text-shadow-color": [{ "text-shadow": scaleColor() }],
|
|
2082
|
+
/**
|
|
2083
|
+
* Opacity
|
|
2084
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
2085
|
+
*/
|
|
2086
|
+
opacity: [{ opacity: [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2087
|
+
/**
|
|
2088
|
+
* Mix Blend Mode
|
|
2089
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2090
|
+
*/
|
|
2091
|
+
"mix-blend": [{ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"] }],
|
|
2092
|
+
/**
|
|
2093
|
+
* Background Blend Mode
|
|
2094
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2095
|
+
*/
|
|
2096
|
+
"bg-blend": [{ "bg-blend": scaleBlendMode() }],
|
|
2097
|
+
/**
|
|
2098
|
+
* Mask Clip
|
|
2099
|
+
* @see https://tailwindcss.com/docs/mask-clip
|
|
2100
|
+
*/
|
|
2101
|
+
"mask-clip": [
|
|
2102
|
+
{ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"] },
|
|
2103
|
+
"mask-no-clip"
|
|
2104
|
+
],
|
|
2105
|
+
/**
|
|
2106
|
+
* Mask Composite
|
|
2107
|
+
* @see https://tailwindcss.com/docs/mask-composite
|
|
2108
|
+
*/
|
|
2109
|
+
"mask-composite": [{ mask: ["add", "subtract", "intersect", "exclude"] }],
|
|
2110
|
+
/**
|
|
2111
|
+
* Mask Image
|
|
2112
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2113
|
+
*/
|
|
2114
|
+
"mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
|
|
2115
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }],
|
|
2116
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }],
|
|
2117
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }],
|
|
2118
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }],
|
|
2119
|
+
"mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }],
|
|
2120
|
+
"mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }],
|
|
2121
|
+
"mask-image-t-from-color": [{ "mask-t-from": scaleColor() }],
|
|
2122
|
+
"mask-image-t-to-color": [{ "mask-t-to": scaleColor() }],
|
|
2123
|
+
"mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }],
|
|
2124
|
+
"mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }],
|
|
2125
|
+
"mask-image-r-from-color": [{ "mask-r-from": scaleColor() }],
|
|
2126
|
+
"mask-image-r-to-color": [{ "mask-r-to": scaleColor() }],
|
|
2127
|
+
"mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }],
|
|
2128
|
+
"mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }],
|
|
2129
|
+
"mask-image-b-from-color": [{ "mask-b-from": scaleColor() }],
|
|
2130
|
+
"mask-image-b-to-color": [{ "mask-b-to": scaleColor() }],
|
|
2131
|
+
"mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }],
|
|
2132
|
+
"mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }],
|
|
2133
|
+
"mask-image-l-from-color": [{ "mask-l-from": scaleColor() }],
|
|
2134
|
+
"mask-image-l-to-color": [{ "mask-l-to": scaleColor() }],
|
|
2135
|
+
"mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }],
|
|
2136
|
+
"mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }],
|
|
2137
|
+
"mask-image-x-from-color": [{ "mask-x-from": scaleColor() }],
|
|
2138
|
+
"mask-image-x-to-color": [{ "mask-x-to": scaleColor() }],
|
|
2139
|
+
"mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }],
|
|
2140
|
+
"mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }],
|
|
2141
|
+
"mask-image-y-from-color": [{ "mask-y-from": scaleColor() }],
|
|
2142
|
+
"mask-image-y-to-color": [{ "mask-y-to": scaleColor() }],
|
|
2143
|
+
"mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
|
|
2144
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }],
|
|
2145
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }],
|
|
2146
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }],
|
|
2147
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }],
|
|
2148
|
+
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
2149
|
+
"mask-image-radial-size": [
|
|
2150
|
+
{ "mask-radial": [{ closest: ["side", "corner"], farthest: ["side", "corner"] }] }
|
|
2151
|
+
],
|
|
2152
|
+
"mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }],
|
|
2153
|
+
"mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
|
|
2154
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }],
|
|
2155
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }],
|
|
2156
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }],
|
|
2157
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }],
|
|
2158
|
+
/**
|
|
2159
|
+
* Mask Mode
|
|
2160
|
+
* @see https://tailwindcss.com/docs/mask-mode
|
|
2161
|
+
*/
|
|
2162
|
+
"mask-mode": [{ mask: ["alpha", "luminance", "match"] }],
|
|
2163
|
+
/**
|
|
2164
|
+
* Mask Origin
|
|
2165
|
+
* @see https://tailwindcss.com/docs/mask-origin
|
|
2166
|
+
*/
|
|
2167
|
+
"mask-origin": [{ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"] }],
|
|
2168
|
+
/**
|
|
2169
|
+
* Mask Position
|
|
2170
|
+
* @see https://tailwindcss.com/docs/mask-position
|
|
2171
|
+
*/
|
|
2172
|
+
"mask-position": [{ mask: scaleBgPosition() }],
|
|
2173
|
+
/**
|
|
2174
|
+
* Mask Repeat
|
|
2175
|
+
* @see https://tailwindcss.com/docs/mask-repeat
|
|
2176
|
+
*/
|
|
2177
|
+
"mask-repeat": [{ mask: scaleBgRepeat() }],
|
|
2178
|
+
/**
|
|
2179
|
+
* Mask Size
|
|
2180
|
+
* @see https://tailwindcss.com/docs/mask-size
|
|
2181
|
+
*/
|
|
2182
|
+
"mask-size": [{ mask: scaleBgSize() }],
|
|
2183
|
+
/**
|
|
2184
|
+
* Mask Type
|
|
2185
|
+
* @see https://tailwindcss.com/docs/mask-type
|
|
2186
|
+
*/
|
|
2187
|
+
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
2188
|
+
/**
|
|
2189
|
+
* Mask Image
|
|
2190
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2191
|
+
*/
|
|
2192
|
+
"mask-image": [{ mask: ["none", isArbitraryVariable, isArbitraryValue] }],
|
|
2193
|
+
// ---------------
|
|
2194
|
+
// --- Filters ---
|
|
2195
|
+
// ---------------
|
|
2196
|
+
/**
|
|
2197
|
+
* Filter
|
|
2198
|
+
* @see https://tailwindcss.com/docs/filter
|
|
2199
|
+
*/
|
|
2200
|
+
filter: [
|
|
2201
|
+
{
|
|
2202
|
+
filter: [
|
|
2203
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
2204
|
+
"",
|
|
2205
|
+
"none",
|
|
2206
|
+
isArbitraryVariable,
|
|
2207
|
+
isArbitraryValue
|
|
2208
|
+
]
|
|
2209
|
+
}
|
|
2210
|
+
],
|
|
2211
|
+
/**
|
|
2212
|
+
* Blur
|
|
2213
|
+
* @see https://tailwindcss.com/docs/blur
|
|
2214
|
+
*/
|
|
2215
|
+
blur: [{ blur: scaleBlur() }],
|
|
2216
|
+
/**
|
|
2217
|
+
* Brightness
|
|
2218
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
2219
|
+
*/
|
|
2220
|
+
brightness: [{ brightness: [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2221
|
+
/**
|
|
2222
|
+
* Contrast
|
|
2223
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
2224
|
+
*/
|
|
2225
|
+
contrast: [{ contrast: [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2226
|
+
/**
|
|
2227
|
+
* Drop Shadow
|
|
2228
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
2229
|
+
*/
|
|
2230
|
+
"drop-shadow": [
|
|
2231
|
+
{
|
|
2232
|
+
"drop-shadow": [
|
|
2233
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
2234
|
+
"",
|
|
2235
|
+
"none",
|
|
2236
|
+
themeDropShadow,
|
|
2237
|
+
isArbitraryVariableShadow,
|
|
2238
|
+
isArbitraryShadow
|
|
2239
|
+
]
|
|
2240
|
+
}
|
|
2241
|
+
],
|
|
2242
|
+
/**
|
|
2243
|
+
* Drop Shadow Color
|
|
2244
|
+
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
2245
|
+
*/
|
|
2246
|
+
"drop-shadow-color": [{ "drop-shadow": scaleColor() }],
|
|
2247
|
+
/**
|
|
2248
|
+
* Grayscale
|
|
2249
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
2250
|
+
*/
|
|
2251
|
+
grayscale: [{ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2252
|
+
/**
|
|
2253
|
+
* Hue Rotate
|
|
2254
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
2255
|
+
*/
|
|
2256
|
+
"hue-rotate": [{ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2257
|
+
/**
|
|
2258
|
+
* Invert
|
|
2259
|
+
* @see https://tailwindcss.com/docs/invert
|
|
2260
|
+
*/
|
|
2261
|
+
invert: [{ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2262
|
+
/**
|
|
2263
|
+
* Saturate
|
|
2264
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
2265
|
+
*/
|
|
2266
|
+
saturate: [{ saturate: [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2267
|
+
/**
|
|
2268
|
+
* Sepia
|
|
2269
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
2270
|
+
*/
|
|
2271
|
+
sepia: [{ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2272
|
+
/**
|
|
2273
|
+
* Backdrop Filter
|
|
2274
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
2275
|
+
*/
|
|
2276
|
+
"backdrop-filter": [
|
|
2277
|
+
{
|
|
2278
|
+
"backdrop-filter": [
|
|
2279
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
2280
|
+
"",
|
|
2281
|
+
"none",
|
|
2282
|
+
isArbitraryVariable,
|
|
2283
|
+
isArbitraryValue
|
|
2284
|
+
]
|
|
2285
|
+
}
|
|
2286
|
+
],
|
|
2287
|
+
/**
|
|
2288
|
+
* Backdrop Blur
|
|
2289
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
2290
|
+
*/
|
|
2291
|
+
"backdrop-blur": [{ "backdrop-blur": scaleBlur() }],
|
|
2292
|
+
/**
|
|
2293
|
+
* Backdrop Brightness
|
|
2294
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
2295
|
+
*/
|
|
2296
|
+
"backdrop-brightness": [
|
|
2297
|
+
{ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue] }
|
|
2298
|
+
],
|
|
2299
|
+
/**
|
|
2300
|
+
* Backdrop Contrast
|
|
2301
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
2302
|
+
*/
|
|
2303
|
+
"backdrop-contrast": [
|
|
2304
|
+
{ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue] }
|
|
2305
|
+
],
|
|
2306
|
+
/**
|
|
2307
|
+
* Backdrop Grayscale
|
|
2308
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
2309
|
+
*/
|
|
2310
|
+
"backdrop-grayscale": [
|
|
2311
|
+
{ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue] }
|
|
2312
|
+
],
|
|
2313
|
+
/**
|
|
2314
|
+
* Backdrop Hue Rotate
|
|
2315
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
2316
|
+
*/
|
|
2317
|
+
"backdrop-hue-rotate": [
|
|
2318
|
+
{ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue] }
|
|
2319
|
+
],
|
|
2320
|
+
/**
|
|
2321
|
+
* Backdrop Invert
|
|
2322
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
2323
|
+
*/
|
|
2324
|
+
"backdrop-invert": [
|
|
2325
|
+
{ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue] }
|
|
2326
|
+
],
|
|
2327
|
+
/**
|
|
2328
|
+
* Backdrop Opacity
|
|
2329
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
2330
|
+
*/
|
|
2331
|
+
"backdrop-opacity": [{ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2332
|
+
/**
|
|
2333
|
+
* Backdrop Saturate
|
|
2334
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
2335
|
+
*/
|
|
2336
|
+
"backdrop-saturate": [
|
|
2337
|
+
{ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue] }
|
|
2338
|
+
],
|
|
2339
|
+
/**
|
|
2340
|
+
* Backdrop Sepia
|
|
2341
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
2342
|
+
*/
|
|
2343
|
+
"backdrop-sepia": [{ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2344
|
+
// --------------
|
|
2345
|
+
// --- Tables ---
|
|
2346
|
+
// --------------
|
|
2347
|
+
/**
|
|
2348
|
+
* Border Collapse
|
|
2349
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
2350
|
+
*/
|
|
2351
|
+
"border-collapse": [{ border: ["collapse", "separate"] }],
|
|
2352
|
+
/**
|
|
2353
|
+
* Border Spacing
|
|
2354
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2355
|
+
*/
|
|
2356
|
+
"border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }],
|
|
2357
|
+
/**
|
|
2358
|
+
* Border Spacing X
|
|
2359
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2360
|
+
*/
|
|
2361
|
+
"border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }],
|
|
2362
|
+
/**
|
|
2363
|
+
* Border Spacing Y
|
|
2364
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2365
|
+
*/
|
|
2366
|
+
"border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }],
|
|
2367
|
+
/**
|
|
2368
|
+
* Table Layout
|
|
2369
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
2370
|
+
*/
|
|
2371
|
+
"table-layout": [{ table: ["auto", "fixed"] }],
|
|
2372
|
+
/**
|
|
2373
|
+
* Caption Side
|
|
2374
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
2375
|
+
*/
|
|
2376
|
+
caption: [{ caption: ["top", "bottom"] }],
|
|
2377
|
+
// ---------------------------------
|
|
2378
|
+
// --- Transitions and Animation ---
|
|
2379
|
+
// ---------------------------------
|
|
2380
|
+
/**
|
|
2381
|
+
* Transition Property
|
|
2382
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
2383
|
+
*/
|
|
2384
|
+
transition: [
|
|
2385
|
+
{
|
|
2386
|
+
transition: [
|
|
2387
|
+
"",
|
|
2388
|
+
"all",
|
|
2389
|
+
"colors",
|
|
2390
|
+
"opacity",
|
|
2391
|
+
"shadow",
|
|
2392
|
+
"transform",
|
|
2393
|
+
"none",
|
|
2394
|
+
isArbitraryVariable,
|
|
2395
|
+
isArbitraryValue
|
|
2396
|
+
]
|
|
2397
|
+
}
|
|
2398
|
+
],
|
|
2399
|
+
/**
|
|
2400
|
+
* Transition Behavior
|
|
2401
|
+
* @see https://tailwindcss.com/docs/transition-behavior
|
|
2402
|
+
*/
|
|
2403
|
+
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
2404
|
+
/**
|
|
2405
|
+
* Transition Duration
|
|
2406
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
2407
|
+
*/
|
|
2408
|
+
duration: [{ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue] }],
|
|
2409
|
+
/**
|
|
2410
|
+
* Transition Timing Function
|
|
2411
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2412
|
+
*/
|
|
2413
|
+
ease: [{ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue] }],
|
|
2414
|
+
/**
|
|
2415
|
+
* Transition Delay
|
|
2416
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
2417
|
+
*/
|
|
2418
|
+
delay: [{ delay: [isNumber, isArbitraryVariable, isArbitraryValue] }],
|
|
2419
|
+
/**
|
|
2420
|
+
* Animation
|
|
2421
|
+
* @see https://tailwindcss.com/docs/animation
|
|
2422
|
+
*/
|
|
2423
|
+
animate: [{ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue] }],
|
|
2424
|
+
// ------------------
|
|
2425
|
+
// --- Transforms ---
|
|
2426
|
+
// ------------------
|
|
2427
|
+
/**
|
|
2428
|
+
* Backface Visibility
|
|
2429
|
+
* @see https://tailwindcss.com/docs/backface-visibility
|
|
2430
|
+
*/
|
|
2431
|
+
backface: [{ backface: ["hidden", "visible"] }],
|
|
2432
|
+
/**
|
|
2433
|
+
* Perspective
|
|
2434
|
+
* @see https://tailwindcss.com/docs/perspective
|
|
2435
|
+
*/
|
|
2436
|
+
perspective: [{ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue] }],
|
|
2437
|
+
/**
|
|
2438
|
+
* Perspective Origin
|
|
2439
|
+
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2440
|
+
*/
|
|
2441
|
+
"perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }],
|
|
2442
|
+
/**
|
|
2443
|
+
* Rotate
|
|
2444
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2445
|
+
*/
|
|
2446
|
+
rotate: [{ rotate: scaleRotate() }],
|
|
2447
|
+
/**
|
|
2448
|
+
* Rotate X
|
|
2449
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2450
|
+
*/
|
|
2451
|
+
"rotate-x": [{ "rotate-x": scaleRotate() }],
|
|
2452
|
+
/**
|
|
2453
|
+
* Rotate Y
|
|
2454
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2455
|
+
*/
|
|
2456
|
+
"rotate-y": [{ "rotate-y": scaleRotate() }],
|
|
2457
|
+
/**
|
|
2458
|
+
* Rotate Z
|
|
2459
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2460
|
+
*/
|
|
2461
|
+
"rotate-z": [{ "rotate-z": scaleRotate() }],
|
|
2462
|
+
/**
|
|
2463
|
+
* Scale
|
|
2464
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2465
|
+
*/
|
|
2466
|
+
scale: [{ scale: scaleScale() }],
|
|
2467
|
+
/**
|
|
2468
|
+
* Scale X
|
|
2469
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2470
|
+
*/
|
|
2471
|
+
"scale-x": [{ "scale-x": scaleScale() }],
|
|
2472
|
+
/**
|
|
2473
|
+
* Scale Y
|
|
2474
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2475
|
+
*/
|
|
2476
|
+
"scale-y": [{ "scale-y": scaleScale() }],
|
|
2477
|
+
/**
|
|
2478
|
+
* Scale Z
|
|
2479
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2480
|
+
*/
|
|
2481
|
+
"scale-z": [{ "scale-z": scaleScale() }],
|
|
2482
|
+
/**
|
|
2483
|
+
* Scale 3D
|
|
2484
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2485
|
+
*/
|
|
2486
|
+
"scale-3d": ["scale-3d"],
|
|
2487
|
+
/**
|
|
2488
|
+
* Skew
|
|
2489
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2490
|
+
*/
|
|
2491
|
+
skew: [{ skew: scaleSkew() }],
|
|
2492
|
+
/**
|
|
2493
|
+
* Skew X
|
|
2494
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2495
|
+
*/
|
|
2496
|
+
"skew-x": [{ "skew-x": scaleSkew() }],
|
|
2497
|
+
/**
|
|
2498
|
+
* Skew Y
|
|
2499
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2500
|
+
*/
|
|
2501
|
+
"skew-y": [{ "skew-y": scaleSkew() }],
|
|
2502
|
+
/**
|
|
2503
|
+
* Transform
|
|
2504
|
+
* @see https://tailwindcss.com/docs/transform
|
|
2505
|
+
*/
|
|
2506
|
+
transform: [{ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"] }],
|
|
2507
|
+
/**
|
|
2508
|
+
* Transform Origin
|
|
2509
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
2510
|
+
*/
|
|
2511
|
+
"transform-origin": [{ origin: scalePositionWithArbitrary() }],
|
|
2512
|
+
/**
|
|
2513
|
+
* Transform Style
|
|
2514
|
+
* @see https://tailwindcss.com/docs/transform-style
|
|
2515
|
+
*/
|
|
2516
|
+
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
2517
|
+
/**
|
|
2518
|
+
* Translate
|
|
2519
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2520
|
+
*/
|
|
2521
|
+
translate: [{ translate: scaleTranslate() }],
|
|
2522
|
+
/**
|
|
2523
|
+
* Translate X
|
|
2524
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2525
|
+
*/
|
|
2526
|
+
"translate-x": [{ "translate-x": scaleTranslate() }],
|
|
2527
|
+
/**
|
|
2528
|
+
* Translate Y
|
|
2529
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2530
|
+
*/
|
|
2531
|
+
"translate-y": [{ "translate-y": scaleTranslate() }],
|
|
2532
|
+
/**
|
|
2533
|
+
* Translate Z
|
|
2534
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2535
|
+
*/
|
|
2536
|
+
"translate-z": [{ "translate-z": scaleTranslate() }],
|
|
2537
|
+
/**
|
|
2538
|
+
* Translate None
|
|
2539
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2540
|
+
*/
|
|
2541
|
+
"translate-none": ["translate-none"],
|
|
2542
|
+
/**
|
|
2543
|
+
* Zoom
|
|
2544
|
+
* @see https://tailwindcss.com/docs/zoom
|
|
2545
|
+
*/
|
|
2546
|
+
zoom: [{ zoom: [isInteger, isArbitraryVariable, isArbitraryValue] }],
|
|
2547
|
+
// ---------------------
|
|
2548
|
+
// --- Interactivity ---
|
|
2549
|
+
// ---------------------
|
|
2550
|
+
/**
|
|
2551
|
+
* Accent Color
|
|
2552
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
2553
|
+
*/
|
|
2554
|
+
accent: [{ accent: scaleColor() }],
|
|
2555
|
+
/**
|
|
2556
|
+
* Appearance
|
|
2557
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
2558
|
+
*/
|
|
2559
|
+
appearance: [{ appearance: ["none", "auto"] }],
|
|
2560
|
+
/**
|
|
2561
|
+
* Caret Color
|
|
2562
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
2563
|
+
*/
|
|
2564
|
+
"caret-color": [{ caret: scaleColor() }],
|
|
2565
|
+
/**
|
|
2566
|
+
* Color Scheme
|
|
2567
|
+
* @see https://tailwindcss.com/docs/color-scheme
|
|
2568
|
+
*/
|
|
2569
|
+
"color-scheme": [
|
|
2570
|
+
{ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"] }
|
|
2571
|
+
],
|
|
2572
|
+
/**
|
|
2573
|
+
* Cursor
|
|
2574
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
2575
|
+
*/
|
|
2576
|
+
cursor: [
|
|
2577
|
+
{
|
|
2578
|
+
cursor: [
|
|
2579
|
+
"auto",
|
|
2580
|
+
"default",
|
|
2581
|
+
"pointer",
|
|
2582
|
+
"wait",
|
|
2583
|
+
"text",
|
|
2584
|
+
"move",
|
|
2585
|
+
"help",
|
|
2586
|
+
"not-allowed",
|
|
2587
|
+
"none",
|
|
2588
|
+
"context-menu",
|
|
2589
|
+
"progress",
|
|
2590
|
+
"cell",
|
|
2591
|
+
"crosshair",
|
|
2592
|
+
"vertical-text",
|
|
2593
|
+
"alias",
|
|
2594
|
+
"copy",
|
|
2595
|
+
"no-drop",
|
|
2596
|
+
"grab",
|
|
2597
|
+
"grabbing",
|
|
2598
|
+
"all-scroll",
|
|
2599
|
+
"col-resize",
|
|
2600
|
+
"row-resize",
|
|
2601
|
+
"n-resize",
|
|
2602
|
+
"e-resize",
|
|
2603
|
+
"s-resize",
|
|
2604
|
+
"w-resize",
|
|
2605
|
+
"ne-resize",
|
|
2606
|
+
"nw-resize",
|
|
2607
|
+
"se-resize",
|
|
2608
|
+
"sw-resize",
|
|
2609
|
+
"ew-resize",
|
|
2610
|
+
"ns-resize",
|
|
2611
|
+
"nesw-resize",
|
|
2612
|
+
"nwse-resize",
|
|
2613
|
+
"zoom-in",
|
|
2614
|
+
"zoom-out",
|
|
2615
|
+
isArbitraryVariable,
|
|
2616
|
+
isArbitraryValue
|
|
2617
|
+
]
|
|
2618
|
+
}
|
|
2619
|
+
],
|
|
2620
|
+
/**
|
|
2621
|
+
* Field Sizing
|
|
2622
|
+
* @see https://tailwindcss.com/docs/field-sizing
|
|
2623
|
+
*/
|
|
2624
|
+
"field-sizing": [{ "field-sizing": ["fixed", "content"] }],
|
|
2625
|
+
/**
|
|
2626
|
+
* Pointer Events
|
|
2627
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
2628
|
+
*/
|
|
2629
|
+
"pointer-events": [{ "pointer-events": ["auto", "none"] }],
|
|
2630
|
+
/**
|
|
2631
|
+
* Resize
|
|
2632
|
+
* @see https://tailwindcss.com/docs/resize
|
|
2633
|
+
*/
|
|
2634
|
+
resize: [{ resize: ["none", "", "y", "x"] }],
|
|
2635
|
+
/**
|
|
2636
|
+
* Scroll Behavior
|
|
2637
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
2638
|
+
*/
|
|
2639
|
+
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
2640
|
+
/**
|
|
2641
|
+
* Scrollbar Thumb Color
|
|
2642
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
2643
|
+
*/
|
|
2644
|
+
"scrollbar-thumb-color": [{ "scrollbar-thumb": scaleColor() }],
|
|
2645
|
+
/**
|
|
2646
|
+
* Scrollbar Track Color
|
|
2647
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
2648
|
+
*/
|
|
2649
|
+
"scrollbar-track-color": [{ "scrollbar-track": scaleColor() }],
|
|
2650
|
+
/**
|
|
2651
|
+
* Scrollbar Gutter
|
|
2652
|
+
* @see https://tailwindcss.com/docs/scrollbar-gutter
|
|
2653
|
+
*/
|
|
2654
|
+
"scrollbar-gutter": [{ "scrollbar-gutter": ["auto", "stable", "both"] }],
|
|
2655
|
+
/**
|
|
2656
|
+
* Scrollbar Width
|
|
2657
|
+
* @see https://tailwindcss.com/docs/scrollbar-width
|
|
2658
|
+
*/
|
|
2659
|
+
"scrollbar-w": [{ scrollbar: ["auto", "thin", "none"] }],
|
|
2660
|
+
/**
|
|
2661
|
+
* Scroll Margin
|
|
2662
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2663
|
+
*/
|
|
2664
|
+
"scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }],
|
|
2665
|
+
/**
|
|
2666
|
+
* Scroll Margin Inline
|
|
2667
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2668
|
+
*/
|
|
2669
|
+
"scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }],
|
|
2670
|
+
/**
|
|
2671
|
+
* Scroll Margin Block
|
|
2672
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2673
|
+
*/
|
|
2674
|
+
"scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }],
|
|
2675
|
+
/**
|
|
2676
|
+
* Scroll Margin Inline Start
|
|
2677
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2678
|
+
*/
|
|
2679
|
+
"scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }],
|
|
2680
|
+
/**
|
|
2681
|
+
* Scroll Margin Inline End
|
|
2682
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2683
|
+
*/
|
|
2684
|
+
"scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }],
|
|
2685
|
+
/**
|
|
2686
|
+
* Scroll Margin Block Start
|
|
2687
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2688
|
+
*/
|
|
2689
|
+
"scroll-mbs": [{ "scroll-mbs": scaleUnambiguousSpacing() }],
|
|
2690
|
+
/**
|
|
2691
|
+
* Scroll Margin Block End
|
|
2692
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2693
|
+
*/
|
|
2694
|
+
"scroll-mbe": [{ "scroll-mbe": scaleUnambiguousSpacing() }],
|
|
2695
|
+
/**
|
|
2696
|
+
* Scroll Margin Top
|
|
2697
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2698
|
+
*/
|
|
2699
|
+
"scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }],
|
|
2700
|
+
/**
|
|
2701
|
+
* Scroll Margin Right
|
|
2702
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2703
|
+
*/
|
|
2704
|
+
"scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }],
|
|
2705
|
+
/**
|
|
2706
|
+
* Scroll Margin Bottom
|
|
2707
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2708
|
+
*/
|
|
2709
|
+
"scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }],
|
|
2710
|
+
/**
|
|
2711
|
+
* Scroll Margin Left
|
|
2712
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2713
|
+
*/
|
|
2714
|
+
"scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }],
|
|
2715
|
+
/**
|
|
2716
|
+
* Scroll Padding
|
|
2717
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2718
|
+
*/
|
|
2719
|
+
"scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }],
|
|
2720
|
+
/**
|
|
2721
|
+
* Scroll Padding Inline
|
|
2722
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2723
|
+
*/
|
|
2724
|
+
"scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }],
|
|
2725
|
+
/**
|
|
2726
|
+
* Scroll Padding Block
|
|
2727
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2728
|
+
*/
|
|
2729
|
+
"scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }],
|
|
2730
|
+
/**
|
|
2731
|
+
* Scroll Padding Inline Start
|
|
2732
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2733
|
+
*/
|
|
2734
|
+
"scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }],
|
|
2735
|
+
/**
|
|
2736
|
+
* Scroll Padding Inline End
|
|
2737
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2738
|
+
*/
|
|
2739
|
+
"scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }],
|
|
2740
|
+
/**
|
|
2741
|
+
* Scroll Padding Block Start
|
|
2742
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2743
|
+
*/
|
|
2744
|
+
"scroll-pbs": [{ "scroll-pbs": scaleUnambiguousSpacing() }],
|
|
2745
|
+
/**
|
|
2746
|
+
* Scroll Padding Block End
|
|
2747
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2748
|
+
*/
|
|
2749
|
+
"scroll-pbe": [{ "scroll-pbe": scaleUnambiguousSpacing() }],
|
|
2750
|
+
/**
|
|
2751
|
+
* Scroll Padding Top
|
|
2752
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2753
|
+
*/
|
|
2754
|
+
"scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }],
|
|
2755
|
+
/**
|
|
2756
|
+
* Scroll Padding Right
|
|
2757
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2758
|
+
*/
|
|
2759
|
+
"scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }],
|
|
2760
|
+
/**
|
|
2761
|
+
* Scroll Padding Bottom
|
|
2762
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2763
|
+
*/
|
|
2764
|
+
"scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }],
|
|
2765
|
+
/**
|
|
2766
|
+
* Scroll Padding Left
|
|
2767
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2768
|
+
*/
|
|
2769
|
+
"scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }],
|
|
2770
|
+
/**
|
|
2771
|
+
* Scroll Snap Align
|
|
2772
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
2773
|
+
*/
|
|
2774
|
+
"snap-align": [{ snap: ["start", "end", "center", "align-none"] }],
|
|
2775
|
+
/**
|
|
2776
|
+
* Scroll Snap Stop
|
|
2777
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
2778
|
+
*/
|
|
2779
|
+
"snap-stop": [{ snap: ["normal", "always"] }],
|
|
2780
|
+
/**
|
|
2781
|
+
* Scroll Snap Type
|
|
2782
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2783
|
+
*/
|
|
2784
|
+
"snap-type": [{ snap: ["none", "x", "y", "both"] }],
|
|
2785
|
+
/**
|
|
2786
|
+
* Scroll Snap Type Strictness
|
|
2787
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2788
|
+
*/
|
|
2789
|
+
"snap-strictness": [{ snap: ["mandatory", "proximity"] }],
|
|
2790
|
+
/**
|
|
2791
|
+
* Touch Action
|
|
2792
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2793
|
+
*/
|
|
2794
|
+
touch: [{ touch: ["auto", "none", "manipulation"] }],
|
|
2795
|
+
/**
|
|
2796
|
+
* Touch Action X
|
|
2797
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2798
|
+
*/
|
|
2799
|
+
"touch-x": [{ "touch-pan": ["x", "left", "right"] }],
|
|
2800
|
+
/**
|
|
2801
|
+
* Touch Action Y
|
|
2802
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2803
|
+
*/
|
|
2804
|
+
"touch-y": [{ "touch-pan": ["y", "up", "down"] }],
|
|
2805
|
+
/**
|
|
2806
|
+
* Touch Action Pinch Zoom
|
|
2807
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2808
|
+
*/
|
|
2809
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
2810
|
+
/**
|
|
2811
|
+
* User Select
|
|
2812
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
2813
|
+
*/
|
|
2814
|
+
select: [{ select: ["none", "text", "all", "auto"] }],
|
|
2815
|
+
/**
|
|
2816
|
+
* Will Change
|
|
2817
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
2818
|
+
*/
|
|
2819
|
+
"will-change": [
|
|
2820
|
+
{
|
|
2821
|
+
"will-change": [
|
|
2822
|
+
"auto",
|
|
2823
|
+
"scroll",
|
|
2824
|
+
"contents",
|
|
2825
|
+
"transform",
|
|
2826
|
+
isArbitraryVariable,
|
|
2827
|
+
isArbitraryValue
|
|
2828
|
+
]
|
|
2829
|
+
}
|
|
2830
|
+
],
|
|
2831
|
+
// -----------
|
|
2832
|
+
// --- SVG ---
|
|
2833
|
+
// -----------
|
|
2834
|
+
/**
|
|
2835
|
+
* Fill
|
|
2836
|
+
* @see https://tailwindcss.com/docs/fill
|
|
2837
|
+
*/
|
|
2838
|
+
fill: [{ fill: ["none", ...scaleColor()] }],
|
|
2839
|
+
/**
|
|
2840
|
+
* Stroke Width
|
|
2841
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
2842
|
+
*/
|
|
2843
|
+
"stroke-w": [
|
|
2844
|
+
{
|
|
2845
|
+
stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
|
|
2846
|
+
}
|
|
2847
|
+
],
|
|
2848
|
+
/**
|
|
2849
|
+
* Stroke
|
|
2850
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
2851
|
+
*/
|
|
2852
|
+
stroke: [{ stroke: ["none", ...scaleColor()] }],
|
|
2853
|
+
// ---------------------
|
|
2854
|
+
// --- Accessibility ---
|
|
2855
|
+
// ---------------------
|
|
2856
|
+
/**
|
|
2857
|
+
* Forced Color Adjust
|
|
2858
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
2859
|
+
*/
|
|
2860
|
+
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
2861
|
+
},
|
|
2862
|
+
conflictingClassGroups: {
|
|
2863
|
+
"container-named": ["container-type"],
|
|
2864
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
2865
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
2866
|
+
inset: [
|
|
2867
|
+
"inset-x",
|
|
2868
|
+
"inset-y",
|
|
2869
|
+
"inset-bs",
|
|
2870
|
+
"inset-be",
|
|
2871
|
+
"start",
|
|
2872
|
+
"end",
|
|
2873
|
+
"top",
|
|
2874
|
+
"right",
|
|
2875
|
+
"bottom",
|
|
2876
|
+
"left"
|
|
2877
|
+
],
|
|
2878
|
+
"inset-x": ["right", "left"],
|
|
2879
|
+
"inset-y": ["top", "bottom"],
|
|
2880
|
+
flex: ["basis", "grow", "shrink"],
|
|
2881
|
+
gap: ["gap-x", "gap-y"],
|
|
2882
|
+
p: ["px", "py", "ps", "pe", "pbs", "pbe", "pt", "pr", "pb", "pl"],
|
|
2883
|
+
px: ["pr", "pl"],
|
|
2884
|
+
py: ["pt", "pb"],
|
|
2885
|
+
m: ["mx", "my", "ms", "me", "mbs", "mbe", "mt", "mr", "mb", "ml"],
|
|
2886
|
+
mx: ["mr", "ml"],
|
|
2887
|
+
my: ["mt", "mb"],
|
|
2888
|
+
size: ["w", "h"],
|
|
2889
|
+
"font-size": ["leading"],
|
|
2890
|
+
"fvn-normal": [
|
|
2891
|
+
"fvn-ordinal",
|
|
2892
|
+
"fvn-slashed-zero",
|
|
2893
|
+
"fvn-figure",
|
|
2894
|
+
"fvn-spacing",
|
|
2895
|
+
"fvn-fraction"
|
|
2896
|
+
],
|
|
2897
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
2898
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
2899
|
+
"fvn-figure": ["fvn-normal"],
|
|
2900
|
+
"fvn-spacing": ["fvn-normal"],
|
|
2901
|
+
"fvn-fraction": ["fvn-normal"],
|
|
2902
|
+
"line-clamp": ["display", "overflow"],
|
|
2903
|
+
rounded: [
|
|
2904
|
+
"rounded-s",
|
|
2905
|
+
"rounded-e",
|
|
2906
|
+
"rounded-t",
|
|
2907
|
+
"rounded-r",
|
|
2908
|
+
"rounded-b",
|
|
2909
|
+
"rounded-l",
|
|
2910
|
+
"rounded-ss",
|
|
2911
|
+
"rounded-se",
|
|
2912
|
+
"rounded-ee",
|
|
2913
|
+
"rounded-es",
|
|
2914
|
+
"rounded-tl",
|
|
2915
|
+
"rounded-tr",
|
|
2916
|
+
"rounded-br",
|
|
2917
|
+
"rounded-bl"
|
|
2918
|
+
],
|
|
2919
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
2920
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
2921
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
2922
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
2923
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
2924
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
2925
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
2926
|
+
"border-w": [
|
|
2927
|
+
"border-w-x",
|
|
2928
|
+
"border-w-y",
|
|
2929
|
+
"border-w-s",
|
|
2930
|
+
"border-w-e",
|
|
2931
|
+
"border-w-bs",
|
|
2932
|
+
"border-w-be",
|
|
2933
|
+
"border-w-t",
|
|
2934
|
+
"border-w-r",
|
|
2935
|
+
"border-w-b",
|
|
2936
|
+
"border-w-l"
|
|
2937
|
+
],
|
|
2938
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
2939
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
2940
|
+
"border-color": [
|
|
2941
|
+
"border-color-x",
|
|
2942
|
+
"border-color-y",
|
|
2943
|
+
"border-color-s",
|
|
2944
|
+
"border-color-e",
|
|
2945
|
+
"border-color-bs",
|
|
2946
|
+
"border-color-be",
|
|
2947
|
+
"border-color-t",
|
|
2948
|
+
"border-color-r",
|
|
2949
|
+
"border-color-b",
|
|
2950
|
+
"border-color-l"
|
|
2951
|
+
],
|
|
2952
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
2953
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
2954
|
+
translate: ["translate-x", "translate-y", "translate-none"],
|
|
2955
|
+
"translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
|
|
2956
|
+
"scroll-m": [
|
|
2957
|
+
"scroll-mx",
|
|
2958
|
+
"scroll-my",
|
|
2959
|
+
"scroll-ms",
|
|
2960
|
+
"scroll-me",
|
|
2961
|
+
"scroll-mbs",
|
|
2962
|
+
"scroll-mbe",
|
|
2963
|
+
"scroll-mt",
|
|
2964
|
+
"scroll-mr",
|
|
2965
|
+
"scroll-mb",
|
|
2966
|
+
"scroll-ml"
|
|
2967
|
+
],
|
|
2968
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
2969
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
2970
|
+
"scroll-p": [
|
|
2971
|
+
"scroll-px",
|
|
2972
|
+
"scroll-py",
|
|
2973
|
+
"scroll-ps",
|
|
2974
|
+
"scroll-pe",
|
|
2975
|
+
"scroll-pbs",
|
|
2976
|
+
"scroll-pbe",
|
|
2977
|
+
"scroll-pt",
|
|
2978
|
+
"scroll-pr",
|
|
2979
|
+
"scroll-pb",
|
|
2980
|
+
"scroll-pl"
|
|
2981
|
+
],
|
|
2982
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
2983
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
2984
|
+
touch: ["touch-x", "touch-y", "touch-pz"],
|
|
2985
|
+
"touch-x": ["touch"],
|
|
2986
|
+
"touch-y": ["touch"],
|
|
2987
|
+
"touch-pz": ["touch"]
|
|
2988
|
+
},
|
|
2989
|
+
conflictingClassGroupModifiers: {
|
|
2990
|
+
"font-size": ["leading"]
|
|
2991
|
+
},
|
|
2992
|
+
postfixLookupClassGroups: ["container-type"],
|
|
2993
|
+
orderSensitiveModifiers: [
|
|
2994
|
+
"*",
|
|
2995
|
+
"**",
|
|
2996
|
+
"after",
|
|
2997
|
+
"backdrop",
|
|
2998
|
+
"before",
|
|
2999
|
+
"details-content",
|
|
3000
|
+
"file",
|
|
3001
|
+
"first-letter",
|
|
3002
|
+
"first-line",
|
|
3003
|
+
"marker",
|
|
3004
|
+
"placeholder",
|
|
3005
|
+
"selection"
|
|
3006
|
+
]
|
|
3007
|
+
};
|
|
3008
|
+
};
|
|
3009
|
+
|
|
3010
|
+
// src/internal/merge/merge-configs.ts
|
|
3011
|
+
var mergeConfigs = (baseConfig, { extend = {}, override = {} }) => {
|
|
3012
|
+
overrideConfigProperties(baseConfig.theme, override.theme);
|
|
3013
|
+
overrideConfigProperties(baseConfig.classGroups, override.classGroups);
|
|
3014
|
+
overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);
|
|
3015
|
+
overrideConfigProperties(
|
|
3016
|
+
baseConfig.conflictingClassGroupModifiers,
|
|
3017
|
+
override.conflictingClassGroupModifiers
|
|
3018
|
+
);
|
|
3019
|
+
overrideProperty(baseConfig, "postfixLookupClassGroups", override.postfixLookupClassGroups);
|
|
3020
|
+
overrideProperty(baseConfig, "orderSensitiveModifiers", override.orderSensitiveModifiers);
|
|
3021
|
+
mergeConfigProperties(baseConfig.theme, extend.theme);
|
|
3022
|
+
mergeConfigProperties(baseConfig.classGroups, extend.classGroups);
|
|
3023
|
+
mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);
|
|
3024
|
+
mergeConfigProperties(
|
|
3025
|
+
baseConfig.conflictingClassGroupModifiers,
|
|
3026
|
+
extend.conflictingClassGroupModifiers
|
|
3027
|
+
);
|
|
3028
|
+
mergeArrayProperties(baseConfig, extend, "postfixLookupClassGroups");
|
|
3029
|
+
mergeArrayProperties(baseConfig, extend, "orderSensitiveModifiers");
|
|
3030
|
+
return baseConfig;
|
|
3031
|
+
};
|
|
3032
|
+
var overrideProperty = (baseObject, overrideKey, overrideValue) => {
|
|
3033
|
+
if (overrideValue !== void 0) {
|
|
3034
|
+
baseObject[overrideKey] = overrideValue;
|
|
3035
|
+
}
|
|
3036
|
+
};
|
|
3037
|
+
var overrideConfigProperties = (baseObject, overrideObject) => {
|
|
3038
|
+
if (overrideObject) {
|
|
3039
|
+
for (const key in overrideObject) {
|
|
3040
|
+
overrideProperty(baseObject, key, overrideObject[key]);
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
};
|
|
3044
|
+
var mergeConfigProperties = (baseObject, mergeObject) => {
|
|
3045
|
+
if (mergeObject) {
|
|
3046
|
+
for (const key in mergeObject) {
|
|
3047
|
+
mergeArrayProperties(baseObject, mergeObject, key);
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
};
|
|
3051
|
+
var mergeArrayProperties = (baseObject, mergeObject, key) => {
|
|
3052
|
+
const mergeValue = mergeObject[key];
|
|
3053
|
+
if (mergeValue !== void 0) {
|
|
3054
|
+
baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;
|
|
3055
|
+
}
|
|
3056
|
+
};
|
|
3057
|
+
|
|
3058
|
+
// src/internal/merge/index.ts
|
|
3059
|
+
var createMerger = (config) => {
|
|
3060
|
+
if (!config) {
|
|
3061
|
+
return createTailwindMerge(getDefaultConfig);
|
|
3062
|
+
}
|
|
3063
|
+
const createConfig = typeof config === "function" ? () => config(getDefaultConfig()) : () => mergeConfigs(getDefaultConfig(), config);
|
|
3064
|
+
return createTailwindMerge(createConfig);
|
|
3065
|
+
};
|
|
3066
|
+
|
|
3067
|
+
// src/internal/tw-merge.ts
|
|
3068
|
+
var toMergerConfig = (config) => {
|
|
3069
|
+
if (isEmptyObject(config)) return void 0;
|
|
3070
|
+
const source = config;
|
|
3071
|
+
const extend = {
|
|
3072
|
+
...source.extend ?? {}
|
|
3073
|
+
};
|
|
3074
|
+
for (const key of [
|
|
3075
|
+
"theme",
|
|
3076
|
+
"classGroups",
|
|
3077
|
+
"conflictingClassGroups",
|
|
3078
|
+
"conflictingClassGroupModifiers",
|
|
3079
|
+
"postfixLookupClassGroups",
|
|
3080
|
+
"orderSensitiveModifiers",
|
|
3081
|
+
"cacheSize",
|
|
3082
|
+
"prefix",
|
|
3083
|
+
"separator",
|
|
3084
|
+
"experimentalParseClassName"
|
|
3085
|
+
]) {
|
|
3086
|
+
if (source[key] !== void 0 && extend[key] === void 0) {
|
|
3087
|
+
extend[key] = source[key];
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
const result = {};
|
|
3091
|
+
if (Object.keys(extend).length > 0) {
|
|
3092
|
+
result.extend = extend;
|
|
3093
|
+
}
|
|
3094
|
+
if (source.override != null && !isEmptyObject(source.override)) {
|
|
3095
|
+
result.override = source.override;
|
|
3096
|
+
}
|
|
3097
|
+
if (!result.extend && !result.override) return void 0;
|
|
3098
|
+
return result;
|
|
3099
|
+
};
|
|
3100
|
+
var createTwMerge = (cachedTwMergeConfig) => {
|
|
3101
|
+
const extension = toMergerConfig(cachedTwMergeConfig);
|
|
3102
|
+
const merger = createMerger(extension);
|
|
3103
|
+
return (classList) => merger.mergeString(classList);
|
|
3104
|
+
};
|
|
3105
|
+
var defaultMerger;
|
|
3106
|
+
var getDefaultMerger = () => {
|
|
3107
|
+
if (!defaultMerger) defaultMerger = createMerger();
|
|
3108
|
+
return defaultMerger;
|
|
3109
|
+
};
|
|
3110
|
+
var ensureConfiguredMerger = () => {
|
|
22
3111
|
if (!state.cachedTwMerge || state.didTwMergeConfigChange) {
|
|
23
3112
|
state.didTwMergeConfigChange = false;
|
|
24
3113
|
state.cachedTwMerge = createTwMerge(state.cachedTwMergeConfig);
|
|
25
3114
|
}
|
|
26
|
-
return state.cachedTwMerge
|
|
3115
|
+
return state.cachedTwMerge;
|
|
3116
|
+
};
|
|
3117
|
+
var syncTwMergeConfig = (config) => {
|
|
3118
|
+
const next = config == null ? void 0 : config.twMergeConfig;
|
|
3119
|
+
if (!next || isEmptyObject(next)) return;
|
|
3120
|
+
if (!isEqual(next, state.cachedTwMergeConfig)) {
|
|
3121
|
+
state.cachedTwMergeConfig = next;
|
|
3122
|
+
state.didTwMergeConfigChange = true;
|
|
3123
|
+
}
|
|
3124
|
+
};
|
|
3125
|
+
var joinArgs = (classnames) => joinClassValue(classnames);
|
|
3126
|
+
var IS_V8 = (() => {
|
|
3127
|
+
const error = new Error();
|
|
3128
|
+
return !("line" in error) && !("lineNumber" in error);
|
|
3129
|
+
})();
|
|
3130
|
+
var ARG_CACHE_BUCKET_SIZE = 64;
|
|
3131
|
+
var ARG_CACHE_SIZE = 500;
|
|
3132
|
+
var argCache = /* @__PURE__ */ new Map();
|
|
3133
|
+
var previousArgCache = /* @__PURE__ */ new Map();
|
|
3134
|
+
var argCacheCount = 0;
|
|
3135
|
+
var clearArgCache = () => {
|
|
3136
|
+
argCache = /* @__PURE__ */ new Map();
|
|
3137
|
+
previousArgCache = /* @__PURE__ */ new Map();
|
|
3138
|
+
argCacheCount = 0;
|
|
3139
|
+
};
|
|
3140
|
+
var mergeStringDefault = (joined) => {
|
|
3141
|
+
if (!joined) return void 0;
|
|
3142
|
+
if (joined.indexOf(" ") === -1) return joined;
|
|
3143
|
+
return getDefaultMerger().mergeString(joined) || void 0;
|
|
3144
|
+
};
|
|
3145
|
+
var storeArgCache = (firstKey, rest, result) => {
|
|
3146
|
+
let target = argCache.get(firstKey);
|
|
3147
|
+
if (target === void 0) {
|
|
3148
|
+
target = [];
|
|
3149
|
+
argCache.set(firstKey, target);
|
|
3150
|
+
}
|
|
3151
|
+
if (target.length >= ARG_CACHE_BUCKET_SIZE) target.shift();
|
|
3152
|
+
target.push({ rest, result });
|
|
3153
|
+
if (++argCacheCount > ARG_CACHE_SIZE) {
|
|
3154
|
+
argCacheCount = 0;
|
|
3155
|
+
previousArgCache = argCache;
|
|
3156
|
+
argCache = /* @__PURE__ */ new Map();
|
|
3157
|
+
}
|
|
3158
|
+
};
|
|
3159
|
+
var lookupArgCache = (firstKey, firstKeyIndex, truthyStringCount, length, getItem) => {
|
|
3160
|
+
let bucket = argCache.get(firstKey);
|
|
3161
|
+
if (bucket === void 0) bucket = previousArgCache.get(firstKey);
|
|
3162
|
+
if (bucket === void 0) return void 0;
|
|
3163
|
+
for (let entryIndex = 0; entryIndex < bucket.length; entryIndex++) {
|
|
3164
|
+
const entry = bucket[entryIndex];
|
|
3165
|
+
const rest = entry.rest;
|
|
3166
|
+
if (rest.length !== truthyStringCount - 1) continue;
|
|
3167
|
+
let restIndex = 0;
|
|
3168
|
+
let isMatch = true;
|
|
3169
|
+
for (let index = firstKeyIndex + 1; index < length; index++) {
|
|
3170
|
+
const item = getItem(index);
|
|
3171
|
+
if (!item) continue;
|
|
3172
|
+
if (item !== rest[restIndex++]) {
|
|
3173
|
+
isMatch = false;
|
|
3174
|
+
break;
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
if (isMatch) return entry.result;
|
|
3178
|
+
}
|
|
3179
|
+
return void 0;
|
|
3180
|
+
};
|
|
3181
|
+
var mergeVariadicCached = (inputs) => {
|
|
3182
|
+
const length = inputs.length;
|
|
3183
|
+
let firstKey = "";
|
|
3184
|
+
let firstKeyIndex = -1;
|
|
3185
|
+
let truthyStringCount = 0;
|
|
3186
|
+
let everyTruthyIsString = true;
|
|
3187
|
+
for (let index = 0; index < length; index++) {
|
|
3188
|
+
const item = inputs[index];
|
|
3189
|
+
if (!item) continue;
|
|
3190
|
+
if (typeof item !== "string") {
|
|
3191
|
+
everyTruthyIsString = false;
|
|
3192
|
+
break;
|
|
3193
|
+
}
|
|
3194
|
+
if (firstKeyIndex === -1) {
|
|
3195
|
+
firstKey = item;
|
|
3196
|
+
firstKeyIndex = index;
|
|
3197
|
+
}
|
|
3198
|
+
truthyStringCount++;
|
|
3199
|
+
}
|
|
3200
|
+
if (!everyTruthyIsString) {
|
|
3201
|
+
return mergeStringDefault(joinArgs(inputs));
|
|
3202
|
+
}
|
|
3203
|
+
if (truthyStringCount === 0) return void 0;
|
|
3204
|
+
if (truthyStringCount === 1) return mergeStringDefault(firstKey);
|
|
3205
|
+
const cached = lookupArgCache(
|
|
3206
|
+
firstKey,
|
|
3207
|
+
firstKeyIndex,
|
|
3208
|
+
truthyStringCount,
|
|
3209
|
+
length,
|
|
3210
|
+
(index) => inputs[index]
|
|
3211
|
+
);
|
|
3212
|
+
if (cached !== void 0) return cached || void 0;
|
|
3213
|
+
let joined = firstKey;
|
|
3214
|
+
const rest = [];
|
|
3215
|
+
for (let index = firstKeyIndex + 1; index < length; index++) {
|
|
3216
|
+
const item = inputs[index];
|
|
3217
|
+
if (!item) continue;
|
|
3218
|
+
joined += " " + item;
|
|
3219
|
+
rest.push(item);
|
|
3220
|
+
}
|
|
3221
|
+
const result = mergeStringDefault(joined) ?? "";
|
|
3222
|
+
storeArgCache(firstKey, rest, result);
|
|
3223
|
+
return result || void 0;
|
|
3224
|
+
};
|
|
3225
|
+
var mergeVariadicFromGetter = (length, getItem) => {
|
|
3226
|
+
let firstKey = "";
|
|
3227
|
+
let firstKeyIndex = -1;
|
|
3228
|
+
let truthyStringCount = 0;
|
|
3229
|
+
let everyTruthyIsString = true;
|
|
3230
|
+
for (let index = 0; index < length; index++) {
|
|
3231
|
+
const item = getItem(index);
|
|
3232
|
+
if (!item) continue;
|
|
3233
|
+
if (typeof item !== "string") {
|
|
3234
|
+
everyTruthyIsString = false;
|
|
3235
|
+
break;
|
|
3236
|
+
}
|
|
3237
|
+
if (firstKeyIndex === -1) {
|
|
3238
|
+
firstKey = item;
|
|
3239
|
+
firstKeyIndex = index;
|
|
3240
|
+
}
|
|
3241
|
+
truthyStringCount++;
|
|
3242
|
+
}
|
|
3243
|
+
if (!everyTruthyIsString) {
|
|
3244
|
+
const inputs = new Array(length);
|
|
3245
|
+
for (let index = 0; index < length; index++) {
|
|
3246
|
+
inputs[index] = getItem(index);
|
|
3247
|
+
}
|
|
3248
|
+
return mergeStringDefault(joinArgs(inputs));
|
|
3249
|
+
}
|
|
3250
|
+
if (truthyStringCount === 0) return void 0;
|
|
3251
|
+
if (truthyStringCount === 1) return mergeStringDefault(firstKey);
|
|
3252
|
+
const cached = lookupArgCache(firstKey, firstKeyIndex, truthyStringCount, length, getItem);
|
|
3253
|
+
if (cached !== void 0) return cached || void 0;
|
|
3254
|
+
let joined = firstKey;
|
|
3255
|
+
const rest = [];
|
|
3256
|
+
for (let index = firstKeyIndex + 1; index < length; index++) {
|
|
3257
|
+
const item = getItem(index);
|
|
3258
|
+
if (!item) continue;
|
|
3259
|
+
joined += " " + item;
|
|
3260
|
+
rest.push(item);
|
|
3261
|
+
}
|
|
3262
|
+
const result = mergeStringDefault(joined) ?? "";
|
|
3263
|
+
storeArgCache(firstKey, rest, result);
|
|
3264
|
+
return result || void 0;
|
|
27
3265
|
};
|
|
28
|
-
var
|
|
29
|
-
|
|
3266
|
+
var originalStateReset = state.reset.bind(state);
|
|
3267
|
+
state.reset = () => {
|
|
3268
|
+
defaultMerger = void 0;
|
|
3269
|
+
clearArgCache();
|
|
3270
|
+
originalStateReset();
|
|
3271
|
+
};
|
|
3272
|
+
var executeMerge = (classnames, config) => {
|
|
3273
|
+
const base = joinArgs(classnames);
|
|
3274
|
+
if (!base || !((config == null ? void 0 : config.twMerge) ?? true)) return base || void 0;
|
|
3275
|
+
if (base.indexOf(" ") === -1) return base;
|
|
3276
|
+
syncTwMergeConfig(config);
|
|
3277
|
+
const hasCustomConfig = Boolean((config == null ? void 0 : config.twMergeConfig) && !isEmptyObject(config.twMergeConfig));
|
|
3278
|
+
const merge = hasCustomConfig ? ensureConfiguredMerger() : getDefaultMerger().mergeString;
|
|
3279
|
+
return merge(base) || void 0;
|
|
3280
|
+
};
|
|
3281
|
+
var isDefaultMergeConfig = (config) => {
|
|
3282
|
+
if (config == null) return true;
|
|
3283
|
+
if (config.twMerge === false) return false;
|
|
3284
|
+
if (config.twMergeConfig && !isEmptyObject(config.twMergeConfig)) return false;
|
|
3285
|
+
return true;
|
|
3286
|
+
};
|
|
3287
|
+
var cnAdapter = (config, ...classnames) => executeMerge(classnames, config);
|
|
3288
|
+
var cn = function cn2() {
|
|
3289
|
+
const length = arguments.length;
|
|
3290
|
+
if (length === 0) return void 0;
|
|
3291
|
+
const first = arguments[0];
|
|
3292
|
+
if (length === 1) {
|
|
3293
|
+
const joined = typeof first === "string" ? first : joinArgs([first]);
|
|
3294
|
+
return mergeStringDefault(joined);
|
|
3295
|
+
}
|
|
3296
|
+
if (IS_V8) {
|
|
3297
|
+
return mergeVariadicFromGetter(length, (index) => arguments[index]);
|
|
3298
|
+
}
|
|
3299
|
+
const inputs = new Array(length);
|
|
3300
|
+
for (let index = 0; index < length; index++) {
|
|
3301
|
+
inputs[index] = arguments[index];
|
|
3302
|
+
}
|
|
3303
|
+
return mergeStringDefault(joinArgs(inputs));
|
|
30
3304
|
};
|
|
31
3305
|
var cnMerge = (...classnames) => {
|
|
32
|
-
return (config) =>
|
|
3306
|
+
return (config) => {
|
|
3307
|
+
if (isDefaultMergeConfig(config)) {
|
|
3308
|
+
if (IS_V8) return mergeVariadicCached(classnames);
|
|
3309
|
+
return mergeStringDefault(joinArgs(classnames));
|
|
3310
|
+
}
|
|
3311
|
+
return executeMerge(classnames, config);
|
|
3312
|
+
};
|
|
33
3313
|
};
|
|
34
3314
|
|
|
35
|
-
// src/index.
|
|
36
|
-
var
|
|
3315
|
+
// src/index.ts
|
|
3316
|
+
var runtime = getTailwindVariants(cnAdapter);
|
|
3317
|
+
var tv = runtime.tv;
|
|
3318
|
+
var createTV = runtime.createTV;
|
|
3319
|
+
var defaultConfig2 = defaultConfig;
|
|
3320
|
+
var cx2 = cx;
|
|
37
3321
|
|
|
38
|
-
export { cn, cnMerge, createTV, tv };
|
|
3322
|
+
export { cn, cnMerge, createTV, cx2 as cx, defaultConfig2 as defaultConfig, tv };
|