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