@enonic/ui 0.1.0

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