@mainframework/dropzone 1.0.20 → 1.0.23

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