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