nexlide 1.0.2 → 1.1.0

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