@culur/prettier-plugin-tailwindcss-group 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +558 -0
- package/dist/index.d.mts +673 -0
- package/dist/index.mjs +4194 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +66 -0
- package/src/__tests__/comments.test.ts +171 -0
- package/src/__tests__/plugin-official.test.ts +32 -0
- package/src/__tests__/readme.test.ts +13 -0
- package/src/__tests__/utils/ast-estree.ts +22 -0
- package/src/__tests__/utils/ast-md.ts +101 -0
- package/src/__tests__/utils/test-format.ts +35 -0
- package/src/ast/ast-array-expression.test.ts +33 -0
- package/src/ast/ast-array-expression.ts +20 -0
- package/src/ast/ast-call-expression.test.ts +17 -0
- package/src/ast/ast-call-expression.ts +5 -0
- package/src/ast/ast-comment.test.ts +45 -0
- package/src/ast/ast-comment.ts +25 -0
- package/src/ast/ast-common.ts +29 -0
- package/src/ast/ast-jsx.test.ts +56 -0
- package/src/ast/ast-jsx.ts +53 -0
- package/src/ast/ast-literal.test.ts +47 -0
- package/src/ast/ast-literal.ts +17 -0
- package/src/ast/ast-property.test.ts +96 -0
- package/src/ast/ast-property.ts +32 -0
- package/src/ast/index.ts +8 -0
- package/src/ast/key.test.ts +21 -0
- package/src/ast/key.ts +4 -0
- package/src/group-classes/group-classes.bucket.ts +61 -0
- package/src/group-classes/group-classes.format.ts +39 -0
- package/src/group-classes/group-classes.test.ts +126 -0
- package/src/group-classes/group-classes.ts +34 -0
- package/src/group-classes/group-classes.types.ts +5 -0
- package/src/handle-node/handle-cva-class-value.test.ts +133 -0
- package/src/handle-node/handle-cva-class-value.ts +47 -0
- package/src/handle-node/handle-expressions.test.ts +140 -0
- package/src/handle-node/handle-expressions.ts +63 -0
- package/src/handle-node/handle-string-literal.test.ts +135 -0
- package/src/handle-node/handle-string-literal.ts +53 -0
- package/src/handle-targets/index.ts +3 -0
- package/src/handle-targets/target-cva-base.test.ts +103 -0
- package/src/handle-targets/target-cva-base.ts +17 -0
- package/src/handle-targets/target-cva-compound-variants.test.ts +239 -0
- package/src/handle-targets/target-cva-compound-variants.ts +45 -0
- package/src/handle-targets/target-cva-variants.test.ts +178 -0
- package/src/handle-targets/target-cva-variants.ts +50 -0
- package/src/handle-targets/target-cva.test.ts +126 -0
- package/src/handle-targets/target-cva.ts +33 -0
- package/src/handle-targets/target-jsx.test.ts +242 -0
- package/src/handle-targets/target-jsx.ts +65 -0
- package/src/handle-targets/target-object-properties.test.ts +140 -0
- package/src/handle-targets/target-object-properties.ts +41 -0
- package/src/index.ts +13 -0
- package/src/options.test.ts +73 -0
- package/src/options.ts +94 -0
- package/src/orders/class-groups.test.ts +74 -0
- package/src/orders/class-groups.ts +178 -0
- package/src/orders/class-order.tailwind-merge.ts +26 -0
- package/src/orders/modifier-order.prettier-plugin-tailwindcss.test.ts +33 -0
- package/src/orders/modifier-order.prettier-plugin-tailwindcss.ts +23 -0
- package/src/prettier.d.ts +21 -0
- package/src/printers.test.ts +58 -0
- package/src/printers.ts +29 -0
- package/src/printers.walk-ast.test.ts +58 -0
- package/src/printers.walk-ast.ts +41 -0
- package/src/utils/split-classes.ts +3 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,4194 @@
|
|
|
1
|
+
import estreePlugin from "prettier/plugins/estree.js";
|
|
2
|
+
import { createSorter } from "prettier-plugin-tailwindcss/sorter";
|
|
3
|
+
//#region src/options.ts
|
|
4
|
+
/**
|
|
5
|
+
* Runtime Prettier plugin options configuration.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: TypeScript type augmentation for Prettier's `Options` interface is declared in:
|
|
8
|
+
* @see {@link ./prettier.d.ts}
|
|
9
|
+
*/
|
|
10
|
+
const options = {
|
|
11
|
+
classNameThreshold: {
|
|
12
|
+
type: "int",
|
|
13
|
+
category: "Format",
|
|
14
|
+
default: 10,
|
|
15
|
+
description: "Threshold of class names (split by whitespace) to trigger wrapping."
|
|
16
|
+
},
|
|
17
|
+
modifierThreshold: {
|
|
18
|
+
type: "int",
|
|
19
|
+
category: "Format",
|
|
20
|
+
default: 2,
|
|
21
|
+
description: "Threshold of modifier classes within a category before splitting into separate lines."
|
|
22
|
+
},
|
|
23
|
+
tailwindFunctions: {
|
|
24
|
+
type: "string",
|
|
25
|
+
array: true,
|
|
26
|
+
category: "Format",
|
|
27
|
+
default: [{ value: ["cn"] }],
|
|
28
|
+
description: "List of custom function names that contain Tailwind CSS class names."
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const JS_IDENTIFIER_REGEX = /^[a-z_$][\w$]*$/i;
|
|
32
|
+
/**
|
|
33
|
+
* Validates and resolves plugin options from Prettier runtime options.
|
|
34
|
+
*/
|
|
35
|
+
function resolveOptions(opts) {
|
|
36
|
+
const rawOptions = opts ?? {};
|
|
37
|
+
let tailwindFunctions = ["cn"];
|
|
38
|
+
if (rawOptions.tailwindFunctions !== void 0) {
|
|
39
|
+
if (!Array.isArray(rawOptions.tailwindFunctions)) throw new TypeError("Option \"tailwindFunctions\" must be an array of strings.");
|
|
40
|
+
if (rawOptions.tailwindFunctions.length > 0) tailwindFunctions = rawOptions.tailwindFunctions;
|
|
41
|
+
}
|
|
42
|
+
for (const fnName of tailwindFunctions) if (typeof fnName !== "string" || !JS_IDENTIFIER_REGEX.test(fnName)) throw new Error(`Option "tailwindFunctions" contains invalid function name "${fnName}". Function names must be valid JS/TS identifiers.`);
|
|
43
|
+
if (rawOptions.classNameThreshold !== void 0) {
|
|
44
|
+
if (typeof rawOptions.classNameThreshold !== "number" || !Number.isInteger(rawOptions.classNameThreshold) || rawOptions.classNameThreshold < 0) throw new Error("Option \"classNameThreshold\" must be a non-negative integer.");
|
|
45
|
+
}
|
|
46
|
+
if (rawOptions.modifierThreshold !== void 0) {
|
|
47
|
+
if (typeof rawOptions.modifierThreshold !== "number" || !Number.isInteger(rawOptions.modifierThreshold) || rawOptions.modifierThreshold < 0) throw new Error("Option \"modifierThreshold\" must be a non-negative integer.");
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
classNameThreshold: rawOptions.classNameThreshold ?? 10,
|
|
51
|
+
modifierThreshold: rawOptions.modifierThreshold ?? 2,
|
|
52
|
+
...rawOptions,
|
|
53
|
+
tailwindFunctions
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/ast/ast-literal.ts
|
|
58
|
+
function isLiteral(node) {
|
|
59
|
+
return Boolean(node && node.type === "Literal");
|
|
60
|
+
}
|
|
61
|
+
function isStringLiteral(node) {
|
|
62
|
+
return isLiteral(node) && typeof node.value === "string";
|
|
63
|
+
}
|
|
64
|
+
const buildStringLiteral = (value) => ({
|
|
65
|
+
type: "Literal",
|
|
66
|
+
value,
|
|
67
|
+
raw: JSON.stringify(value)
|
|
68
|
+
});
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/ast/ast-array-expression.ts
|
|
71
|
+
function isArrayExpression(node) {
|
|
72
|
+
return node.type === "ArrayExpression";
|
|
73
|
+
}
|
|
74
|
+
/** Builds an ArrayExpression of StringLiterals from grouped class strings. */
|
|
75
|
+
function buildStringArrayExpression(groups) {
|
|
76
|
+
return {
|
|
77
|
+
type: "ArrayExpression",
|
|
78
|
+
elements: groups.map(buildStringLiteral)
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/ast/ast-call-expression.ts
|
|
83
|
+
function isCallExpression(node) {
|
|
84
|
+
return node.type === "CallExpression";
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/ast/ast-comment.ts
|
|
88
|
+
function isNodeWithComments(node) {
|
|
89
|
+
if (!node) return false;
|
|
90
|
+
const n = node;
|
|
91
|
+
return Boolean(n.comments && n.comments.length > 0 || n.leadingComments && n.leadingComments.length > 0 || n.trailingComments && n.trailingComments.length > 0);
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/ast/ast-common.ts
|
|
95
|
+
const estree = estreePlugin.printers.estree;
|
|
96
|
+
function isNode(value) {
|
|
97
|
+
const node = value;
|
|
98
|
+
return node !== null && typeof node === "object" && typeof node.type === "string";
|
|
99
|
+
}
|
|
100
|
+
function isIdentifier(node, names) {
|
|
101
|
+
if (node.type !== "Identifier") return false;
|
|
102
|
+
if (names !== void 0) {
|
|
103
|
+
if (Array.isArray(names)) {
|
|
104
|
+
if (!names.includes(node.name)) return false;
|
|
105
|
+
} else if (node.name !== names) return false;
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/ast/ast-jsx.ts
|
|
111
|
+
function isJSXAttribute(node) {
|
|
112
|
+
return node.type === "JSXAttribute";
|
|
113
|
+
}
|
|
114
|
+
function isJSXIdentifier(node, name) {
|
|
115
|
+
if (node.type !== "JSXIdentifier") return false;
|
|
116
|
+
if (name !== void 0 && node.name !== name) return false;
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
function isJSXExpressionContainer(node) {
|
|
120
|
+
return node.type === "JSXExpressionContainer";
|
|
121
|
+
}
|
|
122
|
+
function buildExpressionContainer(expression) {
|
|
123
|
+
return {
|
|
124
|
+
type: "JSXExpressionContainer",
|
|
125
|
+
expression
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function buildCallExpression(wrapperName, args) {
|
|
129
|
+
return {
|
|
130
|
+
type: "CallExpression",
|
|
131
|
+
callee: {
|
|
132
|
+
type: "Identifier",
|
|
133
|
+
name: wrapperName
|
|
134
|
+
},
|
|
135
|
+
arguments: args,
|
|
136
|
+
optional: false
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/ast/ast-property.ts
|
|
141
|
+
function isObjectExpression(node) {
|
|
142
|
+
return node.type === "ObjectExpression";
|
|
143
|
+
}
|
|
144
|
+
function isProperty(node) {
|
|
145
|
+
return node.type === "Property";
|
|
146
|
+
}
|
|
147
|
+
function isStaticProperty(node, keyName) {
|
|
148
|
+
if (!isProperty(node) || node.computed) return false;
|
|
149
|
+
const key = isIdentifier(node.key) ? node.key.name : isStringLiteral(node.key) ? node.key.value : null;
|
|
150
|
+
if (key === null) return keyName === void 0 && isLiteral(node.key);
|
|
151
|
+
if (keyName === void 0) return true;
|
|
152
|
+
if (typeof keyName === "function") return keyName(key);
|
|
153
|
+
return key === keyName;
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/ast/key.ts
|
|
157
|
+
const isClassNameKey = (keyName) => keyName.endsWith("ClassName") || keyName.endsWith("className");
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/orders/class-groups.ts
|
|
160
|
+
/**
|
|
161
|
+
* Groups Tailwind CSS classGroupIds into 14 primary categories (+ 1 unknown group) for the plugin.
|
|
162
|
+
* Each category contains a list of corresponding groupIds from tailwind-merge.
|
|
163
|
+
*/
|
|
164
|
+
const classGroups = [
|
|
165
|
+
[
|
|
166
|
+
"group",
|
|
167
|
+
"peer",
|
|
168
|
+
"container-type",
|
|
169
|
+
"container-named"
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
"position",
|
|
173
|
+
"inset",
|
|
174
|
+
"inset-x",
|
|
175
|
+
"inset-y",
|
|
176
|
+
"start",
|
|
177
|
+
"end",
|
|
178
|
+
"inset-bs",
|
|
179
|
+
"inset-be",
|
|
180
|
+
"top",
|
|
181
|
+
"right",
|
|
182
|
+
"bottom",
|
|
183
|
+
"left",
|
|
184
|
+
"float",
|
|
185
|
+
"clear",
|
|
186
|
+
"z"
|
|
187
|
+
],
|
|
188
|
+
[
|
|
189
|
+
"display",
|
|
190
|
+
"sr",
|
|
191
|
+
"isolation",
|
|
192
|
+
"visibility",
|
|
193
|
+
"flex-direction",
|
|
194
|
+
"flex-wrap",
|
|
195
|
+
"flex",
|
|
196
|
+
"grow",
|
|
197
|
+
"shrink",
|
|
198
|
+
"basis",
|
|
199
|
+
"order",
|
|
200
|
+
"grid-cols",
|
|
201
|
+
"col-start-end",
|
|
202
|
+
"col-start",
|
|
203
|
+
"col-end",
|
|
204
|
+
"grid-rows",
|
|
205
|
+
"row-start-end",
|
|
206
|
+
"row-start",
|
|
207
|
+
"row-end",
|
|
208
|
+
"grid-flow",
|
|
209
|
+
"auto-cols",
|
|
210
|
+
"auto-rows",
|
|
211
|
+
"gap",
|
|
212
|
+
"gap-x",
|
|
213
|
+
"gap-y",
|
|
214
|
+
"justify-content",
|
|
215
|
+
"justify-items",
|
|
216
|
+
"justify-self",
|
|
217
|
+
"align-content",
|
|
218
|
+
"align-items",
|
|
219
|
+
"align-self",
|
|
220
|
+
"place-content",
|
|
221
|
+
"place-items",
|
|
222
|
+
"place-self",
|
|
223
|
+
"columns"
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
"w",
|
|
227
|
+
"min-w",
|
|
228
|
+
"max-w",
|
|
229
|
+
"h",
|
|
230
|
+
"min-h",
|
|
231
|
+
"max-h",
|
|
232
|
+
"size",
|
|
233
|
+
"aspect",
|
|
234
|
+
"inline-size",
|
|
235
|
+
"min-inline-size",
|
|
236
|
+
"max-inline-size",
|
|
237
|
+
"block-size",
|
|
238
|
+
"min-block-size",
|
|
239
|
+
"max-block-size",
|
|
240
|
+
"box",
|
|
241
|
+
"container",
|
|
242
|
+
"break-after",
|
|
243
|
+
"break-before",
|
|
244
|
+
"break-inside",
|
|
245
|
+
"p",
|
|
246
|
+
"px",
|
|
247
|
+
"py",
|
|
248
|
+
"ps",
|
|
249
|
+
"pe",
|
|
250
|
+
"pbs",
|
|
251
|
+
"pbe",
|
|
252
|
+
"pt",
|
|
253
|
+
"pr",
|
|
254
|
+
"pb",
|
|
255
|
+
"pl",
|
|
256
|
+
"m",
|
|
257
|
+
"mx",
|
|
258
|
+
"my",
|
|
259
|
+
"ms",
|
|
260
|
+
"me",
|
|
261
|
+
"mbs",
|
|
262
|
+
"mbe",
|
|
263
|
+
"mt",
|
|
264
|
+
"mr",
|
|
265
|
+
"mb",
|
|
266
|
+
"ml",
|
|
267
|
+
"space-x",
|
|
268
|
+
"space-x-reverse",
|
|
269
|
+
"space-y",
|
|
270
|
+
"space-y-reverse"
|
|
271
|
+
],
|
|
272
|
+
[
|
|
273
|
+
"overflow",
|
|
274
|
+
"overflow-x",
|
|
275
|
+
"overflow-y",
|
|
276
|
+
"overscroll",
|
|
277
|
+
"overscroll-x",
|
|
278
|
+
"overscroll-y",
|
|
279
|
+
"scroll-behavior",
|
|
280
|
+
"scrollbar-thumb-color",
|
|
281
|
+
"scrollbar-track-color",
|
|
282
|
+
"scrollbar-gutter",
|
|
283
|
+
"scrollbar-w",
|
|
284
|
+
"scroll-m",
|
|
285
|
+
"scroll-mx",
|
|
286
|
+
"scroll-my",
|
|
287
|
+
"scroll-ms",
|
|
288
|
+
"scroll-me",
|
|
289
|
+
"scroll-mbs",
|
|
290
|
+
"scroll-mbe",
|
|
291
|
+
"scroll-mt",
|
|
292
|
+
"scroll-mr",
|
|
293
|
+
"scroll-mb",
|
|
294
|
+
"scroll-ml",
|
|
295
|
+
"scroll-p",
|
|
296
|
+
"scroll-px",
|
|
297
|
+
"scroll-py",
|
|
298
|
+
"scroll-ps",
|
|
299
|
+
"scroll-pe",
|
|
300
|
+
"scroll-pbs",
|
|
301
|
+
"scroll-pbe",
|
|
302
|
+
"scroll-pt",
|
|
303
|
+
"scroll-pr",
|
|
304
|
+
"scroll-pb",
|
|
305
|
+
"scroll-pl"
|
|
306
|
+
],
|
|
307
|
+
[
|
|
308
|
+
"font-size",
|
|
309
|
+
"font-smoothing",
|
|
310
|
+
"font-style",
|
|
311
|
+
"font-weight",
|
|
312
|
+
"font-stretch",
|
|
313
|
+
"font-family",
|
|
314
|
+
"font-features",
|
|
315
|
+
"fvn-normal",
|
|
316
|
+
"fvn-ordinal",
|
|
317
|
+
"fvn-slashed-zero",
|
|
318
|
+
"fvn-figure",
|
|
319
|
+
"fvn-spacing",
|
|
320
|
+
"fvn-fraction",
|
|
321
|
+
"list-image",
|
|
322
|
+
"list-style-position",
|
|
323
|
+
"list-style-type",
|
|
324
|
+
"placeholder-color",
|
|
325
|
+
"text-color",
|
|
326
|
+
"text-shadow",
|
|
327
|
+
"text-shadow-color",
|
|
328
|
+
"text-decoration",
|
|
329
|
+
"text-decoration-style",
|
|
330
|
+
"text-decoration-thickness",
|
|
331
|
+
"text-decoration-color",
|
|
332
|
+
"underline-offset",
|
|
333
|
+
"line-clamp",
|
|
334
|
+
"text-overflow",
|
|
335
|
+
"text-wrap",
|
|
336
|
+
"whitespace",
|
|
337
|
+
"break",
|
|
338
|
+
"wrap",
|
|
339
|
+
"hyphens",
|
|
340
|
+
"tracking",
|
|
341
|
+
"leading",
|
|
342
|
+
"text-transform",
|
|
343
|
+
"indent",
|
|
344
|
+
"tab-size",
|
|
345
|
+
"vertical-align",
|
|
346
|
+
"text-alignment",
|
|
347
|
+
"content"
|
|
348
|
+
],
|
|
349
|
+
[
|
|
350
|
+
"bg-attachment",
|
|
351
|
+
"bg-clip",
|
|
352
|
+
"bg-origin",
|
|
353
|
+
"bg-position",
|
|
354
|
+
"bg-repeat",
|
|
355
|
+
"bg-size",
|
|
356
|
+
"bg-image",
|
|
357
|
+
"bg-color",
|
|
358
|
+
"gradient-from-pos",
|
|
359
|
+
"gradient-via-pos",
|
|
360
|
+
"gradient-to-pos",
|
|
361
|
+
"gradient-from",
|
|
362
|
+
"gradient-via",
|
|
363
|
+
"gradient-to",
|
|
364
|
+
"box-decoration",
|
|
365
|
+
"object-fit",
|
|
366
|
+
"object-position"
|
|
367
|
+
],
|
|
368
|
+
[
|
|
369
|
+
"filter",
|
|
370
|
+
"blur",
|
|
371
|
+
"brightness",
|
|
372
|
+
"contrast",
|
|
373
|
+
"drop-shadow",
|
|
374
|
+
"drop-shadow-color",
|
|
375
|
+
"grayscale",
|
|
376
|
+
"hue-rotate",
|
|
377
|
+
"invert",
|
|
378
|
+
"saturate",
|
|
379
|
+
"sepia",
|
|
380
|
+
"backdrop-filter",
|
|
381
|
+
"backdrop-blur",
|
|
382
|
+
"backdrop-brightness",
|
|
383
|
+
"backdrop-contrast",
|
|
384
|
+
"backdrop-grayscale",
|
|
385
|
+
"backdrop-hue-rotate",
|
|
386
|
+
"backdrop-invert",
|
|
387
|
+
"backdrop-opacity",
|
|
388
|
+
"backdrop-saturate",
|
|
389
|
+
"backdrop-sepia"
|
|
390
|
+
],
|
|
391
|
+
[
|
|
392
|
+
"border-w",
|
|
393
|
+
"border-w-x",
|
|
394
|
+
"border-w-y",
|
|
395
|
+
"border-w-s",
|
|
396
|
+
"border-w-e",
|
|
397
|
+
"border-w-bs",
|
|
398
|
+
"border-w-be",
|
|
399
|
+
"border-w-t",
|
|
400
|
+
"border-w-r",
|
|
401
|
+
"border-w-b",
|
|
402
|
+
"border-w-l",
|
|
403
|
+
"border-style",
|
|
404
|
+
"border-color",
|
|
405
|
+
"border-color-x",
|
|
406
|
+
"border-color-y",
|
|
407
|
+
"border-color-s",
|
|
408
|
+
"border-color-e",
|
|
409
|
+
"border-color-bs",
|
|
410
|
+
"border-color-be",
|
|
411
|
+
"border-color-t",
|
|
412
|
+
"border-color-r",
|
|
413
|
+
"border-color-b",
|
|
414
|
+
"border-color-l",
|
|
415
|
+
"divide-x",
|
|
416
|
+
"divide-x-reverse",
|
|
417
|
+
"divide-y",
|
|
418
|
+
"divide-y-reverse",
|
|
419
|
+
"divide-style",
|
|
420
|
+
"divide-color",
|
|
421
|
+
"rounded",
|
|
422
|
+
"rounded-s",
|
|
423
|
+
"rounded-e",
|
|
424
|
+
"rounded-t",
|
|
425
|
+
"rounded-r",
|
|
426
|
+
"rounded-b",
|
|
427
|
+
"rounded-l",
|
|
428
|
+
"rounded-ss",
|
|
429
|
+
"rounded-se",
|
|
430
|
+
"rounded-ee",
|
|
431
|
+
"rounded-es",
|
|
432
|
+
"rounded-tl",
|
|
433
|
+
"rounded-tr",
|
|
434
|
+
"rounded-br",
|
|
435
|
+
"rounded-bl",
|
|
436
|
+
"outline-style",
|
|
437
|
+
"outline-offset",
|
|
438
|
+
"outline-w",
|
|
439
|
+
"outline-color",
|
|
440
|
+
"shadow",
|
|
441
|
+
"shadow-color",
|
|
442
|
+
"inset-shadow",
|
|
443
|
+
"inset-shadow-color",
|
|
444
|
+
"ring-w",
|
|
445
|
+
"ring-w-inset",
|
|
446
|
+
"ring-color",
|
|
447
|
+
"ring-offset-w",
|
|
448
|
+
"ring-offset-color",
|
|
449
|
+
"inset-ring-w",
|
|
450
|
+
"inset-ring-color"
|
|
451
|
+
],
|
|
452
|
+
[
|
|
453
|
+
"opacity",
|
|
454
|
+
"mix-blend",
|
|
455
|
+
"bg-blend",
|
|
456
|
+
"mask-clip",
|
|
457
|
+
"mask-composite",
|
|
458
|
+
"mask-image-linear-pos",
|
|
459
|
+
"mask-image-linear-from-pos",
|
|
460
|
+
"mask-image-linear-to-pos",
|
|
461
|
+
"mask-image-linear-from-color",
|
|
462
|
+
"mask-image-linear-to-color",
|
|
463
|
+
"mask-image-t-from-pos",
|
|
464
|
+
"mask-image-t-to-pos",
|
|
465
|
+
"mask-image-t-from-color",
|
|
466
|
+
"mask-image-t-to-color",
|
|
467
|
+
"mask-image-r-from-pos",
|
|
468
|
+
"mask-image-r-to-pos",
|
|
469
|
+
"mask-image-r-from-color",
|
|
470
|
+
"mask-image-r-to-color",
|
|
471
|
+
"mask-image-b-from-pos",
|
|
472
|
+
"mask-image-b-to-pos",
|
|
473
|
+
"mask-image-b-from-color",
|
|
474
|
+
"mask-image-b-to-color",
|
|
475
|
+
"mask-image-l-from-pos",
|
|
476
|
+
"mask-image-l-to-pos",
|
|
477
|
+
"mask-image-l-from-color",
|
|
478
|
+
"mask-image-l-to-color",
|
|
479
|
+
"mask-image-x-from-pos",
|
|
480
|
+
"mask-image-x-to-pos",
|
|
481
|
+
"mask-image-x-from-color",
|
|
482
|
+
"mask-image-x-to-color",
|
|
483
|
+
"mask-image-y-from-pos",
|
|
484
|
+
"mask-image-y-to-pos",
|
|
485
|
+
"mask-image-y-from-color",
|
|
486
|
+
"mask-image-y-to-color",
|
|
487
|
+
"mask-image-radial",
|
|
488
|
+
"mask-image-radial-from-pos",
|
|
489
|
+
"mask-image-radial-to-pos",
|
|
490
|
+
"mask-image-radial-from-color",
|
|
491
|
+
"mask-image-radial-to-color",
|
|
492
|
+
"mask-image-radial-shape",
|
|
493
|
+
"mask-image-radial-size",
|
|
494
|
+
"mask-image-radial-pos",
|
|
495
|
+
"mask-image-conic-pos",
|
|
496
|
+
"mask-image-conic-from-pos",
|
|
497
|
+
"mask-image-conic-to-pos",
|
|
498
|
+
"mask-image-conic-from-color",
|
|
499
|
+
"mask-image-conic-to-color",
|
|
500
|
+
"mask-mode",
|
|
501
|
+
"mask-origin",
|
|
502
|
+
"mask-position",
|
|
503
|
+
"mask-repeat",
|
|
504
|
+
"mask-size",
|
|
505
|
+
"mask-type",
|
|
506
|
+
"mask-image"
|
|
507
|
+
],
|
|
508
|
+
[
|
|
509
|
+
"border-collapse",
|
|
510
|
+
"border-spacing",
|
|
511
|
+
"border-spacing-x",
|
|
512
|
+
"border-spacing-y",
|
|
513
|
+
"table-layout",
|
|
514
|
+
"caption"
|
|
515
|
+
],
|
|
516
|
+
[
|
|
517
|
+
"transition",
|
|
518
|
+
"transition-behavior",
|
|
519
|
+
"duration",
|
|
520
|
+
"ease",
|
|
521
|
+
"delay",
|
|
522
|
+
"animate",
|
|
523
|
+
"backface",
|
|
524
|
+
"perspective",
|
|
525
|
+
"perspective-origin",
|
|
526
|
+
"rotate",
|
|
527
|
+
"rotate-x",
|
|
528
|
+
"rotate-y",
|
|
529
|
+
"rotate-z",
|
|
530
|
+
"scale",
|
|
531
|
+
"scale-x",
|
|
532
|
+
"scale-y",
|
|
533
|
+
"scale-z",
|
|
534
|
+
"scale-3d",
|
|
535
|
+
"skew",
|
|
536
|
+
"skew-x",
|
|
537
|
+
"skew-y",
|
|
538
|
+
"transform",
|
|
539
|
+
"transform-origin",
|
|
540
|
+
"transform-style",
|
|
541
|
+
"translate",
|
|
542
|
+
"translate-x",
|
|
543
|
+
"translate-y",
|
|
544
|
+
"translate-z",
|
|
545
|
+
"translate-none",
|
|
546
|
+
"zoom"
|
|
547
|
+
],
|
|
548
|
+
[
|
|
549
|
+
"accent",
|
|
550
|
+
"forced-color-adjust",
|
|
551
|
+
"appearance",
|
|
552
|
+
"color-scheme",
|
|
553
|
+
"caret-color",
|
|
554
|
+
"cursor",
|
|
555
|
+
"pointer-events",
|
|
556
|
+
"field-sizing",
|
|
557
|
+
"resize",
|
|
558
|
+
"snap-align",
|
|
559
|
+
"snap-stop",
|
|
560
|
+
"snap-type",
|
|
561
|
+
"snap-strictness",
|
|
562
|
+
"touch",
|
|
563
|
+
"touch-x",
|
|
564
|
+
"touch-y",
|
|
565
|
+
"touch-pz",
|
|
566
|
+
"select",
|
|
567
|
+
"will-change"
|
|
568
|
+
],
|
|
569
|
+
[
|
|
570
|
+
"fill",
|
|
571
|
+
"stroke-w",
|
|
572
|
+
"stroke"
|
|
573
|
+
]
|
|
574
|
+
];
|
|
575
|
+
//! Context & Container
|
|
576
|
+
//! Positioning
|
|
577
|
+
//! Display, Flex, Grid
|
|
578
|
+
//! Box Model & Spacing
|
|
579
|
+
//! Overflow & Scroll
|
|
580
|
+
//! Typography
|
|
581
|
+
//! Background
|
|
582
|
+
//! Filter
|
|
583
|
+
//! Border & Shadow
|
|
584
|
+
//! Effect & Mask
|
|
585
|
+
//! Table
|
|
586
|
+
//! Transition & Transform
|
|
587
|
+
//! Interactivity
|
|
588
|
+
//! SVG
|
|
589
|
+
/**
|
|
590
|
+
* Total class group count (14 standard groups + 1 Unknown/Custom group at the end).
|
|
591
|
+
*/
|
|
592
|
+
const classGroupsCount = classGroups.length + 1;
|
|
593
|
+
//#endregion
|
|
594
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/utils.ts
|
|
595
|
+
/**
|
|
596
|
+
* Concatenates two arrays faster than the array spread operator.
|
|
597
|
+
*/
|
|
598
|
+
const concatArrays = (array1, array2) => {
|
|
599
|
+
const combinedArray = new Array(array1.length + array2.length);
|
|
600
|
+
for (let i = 0; i < array1.length; i++) combinedArray[i] = array1[i];
|
|
601
|
+
for (let i = 0; i < array2.length; i++) combinedArray[array1.length + i] = array2[i];
|
|
602
|
+
return combinedArray;
|
|
603
|
+
};
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/class-group-utils.ts
|
|
606
|
+
const createClassValidatorObject = (classGroupId, validator) => ({
|
|
607
|
+
classGroupId,
|
|
608
|
+
validator
|
|
609
|
+
});
|
|
610
|
+
const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
|
|
611
|
+
nextPart,
|
|
612
|
+
validators,
|
|
613
|
+
classGroupId
|
|
614
|
+
});
|
|
615
|
+
const CLASS_PART_SEPARATOR = "-";
|
|
616
|
+
const EMPTY_CONFLICTS = [];
|
|
617
|
+
const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
618
|
+
const createClassGroupUtils = (config) => {
|
|
619
|
+
const classMap = createClassMap(config);
|
|
620
|
+
const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
|
|
621
|
+
const getClassGroupId = (className) => {
|
|
622
|
+
if (className.startsWith("[") && className.endsWith("]")) return getGroupIdForArbitraryProperty(className);
|
|
623
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
624
|
+
const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
|
|
625
|
+
return getGroupRecursive(classParts, startIndex, classMap);
|
|
626
|
+
};
|
|
627
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
628
|
+
if (hasPostfixModifier) {
|
|
629
|
+
const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
|
|
630
|
+
const baseConflicts = conflictingClassGroups[classGroupId];
|
|
631
|
+
if (modifierConflicts) {
|
|
632
|
+
if (baseConflicts) return concatArrays(baseConflicts, modifierConflicts);
|
|
633
|
+
return modifierConflicts;
|
|
634
|
+
}
|
|
635
|
+
return baseConflicts || EMPTY_CONFLICTS;
|
|
636
|
+
}
|
|
637
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
638
|
+
};
|
|
639
|
+
return {
|
|
640
|
+
getClassGroupId,
|
|
641
|
+
getConflictingClassGroupIds
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
645
|
+
if (classParts.length - startIndex === 0) return classPartObject.classGroupId;
|
|
646
|
+
const currentClassPart = classParts[startIndex];
|
|
647
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
648
|
+
if (nextClassPartObject) {
|
|
649
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
650
|
+
if (result) return result;
|
|
651
|
+
}
|
|
652
|
+
const validators = classPartObject.validators;
|
|
653
|
+
if (validators === null) return;
|
|
654
|
+
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
655
|
+
const validatorsLength = validators.length;
|
|
656
|
+
for (let i = 0; i < validatorsLength; i++) {
|
|
657
|
+
const validatorObj = validators[i];
|
|
658
|
+
if (validatorObj.validator(classRest)) return validatorObj.classGroupId;
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
/**
|
|
662
|
+
* Get the class group ID for an arbitrary property.
|
|
663
|
+
*
|
|
664
|
+
* @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
|
|
665
|
+
*/
|
|
666
|
+
const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
667
|
+
const content = className.slice(1, -1);
|
|
668
|
+
const colonIndex = content.indexOf(":");
|
|
669
|
+
const property = content.slice(0, colonIndex);
|
|
670
|
+
return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
|
|
671
|
+
})();
|
|
672
|
+
/**
|
|
673
|
+
* Exported for testing only
|
|
674
|
+
*/
|
|
675
|
+
const createClassMap = (config) => {
|
|
676
|
+
const { theme, classGroups } = config;
|
|
677
|
+
return processClassGroups(classGroups, theme);
|
|
678
|
+
};
|
|
679
|
+
const processClassGroups = (classGroups, theme) => {
|
|
680
|
+
const classMap = createClassPartObject();
|
|
681
|
+
for (const classGroupId in classGroups) {
|
|
682
|
+
const group = classGroups[classGroupId];
|
|
683
|
+
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
684
|
+
}
|
|
685
|
+
return classMap;
|
|
686
|
+
};
|
|
687
|
+
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
688
|
+
const len = classGroup.length;
|
|
689
|
+
for (let i = 0; i < len; i++) {
|
|
690
|
+
const classDefinition = classGroup[i];
|
|
691
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
692
|
+
}
|
|
693
|
+
};
|
|
694
|
+
const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
695
|
+
if (typeof classDefinition === "string") {
|
|
696
|
+
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
if (typeof classDefinition === "function") {
|
|
700
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
704
|
+
};
|
|
705
|
+
const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
706
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
707
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
708
|
+
};
|
|
709
|
+
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
710
|
+
if (isThemeGetter(classDefinition)) {
|
|
711
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
if (classPartObject.validators === null) classPartObject.validators = [];
|
|
715
|
+
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
716
|
+
};
|
|
717
|
+
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
718
|
+
const entries = Object.entries(classDefinition);
|
|
719
|
+
const len = entries.length;
|
|
720
|
+
for (let i = 0; i < len; i++) {
|
|
721
|
+
const [key, value] = entries[i];
|
|
722
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
const getPart = (classPartObject, path) => {
|
|
726
|
+
let current = classPartObject;
|
|
727
|
+
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
728
|
+
const len = parts.length;
|
|
729
|
+
for (let i = 0; i < len; i++) {
|
|
730
|
+
const part = parts[i];
|
|
731
|
+
let next = current.nextPart.get(part);
|
|
732
|
+
if (!next) {
|
|
733
|
+
next = createClassPartObject();
|
|
734
|
+
current.nextPart.set(part, next);
|
|
735
|
+
}
|
|
736
|
+
current = next;
|
|
737
|
+
}
|
|
738
|
+
return current;
|
|
739
|
+
};
|
|
740
|
+
const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
|
|
741
|
+
//#endregion
|
|
742
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/lru-cache.ts
|
|
743
|
+
const createLruCache = (maxCacheSize) => {
|
|
744
|
+
if (maxCacheSize < 1) return {
|
|
745
|
+
get: () => void 0,
|
|
746
|
+
set: () => {}
|
|
747
|
+
};
|
|
748
|
+
let cacheSize = 0;
|
|
749
|
+
let cache = Object.create(null);
|
|
750
|
+
let previousCache = Object.create(null);
|
|
751
|
+
const update = (key, value) => {
|
|
752
|
+
cache[key] = value;
|
|
753
|
+
cacheSize++;
|
|
754
|
+
if (cacheSize > maxCacheSize) {
|
|
755
|
+
cacheSize = 0;
|
|
756
|
+
previousCache = cache;
|
|
757
|
+
cache = Object.create(null);
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
return {
|
|
761
|
+
get(key) {
|
|
762
|
+
let value = cache[key];
|
|
763
|
+
if (value !== void 0) return value;
|
|
764
|
+
if ((value = previousCache[key]) !== void 0) {
|
|
765
|
+
update(key, value);
|
|
766
|
+
return value;
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
set(key, value) {
|
|
770
|
+
if (key in cache) cache[key] = value;
|
|
771
|
+
else update(key, value);
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
};
|
|
775
|
+
const MODIFIER_SEPARATOR = ":";
|
|
776
|
+
const EMPTY_MODIFIERS = [];
|
|
777
|
+
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
778
|
+
modifiers,
|
|
779
|
+
hasImportantModifier,
|
|
780
|
+
baseClassName,
|
|
781
|
+
maybePostfixModifierPosition,
|
|
782
|
+
isExternal
|
|
783
|
+
});
|
|
784
|
+
const createParseClassName = (config) => {
|
|
785
|
+
const { prefix, experimentalParseClassName } = config;
|
|
786
|
+
/**
|
|
787
|
+
* Parse class name into parts.
|
|
788
|
+
*
|
|
789
|
+
* Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
|
|
790
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
|
|
791
|
+
*/
|
|
792
|
+
let parseClassName = (className) => {
|
|
793
|
+
const modifiers = [];
|
|
794
|
+
let bracketDepth = 0;
|
|
795
|
+
let parenDepth = 0;
|
|
796
|
+
let modifierStart = 0;
|
|
797
|
+
let postfixModifierPosition;
|
|
798
|
+
const len = className.length;
|
|
799
|
+
for (let index = 0; index < len; index++) {
|
|
800
|
+
const currentCharacter = className[index];
|
|
801
|
+
if (bracketDepth === 0 && parenDepth === 0) {
|
|
802
|
+
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
803
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
804
|
+
modifierStart = index + 1;
|
|
805
|
+
continue;
|
|
806
|
+
}
|
|
807
|
+
if (currentCharacter === "/") {
|
|
808
|
+
postfixModifierPosition = index;
|
|
809
|
+
continue;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
if (currentCharacter === "[") bracketDepth++;
|
|
813
|
+
else if (currentCharacter === "]") bracketDepth--;
|
|
814
|
+
else if (currentCharacter === "(") parenDepth++;
|
|
815
|
+
else if (currentCharacter === ")") parenDepth--;
|
|
816
|
+
}
|
|
817
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
|
|
818
|
+
let baseClassName = baseClassNameWithImportantModifier;
|
|
819
|
+
let hasImportantModifier = false;
|
|
820
|
+
if (baseClassNameWithImportantModifier.endsWith("!")) {
|
|
821
|
+
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
822
|
+
hasImportantModifier = true;
|
|
823
|
+
} else if (baseClassNameWithImportantModifier.startsWith("!")) {
|
|
824
|
+
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
825
|
+
hasImportantModifier = true;
|
|
826
|
+
}
|
|
827
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
828
|
+
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
829
|
+
};
|
|
830
|
+
if (prefix) {
|
|
831
|
+
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
832
|
+
const parseClassNameOriginal = parseClassName;
|
|
833
|
+
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
|
|
834
|
+
}
|
|
835
|
+
if (experimentalParseClassName) {
|
|
836
|
+
const parseClassNameOriginal = parseClassName;
|
|
837
|
+
parseClassName = (className) => experimentalParseClassName({
|
|
838
|
+
className,
|
|
839
|
+
parseClassName: parseClassNameOriginal
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
return parseClassName;
|
|
843
|
+
};
|
|
844
|
+
//#endregion
|
|
845
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/sort-modifiers.ts
|
|
846
|
+
/**
|
|
847
|
+
* Sorts modifiers according to following schema:
|
|
848
|
+
* - Predefined modifiers are sorted alphabetically
|
|
849
|
+
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
|
|
850
|
+
*/
|
|
851
|
+
const createSortModifiers = (config) => {
|
|
852
|
+
const modifierWeights = /* @__PURE__ */ new Map();
|
|
853
|
+
config.orderSensitiveModifiers.forEach((mod, index) => {
|
|
854
|
+
modifierWeights.set(mod, 1e6 + index);
|
|
855
|
+
});
|
|
856
|
+
return (modifiers) => {
|
|
857
|
+
const result = [];
|
|
858
|
+
let currentSegment = [];
|
|
859
|
+
for (let i = 0; i < modifiers.length; i++) {
|
|
860
|
+
const modifier = modifiers[i];
|
|
861
|
+
const isArbitrary = modifier[0] === "[";
|
|
862
|
+
const isOrderSensitive = modifierWeights.has(modifier);
|
|
863
|
+
if (isArbitrary || isOrderSensitive) {
|
|
864
|
+
if (currentSegment.length > 0) {
|
|
865
|
+
currentSegment.sort();
|
|
866
|
+
result.push(...currentSegment);
|
|
867
|
+
currentSegment = [];
|
|
868
|
+
}
|
|
869
|
+
result.push(modifier);
|
|
870
|
+
} else currentSegment.push(modifier);
|
|
871
|
+
}
|
|
872
|
+
if (currentSegment.length > 0) {
|
|
873
|
+
currentSegment.sort();
|
|
874
|
+
result.push(...currentSegment);
|
|
875
|
+
}
|
|
876
|
+
return result;
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
//#endregion
|
|
880
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/config-utils.ts
|
|
881
|
+
const createConfigUtils = (config) => ({
|
|
882
|
+
cache: createLruCache(config.cacheSize),
|
|
883
|
+
parseClassName: createParseClassName(config),
|
|
884
|
+
sortModifiers: createSortModifiers(config),
|
|
885
|
+
postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
|
|
886
|
+
...createClassGroupUtils(config)
|
|
887
|
+
});
|
|
888
|
+
const createPostfixLookupClassGroupIds = (config) => {
|
|
889
|
+
const lookup = Object.create(null);
|
|
890
|
+
const classGroupIds = config.postfixLookupClassGroups;
|
|
891
|
+
if (classGroupIds) for (let i = 0; i < classGroupIds.length; i++) lookup[classGroupIds[i]] = true;
|
|
892
|
+
return lookup;
|
|
893
|
+
};
|
|
894
|
+
//#endregion
|
|
895
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/from-theme.ts
|
|
896
|
+
const fallbackThemeArr = [];
|
|
897
|
+
const fromTheme = (key) => {
|
|
898
|
+
const themeGetter = (theme) => theme[key] || fallbackThemeArr;
|
|
899
|
+
themeGetter.isThemeGetter = true;
|
|
900
|
+
return themeGetter;
|
|
901
|
+
};
|
|
902
|
+
//#endregion
|
|
903
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/validators.ts
|
|
904
|
+
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
905
|
+
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
906
|
+
const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
|
|
907
|
+
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
908
|
+
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
909
|
+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
910
|
+
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
911
|
+
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
912
|
+
const isFraction = (value) => fractionRegex.test(value);
|
|
913
|
+
const isNumber = (value) => !!value && !Number.isNaN(Number(value));
|
|
914
|
+
const isInteger = (value) => !!value && Number.isInteger(Number(value));
|
|
915
|
+
const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
916
|
+
const isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
917
|
+
const isAny = () => true;
|
|
918
|
+
const isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
|
|
919
|
+
const isNever = () => false;
|
|
920
|
+
const isShadow = (value) => shadowRegex.test(value);
|
|
921
|
+
const isImage = (value) => imageRegex.test(value);
|
|
922
|
+
const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
|
923
|
+
const 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));
|
|
924
|
+
const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
925
|
+
const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
926
|
+
const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
927
|
+
const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
928
|
+
const isArbitraryWeight = (value) => getIsArbitraryValue(value, isLabelWeight, isAny);
|
|
929
|
+
const isArbitraryFamilyName = (value) => getIsArbitraryValue(value, isLabelFamilyName, isNever);
|
|
930
|
+
const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
931
|
+
const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
932
|
+
const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
933
|
+
const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
|
|
934
|
+
const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
|
|
935
|
+
const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
936
|
+
const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
|
|
937
|
+
const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
|
|
938
|
+
const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
|
|
939
|
+
const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
|
|
940
|
+
const isArbitraryVariableWeight = (value) => getIsArbitraryVariable(value, isLabelWeight, true);
|
|
941
|
+
const getIsArbitraryValue = (value, testLabel, testValue) => {
|
|
942
|
+
const result = arbitraryValueRegex.exec(value);
|
|
943
|
+
if (result) {
|
|
944
|
+
if (result[1]) return testLabel(result[1]);
|
|
945
|
+
return testValue(result[2]);
|
|
946
|
+
}
|
|
947
|
+
return false;
|
|
948
|
+
};
|
|
949
|
+
const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
|
|
950
|
+
const result = arbitraryVariableRegex.exec(value);
|
|
951
|
+
if (result) {
|
|
952
|
+
if (result[1]) return testLabel(result[1]);
|
|
953
|
+
return shouldMatchNoLabel;
|
|
954
|
+
}
|
|
955
|
+
return false;
|
|
956
|
+
};
|
|
957
|
+
const isLabelPosition = (label) => label === "position" || label === "percentage";
|
|
958
|
+
const isLabelImage = (label) => label === "image" || label === "url";
|
|
959
|
+
const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
|
|
960
|
+
const isLabelLength = (label) => label === "length";
|
|
961
|
+
const isLabelNumber = (label) => label === "number";
|
|
962
|
+
const isLabelFamilyName = (label) => label === "family-name";
|
|
963
|
+
const isLabelWeight = (label) => label === "number" || label === "weight";
|
|
964
|
+
const isLabelShadow = (label) => label === "shadow";
|
|
965
|
+
//#endregion
|
|
966
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/default-config.ts
|
|
967
|
+
const getDefaultConfig = () => {
|
|
968
|
+
/**
|
|
969
|
+
* Theme getters for theme variable namespaces
|
|
970
|
+
* @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
|
|
971
|
+
*/
|
|
972
|
+
const themeColor = fromTheme("color");
|
|
973
|
+
const themeFont = fromTheme("font");
|
|
974
|
+
const themeText = fromTheme("text");
|
|
975
|
+
const themeFontWeight = fromTheme("font-weight");
|
|
976
|
+
const themeTracking = fromTheme("tracking");
|
|
977
|
+
const themeLeading = fromTheme("leading");
|
|
978
|
+
const themeBreakpoint = fromTheme("breakpoint");
|
|
979
|
+
const themeContainer = fromTheme("container");
|
|
980
|
+
const themeSpacing = fromTheme("spacing");
|
|
981
|
+
const themeRadius = fromTheme("radius");
|
|
982
|
+
const themeShadow = fromTheme("shadow");
|
|
983
|
+
const themeInsetShadow = fromTheme("inset-shadow");
|
|
984
|
+
const themeTextShadow = fromTheme("text-shadow");
|
|
985
|
+
const themeDropShadow = fromTheme("drop-shadow");
|
|
986
|
+
const themeBlur = fromTheme("blur");
|
|
987
|
+
const themePerspective = fromTheme("perspective");
|
|
988
|
+
const themeAspect = fromTheme("aspect");
|
|
989
|
+
const themeEase = fromTheme("ease");
|
|
990
|
+
const themeAnimate = fromTheme("animate");
|
|
991
|
+
/**
|
|
992
|
+
* Helpers to avoid repeating the same scales
|
|
993
|
+
*
|
|
994
|
+
* We use functions that create a new array every time they're called instead of static arrays.
|
|
995
|
+
* This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
|
|
996
|
+
*/
|
|
997
|
+
const scaleBreak = () => [
|
|
998
|
+
"auto",
|
|
999
|
+
"avoid",
|
|
1000
|
+
"all",
|
|
1001
|
+
"avoid-page",
|
|
1002
|
+
"page",
|
|
1003
|
+
"left",
|
|
1004
|
+
"right",
|
|
1005
|
+
"column"
|
|
1006
|
+
];
|
|
1007
|
+
const scalePosition = () => [
|
|
1008
|
+
"center",
|
|
1009
|
+
"top",
|
|
1010
|
+
"bottom",
|
|
1011
|
+
"left",
|
|
1012
|
+
"right",
|
|
1013
|
+
"top-left",
|
|
1014
|
+
"left-top",
|
|
1015
|
+
"top-right",
|
|
1016
|
+
"right-top",
|
|
1017
|
+
"bottom-right",
|
|
1018
|
+
"right-bottom",
|
|
1019
|
+
"bottom-left",
|
|
1020
|
+
"left-bottom"
|
|
1021
|
+
];
|
|
1022
|
+
const scalePositionWithArbitrary = () => [
|
|
1023
|
+
...scalePosition(),
|
|
1024
|
+
isArbitraryVariable,
|
|
1025
|
+
isArbitraryValue
|
|
1026
|
+
];
|
|
1027
|
+
const scaleOverflow = () => [
|
|
1028
|
+
"auto",
|
|
1029
|
+
"hidden",
|
|
1030
|
+
"clip",
|
|
1031
|
+
"visible",
|
|
1032
|
+
"scroll"
|
|
1033
|
+
];
|
|
1034
|
+
const scaleOverscroll = () => [
|
|
1035
|
+
"auto",
|
|
1036
|
+
"contain",
|
|
1037
|
+
"none"
|
|
1038
|
+
];
|
|
1039
|
+
const scaleUnambiguousSpacing = () => [
|
|
1040
|
+
isArbitraryVariable,
|
|
1041
|
+
isArbitraryValue,
|
|
1042
|
+
themeSpacing
|
|
1043
|
+
];
|
|
1044
|
+
const scaleInset = () => [
|
|
1045
|
+
isFraction,
|
|
1046
|
+
"full",
|
|
1047
|
+
"auto",
|
|
1048
|
+
...scaleUnambiguousSpacing()
|
|
1049
|
+
];
|
|
1050
|
+
const scaleGridTemplateColsRows = () => [
|
|
1051
|
+
isInteger,
|
|
1052
|
+
"none",
|
|
1053
|
+
"subgrid",
|
|
1054
|
+
isArbitraryVariable,
|
|
1055
|
+
isArbitraryValue
|
|
1056
|
+
];
|
|
1057
|
+
const scaleGridColRowStartAndEnd = () => [
|
|
1058
|
+
"auto",
|
|
1059
|
+
{ span: [
|
|
1060
|
+
"full",
|
|
1061
|
+
isInteger,
|
|
1062
|
+
isArbitraryVariable,
|
|
1063
|
+
isArbitraryValue
|
|
1064
|
+
] },
|
|
1065
|
+
isInteger,
|
|
1066
|
+
isArbitraryVariable,
|
|
1067
|
+
isArbitraryValue
|
|
1068
|
+
];
|
|
1069
|
+
const scaleGridColRowStartOrEnd = () => [
|
|
1070
|
+
isInteger,
|
|
1071
|
+
"auto",
|
|
1072
|
+
isArbitraryVariable,
|
|
1073
|
+
isArbitraryValue
|
|
1074
|
+
];
|
|
1075
|
+
const scaleGridAutoColsRows = () => [
|
|
1076
|
+
"auto",
|
|
1077
|
+
"min",
|
|
1078
|
+
"max",
|
|
1079
|
+
"fr",
|
|
1080
|
+
isArbitraryVariable,
|
|
1081
|
+
isArbitraryValue
|
|
1082
|
+
];
|
|
1083
|
+
const scaleAlignPrimaryAxis = () => [
|
|
1084
|
+
"start",
|
|
1085
|
+
"end",
|
|
1086
|
+
"center",
|
|
1087
|
+
"between",
|
|
1088
|
+
"around",
|
|
1089
|
+
"evenly",
|
|
1090
|
+
"stretch",
|
|
1091
|
+
"baseline",
|
|
1092
|
+
"center-safe",
|
|
1093
|
+
"end-safe"
|
|
1094
|
+
];
|
|
1095
|
+
const scaleAlignSecondaryAxis = () => [
|
|
1096
|
+
"start",
|
|
1097
|
+
"end",
|
|
1098
|
+
"center",
|
|
1099
|
+
"stretch",
|
|
1100
|
+
"center-safe",
|
|
1101
|
+
"end-safe"
|
|
1102
|
+
];
|
|
1103
|
+
const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
|
|
1104
|
+
const scaleSizing = () => [
|
|
1105
|
+
isFraction,
|
|
1106
|
+
"auto",
|
|
1107
|
+
"full",
|
|
1108
|
+
"dvw",
|
|
1109
|
+
"dvh",
|
|
1110
|
+
"lvw",
|
|
1111
|
+
"lvh",
|
|
1112
|
+
"svw",
|
|
1113
|
+
"svh",
|
|
1114
|
+
"min",
|
|
1115
|
+
"max",
|
|
1116
|
+
"fit",
|
|
1117
|
+
...scaleUnambiguousSpacing()
|
|
1118
|
+
];
|
|
1119
|
+
const scaleSizingInline = () => [
|
|
1120
|
+
isFraction,
|
|
1121
|
+
"screen",
|
|
1122
|
+
"full",
|
|
1123
|
+
"dvw",
|
|
1124
|
+
"lvw",
|
|
1125
|
+
"svw",
|
|
1126
|
+
"min",
|
|
1127
|
+
"max",
|
|
1128
|
+
"fit",
|
|
1129
|
+
...scaleUnambiguousSpacing()
|
|
1130
|
+
];
|
|
1131
|
+
const scaleSizingBlock = () => [
|
|
1132
|
+
isFraction,
|
|
1133
|
+
"screen",
|
|
1134
|
+
"full",
|
|
1135
|
+
"lh",
|
|
1136
|
+
"dvh",
|
|
1137
|
+
"lvh",
|
|
1138
|
+
"svh",
|
|
1139
|
+
"min",
|
|
1140
|
+
"max",
|
|
1141
|
+
"fit",
|
|
1142
|
+
...scaleUnambiguousSpacing()
|
|
1143
|
+
];
|
|
1144
|
+
const scaleColor = () => [
|
|
1145
|
+
themeColor,
|
|
1146
|
+
isArbitraryVariable,
|
|
1147
|
+
isArbitraryValue
|
|
1148
|
+
];
|
|
1149
|
+
const scaleBgPosition = () => [
|
|
1150
|
+
...scalePosition(),
|
|
1151
|
+
isArbitraryVariablePosition,
|
|
1152
|
+
isArbitraryPosition,
|
|
1153
|
+
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
1154
|
+
];
|
|
1155
|
+
const scaleBgRepeat = () => ["no-repeat", { repeat: [
|
|
1156
|
+
"",
|
|
1157
|
+
"x",
|
|
1158
|
+
"y",
|
|
1159
|
+
"space",
|
|
1160
|
+
"round"
|
|
1161
|
+
] }];
|
|
1162
|
+
const scaleBgSize = () => [
|
|
1163
|
+
"auto",
|
|
1164
|
+
"cover",
|
|
1165
|
+
"contain",
|
|
1166
|
+
isArbitraryVariableSize,
|
|
1167
|
+
isArbitrarySize,
|
|
1168
|
+
{ size: [isArbitraryVariable, isArbitraryValue] }
|
|
1169
|
+
];
|
|
1170
|
+
const scaleGradientStopPosition = () => [
|
|
1171
|
+
isPercent,
|
|
1172
|
+
isArbitraryVariableLength,
|
|
1173
|
+
isArbitraryLength
|
|
1174
|
+
];
|
|
1175
|
+
const scaleRadius = () => [
|
|
1176
|
+
"",
|
|
1177
|
+
"none",
|
|
1178
|
+
"full",
|
|
1179
|
+
themeRadius,
|
|
1180
|
+
isArbitraryVariable,
|
|
1181
|
+
isArbitraryValue
|
|
1182
|
+
];
|
|
1183
|
+
const scaleBorderWidth = () => [
|
|
1184
|
+
"",
|
|
1185
|
+
isNumber,
|
|
1186
|
+
isArbitraryVariableLength,
|
|
1187
|
+
isArbitraryLength
|
|
1188
|
+
];
|
|
1189
|
+
const scaleLineStyle = () => [
|
|
1190
|
+
"solid",
|
|
1191
|
+
"dashed",
|
|
1192
|
+
"dotted",
|
|
1193
|
+
"double"
|
|
1194
|
+
];
|
|
1195
|
+
const scaleBlendMode = () => [
|
|
1196
|
+
"normal",
|
|
1197
|
+
"multiply",
|
|
1198
|
+
"screen",
|
|
1199
|
+
"overlay",
|
|
1200
|
+
"darken",
|
|
1201
|
+
"lighten",
|
|
1202
|
+
"color-dodge",
|
|
1203
|
+
"color-burn",
|
|
1204
|
+
"hard-light",
|
|
1205
|
+
"soft-light",
|
|
1206
|
+
"difference",
|
|
1207
|
+
"exclusion",
|
|
1208
|
+
"hue",
|
|
1209
|
+
"saturation",
|
|
1210
|
+
"color",
|
|
1211
|
+
"luminosity"
|
|
1212
|
+
];
|
|
1213
|
+
const scaleMaskImagePosition = () => [
|
|
1214
|
+
isNumber,
|
|
1215
|
+
isPercent,
|
|
1216
|
+
isArbitraryVariablePosition,
|
|
1217
|
+
isArbitraryPosition
|
|
1218
|
+
];
|
|
1219
|
+
const scaleBlur = () => [
|
|
1220
|
+
"",
|
|
1221
|
+
"none",
|
|
1222
|
+
themeBlur,
|
|
1223
|
+
isArbitraryVariable,
|
|
1224
|
+
isArbitraryValue
|
|
1225
|
+
];
|
|
1226
|
+
const scaleRotate = () => [
|
|
1227
|
+
"none",
|
|
1228
|
+
isNumber,
|
|
1229
|
+
isArbitraryVariable,
|
|
1230
|
+
isArbitraryValue
|
|
1231
|
+
];
|
|
1232
|
+
const scaleScale = () => [
|
|
1233
|
+
"none",
|
|
1234
|
+
isNumber,
|
|
1235
|
+
isArbitraryVariable,
|
|
1236
|
+
isArbitraryValue
|
|
1237
|
+
];
|
|
1238
|
+
const scaleSkew = () => [
|
|
1239
|
+
isNumber,
|
|
1240
|
+
isArbitraryVariable,
|
|
1241
|
+
isArbitraryValue
|
|
1242
|
+
];
|
|
1243
|
+
const scaleTranslate = () => [
|
|
1244
|
+
isFraction,
|
|
1245
|
+
"full",
|
|
1246
|
+
...scaleUnambiguousSpacing()
|
|
1247
|
+
];
|
|
1248
|
+
return {
|
|
1249
|
+
cacheSize: 500,
|
|
1250
|
+
theme: {
|
|
1251
|
+
animate: [
|
|
1252
|
+
"spin",
|
|
1253
|
+
"ping",
|
|
1254
|
+
"pulse",
|
|
1255
|
+
"bounce"
|
|
1256
|
+
],
|
|
1257
|
+
aspect: ["video"],
|
|
1258
|
+
blur: [isTshirtSize],
|
|
1259
|
+
breakpoint: [isTshirtSize],
|
|
1260
|
+
color: [isAny],
|
|
1261
|
+
container: [isTshirtSize],
|
|
1262
|
+
"drop-shadow": [isTshirtSize],
|
|
1263
|
+
ease: [
|
|
1264
|
+
"in",
|
|
1265
|
+
"out",
|
|
1266
|
+
"in-out"
|
|
1267
|
+
],
|
|
1268
|
+
font: [isAnyNonArbitrary],
|
|
1269
|
+
"font-weight": [
|
|
1270
|
+
"thin",
|
|
1271
|
+
"extralight",
|
|
1272
|
+
"light",
|
|
1273
|
+
"normal",
|
|
1274
|
+
"medium",
|
|
1275
|
+
"semibold",
|
|
1276
|
+
"bold",
|
|
1277
|
+
"extrabold",
|
|
1278
|
+
"black"
|
|
1279
|
+
],
|
|
1280
|
+
"inset-shadow": [isTshirtSize],
|
|
1281
|
+
leading: [
|
|
1282
|
+
"none",
|
|
1283
|
+
"tight",
|
|
1284
|
+
"snug",
|
|
1285
|
+
"normal",
|
|
1286
|
+
"relaxed",
|
|
1287
|
+
"loose"
|
|
1288
|
+
],
|
|
1289
|
+
perspective: [
|
|
1290
|
+
"dramatic",
|
|
1291
|
+
"near",
|
|
1292
|
+
"normal",
|
|
1293
|
+
"midrange",
|
|
1294
|
+
"distant",
|
|
1295
|
+
"none"
|
|
1296
|
+
],
|
|
1297
|
+
radius: [isTshirtSize],
|
|
1298
|
+
shadow: [isTshirtSize],
|
|
1299
|
+
spacing: ["px", isNumber],
|
|
1300
|
+
text: [isTshirtSize],
|
|
1301
|
+
"text-shadow": [isTshirtSize],
|
|
1302
|
+
tracking: [
|
|
1303
|
+
"tighter",
|
|
1304
|
+
"tight",
|
|
1305
|
+
"normal",
|
|
1306
|
+
"wide",
|
|
1307
|
+
"wider",
|
|
1308
|
+
"widest"
|
|
1309
|
+
]
|
|
1310
|
+
},
|
|
1311
|
+
classGroups: {
|
|
1312
|
+
/**
|
|
1313
|
+
* Aspect Ratio
|
|
1314
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
1315
|
+
*/
|
|
1316
|
+
aspect: [{ aspect: [
|
|
1317
|
+
"auto",
|
|
1318
|
+
"square",
|
|
1319
|
+
isFraction,
|
|
1320
|
+
isArbitraryValue,
|
|
1321
|
+
isArbitraryVariable,
|
|
1322
|
+
themeAspect
|
|
1323
|
+
] }],
|
|
1324
|
+
/**
|
|
1325
|
+
* Container
|
|
1326
|
+
* @see https://tailwindcss.com/docs/container
|
|
1327
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
1328
|
+
*/
|
|
1329
|
+
container: ["container"],
|
|
1330
|
+
/**
|
|
1331
|
+
* Container Type
|
|
1332
|
+
* @see https://tailwindcss.com/docs/responsive-design#container-queries
|
|
1333
|
+
*/
|
|
1334
|
+
"container-type": [{ "@container": [
|
|
1335
|
+
"",
|
|
1336
|
+
"normal",
|
|
1337
|
+
"size",
|
|
1338
|
+
isArbitraryVariable,
|
|
1339
|
+
isArbitraryValue
|
|
1340
|
+
] }],
|
|
1341
|
+
/**
|
|
1342
|
+
* Container Name
|
|
1343
|
+
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
|
1344
|
+
*/
|
|
1345
|
+
"container-named": [isNamedContainerQuery],
|
|
1346
|
+
/**
|
|
1347
|
+
* Columns
|
|
1348
|
+
* @see https://tailwindcss.com/docs/columns
|
|
1349
|
+
*/
|
|
1350
|
+
columns: [{ columns: [
|
|
1351
|
+
isNumber,
|
|
1352
|
+
isArbitraryValue,
|
|
1353
|
+
isArbitraryVariable,
|
|
1354
|
+
themeContainer
|
|
1355
|
+
] }],
|
|
1356
|
+
/**
|
|
1357
|
+
* Break After
|
|
1358
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
1359
|
+
*/
|
|
1360
|
+
"break-after": [{ "break-after": scaleBreak() }],
|
|
1361
|
+
/**
|
|
1362
|
+
* Break Before
|
|
1363
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
1364
|
+
*/
|
|
1365
|
+
"break-before": [{ "break-before": scaleBreak() }],
|
|
1366
|
+
/**
|
|
1367
|
+
* Break Inside
|
|
1368
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
1369
|
+
*/
|
|
1370
|
+
"break-inside": [{ "break-inside": [
|
|
1371
|
+
"auto",
|
|
1372
|
+
"avoid",
|
|
1373
|
+
"avoid-page",
|
|
1374
|
+
"avoid-column"
|
|
1375
|
+
] }],
|
|
1376
|
+
/**
|
|
1377
|
+
* Box Decoration Break
|
|
1378
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
1379
|
+
*/
|
|
1380
|
+
"box-decoration": [{ "box-decoration": ["slice", "clone"] }],
|
|
1381
|
+
/**
|
|
1382
|
+
* Box Sizing
|
|
1383
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
1384
|
+
*/
|
|
1385
|
+
box: [{ box: ["border", "content"] }],
|
|
1386
|
+
/**
|
|
1387
|
+
* Display
|
|
1388
|
+
* @see https://tailwindcss.com/docs/display
|
|
1389
|
+
*/
|
|
1390
|
+
display: [
|
|
1391
|
+
"block",
|
|
1392
|
+
"inline-block",
|
|
1393
|
+
"inline",
|
|
1394
|
+
"flex",
|
|
1395
|
+
"inline-flex",
|
|
1396
|
+
"table",
|
|
1397
|
+
"inline-table",
|
|
1398
|
+
"table-caption",
|
|
1399
|
+
"table-cell",
|
|
1400
|
+
"table-column",
|
|
1401
|
+
"table-column-group",
|
|
1402
|
+
"table-footer-group",
|
|
1403
|
+
"table-header-group",
|
|
1404
|
+
"table-row-group",
|
|
1405
|
+
"table-row",
|
|
1406
|
+
"flow-root",
|
|
1407
|
+
"grid",
|
|
1408
|
+
"inline-grid",
|
|
1409
|
+
"contents",
|
|
1410
|
+
"list-item",
|
|
1411
|
+
"hidden"
|
|
1412
|
+
],
|
|
1413
|
+
/**
|
|
1414
|
+
* Screen Reader Only
|
|
1415
|
+
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
1416
|
+
*/
|
|
1417
|
+
sr: ["sr-only", "not-sr-only"],
|
|
1418
|
+
/**
|
|
1419
|
+
* Floats
|
|
1420
|
+
* @see https://tailwindcss.com/docs/float
|
|
1421
|
+
*/
|
|
1422
|
+
float: [{ float: [
|
|
1423
|
+
"right",
|
|
1424
|
+
"left",
|
|
1425
|
+
"none",
|
|
1426
|
+
"start",
|
|
1427
|
+
"end"
|
|
1428
|
+
] }],
|
|
1429
|
+
/**
|
|
1430
|
+
* Clear
|
|
1431
|
+
* @see https://tailwindcss.com/docs/clear
|
|
1432
|
+
*/
|
|
1433
|
+
clear: [{ clear: [
|
|
1434
|
+
"left",
|
|
1435
|
+
"right",
|
|
1436
|
+
"both",
|
|
1437
|
+
"none",
|
|
1438
|
+
"start",
|
|
1439
|
+
"end"
|
|
1440
|
+
] }],
|
|
1441
|
+
/**
|
|
1442
|
+
* Isolation
|
|
1443
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
1444
|
+
*/
|
|
1445
|
+
isolation: ["isolate", "isolation-auto"],
|
|
1446
|
+
/**
|
|
1447
|
+
* Object Fit
|
|
1448
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
1449
|
+
*/
|
|
1450
|
+
"object-fit": [{ object: [
|
|
1451
|
+
"contain",
|
|
1452
|
+
"cover",
|
|
1453
|
+
"fill",
|
|
1454
|
+
"none",
|
|
1455
|
+
"scale-down"
|
|
1456
|
+
] }],
|
|
1457
|
+
/**
|
|
1458
|
+
* Object Position
|
|
1459
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
1460
|
+
*/
|
|
1461
|
+
"object-position": [{ object: scalePositionWithArbitrary() }],
|
|
1462
|
+
/**
|
|
1463
|
+
* Overflow
|
|
1464
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1465
|
+
*/
|
|
1466
|
+
overflow: [{ overflow: scaleOverflow() }],
|
|
1467
|
+
/**
|
|
1468
|
+
* Overflow X
|
|
1469
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1470
|
+
*/
|
|
1471
|
+
"overflow-x": [{ "overflow-x": scaleOverflow() }],
|
|
1472
|
+
/**
|
|
1473
|
+
* Overflow Y
|
|
1474
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
1475
|
+
*/
|
|
1476
|
+
"overflow-y": [{ "overflow-y": scaleOverflow() }],
|
|
1477
|
+
/**
|
|
1478
|
+
* Overscroll Behavior
|
|
1479
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1480
|
+
*/
|
|
1481
|
+
overscroll: [{ overscroll: scaleOverscroll() }],
|
|
1482
|
+
/**
|
|
1483
|
+
* Overscroll Behavior X
|
|
1484
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1485
|
+
*/
|
|
1486
|
+
"overscroll-x": [{ "overscroll-x": scaleOverscroll() }],
|
|
1487
|
+
/**
|
|
1488
|
+
* Overscroll Behavior Y
|
|
1489
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1490
|
+
*/
|
|
1491
|
+
"overscroll-y": [{ "overscroll-y": scaleOverscroll() }],
|
|
1492
|
+
/**
|
|
1493
|
+
* Position
|
|
1494
|
+
* @see https://tailwindcss.com/docs/position
|
|
1495
|
+
*/
|
|
1496
|
+
position: [
|
|
1497
|
+
"static",
|
|
1498
|
+
"fixed",
|
|
1499
|
+
"absolute",
|
|
1500
|
+
"relative",
|
|
1501
|
+
"sticky"
|
|
1502
|
+
],
|
|
1503
|
+
/**
|
|
1504
|
+
* Inset
|
|
1505
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1506
|
+
*/
|
|
1507
|
+
inset: [{ inset: scaleInset() }],
|
|
1508
|
+
/**
|
|
1509
|
+
* Inset Inline
|
|
1510
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1511
|
+
*/
|
|
1512
|
+
"inset-x": [{ "inset-x": scaleInset() }],
|
|
1513
|
+
/**
|
|
1514
|
+
* Inset Block
|
|
1515
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1516
|
+
*/
|
|
1517
|
+
"inset-y": [{ "inset-y": scaleInset() }],
|
|
1518
|
+
/**
|
|
1519
|
+
* Inset Inline Start
|
|
1520
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1521
|
+
* @todo class group will be renamed to `inset-s` in next major release
|
|
1522
|
+
*/
|
|
1523
|
+
start: [{
|
|
1524
|
+
"inset-s": scaleInset(),
|
|
1525
|
+
/**
|
|
1526
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
|
|
1527
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
1528
|
+
*/
|
|
1529
|
+
start: scaleInset()
|
|
1530
|
+
}],
|
|
1531
|
+
/**
|
|
1532
|
+
* Inset Inline End
|
|
1533
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1534
|
+
* @todo class group will be renamed to `inset-e` in next major release
|
|
1535
|
+
*/
|
|
1536
|
+
end: [{
|
|
1537
|
+
"inset-e": scaleInset(),
|
|
1538
|
+
/**
|
|
1539
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
|
|
1540
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
1541
|
+
*/
|
|
1542
|
+
end: scaleInset()
|
|
1543
|
+
}],
|
|
1544
|
+
/**
|
|
1545
|
+
* Inset Block Start
|
|
1546
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1547
|
+
*/
|
|
1548
|
+
"inset-bs": [{ "inset-bs": scaleInset() }],
|
|
1549
|
+
/**
|
|
1550
|
+
* Inset Block End
|
|
1551
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1552
|
+
*/
|
|
1553
|
+
"inset-be": [{ "inset-be": scaleInset() }],
|
|
1554
|
+
/**
|
|
1555
|
+
* Top
|
|
1556
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1557
|
+
*/
|
|
1558
|
+
top: [{ top: scaleInset() }],
|
|
1559
|
+
/**
|
|
1560
|
+
* Right
|
|
1561
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1562
|
+
*/
|
|
1563
|
+
right: [{ right: scaleInset() }],
|
|
1564
|
+
/**
|
|
1565
|
+
* Bottom
|
|
1566
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1567
|
+
*/
|
|
1568
|
+
bottom: [{ bottom: scaleInset() }],
|
|
1569
|
+
/**
|
|
1570
|
+
* Left
|
|
1571
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1572
|
+
*/
|
|
1573
|
+
left: [{ left: scaleInset() }],
|
|
1574
|
+
/**
|
|
1575
|
+
* Visibility
|
|
1576
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
1577
|
+
*/
|
|
1578
|
+
visibility: [
|
|
1579
|
+
"visible",
|
|
1580
|
+
"invisible",
|
|
1581
|
+
"collapse"
|
|
1582
|
+
],
|
|
1583
|
+
/**
|
|
1584
|
+
* Z-Index
|
|
1585
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
1586
|
+
*/
|
|
1587
|
+
z: [{ z: [
|
|
1588
|
+
isInteger,
|
|
1589
|
+
"auto",
|
|
1590
|
+
isArbitraryVariable,
|
|
1591
|
+
isArbitraryValue
|
|
1592
|
+
] }],
|
|
1593
|
+
/**
|
|
1594
|
+
* Flex Basis
|
|
1595
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
1596
|
+
*/
|
|
1597
|
+
basis: [{ basis: [
|
|
1598
|
+
isFraction,
|
|
1599
|
+
"full",
|
|
1600
|
+
"auto",
|
|
1601
|
+
themeContainer,
|
|
1602
|
+
...scaleUnambiguousSpacing()
|
|
1603
|
+
] }],
|
|
1604
|
+
/**
|
|
1605
|
+
* Flex Direction
|
|
1606
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
1607
|
+
*/
|
|
1608
|
+
"flex-direction": [{ flex: [
|
|
1609
|
+
"row",
|
|
1610
|
+
"row-reverse",
|
|
1611
|
+
"col",
|
|
1612
|
+
"col-reverse"
|
|
1613
|
+
] }],
|
|
1614
|
+
/**
|
|
1615
|
+
* Flex Wrap
|
|
1616
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
1617
|
+
*/
|
|
1618
|
+
"flex-wrap": [{ flex: [
|
|
1619
|
+
"nowrap",
|
|
1620
|
+
"wrap",
|
|
1621
|
+
"wrap-reverse"
|
|
1622
|
+
] }],
|
|
1623
|
+
/**
|
|
1624
|
+
* Flex
|
|
1625
|
+
* @see https://tailwindcss.com/docs/flex
|
|
1626
|
+
*/
|
|
1627
|
+
flex: [{ flex: [
|
|
1628
|
+
isNumber,
|
|
1629
|
+
isFraction,
|
|
1630
|
+
"auto",
|
|
1631
|
+
"initial",
|
|
1632
|
+
"none",
|
|
1633
|
+
isArbitraryValue
|
|
1634
|
+
] }],
|
|
1635
|
+
/**
|
|
1636
|
+
* Flex Grow
|
|
1637
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
1638
|
+
*/
|
|
1639
|
+
grow: [{ grow: [
|
|
1640
|
+
"",
|
|
1641
|
+
isNumber,
|
|
1642
|
+
isArbitraryVariable,
|
|
1643
|
+
isArbitraryValue
|
|
1644
|
+
] }],
|
|
1645
|
+
/**
|
|
1646
|
+
* Flex Shrink
|
|
1647
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
1648
|
+
*/
|
|
1649
|
+
shrink: [{ shrink: [
|
|
1650
|
+
"",
|
|
1651
|
+
isNumber,
|
|
1652
|
+
isArbitraryVariable,
|
|
1653
|
+
isArbitraryValue
|
|
1654
|
+
] }],
|
|
1655
|
+
/**
|
|
1656
|
+
* Order
|
|
1657
|
+
* @see https://tailwindcss.com/docs/order
|
|
1658
|
+
*/
|
|
1659
|
+
order: [{ order: [
|
|
1660
|
+
isInteger,
|
|
1661
|
+
"first",
|
|
1662
|
+
"last",
|
|
1663
|
+
"none",
|
|
1664
|
+
isArbitraryVariable,
|
|
1665
|
+
isArbitraryValue
|
|
1666
|
+
] }],
|
|
1667
|
+
/**
|
|
1668
|
+
* Grid Template Columns
|
|
1669
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1670
|
+
*/
|
|
1671
|
+
"grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }],
|
|
1672
|
+
/**
|
|
1673
|
+
* Grid Column Start / End
|
|
1674
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1675
|
+
*/
|
|
1676
|
+
"col-start-end": [{ col: scaleGridColRowStartAndEnd() }],
|
|
1677
|
+
/**
|
|
1678
|
+
* Grid Column Start
|
|
1679
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1680
|
+
*/
|
|
1681
|
+
"col-start": [{ "col-start": scaleGridColRowStartOrEnd() }],
|
|
1682
|
+
/**
|
|
1683
|
+
* Grid Column End
|
|
1684
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1685
|
+
*/
|
|
1686
|
+
"col-end": [{ "col-end": scaleGridColRowStartOrEnd() }],
|
|
1687
|
+
/**
|
|
1688
|
+
* Grid Template Rows
|
|
1689
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1690
|
+
*/
|
|
1691
|
+
"grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }],
|
|
1692
|
+
/**
|
|
1693
|
+
* Grid Row Start / End
|
|
1694
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1695
|
+
*/
|
|
1696
|
+
"row-start-end": [{ row: scaleGridColRowStartAndEnd() }],
|
|
1697
|
+
/**
|
|
1698
|
+
* Grid Row Start
|
|
1699
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1700
|
+
*/
|
|
1701
|
+
"row-start": [{ "row-start": scaleGridColRowStartOrEnd() }],
|
|
1702
|
+
/**
|
|
1703
|
+
* Grid Row End
|
|
1704
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1705
|
+
*/
|
|
1706
|
+
"row-end": [{ "row-end": scaleGridColRowStartOrEnd() }],
|
|
1707
|
+
/**
|
|
1708
|
+
* Grid Auto Flow
|
|
1709
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
1710
|
+
*/
|
|
1711
|
+
"grid-flow": [{ "grid-flow": [
|
|
1712
|
+
"row",
|
|
1713
|
+
"col",
|
|
1714
|
+
"dense",
|
|
1715
|
+
"row-dense",
|
|
1716
|
+
"col-dense"
|
|
1717
|
+
] }],
|
|
1718
|
+
/**
|
|
1719
|
+
* Grid Auto Columns
|
|
1720
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1721
|
+
*/
|
|
1722
|
+
"auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }],
|
|
1723
|
+
/**
|
|
1724
|
+
* Grid Auto Rows
|
|
1725
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1726
|
+
*/
|
|
1727
|
+
"auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }],
|
|
1728
|
+
/**
|
|
1729
|
+
* Gap
|
|
1730
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1731
|
+
*/
|
|
1732
|
+
gap: [{ gap: scaleUnambiguousSpacing() }],
|
|
1733
|
+
/**
|
|
1734
|
+
* Gap X
|
|
1735
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1736
|
+
*/
|
|
1737
|
+
"gap-x": [{ "gap-x": scaleUnambiguousSpacing() }],
|
|
1738
|
+
/**
|
|
1739
|
+
* Gap Y
|
|
1740
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1741
|
+
*/
|
|
1742
|
+
"gap-y": [{ "gap-y": scaleUnambiguousSpacing() }],
|
|
1743
|
+
/**
|
|
1744
|
+
* Justify Content
|
|
1745
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
1746
|
+
*/
|
|
1747
|
+
"justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }],
|
|
1748
|
+
/**
|
|
1749
|
+
* Justify Items
|
|
1750
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
1751
|
+
*/
|
|
1752
|
+
"justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }],
|
|
1753
|
+
/**
|
|
1754
|
+
* Justify Self
|
|
1755
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
1756
|
+
*/
|
|
1757
|
+
"justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
1758
|
+
/**
|
|
1759
|
+
* Align Content
|
|
1760
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
1761
|
+
*/
|
|
1762
|
+
"align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }],
|
|
1763
|
+
/**
|
|
1764
|
+
* Align Items
|
|
1765
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
1766
|
+
*/
|
|
1767
|
+
"align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
|
|
1768
|
+
/**
|
|
1769
|
+
* Align Self
|
|
1770
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
1771
|
+
*/
|
|
1772
|
+
"align-self": [{ self: [
|
|
1773
|
+
"auto",
|
|
1774
|
+
...scaleAlignSecondaryAxis(),
|
|
1775
|
+
{ baseline: ["", "last"] }
|
|
1776
|
+
] }],
|
|
1777
|
+
/**
|
|
1778
|
+
* Place Content
|
|
1779
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
1780
|
+
*/
|
|
1781
|
+
"place-content": [{ "place-content": scaleAlignPrimaryAxis() }],
|
|
1782
|
+
/**
|
|
1783
|
+
* Place Items
|
|
1784
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
1785
|
+
*/
|
|
1786
|
+
"place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }],
|
|
1787
|
+
/**
|
|
1788
|
+
* Place Self
|
|
1789
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
1790
|
+
*/
|
|
1791
|
+
"place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
1792
|
+
/**
|
|
1793
|
+
* Padding
|
|
1794
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1795
|
+
*/
|
|
1796
|
+
p: [{ p: scaleUnambiguousSpacing() }],
|
|
1797
|
+
/**
|
|
1798
|
+
* Padding Inline
|
|
1799
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1800
|
+
*/
|
|
1801
|
+
px: [{ px: scaleUnambiguousSpacing() }],
|
|
1802
|
+
/**
|
|
1803
|
+
* Padding Block
|
|
1804
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1805
|
+
*/
|
|
1806
|
+
py: [{ py: scaleUnambiguousSpacing() }],
|
|
1807
|
+
/**
|
|
1808
|
+
* Padding Inline Start
|
|
1809
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1810
|
+
*/
|
|
1811
|
+
ps: [{ ps: scaleUnambiguousSpacing() }],
|
|
1812
|
+
/**
|
|
1813
|
+
* Padding Inline End
|
|
1814
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1815
|
+
*/
|
|
1816
|
+
pe: [{ pe: scaleUnambiguousSpacing() }],
|
|
1817
|
+
/**
|
|
1818
|
+
* Padding Block Start
|
|
1819
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1820
|
+
*/
|
|
1821
|
+
pbs: [{ pbs: scaleUnambiguousSpacing() }],
|
|
1822
|
+
/**
|
|
1823
|
+
* Padding Block End
|
|
1824
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1825
|
+
*/
|
|
1826
|
+
pbe: [{ pbe: scaleUnambiguousSpacing() }],
|
|
1827
|
+
/**
|
|
1828
|
+
* Padding Top
|
|
1829
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1830
|
+
*/
|
|
1831
|
+
pt: [{ pt: scaleUnambiguousSpacing() }],
|
|
1832
|
+
/**
|
|
1833
|
+
* Padding Right
|
|
1834
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1835
|
+
*/
|
|
1836
|
+
pr: [{ pr: scaleUnambiguousSpacing() }],
|
|
1837
|
+
/**
|
|
1838
|
+
* Padding Bottom
|
|
1839
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1840
|
+
*/
|
|
1841
|
+
pb: [{ pb: scaleUnambiguousSpacing() }],
|
|
1842
|
+
/**
|
|
1843
|
+
* Padding Left
|
|
1844
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1845
|
+
*/
|
|
1846
|
+
pl: [{ pl: scaleUnambiguousSpacing() }],
|
|
1847
|
+
/**
|
|
1848
|
+
* Margin
|
|
1849
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1850
|
+
*/
|
|
1851
|
+
m: [{ m: scaleMargin() }],
|
|
1852
|
+
/**
|
|
1853
|
+
* Margin Inline
|
|
1854
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1855
|
+
*/
|
|
1856
|
+
mx: [{ mx: scaleMargin() }],
|
|
1857
|
+
/**
|
|
1858
|
+
* Margin Block
|
|
1859
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1860
|
+
*/
|
|
1861
|
+
my: [{ my: scaleMargin() }],
|
|
1862
|
+
/**
|
|
1863
|
+
* Margin Inline Start
|
|
1864
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1865
|
+
*/
|
|
1866
|
+
ms: [{ ms: scaleMargin() }],
|
|
1867
|
+
/**
|
|
1868
|
+
* Margin Inline End
|
|
1869
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1870
|
+
*/
|
|
1871
|
+
me: [{ me: scaleMargin() }],
|
|
1872
|
+
/**
|
|
1873
|
+
* Margin Block Start
|
|
1874
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1875
|
+
*/
|
|
1876
|
+
mbs: [{ mbs: scaleMargin() }],
|
|
1877
|
+
/**
|
|
1878
|
+
* Margin Block End
|
|
1879
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1880
|
+
*/
|
|
1881
|
+
mbe: [{ mbe: scaleMargin() }],
|
|
1882
|
+
/**
|
|
1883
|
+
* Margin Top
|
|
1884
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1885
|
+
*/
|
|
1886
|
+
mt: [{ mt: scaleMargin() }],
|
|
1887
|
+
/**
|
|
1888
|
+
* Margin Right
|
|
1889
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1890
|
+
*/
|
|
1891
|
+
mr: [{ mr: scaleMargin() }],
|
|
1892
|
+
/**
|
|
1893
|
+
* Margin Bottom
|
|
1894
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1895
|
+
*/
|
|
1896
|
+
mb: [{ mb: scaleMargin() }],
|
|
1897
|
+
/**
|
|
1898
|
+
* Margin Left
|
|
1899
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1900
|
+
*/
|
|
1901
|
+
ml: [{ ml: scaleMargin() }],
|
|
1902
|
+
/**
|
|
1903
|
+
* Space Between X
|
|
1904
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1905
|
+
*/
|
|
1906
|
+
"space-x": [{ "space-x": scaleUnambiguousSpacing() }],
|
|
1907
|
+
/**
|
|
1908
|
+
* Space Between X Reverse
|
|
1909
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1910
|
+
*/
|
|
1911
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
1912
|
+
/**
|
|
1913
|
+
* Space Between Y
|
|
1914
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1915
|
+
*/
|
|
1916
|
+
"space-y": [{ "space-y": scaleUnambiguousSpacing() }],
|
|
1917
|
+
/**
|
|
1918
|
+
* Space Between Y Reverse
|
|
1919
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1920
|
+
*/
|
|
1921
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
1922
|
+
/**
|
|
1923
|
+
* Size
|
|
1924
|
+
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
1925
|
+
*/
|
|
1926
|
+
size: [{ size: scaleSizing() }],
|
|
1927
|
+
/**
|
|
1928
|
+
* Inline Size
|
|
1929
|
+
* @see https://tailwindcss.com/docs/width
|
|
1930
|
+
*/
|
|
1931
|
+
"inline-size": [{ inline: ["auto", ...scaleSizingInline()] }],
|
|
1932
|
+
/**
|
|
1933
|
+
* Min-Inline Size
|
|
1934
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1935
|
+
*/
|
|
1936
|
+
"min-inline-size": [{ "min-inline": ["auto", ...scaleSizingInline()] }],
|
|
1937
|
+
/**
|
|
1938
|
+
* Max-Inline Size
|
|
1939
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1940
|
+
*/
|
|
1941
|
+
"max-inline-size": [{ "max-inline": ["none", ...scaleSizingInline()] }],
|
|
1942
|
+
/**
|
|
1943
|
+
* Block Size
|
|
1944
|
+
* @see https://tailwindcss.com/docs/height
|
|
1945
|
+
*/
|
|
1946
|
+
"block-size": [{ block: ["auto", ...scaleSizingBlock()] }],
|
|
1947
|
+
/**
|
|
1948
|
+
* Min-Block Size
|
|
1949
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
1950
|
+
*/
|
|
1951
|
+
"min-block-size": [{ "min-block": ["auto", ...scaleSizingBlock()] }],
|
|
1952
|
+
/**
|
|
1953
|
+
* Max-Block Size
|
|
1954
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
1955
|
+
*/
|
|
1956
|
+
"max-block-size": [{ "max-block": ["none", ...scaleSizingBlock()] }],
|
|
1957
|
+
/**
|
|
1958
|
+
* Width
|
|
1959
|
+
* @see https://tailwindcss.com/docs/width
|
|
1960
|
+
*/
|
|
1961
|
+
w: [{ w: [
|
|
1962
|
+
themeContainer,
|
|
1963
|
+
"screen",
|
|
1964
|
+
...scaleSizing()
|
|
1965
|
+
] }],
|
|
1966
|
+
/**
|
|
1967
|
+
* Min-Width
|
|
1968
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1969
|
+
*/
|
|
1970
|
+
"min-w": [{ "min-w": [
|
|
1971
|
+
themeContainer,
|
|
1972
|
+
"screen",
|
|
1973
|
+
"none",
|
|
1974
|
+
...scaleSizing()
|
|
1975
|
+
] }],
|
|
1976
|
+
/**
|
|
1977
|
+
* Max-Width
|
|
1978
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1979
|
+
*/
|
|
1980
|
+
"max-w": [{ "max-w": [
|
|
1981
|
+
themeContainer,
|
|
1982
|
+
"screen",
|
|
1983
|
+
"none",
|
|
1984
|
+
"prose",
|
|
1985
|
+
(
|
|
1986
|
+
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1987
|
+
{ screen: [themeBreakpoint] }),
|
|
1988
|
+
...scaleSizing()
|
|
1989
|
+
] }],
|
|
1990
|
+
/**
|
|
1991
|
+
* Height
|
|
1992
|
+
* @see https://tailwindcss.com/docs/height
|
|
1993
|
+
*/
|
|
1994
|
+
h: [{ h: [
|
|
1995
|
+
"screen",
|
|
1996
|
+
"lh",
|
|
1997
|
+
...scaleSizing()
|
|
1998
|
+
] }],
|
|
1999
|
+
/**
|
|
2000
|
+
* Min-Height
|
|
2001
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
2002
|
+
*/
|
|
2003
|
+
"min-h": [{ "min-h": [
|
|
2004
|
+
"screen",
|
|
2005
|
+
"lh",
|
|
2006
|
+
"none",
|
|
2007
|
+
...scaleSizing()
|
|
2008
|
+
] }],
|
|
2009
|
+
/**
|
|
2010
|
+
* Max-Height
|
|
2011
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
2012
|
+
*/
|
|
2013
|
+
"max-h": [{ "max-h": [
|
|
2014
|
+
"screen",
|
|
2015
|
+
"lh",
|
|
2016
|
+
...scaleSizing()
|
|
2017
|
+
] }],
|
|
2018
|
+
/**
|
|
2019
|
+
* Font Size
|
|
2020
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
2021
|
+
*/
|
|
2022
|
+
"font-size": [{ text: [
|
|
2023
|
+
"base",
|
|
2024
|
+
themeText,
|
|
2025
|
+
isArbitraryVariableLength,
|
|
2026
|
+
isArbitraryLength
|
|
2027
|
+
] }],
|
|
2028
|
+
/**
|
|
2029
|
+
* Font Smoothing
|
|
2030
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
2031
|
+
*/
|
|
2032
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
2033
|
+
/**
|
|
2034
|
+
* Font Style
|
|
2035
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
2036
|
+
*/
|
|
2037
|
+
"font-style": ["italic", "not-italic"],
|
|
2038
|
+
/**
|
|
2039
|
+
* Font Weight
|
|
2040
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
2041
|
+
*/
|
|
2042
|
+
"font-weight": [{ font: [
|
|
2043
|
+
themeFontWeight,
|
|
2044
|
+
isArbitraryVariableWeight,
|
|
2045
|
+
isArbitraryWeight
|
|
2046
|
+
] }],
|
|
2047
|
+
/**
|
|
2048
|
+
* Font Stretch
|
|
2049
|
+
* @see https://tailwindcss.com/docs/font-stretch
|
|
2050
|
+
*/
|
|
2051
|
+
"font-stretch": [{ "font-stretch": [
|
|
2052
|
+
"ultra-condensed",
|
|
2053
|
+
"extra-condensed",
|
|
2054
|
+
"condensed",
|
|
2055
|
+
"semi-condensed",
|
|
2056
|
+
"normal",
|
|
2057
|
+
"semi-expanded",
|
|
2058
|
+
"expanded",
|
|
2059
|
+
"extra-expanded",
|
|
2060
|
+
"ultra-expanded",
|
|
2061
|
+
isPercent,
|
|
2062
|
+
isArbitraryValue
|
|
2063
|
+
] }],
|
|
2064
|
+
/**
|
|
2065
|
+
* Font Family
|
|
2066
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
2067
|
+
*/
|
|
2068
|
+
"font-family": [{ font: [
|
|
2069
|
+
isArbitraryVariableFamilyName,
|
|
2070
|
+
isArbitraryFamilyName,
|
|
2071
|
+
themeFont
|
|
2072
|
+
] }],
|
|
2073
|
+
/**
|
|
2074
|
+
* Font Feature Settings
|
|
2075
|
+
* @see https://tailwindcss.com/docs/font-feature-settings
|
|
2076
|
+
*/
|
|
2077
|
+
"font-features": [{ "font-features": [isArbitraryValue] }],
|
|
2078
|
+
/**
|
|
2079
|
+
* Font Variant Numeric
|
|
2080
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2081
|
+
*/
|
|
2082
|
+
"fvn-normal": ["normal-nums"],
|
|
2083
|
+
/**
|
|
2084
|
+
* Font Variant Numeric
|
|
2085
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2086
|
+
*/
|
|
2087
|
+
"fvn-ordinal": ["ordinal"],
|
|
2088
|
+
/**
|
|
2089
|
+
* Font Variant Numeric
|
|
2090
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2091
|
+
*/
|
|
2092
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
2093
|
+
/**
|
|
2094
|
+
* Font Variant Numeric
|
|
2095
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2096
|
+
*/
|
|
2097
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
2098
|
+
/**
|
|
2099
|
+
* Font Variant Numeric
|
|
2100
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2101
|
+
*/
|
|
2102
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
2103
|
+
/**
|
|
2104
|
+
* Font Variant Numeric
|
|
2105
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
2106
|
+
*/
|
|
2107
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
2108
|
+
/**
|
|
2109
|
+
* Letter Spacing
|
|
2110
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
2111
|
+
*/
|
|
2112
|
+
tracking: [{ tracking: [
|
|
2113
|
+
themeTracking,
|
|
2114
|
+
isArbitraryVariable,
|
|
2115
|
+
isArbitraryValue
|
|
2116
|
+
] }],
|
|
2117
|
+
/**
|
|
2118
|
+
* Line Clamp
|
|
2119
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
2120
|
+
*/
|
|
2121
|
+
"line-clamp": [{ "line-clamp": [
|
|
2122
|
+
isNumber,
|
|
2123
|
+
"none",
|
|
2124
|
+
isArbitraryVariable,
|
|
2125
|
+
isArbitraryNumber
|
|
2126
|
+
] }],
|
|
2127
|
+
/**
|
|
2128
|
+
* Line Height
|
|
2129
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
2130
|
+
*/
|
|
2131
|
+
leading: [{ leading: [themeLeading, ...scaleUnambiguousSpacing()] }],
|
|
2132
|
+
/**
|
|
2133
|
+
* List Style Image
|
|
2134
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
2135
|
+
*/
|
|
2136
|
+
"list-image": [{ "list-image": [
|
|
2137
|
+
"none",
|
|
2138
|
+
isArbitraryVariable,
|
|
2139
|
+
isArbitraryValue
|
|
2140
|
+
] }],
|
|
2141
|
+
/**
|
|
2142
|
+
* List Style Position
|
|
2143
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
2144
|
+
*/
|
|
2145
|
+
"list-style-position": [{ list: ["inside", "outside"] }],
|
|
2146
|
+
/**
|
|
2147
|
+
* List Style Type
|
|
2148
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
2149
|
+
*/
|
|
2150
|
+
"list-style-type": [{ list: [
|
|
2151
|
+
"disc",
|
|
2152
|
+
"decimal",
|
|
2153
|
+
"none",
|
|
2154
|
+
isArbitraryVariable,
|
|
2155
|
+
isArbitraryValue
|
|
2156
|
+
] }],
|
|
2157
|
+
/**
|
|
2158
|
+
* Text Alignment
|
|
2159
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
2160
|
+
*/
|
|
2161
|
+
"text-alignment": [{ text: [
|
|
2162
|
+
"left",
|
|
2163
|
+
"center",
|
|
2164
|
+
"right",
|
|
2165
|
+
"justify",
|
|
2166
|
+
"start",
|
|
2167
|
+
"end"
|
|
2168
|
+
] }],
|
|
2169
|
+
/**
|
|
2170
|
+
* Placeholder Color
|
|
2171
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
2172
|
+
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
2173
|
+
*/
|
|
2174
|
+
"placeholder-color": [{ placeholder: scaleColor() }],
|
|
2175
|
+
/**
|
|
2176
|
+
* Text Color
|
|
2177
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
2178
|
+
*/
|
|
2179
|
+
"text-color": [{ text: scaleColor() }],
|
|
2180
|
+
/**
|
|
2181
|
+
* Text Decoration
|
|
2182
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
2183
|
+
*/
|
|
2184
|
+
"text-decoration": [
|
|
2185
|
+
"underline",
|
|
2186
|
+
"overline",
|
|
2187
|
+
"line-through",
|
|
2188
|
+
"no-underline"
|
|
2189
|
+
],
|
|
2190
|
+
/**
|
|
2191
|
+
* Text Decoration Style
|
|
2192
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
2193
|
+
*/
|
|
2194
|
+
"text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }],
|
|
2195
|
+
/**
|
|
2196
|
+
* Text Decoration Thickness
|
|
2197
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
2198
|
+
*/
|
|
2199
|
+
"text-decoration-thickness": [{ decoration: [
|
|
2200
|
+
isNumber,
|
|
2201
|
+
"from-font",
|
|
2202
|
+
"auto",
|
|
2203
|
+
isArbitraryVariable,
|
|
2204
|
+
isArbitraryLength
|
|
2205
|
+
] }],
|
|
2206
|
+
/**
|
|
2207
|
+
* Text Decoration Color
|
|
2208
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
2209
|
+
*/
|
|
2210
|
+
"text-decoration-color": [{ decoration: scaleColor() }],
|
|
2211
|
+
/**
|
|
2212
|
+
* Text Underline Offset
|
|
2213
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
2214
|
+
*/
|
|
2215
|
+
"underline-offset": [{ "underline-offset": [
|
|
2216
|
+
isNumber,
|
|
2217
|
+
"auto",
|
|
2218
|
+
isArbitraryVariable,
|
|
2219
|
+
isArbitraryValue
|
|
2220
|
+
] }],
|
|
2221
|
+
/**
|
|
2222
|
+
* Text Transform
|
|
2223
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
2224
|
+
*/
|
|
2225
|
+
"text-transform": [
|
|
2226
|
+
"uppercase",
|
|
2227
|
+
"lowercase",
|
|
2228
|
+
"capitalize",
|
|
2229
|
+
"normal-case"
|
|
2230
|
+
],
|
|
2231
|
+
/**
|
|
2232
|
+
* Text Overflow
|
|
2233
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
2234
|
+
*/
|
|
2235
|
+
"text-overflow": [
|
|
2236
|
+
"truncate",
|
|
2237
|
+
"text-ellipsis",
|
|
2238
|
+
"text-clip"
|
|
2239
|
+
],
|
|
2240
|
+
/**
|
|
2241
|
+
* Text Wrap
|
|
2242
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
2243
|
+
*/
|
|
2244
|
+
"text-wrap": [{ text: [
|
|
2245
|
+
"wrap",
|
|
2246
|
+
"nowrap",
|
|
2247
|
+
"balance",
|
|
2248
|
+
"pretty"
|
|
2249
|
+
] }],
|
|
2250
|
+
/**
|
|
2251
|
+
* Text Indent
|
|
2252
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
2253
|
+
*/
|
|
2254
|
+
indent: [{ indent: scaleUnambiguousSpacing() }],
|
|
2255
|
+
/**
|
|
2256
|
+
* Tab Size
|
|
2257
|
+
* @see https://tailwindcss.com/docs/tab-size
|
|
2258
|
+
*/
|
|
2259
|
+
"tab-size": [{ tab: [
|
|
2260
|
+
isInteger,
|
|
2261
|
+
isArbitraryVariable,
|
|
2262
|
+
isArbitraryValue
|
|
2263
|
+
] }],
|
|
2264
|
+
/**
|
|
2265
|
+
* Vertical Alignment
|
|
2266
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
2267
|
+
*/
|
|
2268
|
+
"vertical-align": [{ align: [
|
|
2269
|
+
"baseline",
|
|
2270
|
+
"top",
|
|
2271
|
+
"middle",
|
|
2272
|
+
"bottom",
|
|
2273
|
+
"text-top",
|
|
2274
|
+
"text-bottom",
|
|
2275
|
+
"sub",
|
|
2276
|
+
"super",
|
|
2277
|
+
isArbitraryVariable,
|
|
2278
|
+
isArbitraryValue
|
|
2279
|
+
] }],
|
|
2280
|
+
/**
|
|
2281
|
+
* Whitespace
|
|
2282
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
2283
|
+
*/
|
|
2284
|
+
whitespace: [{ whitespace: [
|
|
2285
|
+
"normal",
|
|
2286
|
+
"nowrap",
|
|
2287
|
+
"pre",
|
|
2288
|
+
"pre-line",
|
|
2289
|
+
"pre-wrap",
|
|
2290
|
+
"break-spaces"
|
|
2291
|
+
] }],
|
|
2292
|
+
/**
|
|
2293
|
+
* Word Break
|
|
2294
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
2295
|
+
*/
|
|
2296
|
+
break: [{ break: [
|
|
2297
|
+
"normal",
|
|
2298
|
+
"words",
|
|
2299
|
+
"all",
|
|
2300
|
+
"keep"
|
|
2301
|
+
] }],
|
|
2302
|
+
/**
|
|
2303
|
+
* Overflow Wrap
|
|
2304
|
+
* @see https://tailwindcss.com/docs/overflow-wrap
|
|
2305
|
+
*/
|
|
2306
|
+
wrap: [{ wrap: [
|
|
2307
|
+
"break-word",
|
|
2308
|
+
"anywhere",
|
|
2309
|
+
"normal"
|
|
2310
|
+
] }],
|
|
2311
|
+
/**
|
|
2312
|
+
* Hyphens
|
|
2313
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
2314
|
+
*/
|
|
2315
|
+
hyphens: [{ hyphens: [
|
|
2316
|
+
"none",
|
|
2317
|
+
"manual",
|
|
2318
|
+
"auto"
|
|
2319
|
+
] }],
|
|
2320
|
+
/**
|
|
2321
|
+
* Content
|
|
2322
|
+
* @see https://tailwindcss.com/docs/content
|
|
2323
|
+
*/
|
|
2324
|
+
content: [{ content: [
|
|
2325
|
+
"none",
|
|
2326
|
+
isArbitraryVariable,
|
|
2327
|
+
isArbitraryValue
|
|
2328
|
+
] }],
|
|
2329
|
+
/**
|
|
2330
|
+
* Background Attachment
|
|
2331
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
2332
|
+
*/
|
|
2333
|
+
"bg-attachment": [{ bg: [
|
|
2334
|
+
"fixed",
|
|
2335
|
+
"local",
|
|
2336
|
+
"scroll"
|
|
2337
|
+
] }],
|
|
2338
|
+
/**
|
|
2339
|
+
* Background Clip
|
|
2340
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
2341
|
+
*/
|
|
2342
|
+
"bg-clip": [{ "bg-clip": [
|
|
2343
|
+
"border",
|
|
2344
|
+
"padding",
|
|
2345
|
+
"content",
|
|
2346
|
+
"text"
|
|
2347
|
+
] }],
|
|
2348
|
+
/**
|
|
2349
|
+
* Background Origin
|
|
2350
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
2351
|
+
*/
|
|
2352
|
+
"bg-origin": [{ "bg-origin": [
|
|
2353
|
+
"border",
|
|
2354
|
+
"padding",
|
|
2355
|
+
"content"
|
|
2356
|
+
] }],
|
|
2357
|
+
/**
|
|
2358
|
+
* Background Position
|
|
2359
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
2360
|
+
*/
|
|
2361
|
+
"bg-position": [{ bg: scaleBgPosition() }],
|
|
2362
|
+
/**
|
|
2363
|
+
* Background Repeat
|
|
2364
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
2365
|
+
*/
|
|
2366
|
+
"bg-repeat": [{ bg: scaleBgRepeat() }],
|
|
2367
|
+
/**
|
|
2368
|
+
* Background Size
|
|
2369
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
2370
|
+
*/
|
|
2371
|
+
"bg-size": [{ bg: scaleBgSize() }],
|
|
2372
|
+
/**
|
|
2373
|
+
* Background Image
|
|
2374
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
2375
|
+
*/
|
|
2376
|
+
"bg-image": [{ bg: [
|
|
2377
|
+
"none",
|
|
2378
|
+
{
|
|
2379
|
+
linear: [
|
|
2380
|
+
{ to: [
|
|
2381
|
+
"t",
|
|
2382
|
+
"tr",
|
|
2383
|
+
"r",
|
|
2384
|
+
"br",
|
|
2385
|
+
"b",
|
|
2386
|
+
"bl",
|
|
2387
|
+
"l",
|
|
2388
|
+
"tl"
|
|
2389
|
+
] },
|
|
2390
|
+
isInteger,
|
|
2391
|
+
isArbitraryVariable,
|
|
2392
|
+
isArbitraryValue
|
|
2393
|
+
],
|
|
2394
|
+
radial: [
|
|
2395
|
+
"",
|
|
2396
|
+
isArbitraryVariable,
|
|
2397
|
+
isArbitraryValue
|
|
2398
|
+
],
|
|
2399
|
+
conic: [
|
|
2400
|
+
isInteger,
|
|
2401
|
+
isArbitraryVariable,
|
|
2402
|
+
isArbitraryValue
|
|
2403
|
+
]
|
|
2404
|
+
},
|
|
2405
|
+
isArbitraryVariableImage,
|
|
2406
|
+
isArbitraryImage
|
|
2407
|
+
] }],
|
|
2408
|
+
/**
|
|
2409
|
+
* Background Color
|
|
2410
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
2411
|
+
*/
|
|
2412
|
+
"bg-color": [{ bg: scaleColor() }],
|
|
2413
|
+
/**
|
|
2414
|
+
* Gradient Color Stops From Position
|
|
2415
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2416
|
+
*/
|
|
2417
|
+
"gradient-from-pos": [{ from: scaleGradientStopPosition() }],
|
|
2418
|
+
/**
|
|
2419
|
+
* Gradient Color Stops Via Position
|
|
2420
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2421
|
+
*/
|
|
2422
|
+
"gradient-via-pos": [{ via: scaleGradientStopPosition() }],
|
|
2423
|
+
/**
|
|
2424
|
+
* Gradient Color Stops To Position
|
|
2425
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2426
|
+
*/
|
|
2427
|
+
"gradient-to-pos": [{ to: scaleGradientStopPosition() }],
|
|
2428
|
+
/**
|
|
2429
|
+
* Gradient Color Stops From
|
|
2430
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2431
|
+
*/
|
|
2432
|
+
"gradient-from": [{ from: scaleColor() }],
|
|
2433
|
+
/**
|
|
2434
|
+
* Gradient Color Stops Via
|
|
2435
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2436
|
+
*/
|
|
2437
|
+
"gradient-via": [{ via: scaleColor() }],
|
|
2438
|
+
/**
|
|
2439
|
+
* Gradient Color Stops To
|
|
2440
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2441
|
+
*/
|
|
2442
|
+
"gradient-to": [{ to: scaleColor() }],
|
|
2443
|
+
/**
|
|
2444
|
+
* Border Radius
|
|
2445
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2446
|
+
*/
|
|
2447
|
+
rounded: [{ rounded: scaleRadius() }],
|
|
2448
|
+
/**
|
|
2449
|
+
* Border Radius Start
|
|
2450
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2451
|
+
*/
|
|
2452
|
+
"rounded-s": [{ "rounded-s": scaleRadius() }],
|
|
2453
|
+
/**
|
|
2454
|
+
* Border Radius End
|
|
2455
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2456
|
+
*/
|
|
2457
|
+
"rounded-e": [{ "rounded-e": scaleRadius() }],
|
|
2458
|
+
/**
|
|
2459
|
+
* Border Radius Top
|
|
2460
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2461
|
+
*/
|
|
2462
|
+
"rounded-t": [{ "rounded-t": scaleRadius() }],
|
|
2463
|
+
/**
|
|
2464
|
+
* Border Radius Right
|
|
2465
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2466
|
+
*/
|
|
2467
|
+
"rounded-r": [{ "rounded-r": scaleRadius() }],
|
|
2468
|
+
/**
|
|
2469
|
+
* Border Radius Bottom
|
|
2470
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2471
|
+
*/
|
|
2472
|
+
"rounded-b": [{ "rounded-b": scaleRadius() }],
|
|
2473
|
+
/**
|
|
2474
|
+
* Border Radius Left
|
|
2475
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2476
|
+
*/
|
|
2477
|
+
"rounded-l": [{ "rounded-l": scaleRadius() }],
|
|
2478
|
+
/**
|
|
2479
|
+
* Border Radius Start Start
|
|
2480
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2481
|
+
*/
|
|
2482
|
+
"rounded-ss": [{ "rounded-ss": scaleRadius() }],
|
|
2483
|
+
/**
|
|
2484
|
+
* Border Radius Start End
|
|
2485
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2486
|
+
*/
|
|
2487
|
+
"rounded-se": [{ "rounded-se": scaleRadius() }],
|
|
2488
|
+
/**
|
|
2489
|
+
* Border Radius End End
|
|
2490
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2491
|
+
*/
|
|
2492
|
+
"rounded-ee": [{ "rounded-ee": scaleRadius() }],
|
|
2493
|
+
/**
|
|
2494
|
+
* Border Radius End Start
|
|
2495
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2496
|
+
*/
|
|
2497
|
+
"rounded-es": [{ "rounded-es": scaleRadius() }],
|
|
2498
|
+
/**
|
|
2499
|
+
* Border Radius Top Left
|
|
2500
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2501
|
+
*/
|
|
2502
|
+
"rounded-tl": [{ "rounded-tl": scaleRadius() }],
|
|
2503
|
+
/**
|
|
2504
|
+
* Border Radius Top Right
|
|
2505
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2506
|
+
*/
|
|
2507
|
+
"rounded-tr": [{ "rounded-tr": scaleRadius() }],
|
|
2508
|
+
/**
|
|
2509
|
+
* Border Radius Bottom Right
|
|
2510
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2511
|
+
*/
|
|
2512
|
+
"rounded-br": [{ "rounded-br": scaleRadius() }],
|
|
2513
|
+
/**
|
|
2514
|
+
* Border Radius Bottom Left
|
|
2515
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
2516
|
+
*/
|
|
2517
|
+
"rounded-bl": [{ "rounded-bl": scaleRadius() }],
|
|
2518
|
+
/**
|
|
2519
|
+
* Border Width
|
|
2520
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2521
|
+
*/
|
|
2522
|
+
"border-w": [{ border: scaleBorderWidth() }],
|
|
2523
|
+
/**
|
|
2524
|
+
* Border Width Inline
|
|
2525
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2526
|
+
*/
|
|
2527
|
+
"border-w-x": [{ "border-x": scaleBorderWidth() }],
|
|
2528
|
+
/**
|
|
2529
|
+
* Border Width Block
|
|
2530
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2531
|
+
*/
|
|
2532
|
+
"border-w-y": [{ "border-y": scaleBorderWidth() }],
|
|
2533
|
+
/**
|
|
2534
|
+
* Border Width Inline Start
|
|
2535
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2536
|
+
*/
|
|
2537
|
+
"border-w-s": [{ "border-s": scaleBorderWidth() }],
|
|
2538
|
+
/**
|
|
2539
|
+
* Border Width Inline End
|
|
2540
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2541
|
+
*/
|
|
2542
|
+
"border-w-e": [{ "border-e": scaleBorderWidth() }],
|
|
2543
|
+
/**
|
|
2544
|
+
* Border Width Block Start
|
|
2545
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2546
|
+
*/
|
|
2547
|
+
"border-w-bs": [{ "border-bs": scaleBorderWidth() }],
|
|
2548
|
+
/**
|
|
2549
|
+
* Border Width Block End
|
|
2550
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2551
|
+
*/
|
|
2552
|
+
"border-w-be": [{ "border-be": scaleBorderWidth() }],
|
|
2553
|
+
/**
|
|
2554
|
+
* Border Width Top
|
|
2555
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2556
|
+
*/
|
|
2557
|
+
"border-w-t": [{ "border-t": scaleBorderWidth() }],
|
|
2558
|
+
/**
|
|
2559
|
+
* Border Width Right
|
|
2560
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2561
|
+
*/
|
|
2562
|
+
"border-w-r": [{ "border-r": scaleBorderWidth() }],
|
|
2563
|
+
/**
|
|
2564
|
+
* Border Width Bottom
|
|
2565
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2566
|
+
*/
|
|
2567
|
+
"border-w-b": [{ "border-b": scaleBorderWidth() }],
|
|
2568
|
+
/**
|
|
2569
|
+
* Border Width Left
|
|
2570
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2571
|
+
*/
|
|
2572
|
+
"border-w-l": [{ "border-l": scaleBorderWidth() }],
|
|
2573
|
+
/**
|
|
2574
|
+
* Divide Width X
|
|
2575
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2576
|
+
*/
|
|
2577
|
+
"divide-x": [{ "divide-x": scaleBorderWidth() }],
|
|
2578
|
+
/**
|
|
2579
|
+
* Divide Width X Reverse
|
|
2580
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2581
|
+
*/
|
|
2582
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
2583
|
+
/**
|
|
2584
|
+
* Divide Width Y
|
|
2585
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2586
|
+
*/
|
|
2587
|
+
"divide-y": [{ "divide-y": scaleBorderWidth() }],
|
|
2588
|
+
/**
|
|
2589
|
+
* Divide Width Y Reverse
|
|
2590
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
2591
|
+
*/
|
|
2592
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
2593
|
+
/**
|
|
2594
|
+
* Border Style
|
|
2595
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
2596
|
+
*/
|
|
2597
|
+
"border-style": [{ border: [
|
|
2598
|
+
...scaleLineStyle(),
|
|
2599
|
+
"hidden",
|
|
2600
|
+
"none"
|
|
2601
|
+
] }],
|
|
2602
|
+
/**
|
|
2603
|
+
* Divide Style
|
|
2604
|
+
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
2605
|
+
*/
|
|
2606
|
+
"divide-style": [{ divide: [
|
|
2607
|
+
...scaleLineStyle(),
|
|
2608
|
+
"hidden",
|
|
2609
|
+
"none"
|
|
2610
|
+
] }],
|
|
2611
|
+
/**
|
|
2612
|
+
* Border Color
|
|
2613
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2614
|
+
*/
|
|
2615
|
+
"border-color": [{ border: scaleColor() }],
|
|
2616
|
+
/**
|
|
2617
|
+
* Border Color Inline
|
|
2618
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2619
|
+
*/
|
|
2620
|
+
"border-color-x": [{ "border-x": scaleColor() }],
|
|
2621
|
+
/**
|
|
2622
|
+
* Border Color Block
|
|
2623
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2624
|
+
*/
|
|
2625
|
+
"border-color-y": [{ "border-y": scaleColor() }],
|
|
2626
|
+
/**
|
|
2627
|
+
* Border Color Inline Start
|
|
2628
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2629
|
+
*/
|
|
2630
|
+
"border-color-s": [{ "border-s": scaleColor() }],
|
|
2631
|
+
/**
|
|
2632
|
+
* Border Color Inline End
|
|
2633
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2634
|
+
*/
|
|
2635
|
+
"border-color-e": [{ "border-e": scaleColor() }],
|
|
2636
|
+
/**
|
|
2637
|
+
* Border Color Block Start
|
|
2638
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2639
|
+
*/
|
|
2640
|
+
"border-color-bs": [{ "border-bs": scaleColor() }],
|
|
2641
|
+
/**
|
|
2642
|
+
* Border Color Block End
|
|
2643
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2644
|
+
*/
|
|
2645
|
+
"border-color-be": [{ "border-be": scaleColor() }],
|
|
2646
|
+
/**
|
|
2647
|
+
* Border Color Top
|
|
2648
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2649
|
+
*/
|
|
2650
|
+
"border-color-t": [{ "border-t": scaleColor() }],
|
|
2651
|
+
/**
|
|
2652
|
+
* Border Color Right
|
|
2653
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2654
|
+
*/
|
|
2655
|
+
"border-color-r": [{ "border-r": scaleColor() }],
|
|
2656
|
+
/**
|
|
2657
|
+
* Border Color Bottom
|
|
2658
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2659
|
+
*/
|
|
2660
|
+
"border-color-b": [{ "border-b": scaleColor() }],
|
|
2661
|
+
/**
|
|
2662
|
+
* Border Color Left
|
|
2663
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2664
|
+
*/
|
|
2665
|
+
"border-color-l": [{ "border-l": scaleColor() }],
|
|
2666
|
+
/**
|
|
2667
|
+
* Divide Color
|
|
2668
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
2669
|
+
*/
|
|
2670
|
+
"divide-color": [{ divide: scaleColor() }],
|
|
2671
|
+
/**
|
|
2672
|
+
* Outline Style
|
|
2673
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
2674
|
+
*/
|
|
2675
|
+
"outline-style": [{ outline: [
|
|
2676
|
+
...scaleLineStyle(),
|
|
2677
|
+
"none",
|
|
2678
|
+
"hidden"
|
|
2679
|
+
] }],
|
|
2680
|
+
/**
|
|
2681
|
+
* Outline Offset
|
|
2682
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
2683
|
+
*/
|
|
2684
|
+
"outline-offset": [{ "outline-offset": [
|
|
2685
|
+
isNumber,
|
|
2686
|
+
isArbitraryVariable,
|
|
2687
|
+
isArbitraryValue
|
|
2688
|
+
] }],
|
|
2689
|
+
/**
|
|
2690
|
+
* Outline Width
|
|
2691
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
2692
|
+
*/
|
|
2693
|
+
"outline-w": [{ outline: [
|
|
2694
|
+
"",
|
|
2695
|
+
isNumber,
|
|
2696
|
+
isArbitraryVariableLength,
|
|
2697
|
+
isArbitraryLength
|
|
2698
|
+
] }],
|
|
2699
|
+
/**
|
|
2700
|
+
* Outline Color
|
|
2701
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
2702
|
+
*/
|
|
2703
|
+
"outline-color": [{ outline: scaleColor() }],
|
|
2704
|
+
/**
|
|
2705
|
+
* Box Shadow
|
|
2706
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
2707
|
+
*/
|
|
2708
|
+
shadow: [{ shadow: [
|
|
2709
|
+
"",
|
|
2710
|
+
"none",
|
|
2711
|
+
themeShadow,
|
|
2712
|
+
isArbitraryVariableShadow,
|
|
2713
|
+
isArbitraryShadow
|
|
2714
|
+
] }],
|
|
2715
|
+
/**
|
|
2716
|
+
* Box Shadow Color
|
|
2717
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
2718
|
+
*/
|
|
2719
|
+
"shadow-color": [{ shadow: scaleColor() }],
|
|
2720
|
+
/**
|
|
2721
|
+
* Inset Box Shadow
|
|
2722
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
2723
|
+
*/
|
|
2724
|
+
"inset-shadow": [{ "inset-shadow": [
|
|
2725
|
+
"none",
|
|
2726
|
+
themeInsetShadow,
|
|
2727
|
+
isArbitraryVariableShadow,
|
|
2728
|
+
isArbitraryShadow
|
|
2729
|
+
] }],
|
|
2730
|
+
/**
|
|
2731
|
+
* Inset Box Shadow Color
|
|
2732
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
2733
|
+
*/
|
|
2734
|
+
"inset-shadow-color": [{ "inset-shadow": scaleColor() }],
|
|
2735
|
+
/**
|
|
2736
|
+
* Ring Width
|
|
2737
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
2738
|
+
*/
|
|
2739
|
+
"ring-w": [{ ring: scaleBorderWidth() }],
|
|
2740
|
+
/**
|
|
2741
|
+
* Ring Width Inset
|
|
2742
|
+
* @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
|
|
2743
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2744
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2745
|
+
*/
|
|
2746
|
+
"ring-w-inset": ["ring-inset"],
|
|
2747
|
+
/**
|
|
2748
|
+
* Ring Color
|
|
2749
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
2750
|
+
*/
|
|
2751
|
+
"ring-color": [{ ring: scaleColor() }],
|
|
2752
|
+
/**
|
|
2753
|
+
* Ring Offset Width
|
|
2754
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-width
|
|
2755
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2756
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2757
|
+
*/
|
|
2758
|
+
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
2759
|
+
/**
|
|
2760
|
+
* Ring Offset Color
|
|
2761
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-color
|
|
2762
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2763
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2764
|
+
*/
|
|
2765
|
+
"ring-offset-color": [{ "ring-offset": scaleColor() }],
|
|
2766
|
+
/**
|
|
2767
|
+
* Inset Ring Width
|
|
2768
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
2769
|
+
*/
|
|
2770
|
+
"inset-ring-w": [{ "inset-ring": scaleBorderWidth() }],
|
|
2771
|
+
/**
|
|
2772
|
+
* Inset Ring Color
|
|
2773
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
2774
|
+
*/
|
|
2775
|
+
"inset-ring-color": [{ "inset-ring": scaleColor() }],
|
|
2776
|
+
/**
|
|
2777
|
+
* Text Shadow
|
|
2778
|
+
* @see https://tailwindcss.com/docs/text-shadow
|
|
2779
|
+
*/
|
|
2780
|
+
"text-shadow": [{ "text-shadow": [
|
|
2781
|
+
"none",
|
|
2782
|
+
themeTextShadow,
|
|
2783
|
+
isArbitraryVariableShadow,
|
|
2784
|
+
isArbitraryShadow
|
|
2785
|
+
] }],
|
|
2786
|
+
/**
|
|
2787
|
+
* Text Shadow Color
|
|
2788
|
+
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
2789
|
+
*/
|
|
2790
|
+
"text-shadow-color": [{ "text-shadow": scaleColor() }],
|
|
2791
|
+
/**
|
|
2792
|
+
* Opacity
|
|
2793
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
2794
|
+
*/
|
|
2795
|
+
opacity: [{ opacity: [
|
|
2796
|
+
isNumber,
|
|
2797
|
+
isArbitraryVariable,
|
|
2798
|
+
isArbitraryValue
|
|
2799
|
+
] }],
|
|
2800
|
+
/**
|
|
2801
|
+
* Mix Blend Mode
|
|
2802
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2803
|
+
*/
|
|
2804
|
+
"mix-blend": [{ "mix-blend": [
|
|
2805
|
+
...scaleBlendMode(),
|
|
2806
|
+
"plus-darker",
|
|
2807
|
+
"plus-lighter"
|
|
2808
|
+
] }],
|
|
2809
|
+
/**
|
|
2810
|
+
* Background Blend Mode
|
|
2811
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2812
|
+
*/
|
|
2813
|
+
"bg-blend": [{ "bg-blend": scaleBlendMode() }],
|
|
2814
|
+
/**
|
|
2815
|
+
* Mask Clip
|
|
2816
|
+
* @see https://tailwindcss.com/docs/mask-clip
|
|
2817
|
+
*/
|
|
2818
|
+
"mask-clip": [{ "mask-clip": [
|
|
2819
|
+
"border",
|
|
2820
|
+
"padding",
|
|
2821
|
+
"content",
|
|
2822
|
+
"fill",
|
|
2823
|
+
"stroke",
|
|
2824
|
+
"view"
|
|
2825
|
+
] }, "mask-no-clip"],
|
|
2826
|
+
/**
|
|
2827
|
+
* Mask Composite
|
|
2828
|
+
* @see https://tailwindcss.com/docs/mask-composite
|
|
2829
|
+
*/
|
|
2830
|
+
"mask-composite": [{ mask: [
|
|
2831
|
+
"add",
|
|
2832
|
+
"subtract",
|
|
2833
|
+
"intersect",
|
|
2834
|
+
"exclude"
|
|
2835
|
+
] }],
|
|
2836
|
+
/**
|
|
2837
|
+
* Mask Image
|
|
2838
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2839
|
+
*/
|
|
2840
|
+
"mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
|
|
2841
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }],
|
|
2842
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }],
|
|
2843
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }],
|
|
2844
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }],
|
|
2845
|
+
"mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }],
|
|
2846
|
+
"mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }],
|
|
2847
|
+
"mask-image-t-from-color": [{ "mask-t-from": scaleColor() }],
|
|
2848
|
+
"mask-image-t-to-color": [{ "mask-t-to": scaleColor() }],
|
|
2849
|
+
"mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }],
|
|
2850
|
+
"mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }],
|
|
2851
|
+
"mask-image-r-from-color": [{ "mask-r-from": scaleColor() }],
|
|
2852
|
+
"mask-image-r-to-color": [{ "mask-r-to": scaleColor() }],
|
|
2853
|
+
"mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }],
|
|
2854
|
+
"mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }],
|
|
2855
|
+
"mask-image-b-from-color": [{ "mask-b-from": scaleColor() }],
|
|
2856
|
+
"mask-image-b-to-color": [{ "mask-b-to": scaleColor() }],
|
|
2857
|
+
"mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }],
|
|
2858
|
+
"mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }],
|
|
2859
|
+
"mask-image-l-from-color": [{ "mask-l-from": scaleColor() }],
|
|
2860
|
+
"mask-image-l-to-color": [{ "mask-l-to": scaleColor() }],
|
|
2861
|
+
"mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }],
|
|
2862
|
+
"mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }],
|
|
2863
|
+
"mask-image-x-from-color": [{ "mask-x-from": scaleColor() }],
|
|
2864
|
+
"mask-image-x-to-color": [{ "mask-x-to": scaleColor() }],
|
|
2865
|
+
"mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }],
|
|
2866
|
+
"mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }],
|
|
2867
|
+
"mask-image-y-from-color": [{ "mask-y-from": scaleColor() }],
|
|
2868
|
+
"mask-image-y-to-color": [{ "mask-y-to": scaleColor() }],
|
|
2869
|
+
"mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
|
|
2870
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }],
|
|
2871
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }],
|
|
2872
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }],
|
|
2873
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }],
|
|
2874
|
+
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
2875
|
+
"mask-image-radial-size": [{ "mask-radial": [{
|
|
2876
|
+
closest: ["side", "corner"],
|
|
2877
|
+
farthest: ["side", "corner"]
|
|
2878
|
+
}] }],
|
|
2879
|
+
"mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }],
|
|
2880
|
+
"mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
|
|
2881
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }],
|
|
2882
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }],
|
|
2883
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }],
|
|
2884
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }],
|
|
2885
|
+
/**
|
|
2886
|
+
* Mask Mode
|
|
2887
|
+
* @see https://tailwindcss.com/docs/mask-mode
|
|
2888
|
+
*/
|
|
2889
|
+
"mask-mode": [{ mask: [
|
|
2890
|
+
"alpha",
|
|
2891
|
+
"luminance",
|
|
2892
|
+
"match"
|
|
2893
|
+
] }],
|
|
2894
|
+
/**
|
|
2895
|
+
* Mask Origin
|
|
2896
|
+
* @see https://tailwindcss.com/docs/mask-origin
|
|
2897
|
+
*/
|
|
2898
|
+
"mask-origin": [{ "mask-origin": [
|
|
2899
|
+
"border",
|
|
2900
|
+
"padding",
|
|
2901
|
+
"content",
|
|
2902
|
+
"fill",
|
|
2903
|
+
"stroke",
|
|
2904
|
+
"view"
|
|
2905
|
+
] }],
|
|
2906
|
+
/**
|
|
2907
|
+
* Mask Position
|
|
2908
|
+
* @see https://tailwindcss.com/docs/mask-position
|
|
2909
|
+
*/
|
|
2910
|
+
"mask-position": [{ mask: scaleBgPosition() }],
|
|
2911
|
+
/**
|
|
2912
|
+
* Mask Repeat
|
|
2913
|
+
* @see https://tailwindcss.com/docs/mask-repeat
|
|
2914
|
+
*/
|
|
2915
|
+
"mask-repeat": [{ mask: scaleBgRepeat() }],
|
|
2916
|
+
/**
|
|
2917
|
+
* Mask Size
|
|
2918
|
+
* @see https://tailwindcss.com/docs/mask-size
|
|
2919
|
+
*/
|
|
2920
|
+
"mask-size": [{ mask: scaleBgSize() }],
|
|
2921
|
+
/**
|
|
2922
|
+
* Mask Type
|
|
2923
|
+
* @see https://tailwindcss.com/docs/mask-type
|
|
2924
|
+
*/
|
|
2925
|
+
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
2926
|
+
/**
|
|
2927
|
+
* Mask Image
|
|
2928
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2929
|
+
*/
|
|
2930
|
+
"mask-image": [{ mask: [
|
|
2931
|
+
"none",
|
|
2932
|
+
isArbitraryVariable,
|
|
2933
|
+
isArbitraryValue
|
|
2934
|
+
] }],
|
|
2935
|
+
/**
|
|
2936
|
+
* Filter
|
|
2937
|
+
* @see https://tailwindcss.com/docs/filter
|
|
2938
|
+
*/
|
|
2939
|
+
filter: [{ filter: [
|
|
2940
|
+
"",
|
|
2941
|
+
"none",
|
|
2942
|
+
isArbitraryVariable,
|
|
2943
|
+
isArbitraryValue
|
|
2944
|
+
] }],
|
|
2945
|
+
/**
|
|
2946
|
+
* Blur
|
|
2947
|
+
* @see https://tailwindcss.com/docs/blur
|
|
2948
|
+
*/
|
|
2949
|
+
blur: [{ blur: scaleBlur() }],
|
|
2950
|
+
/**
|
|
2951
|
+
* Brightness
|
|
2952
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
2953
|
+
*/
|
|
2954
|
+
brightness: [{ brightness: [
|
|
2955
|
+
isNumber,
|
|
2956
|
+
isArbitraryVariable,
|
|
2957
|
+
isArbitraryValue
|
|
2958
|
+
] }],
|
|
2959
|
+
/**
|
|
2960
|
+
* Contrast
|
|
2961
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
2962
|
+
*/
|
|
2963
|
+
contrast: [{ contrast: [
|
|
2964
|
+
isNumber,
|
|
2965
|
+
isArbitraryVariable,
|
|
2966
|
+
isArbitraryValue
|
|
2967
|
+
] }],
|
|
2968
|
+
/**
|
|
2969
|
+
* Drop Shadow
|
|
2970
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
2971
|
+
*/
|
|
2972
|
+
"drop-shadow": [{ "drop-shadow": [
|
|
2973
|
+
"",
|
|
2974
|
+
"none",
|
|
2975
|
+
themeDropShadow,
|
|
2976
|
+
isArbitraryVariableShadow,
|
|
2977
|
+
isArbitraryShadow
|
|
2978
|
+
] }],
|
|
2979
|
+
/**
|
|
2980
|
+
* Drop Shadow Color
|
|
2981
|
+
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
2982
|
+
*/
|
|
2983
|
+
"drop-shadow-color": [{ "drop-shadow": scaleColor() }],
|
|
2984
|
+
/**
|
|
2985
|
+
* Grayscale
|
|
2986
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
2987
|
+
*/
|
|
2988
|
+
grayscale: [{ grayscale: [
|
|
2989
|
+
"",
|
|
2990
|
+
isNumber,
|
|
2991
|
+
isArbitraryVariable,
|
|
2992
|
+
isArbitraryValue
|
|
2993
|
+
] }],
|
|
2994
|
+
/**
|
|
2995
|
+
* Hue Rotate
|
|
2996
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
2997
|
+
*/
|
|
2998
|
+
"hue-rotate": [{ "hue-rotate": [
|
|
2999
|
+
isNumber,
|
|
3000
|
+
isArbitraryVariable,
|
|
3001
|
+
isArbitraryValue
|
|
3002
|
+
] }],
|
|
3003
|
+
/**
|
|
3004
|
+
* Invert
|
|
3005
|
+
* @see https://tailwindcss.com/docs/invert
|
|
3006
|
+
*/
|
|
3007
|
+
invert: [{ invert: [
|
|
3008
|
+
"",
|
|
3009
|
+
isNumber,
|
|
3010
|
+
isArbitraryVariable,
|
|
3011
|
+
isArbitraryValue
|
|
3012
|
+
] }],
|
|
3013
|
+
/**
|
|
3014
|
+
* Saturate
|
|
3015
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
3016
|
+
*/
|
|
3017
|
+
saturate: [{ saturate: [
|
|
3018
|
+
isNumber,
|
|
3019
|
+
isArbitraryVariable,
|
|
3020
|
+
isArbitraryValue
|
|
3021
|
+
] }],
|
|
3022
|
+
/**
|
|
3023
|
+
* Sepia
|
|
3024
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
3025
|
+
*/
|
|
3026
|
+
sepia: [{ sepia: [
|
|
3027
|
+
"",
|
|
3028
|
+
isNumber,
|
|
3029
|
+
isArbitraryVariable,
|
|
3030
|
+
isArbitraryValue
|
|
3031
|
+
] }],
|
|
3032
|
+
/**
|
|
3033
|
+
* Backdrop Filter
|
|
3034
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
3035
|
+
*/
|
|
3036
|
+
"backdrop-filter": [{ "backdrop-filter": [
|
|
3037
|
+
"",
|
|
3038
|
+
"none",
|
|
3039
|
+
isArbitraryVariable,
|
|
3040
|
+
isArbitraryValue
|
|
3041
|
+
] }],
|
|
3042
|
+
/**
|
|
3043
|
+
* Backdrop Blur
|
|
3044
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
3045
|
+
*/
|
|
3046
|
+
"backdrop-blur": [{ "backdrop-blur": scaleBlur() }],
|
|
3047
|
+
/**
|
|
3048
|
+
* Backdrop Brightness
|
|
3049
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
3050
|
+
*/
|
|
3051
|
+
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
3052
|
+
isNumber,
|
|
3053
|
+
isArbitraryVariable,
|
|
3054
|
+
isArbitraryValue
|
|
3055
|
+
] }],
|
|
3056
|
+
/**
|
|
3057
|
+
* Backdrop Contrast
|
|
3058
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
3059
|
+
*/
|
|
3060
|
+
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
3061
|
+
isNumber,
|
|
3062
|
+
isArbitraryVariable,
|
|
3063
|
+
isArbitraryValue
|
|
3064
|
+
] }],
|
|
3065
|
+
/**
|
|
3066
|
+
* Backdrop Grayscale
|
|
3067
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
3068
|
+
*/
|
|
3069
|
+
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
3070
|
+
"",
|
|
3071
|
+
isNumber,
|
|
3072
|
+
isArbitraryVariable,
|
|
3073
|
+
isArbitraryValue
|
|
3074
|
+
] }],
|
|
3075
|
+
/**
|
|
3076
|
+
* Backdrop Hue Rotate
|
|
3077
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
3078
|
+
*/
|
|
3079
|
+
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
3080
|
+
isNumber,
|
|
3081
|
+
isArbitraryVariable,
|
|
3082
|
+
isArbitraryValue
|
|
3083
|
+
] }],
|
|
3084
|
+
/**
|
|
3085
|
+
* Backdrop Invert
|
|
3086
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3087
|
+
*/
|
|
3088
|
+
"backdrop-invert": [{ "backdrop-invert": [
|
|
3089
|
+
"",
|
|
3090
|
+
isNumber,
|
|
3091
|
+
isArbitraryVariable,
|
|
3092
|
+
isArbitraryValue
|
|
3093
|
+
] }],
|
|
3094
|
+
/**
|
|
3095
|
+
* Backdrop Opacity
|
|
3096
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3097
|
+
*/
|
|
3098
|
+
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
3099
|
+
isNumber,
|
|
3100
|
+
isArbitraryVariable,
|
|
3101
|
+
isArbitraryValue
|
|
3102
|
+
] }],
|
|
3103
|
+
/**
|
|
3104
|
+
* Backdrop Saturate
|
|
3105
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
3106
|
+
*/
|
|
3107
|
+
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
3108
|
+
isNumber,
|
|
3109
|
+
isArbitraryVariable,
|
|
3110
|
+
isArbitraryValue
|
|
3111
|
+
] }],
|
|
3112
|
+
/**
|
|
3113
|
+
* Backdrop Sepia
|
|
3114
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3115
|
+
*/
|
|
3116
|
+
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
3117
|
+
"",
|
|
3118
|
+
isNumber,
|
|
3119
|
+
isArbitraryVariable,
|
|
3120
|
+
isArbitraryValue
|
|
3121
|
+
] }],
|
|
3122
|
+
/**
|
|
3123
|
+
* Border Collapse
|
|
3124
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
3125
|
+
*/
|
|
3126
|
+
"border-collapse": [{ border: ["collapse", "separate"] }],
|
|
3127
|
+
/**
|
|
3128
|
+
* Border Spacing
|
|
3129
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3130
|
+
*/
|
|
3131
|
+
"border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }],
|
|
3132
|
+
/**
|
|
3133
|
+
* Border Spacing X
|
|
3134
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3135
|
+
*/
|
|
3136
|
+
"border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }],
|
|
3137
|
+
/**
|
|
3138
|
+
* Border Spacing Y
|
|
3139
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3140
|
+
*/
|
|
3141
|
+
"border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }],
|
|
3142
|
+
/**
|
|
3143
|
+
* Table Layout
|
|
3144
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
3145
|
+
*/
|
|
3146
|
+
"table-layout": [{ table: ["auto", "fixed"] }],
|
|
3147
|
+
/**
|
|
3148
|
+
* Caption Side
|
|
3149
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
3150
|
+
*/
|
|
3151
|
+
caption: [{ caption: ["top", "bottom"] }],
|
|
3152
|
+
/**
|
|
3153
|
+
* Transition Property
|
|
3154
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
3155
|
+
*/
|
|
3156
|
+
transition: [{ transition: [
|
|
3157
|
+
"",
|
|
3158
|
+
"all",
|
|
3159
|
+
"colors",
|
|
3160
|
+
"opacity",
|
|
3161
|
+
"shadow",
|
|
3162
|
+
"transform",
|
|
3163
|
+
"none",
|
|
3164
|
+
isArbitraryVariable,
|
|
3165
|
+
isArbitraryValue
|
|
3166
|
+
] }],
|
|
3167
|
+
/**
|
|
3168
|
+
* Transition Behavior
|
|
3169
|
+
* @see https://tailwindcss.com/docs/transition-behavior
|
|
3170
|
+
*/
|
|
3171
|
+
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
3172
|
+
/**
|
|
3173
|
+
* Transition Duration
|
|
3174
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
3175
|
+
*/
|
|
3176
|
+
duration: [{ duration: [
|
|
3177
|
+
isNumber,
|
|
3178
|
+
"initial",
|
|
3179
|
+
isArbitraryVariable,
|
|
3180
|
+
isArbitraryValue
|
|
3181
|
+
] }],
|
|
3182
|
+
/**
|
|
3183
|
+
* Transition Timing Function
|
|
3184
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
3185
|
+
*/
|
|
3186
|
+
ease: [{ ease: [
|
|
3187
|
+
"linear",
|
|
3188
|
+
"initial",
|
|
3189
|
+
themeEase,
|
|
3190
|
+
isArbitraryVariable,
|
|
3191
|
+
isArbitraryValue
|
|
3192
|
+
] }],
|
|
3193
|
+
/**
|
|
3194
|
+
* Transition Delay
|
|
3195
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
3196
|
+
*/
|
|
3197
|
+
delay: [{ delay: [
|
|
3198
|
+
isNumber,
|
|
3199
|
+
isArbitraryVariable,
|
|
3200
|
+
isArbitraryValue
|
|
3201
|
+
] }],
|
|
3202
|
+
/**
|
|
3203
|
+
* Animation
|
|
3204
|
+
* @see https://tailwindcss.com/docs/animation
|
|
3205
|
+
*/
|
|
3206
|
+
animate: [{ animate: [
|
|
3207
|
+
"none",
|
|
3208
|
+
themeAnimate,
|
|
3209
|
+
isArbitraryVariable,
|
|
3210
|
+
isArbitraryValue
|
|
3211
|
+
] }],
|
|
3212
|
+
/**
|
|
3213
|
+
* Backface Visibility
|
|
3214
|
+
* @see https://tailwindcss.com/docs/backface-visibility
|
|
3215
|
+
*/
|
|
3216
|
+
backface: [{ backface: ["hidden", "visible"] }],
|
|
3217
|
+
/**
|
|
3218
|
+
* Perspective
|
|
3219
|
+
* @see https://tailwindcss.com/docs/perspective
|
|
3220
|
+
*/
|
|
3221
|
+
perspective: [{ perspective: [
|
|
3222
|
+
themePerspective,
|
|
3223
|
+
isArbitraryVariable,
|
|
3224
|
+
isArbitraryValue
|
|
3225
|
+
] }],
|
|
3226
|
+
/**
|
|
3227
|
+
* Perspective Origin
|
|
3228
|
+
* @see https://tailwindcss.com/docs/perspective-origin
|
|
3229
|
+
*/
|
|
3230
|
+
"perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }],
|
|
3231
|
+
/**
|
|
3232
|
+
* Rotate
|
|
3233
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3234
|
+
*/
|
|
3235
|
+
rotate: [{ rotate: scaleRotate() }],
|
|
3236
|
+
/**
|
|
3237
|
+
* Rotate X
|
|
3238
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3239
|
+
*/
|
|
3240
|
+
"rotate-x": [{ "rotate-x": scaleRotate() }],
|
|
3241
|
+
/**
|
|
3242
|
+
* Rotate Y
|
|
3243
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3244
|
+
*/
|
|
3245
|
+
"rotate-y": [{ "rotate-y": scaleRotate() }],
|
|
3246
|
+
/**
|
|
3247
|
+
* Rotate Z
|
|
3248
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3249
|
+
*/
|
|
3250
|
+
"rotate-z": [{ "rotate-z": scaleRotate() }],
|
|
3251
|
+
/**
|
|
3252
|
+
* Scale
|
|
3253
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3254
|
+
*/
|
|
3255
|
+
scale: [{ scale: scaleScale() }],
|
|
3256
|
+
/**
|
|
3257
|
+
* Scale X
|
|
3258
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3259
|
+
*/
|
|
3260
|
+
"scale-x": [{ "scale-x": scaleScale() }],
|
|
3261
|
+
/**
|
|
3262
|
+
* Scale Y
|
|
3263
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3264
|
+
*/
|
|
3265
|
+
"scale-y": [{ "scale-y": scaleScale() }],
|
|
3266
|
+
/**
|
|
3267
|
+
* Scale Z
|
|
3268
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3269
|
+
*/
|
|
3270
|
+
"scale-z": [{ "scale-z": scaleScale() }],
|
|
3271
|
+
/**
|
|
3272
|
+
* Scale 3D
|
|
3273
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3274
|
+
*/
|
|
3275
|
+
"scale-3d": ["scale-3d"],
|
|
3276
|
+
/**
|
|
3277
|
+
* Skew
|
|
3278
|
+
* @see https://tailwindcss.com/docs/skew
|
|
3279
|
+
*/
|
|
3280
|
+
skew: [{ skew: scaleSkew() }],
|
|
3281
|
+
/**
|
|
3282
|
+
* Skew X
|
|
3283
|
+
* @see https://tailwindcss.com/docs/skew
|
|
3284
|
+
*/
|
|
3285
|
+
"skew-x": [{ "skew-x": scaleSkew() }],
|
|
3286
|
+
/**
|
|
3287
|
+
* Skew Y
|
|
3288
|
+
* @see https://tailwindcss.com/docs/skew
|
|
3289
|
+
*/
|
|
3290
|
+
"skew-y": [{ "skew-y": scaleSkew() }],
|
|
3291
|
+
/**
|
|
3292
|
+
* Transform
|
|
3293
|
+
* @see https://tailwindcss.com/docs/transform
|
|
3294
|
+
*/
|
|
3295
|
+
transform: [{ transform: [
|
|
3296
|
+
isArbitraryVariable,
|
|
3297
|
+
isArbitraryValue,
|
|
3298
|
+
"",
|
|
3299
|
+
"none",
|
|
3300
|
+
"gpu",
|
|
3301
|
+
"cpu"
|
|
3302
|
+
] }],
|
|
3303
|
+
/**
|
|
3304
|
+
* Transform Origin
|
|
3305
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
3306
|
+
*/
|
|
3307
|
+
"transform-origin": [{ origin: scalePositionWithArbitrary() }],
|
|
3308
|
+
/**
|
|
3309
|
+
* Transform Style
|
|
3310
|
+
* @see https://tailwindcss.com/docs/transform-style
|
|
3311
|
+
*/
|
|
3312
|
+
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
3313
|
+
/**
|
|
3314
|
+
* Translate
|
|
3315
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3316
|
+
*/
|
|
3317
|
+
translate: [{ translate: scaleTranslate() }],
|
|
3318
|
+
/**
|
|
3319
|
+
* Translate X
|
|
3320
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3321
|
+
*/
|
|
3322
|
+
"translate-x": [{ "translate-x": scaleTranslate() }],
|
|
3323
|
+
/**
|
|
3324
|
+
* Translate Y
|
|
3325
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3326
|
+
*/
|
|
3327
|
+
"translate-y": [{ "translate-y": scaleTranslate() }],
|
|
3328
|
+
/**
|
|
3329
|
+
* Translate Z
|
|
3330
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3331
|
+
*/
|
|
3332
|
+
"translate-z": [{ "translate-z": scaleTranslate() }],
|
|
3333
|
+
/**
|
|
3334
|
+
* Translate None
|
|
3335
|
+
* @see https://tailwindcss.com/docs/translate
|
|
3336
|
+
*/
|
|
3337
|
+
"translate-none": ["translate-none"],
|
|
3338
|
+
/**
|
|
3339
|
+
* Zoom
|
|
3340
|
+
* @see https://tailwindcss.com/docs/zoom
|
|
3341
|
+
*/
|
|
3342
|
+
zoom: [{ zoom: [
|
|
3343
|
+
isInteger,
|
|
3344
|
+
isArbitraryVariable,
|
|
3345
|
+
isArbitraryValue
|
|
3346
|
+
] }],
|
|
3347
|
+
/**
|
|
3348
|
+
* Accent Color
|
|
3349
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
3350
|
+
*/
|
|
3351
|
+
accent: [{ accent: scaleColor() }],
|
|
3352
|
+
/**
|
|
3353
|
+
* Appearance
|
|
3354
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
3355
|
+
*/
|
|
3356
|
+
appearance: [{ appearance: ["none", "auto"] }],
|
|
3357
|
+
/**
|
|
3358
|
+
* Caret Color
|
|
3359
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
3360
|
+
*/
|
|
3361
|
+
"caret-color": [{ caret: scaleColor() }],
|
|
3362
|
+
/**
|
|
3363
|
+
* Color Scheme
|
|
3364
|
+
* @see https://tailwindcss.com/docs/color-scheme
|
|
3365
|
+
*/
|
|
3366
|
+
"color-scheme": [{ scheme: [
|
|
3367
|
+
"normal",
|
|
3368
|
+
"dark",
|
|
3369
|
+
"light",
|
|
3370
|
+
"light-dark",
|
|
3371
|
+
"only-dark",
|
|
3372
|
+
"only-light"
|
|
3373
|
+
] }],
|
|
3374
|
+
/**
|
|
3375
|
+
* Cursor
|
|
3376
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
3377
|
+
*/
|
|
3378
|
+
cursor: [{ cursor: [
|
|
3379
|
+
"auto",
|
|
3380
|
+
"default",
|
|
3381
|
+
"pointer",
|
|
3382
|
+
"wait",
|
|
3383
|
+
"text",
|
|
3384
|
+
"move",
|
|
3385
|
+
"help",
|
|
3386
|
+
"not-allowed",
|
|
3387
|
+
"none",
|
|
3388
|
+
"context-menu",
|
|
3389
|
+
"progress",
|
|
3390
|
+
"cell",
|
|
3391
|
+
"crosshair",
|
|
3392
|
+
"vertical-text",
|
|
3393
|
+
"alias",
|
|
3394
|
+
"copy",
|
|
3395
|
+
"no-drop",
|
|
3396
|
+
"grab",
|
|
3397
|
+
"grabbing",
|
|
3398
|
+
"all-scroll",
|
|
3399
|
+
"col-resize",
|
|
3400
|
+
"row-resize",
|
|
3401
|
+
"n-resize",
|
|
3402
|
+
"e-resize",
|
|
3403
|
+
"s-resize",
|
|
3404
|
+
"w-resize",
|
|
3405
|
+
"ne-resize",
|
|
3406
|
+
"nw-resize",
|
|
3407
|
+
"se-resize",
|
|
3408
|
+
"sw-resize",
|
|
3409
|
+
"ew-resize",
|
|
3410
|
+
"ns-resize",
|
|
3411
|
+
"nesw-resize",
|
|
3412
|
+
"nwse-resize",
|
|
3413
|
+
"zoom-in",
|
|
3414
|
+
"zoom-out",
|
|
3415
|
+
isArbitraryVariable,
|
|
3416
|
+
isArbitraryValue
|
|
3417
|
+
] }],
|
|
3418
|
+
/**
|
|
3419
|
+
* Field Sizing
|
|
3420
|
+
* @see https://tailwindcss.com/docs/field-sizing
|
|
3421
|
+
*/
|
|
3422
|
+
"field-sizing": [{ "field-sizing": ["fixed", "content"] }],
|
|
3423
|
+
/**
|
|
3424
|
+
* Pointer Events
|
|
3425
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
3426
|
+
*/
|
|
3427
|
+
"pointer-events": [{ "pointer-events": ["auto", "none"] }],
|
|
3428
|
+
/**
|
|
3429
|
+
* Resize
|
|
3430
|
+
* @see https://tailwindcss.com/docs/resize
|
|
3431
|
+
*/
|
|
3432
|
+
resize: [{ resize: [
|
|
3433
|
+
"none",
|
|
3434
|
+
"",
|
|
3435
|
+
"y",
|
|
3436
|
+
"x"
|
|
3437
|
+
] }],
|
|
3438
|
+
/**
|
|
3439
|
+
* Scroll Behavior
|
|
3440
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
3441
|
+
*/
|
|
3442
|
+
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
3443
|
+
/**
|
|
3444
|
+
* Scrollbar Thumb Color
|
|
3445
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
3446
|
+
*/
|
|
3447
|
+
"scrollbar-thumb-color": [{ "scrollbar-thumb": scaleColor() }],
|
|
3448
|
+
/**
|
|
3449
|
+
* Scrollbar Track Color
|
|
3450
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
3451
|
+
*/
|
|
3452
|
+
"scrollbar-track-color": [{ "scrollbar-track": scaleColor() }],
|
|
3453
|
+
/**
|
|
3454
|
+
* Scrollbar Gutter
|
|
3455
|
+
* @see https://tailwindcss.com/docs/scrollbar-gutter
|
|
3456
|
+
*/
|
|
3457
|
+
"scrollbar-gutter": [{ "scrollbar-gutter": [
|
|
3458
|
+
"auto",
|
|
3459
|
+
"stable",
|
|
3460
|
+
"both"
|
|
3461
|
+
] }],
|
|
3462
|
+
/**
|
|
3463
|
+
* Scrollbar Width
|
|
3464
|
+
* @see https://tailwindcss.com/docs/scrollbar-width
|
|
3465
|
+
*/
|
|
3466
|
+
"scrollbar-w": [{ scrollbar: [
|
|
3467
|
+
"auto",
|
|
3468
|
+
"thin",
|
|
3469
|
+
"none"
|
|
3470
|
+
] }],
|
|
3471
|
+
/**
|
|
3472
|
+
* Scroll Margin
|
|
3473
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3474
|
+
*/
|
|
3475
|
+
"scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }],
|
|
3476
|
+
/**
|
|
3477
|
+
* Scroll Margin Inline
|
|
3478
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3479
|
+
*/
|
|
3480
|
+
"scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }],
|
|
3481
|
+
/**
|
|
3482
|
+
* Scroll Margin Block
|
|
3483
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3484
|
+
*/
|
|
3485
|
+
"scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }],
|
|
3486
|
+
/**
|
|
3487
|
+
* Scroll Margin Inline Start
|
|
3488
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3489
|
+
*/
|
|
3490
|
+
"scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }],
|
|
3491
|
+
/**
|
|
3492
|
+
* Scroll Margin Inline End
|
|
3493
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3494
|
+
*/
|
|
3495
|
+
"scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }],
|
|
3496
|
+
/**
|
|
3497
|
+
* Scroll Margin Block Start
|
|
3498
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3499
|
+
*/
|
|
3500
|
+
"scroll-mbs": [{ "scroll-mbs": scaleUnambiguousSpacing() }],
|
|
3501
|
+
/**
|
|
3502
|
+
* Scroll Margin Block End
|
|
3503
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3504
|
+
*/
|
|
3505
|
+
"scroll-mbe": [{ "scroll-mbe": scaleUnambiguousSpacing() }],
|
|
3506
|
+
/**
|
|
3507
|
+
* Scroll Margin Top
|
|
3508
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3509
|
+
*/
|
|
3510
|
+
"scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }],
|
|
3511
|
+
/**
|
|
3512
|
+
* Scroll Margin Right
|
|
3513
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3514
|
+
*/
|
|
3515
|
+
"scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }],
|
|
3516
|
+
/**
|
|
3517
|
+
* Scroll Margin Bottom
|
|
3518
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3519
|
+
*/
|
|
3520
|
+
"scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }],
|
|
3521
|
+
/**
|
|
3522
|
+
* Scroll Margin Left
|
|
3523
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3524
|
+
*/
|
|
3525
|
+
"scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }],
|
|
3526
|
+
/**
|
|
3527
|
+
* Scroll Padding
|
|
3528
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3529
|
+
*/
|
|
3530
|
+
"scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }],
|
|
3531
|
+
/**
|
|
3532
|
+
* Scroll Padding Inline
|
|
3533
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3534
|
+
*/
|
|
3535
|
+
"scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }],
|
|
3536
|
+
/**
|
|
3537
|
+
* Scroll Padding Block
|
|
3538
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3539
|
+
*/
|
|
3540
|
+
"scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }],
|
|
3541
|
+
/**
|
|
3542
|
+
* Scroll Padding Inline Start
|
|
3543
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3544
|
+
*/
|
|
3545
|
+
"scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }],
|
|
3546
|
+
/**
|
|
3547
|
+
* Scroll Padding Inline End
|
|
3548
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3549
|
+
*/
|
|
3550
|
+
"scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }],
|
|
3551
|
+
/**
|
|
3552
|
+
* Scroll Padding Block Start
|
|
3553
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3554
|
+
*/
|
|
3555
|
+
"scroll-pbs": [{ "scroll-pbs": scaleUnambiguousSpacing() }],
|
|
3556
|
+
/**
|
|
3557
|
+
* Scroll Padding Block End
|
|
3558
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3559
|
+
*/
|
|
3560
|
+
"scroll-pbe": [{ "scroll-pbe": scaleUnambiguousSpacing() }],
|
|
3561
|
+
/**
|
|
3562
|
+
* Scroll Padding Top
|
|
3563
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3564
|
+
*/
|
|
3565
|
+
"scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }],
|
|
3566
|
+
/**
|
|
3567
|
+
* Scroll Padding Right
|
|
3568
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3569
|
+
*/
|
|
3570
|
+
"scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }],
|
|
3571
|
+
/**
|
|
3572
|
+
* Scroll Padding Bottom
|
|
3573
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3574
|
+
*/
|
|
3575
|
+
"scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }],
|
|
3576
|
+
/**
|
|
3577
|
+
* Scroll Padding Left
|
|
3578
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3579
|
+
*/
|
|
3580
|
+
"scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }],
|
|
3581
|
+
/**
|
|
3582
|
+
* Scroll Snap Align
|
|
3583
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
3584
|
+
*/
|
|
3585
|
+
"snap-align": [{ snap: [
|
|
3586
|
+
"start",
|
|
3587
|
+
"end",
|
|
3588
|
+
"center",
|
|
3589
|
+
"align-none"
|
|
3590
|
+
] }],
|
|
3591
|
+
/**
|
|
3592
|
+
* Scroll Snap Stop
|
|
3593
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
3594
|
+
*/
|
|
3595
|
+
"snap-stop": [{ snap: ["normal", "always"] }],
|
|
3596
|
+
/**
|
|
3597
|
+
* Scroll Snap Type
|
|
3598
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
3599
|
+
*/
|
|
3600
|
+
"snap-type": [{ snap: [
|
|
3601
|
+
"none",
|
|
3602
|
+
"x",
|
|
3603
|
+
"y",
|
|
3604
|
+
"both"
|
|
3605
|
+
] }],
|
|
3606
|
+
/**
|
|
3607
|
+
* Scroll Snap Type Strictness
|
|
3608
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
3609
|
+
*/
|
|
3610
|
+
"snap-strictness": [{ snap: ["mandatory", "proximity"] }],
|
|
3611
|
+
/**
|
|
3612
|
+
* Touch Action
|
|
3613
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3614
|
+
*/
|
|
3615
|
+
touch: [{ touch: [
|
|
3616
|
+
"auto",
|
|
3617
|
+
"none",
|
|
3618
|
+
"manipulation"
|
|
3619
|
+
] }],
|
|
3620
|
+
/**
|
|
3621
|
+
* Touch Action X
|
|
3622
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3623
|
+
*/
|
|
3624
|
+
"touch-x": [{ "touch-pan": [
|
|
3625
|
+
"x",
|
|
3626
|
+
"left",
|
|
3627
|
+
"right"
|
|
3628
|
+
] }],
|
|
3629
|
+
/**
|
|
3630
|
+
* Touch Action Y
|
|
3631
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3632
|
+
*/
|
|
3633
|
+
"touch-y": [{ "touch-pan": [
|
|
3634
|
+
"y",
|
|
3635
|
+
"up",
|
|
3636
|
+
"down"
|
|
3637
|
+
] }],
|
|
3638
|
+
/**
|
|
3639
|
+
* Touch Action Pinch Zoom
|
|
3640
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
3641
|
+
*/
|
|
3642
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
3643
|
+
/**
|
|
3644
|
+
* User Select
|
|
3645
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
3646
|
+
*/
|
|
3647
|
+
select: [{ select: [
|
|
3648
|
+
"none",
|
|
3649
|
+
"text",
|
|
3650
|
+
"all",
|
|
3651
|
+
"auto"
|
|
3652
|
+
] }],
|
|
3653
|
+
/**
|
|
3654
|
+
* Will Change
|
|
3655
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
3656
|
+
*/
|
|
3657
|
+
"will-change": [{ "will-change": [
|
|
3658
|
+
"auto",
|
|
3659
|
+
"scroll",
|
|
3660
|
+
"contents",
|
|
3661
|
+
"transform",
|
|
3662
|
+
isArbitraryVariable,
|
|
3663
|
+
isArbitraryValue
|
|
3664
|
+
] }],
|
|
3665
|
+
/**
|
|
3666
|
+
* Fill
|
|
3667
|
+
* @see https://tailwindcss.com/docs/fill
|
|
3668
|
+
*/
|
|
3669
|
+
fill: [{ fill: ["none", ...scaleColor()] }],
|
|
3670
|
+
/**
|
|
3671
|
+
* Stroke Width
|
|
3672
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
3673
|
+
*/
|
|
3674
|
+
"stroke-w": [{ stroke: [
|
|
3675
|
+
isNumber,
|
|
3676
|
+
isArbitraryVariableLength,
|
|
3677
|
+
isArbitraryLength,
|
|
3678
|
+
isArbitraryNumber
|
|
3679
|
+
] }],
|
|
3680
|
+
/**
|
|
3681
|
+
* Stroke
|
|
3682
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
3683
|
+
*/
|
|
3684
|
+
stroke: [{ stroke: ["none", ...scaleColor()] }],
|
|
3685
|
+
/**
|
|
3686
|
+
* Forced Color Adjust
|
|
3687
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
3688
|
+
*/
|
|
3689
|
+
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
3690
|
+
},
|
|
3691
|
+
conflictingClassGroups: {
|
|
3692
|
+
"container-named": ["container-type"],
|
|
3693
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
3694
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
3695
|
+
inset: [
|
|
3696
|
+
"inset-x",
|
|
3697
|
+
"inset-y",
|
|
3698
|
+
"inset-bs",
|
|
3699
|
+
"inset-be",
|
|
3700
|
+
"start",
|
|
3701
|
+
"end",
|
|
3702
|
+
"top",
|
|
3703
|
+
"right",
|
|
3704
|
+
"bottom",
|
|
3705
|
+
"left"
|
|
3706
|
+
],
|
|
3707
|
+
"inset-x": ["right", "left"],
|
|
3708
|
+
"inset-y": ["top", "bottom"],
|
|
3709
|
+
flex: [
|
|
3710
|
+
"basis",
|
|
3711
|
+
"grow",
|
|
3712
|
+
"shrink"
|
|
3713
|
+
],
|
|
3714
|
+
gap: ["gap-x", "gap-y"],
|
|
3715
|
+
p: [
|
|
3716
|
+
"px",
|
|
3717
|
+
"py",
|
|
3718
|
+
"ps",
|
|
3719
|
+
"pe",
|
|
3720
|
+
"pbs",
|
|
3721
|
+
"pbe",
|
|
3722
|
+
"pt",
|
|
3723
|
+
"pr",
|
|
3724
|
+
"pb",
|
|
3725
|
+
"pl"
|
|
3726
|
+
],
|
|
3727
|
+
px: ["pr", "pl"],
|
|
3728
|
+
py: ["pt", "pb"],
|
|
3729
|
+
m: [
|
|
3730
|
+
"mx",
|
|
3731
|
+
"my",
|
|
3732
|
+
"ms",
|
|
3733
|
+
"me",
|
|
3734
|
+
"mbs",
|
|
3735
|
+
"mbe",
|
|
3736
|
+
"mt",
|
|
3737
|
+
"mr",
|
|
3738
|
+
"mb",
|
|
3739
|
+
"ml"
|
|
3740
|
+
],
|
|
3741
|
+
mx: ["mr", "ml"],
|
|
3742
|
+
my: ["mt", "mb"],
|
|
3743
|
+
size: ["w", "h"],
|
|
3744
|
+
"font-size": ["leading"],
|
|
3745
|
+
"fvn-normal": [
|
|
3746
|
+
"fvn-ordinal",
|
|
3747
|
+
"fvn-slashed-zero",
|
|
3748
|
+
"fvn-figure",
|
|
3749
|
+
"fvn-spacing",
|
|
3750
|
+
"fvn-fraction"
|
|
3751
|
+
],
|
|
3752
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
3753
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
3754
|
+
"fvn-figure": ["fvn-normal"],
|
|
3755
|
+
"fvn-spacing": ["fvn-normal"],
|
|
3756
|
+
"fvn-fraction": ["fvn-normal"],
|
|
3757
|
+
"line-clamp": ["display", "overflow"],
|
|
3758
|
+
rounded: [
|
|
3759
|
+
"rounded-s",
|
|
3760
|
+
"rounded-e",
|
|
3761
|
+
"rounded-t",
|
|
3762
|
+
"rounded-r",
|
|
3763
|
+
"rounded-b",
|
|
3764
|
+
"rounded-l",
|
|
3765
|
+
"rounded-ss",
|
|
3766
|
+
"rounded-se",
|
|
3767
|
+
"rounded-ee",
|
|
3768
|
+
"rounded-es",
|
|
3769
|
+
"rounded-tl",
|
|
3770
|
+
"rounded-tr",
|
|
3771
|
+
"rounded-br",
|
|
3772
|
+
"rounded-bl"
|
|
3773
|
+
],
|
|
3774
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
3775
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
3776
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
3777
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
3778
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
3779
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
3780
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
3781
|
+
"border-w": [
|
|
3782
|
+
"border-w-x",
|
|
3783
|
+
"border-w-y",
|
|
3784
|
+
"border-w-s",
|
|
3785
|
+
"border-w-e",
|
|
3786
|
+
"border-w-bs",
|
|
3787
|
+
"border-w-be",
|
|
3788
|
+
"border-w-t",
|
|
3789
|
+
"border-w-r",
|
|
3790
|
+
"border-w-b",
|
|
3791
|
+
"border-w-l"
|
|
3792
|
+
],
|
|
3793
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
3794
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
3795
|
+
"border-color": [
|
|
3796
|
+
"border-color-x",
|
|
3797
|
+
"border-color-y",
|
|
3798
|
+
"border-color-s",
|
|
3799
|
+
"border-color-e",
|
|
3800
|
+
"border-color-bs",
|
|
3801
|
+
"border-color-be",
|
|
3802
|
+
"border-color-t",
|
|
3803
|
+
"border-color-r",
|
|
3804
|
+
"border-color-b",
|
|
3805
|
+
"border-color-l"
|
|
3806
|
+
],
|
|
3807
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
3808
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
3809
|
+
translate: [
|
|
3810
|
+
"translate-x",
|
|
3811
|
+
"translate-y",
|
|
3812
|
+
"translate-none"
|
|
3813
|
+
],
|
|
3814
|
+
"translate-none": [
|
|
3815
|
+
"translate",
|
|
3816
|
+
"translate-x",
|
|
3817
|
+
"translate-y",
|
|
3818
|
+
"translate-z"
|
|
3819
|
+
],
|
|
3820
|
+
"scroll-m": [
|
|
3821
|
+
"scroll-mx",
|
|
3822
|
+
"scroll-my",
|
|
3823
|
+
"scroll-ms",
|
|
3824
|
+
"scroll-me",
|
|
3825
|
+
"scroll-mbs",
|
|
3826
|
+
"scroll-mbe",
|
|
3827
|
+
"scroll-mt",
|
|
3828
|
+
"scroll-mr",
|
|
3829
|
+
"scroll-mb",
|
|
3830
|
+
"scroll-ml"
|
|
3831
|
+
],
|
|
3832
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
3833
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
3834
|
+
"scroll-p": [
|
|
3835
|
+
"scroll-px",
|
|
3836
|
+
"scroll-py",
|
|
3837
|
+
"scroll-ps",
|
|
3838
|
+
"scroll-pe",
|
|
3839
|
+
"scroll-pbs",
|
|
3840
|
+
"scroll-pbe",
|
|
3841
|
+
"scroll-pt",
|
|
3842
|
+
"scroll-pr",
|
|
3843
|
+
"scroll-pb",
|
|
3844
|
+
"scroll-pl"
|
|
3845
|
+
],
|
|
3846
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
3847
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
3848
|
+
touch: [
|
|
3849
|
+
"touch-x",
|
|
3850
|
+
"touch-y",
|
|
3851
|
+
"touch-pz"
|
|
3852
|
+
],
|
|
3853
|
+
"touch-x": ["touch"],
|
|
3854
|
+
"touch-y": ["touch"],
|
|
3855
|
+
"touch-pz": ["touch"]
|
|
3856
|
+
},
|
|
3857
|
+
conflictingClassGroupModifiers: { "font-size": ["leading"] },
|
|
3858
|
+
postfixLookupClassGroups: ["container-type"],
|
|
3859
|
+
orderSensitiveModifiers: [
|
|
3860
|
+
"*",
|
|
3861
|
+
"**",
|
|
3862
|
+
"after",
|
|
3863
|
+
"backdrop",
|
|
3864
|
+
"before",
|
|
3865
|
+
"details-content",
|
|
3866
|
+
"file",
|
|
3867
|
+
"first-letter",
|
|
3868
|
+
"first-line",
|
|
3869
|
+
"marker",
|
|
3870
|
+
"placeholder",
|
|
3871
|
+
"selection"
|
|
3872
|
+
]
|
|
3873
|
+
};
|
|
3874
|
+
};
|
|
3875
|
+
//#endregion
|
|
3876
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/merge-configs.ts
|
|
3877
|
+
/**
|
|
3878
|
+
* @param baseConfig Config where other config will be merged into. This object will be mutated.
|
|
3879
|
+
* @param configExtension Partial config to merge into the `baseConfig`.
|
|
3880
|
+
*/
|
|
3881
|
+
const mergeConfigs = (baseConfig, { cacheSize, prefix, experimentalParseClassName, extend = {}, override = {} }) => {
|
|
3882
|
+
overrideProperty(baseConfig, "cacheSize", cacheSize);
|
|
3883
|
+
overrideProperty(baseConfig, "prefix", prefix);
|
|
3884
|
+
overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
|
|
3885
|
+
overrideConfigProperties(baseConfig.theme, override.theme);
|
|
3886
|
+
overrideConfigProperties(baseConfig.classGroups, override.classGroups);
|
|
3887
|
+
overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);
|
|
3888
|
+
overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);
|
|
3889
|
+
overrideProperty(baseConfig, "postfixLookupClassGroups", override.postfixLookupClassGroups);
|
|
3890
|
+
overrideProperty(baseConfig, "orderSensitiveModifiers", override.orderSensitiveModifiers);
|
|
3891
|
+
mergeConfigProperties(baseConfig.theme, extend.theme);
|
|
3892
|
+
mergeConfigProperties(baseConfig.classGroups, extend.classGroups);
|
|
3893
|
+
mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);
|
|
3894
|
+
mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);
|
|
3895
|
+
mergeArrayProperties(baseConfig, extend, "postfixLookupClassGroups");
|
|
3896
|
+
mergeArrayProperties(baseConfig, extend, "orderSensitiveModifiers");
|
|
3897
|
+
return baseConfig;
|
|
3898
|
+
};
|
|
3899
|
+
const overrideProperty = (baseObject, overrideKey, overrideValue) => {
|
|
3900
|
+
if (overrideValue !== void 0) baseObject[overrideKey] = overrideValue;
|
|
3901
|
+
};
|
|
3902
|
+
const overrideConfigProperties = (baseObject, overrideObject) => {
|
|
3903
|
+
if (overrideObject) for (const key in overrideObject) overrideProperty(baseObject, key, overrideObject[key]);
|
|
3904
|
+
};
|
|
3905
|
+
const mergeConfigProperties = (baseObject, mergeObject) => {
|
|
3906
|
+
if (mergeObject) for (const key in mergeObject) mergeArrayProperties(baseObject, mergeObject, key);
|
|
3907
|
+
};
|
|
3908
|
+
const mergeArrayProperties = (baseObject, mergeObject, key) => {
|
|
3909
|
+
const mergeValue = mergeObject[key];
|
|
3910
|
+
if (mergeValue !== void 0) baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;
|
|
3911
|
+
};
|
|
3912
|
+
//#endregion
|
|
3913
|
+
//#region src/orders/class-order.tailwind-merge.ts
|
|
3914
|
+
const isGroupNamed = (value) => value.startsWith("group/");
|
|
3915
|
+
const isPeerNamed = (value) => value.startsWith("peer/");
|
|
3916
|
+
const configExtend = { classGroups: {
|
|
3917
|
+
group: ["group", isGroupNamed],
|
|
3918
|
+
peer: ["peer", isPeerNamed]
|
|
3919
|
+
} };
|
|
3920
|
+
const configUtils = createConfigUtils(mergeConfigs(getDefaultConfig(), { extend: configExtend }));
|
|
3921
|
+
//#endregion
|
|
3922
|
+
//#region src/group-classes/group-classes.bucket.ts
|
|
3923
|
+
/**
|
|
3924
|
+
* Fast lookup map from tailwind-merge groupId to class group index (0-based).
|
|
3925
|
+
* Built with null prototype to avoid prototype pollution and enable O(1) lookups.
|
|
3926
|
+
*/
|
|
3927
|
+
const groupIdToGroupIndex = Object.create(null);
|
|
3928
|
+
for (let groupIndex = 0; groupIndex < classGroups.length; groupIndex++) {
|
|
3929
|
+
const groupList = classGroups[groupIndex];
|
|
3930
|
+
for (let i = 0; i < groupList.length; i++) groupIdToGroupIndex[groupList[i]] = groupIndex;
|
|
3931
|
+
}
|
|
3932
|
+
function createClassBuckets() {
|
|
3933
|
+
return Array.from({ length: classGroupsCount }, () => ({
|
|
3934
|
+
baseClasses: [],
|
|
3935
|
+
modifierGroups: /* @__PURE__ */ new Map(),
|
|
3936
|
+
totalModifierCount: 0
|
|
3937
|
+
}));
|
|
3938
|
+
}
|
|
3939
|
+
function resolveGroupIndex(parsed, unknownGroupIndex) {
|
|
3940
|
+
const baseClassName = parsed.maybePostfixModifierPosition ? parsed.baseClassName.slice(0, parsed.maybePostfixModifierPosition) : parsed.baseClassName;
|
|
3941
|
+
const groupId = configUtils.getClassGroupId(baseClassName);
|
|
3942
|
+
return groupId !== void 0 && groupIdToGroupIndex[groupId] !== void 0 ? groupIdToGroupIndex[groupId] : unknownGroupIndex;
|
|
3943
|
+
}
|
|
3944
|
+
function addClassToBucket(bucket, cls, modifiers) {
|
|
3945
|
+
if (modifiers.length === 0) {
|
|
3946
|
+
bucket.baseClasses.push(cls);
|
|
3947
|
+
return;
|
|
3948
|
+
}
|
|
3949
|
+
const modifierKey = modifiers.join(":");
|
|
3950
|
+
const group = bucket.modifierGroups.get(modifierKey);
|
|
3951
|
+
if (group) group.push(cls);
|
|
3952
|
+
else bucket.modifierGroups.set(modifierKey, [cls]);
|
|
3953
|
+
bucket.totalModifierCount++;
|
|
3954
|
+
}
|
|
3955
|
+
//#endregion
|
|
3956
|
+
//#region src/orders/modifier-order.prettier-plugin-tailwindcss.ts
|
|
3957
|
+
const sorter = await createSorter({});
|
|
3958
|
+
const DUMMY_SUFFIX = ":flex";
|
|
3959
|
+
/**
|
|
3960
|
+
* Sorts modifier keys according to Tailwind CSS Compiler AST order
|
|
3961
|
+
* using dummy classes (e.g. 'hover' -> 'hover:flex').
|
|
3962
|
+
*
|
|
3963
|
+
* @param modifierKeys Array of modifier strings (e.g. ['dark:hover', 'hover', 'md', 'dark', 'sm'])
|
|
3964
|
+
* @returns Sorted array of modifier keys adhering to official Tailwind Compiler order
|
|
3965
|
+
*/
|
|
3966
|
+
function sortModifierKeys(modifierKeys) {
|
|
3967
|
+
if (modifierKeys.length <= 1) return modifierKeys;
|
|
3968
|
+
const dummyClasses = modifierKeys.map((mod) => `${mod}${DUMMY_SUFFIX}`);
|
|
3969
|
+
const [sortedDummyClasses] = sorter.sortClassLists([dummyClasses]);
|
|
3970
|
+
return sortedDummyClasses.map((cls) => cls.slice(0, -5));
|
|
3971
|
+
}
|
|
3972
|
+
//#endregion
|
|
3973
|
+
//#region src/group-classes/group-classes.format.ts
|
|
3974
|
+
function formatBucketLines(bucket, modifierThreshold) {
|
|
3975
|
+
const { baseClasses, modifierGroups, totalModifierCount } = bucket;
|
|
3976
|
+
if (baseClasses.length === 0 && totalModifierCount === 0) return [];
|
|
3977
|
+
const sortedModifierKeys = sortModifierKeys(Array.from(modifierGroups.keys()));
|
|
3978
|
+
if (totalModifierCount <= modifierThreshold) {
|
|
3979
|
+
const lineClasses = [...baseClasses];
|
|
3980
|
+
for (let i = 0; i < sortedModifierKeys.length; i++) lineClasses.push(...modifierGroups.get(sortedModifierKeys[i]));
|
|
3981
|
+
return [lineClasses.join(" ")];
|
|
3982
|
+
}
|
|
3983
|
+
const lines = [];
|
|
3984
|
+
if (baseClasses.length > 0) lines.push(baseClasses.join(" "));
|
|
3985
|
+
for (let i = 0; i < sortedModifierKeys.length; i++) {
|
|
3986
|
+
const modClasses = modifierGroups.get(sortedModifierKeys[i]);
|
|
3987
|
+
lines.push(modClasses.join(" "));
|
|
3988
|
+
}
|
|
3989
|
+
return lines;
|
|
3990
|
+
}
|
|
3991
|
+
//#endregion
|
|
3992
|
+
//#region src/group-classes/group-classes.ts
|
|
3993
|
+
function groupClasses(classes, modifierThreshold = 2) {
|
|
3994
|
+
const unknownGroupIndex = classGroupsCount - 1;
|
|
3995
|
+
const buckets = createClassBuckets();
|
|
3996
|
+
for (let i = 0; i < classes.length; i++) {
|
|
3997
|
+
const cls = classes[i];
|
|
3998
|
+
const parsed = configUtils.parseClassName(cls);
|
|
3999
|
+
addClassToBucket(buckets[resolveGroupIndex(parsed, unknownGroupIndex)], cls, parsed.modifiers);
|
|
4000
|
+
}
|
|
4001
|
+
const result = [];
|
|
4002
|
+
for (let i = 0; i < classGroupsCount; i++) {
|
|
4003
|
+
const lines = formatBucketLines(buckets[i], modifierThreshold);
|
|
4004
|
+
for (let j = 0; j < lines.length; j++) result.push(lines[j]);
|
|
4005
|
+
}
|
|
4006
|
+
return result;
|
|
4007
|
+
}
|
|
4008
|
+
//#endregion
|
|
4009
|
+
//#region src/utils/split-classes.ts
|
|
4010
|
+
function splitClasses(classString) {
|
|
4011
|
+
return classString.trim().split(/\s+/).filter(Boolean);
|
|
4012
|
+
}
|
|
4013
|
+
//#endregion
|
|
4014
|
+
//#region src/handle-node/handle-expressions.ts
|
|
4015
|
+
/** Extracts and regroups static class strings in an expression array while preserving dynamic elements. */
|
|
4016
|
+
function handleExpressionArray(expressions, options) {
|
|
4017
|
+
const staticStrings = [];
|
|
4018
|
+
const dynamicExpressions = [];
|
|
4019
|
+
for (const arg of expressions) if (isStringLiteral(arg)) {
|
|
4020
|
+
if (isNodeWithComments(arg)) return expressions;
|
|
4021
|
+
staticStrings.push(arg.value);
|
|
4022
|
+
} else dynamicExpressions.push(arg);
|
|
4023
|
+
if (staticStrings.length === 0) return expressions;
|
|
4024
|
+
const combinedString = staticStrings.join(" ");
|
|
4025
|
+
const classes = splitClasses(combinedString);
|
|
4026
|
+
if (classes.length === 0) return dynamicExpressions.length === 0 ? buildStringLiteral("") : dynamicExpressions;
|
|
4027
|
+
if (classes.length <= options.classNameThreshold) {
|
|
4028
|
+
const node = buildStringLiteral(combinedString);
|
|
4029
|
+
return dynamicExpressions.length === 0 ? node : [node, ...dynamicExpressions];
|
|
4030
|
+
}
|
|
4031
|
+
const grouped = groupClasses(classes, options.modifierThreshold).map(buildStringLiteral);
|
|
4032
|
+
return dynamicExpressions.length === 0 ? grouped : [...grouped, ...dynamicExpressions];
|
|
4033
|
+
}
|
|
4034
|
+
//#endregion
|
|
4035
|
+
//#region src/handle-node/handle-string-literal.ts
|
|
4036
|
+
/** Processes a static string literal, grouping Tailwind CSS classes if threshold is exceeded. */
|
|
4037
|
+
function handleStringLiteral(node, options, target) {
|
|
4038
|
+
if (isNodeWithComments(node)) return node;
|
|
4039
|
+
const classes = splitClasses(node.value);
|
|
4040
|
+
if (classes.length <= options.classNameThreshold) return node;
|
|
4041
|
+
const groups = groupClasses(classes, options.modifierThreshold);
|
|
4042
|
+
if (target === "cva") return buildStringArrayExpression(groups);
|
|
4043
|
+
const wrapperName = options.tailwindFunctions[0];
|
|
4044
|
+
return buildExpressionContainer(buildCallExpression(wrapperName, groups.map(buildStringLiteral)));
|
|
4045
|
+
}
|
|
4046
|
+
//#endregion
|
|
4047
|
+
//#region src/handle-node/handle-cva-class-value.ts
|
|
4048
|
+
/** Handles a class value expression (StringLiteral, CallExpression, or ArrayExpression) inside `cva(...)`. */
|
|
4049
|
+
function handleCvaClassValue(expression, options) {
|
|
4050
|
+
if (isStringLiteral(expression)) return handleStringLiteral(expression, options, "cva");
|
|
4051
|
+
if (isCallExpression(expression) && isIdentifier(expression.callee, options.tailwindFunctions)) {
|
|
4052
|
+
const result = handleExpressionArray(expression.arguments, options);
|
|
4053
|
+
if (Array.isArray(result)) {
|
|
4054
|
+
expression.arguments = result;
|
|
4055
|
+
return expression;
|
|
4056
|
+
}
|
|
4057
|
+
return result;
|
|
4058
|
+
}
|
|
4059
|
+
if (isArrayExpression(expression)) {
|
|
4060
|
+
const result = handleExpressionArray(expression.elements, options);
|
|
4061
|
+
if (Array.isArray(result)) {
|
|
4062
|
+
expression.elements = result;
|
|
4063
|
+
return expression;
|
|
4064
|
+
}
|
|
4065
|
+
return result;
|
|
4066
|
+
}
|
|
4067
|
+
return expression;
|
|
4068
|
+
}
|
|
4069
|
+
//#endregion
|
|
4070
|
+
//#region src/handle-targets/target-cva-base.ts
|
|
4071
|
+
/** Processes base class value (params[0]) in a `cva(...)` call. */
|
|
4072
|
+
function handleTargetCvaBase(cva, options) {
|
|
4073
|
+
const base = cva.arguments[0];
|
|
4074
|
+
if (!base || base.type === "SpreadElement") return;
|
|
4075
|
+
cva.arguments[0] = handleCvaClassValue(base, options);
|
|
4076
|
+
}
|
|
4077
|
+
//#endregion
|
|
4078
|
+
//#region src/handle-targets/target-cva-compound-variants.ts
|
|
4079
|
+
/** Processes `compoundVariants[*].class` and `compoundVariants[*].className` in `cva(...)`. */
|
|
4080
|
+
function handleTargetCvaCompoundVariants(config, options) {
|
|
4081
|
+
const cvProp = config.properties.find((property) => isStaticProperty(property, "compoundVariants"));
|
|
4082
|
+
if (!cvProp || !isArrayExpression(cvProp.value)) return;
|
|
4083
|
+
for (const element of cvProp.value.elements) {
|
|
4084
|
+
if (!element || !isObjectExpression(element)) continue;
|
|
4085
|
+
for (const prop of element.properties) {
|
|
4086
|
+
if (!isStaticProperty(prop, "class") && !isStaticProperty(prop, "className") || !isStringLiteral(prop.value) && !isCallExpression(prop.value) && !isArrayExpression(prop.value)) continue;
|
|
4087
|
+
prop.value = handleCvaClassValue(prop.value, options);
|
|
4088
|
+
}
|
|
4089
|
+
}
|
|
4090
|
+
}
|
|
4091
|
+
//#endregion
|
|
4092
|
+
//#region src/handle-targets/target-cva-variants.ts
|
|
4093
|
+
/** Processes `variants[*][*]` (all leaf option values) in `cva(...)`. */
|
|
4094
|
+
function handleTargetCvaVariants(config, options) {
|
|
4095
|
+
const variantsProp = config.properties.find((p) => isStaticProperty(p, "variants"));
|
|
4096
|
+
if (!variantsProp || !isObjectExpression(variantsProp.value)) return;
|
|
4097
|
+
for (const variantProp of variantsProp.value.properties) {
|
|
4098
|
+
if (!isStaticProperty(variantProp) || !isObjectExpression(variantProp.value)) continue;
|
|
4099
|
+
for (const optionProp of variantProp.value.properties) {
|
|
4100
|
+
if (!isStaticProperty(optionProp) || !isStringLiteral(optionProp.value) && !isCallExpression(optionProp.value) && !isArrayExpression(optionProp.value)) continue;
|
|
4101
|
+
optionProp.value = handleCvaClassValue(optionProp.value, options);
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
//#endregion
|
|
4106
|
+
//#region src/handle-targets/target-cva.ts
|
|
4107
|
+
/**
|
|
4108
|
+
* Handles a `cva(...)` CallExpression, transforming static classes in
|
|
4109
|
+
* `params[0]`, `params[1].variants`, and `params[1].compoundVariants`.
|
|
4110
|
+
*/
|
|
4111
|
+
function handleTargetCVA(node, options) {
|
|
4112
|
+
if (!isCallExpression(node) || !isIdentifier(node.callee, "cva") || node.arguments.length < 1) return false;
|
|
4113
|
+
handleTargetCvaBase(node, options);
|
|
4114
|
+
const config = node.arguments[1];
|
|
4115
|
+
if (config && config.type !== "SpreadElement" && isObjectExpression(config)) {
|
|
4116
|
+
handleTargetCvaVariants(config, options);
|
|
4117
|
+
handleTargetCvaCompoundVariants(config, options);
|
|
4118
|
+
}
|
|
4119
|
+
return true;
|
|
4120
|
+
}
|
|
4121
|
+
//#endregion
|
|
4122
|
+
//#region src/handle-targets/target-jsx.ts
|
|
4123
|
+
/** Handles JSX attribute formatting for `className` and `*ClassName` attributes. */
|
|
4124
|
+
function handleTargetJSX(node, options) {
|
|
4125
|
+
if (!isJSXAttribute(node) || !isJSXIdentifier(node.name) || !isClassNameKey(node.name.name) || !node.value) return false;
|
|
4126
|
+
if (isStringLiteral(node.value)) node.value = handleStringLiteral(node.value, options, "jsx");
|
|
4127
|
+
else if (isJSXExpressionContainer(node.value) && isStringLiteral(node.value.expression)) {
|
|
4128
|
+
if (isNodeWithComments(node.value) || isNodeWithComments(node.value.expression)) return false;
|
|
4129
|
+
node.value = handleStringLiteral(node.value.expression, options, "jsx");
|
|
4130
|
+
} else if (isJSXExpressionContainer(node.value) && isCallExpression(node.value.expression) && isIdentifier(node.value.expression.callee, options.tailwindFunctions)) {
|
|
4131
|
+
const result = handleExpressionArray(node.value.expression.arguments, options);
|
|
4132
|
+
if (Array.isArray(result)) node.value.expression.arguments = result;
|
|
4133
|
+
else node.value = result;
|
|
4134
|
+
}
|
|
4135
|
+
return true;
|
|
4136
|
+
}
|
|
4137
|
+
//#endregion
|
|
4138
|
+
//#region src/handle-targets/target-object-properties.ts
|
|
4139
|
+
/**
|
|
4140
|
+
* Handles Object Property class attributes whose value is a CallExpression
|
|
4141
|
+
* calling a function in `tailwindFunctions` (e.g. `{ className: cn(...) }`).
|
|
4142
|
+
*/
|
|
4143
|
+
function handleTargetObjectProperty(node, options) {
|
|
4144
|
+
if (!isStaticProperty(node, isClassNameKey) || !isCallExpression(node.value) || !isIdentifier(node.value.callee, options.tailwindFunctions)) return false;
|
|
4145
|
+
const result = handleExpressionArray(node.value.arguments, options);
|
|
4146
|
+
if (Array.isArray(result)) node.value.arguments = result;
|
|
4147
|
+
else node.value.arguments = [result];
|
|
4148
|
+
return true;
|
|
4149
|
+
}
|
|
4150
|
+
//#endregion
|
|
4151
|
+
//#region src/printers.walk-ast.ts
|
|
4152
|
+
const NON_TRAVERSABLE_KEYS = /* @__PURE__ */ new Set(["parent", "comments"]);
|
|
4153
|
+
const TARGET_HANDLERS = [
|
|
4154
|
+
handleTargetJSX,
|
|
4155
|
+
handleTargetCVA,
|
|
4156
|
+
handleTargetObjectProperty
|
|
4157
|
+
];
|
|
4158
|
+
function walkAst(node, options) {
|
|
4159
|
+
if (!isNode(node)) return;
|
|
4160
|
+
for (const handle of TARGET_HANDLERS) if (handle(node, options)) break;
|
|
4161
|
+
const visitorKeys = estree.getVisitorKeys(node, NON_TRAVERSABLE_KEYS);
|
|
4162
|
+
for (const key of visitorKeys) {
|
|
4163
|
+
const child = node[key];
|
|
4164
|
+
if (!child) continue;
|
|
4165
|
+
if (Array.isArray(child)) {
|
|
4166
|
+
for (const item of child) if (isNode(item)) walkAst(item, options);
|
|
4167
|
+
} else if (isNode(child)) walkAst(child, options);
|
|
4168
|
+
}
|
|
4169
|
+
}
|
|
4170
|
+
//#endregion
|
|
4171
|
+
//#region src/printers.ts
|
|
4172
|
+
const printers = { estree: {
|
|
4173
|
+
...estreePlugin.printers.estree,
|
|
4174
|
+
preprocess(ast, options) {
|
|
4175
|
+
const pluginOptions = resolveOptions(options);
|
|
4176
|
+
const processedAST = estree.preprocess ? estree.preprocess(ast, options) : ast;
|
|
4177
|
+
if (processedAST instanceof Promise) return processedAST.then((resolvedAst) => {
|
|
4178
|
+
walkAst(resolvedAst, pluginOptions);
|
|
4179
|
+
return resolvedAst;
|
|
4180
|
+
});
|
|
4181
|
+
walkAst(processedAST, pluginOptions);
|
|
4182
|
+
return processedAST;
|
|
4183
|
+
}
|
|
4184
|
+
} };
|
|
4185
|
+
//#endregion
|
|
4186
|
+
//#region src/index.ts
|
|
4187
|
+
const plugin = {
|
|
4188
|
+
options,
|
|
4189
|
+
printers
|
|
4190
|
+
};
|
|
4191
|
+
//#endregion
|
|
4192
|
+
export { plugin as default, options, printers };
|
|
4193
|
+
|
|
4194
|
+
//# sourceMappingURL=index.mjs.map
|