@easy-editor/setters 0.0.2 → 0.0.5

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