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