@trackunit/css-class-variance-utilities 0.0.15 → 0.0.16

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.
Files changed (3) hide show
  1. package/index.cjs.js +4 -2562
  2. package/index.esm.js +2 -2560
  3. package/package.json +4 -5
package/index.cjs.js CHANGED
@@ -2,2573 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- 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))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
6
-
7
- const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
8
- const cx = clsx;
9
- const cva = (base, config)=>{
10
- return (props)=>{
11
- var ref;
12
- 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);
13
- const { variants , defaultVariants } = config;
14
- const getVariantClassNames = Object.keys(variants).map((variant)=>{
15
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
16
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
17
- if (variantProp === null) return null;
18
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
19
- return variants[variant][variantKey];
20
- });
21
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
22
- let [key, value] = param;
23
- if (value === undefined) {
24
- return acc;
25
- }
26
- acc[key] = value;
27
- return acc;
28
- }, {});
29
- const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
30
- let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
31
- return Object.entries(compoundVariantOptions).every((param)=>{
32
- let [key, value] = param;
33
- return Array.isArray(value) ? value.includes({
34
- ...defaultVariants,
35
- ...propsWithoutUndefined
36
- }[key]) : ({
37
- ...defaultVariants,
38
- ...propsWithoutUndefined
39
- })[key] === value;
40
- }) ? [
41
- ...acc,
42
- cvClass,
43
- cvClassName
44
- ] : acc;
45
- }, []);
46
- return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
47
- };
48
- };
49
-
50
- /**
51
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
52
- *
53
- * Specifically:
54
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
55
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
56
- *
57
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
58
- */
59
- function twJoin() {
60
- var index = 0;
61
- var argument;
62
- var resolvedValue;
63
- var string = '';
64
- while (index < arguments.length) {
65
- if (argument = arguments[index++]) {
66
- if (resolvedValue = toValue(argument)) {
67
- string && (string += ' ');
68
- string += resolvedValue;
69
- }
70
- }
71
- }
72
- return string;
73
- }
74
- function toValue(mix) {
75
- if (typeof mix === 'string') {
76
- return mix;
77
- }
78
- var resolvedValue;
79
- var string = '';
80
- for (var k = 0; k < mix.length; k++) {
81
- if (mix[k]) {
82
- if (resolvedValue = toValue(mix[k])) {
83
- string && (string += ' ');
84
- string += resolvedValue;
85
- }
86
- }
87
- }
88
- return string;
89
- }
90
-
91
- var CLASS_PART_SEPARATOR = '-';
92
- function createClassUtils(config) {
93
- var classMap = createClassMap(config);
94
- var conflictingClassGroups = config.conflictingClassGroups,
95
- _config$conflictingCl = config.conflictingClassGroupModifiers,
96
- conflictingClassGroupModifiers = _config$conflictingCl === void 0 ? {} : _config$conflictingCl;
97
- function getClassGroupId(className) {
98
- var classParts = className.split(CLASS_PART_SEPARATOR);
99
- // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.
100
- if (classParts[0] === '' && classParts.length !== 1) {
101
- classParts.shift();
102
- }
103
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
104
- }
105
- function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {
106
- var conflicts = conflictingClassGroups[classGroupId] || [];
107
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
108
- return [].concat(conflicts, conflictingClassGroupModifiers[classGroupId]);
109
- }
110
- return conflicts;
111
- }
112
- return {
113
- getClassGroupId: getClassGroupId,
114
- getConflictingClassGroupIds: getConflictingClassGroupIds
115
- };
116
- }
117
- function getGroupRecursive(classParts, classPartObject) {
118
- if (classParts.length === 0) {
119
- return classPartObject.classGroupId;
120
- }
121
- var currentClassPart = classParts[0];
122
- var nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
123
- var classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
124
- if (classGroupFromNextClassPart) {
125
- return classGroupFromNextClassPart;
126
- }
127
- if (classPartObject.validators.length === 0) {
128
- return undefined;
129
- }
130
- var classRest = classParts.join(CLASS_PART_SEPARATOR);
131
- return classPartObject.validators.find(function (_ref) {
132
- var validator = _ref.validator;
133
- return validator(classRest);
134
- })?.classGroupId;
135
- }
136
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
137
- function getGroupIdForArbitraryProperty(className) {
138
- if (arbitraryPropertyRegex.test(className)) {
139
- var arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
140
- var property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
141
- if (property) {
142
- // I use two dots here because one dot is used as prefix for class groups in plugins
143
- return 'arbitrary..' + property;
144
- }
145
- }
146
- }
147
- /**
148
- * Exported for testing only
149
- */
150
- function createClassMap(config) {
151
- var theme = config.theme,
152
- prefix = config.prefix;
153
- var classMap = {
154
- nextPart: new Map(),
155
- validators: []
156
- };
157
- var prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
158
- prefixedClassGroupEntries.forEach(function (_ref2) {
159
- var classGroupId = _ref2[0],
160
- classGroup = _ref2[1];
161
- processClassesRecursively(classGroup, classMap, classGroupId, theme);
162
- });
163
- return classMap;
164
- }
165
- function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
166
- classGroup.forEach(function (classDefinition) {
167
- if (typeof classDefinition === 'string') {
168
- var classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
169
- classPartObjectToEdit.classGroupId = classGroupId;
170
- return;
171
- }
172
- if (typeof classDefinition === 'function') {
173
- if (isThemeGetter(classDefinition)) {
174
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
175
- return;
176
- }
177
- classPartObject.validators.push({
178
- validator: classDefinition,
179
- classGroupId: classGroupId
180
- });
181
- return;
182
- }
183
- Object.entries(classDefinition).forEach(function (_ref3) {
184
- var key = _ref3[0],
185
- classGroup = _ref3[1];
186
- processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
187
- });
188
- });
189
- }
190
- function getPart(classPartObject, path) {
191
- var currentClassPartObject = classPartObject;
192
- path.split(CLASS_PART_SEPARATOR).forEach(function (pathPart) {
193
- if (!currentClassPartObject.nextPart.has(pathPart)) {
194
- currentClassPartObject.nextPart.set(pathPart, {
195
- nextPart: new Map(),
196
- validators: []
197
- });
198
- }
199
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
200
- });
201
- return currentClassPartObject;
202
- }
203
- function isThemeGetter(func) {
204
- return func.isThemeGetter;
205
- }
206
- function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
207
- if (!prefix) {
208
- return classGroupEntries;
209
- }
210
- return classGroupEntries.map(function (_ref4) {
211
- var classGroupId = _ref4[0],
212
- classGroup = _ref4[1];
213
- var prefixedClassGroup = classGroup.map(function (classDefinition) {
214
- if (typeof classDefinition === 'string') {
215
- return prefix + classDefinition;
216
- }
217
- if (typeof classDefinition === 'object') {
218
- return Object.fromEntries(Object.entries(classDefinition).map(function (_ref5) {
219
- var key = _ref5[0],
220
- value = _ref5[1];
221
- return [prefix + key, value];
222
- }));
223
- }
224
- return classDefinition;
225
- });
226
- return [classGroupId, prefixedClassGroup];
227
- });
228
- }
229
-
230
- // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
231
- function createLruCache(maxCacheSize) {
232
- if (maxCacheSize < 1) {
233
- return {
234
- get: function get() {
235
- return undefined;
236
- },
237
- set: function set() {}
238
- };
239
- }
240
- var cacheSize = 0;
241
- var cache = new Map();
242
- var previousCache = new Map();
243
- function update(key, value) {
244
- cache.set(key, value);
245
- cacheSize++;
246
- if (cacheSize > maxCacheSize) {
247
- cacheSize = 0;
248
- previousCache = cache;
249
- cache = new Map();
250
- }
251
- }
252
- return {
253
- get: function get(key) {
254
- var value = cache.get(key);
255
- if (value !== undefined) {
256
- return value;
257
- }
258
- if ((value = previousCache.get(key)) !== undefined) {
259
- update(key, value);
260
- return value;
261
- }
262
- },
263
- set: function set(key, value) {
264
- if (cache.has(key)) {
265
- cache.set(key, value);
266
- } else {
267
- update(key, value);
268
- }
269
- }
270
- };
271
- }
272
-
273
- var IMPORTANT_MODIFIER = '!';
274
- function createSplitModifiers(config) {
275
- var separator = config.separator || ':';
276
- var isSeparatorSingleCharacter = separator.length === 1;
277
- var firstSeparatorCharacter = separator[0];
278
- var separatorLength = separator.length;
279
- // splitModifiers inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
280
- return function splitModifiers(className) {
281
- var modifiers = [];
282
- var bracketDepth = 0;
283
- var modifierStart = 0;
284
- var postfixModifierPosition;
285
- for (var index = 0; index < className.length; index++) {
286
- var currentCharacter = className[index];
287
- if (bracketDepth === 0) {
288
- if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
289
- modifiers.push(className.slice(modifierStart, index));
290
- modifierStart = index + separatorLength;
291
- continue;
292
- }
293
- if (currentCharacter === '/') {
294
- postfixModifierPosition = index;
295
- continue;
296
- }
297
- }
298
- if (currentCharacter === '[') {
299
- bracketDepth++;
300
- } else if (currentCharacter === ']') {
301
- bracketDepth--;
302
- }
303
- }
304
- var baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
305
- var hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
306
- var baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
307
- var maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
308
- return {
309
- modifiers: modifiers,
310
- hasImportantModifier: hasImportantModifier,
311
- baseClassName: baseClassName,
312
- maybePostfixModifierPosition: maybePostfixModifierPosition
313
- };
314
- };
315
- }
316
- /**
317
- * Sorts modifiers according to following schema:
318
- * - Predefined modifiers are sorted alphabetically
319
- * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
320
- */
321
- function sortModifiers(modifiers) {
322
- if (modifiers.length <= 1) {
323
- return modifiers;
324
- }
325
- var sortedModifiers = [];
326
- var unsortedModifiers = [];
327
- modifiers.forEach(function (modifier) {
328
- var isArbitraryVariant = modifier[0] === '[';
329
- if (isArbitraryVariant) {
330
- sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort().concat([modifier]));
331
- unsortedModifiers = [];
332
- } else {
333
- unsortedModifiers.push(modifier);
334
- }
335
- });
336
- sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort());
337
- return sortedModifiers;
338
- }
339
-
340
- function createConfigUtils(config) {
341
- return {
342
- cache: createLruCache(config.cacheSize),
343
- splitModifiers: createSplitModifiers(config),
344
- ...createClassUtils(config)
345
- };
346
- }
347
-
348
- var SPLIT_CLASSES_REGEX = /\s+/;
349
- function mergeClassList(classList, configUtils) {
350
- var splitModifiers = configUtils.splitModifiers,
351
- getClassGroupId = configUtils.getClassGroupId,
352
- getConflictingClassGroupIds = configUtils.getConflictingClassGroupIds;
353
- /**
354
- * Set of classGroupIds in following format:
355
- * `{importantModifier}{variantModifiers}{classGroupId}`
356
- * @example 'float'
357
- * @example 'hover:focus:bg-color'
358
- * @example 'md:!pr'
359
- */
360
- var classGroupsInConflict = new Set();
361
- return classList.trim().split(SPLIT_CLASSES_REGEX).map(function (originalClassName) {
362
- var _splitModifiers = splitModifiers(originalClassName),
363
- modifiers = _splitModifiers.modifiers,
364
- hasImportantModifier = _splitModifiers.hasImportantModifier,
365
- baseClassName = _splitModifiers.baseClassName,
366
- maybePostfixModifierPosition = _splitModifiers.maybePostfixModifierPosition;
367
- var classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
368
- var hasPostfixModifier = Boolean(maybePostfixModifierPosition);
369
- if (!classGroupId) {
370
- if (!maybePostfixModifierPosition) {
371
- return {
372
- isTailwindClass: false,
373
- originalClassName: originalClassName
374
- };
375
- }
376
- classGroupId = getClassGroupId(baseClassName);
377
- if (!classGroupId) {
378
- return {
379
- isTailwindClass: false,
380
- originalClassName: originalClassName
381
- };
382
- }
383
- hasPostfixModifier = false;
384
- }
385
- var variantModifier = sortModifiers(modifiers).join(':');
386
- var modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
387
- return {
388
- isTailwindClass: true,
389
- modifierId: modifierId,
390
- classGroupId: classGroupId,
391
- originalClassName: originalClassName,
392
- hasPostfixModifier: hasPostfixModifier
393
- };
394
- }).reverse()
395
- // Last class in conflict wins, so we need to filter conflicting classes in reverse order.
396
- .filter(function (parsed) {
397
- if (!parsed.isTailwindClass) {
398
- return true;
399
- }
400
- var modifierId = parsed.modifierId,
401
- classGroupId = parsed.classGroupId,
402
- hasPostfixModifier = parsed.hasPostfixModifier;
403
- var classId = modifierId + classGroupId;
404
- if (classGroupsInConflict.has(classId)) {
405
- return false;
406
- }
407
- classGroupsInConflict.add(classId);
408
- getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(function (group) {
409
- return classGroupsInConflict.add(modifierId + group);
410
- });
411
- return true;
412
- }).reverse().map(function (parsed) {
413
- return parsed.originalClassName;
414
- }).join(' ');
415
- }
416
-
417
- function createTailwindMerge() {
418
- for (var _len = arguments.length, createConfig = new Array(_len), _key = 0; _key < _len; _key++) {
419
- createConfig[_key] = arguments[_key];
420
- }
421
- var configUtils;
422
- var cacheGet;
423
- var cacheSet;
424
- var functionToCall = initTailwindMerge;
425
- function initTailwindMerge(classList) {
426
- var firstCreateConfig = createConfig[0],
427
- restCreateConfig = createConfig.slice(1);
428
- var config = restCreateConfig.reduce(function (previousConfig, createConfigCurrent) {
429
- return createConfigCurrent(previousConfig);
430
- }, firstCreateConfig());
431
- configUtils = createConfigUtils(config);
432
- cacheGet = configUtils.cache.get;
433
- cacheSet = configUtils.cache.set;
434
- functionToCall = tailwindMerge;
435
- return tailwindMerge(classList);
436
- }
437
- function tailwindMerge(classList) {
438
- var cachedResult = cacheGet(classList);
439
- if (cachedResult) {
440
- return cachedResult;
441
- }
442
- var result = mergeClassList(classList, configUtils);
443
- cacheSet(classList, result);
444
- return result;
445
- }
446
- return function callTailwindMerge() {
447
- return functionToCall(twJoin.apply(null, arguments));
448
- };
449
- }
450
-
451
- function fromTheme(key) {
452
- var themeGetter = function themeGetter(theme) {
453
- return theme[key] || [];
454
- };
455
- themeGetter.isThemeGetter = true;
456
- return themeGetter;
457
- }
458
-
459
- var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
460
- var fractionRegex = /^\d+\/\d+$/;
461
- var stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);
462
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
463
- var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|^0$/;
464
- // Shadow always begins with x and y offset separated by underscore
465
- var shadowRegex = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
466
- function isLength(value) {
467
- return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value) || isArbitraryLength(value);
468
- }
469
- function isArbitraryLength(value) {
470
- return getIsArbitraryValue(value, 'length', isLengthOnly);
471
- }
472
- function isArbitrarySize(value) {
473
- return getIsArbitraryValue(value, 'size', isNever);
474
- }
475
- function isArbitraryPosition(value) {
476
- return getIsArbitraryValue(value, 'position', isNever);
477
- }
478
- function isArbitraryUrl(value) {
479
- return getIsArbitraryValue(value, 'url', isUrl);
480
- }
481
- function isArbitraryNumber(value) {
482
- return getIsArbitraryValue(value, 'number', isNumber);
483
- }
484
- function isNumber(value) {
485
- return !Number.isNaN(Number(value));
486
- }
487
- function isPercent(value) {
488
- return value.endsWith('%') && isNumber(value.slice(0, -1));
489
- }
490
- function isInteger(value) {
491
- return isIntegerOnly(value) || getIsArbitraryValue(value, 'number', isIntegerOnly);
492
- }
493
- function isArbitraryValue(value) {
494
- return arbitraryValueRegex.test(value);
495
- }
496
- function isAny() {
497
- return true;
498
- }
499
- function isTshirtSize(value) {
500
- return tshirtUnitRegex.test(value);
501
- }
502
- function isArbitraryShadow(value) {
503
- return getIsArbitraryValue(value, '', isShadow);
504
- }
505
- function getIsArbitraryValue(value, label, testValue) {
506
- var result = arbitraryValueRegex.exec(value);
507
- if (result) {
508
- if (result[1]) {
509
- return result[1] === label;
510
- }
511
- return testValue(result[2]);
512
- }
513
- return false;
514
- }
515
- function isLengthOnly(value) {
516
- return lengthUnitRegex.test(value);
517
- }
518
- function isNever() {
519
- return false;
520
- }
521
- function isUrl(value) {
522
- return value.startsWith('url(');
523
- }
524
- function isIntegerOnly(value) {
525
- return Number.isInteger(Number(value));
526
- }
527
- function isShadow(value) {
528
- return shadowRegex.test(value);
529
- }
530
-
531
- function getDefaultConfig() {
532
- var colors = fromTheme('colors');
533
- var spacing = fromTheme('spacing');
534
- var blur = fromTheme('blur');
535
- var brightness = fromTheme('brightness');
536
- var borderColor = fromTheme('borderColor');
537
- var borderRadius = fromTheme('borderRadius');
538
- var borderSpacing = fromTheme('borderSpacing');
539
- var borderWidth = fromTheme('borderWidth');
540
- var contrast = fromTheme('contrast');
541
- var grayscale = fromTheme('grayscale');
542
- var hueRotate = fromTheme('hueRotate');
543
- var invert = fromTheme('invert');
544
- var gap = fromTheme('gap');
545
- var gradientColorStops = fromTheme('gradientColorStops');
546
- var gradientColorStopPositions = fromTheme('gradientColorStopPositions');
547
- var inset = fromTheme('inset');
548
- var margin = fromTheme('margin');
549
- var opacity = fromTheme('opacity');
550
- var padding = fromTheme('padding');
551
- var saturate = fromTheme('saturate');
552
- var scale = fromTheme('scale');
553
- var sepia = fromTheme('sepia');
554
- var skew = fromTheme('skew');
555
- var space = fromTheme('space');
556
- var translate = fromTheme('translate');
557
- var getOverscroll = function getOverscroll() {
558
- return ['auto', 'contain', 'none'];
559
- };
560
- var getOverflow = function getOverflow() {
561
- return ['auto', 'hidden', 'clip', 'visible', 'scroll'];
562
- };
563
- var getSpacingWithAuto = function getSpacingWithAuto() {
564
- return ['auto', spacing];
565
- };
566
- var getLengthWithEmpty = function getLengthWithEmpty() {
567
- return ['', isLength];
568
- };
569
- var getNumberWithAutoAndArbitrary = function getNumberWithAutoAndArbitrary() {
570
- return ['auto', isNumber, isArbitraryValue];
571
- };
572
- var getPositions = function getPositions() {
573
- return ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
574
- };
575
- var getLineStyles = function getLineStyles() {
576
- return ['solid', 'dashed', 'dotted', 'double', 'none'];
577
- };
578
- var getBlendModes = function getBlendModes() {
579
- return ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'plus-lighter'];
580
- };
581
- var getAlign = function getAlign() {
582
- return ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];
583
- };
584
- var getZeroAndEmpty = function getZeroAndEmpty() {
585
- return ['', '0', isArbitraryValue];
586
- };
587
- var getBreaks = function getBreaks() {
588
- return ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
589
- };
590
- var getNumber = function getNumber() {
591
- return [isNumber, isArbitraryNumber];
592
- };
593
- var getNumberAndArbitrary = function getNumberAndArbitrary() {
594
- return [isNumber, isArbitraryValue];
595
- };
596
- return {
597
- cacheSize: 500,
598
- theme: {
599
- colors: [isAny],
600
- spacing: [isLength],
601
- blur: ['none', '', isTshirtSize, isArbitraryLength],
602
- brightness: getNumber(),
603
- borderColor: [colors],
604
- borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryLength],
605
- borderSpacing: [spacing],
606
- borderWidth: getLengthWithEmpty(),
607
- contrast: getNumber(),
608
- grayscale: getZeroAndEmpty(),
609
- hueRotate: getNumberAndArbitrary(),
610
- invert: getZeroAndEmpty(),
611
- gap: [spacing],
612
- gradientColorStops: [colors],
613
- gradientColorStopPositions: [isPercent, isArbitraryLength],
614
- inset: getSpacingWithAuto(),
615
- margin: getSpacingWithAuto(),
616
- opacity: getNumber(),
617
- padding: [spacing],
618
- saturate: getNumber(),
619
- scale: getNumber(),
620
- sepia: getZeroAndEmpty(),
621
- skew: getNumberAndArbitrary(),
622
- space: [spacing],
623
- translate: [spacing]
624
- },
625
- classGroups: {
626
- // Layout
627
- /**
628
- * Aspect Ratio
629
- * @see https://tailwindcss.com/docs/aspect-ratio
630
- */
631
- aspect: [{
632
- aspect: ['auto', 'square', 'video', isArbitraryValue]
633
- }],
634
- /**
635
- * Container
636
- * @see https://tailwindcss.com/docs/container
637
- */
638
- container: ['container'],
639
- /**
640
- * Columns
641
- * @see https://tailwindcss.com/docs/columns
642
- */
643
- columns: [{
644
- columns: [isTshirtSize]
645
- }],
646
- /**
647
- * Break After
648
- * @see https://tailwindcss.com/docs/break-after
649
- */
650
- 'break-after': [{
651
- 'break-after': getBreaks()
652
- }],
653
- /**
654
- * Break Before
655
- * @see https://tailwindcss.com/docs/break-before
656
- */
657
- 'break-before': [{
658
- 'break-before': getBreaks()
659
- }],
660
- /**
661
- * Break Inside
662
- * @see https://tailwindcss.com/docs/break-inside
663
- */
664
- 'break-inside': [{
665
- 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']
666
- }],
667
- /**
668
- * Box Decoration Break
669
- * @see https://tailwindcss.com/docs/box-decoration-break
670
- */
671
- 'box-decoration': [{
672
- 'box-decoration': ['slice', 'clone']
673
- }],
674
- /**
675
- * Box Sizing
676
- * @see https://tailwindcss.com/docs/box-sizing
677
- */
678
- box: [{
679
- box: ['border', 'content']
680
- }],
681
- /**
682
- * Display
683
- * @see https://tailwindcss.com/docs/display
684
- */
685
- 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'],
686
- /**
687
- * Floats
688
- * @see https://tailwindcss.com/docs/float
689
- */
690
- "float": [{
691
- "float": ['right', 'left', 'none']
692
- }],
693
- /**
694
- * Clear
695
- * @see https://tailwindcss.com/docs/clear
696
- */
697
- clear: [{
698
- clear: ['left', 'right', 'both', 'none']
699
- }],
700
- /**
701
- * Isolation
702
- * @see https://tailwindcss.com/docs/isolation
703
- */
704
- isolation: ['isolate', 'isolation-auto'],
705
- /**
706
- * Object Fit
707
- * @see https://tailwindcss.com/docs/object-fit
708
- */
709
- 'object-fit': [{
710
- object: ['contain', 'cover', 'fill', 'none', 'scale-down']
711
- }],
712
- /**
713
- * Object Position
714
- * @see https://tailwindcss.com/docs/object-position
715
- */
716
- 'object-position': [{
717
- object: [].concat(getPositions(), [isArbitraryValue])
718
- }],
719
- /**
720
- * Overflow
721
- * @see https://tailwindcss.com/docs/overflow
722
- */
723
- overflow: [{
724
- overflow: getOverflow()
725
- }],
726
- /**
727
- * Overflow X
728
- * @see https://tailwindcss.com/docs/overflow
729
- */
730
- 'overflow-x': [{
731
- 'overflow-x': getOverflow()
732
- }],
733
- /**
734
- * Overflow Y
735
- * @see https://tailwindcss.com/docs/overflow
736
- */
737
- 'overflow-y': [{
738
- 'overflow-y': getOverflow()
739
- }],
740
- /**
741
- * Overscroll Behavior
742
- * @see https://tailwindcss.com/docs/overscroll-behavior
743
- */
744
- overscroll: [{
745
- overscroll: getOverscroll()
746
- }],
747
- /**
748
- * Overscroll Behavior X
749
- * @see https://tailwindcss.com/docs/overscroll-behavior
750
- */
751
- 'overscroll-x': [{
752
- 'overscroll-x': getOverscroll()
753
- }],
754
- /**
755
- * Overscroll Behavior Y
756
- * @see https://tailwindcss.com/docs/overscroll-behavior
757
- */
758
- 'overscroll-y': [{
759
- 'overscroll-y': getOverscroll()
760
- }],
761
- /**
762
- * Position
763
- * @see https://tailwindcss.com/docs/position
764
- */
765
- position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
766
- /**
767
- * Top / Right / Bottom / Left
768
- * @see https://tailwindcss.com/docs/top-right-bottom-left
769
- */
770
- inset: [{
771
- inset: [inset]
772
- }],
773
- /**
774
- * Right / Left
775
- * @see https://tailwindcss.com/docs/top-right-bottom-left
776
- */
777
- 'inset-x': [{
778
- 'inset-x': [inset]
779
- }],
780
- /**
781
- * Top / Bottom
782
- * @see https://tailwindcss.com/docs/top-right-bottom-left
783
- */
784
- 'inset-y': [{
785
- 'inset-y': [inset]
786
- }],
787
- /**
788
- * Start
789
- * @see https://tailwindcss.com/docs/top-right-bottom-left
790
- */
791
- start: [{
792
- start: [inset]
793
- }],
794
- /**
795
- * End
796
- * @see https://tailwindcss.com/docs/top-right-bottom-left
797
- */
798
- end: [{
799
- end: [inset]
800
- }],
801
- /**
802
- * Top
803
- * @see https://tailwindcss.com/docs/top-right-bottom-left
804
- */
805
- top: [{
806
- top: [inset]
807
- }],
808
- /**
809
- * Right
810
- * @see https://tailwindcss.com/docs/top-right-bottom-left
811
- */
812
- right: [{
813
- right: [inset]
814
- }],
815
- /**
816
- * Bottom
817
- * @see https://tailwindcss.com/docs/top-right-bottom-left
818
- */
819
- bottom: [{
820
- bottom: [inset]
821
- }],
822
- /**
823
- * Left
824
- * @see https://tailwindcss.com/docs/top-right-bottom-left
825
- */
826
- left: [{
827
- left: [inset]
828
- }],
829
- /**
830
- * Visibility
831
- * @see https://tailwindcss.com/docs/visibility
832
- */
833
- visibility: ['visible', 'invisible', 'collapse'],
834
- /**
835
- * Z-Index
836
- * @see https://tailwindcss.com/docs/z-index
837
- */
838
- z: [{
839
- z: ['auto', isInteger]
840
- }],
841
- // Flexbox and Grid
842
- /**
843
- * Flex Basis
844
- * @see https://tailwindcss.com/docs/flex-basis
845
- */
846
- basis: [{
847
- basis: [spacing]
848
- }],
849
- /**
850
- * Flex Direction
851
- * @see https://tailwindcss.com/docs/flex-direction
852
- */
853
- 'flex-direction': [{
854
- flex: ['row', 'row-reverse', 'col', 'col-reverse']
855
- }],
856
- /**
857
- * Flex Wrap
858
- * @see https://tailwindcss.com/docs/flex-wrap
859
- */
860
- 'flex-wrap': [{
861
- flex: ['wrap', 'wrap-reverse', 'nowrap']
862
- }],
863
- /**
864
- * Flex
865
- * @see https://tailwindcss.com/docs/flex
866
- */
867
- flex: [{
868
- flex: ['1', 'auto', 'initial', 'none', isArbitraryValue]
869
- }],
870
- /**
871
- * Flex Grow
872
- * @see https://tailwindcss.com/docs/flex-grow
873
- */
874
- grow: [{
875
- grow: getZeroAndEmpty()
876
- }],
877
- /**
878
- * Flex Shrink
879
- * @see https://tailwindcss.com/docs/flex-shrink
880
- */
881
- shrink: [{
882
- shrink: getZeroAndEmpty()
883
- }],
884
- /**
885
- * Order
886
- * @see https://tailwindcss.com/docs/order
887
- */
888
- order: [{
889
- order: ['first', 'last', 'none', isInteger]
890
- }],
891
- /**
892
- * Grid Template Columns
893
- * @see https://tailwindcss.com/docs/grid-template-columns
894
- */
895
- 'grid-cols': [{
896
- 'grid-cols': [isAny]
897
- }],
898
- /**
899
- * Grid Column Start / End
900
- * @see https://tailwindcss.com/docs/grid-column
901
- */
902
- 'col-start-end': [{
903
- col: ['auto', {
904
- span: [isInteger]
905
- }, isArbitraryValue]
906
- }],
907
- /**
908
- * Grid Column Start
909
- * @see https://tailwindcss.com/docs/grid-column
910
- */
911
- 'col-start': [{
912
- 'col-start': getNumberWithAutoAndArbitrary()
913
- }],
914
- /**
915
- * Grid Column End
916
- * @see https://tailwindcss.com/docs/grid-column
917
- */
918
- 'col-end': [{
919
- 'col-end': getNumberWithAutoAndArbitrary()
920
- }],
921
- /**
922
- * Grid Template Rows
923
- * @see https://tailwindcss.com/docs/grid-template-rows
924
- */
925
- 'grid-rows': [{
926
- 'grid-rows': [isAny]
927
- }],
928
- /**
929
- * Grid Row Start / End
930
- * @see https://tailwindcss.com/docs/grid-row
931
- */
932
- 'row-start-end': [{
933
- row: ['auto', {
934
- span: [isInteger]
935
- }, isArbitraryValue]
936
- }],
937
- /**
938
- * Grid Row Start
939
- * @see https://tailwindcss.com/docs/grid-row
940
- */
941
- 'row-start': [{
942
- 'row-start': getNumberWithAutoAndArbitrary()
943
- }],
944
- /**
945
- * Grid Row End
946
- * @see https://tailwindcss.com/docs/grid-row
947
- */
948
- 'row-end': [{
949
- 'row-end': getNumberWithAutoAndArbitrary()
950
- }],
951
- /**
952
- * Grid Auto Flow
953
- * @see https://tailwindcss.com/docs/grid-auto-flow
954
- */
955
- 'grid-flow': [{
956
- 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']
957
- }],
958
- /**
959
- * Grid Auto Columns
960
- * @see https://tailwindcss.com/docs/grid-auto-columns
961
- */
962
- 'auto-cols': [{
963
- 'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue]
964
- }],
965
- /**
966
- * Grid Auto Rows
967
- * @see https://tailwindcss.com/docs/grid-auto-rows
968
- */
969
- 'auto-rows': [{
970
- 'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue]
971
- }],
972
- /**
973
- * Gap
974
- * @see https://tailwindcss.com/docs/gap
975
- */
976
- gap: [{
977
- gap: [gap]
978
- }],
979
- /**
980
- * Gap X
981
- * @see https://tailwindcss.com/docs/gap
982
- */
983
- 'gap-x': [{
984
- 'gap-x': [gap]
985
- }],
986
- /**
987
- * Gap Y
988
- * @see https://tailwindcss.com/docs/gap
989
- */
990
- 'gap-y': [{
991
- 'gap-y': [gap]
992
- }],
993
- /**
994
- * Justify Content
995
- * @see https://tailwindcss.com/docs/justify-content
996
- */
997
- 'justify-content': [{
998
- justify: ['normal'].concat(getAlign())
999
- }],
1000
- /**
1001
- * Justify Items
1002
- * @see https://tailwindcss.com/docs/justify-items
1003
- */
1004
- 'justify-items': [{
1005
- 'justify-items': ['start', 'end', 'center', 'stretch']
1006
- }],
1007
- /**
1008
- * Justify Self
1009
- * @see https://tailwindcss.com/docs/justify-self
1010
- */
1011
- 'justify-self': [{
1012
- 'justify-self': ['auto', 'start', 'end', 'center', 'stretch']
1013
- }],
1014
- /**
1015
- * Align Content
1016
- * @see https://tailwindcss.com/docs/align-content
1017
- */
1018
- 'align-content': [{
1019
- content: ['normal'].concat(getAlign(), ['baseline'])
1020
- }],
1021
- /**
1022
- * Align Items
1023
- * @see https://tailwindcss.com/docs/align-items
1024
- */
1025
- 'align-items': [{
1026
- items: ['start', 'end', 'center', 'baseline', 'stretch']
1027
- }],
1028
- /**
1029
- * Align Self
1030
- * @see https://tailwindcss.com/docs/align-self
1031
- */
1032
- 'align-self': [{
1033
- self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline']
1034
- }],
1035
- /**
1036
- * Place Content
1037
- * @see https://tailwindcss.com/docs/place-content
1038
- */
1039
- 'place-content': [{
1040
- 'place-content': [].concat(getAlign(), ['baseline'])
1041
- }],
1042
- /**
1043
- * Place Items
1044
- * @see https://tailwindcss.com/docs/place-items
1045
- */
1046
- 'place-items': [{
1047
- 'place-items': ['start', 'end', 'center', 'baseline', 'stretch']
1048
- }],
1049
- /**
1050
- * Place Self
1051
- * @see https://tailwindcss.com/docs/place-self
1052
- */
1053
- 'place-self': [{
1054
- 'place-self': ['auto', 'start', 'end', 'center', 'stretch']
1055
- }],
1056
- // Spacing
1057
- /**
1058
- * Padding
1059
- * @see https://tailwindcss.com/docs/padding
1060
- */
1061
- p: [{
1062
- p: [padding]
1063
- }],
1064
- /**
1065
- * Padding X
1066
- * @see https://tailwindcss.com/docs/padding
1067
- */
1068
- px: [{
1069
- px: [padding]
1070
- }],
1071
- /**
1072
- * Padding Y
1073
- * @see https://tailwindcss.com/docs/padding
1074
- */
1075
- py: [{
1076
- py: [padding]
1077
- }],
1078
- /**
1079
- * Padding Start
1080
- * @see https://tailwindcss.com/docs/padding
1081
- */
1082
- ps: [{
1083
- ps: [padding]
1084
- }],
1085
- /**
1086
- * Padding End
1087
- * @see https://tailwindcss.com/docs/padding
1088
- */
1089
- pe: [{
1090
- pe: [padding]
1091
- }],
1092
- /**
1093
- * Padding Top
1094
- * @see https://tailwindcss.com/docs/padding
1095
- */
1096
- pt: [{
1097
- pt: [padding]
1098
- }],
1099
- /**
1100
- * Padding Right
1101
- * @see https://tailwindcss.com/docs/padding
1102
- */
1103
- pr: [{
1104
- pr: [padding]
1105
- }],
1106
- /**
1107
- * Padding Bottom
1108
- * @see https://tailwindcss.com/docs/padding
1109
- */
1110
- pb: [{
1111
- pb: [padding]
1112
- }],
1113
- /**
1114
- * Padding Left
1115
- * @see https://tailwindcss.com/docs/padding
1116
- */
1117
- pl: [{
1118
- pl: [padding]
1119
- }],
1120
- /**
1121
- * Margin
1122
- * @see https://tailwindcss.com/docs/margin
1123
- */
1124
- m: [{
1125
- m: [margin]
1126
- }],
1127
- /**
1128
- * Margin X
1129
- * @see https://tailwindcss.com/docs/margin
1130
- */
1131
- mx: [{
1132
- mx: [margin]
1133
- }],
1134
- /**
1135
- * Margin Y
1136
- * @see https://tailwindcss.com/docs/margin
1137
- */
1138
- my: [{
1139
- my: [margin]
1140
- }],
1141
- /**
1142
- * Margin Start
1143
- * @see https://tailwindcss.com/docs/margin
1144
- */
1145
- ms: [{
1146
- ms: [margin]
1147
- }],
1148
- /**
1149
- * Margin End
1150
- * @see https://tailwindcss.com/docs/margin
1151
- */
1152
- me: [{
1153
- me: [margin]
1154
- }],
1155
- /**
1156
- * Margin Top
1157
- * @see https://tailwindcss.com/docs/margin
1158
- */
1159
- mt: [{
1160
- mt: [margin]
1161
- }],
1162
- /**
1163
- * Margin Right
1164
- * @see https://tailwindcss.com/docs/margin
1165
- */
1166
- mr: [{
1167
- mr: [margin]
1168
- }],
1169
- /**
1170
- * Margin Bottom
1171
- * @see https://tailwindcss.com/docs/margin
1172
- */
1173
- mb: [{
1174
- mb: [margin]
1175
- }],
1176
- /**
1177
- * Margin Left
1178
- * @see https://tailwindcss.com/docs/margin
1179
- */
1180
- ml: [{
1181
- ml: [margin]
1182
- }],
1183
- /**
1184
- * Space Between X
1185
- * @see https://tailwindcss.com/docs/space
1186
- */
1187
- 'space-x': [{
1188
- 'space-x': [space]
1189
- }],
1190
- /**
1191
- * Space Between X Reverse
1192
- * @see https://tailwindcss.com/docs/space
1193
- */
1194
- 'space-x-reverse': ['space-x-reverse'],
1195
- /**
1196
- * Space Between Y
1197
- * @see https://tailwindcss.com/docs/space
1198
- */
1199
- 'space-y': [{
1200
- 'space-y': [space]
1201
- }],
1202
- /**
1203
- * Space Between Y Reverse
1204
- * @see https://tailwindcss.com/docs/space
1205
- */
1206
- 'space-y-reverse': ['space-y-reverse'],
1207
- // Sizing
1208
- /**
1209
- * Width
1210
- * @see https://tailwindcss.com/docs/width
1211
- */
1212
- w: [{
1213
- w: ['auto', 'min', 'max', 'fit', spacing]
1214
- }],
1215
- /**
1216
- * Min-Width
1217
- * @see https://tailwindcss.com/docs/min-width
1218
- */
1219
- 'min-w': [{
1220
- 'min-w': ['min', 'max', 'fit', isLength]
1221
- }],
1222
- /**
1223
- * Max-Width
1224
- * @see https://tailwindcss.com/docs/max-width
1225
- */
1226
- 'max-w': [{
1227
- 'max-w': ['0', 'none', 'full', 'min', 'max', 'fit', 'prose', {
1228
- screen: [isTshirtSize]
1229
- }, isTshirtSize, isArbitraryLength]
1230
- }],
1231
- /**
1232
- * Height
1233
- * @see https://tailwindcss.com/docs/height
1234
- */
1235
- h: [{
1236
- h: [spacing, 'auto', 'min', 'max', 'fit']
1237
- }],
1238
- /**
1239
- * Min-Height
1240
- * @see https://tailwindcss.com/docs/min-height
1241
- */
1242
- 'min-h': [{
1243
- 'min-h': ['min', 'max', 'fit', isLength]
1244
- }],
1245
- /**
1246
- * Max-Height
1247
- * @see https://tailwindcss.com/docs/max-height
1248
- */
1249
- 'max-h': [{
1250
- 'max-h': [spacing, 'min', 'max', 'fit']
1251
- }],
1252
- // Typography
1253
- /**
1254
- * Font Size
1255
- * @see https://tailwindcss.com/docs/font-size
1256
- */
1257
- 'font-size': [{
1258
- text: ['base', isTshirtSize, isArbitraryLength]
1259
- }],
1260
- /**
1261
- * Font Smoothing
1262
- * @see https://tailwindcss.com/docs/font-smoothing
1263
- */
1264
- 'font-smoothing': ['antialiased', 'subpixel-antialiased'],
1265
- /**
1266
- * Font Style
1267
- * @see https://tailwindcss.com/docs/font-style
1268
- */
1269
- 'font-style': ['italic', 'not-italic'],
1270
- /**
1271
- * Font Weight
1272
- * @see https://tailwindcss.com/docs/font-weight
1273
- */
1274
- 'font-weight': [{
1275
- font: ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber]
1276
- }],
1277
- /**
1278
- * Font Family
1279
- * @see https://tailwindcss.com/docs/font-family
1280
- */
1281
- 'font-family': [{
1282
- font: [isAny]
1283
- }],
1284
- /**
1285
- * Font Variant Numeric
1286
- * @see https://tailwindcss.com/docs/font-variant-numeric
1287
- */
1288
- 'fvn-normal': ['normal-nums'],
1289
- /**
1290
- * Font Variant Numeric
1291
- * @see https://tailwindcss.com/docs/font-variant-numeric
1292
- */
1293
- 'fvn-ordinal': ['ordinal'],
1294
- /**
1295
- * Font Variant Numeric
1296
- * @see https://tailwindcss.com/docs/font-variant-numeric
1297
- */
1298
- 'fvn-slashed-zero': ['slashed-zero'],
1299
- /**
1300
- * Font Variant Numeric
1301
- * @see https://tailwindcss.com/docs/font-variant-numeric
1302
- */
1303
- 'fvn-figure': ['lining-nums', 'oldstyle-nums'],
1304
- /**
1305
- * Font Variant Numeric
1306
- * @see https://tailwindcss.com/docs/font-variant-numeric
1307
- */
1308
- 'fvn-spacing': ['proportional-nums', 'tabular-nums'],
1309
- /**
1310
- * Font Variant Numeric
1311
- * @see https://tailwindcss.com/docs/font-variant-numeric
1312
- */
1313
- 'fvn-fraction': ['diagonal-fractions', 'stacked-fractons'],
1314
- /**
1315
- * Letter Spacing
1316
- * @see https://tailwindcss.com/docs/letter-spacing
1317
- */
1318
- tracking: [{
1319
- tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryLength]
1320
- }],
1321
- /**
1322
- * Line Clamp
1323
- * @see https://tailwindcss.com/docs/line-clamp
1324
- */
1325
- 'line-clamp': [{
1326
- 'line-clamp': ['none', isNumber, isArbitraryNumber]
1327
- }],
1328
- /**
1329
- * Line Height
1330
- * @see https://tailwindcss.com/docs/line-height
1331
- */
1332
- leading: [{
1333
- leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength]
1334
- }],
1335
- /**
1336
- * List Style Image
1337
- * @see https://tailwindcss.com/docs/list-style-image
1338
- */
1339
- 'list-image': [{
1340
- 'list-image': ['none', isArbitraryValue]
1341
- }],
1342
- /**
1343
- * List Style Type
1344
- * @see https://tailwindcss.com/docs/list-style-type
1345
- */
1346
- 'list-style-type': [{
1347
- list: ['none', 'disc', 'decimal', isArbitraryValue]
1348
- }],
1349
- /**
1350
- * List Style Position
1351
- * @see https://tailwindcss.com/docs/list-style-position
1352
- */
1353
- 'list-style-position': [{
1354
- list: ['inside', 'outside']
1355
- }],
1356
- /**
1357
- * Placeholder Color
1358
- * @deprecated since Tailwind CSS v3.0.0
1359
- * @see https://tailwindcss.com/docs/placeholder-color
1360
- */
1361
- 'placeholder-color': [{
1362
- placeholder: [colors]
1363
- }],
1364
- /**
1365
- * Placeholder Opacity
1366
- * @see https://tailwindcss.com/docs/placeholder-opacity
1367
- */
1368
- 'placeholder-opacity': [{
1369
- 'placeholder-opacity': [opacity]
1370
- }],
1371
- /**
1372
- * Text Alignment
1373
- * @see https://tailwindcss.com/docs/text-align
1374
- */
1375
- 'text-alignment': [{
1376
- text: ['left', 'center', 'right', 'justify', 'start', 'end']
1377
- }],
1378
- /**
1379
- * Text Color
1380
- * @see https://tailwindcss.com/docs/text-color
1381
- */
1382
- 'text-color': [{
1383
- text: [colors]
1384
- }],
1385
- /**
1386
- * Text Opacity
1387
- * @see https://tailwindcss.com/docs/text-opacity
1388
- */
1389
- 'text-opacity': [{
1390
- 'text-opacity': [opacity]
1391
- }],
1392
- /**
1393
- * Text Decoration
1394
- * @see https://tailwindcss.com/docs/text-decoration
1395
- */
1396
- 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],
1397
- /**
1398
- * Text Decoration Style
1399
- * @see https://tailwindcss.com/docs/text-decoration-style
1400
- */
1401
- 'text-decoration-style': [{
1402
- decoration: [].concat(getLineStyles(), ['wavy'])
1403
- }],
1404
- /**
1405
- * Text Decoration Thickness
1406
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1407
- */
1408
- 'text-decoration-thickness': [{
1409
- decoration: ['auto', 'from-font', isLength]
1410
- }],
1411
- /**
1412
- * Text Underline Offset
1413
- * @see https://tailwindcss.com/docs/text-underline-offset
1414
- */
1415
- 'underline-offset': [{
1416
- 'underline-offset': ['auto', isLength]
1417
- }],
1418
- /**
1419
- * Text Decoration Color
1420
- * @see https://tailwindcss.com/docs/text-decoration-color
1421
- */
1422
- 'text-decoration-color': [{
1423
- decoration: [colors]
1424
- }],
1425
- /**
1426
- * Text Transform
1427
- * @see https://tailwindcss.com/docs/text-transform
1428
- */
1429
- 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
1430
- /**
1431
- * Text Overflow
1432
- * @see https://tailwindcss.com/docs/text-overflow
1433
- */
1434
- 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
1435
- /**
1436
- * Text Indent
1437
- * @see https://tailwindcss.com/docs/text-indent
1438
- */
1439
- indent: [{
1440
- indent: [spacing]
1441
- }],
1442
- /**
1443
- * Vertical Alignment
1444
- * @see https://tailwindcss.com/docs/vertical-align
1445
- */
1446
- 'vertical-align': [{
1447
- align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryLength]
1448
- }],
1449
- /**
1450
- * Whitespace
1451
- * @see https://tailwindcss.com/docs/whitespace
1452
- */
1453
- whitespace: [{
1454
- whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']
1455
- }],
1456
- /**
1457
- * Word Break
1458
- * @see https://tailwindcss.com/docs/word-break
1459
- */
1460
- "break": [{
1461
- "break": ['normal', 'words', 'all', 'keep']
1462
- }],
1463
- /**
1464
- * Hyphens
1465
- * @see https://tailwindcss.com/docs/hyphens
1466
- */
1467
- hyphens: [{
1468
- hyphens: ['none', 'manual', 'auto']
1469
- }],
1470
- /**
1471
- * Content
1472
- * @see https://tailwindcss.com/docs/content
1473
- */
1474
- content: [{
1475
- content: ['none', isArbitraryValue]
1476
- }],
1477
- // Backgrounds
1478
- /**
1479
- * Background Attachment
1480
- * @see https://tailwindcss.com/docs/background-attachment
1481
- */
1482
- 'bg-attachment': [{
1483
- bg: ['fixed', 'local', 'scroll']
1484
- }],
1485
- /**
1486
- * Background Clip
1487
- * @see https://tailwindcss.com/docs/background-clip
1488
- */
1489
- 'bg-clip': [{
1490
- 'bg-clip': ['border', 'padding', 'content', 'text']
1491
- }],
1492
- /**
1493
- * Background Opacity
1494
- * @deprecated since Tailwind CSS v3.0.0
1495
- * @see https://tailwindcss.com/docs/background-opacity
1496
- */
1497
- 'bg-opacity': [{
1498
- 'bg-opacity': [opacity]
1499
- }],
1500
- /**
1501
- * Background Origin
1502
- * @see https://tailwindcss.com/docs/background-origin
1503
- */
1504
- 'bg-origin': [{
1505
- 'bg-origin': ['border', 'padding', 'content']
1506
- }],
1507
- /**
1508
- * Background Position
1509
- * @see https://tailwindcss.com/docs/background-position
1510
- */
1511
- 'bg-position': [{
1512
- bg: [].concat(getPositions(), [isArbitraryPosition])
1513
- }],
1514
- /**
1515
- * Background Repeat
1516
- * @see https://tailwindcss.com/docs/background-repeat
1517
- */
1518
- 'bg-repeat': [{
1519
- bg: ['no-repeat', {
1520
- repeat: ['', 'x', 'y', 'round', 'space']
1521
- }]
1522
- }],
1523
- /**
1524
- * Background Size
1525
- * @see https://tailwindcss.com/docs/background-size
1526
- */
1527
- 'bg-size': [{
1528
- bg: ['auto', 'cover', 'contain', isArbitrarySize]
1529
- }],
1530
- /**
1531
- * Background Image
1532
- * @see https://tailwindcss.com/docs/background-image
1533
- */
1534
- 'bg-image': [{
1535
- bg: ['none', {
1536
- 'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
1537
- }, isArbitraryUrl]
1538
- }],
1539
- /**
1540
- * Background Color
1541
- * @see https://tailwindcss.com/docs/background-color
1542
- */
1543
- 'bg-color': [{
1544
- bg: [colors]
1545
- }],
1546
- /**
1547
- * Gradient Color Stops From Position
1548
- * @see https://tailwindcss.com/docs/gradient-color-stops
1549
- */
1550
- 'gradient-from-pos': [{
1551
- from: [gradientColorStopPositions]
1552
- }],
1553
- /**
1554
- * Gradient Color Stops Via Position
1555
- * @see https://tailwindcss.com/docs/gradient-color-stops
1556
- */
1557
- 'gradient-via-pos': [{
1558
- via: [gradientColorStopPositions]
1559
- }],
1560
- /**
1561
- * Gradient Color Stops To Position
1562
- * @see https://tailwindcss.com/docs/gradient-color-stops
1563
- */
1564
- 'gradient-to-pos': [{
1565
- to: [gradientColorStopPositions]
1566
- }],
1567
- /**
1568
- * Gradient Color Stops From
1569
- * @see https://tailwindcss.com/docs/gradient-color-stops
1570
- */
1571
- 'gradient-from': [{
1572
- from: [gradientColorStops]
1573
- }],
1574
- /**
1575
- * Gradient Color Stops Via
1576
- * @see https://tailwindcss.com/docs/gradient-color-stops
1577
- */
1578
- 'gradient-via': [{
1579
- via: [gradientColorStops]
1580
- }],
1581
- /**
1582
- * Gradient Color Stops To
1583
- * @see https://tailwindcss.com/docs/gradient-color-stops
1584
- */
1585
- 'gradient-to': [{
1586
- to: [gradientColorStops]
1587
- }],
1588
- // Borders
1589
- /**
1590
- * Border Radius
1591
- * @see https://tailwindcss.com/docs/border-radius
1592
- */
1593
- rounded: [{
1594
- rounded: [borderRadius]
1595
- }],
1596
- /**
1597
- * Border Radius Start
1598
- * @see https://tailwindcss.com/docs/border-radius
1599
- */
1600
- 'rounded-s': [{
1601
- 'rounded-s': [borderRadius]
1602
- }],
1603
- /**
1604
- * Border Radius End
1605
- * @see https://tailwindcss.com/docs/border-radius
1606
- */
1607
- 'rounded-e': [{
1608
- 'rounded-e': [borderRadius]
1609
- }],
1610
- /**
1611
- * Border Radius Top
1612
- * @see https://tailwindcss.com/docs/border-radius
1613
- */
1614
- 'rounded-t': [{
1615
- 'rounded-t': [borderRadius]
1616
- }],
1617
- /**
1618
- * Border Radius Right
1619
- * @see https://tailwindcss.com/docs/border-radius
1620
- */
1621
- 'rounded-r': [{
1622
- 'rounded-r': [borderRadius]
1623
- }],
1624
- /**
1625
- * Border Radius Bottom
1626
- * @see https://tailwindcss.com/docs/border-radius
1627
- */
1628
- 'rounded-b': [{
1629
- 'rounded-b': [borderRadius]
1630
- }],
1631
- /**
1632
- * Border Radius Left
1633
- * @see https://tailwindcss.com/docs/border-radius
1634
- */
1635
- 'rounded-l': [{
1636
- 'rounded-l': [borderRadius]
1637
- }],
1638
- /**
1639
- * Border Radius Start Start
1640
- * @see https://tailwindcss.com/docs/border-radius
1641
- */
1642
- 'rounded-ss': [{
1643
- 'rounded-ss': [borderRadius]
1644
- }],
1645
- /**
1646
- * Border Radius Start End
1647
- * @see https://tailwindcss.com/docs/border-radius
1648
- */
1649
- 'rounded-se': [{
1650
- 'rounded-se': [borderRadius]
1651
- }],
1652
- /**
1653
- * Border Radius End End
1654
- * @see https://tailwindcss.com/docs/border-radius
1655
- */
1656
- 'rounded-ee': [{
1657
- 'rounded-ee': [borderRadius]
1658
- }],
1659
- /**
1660
- * Border Radius End Start
1661
- * @see https://tailwindcss.com/docs/border-radius
1662
- */
1663
- 'rounded-es': [{
1664
- 'rounded-es': [borderRadius]
1665
- }],
1666
- /**
1667
- * Border Radius Top Left
1668
- * @see https://tailwindcss.com/docs/border-radius
1669
- */
1670
- 'rounded-tl': [{
1671
- 'rounded-tl': [borderRadius]
1672
- }],
1673
- /**
1674
- * Border Radius Top Right
1675
- * @see https://tailwindcss.com/docs/border-radius
1676
- */
1677
- 'rounded-tr': [{
1678
- 'rounded-tr': [borderRadius]
1679
- }],
1680
- /**
1681
- * Border Radius Bottom Right
1682
- * @see https://tailwindcss.com/docs/border-radius
1683
- */
1684
- 'rounded-br': [{
1685
- 'rounded-br': [borderRadius]
1686
- }],
1687
- /**
1688
- * Border Radius Bottom Left
1689
- * @see https://tailwindcss.com/docs/border-radius
1690
- */
1691
- 'rounded-bl': [{
1692
- 'rounded-bl': [borderRadius]
1693
- }],
1694
- /**
1695
- * Border Width
1696
- * @see https://tailwindcss.com/docs/border-width
1697
- */
1698
- 'border-w': [{
1699
- border: [borderWidth]
1700
- }],
1701
- /**
1702
- * Border Width X
1703
- * @see https://tailwindcss.com/docs/border-width
1704
- */
1705
- 'border-w-x': [{
1706
- 'border-x': [borderWidth]
1707
- }],
1708
- /**
1709
- * Border Width Y
1710
- * @see https://tailwindcss.com/docs/border-width
1711
- */
1712
- 'border-w-y': [{
1713
- 'border-y': [borderWidth]
1714
- }],
1715
- /**
1716
- * Border Width Start
1717
- * @see https://tailwindcss.com/docs/border-width
1718
- */
1719
- 'border-w-s': [{
1720
- 'border-s': [borderWidth]
1721
- }],
1722
- /**
1723
- * Border Width End
1724
- * @see https://tailwindcss.com/docs/border-width
1725
- */
1726
- 'border-w-e': [{
1727
- 'border-e': [borderWidth]
1728
- }],
1729
- /**
1730
- * Border Width Top
1731
- * @see https://tailwindcss.com/docs/border-width
1732
- */
1733
- 'border-w-t': [{
1734
- 'border-t': [borderWidth]
1735
- }],
1736
- /**
1737
- * Border Width Right
1738
- * @see https://tailwindcss.com/docs/border-width
1739
- */
1740
- 'border-w-r': [{
1741
- 'border-r': [borderWidth]
1742
- }],
1743
- /**
1744
- * Border Width Bottom
1745
- * @see https://tailwindcss.com/docs/border-width
1746
- */
1747
- 'border-w-b': [{
1748
- 'border-b': [borderWidth]
1749
- }],
1750
- /**
1751
- * Border Width Left
1752
- * @see https://tailwindcss.com/docs/border-width
1753
- */
1754
- 'border-w-l': [{
1755
- 'border-l': [borderWidth]
1756
- }],
1757
- /**
1758
- * Border Opacity
1759
- * @see https://tailwindcss.com/docs/border-opacity
1760
- */
1761
- 'border-opacity': [{
1762
- 'border-opacity': [opacity]
1763
- }],
1764
- /**
1765
- * Border Style
1766
- * @see https://tailwindcss.com/docs/border-style
1767
- */
1768
- 'border-style': [{
1769
- border: [].concat(getLineStyles(), ['hidden'])
1770
- }],
1771
- /**
1772
- * Divide Width X
1773
- * @see https://tailwindcss.com/docs/divide-width
1774
- */
1775
- 'divide-x': [{
1776
- 'divide-x': [borderWidth]
1777
- }],
1778
- /**
1779
- * Divide Width X Reverse
1780
- * @see https://tailwindcss.com/docs/divide-width
1781
- */
1782
- 'divide-x-reverse': ['divide-x-reverse'],
1783
- /**
1784
- * Divide Width Y
1785
- * @see https://tailwindcss.com/docs/divide-width
1786
- */
1787
- 'divide-y': [{
1788
- 'divide-y': [borderWidth]
1789
- }],
1790
- /**
1791
- * Divide Width Y Reverse
1792
- * @see https://tailwindcss.com/docs/divide-width
1793
- */
1794
- 'divide-y-reverse': ['divide-y-reverse'],
1795
- /**
1796
- * Divide Opacity
1797
- * @see https://tailwindcss.com/docs/divide-opacity
1798
- */
1799
- 'divide-opacity': [{
1800
- 'divide-opacity': [opacity]
1801
- }],
1802
- /**
1803
- * Divide Style
1804
- * @see https://tailwindcss.com/docs/divide-style
1805
- */
1806
- 'divide-style': [{
1807
- divide: getLineStyles()
1808
- }],
1809
- /**
1810
- * Border Color
1811
- * @see https://tailwindcss.com/docs/border-color
1812
- */
1813
- 'border-color': [{
1814
- border: [borderColor]
1815
- }],
1816
- /**
1817
- * Border Color X
1818
- * @see https://tailwindcss.com/docs/border-color
1819
- */
1820
- 'border-color-x': [{
1821
- 'border-x': [borderColor]
1822
- }],
1823
- /**
1824
- * Border Color Y
1825
- * @see https://tailwindcss.com/docs/border-color
1826
- */
1827
- 'border-color-y': [{
1828
- 'border-y': [borderColor]
1829
- }],
1830
- /**
1831
- * Border Color Top
1832
- * @see https://tailwindcss.com/docs/border-color
1833
- */
1834
- 'border-color-t': [{
1835
- 'border-t': [borderColor]
1836
- }],
1837
- /**
1838
- * Border Color Right
1839
- * @see https://tailwindcss.com/docs/border-color
1840
- */
1841
- 'border-color-r': [{
1842
- 'border-r': [borderColor]
1843
- }],
1844
- /**
1845
- * Border Color Bottom
1846
- * @see https://tailwindcss.com/docs/border-color
1847
- */
1848
- 'border-color-b': [{
1849
- 'border-b': [borderColor]
1850
- }],
1851
- /**
1852
- * Border Color Left
1853
- * @see https://tailwindcss.com/docs/border-color
1854
- */
1855
- 'border-color-l': [{
1856
- 'border-l': [borderColor]
1857
- }],
1858
- /**
1859
- * Divide Color
1860
- * @see https://tailwindcss.com/docs/divide-color
1861
- */
1862
- 'divide-color': [{
1863
- divide: [borderColor]
1864
- }],
1865
- /**
1866
- * Outline Style
1867
- * @see https://tailwindcss.com/docs/outline-style
1868
- */
1869
- 'outline-style': [{
1870
- outline: [''].concat(getLineStyles())
1871
- }],
1872
- /**
1873
- * Outline Offset
1874
- * @see https://tailwindcss.com/docs/outline-offset
1875
- */
1876
- 'outline-offset': [{
1877
- 'outline-offset': [isLength]
1878
- }],
1879
- /**
1880
- * Outline Width
1881
- * @see https://tailwindcss.com/docs/outline-width
1882
- */
1883
- 'outline-w': [{
1884
- outline: [isLength]
1885
- }],
1886
- /**
1887
- * Outline Color
1888
- * @see https://tailwindcss.com/docs/outline-color
1889
- */
1890
- 'outline-color': [{
1891
- outline: [colors]
1892
- }],
1893
- /**
1894
- * Ring Width
1895
- * @see https://tailwindcss.com/docs/ring-width
1896
- */
1897
- 'ring-w': [{
1898
- ring: getLengthWithEmpty()
1899
- }],
1900
- /**
1901
- * Ring Width Inset
1902
- * @see https://tailwindcss.com/docs/ring-width
1903
- */
1904
- 'ring-w-inset': ['ring-inset'],
1905
- /**
1906
- * Ring Color
1907
- * @see https://tailwindcss.com/docs/ring-color
1908
- */
1909
- 'ring-color': [{
1910
- ring: [colors]
1911
- }],
1912
- /**
1913
- * Ring Opacity
1914
- * @see https://tailwindcss.com/docs/ring-opacity
1915
- */
1916
- 'ring-opacity': [{
1917
- 'ring-opacity': [opacity]
1918
- }],
1919
- /**
1920
- * Ring Offset Width
1921
- * @see https://tailwindcss.com/docs/ring-offset-width
1922
- */
1923
- 'ring-offset-w': [{
1924
- 'ring-offset': [isLength]
1925
- }],
1926
- /**
1927
- * Ring Offset Color
1928
- * @see https://tailwindcss.com/docs/ring-offset-color
1929
- */
1930
- 'ring-offset-color': [{
1931
- 'ring-offset': [colors]
1932
- }],
1933
- // Effects
1934
- /**
1935
- * Box Shadow
1936
- * @see https://tailwindcss.com/docs/box-shadow
1937
- */
1938
- shadow: [{
1939
- shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow]
1940
- }],
1941
- /**
1942
- * Box Shadow Color
1943
- * @see https://tailwindcss.com/docs/box-shadow-color
1944
- */
1945
- 'shadow-color': [{
1946
- shadow: [isAny]
1947
- }],
1948
- /**
1949
- * Opacity
1950
- * @see https://tailwindcss.com/docs/opacity
1951
- */
1952
- opacity: [{
1953
- opacity: [opacity]
1954
- }],
1955
- /**
1956
- * Mix Blend Mode
1957
- * @see https://tailwindcss.com/docs/mix-blend-mode
1958
- */
1959
- 'mix-blend': [{
1960
- 'mix-blend': getBlendModes()
1961
- }],
1962
- /**
1963
- * Background Blend Mode
1964
- * @see https://tailwindcss.com/docs/background-blend-mode
1965
- */
1966
- 'bg-blend': [{
1967
- 'bg-blend': getBlendModes()
1968
- }],
1969
- // Filters
1970
- /**
1971
- * Filter
1972
- * @deprecated since Tailwind CSS v3.0.0
1973
- * @see https://tailwindcss.com/docs/filter
1974
- */
1975
- filter: [{
1976
- filter: ['', 'none']
1977
- }],
1978
- /**
1979
- * Blur
1980
- * @see https://tailwindcss.com/docs/blur
1981
- */
1982
- blur: [{
1983
- blur: [blur]
1984
- }],
1985
- /**
1986
- * Brightness
1987
- * @see https://tailwindcss.com/docs/brightness
1988
- */
1989
- brightness: [{
1990
- brightness: [brightness]
1991
- }],
1992
- /**
1993
- * Contrast
1994
- * @see https://tailwindcss.com/docs/contrast
1995
- */
1996
- contrast: [{
1997
- contrast: [contrast]
1998
- }],
1999
- /**
2000
- * Drop Shadow
2001
- * @see https://tailwindcss.com/docs/drop-shadow
2002
- */
2003
- 'drop-shadow': [{
2004
- 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue]
2005
- }],
2006
- /**
2007
- * Grayscale
2008
- * @see https://tailwindcss.com/docs/grayscale
2009
- */
2010
- grayscale: [{
2011
- grayscale: [grayscale]
2012
- }],
2013
- /**
2014
- * Hue Rotate
2015
- * @see https://tailwindcss.com/docs/hue-rotate
2016
- */
2017
- 'hue-rotate': [{
2018
- 'hue-rotate': [hueRotate]
2019
- }],
2020
- /**
2021
- * Invert
2022
- * @see https://tailwindcss.com/docs/invert
2023
- */
2024
- invert: [{
2025
- invert: [invert]
2026
- }],
2027
- /**
2028
- * Saturate
2029
- * @see https://tailwindcss.com/docs/saturate
2030
- */
2031
- saturate: [{
2032
- saturate: [saturate]
2033
- }],
2034
- /**
2035
- * Sepia
2036
- * @see https://tailwindcss.com/docs/sepia
2037
- */
2038
- sepia: [{
2039
- sepia: [sepia]
2040
- }],
2041
- /**
2042
- * Backdrop Filter
2043
- * @deprecated since Tailwind CSS v3.0.0
2044
- * @see https://tailwindcss.com/docs/backdrop-filter
2045
- */
2046
- 'backdrop-filter': [{
2047
- 'backdrop-filter': ['', 'none']
2048
- }],
2049
- /**
2050
- * Backdrop Blur
2051
- * @see https://tailwindcss.com/docs/backdrop-blur
2052
- */
2053
- 'backdrop-blur': [{
2054
- 'backdrop-blur': [blur]
2055
- }],
2056
- /**
2057
- * Backdrop Brightness
2058
- * @see https://tailwindcss.com/docs/backdrop-brightness
2059
- */
2060
- 'backdrop-brightness': [{
2061
- 'backdrop-brightness': [brightness]
2062
- }],
2063
- /**
2064
- * Backdrop Contrast
2065
- * @see https://tailwindcss.com/docs/backdrop-contrast
2066
- */
2067
- 'backdrop-contrast': [{
2068
- 'backdrop-contrast': [contrast]
2069
- }],
2070
- /**
2071
- * Backdrop Grayscale
2072
- * @see https://tailwindcss.com/docs/backdrop-grayscale
2073
- */
2074
- 'backdrop-grayscale': [{
2075
- 'backdrop-grayscale': [grayscale]
2076
- }],
2077
- /**
2078
- * Backdrop Hue Rotate
2079
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2080
- */
2081
- 'backdrop-hue-rotate': [{
2082
- 'backdrop-hue-rotate': [hueRotate]
2083
- }],
2084
- /**
2085
- * Backdrop Invert
2086
- * @see https://tailwindcss.com/docs/backdrop-invert
2087
- */
2088
- 'backdrop-invert': [{
2089
- 'backdrop-invert': [invert]
2090
- }],
2091
- /**
2092
- * Backdrop Opacity
2093
- * @see https://tailwindcss.com/docs/backdrop-opacity
2094
- */
2095
- 'backdrop-opacity': [{
2096
- 'backdrop-opacity': [opacity]
2097
- }],
2098
- /**
2099
- * Backdrop Saturate
2100
- * @see https://tailwindcss.com/docs/backdrop-saturate
2101
- */
2102
- 'backdrop-saturate': [{
2103
- 'backdrop-saturate': [saturate]
2104
- }],
2105
- /**
2106
- * Backdrop Sepia
2107
- * @see https://tailwindcss.com/docs/backdrop-sepia
2108
- */
2109
- 'backdrop-sepia': [{
2110
- 'backdrop-sepia': [sepia]
2111
- }],
2112
- // Tables
2113
- /**
2114
- * Border Collapse
2115
- * @see https://tailwindcss.com/docs/border-collapse
2116
- */
2117
- 'border-collapse': [{
2118
- border: ['collapse', 'separate']
2119
- }],
2120
- /**
2121
- * Border Spacing
2122
- * @see https://tailwindcss.com/docs/border-spacing
2123
- */
2124
- 'border-spacing': [{
2125
- 'border-spacing': [borderSpacing]
2126
- }],
2127
- /**
2128
- * Border Spacing X
2129
- * @see https://tailwindcss.com/docs/border-spacing
2130
- */
2131
- 'border-spacing-x': [{
2132
- 'border-spacing-x': [borderSpacing]
2133
- }],
2134
- /**
2135
- * Border Spacing Y
2136
- * @see https://tailwindcss.com/docs/border-spacing
2137
- */
2138
- 'border-spacing-y': [{
2139
- 'border-spacing-y': [borderSpacing]
2140
- }],
2141
- /**
2142
- * Table Layout
2143
- * @see https://tailwindcss.com/docs/table-layout
2144
- */
2145
- 'table-layout': [{
2146
- table: ['auto', 'fixed']
2147
- }],
2148
- /**
2149
- * Caption Side
2150
- * @see https://tailwindcss.com/docs/caption-side
2151
- */
2152
- caption: [{
2153
- caption: ['top', 'bottom']
2154
- }],
2155
- // Transitions and Animation
2156
- /**
2157
- * Tranisition Property
2158
- * @see https://tailwindcss.com/docs/transition-property
2159
- */
2160
- transition: [{
2161
- transition: ['none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue]
2162
- }],
2163
- /**
2164
- * Transition Duration
2165
- * @see https://tailwindcss.com/docs/transition-duration
2166
- */
2167
- duration: [{
2168
- duration: getNumberAndArbitrary()
2169
- }],
2170
- /**
2171
- * Transition Timing Function
2172
- * @see https://tailwindcss.com/docs/transition-timing-function
2173
- */
2174
- ease: [{
2175
- ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue]
2176
- }],
2177
- /**
2178
- * Transition Delay
2179
- * @see https://tailwindcss.com/docs/transition-delay
2180
- */
2181
- delay: [{
2182
- delay: getNumberAndArbitrary()
2183
- }],
2184
- /**
2185
- * Animation
2186
- * @see https://tailwindcss.com/docs/animation
2187
- */
2188
- animate: [{
2189
- animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue]
2190
- }],
2191
- // Transforms
2192
- /**
2193
- * Transform
2194
- * @see https://tailwindcss.com/docs/transform
2195
- */
2196
- transform: [{
2197
- transform: ['', 'gpu', 'none']
2198
- }],
2199
- /**
2200
- * Scale
2201
- * @see https://tailwindcss.com/docs/scale
2202
- */
2203
- scale: [{
2204
- scale: [scale]
2205
- }],
2206
- /**
2207
- * Scale X
2208
- * @see https://tailwindcss.com/docs/scale
2209
- */
2210
- 'scale-x': [{
2211
- 'scale-x': [scale]
2212
- }],
2213
- /**
2214
- * Scale Y
2215
- * @see https://tailwindcss.com/docs/scale
2216
- */
2217
- 'scale-y': [{
2218
- 'scale-y': [scale]
2219
- }],
2220
- /**
2221
- * Rotate
2222
- * @see https://tailwindcss.com/docs/rotate
2223
- */
2224
- rotate: [{
2225
- rotate: [isInteger, isArbitraryValue]
2226
- }],
2227
- /**
2228
- * Translate X
2229
- * @see https://tailwindcss.com/docs/translate
2230
- */
2231
- 'translate-x': [{
2232
- 'translate-x': [translate]
2233
- }],
2234
- /**
2235
- * Translate Y
2236
- * @see https://tailwindcss.com/docs/translate
2237
- */
2238
- 'translate-y': [{
2239
- 'translate-y': [translate]
2240
- }],
2241
- /**
2242
- * Skew X
2243
- * @see https://tailwindcss.com/docs/skew
2244
- */
2245
- 'skew-x': [{
2246
- 'skew-x': [skew]
2247
- }],
2248
- /**
2249
- * Skew Y
2250
- * @see https://tailwindcss.com/docs/skew
2251
- */
2252
- 'skew-y': [{
2253
- 'skew-y': [skew]
2254
- }],
2255
- /**
2256
- * Transform Origin
2257
- * @see https://tailwindcss.com/docs/transform-origin
2258
- */
2259
- 'transform-origin': [{
2260
- origin: ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue]
2261
- }],
2262
- // Interactivity
2263
- /**
2264
- * Accent Color
2265
- * @see https://tailwindcss.com/docs/accent-color
2266
- */
2267
- accent: [{
2268
- accent: ['auto', colors]
2269
- }],
2270
- /**
2271
- * Appearance
2272
- * @see https://tailwindcss.com/docs/appearance
2273
- */
2274
- appearance: ['appearance-none'],
2275
- /**
2276
- * Cursor
2277
- * @see https://tailwindcss.com/docs/cursor
2278
- */
2279
- cursor: [{
2280
- cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue]
2281
- }],
2282
- /**
2283
- * Caret Color
2284
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2285
- */
2286
- 'caret-color': [{
2287
- caret: [colors]
2288
- }],
2289
- /**
2290
- * Pointer Events
2291
- * @see https://tailwindcss.com/docs/pointer-events
2292
- */
2293
- 'pointer-events': [{
2294
- 'pointer-events': ['none', 'auto']
2295
- }],
2296
- /**
2297
- * Resize
2298
- * @see https://tailwindcss.com/docs/resize
2299
- */
2300
- resize: [{
2301
- resize: ['none', 'y', 'x', '']
2302
- }],
2303
- /**
2304
- * Scroll Behavior
2305
- * @see https://tailwindcss.com/docs/scroll-behavior
2306
- */
2307
- 'scroll-behavior': [{
2308
- scroll: ['auto', 'smooth']
2309
- }],
2310
- /**
2311
- * Scroll Margin
2312
- * @see https://tailwindcss.com/docs/scroll-margin
2313
- */
2314
- 'scroll-m': [{
2315
- 'scroll-m': [spacing]
2316
- }],
2317
- /**
2318
- * Scroll Margin X
2319
- * @see https://tailwindcss.com/docs/scroll-margin
2320
- */
2321
- 'scroll-mx': [{
2322
- 'scroll-mx': [spacing]
2323
- }],
2324
- /**
2325
- * Scroll Margin Y
2326
- * @see https://tailwindcss.com/docs/scroll-margin
2327
- */
2328
- 'scroll-my': [{
2329
- 'scroll-my': [spacing]
2330
- }],
2331
- /**
2332
- * Scroll Margin Start
2333
- * @see https://tailwindcss.com/docs/scroll-margin
2334
- */
2335
- 'scroll-ms': [{
2336
- 'scroll-ms': [spacing]
2337
- }],
2338
- /**
2339
- * Scroll Margin End
2340
- * @see https://tailwindcss.com/docs/scroll-margin
2341
- */
2342
- 'scroll-me': [{
2343
- 'scroll-me': [spacing]
2344
- }],
2345
- /**
2346
- * Scroll Margin Top
2347
- * @see https://tailwindcss.com/docs/scroll-margin
2348
- */
2349
- 'scroll-mt': [{
2350
- 'scroll-mt': [spacing]
2351
- }],
2352
- /**
2353
- * Scroll Margin Right
2354
- * @see https://tailwindcss.com/docs/scroll-margin
2355
- */
2356
- 'scroll-mr': [{
2357
- 'scroll-mr': [spacing]
2358
- }],
2359
- /**
2360
- * Scroll Margin Bottom
2361
- * @see https://tailwindcss.com/docs/scroll-margin
2362
- */
2363
- 'scroll-mb': [{
2364
- 'scroll-mb': [spacing]
2365
- }],
2366
- /**
2367
- * Scroll Margin Left
2368
- * @see https://tailwindcss.com/docs/scroll-margin
2369
- */
2370
- 'scroll-ml': [{
2371
- 'scroll-ml': [spacing]
2372
- }],
2373
- /**
2374
- * Scroll Padding
2375
- * @see https://tailwindcss.com/docs/scroll-padding
2376
- */
2377
- 'scroll-p': [{
2378
- 'scroll-p': [spacing]
2379
- }],
2380
- /**
2381
- * Scroll Padding X
2382
- * @see https://tailwindcss.com/docs/scroll-padding
2383
- */
2384
- 'scroll-px': [{
2385
- 'scroll-px': [spacing]
2386
- }],
2387
- /**
2388
- * Scroll Padding Y
2389
- * @see https://tailwindcss.com/docs/scroll-padding
2390
- */
2391
- 'scroll-py': [{
2392
- 'scroll-py': [spacing]
2393
- }],
2394
- /**
2395
- * Scroll Padding Start
2396
- * @see https://tailwindcss.com/docs/scroll-padding
2397
- */
2398
- 'scroll-ps': [{
2399
- 'scroll-ps': [spacing]
2400
- }],
2401
- /**
2402
- * Scroll Padding End
2403
- * @see https://tailwindcss.com/docs/scroll-padding
2404
- */
2405
- 'scroll-pe': [{
2406
- 'scroll-pe': [spacing]
2407
- }],
2408
- /**
2409
- * Scroll Padding Top
2410
- * @see https://tailwindcss.com/docs/scroll-padding
2411
- */
2412
- 'scroll-pt': [{
2413
- 'scroll-pt': [spacing]
2414
- }],
2415
- /**
2416
- * Scroll Padding Right
2417
- * @see https://tailwindcss.com/docs/scroll-padding
2418
- */
2419
- 'scroll-pr': [{
2420
- 'scroll-pr': [spacing]
2421
- }],
2422
- /**
2423
- * Scroll Padding Bottom
2424
- * @see https://tailwindcss.com/docs/scroll-padding
2425
- */
2426
- 'scroll-pb': [{
2427
- 'scroll-pb': [spacing]
2428
- }],
2429
- /**
2430
- * Scroll Padding Left
2431
- * @see https://tailwindcss.com/docs/scroll-padding
2432
- */
2433
- 'scroll-pl': [{
2434
- 'scroll-pl': [spacing]
2435
- }],
2436
- /**
2437
- * Scroll Snap Align
2438
- * @see https://tailwindcss.com/docs/scroll-snap-align
2439
- */
2440
- 'snap-align': [{
2441
- snap: ['start', 'end', 'center', 'align-none']
2442
- }],
2443
- /**
2444
- * Scroll Snap Stop
2445
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2446
- */
2447
- 'snap-stop': [{
2448
- snap: ['normal', 'always']
2449
- }],
2450
- /**
2451
- * Scroll Snap Type
2452
- * @see https://tailwindcss.com/docs/scroll-snap-type
2453
- */
2454
- 'snap-type': [{
2455
- snap: ['none', 'x', 'y', 'both']
2456
- }],
2457
- /**
2458
- * Scroll Snap Type Strictness
2459
- * @see https://tailwindcss.com/docs/scroll-snap-type
2460
- */
2461
- 'snap-strictness': [{
2462
- snap: ['mandatory', 'proximity']
2463
- }],
2464
- /**
2465
- * Touch Action
2466
- * @see https://tailwindcss.com/docs/touch-action
2467
- */
2468
- touch: [{
2469
- touch: ['auto', 'none', 'pinch-zoom', 'manipulation', {
2470
- pan: ['x', 'left', 'right', 'y', 'up', 'down']
2471
- }]
2472
- }],
2473
- /**
2474
- * User Select
2475
- * @see https://tailwindcss.com/docs/user-select
2476
- */
2477
- select: [{
2478
- select: ['none', 'text', 'all', 'auto']
2479
- }],
2480
- /**
2481
- * Will Change
2482
- * @see https://tailwindcss.com/docs/will-change
2483
- */
2484
- 'will-change': [{
2485
- 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue]
2486
- }],
2487
- // SVG
2488
- /**
2489
- * Fill
2490
- * @see https://tailwindcss.com/docs/fill
2491
- */
2492
- fill: [{
2493
- fill: [colors, 'none']
2494
- }],
2495
- /**
2496
- * Stroke Width
2497
- * @see https://tailwindcss.com/docs/stroke-width
2498
- */
2499
- 'stroke-w': [{
2500
- stroke: [isLength, isArbitraryNumber]
2501
- }],
2502
- /**
2503
- * Stroke
2504
- * @see https://tailwindcss.com/docs/stroke
2505
- */
2506
- stroke: [{
2507
- stroke: [colors, 'none']
2508
- }],
2509
- // Accessibility
2510
- /**
2511
- * Screen Readers
2512
- * @see https://tailwindcss.com/docs/screen-readers
2513
- */
2514
- sr: ['sr-only', 'not-sr-only']
2515
- },
2516
- conflictingClassGroups: {
2517
- overflow: ['overflow-x', 'overflow-y'],
2518
- overscroll: ['overscroll-x', 'overscroll-y'],
2519
- inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
2520
- 'inset-x': ['right', 'left'],
2521
- 'inset-y': ['top', 'bottom'],
2522
- flex: ['basis', 'grow', 'shrink'],
2523
- gap: ['gap-x', 'gap-y'],
2524
- p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
2525
- px: ['pr', 'pl'],
2526
- py: ['pt', 'pb'],
2527
- m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
2528
- mx: ['mr', 'ml'],
2529
- my: ['mt', 'mb'],
2530
- 'font-size': ['leading'],
2531
- 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
2532
- 'fvn-ordinal': ['fvn-normal'],
2533
- 'fvn-slashed-zero': ['fvn-normal'],
2534
- 'fvn-figure': ['fvn-normal'],
2535
- 'fvn-spacing': ['fvn-normal'],
2536
- 'fvn-fraction': ['fvn-normal'],
2537
- 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'],
2538
- 'rounded-s': ['rounded-ss', 'rounded-es'],
2539
- 'rounded-e': ['rounded-se', 'rounded-ee'],
2540
- 'rounded-t': ['rounded-tl', 'rounded-tr'],
2541
- 'rounded-r': ['rounded-tr', 'rounded-br'],
2542
- 'rounded-b': ['rounded-br', 'rounded-bl'],
2543
- 'rounded-l': ['rounded-tl', 'rounded-bl'],
2544
- 'border-spacing': ['border-spacing-x', 'border-spacing-y'],
2545
- 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
2546
- 'border-w-x': ['border-w-r', 'border-w-l'],
2547
- 'border-w-y': ['border-w-t', 'border-w-b'],
2548
- 'border-color': ['border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
2549
- 'border-color-x': ['border-color-r', 'border-color-l'],
2550
- 'border-color-y': ['border-color-t', 'border-color-b'],
2551
- 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
2552
- 'scroll-mx': ['scroll-mr', 'scroll-ml'],
2553
- 'scroll-my': ['scroll-mt', 'scroll-mb'],
2554
- 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
2555
- 'scroll-px': ['scroll-pr', 'scroll-pl'],
2556
- 'scroll-py': ['scroll-pt', 'scroll-pb']
2557
- },
2558
- conflictingClassGroupModifiers: {
2559
- 'font-size': ['leading']
2560
- }
2561
- };
2562
- }
2563
-
2564
- var twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var tailwindMerge = require('tailwind-merge');
2565
7
 
2566
8
  /**
2567
9
  * A wrapper around CVA that uses tailwind-merge to merge the classes.
2568
10
  */
2569
11
  const cvaMerge = (base, config) => {
2570
- const classes = cva(base, config);
2571
- return props => twMerge(classes(props));
12
+ const classes = classVarianceAuthority.cva(base, config);
13
+ return props => tailwindMerge.twMerge(classes(props));
2572
14
  };
2573
15
 
2574
16
  exports.cvaMerge = cvaMerge;