@bezdenegsvarkinet/ui-library 0.2.2 → 0.3.0

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