@easy-editor/setters 0.0.3 → 0.0.6

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