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