@trackunit/react-date-and-time-components 0.0.92 → 0.0.93

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