canx-ui 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,129 +1,2025 @@
1
1
  // src/components/Button.tsx
2
- import { jsxDEV } from "react/jsx-dev-runtime";
3
- function cn(...classes) {
4
- return classes.filter(Boolean).join(" ");
2
+ import * as React from "react";
3
+
4
+ // ../node_modules/clsx/dist/clsx.mjs
5
+ function r(e) {
6
+ var t, f, n = "";
7
+ if (typeof e == "string" || typeof e == "number")
8
+ n += e;
9
+ else if (typeof e == "object")
10
+ if (Array.isArray(e)) {
11
+ var o = e.length;
12
+ for (t = 0;t < o; t++)
13
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
14
+ } else
15
+ for (f in e)
16
+ e[f] && (n && (n += " "), n += f);
17
+ return n;
18
+ }
19
+ function clsx() {
20
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
21
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
22
+ return n;
23
+ }
24
+
25
+ // ../node_modules/class-variance-authority/dist/index.mjs
26
+ var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
27
+ var cx = clsx;
28
+ var cva = (base, config) => (props) => {
29
+ var _config_compoundVariants;
30
+ if ((config === null || config === undefined ? undefined : config.variants) == null)
31
+ return cx(base, props === null || props === undefined ? undefined : props.class, props === null || props === undefined ? undefined : props.className);
32
+ const { variants, defaultVariants } = config;
33
+ const getVariantClassNames = Object.keys(variants).map((variant) => {
34
+ const variantProp = props === null || props === undefined ? undefined : props[variant];
35
+ const defaultVariantProp = defaultVariants === null || defaultVariants === undefined ? undefined : defaultVariants[variant];
36
+ if (variantProp === null)
37
+ return null;
38
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
39
+ return variants[variant][variantKey];
40
+ });
41
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
42
+ let [key, value] = param;
43
+ if (value === undefined) {
44
+ return acc;
45
+ }
46
+ acc[key] = value;
47
+ return acc;
48
+ }, {});
49
+ const getCompoundVariantClassNames = config === null || config === undefined ? undefined : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === undefined ? undefined : _config_compoundVariants.reduce((acc, param) => {
50
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
51
+ return Object.entries(compoundVariantOptions).every((param2) => {
52
+ let [key, value] = param2;
53
+ return Array.isArray(value) ? value.includes({
54
+ ...defaultVariants,
55
+ ...propsWithoutUndefined
56
+ }[key]) : {
57
+ ...defaultVariants,
58
+ ...propsWithoutUndefined
59
+ }[key] === value;
60
+ }) ? [
61
+ ...acc,
62
+ cvClass,
63
+ cvClassName
64
+ ] : acc;
65
+ }, []);
66
+ return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === undefined ? undefined : props.class, props === null || props === undefined ? undefined : props.className);
67
+ };
68
+
69
+ // node_modules/clsx/dist/clsx.mjs
70
+ function r2(e) {
71
+ var t, f, n = "";
72
+ if (typeof e == "string" || typeof e == "number")
73
+ n += e;
74
+ else if (typeof e == "object")
75
+ if (Array.isArray(e)) {
76
+ var o = e.length;
77
+ for (t = 0;t < o; t++)
78
+ e[t] && (f = r2(e[t])) && (n && (n += " "), n += f);
79
+ } else
80
+ for (f in e)
81
+ e[f] && (n && (n += " "), n += f);
82
+ return n;
5
83
  }
6
- function Button({
7
- type = "button",
8
- variant = "primary",
9
- size = "md",
10
- className = "",
11
- children,
12
- ...props
13
- }) {
14
- const baseStyles = "inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none";
15
- const variants = {
16
- primary: "bg-blue-600 text-white hover:bg-blue-700",
17
- secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200",
18
- danger: "bg-red-600 text-white hover:bg-red-700",
19
- ghost: "hover:bg-gray-100 hover:text-gray-900"
84
+ function clsx2() {
85
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
86
+ (e = arguments[f]) && (t = r2(e)) && (n && (n += " "), n += t);
87
+ return n;
88
+ }
89
+
90
+ // node_modules/tailwind-merge/dist/bundle-mjs.mjs
91
+ var concatArrays = (array1, array2) => {
92
+ const combinedArray = new Array(array1.length + array2.length);
93
+ for (let i = 0;i < array1.length; i++) {
94
+ combinedArray[i] = array1[i];
95
+ }
96
+ for (let i = 0;i < array2.length; i++) {
97
+ combinedArray[array1.length + i] = array2[i];
98
+ }
99
+ return combinedArray;
100
+ };
101
+ var createClassValidatorObject = (classGroupId, validator) => ({
102
+ classGroupId,
103
+ validator
104
+ });
105
+ var createClassPartObject = (nextPart = new Map, validators = null, classGroupId) => ({
106
+ nextPart,
107
+ validators,
108
+ classGroupId
109
+ });
110
+ var CLASS_PART_SEPARATOR = "-";
111
+ var EMPTY_CONFLICTS = [];
112
+ var ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
113
+ var createClassGroupUtils = (config) => {
114
+ const classMap = createClassMap(config);
115
+ const {
116
+ conflictingClassGroups,
117
+ conflictingClassGroupModifiers
118
+ } = config;
119
+ const getClassGroupId = (className) => {
120
+ if (className.startsWith("[") && className.endsWith("]")) {
121
+ return getGroupIdForArbitraryProperty(className);
122
+ }
123
+ const classParts = className.split(CLASS_PART_SEPARATOR);
124
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
125
+ return getGroupRecursive(classParts, startIndex, classMap);
126
+ };
127
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
128
+ if (hasPostfixModifier) {
129
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
130
+ const baseConflicts = conflictingClassGroups[classGroupId];
131
+ if (modifierConflicts) {
132
+ if (baseConflicts) {
133
+ return concatArrays(baseConflicts, modifierConflicts);
134
+ }
135
+ return modifierConflicts;
136
+ }
137
+ return baseConflicts || EMPTY_CONFLICTS;
138
+ }
139
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
140
+ };
141
+ return {
142
+ getClassGroupId,
143
+ getConflictingClassGroupIds
144
+ };
145
+ };
146
+ var getGroupRecursive = (classParts, startIndex, classPartObject) => {
147
+ const classPathsLength = classParts.length - startIndex;
148
+ if (classPathsLength === 0) {
149
+ return classPartObject.classGroupId;
150
+ }
151
+ const currentClassPart = classParts[startIndex];
152
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
153
+ if (nextClassPartObject) {
154
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
155
+ if (result)
156
+ return result;
157
+ }
158
+ const validators = classPartObject.validators;
159
+ if (validators === null) {
160
+ return;
161
+ }
162
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
163
+ const validatorsLength = validators.length;
164
+ for (let i = 0;i < validatorsLength; i++) {
165
+ const validatorObj = validators[i];
166
+ if (validatorObj.validator(classRest)) {
167
+ return validatorObj.classGroupId;
168
+ }
169
+ }
170
+ return;
171
+ };
172
+ var getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? undefined : (() => {
173
+ const content = className.slice(1, -1);
174
+ const colonIndex = content.indexOf(":");
175
+ const property = content.slice(0, colonIndex);
176
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;
177
+ })();
178
+ var createClassMap = (config) => {
179
+ const {
180
+ theme,
181
+ classGroups
182
+ } = config;
183
+ return processClassGroups(classGroups, theme);
184
+ };
185
+ var processClassGroups = (classGroups, theme) => {
186
+ const classMap = createClassPartObject();
187
+ for (const classGroupId in classGroups) {
188
+ const group = classGroups[classGroupId];
189
+ processClassesRecursively(group, classMap, classGroupId, theme);
190
+ }
191
+ return classMap;
192
+ };
193
+ var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
194
+ const len = classGroup.length;
195
+ for (let i = 0;i < len; i++) {
196
+ const classDefinition = classGroup[i];
197
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
198
+ }
199
+ };
200
+ var processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
201
+ if (typeof classDefinition === "string") {
202
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
203
+ return;
204
+ }
205
+ if (typeof classDefinition === "function") {
206
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
207
+ return;
208
+ }
209
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
210
+ };
211
+ var processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
212
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
213
+ classPartObjectToEdit.classGroupId = classGroupId;
214
+ };
215
+ var processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
216
+ if (isThemeGetter(classDefinition)) {
217
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
218
+ return;
219
+ }
220
+ if (classPartObject.validators === null) {
221
+ classPartObject.validators = [];
222
+ }
223
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
224
+ };
225
+ var processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
226
+ const entries = Object.entries(classDefinition);
227
+ const len = entries.length;
228
+ for (let i = 0;i < len; i++) {
229
+ const [key, value] = entries[i];
230
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
231
+ }
232
+ };
233
+ var getPart = (classPartObject, path) => {
234
+ let current = classPartObject;
235
+ const parts = path.split(CLASS_PART_SEPARATOR);
236
+ const len = parts.length;
237
+ for (let i = 0;i < len; i++) {
238
+ const part = parts[i];
239
+ let next = current.nextPart.get(part);
240
+ if (!next) {
241
+ next = createClassPartObject();
242
+ current.nextPart.set(part, next);
243
+ }
244
+ current = next;
245
+ }
246
+ return current;
247
+ };
248
+ var isThemeGetter = (func) => ("isThemeGetter" in func) && func.isThemeGetter === true;
249
+ var createLruCache = (maxCacheSize) => {
250
+ if (maxCacheSize < 1) {
251
+ return {
252
+ get: () => {
253
+ return;
254
+ },
255
+ set: () => {
256
+ }
257
+ };
258
+ }
259
+ let cacheSize = 0;
260
+ let cache = Object.create(null);
261
+ let previousCache = Object.create(null);
262
+ const update = (key, value) => {
263
+ cache[key] = value;
264
+ cacheSize++;
265
+ if (cacheSize > maxCacheSize) {
266
+ cacheSize = 0;
267
+ previousCache = cache;
268
+ cache = Object.create(null);
269
+ }
270
+ };
271
+ return {
272
+ get(key) {
273
+ let value = cache[key];
274
+ if (value !== undefined) {
275
+ return value;
276
+ }
277
+ if ((value = previousCache[key]) !== undefined) {
278
+ update(key, value);
279
+ return value;
280
+ }
281
+ },
282
+ set(key, value) {
283
+ if (key in cache) {
284
+ cache[key] = value;
285
+ } else {
286
+ update(key, value);
287
+ }
288
+ }
289
+ };
290
+ };
291
+ var IMPORTANT_MODIFIER = "!";
292
+ var MODIFIER_SEPARATOR = ":";
293
+ var EMPTY_MODIFIERS = [];
294
+ var createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
295
+ modifiers,
296
+ hasImportantModifier,
297
+ baseClassName,
298
+ maybePostfixModifierPosition,
299
+ isExternal
300
+ });
301
+ var createParseClassName = (config) => {
302
+ const {
303
+ prefix,
304
+ experimentalParseClassName
305
+ } = config;
306
+ let parseClassName = (className) => {
307
+ const modifiers = [];
308
+ let bracketDepth = 0;
309
+ let parenDepth = 0;
310
+ let modifierStart = 0;
311
+ let postfixModifierPosition;
312
+ const len = className.length;
313
+ for (let index = 0;index < len; index++) {
314
+ const currentCharacter = className[index];
315
+ if (bracketDepth === 0 && parenDepth === 0) {
316
+ if (currentCharacter === MODIFIER_SEPARATOR) {
317
+ modifiers.push(className.slice(modifierStart, index));
318
+ modifierStart = index + 1;
319
+ continue;
320
+ }
321
+ if (currentCharacter === "/") {
322
+ postfixModifierPosition = index;
323
+ continue;
324
+ }
325
+ }
326
+ if (currentCharacter === "[")
327
+ bracketDepth++;
328
+ else if (currentCharacter === "]")
329
+ bracketDepth--;
330
+ else if (currentCharacter === "(")
331
+ parenDepth++;
332
+ else if (currentCharacter === ")")
333
+ parenDepth--;
334
+ }
335
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
336
+ let baseClassName = baseClassNameWithImportantModifier;
337
+ let hasImportantModifier = false;
338
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
339
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
340
+ hasImportantModifier = true;
341
+ } else if (baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
342
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
343
+ hasImportantModifier = true;
344
+ }
345
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
346
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
347
+ };
348
+ if (prefix) {
349
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
350
+ const parseClassNameOriginal = parseClassName;
351
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);
352
+ }
353
+ if (experimentalParseClassName) {
354
+ const parseClassNameOriginal = parseClassName;
355
+ parseClassName = (className) => experimentalParseClassName({
356
+ className,
357
+ parseClassName: parseClassNameOriginal
358
+ });
359
+ }
360
+ return parseClassName;
361
+ };
362
+ var createSortModifiers = (config) => {
363
+ const modifierWeights = new Map;
364
+ config.orderSensitiveModifiers.forEach((mod, index) => {
365
+ modifierWeights.set(mod, 1e6 + index);
366
+ });
367
+ return (modifiers) => {
368
+ const result = [];
369
+ let currentSegment = [];
370
+ for (let i = 0;i < modifiers.length; i++) {
371
+ const modifier = modifiers[i];
372
+ const isArbitrary = modifier[0] === "[";
373
+ const isOrderSensitive = modifierWeights.has(modifier);
374
+ if (isArbitrary || isOrderSensitive) {
375
+ if (currentSegment.length > 0) {
376
+ currentSegment.sort();
377
+ result.push(...currentSegment);
378
+ currentSegment = [];
379
+ }
380
+ result.push(modifier);
381
+ } else {
382
+ currentSegment.push(modifier);
383
+ }
384
+ }
385
+ if (currentSegment.length > 0) {
386
+ currentSegment.sort();
387
+ result.push(...currentSegment);
388
+ }
389
+ return result;
20
390
  };
21
- const sizes = {
22
- sm: "h-8 px-3 text-xs",
23
- md: "h-10 px-4 py-2 text-sm",
24
- lg: "h-12 px-8 text-md"
391
+ };
392
+ var createConfigUtils = (config) => ({
393
+ cache: createLruCache(config.cacheSize),
394
+ parseClassName: createParseClassName(config),
395
+ sortModifiers: createSortModifiers(config),
396
+ ...createClassGroupUtils(config)
397
+ });
398
+ var SPLIT_CLASSES_REGEX = /\s+/;
399
+ var mergeClassList = (classList, configUtils) => {
400
+ const {
401
+ parseClassName,
402
+ getClassGroupId,
403
+ getConflictingClassGroupIds,
404
+ sortModifiers
405
+ } = configUtils;
406
+ const classGroupsInConflict = [];
407
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
408
+ let result = "";
409
+ for (let index = classNames.length - 1;index >= 0; index -= 1) {
410
+ const originalClassName = classNames[index];
411
+ const {
412
+ isExternal,
413
+ modifiers,
414
+ hasImportantModifier,
415
+ baseClassName,
416
+ maybePostfixModifierPosition
417
+ } = parseClassName(originalClassName);
418
+ if (isExternal) {
419
+ result = originalClassName + (result.length > 0 ? " " + result : result);
420
+ continue;
421
+ }
422
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
423
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
424
+ if (!classGroupId) {
425
+ if (!hasPostfixModifier) {
426
+ result = originalClassName + (result.length > 0 ? " " + result : result);
427
+ continue;
428
+ }
429
+ classGroupId = getClassGroupId(baseClassName);
430
+ if (!classGroupId) {
431
+ result = originalClassName + (result.length > 0 ? " " + result : result);
432
+ continue;
433
+ }
434
+ hasPostfixModifier = false;
435
+ }
436
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
437
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
438
+ const classId = modifierId + classGroupId;
439
+ if (classGroupsInConflict.indexOf(classId) > -1) {
440
+ continue;
441
+ }
442
+ classGroupsInConflict.push(classId);
443
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
444
+ for (let i = 0;i < conflictGroups.length; ++i) {
445
+ const group = conflictGroups[i];
446
+ classGroupsInConflict.push(modifierId + group);
447
+ }
448
+ result = originalClassName + (result.length > 0 ? " " + result : result);
449
+ }
450
+ return result;
451
+ };
452
+ var twJoin = (...classLists) => {
453
+ let index = 0;
454
+ let argument;
455
+ let resolvedValue;
456
+ let string = "";
457
+ while (index < classLists.length) {
458
+ if (argument = classLists[index++]) {
459
+ if (resolvedValue = toValue(argument)) {
460
+ string && (string += " ");
461
+ string += resolvedValue;
462
+ }
463
+ }
464
+ }
465
+ return string;
466
+ };
467
+ var toValue = (mix) => {
468
+ if (typeof mix === "string") {
469
+ return mix;
470
+ }
471
+ let resolvedValue;
472
+ let string = "";
473
+ for (let k = 0;k < mix.length; k++) {
474
+ if (mix[k]) {
475
+ if (resolvedValue = toValue(mix[k])) {
476
+ string && (string += " ");
477
+ string += resolvedValue;
478
+ }
479
+ }
480
+ }
481
+ return string;
482
+ };
483
+ var createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
484
+ let configUtils;
485
+ let cacheGet;
486
+ let cacheSet;
487
+ let functionToCall;
488
+ const initTailwindMerge = (classList) => {
489
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
490
+ configUtils = createConfigUtils(config);
491
+ cacheGet = configUtils.cache.get;
492
+ cacheSet = configUtils.cache.set;
493
+ functionToCall = tailwindMerge;
494
+ return tailwindMerge(classList);
25
495
  };
496
+ const tailwindMerge = (classList) => {
497
+ const cachedResult = cacheGet(classList);
498
+ if (cachedResult) {
499
+ return cachedResult;
500
+ }
501
+ const result = mergeClassList(classList, configUtils);
502
+ cacheSet(classList, result);
503
+ return result;
504
+ };
505
+ functionToCall = initTailwindMerge;
506
+ return (...args) => functionToCall(twJoin(...args));
507
+ };
508
+ var fallbackThemeArr = [];
509
+ var fromTheme = (key) => {
510
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
511
+ themeGetter.isThemeGetter = true;
512
+ return themeGetter;
513
+ };
514
+ var arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
515
+ var arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
516
+ var fractionRegex = /^\d+\/\d+$/;
517
+ var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
518
+ var 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$/;
519
+ var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
520
+ var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
521
+ var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
522
+ var isFraction = (value) => fractionRegex.test(value);
523
+ var isNumber = (value) => !!value && !Number.isNaN(Number(value));
524
+ var isInteger = (value) => !!value && Number.isInteger(Number(value));
525
+ var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
526
+ var isTshirtSize = (value) => tshirtUnitRegex.test(value);
527
+ var isAny = () => true;
528
+ var isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
529
+ var isNever = () => false;
530
+ var isShadow = (value) => shadowRegex.test(value);
531
+ var isImage = (value) => imageRegex.test(value);
532
+ var isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
533
+ var isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
534
+ var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
535
+ var isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
536
+ var isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
537
+ var isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
538
+ var isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
539
+ var isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
540
+ var isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
541
+ var isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
542
+ var isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
543
+ var isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
544
+ var isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
545
+ var isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
546
+ var isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
547
+ var getIsArbitraryValue = (value, testLabel, testValue) => {
548
+ const result = arbitraryValueRegex.exec(value);
549
+ if (result) {
550
+ if (result[1]) {
551
+ return testLabel(result[1]);
552
+ }
553
+ return testValue(result[2]);
554
+ }
555
+ return false;
556
+ };
557
+ var getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
558
+ const result = arbitraryVariableRegex.exec(value);
559
+ if (result) {
560
+ if (result[1]) {
561
+ return testLabel(result[1]);
562
+ }
563
+ return shouldMatchNoLabel;
564
+ }
565
+ return false;
566
+ };
567
+ var isLabelPosition = (label) => label === "position" || label === "percentage";
568
+ var isLabelImage = (label) => label === "image" || label === "url";
569
+ var isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
570
+ var isLabelLength = (label) => label === "length";
571
+ var isLabelNumber = (label) => label === "number";
572
+ var isLabelFamilyName = (label) => label === "family-name";
573
+ var isLabelShadow = (label) => label === "shadow";
574
+ var getDefaultConfig = () => {
575
+ const themeColor = fromTheme("color");
576
+ const themeFont = fromTheme("font");
577
+ const themeText = fromTheme("text");
578
+ const themeFontWeight = fromTheme("font-weight");
579
+ const themeTracking = fromTheme("tracking");
580
+ const themeLeading = fromTheme("leading");
581
+ const themeBreakpoint = fromTheme("breakpoint");
582
+ const themeContainer = fromTheme("container");
583
+ const themeSpacing = fromTheme("spacing");
584
+ const themeRadius = fromTheme("radius");
585
+ const themeShadow = fromTheme("shadow");
586
+ const themeInsetShadow = fromTheme("inset-shadow");
587
+ const themeTextShadow = fromTheme("text-shadow");
588
+ const themeDropShadow = fromTheme("drop-shadow");
589
+ const themeBlur = fromTheme("blur");
590
+ const themePerspective = fromTheme("perspective");
591
+ const themeAspect = fromTheme("aspect");
592
+ const themeEase = fromTheme("ease");
593
+ const themeAnimate = fromTheme("animate");
594
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
595
+ const scalePosition = () => [
596
+ "center",
597
+ "top",
598
+ "bottom",
599
+ "left",
600
+ "right",
601
+ "top-left",
602
+ "left-top",
603
+ "top-right",
604
+ "right-top",
605
+ "bottom-right",
606
+ "right-bottom",
607
+ "bottom-left",
608
+ "left-bottom"
609
+ ];
610
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
611
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
612
+ const scaleOverscroll = () => ["auto", "contain", "none"];
613
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
614
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
615
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
616
+ const scaleGridColRowStartAndEnd = () => ["auto", {
617
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
618
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
619
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
620
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
621
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
622
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
623
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
624
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
625
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
626
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
627
+ position: [isArbitraryVariable, isArbitraryValue]
628
+ }];
629
+ const scaleBgRepeat = () => ["no-repeat", {
630
+ repeat: ["", "x", "y", "space", "round"]
631
+ }];
632
+ const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
633
+ size: [isArbitraryVariable, isArbitraryValue]
634
+ }];
635
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
636
+ const scaleRadius = () => [
637
+ "",
638
+ "none",
639
+ "full",
640
+ themeRadius,
641
+ isArbitraryVariable,
642
+ isArbitraryValue
643
+ ];
644
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
645
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
646
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
647
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
648
+ const scaleBlur = () => [
649
+ "",
650
+ "none",
651
+ themeBlur,
652
+ isArbitraryVariable,
653
+ isArbitraryValue
654
+ ];
655
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
656
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
657
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
658
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
659
+ return {
660
+ cacheSize: 500,
661
+ theme: {
662
+ animate: ["spin", "ping", "pulse", "bounce"],
663
+ aspect: ["video"],
664
+ blur: [isTshirtSize],
665
+ breakpoint: [isTshirtSize],
666
+ color: [isAny],
667
+ container: [isTshirtSize],
668
+ "drop-shadow": [isTshirtSize],
669
+ ease: ["in", "out", "in-out"],
670
+ font: [isAnyNonArbitrary],
671
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
672
+ "inset-shadow": [isTshirtSize],
673
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
674
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
675
+ radius: [isTshirtSize],
676
+ shadow: [isTshirtSize],
677
+ spacing: ["px", isNumber],
678
+ text: [isTshirtSize],
679
+ "text-shadow": [isTshirtSize],
680
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
681
+ },
682
+ classGroups: {
683
+ aspect: [{
684
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
685
+ }],
686
+ container: ["container"],
687
+ columns: [{
688
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
689
+ }],
690
+ "break-after": [{
691
+ "break-after": scaleBreak()
692
+ }],
693
+ "break-before": [{
694
+ "break-before": scaleBreak()
695
+ }],
696
+ "break-inside": [{
697
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
698
+ }],
699
+ "box-decoration": [{
700
+ "box-decoration": ["slice", "clone"]
701
+ }],
702
+ box: [{
703
+ box: ["border", "content"]
704
+ }],
705
+ 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"],
706
+ sr: ["sr-only", "not-sr-only"],
707
+ float: [{
708
+ float: ["right", "left", "none", "start", "end"]
709
+ }],
710
+ clear: [{
711
+ clear: ["left", "right", "both", "none", "start", "end"]
712
+ }],
713
+ isolation: ["isolate", "isolation-auto"],
714
+ "object-fit": [{
715
+ object: ["contain", "cover", "fill", "none", "scale-down"]
716
+ }],
717
+ "object-position": [{
718
+ object: scalePositionWithArbitrary()
719
+ }],
720
+ overflow: [{
721
+ overflow: scaleOverflow()
722
+ }],
723
+ "overflow-x": [{
724
+ "overflow-x": scaleOverflow()
725
+ }],
726
+ "overflow-y": [{
727
+ "overflow-y": scaleOverflow()
728
+ }],
729
+ overscroll: [{
730
+ overscroll: scaleOverscroll()
731
+ }],
732
+ "overscroll-x": [{
733
+ "overscroll-x": scaleOverscroll()
734
+ }],
735
+ "overscroll-y": [{
736
+ "overscroll-y": scaleOverscroll()
737
+ }],
738
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
739
+ inset: [{
740
+ inset: scaleInset()
741
+ }],
742
+ "inset-x": [{
743
+ "inset-x": scaleInset()
744
+ }],
745
+ "inset-y": [{
746
+ "inset-y": scaleInset()
747
+ }],
748
+ start: [{
749
+ start: scaleInset()
750
+ }],
751
+ end: [{
752
+ end: scaleInset()
753
+ }],
754
+ top: [{
755
+ top: scaleInset()
756
+ }],
757
+ right: [{
758
+ right: scaleInset()
759
+ }],
760
+ bottom: [{
761
+ bottom: scaleInset()
762
+ }],
763
+ left: [{
764
+ left: scaleInset()
765
+ }],
766
+ visibility: ["visible", "invisible", "collapse"],
767
+ z: [{
768
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
769
+ }],
770
+ basis: [{
771
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
772
+ }],
773
+ "flex-direction": [{
774
+ flex: ["row", "row-reverse", "col", "col-reverse"]
775
+ }],
776
+ "flex-wrap": [{
777
+ flex: ["nowrap", "wrap", "wrap-reverse"]
778
+ }],
779
+ flex: [{
780
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
781
+ }],
782
+ grow: [{
783
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
784
+ }],
785
+ shrink: [{
786
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
787
+ }],
788
+ order: [{
789
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
790
+ }],
791
+ "grid-cols": [{
792
+ "grid-cols": scaleGridTemplateColsRows()
793
+ }],
794
+ "col-start-end": [{
795
+ col: scaleGridColRowStartAndEnd()
796
+ }],
797
+ "col-start": [{
798
+ "col-start": scaleGridColRowStartOrEnd()
799
+ }],
800
+ "col-end": [{
801
+ "col-end": scaleGridColRowStartOrEnd()
802
+ }],
803
+ "grid-rows": [{
804
+ "grid-rows": scaleGridTemplateColsRows()
805
+ }],
806
+ "row-start-end": [{
807
+ row: scaleGridColRowStartAndEnd()
808
+ }],
809
+ "row-start": [{
810
+ "row-start": scaleGridColRowStartOrEnd()
811
+ }],
812
+ "row-end": [{
813
+ "row-end": scaleGridColRowStartOrEnd()
814
+ }],
815
+ "grid-flow": [{
816
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
817
+ }],
818
+ "auto-cols": [{
819
+ "auto-cols": scaleGridAutoColsRows()
820
+ }],
821
+ "auto-rows": [{
822
+ "auto-rows": scaleGridAutoColsRows()
823
+ }],
824
+ gap: [{
825
+ gap: scaleUnambiguousSpacing()
826
+ }],
827
+ "gap-x": [{
828
+ "gap-x": scaleUnambiguousSpacing()
829
+ }],
830
+ "gap-y": [{
831
+ "gap-y": scaleUnambiguousSpacing()
832
+ }],
833
+ "justify-content": [{
834
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
835
+ }],
836
+ "justify-items": [{
837
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
838
+ }],
839
+ "justify-self": [{
840
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
841
+ }],
842
+ "align-content": [{
843
+ content: ["normal", ...scaleAlignPrimaryAxis()]
844
+ }],
845
+ "align-items": [{
846
+ items: [...scaleAlignSecondaryAxis(), {
847
+ baseline: ["", "last"]
848
+ }]
849
+ }],
850
+ "align-self": [{
851
+ self: ["auto", ...scaleAlignSecondaryAxis(), {
852
+ baseline: ["", "last"]
853
+ }]
854
+ }],
855
+ "place-content": [{
856
+ "place-content": scaleAlignPrimaryAxis()
857
+ }],
858
+ "place-items": [{
859
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
860
+ }],
861
+ "place-self": [{
862
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
863
+ }],
864
+ p: [{
865
+ p: scaleUnambiguousSpacing()
866
+ }],
867
+ px: [{
868
+ px: scaleUnambiguousSpacing()
869
+ }],
870
+ py: [{
871
+ py: scaleUnambiguousSpacing()
872
+ }],
873
+ ps: [{
874
+ ps: scaleUnambiguousSpacing()
875
+ }],
876
+ pe: [{
877
+ pe: scaleUnambiguousSpacing()
878
+ }],
879
+ pt: [{
880
+ pt: scaleUnambiguousSpacing()
881
+ }],
882
+ pr: [{
883
+ pr: scaleUnambiguousSpacing()
884
+ }],
885
+ pb: [{
886
+ pb: scaleUnambiguousSpacing()
887
+ }],
888
+ pl: [{
889
+ pl: scaleUnambiguousSpacing()
890
+ }],
891
+ m: [{
892
+ m: scaleMargin()
893
+ }],
894
+ mx: [{
895
+ mx: scaleMargin()
896
+ }],
897
+ my: [{
898
+ my: scaleMargin()
899
+ }],
900
+ ms: [{
901
+ ms: scaleMargin()
902
+ }],
903
+ me: [{
904
+ me: scaleMargin()
905
+ }],
906
+ mt: [{
907
+ mt: scaleMargin()
908
+ }],
909
+ mr: [{
910
+ mr: scaleMargin()
911
+ }],
912
+ mb: [{
913
+ mb: scaleMargin()
914
+ }],
915
+ ml: [{
916
+ ml: scaleMargin()
917
+ }],
918
+ "space-x": [{
919
+ "space-x": scaleUnambiguousSpacing()
920
+ }],
921
+ "space-x-reverse": ["space-x-reverse"],
922
+ "space-y": [{
923
+ "space-y": scaleUnambiguousSpacing()
924
+ }],
925
+ "space-y-reverse": ["space-y-reverse"],
926
+ size: [{
927
+ size: scaleSizing()
928
+ }],
929
+ w: [{
930
+ w: [themeContainer, "screen", ...scaleSizing()]
931
+ }],
932
+ "min-w": [{
933
+ "min-w": [
934
+ themeContainer,
935
+ "screen",
936
+ "none",
937
+ ...scaleSizing()
938
+ ]
939
+ }],
940
+ "max-w": [{
941
+ "max-w": [
942
+ themeContainer,
943
+ "screen",
944
+ "none",
945
+ "prose",
946
+ {
947
+ screen: [themeBreakpoint]
948
+ },
949
+ ...scaleSizing()
950
+ ]
951
+ }],
952
+ h: [{
953
+ h: ["screen", "lh", ...scaleSizing()]
954
+ }],
955
+ "min-h": [{
956
+ "min-h": ["screen", "lh", "none", ...scaleSizing()]
957
+ }],
958
+ "max-h": [{
959
+ "max-h": ["screen", "lh", ...scaleSizing()]
960
+ }],
961
+ "font-size": [{
962
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
963
+ }],
964
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
965
+ "font-style": ["italic", "not-italic"],
966
+ "font-weight": [{
967
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
968
+ }],
969
+ "font-stretch": [{
970
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
971
+ }],
972
+ "font-family": [{
973
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
974
+ }],
975
+ "fvn-normal": ["normal-nums"],
976
+ "fvn-ordinal": ["ordinal"],
977
+ "fvn-slashed-zero": ["slashed-zero"],
978
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
979
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
980
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
981
+ tracking: [{
982
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
983
+ }],
984
+ "line-clamp": [{
985
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
986
+ }],
987
+ leading: [{
988
+ leading: [
989
+ themeLeading,
990
+ ...scaleUnambiguousSpacing()
991
+ ]
992
+ }],
993
+ "list-image": [{
994
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
995
+ }],
996
+ "list-style-position": [{
997
+ list: ["inside", "outside"]
998
+ }],
999
+ "list-style-type": [{
1000
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1001
+ }],
1002
+ "text-alignment": [{
1003
+ text: ["left", "center", "right", "justify", "start", "end"]
1004
+ }],
1005
+ "placeholder-color": [{
1006
+ placeholder: scaleColor()
1007
+ }],
1008
+ "text-color": [{
1009
+ text: scaleColor()
1010
+ }],
1011
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1012
+ "text-decoration-style": [{
1013
+ decoration: [...scaleLineStyle(), "wavy"]
1014
+ }],
1015
+ "text-decoration-thickness": [{
1016
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1017
+ }],
1018
+ "text-decoration-color": [{
1019
+ decoration: scaleColor()
1020
+ }],
1021
+ "underline-offset": [{
1022
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1023
+ }],
1024
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1025
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1026
+ "text-wrap": [{
1027
+ text: ["wrap", "nowrap", "balance", "pretty"]
1028
+ }],
1029
+ indent: [{
1030
+ indent: scaleUnambiguousSpacing()
1031
+ }],
1032
+ "vertical-align": [{
1033
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1034
+ }],
1035
+ whitespace: [{
1036
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1037
+ }],
1038
+ break: [{
1039
+ break: ["normal", "words", "all", "keep"]
1040
+ }],
1041
+ wrap: [{
1042
+ wrap: ["break-word", "anywhere", "normal"]
1043
+ }],
1044
+ hyphens: [{
1045
+ hyphens: ["none", "manual", "auto"]
1046
+ }],
1047
+ content: [{
1048
+ content: ["none", isArbitraryVariable, isArbitraryValue]
1049
+ }],
1050
+ "bg-attachment": [{
1051
+ bg: ["fixed", "local", "scroll"]
1052
+ }],
1053
+ "bg-clip": [{
1054
+ "bg-clip": ["border", "padding", "content", "text"]
1055
+ }],
1056
+ "bg-origin": [{
1057
+ "bg-origin": ["border", "padding", "content"]
1058
+ }],
1059
+ "bg-position": [{
1060
+ bg: scaleBgPosition()
1061
+ }],
1062
+ "bg-repeat": [{
1063
+ bg: scaleBgRepeat()
1064
+ }],
1065
+ "bg-size": [{
1066
+ bg: scaleBgSize()
1067
+ }],
1068
+ "bg-image": [{
1069
+ bg: ["none", {
1070
+ linear: [{
1071
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1072
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
1073
+ radial: ["", isArbitraryVariable, isArbitraryValue],
1074
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1075
+ }, isArbitraryVariableImage, isArbitraryImage]
1076
+ }],
1077
+ "bg-color": [{
1078
+ bg: scaleColor()
1079
+ }],
1080
+ "gradient-from-pos": [{
1081
+ from: scaleGradientStopPosition()
1082
+ }],
1083
+ "gradient-via-pos": [{
1084
+ via: scaleGradientStopPosition()
1085
+ }],
1086
+ "gradient-to-pos": [{
1087
+ to: scaleGradientStopPosition()
1088
+ }],
1089
+ "gradient-from": [{
1090
+ from: scaleColor()
1091
+ }],
1092
+ "gradient-via": [{
1093
+ via: scaleColor()
1094
+ }],
1095
+ "gradient-to": [{
1096
+ to: scaleColor()
1097
+ }],
1098
+ rounded: [{
1099
+ rounded: scaleRadius()
1100
+ }],
1101
+ "rounded-s": [{
1102
+ "rounded-s": scaleRadius()
1103
+ }],
1104
+ "rounded-e": [{
1105
+ "rounded-e": scaleRadius()
1106
+ }],
1107
+ "rounded-t": [{
1108
+ "rounded-t": scaleRadius()
1109
+ }],
1110
+ "rounded-r": [{
1111
+ "rounded-r": scaleRadius()
1112
+ }],
1113
+ "rounded-b": [{
1114
+ "rounded-b": scaleRadius()
1115
+ }],
1116
+ "rounded-l": [{
1117
+ "rounded-l": scaleRadius()
1118
+ }],
1119
+ "rounded-ss": [{
1120
+ "rounded-ss": scaleRadius()
1121
+ }],
1122
+ "rounded-se": [{
1123
+ "rounded-se": scaleRadius()
1124
+ }],
1125
+ "rounded-ee": [{
1126
+ "rounded-ee": scaleRadius()
1127
+ }],
1128
+ "rounded-es": [{
1129
+ "rounded-es": scaleRadius()
1130
+ }],
1131
+ "rounded-tl": [{
1132
+ "rounded-tl": scaleRadius()
1133
+ }],
1134
+ "rounded-tr": [{
1135
+ "rounded-tr": scaleRadius()
1136
+ }],
1137
+ "rounded-br": [{
1138
+ "rounded-br": scaleRadius()
1139
+ }],
1140
+ "rounded-bl": [{
1141
+ "rounded-bl": scaleRadius()
1142
+ }],
1143
+ "border-w": [{
1144
+ border: scaleBorderWidth()
1145
+ }],
1146
+ "border-w-x": [{
1147
+ "border-x": scaleBorderWidth()
1148
+ }],
1149
+ "border-w-y": [{
1150
+ "border-y": scaleBorderWidth()
1151
+ }],
1152
+ "border-w-s": [{
1153
+ "border-s": scaleBorderWidth()
1154
+ }],
1155
+ "border-w-e": [{
1156
+ "border-e": scaleBorderWidth()
1157
+ }],
1158
+ "border-w-t": [{
1159
+ "border-t": scaleBorderWidth()
1160
+ }],
1161
+ "border-w-r": [{
1162
+ "border-r": scaleBorderWidth()
1163
+ }],
1164
+ "border-w-b": [{
1165
+ "border-b": scaleBorderWidth()
1166
+ }],
1167
+ "border-w-l": [{
1168
+ "border-l": scaleBorderWidth()
1169
+ }],
1170
+ "divide-x": [{
1171
+ "divide-x": scaleBorderWidth()
1172
+ }],
1173
+ "divide-x-reverse": ["divide-x-reverse"],
1174
+ "divide-y": [{
1175
+ "divide-y": scaleBorderWidth()
1176
+ }],
1177
+ "divide-y-reverse": ["divide-y-reverse"],
1178
+ "border-style": [{
1179
+ border: [...scaleLineStyle(), "hidden", "none"]
1180
+ }],
1181
+ "divide-style": [{
1182
+ divide: [...scaleLineStyle(), "hidden", "none"]
1183
+ }],
1184
+ "border-color": [{
1185
+ border: scaleColor()
1186
+ }],
1187
+ "border-color-x": [{
1188
+ "border-x": scaleColor()
1189
+ }],
1190
+ "border-color-y": [{
1191
+ "border-y": scaleColor()
1192
+ }],
1193
+ "border-color-s": [{
1194
+ "border-s": scaleColor()
1195
+ }],
1196
+ "border-color-e": [{
1197
+ "border-e": scaleColor()
1198
+ }],
1199
+ "border-color-t": [{
1200
+ "border-t": scaleColor()
1201
+ }],
1202
+ "border-color-r": [{
1203
+ "border-r": scaleColor()
1204
+ }],
1205
+ "border-color-b": [{
1206
+ "border-b": scaleColor()
1207
+ }],
1208
+ "border-color-l": [{
1209
+ "border-l": scaleColor()
1210
+ }],
1211
+ "divide-color": [{
1212
+ divide: scaleColor()
1213
+ }],
1214
+ "outline-style": [{
1215
+ outline: [...scaleLineStyle(), "none", "hidden"]
1216
+ }],
1217
+ "outline-offset": [{
1218
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
1219
+ }],
1220
+ "outline-w": [{
1221
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
1222
+ }],
1223
+ "outline-color": [{
1224
+ outline: scaleColor()
1225
+ }],
1226
+ shadow: [{
1227
+ shadow: [
1228
+ "",
1229
+ "none",
1230
+ themeShadow,
1231
+ isArbitraryVariableShadow,
1232
+ isArbitraryShadow
1233
+ ]
1234
+ }],
1235
+ "shadow-color": [{
1236
+ shadow: scaleColor()
1237
+ }],
1238
+ "inset-shadow": [{
1239
+ "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
1240
+ }],
1241
+ "inset-shadow-color": [{
1242
+ "inset-shadow": scaleColor()
1243
+ }],
1244
+ "ring-w": [{
1245
+ ring: scaleBorderWidth()
1246
+ }],
1247
+ "ring-w-inset": ["ring-inset"],
1248
+ "ring-color": [{
1249
+ ring: scaleColor()
1250
+ }],
1251
+ "ring-offset-w": [{
1252
+ "ring-offset": [isNumber, isArbitraryLength]
1253
+ }],
1254
+ "ring-offset-color": [{
1255
+ "ring-offset": scaleColor()
1256
+ }],
1257
+ "inset-ring-w": [{
1258
+ "inset-ring": scaleBorderWidth()
1259
+ }],
1260
+ "inset-ring-color": [{
1261
+ "inset-ring": scaleColor()
1262
+ }],
1263
+ "text-shadow": [{
1264
+ "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
1265
+ }],
1266
+ "text-shadow-color": [{
1267
+ "text-shadow": scaleColor()
1268
+ }],
1269
+ opacity: [{
1270
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
1271
+ }],
1272
+ "mix-blend": [{
1273
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
1274
+ }],
1275
+ "bg-blend": [{
1276
+ "bg-blend": scaleBlendMode()
1277
+ }],
1278
+ "mask-clip": [{
1279
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
1280
+ }, "mask-no-clip"],
1281
+ "mask-composite": [{
1282
+ mask: ["add", "subtract", "intersect", "exclude"]
1283
+ }],
1284
+ "mask-image-linear-pos": [{
1285
+ "mask-linear": [isNumber]
1286
+ }],
1287
+ "mask-image-linear-from-pos": [{
1288
+ "mask-linear-from": scaleMaskImagePosition()
1289
+ }],
1290
+ "mask-image-linear-to-pos": [{
1291
+ "mask-linear-to": scaleMaskImagePosition()
1292
+ }],
1293
+ "mask-image-linear-from-color": [{
1294
+ "mask-linear-from": scaleColor()
1295
+ }],
1296
+ "mask-image-linear-to-color": [{
1297
+ "mask-linear-to": scaleColor()
1298
+ }],
1299
+ "mask-image-t-from-pos": [{
1300
+ "mask-t-from": scaleMaskImagePosition()
1301
+ }],
1302
+ "mask-image-t-to-pos": [{
1303
+ "mask-t-to": scaleMaskImagePosition()
1304
+ }],
1305
+ "mask-image-t-from-color": [{
1306
+ "mask-t-from": scaleColor()
1307
+ }],
1308
+ "mask-image-t-to-color": [{
1309
+ "mask-t-to": scaleColor()
1310
+ }],
1311
+ "mask-image-r-from-pos": [{
1312
+ "mask-r-from": scaleMaskImagePosition()
1313
+ }],
1314
+ "mask-image-r-to-pos": [{
1315
+ "mask-r-to": scaleMaskImagePosition()
1316
+ }],
1317
+ "mask-image-r-from-color": [{
1318
+ "mask-r-from": scaleColor()
1319
+ }],
1320
+ "mask-image-r-to-color": [{
1321
+ "mask-r-to": scaleColor()
1322
+ }],
1323
+ "mask-image-b-from-pos": [{
1324
+ "mask-b-from": scaleMaskImagePosition()
1325
+ }],
1326
+ "mask-image-b-to-pos": [{
1327
+ "mask-b-to": scaleMaskImagePosition()
1328
+ }],
1329
+ "mask-image-b-from-color": [{
1330
+ "mask-b-from": scaleColor()
1331
+ }],
1332
+ "mask-image-b-to-color": [{
1333
+ "mask-b-to": scaleColor()
1334
+ }],
1335
+ "mask-image-l-from-pos": [{
1336
+ "mask-l-from": scaleMaskImagePosition()
1337
+ }],
1338
+ "mask-image-l-to-pos": [{
1339
+ "mask-l-to": scaleMaskImagePosition()
1340
+ }],
1341
+ "mask-image-l-from-color": [{
1342
+ "mask-l-from": scaleColor()
1343
+ }],
1344
+ "mask-image-l-to-color": [{
1345
+ "mask-l-to": scaleColor()
1346
+ }],
1347
+ "mask-image-x-from-pos": [{
1348
+ "mask-x-from": scaleMaskImagePosition()
1349
+ }],
1350
+ "mask-image-x-to-pos": [{
1351
+ "mask-x-to": scaleMaskImagePosition()
1352
+ }],
1353
+ "mask-image-x-from-color": [{
1354
+ "mask-x-from": scaleColor()
1355
+ }],
1356
+ "mask-image-x-to-color": [{
1357
+ "mask-x-to": scaleColor()
1358
+ }],
1359
+ "mask-image-y-from-pos": [{
1360
+ "mask-y-from": scaleMaskImagePosition()
1361
+ }],
1362
+ "mask-image-y-to-pos": [{
1363
+ "mask-y-to": scaleMaskImagePosition()
1364
+ }],
1365
+ "mask-image-y-from-color": [{
1366
+ "mask-y-from": scaleColor()
1367
+ }],
1368
+ "mask-image-y-to-color": [{
1369
+ "mask-y-to": scaleColor()
1370
+ }],
1371
+ "mask-image-radial": [{
1372
+ "mask-radial": [isArbitraryVariable, isArbitraryValue]
1373
+ }],
1374
+ "mask-image-radial-from-pos": [{
1375
+ "mask-radial-from": scaleMaskImagePosition()
1376
+ }],
1377
+ "mask-image-radial-to-pos": [{
1378
+ "mask-radial-to": scaleMaskImagePosition()
1379
+ }],
1380
+ "mask-image-radial-from-color": [{
1381
+ "mask-radial-from": scaleColor()
1382
+ }],
1383
+ "mask-image-radial-to-color": [{
1384
+ "mask-radial-to": scaleColor()
1385
+ }],
1386
+ "mask-image-radial-shape": [{
1387
+ "mask-radial": ["circle", "ellipse"]
1388
+ }],
1389
+ "mask-image-radial-size": [{
1390
+ "mask-radial": [{
1391
+ closest: ["side", "corner"],
1392
+ farthest: ["side", "corner"]
1393
+ }]
1394
+ }],
1395
+ "mask-image-radial-pos": [{
1396
+ "mask-radial-at": scalePosition()
1397
+ }],
1398
+ "mask-image-conic-pos": [{
1399
+ "mask-conic": [isNumber]
1400
+ }],
1401
+ "mask-image-conic-from-pos": [{
1402
+ "mask-conic-from": scaleMaskImagePosition()
1403
+ }],
1404
+ "mask-image-conic-to-pos": [{
1405
+ "mask-conic-to": scaleMaskImagePosition()
1406
+ }],
1407
+ "mask-image-conic-from-color": [{
1408
+ "mask-conic-from": scaleColor()
1409
+ }],
1410
+ "mask-image-conic-to-color": [{
1411
+ "mask-conic-to": scaleColor()
1412
+ }],
1413
+ "mask-mode": [{
1414
+ mask: ["alpha", "luminance", "match"]
1415
+ }],
1416
+ "mask-origin": [{
1417
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
1418
+ }],
1419
+ "mask-position": [{
1420
+ mask: scaleBgPosition()
1421
+ }],
1422
+ "mask-repeat": [{
1423
+ mask: scaleBgRepeat()
1424
+ }],
1425
+ "mask-size": [{
1426
+ mask: scaleBgSize()
1427
+ }],
1428
+ "mask-type": [{
1429
+ "mask-type": ["alpha", "luminance"]
1430
+ }],
1431
+ "mask-image": [{
1432
+ mask: ["none", isArbitraryVariable, isArbitraryValue]
1433
+ }],
1434
+ filter: [{
1435
+ filter: [
1436
+ "",
1437
+ "none",
1438
+ isArbitraryVariable,
1439
+ isArbitraryValue
1440
+ ]
1441
+ }],
1442
+ blur: [{
1443
+ blur: scaleBlur()
1444
+ }],
1445
+ brightness: [{
1446
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
1447
+ }],
1448
+ contrast: [{
1449
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
1450
+ }],
1451
+ "drop-shadow": [{
1452
+ "drop-shadow": [
1453
+ "",
1454
+ "none",
1455
+ themeDropShadow,
1456
+ isArbitraryVariableShadow,
1457
+ isArbitraryShadow
1458
+ ]
1459
+ }],
1460
+ "drop-shadow-color": [{
1461
+ "drop-shadow": scaleColor()
1462
+ }],
1463
+ grayscale: [{
1464
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1465
+ }],
1466
+ "hue-rotate": [{
1467
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
1468
+ }],
1469
+ invert: [{
1470
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1471
+ }],
1472
+ saturate: [{
1473
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
1474
+ }],
1475
+ sepia: [{
1476
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1477
+ }],
1478
+ "backdrop-filter": [{
1479
+ "backdrop-filter": [
1480
+ "",
1481
+ "none",
1482
+ isArbitraryVariable,
1483
+ isArbitraryValue
1484
+ ]
1485
+ }],
1486
+ "backdrop-blur": [{
1487
+ "backdrop-blur": scaleBlur()
1488
+ }],
1489
+ "backdrop-brightness": [{
1490
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
1491
+ }],
1492
+ "backdrop-contrast": [{
1493
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
1494
+ }],
1495
+ "backdrop-grayscale": [{
1496
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
1497
+ }],
1498
+ "backdrop-hue-rotate": [{
1499
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
1500
+ }],
1501
+ "backdrop-invert": [{
1502
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
1503
+ }],
1504
+ "backdrop-opacity": [{
1505
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
1506
+ }],
1507
+ "backdrop-saturate": [{
1508
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
1509
+ }],
1510
+ "backdrop-sepia": [{
1511
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
1512
+ }],
1513
+ "border-collapse": [{
1514
+ border: ["collapse", "separate"]
1515
+ }],
1516
+ "border-spacing": [{
1517
+ "border-spacing": scaleUnambiguousSpacing()
1518
+ }],
1519
+ "border-spacing-x": [{
1520
+ "border-spacing-x": scaleUnambiguousSpacing()
1521
+ }],
1522
+ "border-spacing-y": [{
1523
+ "border-spacing-y": scaleUnambiguousSpacing()
1524
+ }],
1525
+ "table-layout": [{
1526
+ table: ["auto", "fixed"]
1527
+ }],
1528
+ caption: [{
1529
+ caption: ["top", "bottom"]
1530
+ }],
1531
+ transition: [{
1532
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
1533
+ }],
1534
+ "transition-behavior": [{
1535
+ transition: ["normal", "discrete"]
1536
+ }],
1537
+ duration: [{
1538
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
1539
+ }],
1540
+ ease: [{
1541
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
1542
+ }],
1543
+ delay: [{
1544
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
1545
+ }],
1546
+ animate: [{
1547
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
1548
+ }],
1549
+ backface: [{
1550
+ backface: ["hidden", "visible"]
1551
+ }],
1552
+ perspective: [{
1553
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
1554
+ }],
1555
+ "perspective-origin": [{
1556
+ "perspective-origin": scalePositionWithArbitrary()
1557
+ }],
1558
+ rotate: [{
1559
+ rotate: scaleRotate()
1560
+ }],
1561
+ "rotate-x": [{
1562
+ "rotate-x": scaleRotate()
1563
+ }],
1564
+ "rotate-y": [{
1565
+ "rotate-y": scaleRotate()
1566
+ }],
1567
+ "rotate-z": [{
1568
+ "rotate-z": scaleRotate()
1569
+ }],
1570
+ scale: [{
1571
+ scale: scaleScale()
1572
+ }],
1573
+ "scale-x": [{
1574
+ "scale-x": scaleScale()
1575
+ }],
1576
+ "scale-y": [{
1577
+ "scale-y": scaleScale()
1578
+ }],
1579
+ "scale-z": [{
1580
+ "scale-z": scaleScale()
1581
+ }],
1582
+ "scale-3d": ["scale-3d"],
1583
+ skew: [{
1584
+ skew: scaleSkew()
1585
+ }],
1586
+ "skew-x": [{
1587
+ "skew-x": scaleSkew()
1588
+ }],
1589
+ "skew-y": [{
1590
+ "skew-y": scaleSkew()
1591
+ }],
1592
+ transform: [{
1593
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
1594
+ }],
1595
+ "transform-origin": [{
1596
+ origin: scalePositionWithArbitrary()
1597
+ }],
1598
+ "transform-style": [{
1599
+ transform: ["3d", "flat"]
1600
+ }],
1601
+ translate: [{
1602
+ translate: scaleTranslate()
1603
+ }],
1604
+ "translate-x": [{
1605
+ "translate-x": scaleTranslate()
1606
+ }],
1607
+ "translate-y": [{
1608
+ "translate-y": scaleTranslate()
1609
+ }],
1610
+ "translate-z": [{
1611
+ "translate-z": scaleTranslate()
1612
+ }],
1613
+ "translate-none": ["translate-none"],
1614
+ accent: [{
1615
+ accent: scaleColor()
1616
+ }],
1617
+ appearance: [{
1618
+ appearance: ["none", "auto"]
1619
+ }],
1620
+ "caret-color": [{
1621
+ caret: scaleColor()
1622
+ }],
1623
+ "color-scheme": [{
1624
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
1625
+ }],
1626
+ cursor: [{
1627
+ 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]
1628
+ }],
1629
+ "field-sizing": [{
1630
+ "field-sizing": ["fixed", "content"]
1631
+ }],
1632
+ "pointer-events": [{
1633
+ "pointer-events": ["auto", "none"]
1634
+ }],
1635
+ resize: [{
1636
+ resize: ["none", "", "y", "x"]
1637
+ }],
1638
+ "scroll-behavior": [{
1639
+ scroll: ["auto", "smooth"]
1640
+ }],
1641
+ "scroll-m": [{
1642
+ "scroll-m": scaleUnambiguousSpacing()
1643
+ }],
1644
+ "scroll-mx": [{
1645
+ "scroll-mx": scaleUnambiguousSpacing()
1646
+ }],
1647
+ "scroll-my": [{
1648
+ "scroll-my": scaleUnambiguousSpacing()
1649
+ }],
1650
+ "scroll-ms": [{
1651
+ "scroll-ms": scaleUnambiguousSpacing()
1652
+ }],
1653
+ "scroll-me": [{
1654
+ "scroll-me": scaleUnambiguousSpacing()
1655
+ }],
1656
+ "scroll-mt": [{
1657
+ "scroll-mt": scaleUnambiguousSpacing()
1658
+ }],
1659
+ "scroll-mr": [{
1660
+ "scroll-mr": scaleUnambiguousSpacing()
1661
+ }],
1662
+ "scroll-mb": [{
1663
+ "scroll-mb": scaleUnambiguousSpacing()
1664
+ }],
1665
+ "scroll-ml": [{
1666
+ "scroll-ml": scaleUnambiguousSpacing()
1667
+ }],
1668
+ "scroll-p": [{
1669
+ "scroll-p": scaleUnambiguousSpacing()
1670
+ }],
1671
+ "scroll-px": [{
1672
+ "scroll-px": scaleUnambiguousSpacing()
1673
+ }],
1674
+ "scroll-py": [{
1675
+ "scroll-py": scaleUnambiguousSpacing()
1676
+ }],
1677
+ "scroll-ps": [{
1678
+ "scroll-ps": scaleUnambiguousSpacing()
1679
+ }],
1680
+ "scroll-pe": [{
1681
+ "scroll-pe": scaleUnambiguousSpacing()
1682
+ }],
1683
+ "scroll-pt": [{
1684
+ "scroll-pt": scaleUnambiguousSpacing()
1685
+ }],
1686
+ "scroll-pr": [{
1687
+ "scroll-pr": scaleUnambiguousSpacing()
1688
+ }],
1689
+ "scroll-pb": [{
1690
+ "scroll-pb": scaleUnambiguousSpacing()
1691
+ }],
1692
+ "scroll-pl": [{
1693
+ "scroll-pl": scaleUnambiguousSpacing()
1694
+ }],
1695
+ "snap-align": [{
1696
+ snap: ["start", "end", "center", "align-none"]
1697
+ }],
1698
+ "snap-stop": [{
1699
+ snap: ["normal", "always"]
1700
+ }],
1701
+ "snap-type": [{
1702
+ snap: ["none", "x", "y", "both"]
1703
+ }],
1704
+ "snap-strictness": [{
1705
+ snap: ["mandatory", "proximity"]
1706
+ }],
1707
+ touch: [{
1708
+ touch: ["auto", "none", "manipulation"]
1709
+ }],
1710
+ "touch-x": [{
1711
+ "touch-pan": ["x", "left", "right"]
1712
+ }],
1713
+ "touch-y": [{
1714
+ "touch-pan": ["y", "up", "down"]
1715
+ }],
1716
+ "touch-pz": ["touch-pinch-zoom"],
1717
+ select: [{
1718
+ select: ["none", "text", "all", "auto"]
1719
+ }],
1720
+ "will-change": [{
1721
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
1722
+ }],
1723
+ fill: [{
1724
+ fill: ["none", ...scaleColor()]
1725
+ }],
1726
+ "stroke-w": [{
1727
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
1728
+ }],
1729
+ stroke: [{
1730
+ stroke: ["none", ...scaleColor()]
1731
+ }],
1732
+ "forced-color-adjust": [{
1733
+ "forced-color-adjust": ["auto", "none"]
1734
+ }]
1735
+ },
1736
+ conflictingClassGroups: {
1737
+ overflow: ["overflow-x", "overflow-y"],
1738
+ overscroll: ["overscroll-x", "overscroll-y"],
1739
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
1740
+ "inset-x": ["right", "left"],
1741
+ "inset-y": ["top", "bottom"],
1742
+ flex: ["basis", "grow", "shrink"],
1743
+ gap: ["gap-x", "gap-y"],
1744
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
1745
+ px: ["pr", "pl"],
1746
+ py: ["pt", "pb"],
1747
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
1748
+ mx: ["mr", "ml"],
1749
+ my: ["mt", "mb"],
1750
+ size: ["w", "h"],
1751
+ "font-size": ["leading"],
1752
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
1753
+ "fvn-ordinal": ["fvn-normal"],
1754
+ "fvn-slashed-zero": ["fvn-normal"],
1755
+ "fvn-figure": ["fvn-normal"],
1756
+ "fvn-spacing": ["fvn-normal"],
1757
+ "fvn-fraction": ["fvn-normal"],
1758
+ "line-clamp": ["display", "overflow"],
1759
+ 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"],
1760
+ "rounded-s": ["rounded-ss", "rounded-es"],
1761
+ "rounded-e": ["rounded-se", "rounded-ee"],
1762
+ "rounded-t": ["rounded-tl", "rounded-tr"],
1763
+ "rounded-r": ["rounded-tr", "rounded-br"],
1764
+ "rounded-b": ["rounded-br", "rounded-bl"],
1765
+ "rounded-l": ["rounded-tl", "rounded-bl"],
1766
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
1767
+ "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"],
1768
+ "border-w-x": ["border-w-r", "border-w-l"],
1769
+ "border-w-y": ["border-w-t", "border-w-b"],
1770
+ "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"],
1771
+ "border-color-x": ["border-color-r", "border-color-l"],
1772
+ "border-color-y": ["border-color-t", "border-color-b"],
1773
+ translate: ["translate-x", "translate-y", "translate-none"],
1774
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
1775
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
1776
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
1777
+ "scroll-my": ["scroll-mt", "scroll-mb"],
1778
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
1779
+ "scroll-px": ["scroll-pr", "scroll-pl"],
1780
+ "scroll-py": ["scroll-pt", "scroll-pb"],
1781
+ touch: ["touch-x", "touch-y", "touch-pz"],
1782
+ "touch-x": ["touch"],
1783
+ "touch-y": ["touch"],
1784
+ "touch-pz": ["touch"]
1785
+ },
1786
+ conflictingClassGroupModifiers: {
1787
+ "font-size": ["leading"]
1788
+ },
1789
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
1790
+ };
1791
+ };
1792
+ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
1793
+
1794
+ // src/lib/utils.ts
1795
+ function cn(...inputs) {
1796
+ return twMerge(clsx2(inputs));
1797
+ }
1798
+
1799
+ // src/components/Button.tsx
1800
+ import { jsxDEV } from "react/jsx-dev-runtime";
1801
+ var buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
1802
+ variants: {
1803
+ variant: {
1804
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
1805
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1806
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
1807
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
1808
+ ghost: "hover:bg-accent hover:text-accent-foreground",
1809
+ link: "text-primary underline-offset-4 hover:underline"
1810
+ },
1811
+ size: {
1812
+ default: "h-10 px-4 py-2",
1813
+ sm: "h-9 rounded-md px-3",
1814
+ lg: "h-11 rounded-md px-8",
1815
+ icon: "h-10 w-10"
1816
+ }
1817
+ },
1818
+ defaultVariants: {
1819
+ variant: "default",
1820
+ size: "default"
1821
+ }
1822
+ });
1823
+ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
26
1824
  return /* @__PURE__ */ jsxDEV("button", {
27
- type,
28
- className: cn(baseStyles, variants[variant], sizes[size], className),
29
- ...props,
30
- children
1825
+ className: cn(buttonVariants({ variant, size, className })),
1826
+ ref,
1827
+ ...props
31
1828
  }, undefined, false, undefined, this);
32
- }
1829
+ });
1830
+ Button.displayName = "Button";
33
1831
  // src/components/Input.tsx
1832
+ import * as React2 from "react";
34
1833
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
35
- function cn2(...classes) {
36
- return classes.filter(Boolean).join(" ");
37
- }
38
- function Input({
39
- type = "text",
40
- className = "",
41
- error,
42
- label,
43
- ...props
44
- }) {
45
- return /* @__PURE__ */ jsxDEV2("div", {
46
- className: "w-full",
47
- children: [
48
- label && /* @__PURE__ */ jsxDEV2("label", {
49
- className: "block text-sm font-medium text-gray-700 mb-1",
50
- children: label
51
- }, undefined, false, undefined, this),
52
- /* @__PURE__ */ jsxDEV2("input", {
53
- type,
54
- className: cn2("flex h-10 w-full rounded-md border border-gray-300 bg-transparent px-3 py-2 text-sm placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:cursor-not-allowed disabled:opacity-50", error && "border-red-500 focus:ring-red-500", className),
55
- ...props
56
- }, undefined, false, undefined, this),
57
- error && /* @__PURE__ */ jsxDEV2("p", {
58
- className: "mt-1 text-xs text-red-500",
59
- children: error
60
- }, undefined, false, undefined, this)
61
- ]
62
- }, undefined, true, undefined, this);
63
- }
64
- // src/components/Modal.tsx
65
- import { jsxDEV as jsxDEV3, Fragment } from "react/jsx-dev-runtime";
66
- function cn3(...classes) {
67
- return classes.filter(Boolean).join(" ");
68
- }
69
- function Modal({ id, title, children, className, triggerLabel }) {
70
- return /* @__PURE__ */ jsxDEV3(Fragment, {
71
- children: [
72
- triggerLabel && /* @__PURE__ */ jsxDEV3("button", {
73
- onClick: () => document.getElementById(id)?.showModal(),
74
- className: "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2",
75
- children: triggerLabel
76
- }, undefined, false, undefined, this),
77
- /* @__PURE__ */ jsxDEV3("dialog", {
78
- id,
79
- className: cn3("p-0 backdrop:bg-black/50 backdrop:backdrop-blur-sm rounded-lg shadow-xl min-w-[300px] open:animate-in open:fade-in open:zoom-in-95 backdrop:animate-in backdrop:fade-in", className),
80
- children: /* @__PURE__ */ jsxDEV3("div", {
81
- className: "p-6",
82
- children: [
83
- /* @__PURE__ */ jsxDEV3("div", {
84
- className: "flex items-center justify-between mb-4",
85
- children: [
86
- title && /* @__PURE__ */ jsxDEV3("h3", {
87
- className: "text-lg font-semibold",
88
- children: title
89
- }, undefined, false, undefined, this),
90
- /* @__PURE__ */ jsxDEV3("form", {
91
- method: "dialog",
92
- children: /* @__PURE__ */ jsxDEV3("button", {
93
- className: "text-gray-400 hover:text-gray-500",
94
- children: [
95
- /* @__PURE__ */ jsxDEV3("span", {
96
- className: "sr-only",
97
- children: "Close"
98
- }, undefined, false, undefined, this),
99
- /* @__PURE__ */ jsxDEV3("svg", {
100
- className: "h-6 w-6",
101
- fill: "none",
102
- viewBox: "0 0 24 24",
103
- strokeWidth: "1.5",
104
- stroke: "currentColor",
105
- children: /* @__PURE__ */ jsxDEV3("path", {
106
- strokeLinecap: "round",
107
- strokeLinejoin: "round",
108
- d: "M6 18L18 6M6 6l12 12"
109
- }, undefined, false, undefined, this)
110
- }, undefined, false, undefined, this)
111
- ]
112
- }, undefined, true, undefined, this)
113
- }, undefined, false, undefined, this)
114
- ]
115
- }, undefined, true, undefined, this),
116
- /* @__PURE__ */ jsxDEV3("div", {
117
- children
118
- }, undefined, false, undefined, this)
119
- ]
120
- }, undefined, true, undefined, this)
121
- }, undefined, false, undefined, this)
122
- ]
123
- }, undefined, true, undefined, this);
1834
+ var Input = React2.forwardRef(({ className, type, ...props }, ref) => {
1835
+ return /* @__PURE__ */ jsxDEV2("input", {
1836
+ type,
1837
+ className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
1838
+ ref,
1839
+ ...props
1840
+ }, undefined, false, undefined, this);
1841
+ });
1842
+ Input.displayName = "Input";
1843
+ // src/components/Badge.tsx
1844
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
1845
+ var badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
1846
+ variants: {
1847
+ variant: {
1848
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
1849
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
1850
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
1851
+ outline: "text-foreground"
1852
+ }
1853
+ },
1854
+ defaultVariants: {
1855
+ variant: "default"
1856
+ }
1857
+ });
1858
+ function Badge({ className, variant, ...props }) {
1859
+ return /* @__PURE__ */ jsxDEV3("div", {
1860
+ className: cn(badgeVariants({ variant }), className),
1861
+ ...props
1862
+ }, undefined, false, undefined, this);
124
1863
  }
1864
+ // src/components/Label.tsx
1865
+ import * as React3 from "react";
1866
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
1867
+ var labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
1868
+ var Label = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV4("label", {
1869
+ ref,
1870
+ className: cn(labelVariants(), className),
1871
+ ...props
1872
+ }, undefined, false, undefined, this));
1873
+ Label.displayName = "Label";
1874
+ // src/components/Card.tsx
1875
+ import * as React4 from "react";
1876
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
1877
+ var Card = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV5("div", {
1878
+ ref,
1879
+ className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className),
1880
+ ...props
1881
+ }, undefined, false, undefined, this));
1882
+ Card.displayName = "Card";
1883
+ var CardHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV5("div", {
1884
+ ref,
1885
+ className: cn("flex flex-col space-y-1.5 p-6", className),
1886
+ ...props
1887
+ }, undefined, false, undefined, this));
1888
+ CardHeader.displayName = "CardHeader";
1889
+ var CardTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV5("h3", {
1890
+ ref,
1891
+ className: cn("text-2xl font-semibold leading-none tracking-tight", className),
1892
+ ...props
1893
+ }, undefined, false, undefined, this));
1894
+ CardTitle.displayName = "CardTitle";
1895
+ var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV5("p", {
1896
+ ref,
1897
+ className: cn("text-sm text-muted-foreground", className),
1898
+ ...props
1899
+ }, undefined, false, undefined, this));
1900
+ CardDescription.displayName = "CardDescription";
1901
+ var CardContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV5("div", {
1902
+ ref,
1903
+ className: cn("p-6 pt-0", className),
1904
+ ...props
1905
+ }, undefined, false, undefined, this));
1906
+ CardContent.displayName = "CardContent";
1907
+ var CardFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV5("div", {
1908
+ ref,
1909
+ className: cn("flex items-center p-6 pt-0", className),
1910
+ ...props
1911
+ }, undefined, false, undefined, this));
1912
+ CardFooter.displayName = "CardFooter";
1913
+ // src/components/Alert.tsx
1914
+ import * as React5 from "react";
1915
+ import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
1916
+ var alertVariants = cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
1917
+ variants: {
1918
+ variant: {
1919
+ default: "bg-background text-foreground",
1920
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
1921
+ }
1922
+ },
1923
+ defaultVariants: {
1924
+ variant: "default"
1925
+ }
1926
+ });
1927
+ var Alert = React5.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxDEV6("div", {
1928
+ ref,
1929
+ role: "alert",
1930
+ className: cn(alertVariants({ variant }), className),
1931
+ ...props
1932
+ }, undefined, false, undefined, this));
1933
+ Alert.displayName = "Alert";
1934
+ var AlertTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV6("h5", {
1935
+ ref,
1936
+ className: cn("mb-1 font-medium leading-none tracking-tight", className),
1937
+ ...props
1938
+ }, undefined, false, undefined, this));
1939
+ AlertTitle.displayName = "AlertTitle";
1940
+ var AlertDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV6("div", {
1941
+ ref,
1942
+ className: cn("text-sm [&_p]:leading-relaxed", className),
1943
+ ...props
1944
+ }, undefined, false, undefined, this));
1945
+ AlertDescription.displayName = "AlertDescription";
1946
+ // src/components/Table.tsx
1947
+ import * as React6 from "react";
1948
+ import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
1949
+ var Table = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("div", {
1950
+ className: "relative w-full overflow-auto",
1951
+ children: /* @__PURE__ */ jsxDEV7("table", {
1952
+ ref,
1953
+ className: cn("w-full caption-bottom text-sm", className),
1954
+ ...props
1955
+ }, undefined, false, undefined, this)
1956
+ }, undefined, false, undefined, this));
1957
+ Table.displayName = "Table";
1958
+ var TableHeader = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("thead", {
1959
+ ref,
1960
+ className: cn("[&_tr]:border-b", className),
1961
+ ...props
1962
+ }, undefined, false, undefined, this));
1963
+ TableHeader.displayName = "TableHeader";
1964
+ var TableBody = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("tbody", {
1965
+ ref,
1966
+ className: cn("[&_tr:last-child]:border-0", className),
1967
+ ...props
1968
+ }, undefined, false, undefined, this));
1969
+ TableBody.displayName = "TableBody";
1970
+ var TableFooter = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("tfoot", {
1971
+ ref,
1972
+ className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
1973
+ ...props
1974
+ }, undefined, false, undefined, this));
1975
+ TableFooter.displayName = "TableFooter";
1976
+ var TableRow = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("tr", {
1977
+ ref,
1978
+ className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
1979
+ ...props
1980
+ }, undefined, false, undefined, this));
1981
+ TableRow.displayName = "TableRow";
1982
+ var TableHead = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("th", {
1983
+ ref,
1984
+ className: cn("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", className),
1985
+ ...props
1986
+ }, undefined, false, undefined, this));
1987
+ TableHead.displayName = "TableHead";
1988
+ var TableCell = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("td", {
1989
+ ref,
1990
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
1991
+ ...props
1992
+ }, undefined, false, undefined, this));
1993
+ TableCell.displayName = "TableCell";
1994
+ var TableCaption = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxDEV7("caption", {
1995
+ ref,
1996
+ className: cn("mt-4 text-sm text-muted-foreground", className),
1997
+ ...props
1998
+ }, undefined, false, undefined, this));
1999
+ TableCaption.displayName = "TableCaption";
125
2000
  export {
126
- Modal,
2001
+ cn,
2002
+ buttonVariants,
2003
+ badgeVariants,
2004
+ TableRow,
2005
+ TableHeader,
2006
+ TableHead,
2007
+ TableFooter,
2008
+ TableCell,
2009
+ TableCaption,
2010
+ TableBody,
2011
+ Table,
2012
+ Label,
127
2013
  Input,
128
- Button
2014
+ CardTitle,
2015
+ CardHeader,
2016
+ CardFooter,
2017
+ CardDescription,
2018
+ CardContent,
2019
+ Card,
2020
+ Button,
2021
+ Badge,
2022
+ AlertTitle,
2023
+ AlertDescription,
2024
+ Alert
129
2025
  };