@kittycad/react-shared 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2548 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import React from 'react';
3
+
4
+ function styleInject(css, ref) {
5
+ if ( ref === void 0 ) ref = {};
6
+ var insertAt = ref.insertAt;
7
+
8
+ if (typeof document === 'undefined') { return; }
9
+
10
+ var head = document.head || document.getElementsByTagName('head')[0];
11
+ var style = document.createElement('style');
12
+ style.type = 'text/css';
13
+
14
+ if (insertAt === 'top') {
15
+ if (head.firstChild) {
16
+ head.insertBefore(style, head.firstChild);
17
+ } else {
18
+ head.appendChild(style);
19
+ }
20
+ } else {
21
+ head.appendChild(style);
22
+ }
23
+
24
+ if (style.styleSheet) {
25
+ style.styleSheet.cssText = css;
26
+ } else {
27
+ style.appendChild(document.createTextNode(css));
28
+ }
29
+ }
30
+
31
+ var css_248z = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:Fira Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.inline-flex{display:inline-flex}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-8{height:2rem}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-primary-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-primary-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.outline{outline-style:solid}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\\:bg-primary-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-50:disabled{opacity:.5}";
32
+ styleInject(css_248z,{"insertAt":"top"});
33
+
34
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
35
+
36
+ const CLASS_PART_SEPARATOR = '-';
37
+ const createClassGroupUtils = config => {
38
+ const classMap = createClassMap(config);
39
+ const {
40
+ conflictingClassGroups,
41
+ conflictingClassGroupModifiers
42
+ } = config;
43
+ const getClassGroupId = className => {
44
+ const classParts = className.split(CLASS_PART_SEPARATOR);
45
+ // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.
46
+ if (classParts[0] === '' && classParts.length !== 1) {
47
+ classParts.shift();
48
+ }
49
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
50
+ };
51
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
52
+ const conflicts = conflictingClassGroups[classGroupId] || [];
53
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
54
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
55
+ }
56
+ return conflicts;
57
+ };
58
+ return {
59
+ getClassGroupId,
60
+ getConflictingClassGroupIds
61
+ };
62
+ };
63
+ const getGroupRecursive = (classParts, classPartObject) => {
64
+ if (classParts.length === 0) {
65
+ return classPartObject.classGroupId;
66
+ }
67
+ const currentClassPart = classParts[0];
68
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
69
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
70
+ if (classGroupFromNextClassPart) {
71
+ return classGroupFromNextClassPart;
72
+ }
73
+ if (classPartObject.validators.length === 0) {
74
+ return undefined;
75
+ }
76
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
77
+ return classPartObject.validators.find(({
78
+ validator
79
+ }) => validator(classRest))?.classGroupId;
80
+ };
81
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
82
+ const getGroupIdForArbitraryProperty = className => {
83
+ if (arbitraryPropertyRegex.test(className)) {
84
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
85
+ const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
86
+ if (property) {
87
+ // I use two dots here because one dot is used as prefix for class groups in plugins
88
+ return 'arbitrary..' + property;
89
+ }
90
+ }
91
+ };
92
+ /**
93
+ * Exported for testing only
94
+ */
95
+ const createClassMap = config => {
96
+ const {
97
+ theme,
98
+ prefix
99
+ } = config;
100
+ const classMap = {
101
+ nextPart: new Map(),
102
+ validators: []
103
+ };
104
+ const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
105
+ prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
106
+ processClassesRecursively(classGroup, classMap, classGroupId, theme);
107
+ });
108
+ return classMap;
109
+ };
110
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
111
+ classGroup.forEach(classDefinition => {
112
+ if (typeof classDefinition === 'string') {
113
+ const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
114
+ classPartObjectToEdit.classGroupId = classGroupId;
115
+ return;
116
+ }
117
+ if (typeof classDefinition === 'function') {
118
+ if (isThemeGetter(classDefinition)) {
119
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
120
+ return;
121
+ }
122
+ classPartObject.validators.push({
123
+ validator: classDefinition,
124
+ classGroupId
125
+ });
126
+ return;
127
+ }
128
+ Object.entries(classDefinition).forEach(([key, classGroup]) => {
129
+ processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
130
+ });
131
+ });
132
+ };
133
+ const getPart = (classPartObject, path) => {
134
+ let currentClassPartObject = classPartObject;
135
+ path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
136
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
137
+ currentClassPartObject.nextPart.set(pathPart, {
138
+ nextPart: new Map(),
139
+ validators: []
140
+ });
141
+ }
142
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
143
+ });
144
+ return currentClassPartObject;
145
+ };
146
+ const isThemeGetter = func => func.isThemeGetter;
147
+ const getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
148
+ if (!prefix) {
149
+ return classGroupEntries;
150
+ }
151
+ return classGroupEntries.map(([classGroupId, classGroup]) => {
152
+ const prefixedClassGroup = classGroup.map(classDefinition => {
153
+ if (typeof classDefinition === 'string') {
154
+ return prefix + classDefinition;
155
+ }
156
+ if (typeof classDefinition === 'object') {
157
+ return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
158
+ }
159
+ return classDefinition;
160
+ });
161
+ return [classGroupId, prefixedClassGroup];
162
+ });
163
+ };
164
+
165
+ // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
166
+ const createLruCache = maxCacheSize => {
167
+ if (maxCacheSize < 1) {
168
+ return {
169
+ get: () => undefined,
170
+ set: () => {}
171
+ };
172
+ }
173
+ let cacheSize = 0;
174
+ let cache = new Map();
175
+ let previousCache = new Map();
176
+ const update = (key, value) => {
177
+ cache.set(key, value);
178
+ cacheSize++;
179
+ if (cacheSize > maxCacheSize) {
180
+ cacheSize = 0;
181
+ previousCache = cache;
182
+ cache = new Map();
183
+ }
184
+ };
185
+ return {
186
+ get(key) {
187
+ let value = cache.get(key);
188
+ if (value !== undefined) {
189
+ return value;
190
+ }
191
+ if ((value = previousCache.get(key)) !== undefined) {
192
+ update(key, value);
193
+ return value;
194
+ }
195
+ },
196
+ set(key, value) {
197
+ if (cache.has(key)) {
198
+ cache.set(key, value);
199
+ } else {
200
+ update(key, value);
201
+ }
202
+ }
203
+ };
204
+ };
205
+ const IMPORTANT_MODIFIER = '!';
206
+ const createParseClassName = config => {
207
+ const {
208
+ separator,
209
+ experimentalParseClassName
210
+ } = config;
211
+ const isSeparatorSingleCharacter = separator.length === 1;
212
+ const firstSeparatorCharacter = separator[0];
213
+ const separatorLength = separator.length;
214
+ // parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
215
+ const parseClassName = className => {
216
+ const modifiers = [];
217
+ let bracketDepth = 0;
218
+ let modifierStart = 0;
219
+ let postfixModifierPosition;
220
+ for (let index = 0; index < className.length; index++) {
221
+ let currentCharacter = className[index];
222
+ if (bracketDepth === 0) {
223
+ if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
224
+ modifiers.push(className.slice(modifierStart, index));
225
+ modifierStart = index + separatorLength;
226
+ continue;
227
+ }
228
+ if (currentCharacter === '/') {
229
+ postfixModifierPosition = index;
230
+ continue;
231
+ }
232
+ }
233
+ if (currentCharacter === '[') {
234
+ bracketDepth++;
235
+ } else if (currentCharacter === ']') {
236
+ bracketDepth--;
237
+ }
238
+ }
239
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
240
+ const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
241
+ const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
242
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
243
+ return {
244
+ modifiers,
245
+ hasImportantModifier,
246
+ baseClassName,
247
+ maybePostfixModifierPosition
248
+ };
249
+ };
250
+ if (experimentalParseClassName) {
251
+ return className => experimentalParseClassName({
252
+ className,
253
+ parseClassName
254
+ });
255
+ }
256
+ return parseClassName;
257
+ };
258
+ /**
259
+ * Sorts modifiers according to following schema:
260
+ * - Predefined modifiers are sorted alphabetically
261
+ * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
262
+ */
263
+ const sortModifiers = modifiers => {
264
+ if (modifiers.length <= 1) {
265
+ return modifiers;
266
+ }
267
+ const sortedModifiers = [];
268
+ let unsortedModifiers = [];
269
+ modifiers.forEach(modifier => {
270
+ const isArbitraryVariant = modifier[0] === '[';
271
+ if (isArbitraryVariant) {
272
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
273
+ unsortedModifiers = [];
274
+ } else {
275
+ unsortedModifiers.push(modifier);
276
+ }
277
+ });
278
+ sortedModifiers.push(...unsortedModifiers.sort());
279
+ return sortedModifiers;
280
+ };
281
+ const createConfigUtils = config => ({
282
+ cache: createLruCache(config.cacheSize),
283
+ parseClassName: createParseClassName(config),
284
+ ...createClassGroupUtils(config)
285
+ });
286
+ const SPLIT_CLASSES_REGEX = /\s+/;
287
+ const mergeClassList = (classList, configUtils) => {
288
+ const {
289
+ parseClassName,
290
+ getClassGroupId,
291
+ getConflictingClassGroupIds
292
+ } = configUtils;
293
+ /**
294
+ * Set of classGroupIds in following format:
295
+ * `{importantModifier}{variantModifiers}{classGroupId}`
296
+ * @example 'float'
297
+ * @example 'hover:focus:bg-color'
298
+ * @example 'md:!pr'
299
+ */
300
+ const classGroupsInConflict = [];
301
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
302
+ let result = '';
303
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
304
+ const originalClassName = classNames[index];
305
+ const {
306
+ modifiers,
307
+ hasImportantModifier,
308
+ baseClassName,
309
+ maybePostfixModifierPosition
310
+ } = parseClassName(originalClassName);
311
+ let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
312
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
313
+ if (!classGroupId) {
314
+ if (!hasPostfixModifier) {
315
+ // Not a Tailwind class
316
+ result = originalClassName + (result.length > 0 ? ' ' + result : result);
317
+ continue;
318
+ }
319
+ classGroupId = getClassGroupId(baseClassName);
320
+ if (!classGroupId) {
321
+ // Not a Tailwind class
322
+ result = originalClassName + (result.length > 0 ? ' ' + result : result);
323
+ continue;
324
+ }
325
+ hasPostfixModifier = false;
326
+ }
327
+ const variantModifier = sortModifiers(modifiers).join(':');
328
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
329
+ const classId = modifierId + classGroupId;
330
+ if (classGroupsInConflict.includes(classId)) {
331
+ // Tailwind class omitted due to conflict
332
+ continue;
333
+ }
334
+ classGroupsInConflict.push(classId);
335
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
336
+ for (let i = 0; i < conflictGroups.length; ++i) {
337
+ const group = conflictGroups[i];
338
+ classGroupsInConflict.push(modifierId + group);
339
+ }
340
+ // Tailwind class not in conflict
341
+ result = originalClassName + (result.length > 0 ? ' ' + result : result);
342
+ }
343
+ return result;
344
+ };
345
+
346
+ /**
347
+ * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
348
+ *
349
+ * Specifically:
350
+ * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
351
+ * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
352
+ *
353
+ * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
354
+ */
355
+ function twJoin() {
356
+ let index = 0;
357
+ let argument;
358
+ let resolvedValue;
359
+ let string = '';
360
+ while (index < arguments.length) {
361
+ if (argument = arguments[index++]) {
362
+ if (resolvedValue = toValue(argument)) {
363
+ string && (string += ' ');
364
+ string += resolvedValue;
365
+ }
366
+ }
367
+ }
368
+ return string;
369
+ }
370
+ const toValue = mix => {
371
+ if (typeof mix === 'string') {
372
+ return mix;
373
+ }
374
+ let resolvedValue;
375
+ let string = '';
376
+ for (let k = 0; k < mix.length; k++) {
377
+ if (mix[k]) {
378
+ if (resolvedValue = toValue(mix[k])) {
379
+ string && (string += ' ');
380
+ string += resolvedValue;
381
+ }
382
+ }
383
+ }
384
+ return string;
385
+ };
386
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
387
+ let configUtils;
388
+ let cacheGet;
389
+ let cacheSet;
390
+ let functionToCall = initTailwindMerge;
391
+ function initTailwindMerge(classList) {
392
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
393
+ configUtils = createConfigUtils(config);
394
+ cacheGet = configUtils.cache.get;
395
+ cacheSet = configUtils.cache.set;
396
+ functionToCall = tailwindMerge;
397
+ return tailwindMerge(classList);
398
+ }
399
+ function tailwindMerge(classList) {
400
+ const cachedResult = cacheGet(classList);
401
+ if (cachedResult) {
402
+ return cachedResult;
403
+ }
404
+ const result = mergeClassList(classList, configUtils);
405
+ cacheSet(classList, result);
406
+ return result;
407
+ }
408
+ return function callTailwindMerge() {
409
+ return functionToCall(twJoin.apply(null, arguments));
410
+ };
411
+ }
412
+ const fromTheme = key => {
413
+ const themeGetter = theme => theme[key] || [];
414
+ themeGetter.isThemeGetter = true;
415
+ return themeGetter;
416
+ };
417
+ const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
418
+ const fractionRegex = /^\d+\/\d+$/;
419
+ const stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);
420
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
421
+ 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$/;
422
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
423
+ // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
424
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
425
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
426
+ const isLength = value => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
427
+ const isArbitraryLength = value => getIsArbitraryValue(value, 'length', isLengthOnly);
428
+ const isNumber = value => Boolean(value) && !Number.isNaN(Number(value));
429
+ const isArbitraryNumber = value => getIsArbitraryValue(value, 'number', isNumber);
430
+ const isInteger = value => Boolean(value) && Number.isInteger(Number(value));
431
+ const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
432
+ const isArbitraryValue = value => arbitraryValueRegex.test(value);
433
+ const isTshirtSize = value => tshirtUnitRegex.test(value);
434
+ const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
435
+ const isArbitrarySize = value => getIsArbitraryValue(value, sizeLabels, isNever);
436
+ const isArbitraryPosition = value => getIsArbitraryValue(value, 'position', isNever);
437
+ const imageLabels = /*#__PURE__*/new Set(['image', 'url']);
438
+ const isArbitraryImage = value => getIsArbitraryValue(value, imageLabels, isImage);
439
+ const isArbitraryShadow = value => getIsArbitraryValue(value, '', isShadow);
440
+ const isAny = () => true;
441
+ const getIsArbitraryValue = (value, label, testValue) => {
442
+ const result = arbitraryValueRegex.exec(value);
443
+ if (result) {
444
+ if (result[1]) {
445
+ return typeof label === 'string' ? result[1] === label : label.has(result[1]);
446
+ }
447
+ return testValue(result[2]);
448
+ }
449
+ return false;
450
+ };
451
+ const isLengthOnly = value =>
452
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
453
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
454
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
455
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
456
+ const isNever = () => false;
457
+ const isShadow = value => shadowRegex.test(value);
458
+ const isImage = value => imageRegex.test(value);
459
+ const getDefaultConfig = () => {
460
+ const colors = fromTheme('colors');
461
+ const spacing = fromTheme('spacing');
462
+ const blur = fromTheme('blur');
463
+ const brightness = fromTheme('brightness');
464
+ const borderColor = fromTheme('borderColor');
465
+ const borderRadius = fromTheme('borderRadius');
466
+ const borderSpacing = fromTheme('borderSpacing');
467
+ const borderWidth = fromTheme('borderWidth');
468
+ const contrast = fromTheme('contrast');
469
+ const grayscale = fromTheme('grayscale');
470
+ const hueRotate = fromTheme('hueRotate');
471
+ const invert = fromTheme('invert');
472
+ const gap = fromTheme('gap');
473
+ const gradientColorStops = fromTheme('gradientColorStops');
474
+ const gradientColorStopPositions = fromTheme('gradientColorStopPositions');
475
+ const inset = fromTheme('inset');
476
+ const margin = fromTheme('margin');
477
+ const opacity = fromTheme('opacity');
478
+ const padding = fromTheme('padding');
479
+ const saturate = fromTheme('saturate');
480
+ const scale = fromTheme('scale');
481
+ const sepia = fromTheme('sepia');
482
+ const skew = fromTheme('skew');
483
+ const space = fromTheme('space');
484
+ const translate = fromTheme('translate');
485
+ const getOverscroll = () => ['auto', 'contain', 'none'];
486
+ const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
487
+ const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing];
488
+ const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
489
+ const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength];
490
+ const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue];
491
+ const getPositions = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
492
+ const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none'];
493
+ const getBlendModes = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
494
+ const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];
495
+ const getZeroAndEmpty = () => ['', '0', isArbitraryValue];
496
+ const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
497
+ const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
498
+ return {
499
+ cacheSize: 500,
500
+ separator: ':',
501
+ theme: {
502
+ colors: [isAny],
503
+ spacing: [isLength, isArbitraryLength],
504
+ blur: ['none', '', isTshirtSize, isArbitraryValue],
505
+ brightness: getNumberAndArbitrary(),
506
+ borderColor: [colors],
507
+ borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue],
508
+ borderSpacing: getSpacingWithArbitrary(),
509
+ borderWidth: getLengthWithEmptyAndArbitrary(),
510
+ contrast: getNumberAndArbitrary(),
511
+ grayscale: getZeroAndEmpty(),
512
+ hueRotate: getNumberAndArbitrary(),
513
+ invert: getZeroAndEmpty(),
514
+ gap: getSpacingWithArbitrary(),
515
+ gradientColorStops: [colors],
516
+ gradientColorStopPositions: [isPercent, isArbitraryLength],
517
+ inset: getSpacingWithAutoAndArbitrary(),
518
+ margin: getSpacingWithAutoAndArbitrary(),
519
+ opacity: getNumberAndArbitrary(),
520
+ padding: getSpacingWithArbitrary(),
521
+ saturate: getNumberAndArbitrary(),
522
+ scale: getNumberAndArbitrary(),
523
+ sepia: getZeroAndEmpty(),
524
+ skew: getNumberAndArbitrary(),
525
+ space: getSpacingWithArbitrary(),
526
+ translate: getSpacingWithArbitrary()
527
+ },
528
+ classGroups: {
529
+ // Layout
530
+ /**
531
+ * Aspect Ratio
532
+ * @see https://tailwindcss.com/docs/aspect-ratio
533
+ */
534
+ aspect: [{
535
+ aspect: ['auto', 'square', 'video', isArbitraryValue]
536
+ }],
537
+ /**
538
+ * Container
539
+ * @see https://tailwindcss.com/docs/container
540
+ */
541
+ container: ['container'],
542
+ /**
543
+ * Columns
544
+ * @see https://tailwindcss.com/docs/columns
545
+ */
546
+ columns: [{
547
+ columns: [isTshirtSize]
548
+ }],
549
+ /**
550
+ * Break After
551
+ * @see https://tailwindcss.com/docs/break-after
552
+ */
553
+ 'break-after': [{
554
+ 'break-after': getBreaks()
555
+ }],
556
+ /**
557
+ * Break Before
558
+ * @see https://tailwindcss.com/docs/break-before
559
+ */
560
+ 'break-before': [{
561
+ 'break-before': getBreaks()
562
+ }],
563
+ /**
564
+ * Break Inside
565
+ * @see https://tailwindcss.com/docs/break-inside
566
+ */
567
+ 'break-inside': [{
568
+ 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']
569
+ }],
570
+ /**
571
+ * Box Decoration Break
572
+ * @see https://tailwindcss.com/docs/box-decoration-break
573
+ */
574
+ 'box-decoration': [{
575
+ 'box-decoration': ['slice', 'clone']
576
+ }],
577
+ /**
578
+ * Box Sizing
579
+ * @see https://tailwindcss.com/docs/box-sizing
580
+ */
581
+ box: [{
582
+ box: ['border', 'content']
583
+ }],
584
+ /**
585
+ * Display
586
+ * @see https://tailwindcss.com/docs/display
587
+ */
588
+ 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'],
589
+ /**
590
+ * Floats
591
+ * @see https://tailwindcss.com/docs/float
592
+ */
593
+ float: [{
594
+ float: ['right', 'left', 'none', 'start', 'end']
595
+ }],
596
+ /**
597
+ * Clear
598
+ * @see https://tailwindcss.com/docs/clear
599
+ */
600
+ clear: [{
601
+ clear: ['left', 'right', 'both', 'none', 'start', 'end']
602
+ }],
603
+ /**
604
+ * Isolation
605
+ * @see https://tailwindcss.com/docs/isolation
606
+ */
607
+ isolation: ['isolate', 'isolation-auto'],
608
+ /**
609
+ * Object Fit
610
+ * @see https://tailwindcss.com/docs/object-fit
611
+ */
612
+ 'object-fit': [{
613
+ object: ['contain', 'cover', 'fill', 'none', 'scale-down']
614
+ }],
615
+ /**
616
+ * Object Position
617
+ * @see https://tailwindcss.com/docs/object-position
618
+ */
619
+ 'object-position': [{
620
+ object: [...getPositions(), isArbitraryValue]
621
+ }],
622
+ /**
623
+ * Overflow
624
+ * @see https://tailwindcss.com/docs/overflow
625
+ */
626
+ overflow: [{
627
+ overflow: getOverflow()
628
+ }],
629
+ /**
630
+ * Overflow X
631
+ * @see https://tailwindcss.com/docs/overflow
632
+ */
633
+ 'overflow-x': [{
634
+ 'overflow-x': getOverflow()
635
+ }],
636
+ /**
637
+ * Overflow Y
638
+ * @see https://tailwindcss.com/docs/overflow
639
+ */
640
+ 'overflow-y': [{
641
+ 'overflow-y': getOverflow()
642
+ }],
643
+ /**
644
+ * Overscroll Behavior
645
+ * @see https://tailwindcss.com/docs/overscroll-behavior
646
+ */
647
+ overscroll: [{
648
+ overscroll: getOverscroll()
649
+ }],
650
+ /**
651
+ * Overscroll Behavior X
652
+ * @see https://tailwindcss.com/docs/overscroll-behavior
653
+ */
654
+ 'overscroll-x': [{
655
+ 'overscroll-x': getOverscroll()
656
+ }],
657
+ /**
658
+ * Overscroll Behavior Y
659
+ * @see https://tailwindcss.com/docs/overscroll-behavior
660
+ */
661
+ 'overscroll-y': [{
662
+ 'overscroll-y': getOverscroll()
663
+ }],
664
+ /**
665
+ * Position
666
+ * @see https://tailwindcss.com/docs/position
667
+ */
668
+ position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
669
+ /**
670
+ * Top / Right / Bottom / Left
671
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
672
+ */
673
+ inset: [{
674
+ inset: [inset]
675
+ }],
676
+ /**
677
+ * Right / Left
678
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
679
+ */
680
+ 'inset-x': [{
681
+ 'inset-x': [inset]
682
+ }],
683
+ /**
684
+ * Top / Bottom
685
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
686
+ */
687
+ 'inset-y': [{
688
+ 'inset-y': [inset]
689
+ }],
690
+ /**
691
+ * Start
692
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
693
+ */
694
+ start: [{
695
+ start: [inset]
696
+ }],
697
+ /**
698
+ * End
699
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
700
+ */
701
+ end: [{
702
+ end: [inset]
703
+ }],
704
+ /**
705
+ * Top
706
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
707
+ */
708
+ top: [{
709
+ top: [inset]
710
+ }],
711
+ /**
712
+ * Right
713
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
714
+ */
715
+ right: [{
716
+ right: [inset]
717
+ }],
718
+ /**
719
+ * Bottom
720
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
721
+ */
722
+ bottom: [{
723
+ bottom: [inset]
724
+ }],
725
+ /**
726
+ * Left
727
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
728
+ */
729
+ left: [{
730
+ left: [inset]
731
+ }],
732
+ /**
733
+ * Visibility
734
+ * @see https://tailwindcss.com/docs/visibility
735
+ */
736
+ visibility: ['visible', 'invisible', 'collapse'],
737
+ /**
738
+ * Z-Index
739
+ * @see https://tailwindcss.com/docs/z-index
740
+ */
741
+ z: [{
742
+ z: ['auto', isInteger, isArbitraryValue]
743
+ }],
744
+ // Flexbox and Grid
745
+ /**
746
+ * Flex Basis
747
+ * @see https://tailwindcss.com/docs/flex-basis
748
+ */
749
+ basis: [{
750
+ basis: getSpacingWithAutoAndArbitrary()
751
+ }],
752
+ /**
753
+ * Flex Direction
754
+ * @see https://tailwindcss.com/docs/flex-direction
755
+ */
756
+ 'flex-direction': [{
757
+ flex: ['row', 'row-reverse', 'col', 'col-reverse']
758
+ }],
759
+ /**
760
+ * Flex Wrap
761
+ * @see https://tailwindcss.com/docs/flex-wrap
762
+ */
763
+ 'flex-wrap': [{
764
+ flex: ['wrap', 'wrap-reverse', 'nowrap']
765
+ }],
766
+ /**
767
+ * Flex
768
+ * @see https://tailwindcss.com/docs/flex
769
+ */
770
+ flex: [{
771
+ flex: ['1', 'auto', 'initial', 'none', isArbitraryValue]
772
+ }],
773
+ /**
774
+ * Flex Grow
775
+ * @see https://tailwindcss.com/docs/flex-grow
776
+ */
777
+ grow: [{
778
+ grow: getZeroAndEmpty()
779
+ }],
780
+ /**
781
+ * Flex Shrink
782
+ * @see https://tailwindcss.com/docs/flex-shrink
783
+ */
784
+ shrink: [{
785
+ shrink: getZeroAndEmpty()
786
+ }],
787
+ /**
788
+ * Order
789
+ * @see https://tailwindcss.com/docs/order
790
+ */
791
+ order: [{
792
+ order: ['first', 'last', 'none', isInteger, isArbitraryValue]
793
+ }],
794
+ /**
795
+ * Grid Template Columns
796
+ * @see https://tailwindcss.com/docs/grid-template-columns
797
+ */
798
+ 'grid-cols': [{
799
+ 'grid-cols': [isAny]
800
+ }],
801
+ /**
802
+ * Grid Column Start / End
803
+ * @see https://tailwindcss.com/docs/grid-column
804
+ */
805
+ 'col-start-end': [{
806
+ col: ['auto', {
807
+ span: ['full', isInteger, isArbitraryValue]
808
+ }, isArbitraryValue]
809
+ }],
810
+ /**
811
+ * Grid Column Start
812
+ * @see https://tailwindcss.com/docs/grid-column
813
+ */
814
+ 'col-start': [{
815
+ 'col-start': getNumberWithAutoAndArbitrary()
816
+ }],
817
+ /**
818
+ * Grid Column End
819
+ * @see https://tailwindcss.com/docs/grid-column
820
+ */
821
+ 'col-end': [{
822
+ 'col-end': getNumberWithAutoAndArbitrary()
823
+ }],
824
+ /**
825
+ * Grid Template Rows
826
+ * @see https://tailwindcss.com/docs/grid-template-rows
827
+ */
828
+ 'grid-rows': [{
829
+ 'grid-rows': [isAny]
830
+ }],
831
+ /**
832
+ * Grid Row Start / End
833
+ * @see https://tailwindcss.com/docs/grid-row
834
+ */
835
+ 'row-start-end': [{
836
+ row: ['auto', {
837
+ span: [isInteger, isArbitraryValue]
838
+ }, isArbitraryValue]
839
+ }],
840
+ /**
841
+ * Grid Row Start
842
+ * @see https://tailwindcss.com/docs/grid-row
843
+ */
844
+ 'row-start': [{
845
+ 'row-start': getNumberWithAutoAndArbitrary()
846
+ }],
847
+ /**
848
+ * Grid Row End
849
+ * @see https://tailwindcss.com/docs/grid-row
850
+ */
851
+ 'row-end': [{
852
+ 'row-end': getNumberWithAutoAndArbitrary()
853
+ }],
854
+ /**
855
+ * Grid Auto Flow
856
+ * @see https://tailwindcss.com/docs/grid-auto-flow
857
+ */
858
+ 'grid-flow': [{
859
+ 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']
860
+ }],
861
+ /**
862
+ * Grid Auto Columns
863
+ * @see https://tailwindcss.com/docs/grid-auto-columns
864
+ */
865
+ 'auto-cols': [{
866
+ 'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue]
867
+ }],
868
+ /**
869
+ * Grid Auto Rows
870
+ * @see https://tailwindcss.com/docs/grid-auto-rows
871
+ */
872
+ 'auto-rows': [{
873
+ 'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue]
874
+ }],
875
+ /**
876
+ * Gap
877
+ * @see https://tailwindcss.com/docs/gap
878
+ */
879
+ gap: [{
880
+ gap: [gap]
881
+ }],
882
+ /**
883
+ * Gap X
884
+ * @see https://tailwindcss.com/docs/gap
885
+ */
886
+ 'gap-x': [{
887
+ 'gap-x': [gap]
888
+ }],
889
+ /**
890
+ * Gap Y
891
+ * @see https://tailwindcss.com/docs/gap
892
+ */
893
+ 'gap-y': [{
894
+ 'gap-y': [gap]
895
+ }],
896
+ /**
897
+ * Justify Content
898
+ * @see https://tailwindcss.com/docs/justify-content
899
+ */
900
+ 'justify-content': [{
901
+ justify: ['normal', ...getAlign()]
902
+ }],
903
+ /**
904
+ * Justify Items
905
+ * @see https://tailwindcss.com/docs/justify-items
906
+ */
907
+ 'justify-items': [{
908
+ 'justify-items': ['start', 'end', 'center', 'stretch']
909
+ }],
910
+ /**
911
+ * Justify Self
912
+ * @see https://tailwindcss.com/docs/justify-self
913
+ */
914
+ 'justify-self': [{
915
+ 'justify-self': ['auto', 'start', 'end', 'center', 'stretch']
916
+ }],
917
+ /**
918
+ * Align Content
919
+ * @see https://tailwindcss.com/docs/align-content
920
+ */
921
+ 'align-content': [{
922
+ content: ['normal', ...getAlign(), 'baseline']
923
+ }],
924
+ /**
925
+ * Align Items
926
+ * @see https://tailwindcss.com/docs/align-items
927
+ */
928
+ 'align-items': [{
929
+ items: ['start', 'end', 'center', 'baseline', 'stretch']
930
+ }],
931
+ /**
932
+ * Align Self
933
+ * @see https://tailwindcss.com/docs/align-self
934
+ */
935
+ 'align-self': [{
936
+ self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline']
937
+ }],
938
+ /**
939
+ * Place Content
940
+ * @see https://tailwindcss.com/docs/place-content
941
+ */
942
+ 'place-content': [{
943
+ 'place-content': [...getAlign(), 'baseline']
944
+ }],
945
+ /**
946
+ * Place Items
947
+ * @see https://tailwindcss.com/docs/place-items
948
+ */
949
+ 'place-items': [{
950
+ 'place-items': ['start', 'end', 'center', 'baseline', 'stretch']
951
+ }],
952
+ /**
953
+ * Place Self
954
+ * @see https://tailwindcss.com/docs/place-self
955
+ */
956
+ 'place-self': [{
957
+ 'place-self': ['auto', 'start', 'end', 'center', 'stretch']
958
+ }],
959
+ // Spacing
960
+ /**
961
+ * Padding
962
+ * @see https://tailwindcss.com/docs/padding
963
+ */
964
+ p: [{
965
+ p: [padding]
966
+ }],
967
+ /**
968
+ * Padding X
969
+ * @see https://tailwindcss.com/docs/padding
970
+ */
971
+ px: [{
972
+ px: [padding]
973
+ }],
974
+ /**
975
+ * Padding Y
976
+ * @see https://tailwindcss.com/docs/padding
977
+ */
978
+ py: [{
979
+ py: [padding]
980
+ }],
981
+ /**
982
+ * Padding Start
983
+ * @see https://tailwindcss.com/docs/padding
984
+ */
985
+ ps: [{
986
+ ps: [padding]
987
+ }],
988
+ /**
989
+ * Padding End
990
+ * @see https://tailwindcss.com/docs/padding
991
+ */
992
+ pe: [{
993
+ pe: [padding]
994
+ }],
995
+ /**
996
+ * Padding Top
997
+ * @see https://tailwindcss.com/docs/padding
998
+ */
999
+ pt: [{
1000
+ pt: [padding]
1001
+ }],
1002
+ /**
1003
+ * Padding Right
1004
+ * @see https://tailwindcss.com/docs/padding
1005
+ */
1006
+ pr: [{
1007
+ pr: [padding]
1008
+ }],
1009
+ /**
1010
+ * Padding Bottom
1011
+ * @see https://tailwindcss.com/docs/padding
1012
+ */
1013
+ pb: [{
1014
+ pb: [padding]
1015
+ }],
1016
+ /**
1017
+ * Padding Left
1018
+ * @see https://tailwindcss.com/docs/padding
1019
+ */
1020
+ pl: [{
1021
+ pl: [padding]
1022
+ }],
1023
+ /**
1024
+ * Margin
1025
+ * @see https://tailwindcss.com/docs/margin
1026
+ */
1027
+ m: [{
1028
+ m: [margin]
1029
+ }],
1030
+ /**
1031
+ * Margin X
1032
+ * @see https://tailwindcss.com/docs/margin
1033
+ */
1034
+ mx: [{
1035
+ mx: [margin]
1036
+ }],
1037
+ /**
1038
+ * Margin Y
1039
+ * @see https://tailwindcss.com/docs/margin
1040
+ */
1041
+ my: [{
1042
+ my: [margin]
1043
+ }],
1044
+ /**
1045
+ * Margin Start
1046
+ * @see https://tailwindcss.com/docs/margin
1047
+ */
1048
+ ms: [{
1049
+ ms: [margin]
1050
+ }],
1051
+ /**
1052
+ * Margin End
1053
+ * @see https://tailwindcss.com/docs/margin
1054
+ */
1055
+ me: [{
1056
+ me: [margin]
1057
+ }],
1058
+ /**
1059
+ * Margin Top
1060
+ * @see https://tailwindcss.com/docs/margin
1061
+ */
1062
+ mt: [{
1063
+ mt: [margin]
1064
+ }],
1065
+ /**
1066
+ * Margin Right
1067
+ * @see https://tailwindcss.com/docs/margin
1068
+ */
1069
+ mr: [{
1070
+ mr: [margin]
1071
+ }],
1072
+ /**
1073
+ * Margin Bottom
1074
+ * @see https://tailwindcss.com/docs/margin
1075
+ */
1076
+ mb: [{
1077
+ mb: [margin]
1078
+ }],
1079
+ /**
1080
+ * Margin Left
1081
+ * @see https://tailwindcss.com/docs/margin
1082
+ */
1083
+ ml: [{
1084
+ ml: [margin]
1085
+ }],
1086
+ /**
1087
+ * Space Between X
1088
+ * @see https://tailwindcss.com/docs/space
1089
+ */
1090
+ 'space-x': [{
1091
+ 'space-x': [space]
1092
+ }],
1093
+ /**
1094
+ * Space Between X Reverse
1095
+ * @see https://tailwindcss.com/docs/space
1096
+ */
1097
+ 'space-x-reverse': ['space-x-reverse'],
1098
+ /**
1099
+ * Space Between Y
1100
+ * @see https://tailwindcss.com/docs/space
1101
+ */
1102
+ 'space-y': [{
1103
+ 'space-y': [space]
1104
+ }],
1105
+ /**
1106
+ * Space Between Y Reverse
1107
+ * @see https://tailwindcss.com/docs/space
1108
+ */
1109
+ 'space-y-reverse': ['space-y-reverse'],
1110
+ // Sizing
1111
+ /**
1112
+ * Width
1113
+ * @see https://tailwindcss.com/docs/width
1114
+ */
1115
+ w: [{
1116
+ w: ['auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing]
1117
+ }],
1118
+ /**
1119
+ * Min-Width
1120
+ * @see https://tailwindcss.com/docs/min-width
1121
+ */
1122
+ 'min-w': [{
1123
+ 'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit']
1124
+ }],
1125
+ /**
1126
+ * Max-Width
1127
+ * @see https://tailwindcss.com/docs/max-width
1128
+ */
1129
+ 'max-w': [{
1130
+ 'max-w': [isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', {
1131
+ screen: [isTshirtSize]
1132
+ }, isTshirtSize]
1133
+ }],
1134
+ /**
1135
+ * Height
1136
+ * @see https://tailwindcss.com/docs/height
1137
+ */
1138
+ h: [{
1139
+ h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1140
+ }],
1141
+ /**
1142
+ * Min-Height
1143
+ * @see https://tailwindcss.com/docs/min-height
1144
+ */
1145
+ 'min-h': [{
1146
+ 'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1147
+ }],
1148
+ /**
1149
+ * Max-Height
1150
+ * @see https://tailwindcss.com/docs/max-height
1151
+ */
1152
+ 'max-h': [{
1153
+ 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1154
+ }],
1155
+ /**
1156
+ * Size
1157
+ * @see https://tailwindcss.com/docs/size
1158
+ */
1159
+ size: [{
1160
+ size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit']
1161
+ }],
1162
+ // Typography
1163
+ /**
1164
+ * Font Size
1165
+ * @see https://tailwindcss.com/docs/font-size
1166
+ */
1167
+ 'font-size': [{
1168
+ text: ['base', isTshirtSize, isArbitraryLength]
1169
+ }],
1170
+ /**
1171
+ * Font Smoothing
1172
+ * @see https://tailwindcss.com/docs/font-smoothing
1173
+ */
1174
+ 'font-smoothing': ['antialiased', 'subpixel-antialiased'],
1175
+ /**
1176
+ * Font Style
1177
+ * @see https://tailwindcss.com/docs/font-style
1178
+ */
1179
+ 'font-style': ['italic', 'not-italic'],
1180
+ /**
1181
+ * Font Weight
1182
+ * @see https://tailwindcss.com/docs/font-weight
1183
+ */
1184
+ 'font-weight': [{
1185
+ font: ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber]
1186
+ }],
1187
+ /**
1188
+ * Font Family
1189
+ * @see https://tailwindcss.com/docs/font-family
1190
+ */
1191
+ 'font-family': [{
1192
+ font: [isAny]
1193
+ }],
1194
+ /**
1195
+ * Font Variant Numeric
1196
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1197
+ */
1198
+ 'fvn-normal': ['normal-nums'],
1199
+ /**
1200
+ * Font Variant Numeric
1201
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1202
+ */
1203
+ 'fvn-ordinal': ['ordinal'],
1204
+ /**
1205
+ * Font Variant Numeric
1206
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1207
+ */
1208
+ 'fvn-slashed-zero': ['slashed-zero'],
1209
+ /**
1210
+ * Font Variant Numeric
1211
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1212
+ */
1213
+ 'fvn-figure': ['lining-nums', 'oldstyle-nums'],
1214
+ /**
1215
+ * Font Variant Numeric
1216
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1217
+ */
1218
+ 'fvn-spacing': ['proportional-nums', 'tabular-nums'],
1219
+ /**
1220
+ * Font Variant Numeric
1221
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1222
+ */
1223
+ 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],
1224
+ /**
1225
+ * Letter Spacing
1226
+ * @see https://tailwindcss.com/docs/letter-spacing
1227
+ */
1228
+ tracking: [{
1229
+ tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryValue]
1230
+ }],
1231
+ /**
1232
+ * Line Clamp
1233
+ * @see https://tailwindcss.com/docs/line-clamp
1234
+ */
1235
+ 'line-clamp': [{
1236
+ 'line-clamp': ['none', isNumber, isArbitraryNumber]
1237
+ }],
1238
+ /**
1239
+ * Line Height
1240
+ * @see https://tailwindcss.com/docs/line-height
1241
+ */
1242
+ leading: [{
1243
+ leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue]
1244
+ }],
1245
+ /**
1246
+ * List Style Image
1247
+ * @see https://tailwindcss.com/docs/list-style-image
1248
+ */
1249
+ 'list-image': [{
1250
+ 'list-image': ['none', isArbitraryValue]
1251
+ }],
1252
+ /**
1253
+ * List Style Type
1254
+ * @see https://tailwindcss.com/docs/list-style-type
1255
+ */
1256
+ 'list-style-type': [{
1257
+ list: ['none', 'disc', 'decimal', isArbitraryValue]
1258
+ }],
1259
+ /**
1260
+ * List Style Position
1261
+ * @see https://tailwindcss.com/docs/list-style-position
1262
+ */
1263
+ 'list-style-position': [{
1264
+ list: ['inside', 'outside']
1265
+ }],
1266
+ /**
1267
+ * Placeholder Color
1268
+ * @deprecated since Tailwind CSS v3.0.0
1269
+ * @see https://tailwindcss.com/docs/placeholder-color
1270
+ */
1271
+ 'placeholder-color': [{
1272
+ placeholder: [colors]
1273
+ }],
1274
+ /**
1275
+ * Placeholder Opacity
1276
+ * @see https://tailwindcss.com/docs/placeholder-opacity
1277
+ */
1278
+ 'placeholder-opacity': [{
1279
+ 'placeholder-opacity': [opacity]
1280
+ }],
1281
+ /**
1282
+ * Text Alignment
1283
+ * @see https://tailwindcss.com/docs/text-align
1284
+ */
1285
+ 'text-alignment': [{
1286
+ text: ['left', 'center', 'right', 'justify', 'start', 'end']
1287
+ }],
1288
+ /**
1289
+ * Text Color
1290
+ * @see https://tailwindcss.com/docs/text-color
1291
+ */
1292
+ 'text-color': [{
1293
+ text: [colors]
1294
+ }],
1295
+ /**
1296
+ * Text Opacity
1297
+ * @see https://tailwindcss.com/docs/text-opacity
1298
+ */
1299
+ 'text-opacity': [{
1300
+ 'text-opacity': [opacity]
1301
+ }],
1302
+ /**
1303
+ * Text Decoration
1304
+ * @see https://tailwindcss.com/docs/text-decoration
1305
+ */
1306
+ 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],
1307
+ /**
1308
+ * Text Decoration Style
1309
+ * @see https://tailwindcss.com/docs/text-decoration-style
1310
+ */
1311
+ 'text-decoration-style': [{
1312
+ decoration: [...getLineStyles(), 'wavy']
1313
+ }],
1314
+ /**
1315
+ * Text Decoration Thickness
1316
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1317
+ */
1318
+ 'text-decoration-thickness': [{
1319
+ decoration: ['auto', 'from-font', isLength, isArbitraryLength]
1320
+ }],
1321
+ /**
1322
+ * Text Underline Offset
1323
+ * @see https://tailwindcss.com/docs/text-underline-offset
1324
+ */
1325
+ 'underline-offset': [{
1326
+ 'underline-offset': ['auto', isLength, isArbitraryValue]
1327
+ }],
1328
+ /**
1329
+ * Text Decoration Color
1330
+ * @see https://tailwindcss.com/docs/text-decoration-color
1331
+ */
1332
+ 'text-decoration-color': [{
1333
+ decoration: [colors]
1334
+ }],
1335
+ /**
1336
+ * Text Transform
1337
+ * @see https://tailwindcss.com/docs/text-transform
1338
+ */
1339
+ 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
1340
+ /**
1341
+ * Text Overflow
1342
+ * @see https://tailwindcss.com/docs/text-overflow
1343
+ */
1344
+ 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
1345
+ /**
1346
+ * Text Wrap
1347
+ * @see https://tailwindcss.com/docs/text-wrap
1348
+ */
1349
+ 'text-wrap': [{
1350
+ text: ['wrap', 'nowrap', 'balance', 'pretty']
1351
+ }],
1352
+ /**
1353
+ * Text Indent
1354
+ * @see https://tailwindcss.com/docs/text-indent
1355
+ */
1356
+ indent: [{
1357
+ indent: getSpacingWithArbitrary()
1358
+ }],
1359
+ /**
1360
+ * Vertical Alignment
1361
+ * @see https://tailwindcss.com/docs/vertical-align
1362
+ */
1363
+ 'vertical-align': [{
1364
+ align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryValue]
1365
+ }],
1366
+ /**
1367
+ * Whitespace
1368
+ * @see https://tailwindcss.com/docs/whitespace
1369
+ */
1370
+ whitespace: [{
1371
+ whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']
1372
+ }],
1373
+ /**
1374
+ * Word Break
1375
+ * @see https://tailwindcss.com/docs/word-break
1376
+ */
1377
+ break: [{
1378
+ break: ['normal', 'words', 'all', 'keep']
1379
+ }],
1380
+ /**
1381
+ * Hyphens
1382
+ * @see https://tailwindcss.com/docs/hyphens
1383
+ */
1384
+ hyphens: [{
1385
+ hyphens: ['none', 'manual', 'auto']
1386
+ }],
1387
+ /**
1388
+ * Content
1389
+ * @see https://tailwindcss.com/docs/content
1390
+ */
1391
+ content: [{
1392
+ content: ['none', isArbitraryValue]
1393
+ }],
1394
+ // Backgrounds
1395
+ /**
1396
+ * Background Attachment
1397
+ * @see https://tailwindcss.com/docs/background-attachment
1398
+ */
1399
+ 'bg-attachment': [{
1400
+ bg: ['fixed', 'local', 'scroll']
1401
+ }],
1402
+ /**
1403
+ * Background Clip
1404
+ * @see https://tailwindcss.com/docs/background-clip
1405
+ */
1406
+ 'bg-clip': [{
1407
+ 'bg-clip': ['border', 'padding', 'content', 'text']
1408
+ }],
1409
+ /**
1410
+ * Background Opacity
1411
+ * @deprecated since Tailwind CSS v3.0.0
1412
+ * @see https://tailwindcss.com/docs/background-opacity
1413
+ */
1414
+ 'bg-opacity': [{
1415
+ 'bg-opacity': [opacity]
1416
+ }],
1417
+ /**
1418
+ * Background Origin
1419
+ * @see https://tailwindcss.com/docs/background-origin
1420
+ */
1421
+ 'bg-origin': [{
1422
+ 'bg-origin': ['border', 'padding', 'content']
1423
+ }],
1424
+ /**
1425
+ * Background Position
1426
+ * @see https://tailwindcss.com/docs/background-position
1427
+ */
1428
+ 'bg-position': [{
1429
+ bg: [...getPositions(), isArbitraryPosition]
1430
+ }],
1431
+ /**
1432
+ * Background Repeat
1433
+ * @see https://tailwindcss.com/docs/background-repeat
1434
+ */
1435
+ 'bg-repeat': [{
1436
+ bg: ['no-repeat', {
1437
+ repeat: ['', 'x', 'y', 'round', 'space']
1438
+ }]
1439
+ }],
1440
+ /**
1441
+ * Background Size
1442
+ * @see https://tailwindcss.com/docs/background-size
1443
+ */
1444
+ 'bg-size': [{
1445
+ bg: ['auto', 'cover', 'contain', isArbitrarySize]
1446
+ }],
1447
+ /**
1448
+ * Background Image
1449
+ * @see https://tailwindcss.com/docs/background-image
1450
+ */
1451
+ 'bg-image': [{
1452
+ bg: ['none', {
1453
+ 'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
1454
+ }, isArbitraryImage]
1455
+ }],
1456
+ /**
1457
+ * Background Color
1458
+ * @see https://tailwindcss.com/docs/background-color
1459
+ */
1460
+ 'bg-color': [{
1461
+ bg: [colors]
1462
+ }],
1463
+ /**
1464
+ * Gradient Color Stops From Position
1465
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1466
+ */
1467
+ 'gradient-from-pos': [{
1468
+ from: [gradientColorStopPositions]
1469
+ }],
1470
+ /**
1471
+ * Gradient Color Stops Via Position
1472
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1473
+ */
1474
+ 'gradient-via-pos': [{
1475
+ via: [gradientColorStopPositions]
1476
+ }],
1477
+ /**
1478
+ * Gradient Color Stops To Position
1479
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1480
+ */
1481
+ 'gradient-to-pos': [{
1482
+ to: [gradientColorStopPositions]
1483
+ }],
1484
+ /**
1485
+ * Gradient Color Stops From
1486
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1487
+ */
1488
+ 'gradient-from': [{
1489
+ from: [gradientColorStops]
1490
+ }],
1491
+ /**
1492
+ * Gradient Color Stops Via
1493
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1494
+ */
1495
+ 'gradient-via': [{
1496
+ via: [gradientColorStops]
1497
+ }],
1498
+ /**
1499
+ * Gradient Color Stops To
1500
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1501
+ */
1502
+ 'gradient-to': [{
1503
+ to: [gradientColorStops]
1504
+ }],
1505
+ // Borders
1506
+ /**
1507
+ * Border Radius
1508
+ * @see https://tailwindcss.com/docs/border-radius
1509
+ */
1510
+ rounded: [{
1511
+ rounded: [borderRadius]
1512
+ }],
1513
+ /**
1514
+ * Border Radius Start
1515
+ * @see https://tailwindcss.com/docs/border-radius
1516
+ */
1517
+ 'rounded-s': [{
1518
+ 'rounded-s': [borderRadius]
1519
+ }],
1520
+ /**
1521
+ * Border Radius End
1522
+ * @see https://tailwindcss.com/docs/border-radius
1523
+ */
1524
+ 'rounded-e': [{
1525
+ 'rounded-e': [borderRadius]
1526
+ }],
1527
+ /**
1528
+ * Border Radius Top
1529
+ * @see https://tailwindcss.com/docs/border-radius
1530
+ */
1531
+ 'rounded-t': [{
1532
+ 'rounded-t': [borderRadius]
1533
+ }],
1534
+ /**
1535
+ * Border Radius Right
1536
+ * @see https://tailwindcss.com/docs/border-radius
1537
+ */
1538
+ 'rounded-r': [{
1539
+ 'rounded-r': [borderRadius]
1540
+ }],
1541
+ /**
1542
+ * Border Radius Bottom
1543
+ * @see https://tailwindcss.com/docs/border-radius
1544
+ */
1545
+ 'rounded-b': [{
1546
+ 'rounded-b': [borderRadius]
1547
+ }],
1548
+ /**
1549
+ * Border Radius Left
1550
+ * @see https://tailwindcss.com/docs/border-radius
1551
+ */
1552
+ 'rounded-l': [{
1553
+ 'rounded-l': [borderRadius]
1554
+ }],
1555
+ /**
1556
+ * Border Radius Start Start
1557
+ * @see https://tailwindcss.com/docs/border-radius
1558
+ */
1559
+ 'rounded-ss': [{
1560
+ 'rounded-ss': [borderRadius]
1561
+ }],
1562
+ /**
1563
+ * Border Radius Start End
1564
+ * @see https://tailwindcss.com/docs/border-radius
1565
+ */
1566
+ 'rounded-se': [{
1567
+ 'rounded-se': [borderRadius]
1568
+ }],
1569
+ /**
1570
+ * Border Radius End End
1571
+ * @see https://tailwindcss.com/docs/border-radius
1572
+ */
1573
+ 'rounded-ee': [{
1574
+ 'rounded-ee': [borderRadius]
1575
+ }],
1576
+ /**
1577
+ * Border Radius End Start
1578
+ * @see https://tailwindcss.com/docs/border-radius
1579
+ */
1580
+ 'rounded-es': [{
1581
+ 'rounded-es': [borderRadius]
1582
+ }],
1583
+ /**
1584
+ * Border Radius Top Left
1585
+ * @see https://tailwindcss.com/docs/border-radius
1586
+ */
1587
+ 'rounded-tl': [{
1588
+ 'rounded-tl': [borderRadius]
1589
+ }],
1590
+ /**
1591
+ * Border Radius Top Right
1592
+ * @see https://tailwindcss.com/docs/border-radius
1593
+ */
1594
+ 'rounded-tr': [{
1595
+ 'rounded-tr': [borderRadius]
1596
+ }],
1597
+ /**
1598
+ * Border Radius Bottom Right
1599
+ * @see https://tailwindcss.com/docs/border-radius
1600
+ */
1601
+ 'rounded-br': [{
1602
+ 'rounded-br': [borderRadius]
1603
+ }],
1604
+ /**
1605
+ * Border Radius Bottom Left
1606
+ * @see https://tailwindcss.com/docs/border-radius
1607
+ */
1608
+ 'rounded-bl': [{
1609
+ 'rounded-bl': [borderRadius]
1610
+ }],
1611
+ /**
1612
+ * Border Width
1613
+ * @see https://tailwindcss.com/docs/border-width
1614
+ */
1615
+ 'border-w': [{
1616
+ border: [borderWidth]
1617
+ }],
1618
+ /**
1619
+ * Border Width X
1620
+ * @see https://tailwindcss.com/docs/border-width
1621
+ */
1622
+ 'border-w-x': [{
1623
+ 'border-x': [borderWidth]
1624
+ }],
1625
+ /**
1626
+ * Border Width Y
1627
+ * @see https://tailwindcss.com/docs/border-width
1628
+ */
1629
+ 'border-w-y': [{
1630
+ 'border-y': [borderWidth]
1631
+ }],
1632
+ /**
1633
+ * Border Width Start
1634
+ * @see https://tailwindcss.com/docs/border-width
1635
+ */
1636
+ 'border-w-s': [{
1637
+ 'border-s': [borderWidth]
1638
+ }],
1639
+ /**
1640
+ * Border Width End
1641
+ * @see https://tailwindcss.com/docs/border-width
1642
+ */
1643
+ 'border-w-e': [{
1644
+ 'border-e': [borderWidth]
1645
+ }],
1646
+ /**
1647
+ * Border Width Top
1648
+ * @see https://tailwindcss.com/docs/border-width
1649
+ */
1650
+ 'border-w-t': [{
1651
+ 'border-t': [borderWidth]
1652
+ }],
1653
+ /**
1654
+ * Border Width Right
1655
+ * @see https://tailwindcss.com/docs/border-width
1656
+ */
1657
+ 'border-w-r': [{
1658
+ 'border-r': [borderWidth]
1659
+ }],
1660
+ /**
1661
+ * Border Width Bottom
1662
+ * @see https://tailwindcss.com/docs/border-width
1663
+ */
1664
+ 'border-w-b': [{
1665
+ 'border-b': [borderWidth]
1666
+ }],
1667
+ /**
1668
+ * Border Width Left
1669
+ * @see https://tailwindcss.com/docs/border-width
1670
+ */
1671
+ 'border-w-l': [{
1672
+ 'border-l': [borderWidth]
1673
+ }],
1674
+ /**
1675
+ * Border Opacity
1676
+ * @see https://tailwindcss.com/docs/border-opacity
1677
+ */
1678
+ 'border-opacity': [{
1679
+ 'border-opacity': [opacity]
1680
+ }],
1681
+ /**
1682
+ * Border Style
1683
+ * @see https://tailwindcss.com/docs/border-style
1684
+ */
1685
+ 'border-style': [{
1686
+ border: [...getLineStyles(), 'hidden']
1687
+ }],
1688
+ /**
1689
+ * Divide Width X
1690
+ * @see https://tailwindcss.com/docs/divide-width
1691
+ */
1692
+ 'divide-x': [{
1693
+ 'divide-x': [borderWidth]
1694
+ }],
1695
+ /**
1696
+ * Divide Width X Reverse
1697
+ * @see https://tailwindcss.com/docs/divide-width
1698
+ */
1699
+ 'divide-x-reverse': ['divide-x-reverse'],
1700
+ /**
1701
+ * Divide Width Y
1702
+ * @see https://tailwindcss.com/docs/divide-width
1703
+ */
1704
+ 'divide-y': [{
1705
+ 'divide-y': [borderWidth]
1706
+ }],
1707
+ /**
1708
+ * Divide Width Y Reverse
1709
+ * @see https://tailwindcss.com/docs/divide-width
1710
+ */
1711
+ 'divide-y-reverse': ['divide-y-reverse'],
1712
+ /**
1713
+ * Divide Opacity
1714
+ * @see https://tailwindcss.com/docs/divide-opacity
1715
+ */
1716
+ 'divide-opacity': [{
1717
+ 'divide-opacity': [opacity]
1718
+ }],
1719
+ /**
1720
+ * Divide Style
1721
+ * @see https://tailwindcss.com/docs/divide-style
1722
+ */
1723
+ 'divide-style': [{
1724
+ divide: getLineStyles()
1725
+ }],
1726
+ /**
1727
+ * Border Color
1728
+ * @see https://tailwindcss.com/docs/border-color
1729
+ */
1730
+ 'border-color': [{
1731
+ border: [borderColor]
1732
+ }],
1733
+ /**
1734
+ * Border Color X
1735
+ * @see https://tailwindcss.com/docs/border-color
1736
+ */
1737
+ 'border-color-x': [{
1738
+ 'border-x': [borderColor]
1739
+ }],
1740
+ /**
1741
+ * Border Color Y
1742
+ * @see https://tailwindcss.com/docs/border-color
1743
+ */
1744
+ 'border-color-y': [{
1745
+ 'border-y': [borderColor]
1746
+ }],
1747
+ /**
1748
+ * Border Color S
1749
+ * @see https://tailwindcss.com/docs/border-color
1750
+ */
1751
+ 'border-color-s': [{
1752
+ 'border-s': [borderColor]
1753
+ }],
1754
+ /**
1755
+ * Border Color E
1756
+ * @see https://tailwindcss.com/docs/border-color
1757
+ */
1758
+ 'border-color-e': [{
1759
+ 'border-e': [borderColor]
1760
+ }],
1761
+ /**
1762
+ * Border Color Top
1763
+ * @see https://tailwindcss.com/docs/border-color
1764
+ */
1765
+ 'border-color-t': [{
1766
+ 'border-t': [borderColor]
1767
+ }],
1768
+ /**
1769
+ * Border Color Right
1770
+ * @see https://tailwindcss.com/docs/border-color
1771
+ */
1772
+ 'border-color-r': [{
1773
+ 'border-r': [borderColor]
1774
+ }],
1775
+ /**
1776
+ * Border Color Bottom
1777
+ * @see https://tailwindcss.com/docs/border-color
1778
+ */
1779
+ 'border-color-b': [{
1780
+ 'border-b': [borderColor]
1781
+ }],
1782
+ /**
1783
+ * Border Color Left
1784
+ * @see https://tailwindcss.com/docs/border-color
1785
+ */
1786
+ 'border-color-l': [{
1787
+ 'border-l': [borderColor]
1788
+ }],
1789
+ /**
1790
+ * Divide Color
1791
+ * @see https://tailwindcss.com/docs/divide-color
1792
+ */
1793
+ 'divide-color': [{
1794
+ divide: [borderColor]
1795
+ }],
1796
+ /**
1797
+ * Outline Style
1798
+ * @see https://tailwindcss.com/docs/outline-style
1799
+ */
1800
+ 'outline-style': [{
1801
+ outline: ['', ...getLineStyles()]
1802
+ }],
1803
+ /**
1804
+ * Outline Offset
1805
+ * @see https://tailwindcss.com/docs/outline-offset
1806
+ */
1807
+ 'outline-offset': [{
1808
+ 'outline-offset': [isLength, isArbitraryValue]
1809
+ }],
1810
+ /**
1811
+ * Outline Width
1812
+ * @see https://tailwindcss.com/docs/outline-width
1813
+ */
1814
+ 'outline-w': [{
1815
+ outline: [isLength, isArbitraryLength]
1816
+ }],
1817
+ /**
1818
+ * Outline Color
1819
+ * @see https://tailwindcss.com/docs/outline-color
1820
+ */
1821
+ 'outline-color': [{
1822
+ outline: [colors]
1823
+ }],
1824
+ /**
1825
+ * Ring Width
1826
+ * @see https://tailwindcss.com/docs/ring-width
1827
+ */
1828
+ 'ring-w': [{
1829
+ ring: getLengthWithEmptyAndArbitrary()
1830
+ }],
1831
+ /**
1832
+ * Ring Width Inset
1833
+ * @see https://tailwindcss.com/docs/ring-width
1834
+ */
1835
+ 'ring-w-inset': ['ring-inset'],
1836
+ /**
1837
+ * Ring Color
1838
+ * @see https://tailwindcss.com/docs/ring-color
1839
+ */
1840
+ 'ring-color': [{
1841
+ ring: [colors]
1842
+ }],
1843
+ /**
1844
+ * Ring Opacity
1845
+ * @see https://tailwindcss.com/docs/ring-opacity
1846
+ */
1847
+ 'ring-opacity': [{
1848
+ 'ring-opacity': [opacity]
1849
+ }],
1850
+ /**
1851
+ * Ring Offset Width
1852
+ * @see https://tailwindcss.com/docs/ring-offset-width
1853
+ */
1854
+ 'ring-offset-w': [{
1855
+ 'ring-offset': [isLength, isArbitraryLength]
1856
+ }],
1857
+ /**
1858
+ * Ring Offset Color
1859
+ * @see https://tailwindcss.com/docs/ring-offset-color
1860
+ */
1861
+ 'ring-offset-color': [{
1862
+ 'ring-offset': [colors]
1863
+ }],
1864
+ // Effects
1865
+ /**
1866
+ * Box Shadow
1867
+ * @see https://tailwindcss.com/docs/box-shadow
1868
+ */
1869
+ shadow: [{
1870
+ shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow]
1871
+ }],
1872
+ /**
1873
+ * Box Shadow Color
1874
+ * @see https://tailwindcss.com/docs/box-shadow-color
1875
+ */
1876
+ 'shadow-color': [{
1877
+ shadow: [isAny]
1878
+ }],
1879
+ /**
1880
+ * Opacity
1881
+ * @see https://tailwindcss.com/docs/opacity
1882
+ */
1883
+ opacity: [{
1884
+ opacity: [opacity]
1885
+ }],
1886
+ /**
1887
+ * Mix Blend Mode
1888
+ * @see https://tailwindcss.com/docs/mix-blend-mode
1889
+ */
1890
+ 'mix-blend': [{
1891
+ 'mix-blend': [...getBlendModes(), 'plus-lighter', 'plus-darker']
1892
+ }],
1893
+ /**
1894
+ * Background Blend Mode
1895
+ * @see https://tailwindcss.com/docs/background-blend-mode
1896
+ */
1897
+ 'bg-blend': [{
1898
+ 'bg-blend': getBlendModes()
1899
+ }],
1900
+ // Filters
1901
+ /**
1902
+ * Filter
1903
+ * @deprecated since Tailwind CSS v3.0.0
1904
+ * @see https://tailwindcss.com/docs/filter
1905
+ */
1906
+ filter: [{
1907
+ filter: ['', 'none']
1908
+ }],
1909
+ /**
1910
+ * Blur
1911
+ * @see https://tailwindcss.com/docs/blur
1912
+ */
1913
+ blur: [{
1914
+ blur: [blur]
1915
+ }],
1916
+ /**
1917
+ * Brightness
1918
+ * @see https://tailwindcss.com/docs/brightness
1919
+ */
1920
+ brightness: [{
1921
+ brightness: [brightness]
1922
+ }],
1923
+ /**
1924
+ * Contrast
1925
+ * @see https://tailwindcss.com/docs/contrast
1926
+ */
1927
+ contrast: [{
1928
+ contrast: [contrast]
1929
+ }],
1930
+ /**
1931
+ * Drop Shadow
1932
+ * @see https://tailwindcss.com/docs/drop-shadow
1933
+ */
1934
+ 'drop-shadow': [{
1935
+ 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue]
1936
+ }],
1937
+ /**
1938
+ * Grayscale
1939
+ * @see https://tailwindcss.com/docs/grayscale
1940
+ */
1941
+ grayscale: [{
1942
+ grayscale: [grayscale]
1943
+ }],
1944
+ /**
1945
+ * Hue Rotate
1946
+ * @see https://tailwindcss.com/docs/hue-rotate
1947
+ */
1948
+ 'hue-rotate': [{
1949
+ 'hue-rotate': [hueRotate]
1950
+ }],
1951
+ /**
1952
+ * Invert
1953
+ * @see https://tailwindcss.com/docs/invert
1954
+ */
1955
+ invert: [{
1956
+ invert: [invert]
1957
+ }],
1958
+ /**
1959
+ * Saturate
1960
+ * @see https://tailwindcss.com/docs/saturate
1961
+ */
1962
+ saturate: [{
1963
+ saturate: [saturate]
1964
+ }],
1965
+ /**
1966
+ * Sepia
1967
+ * @see https://tailwindcss.com/docs/sepia
1968
+ */
1969
+ sepia: [{
1970
+ sepia: [sepia]
1971
+ }],
1972
+ /**
1973
+ * Backdrop Filter
1974
+ * @deprecated since Tailwind CSS v3.0.0
1975
+ * @see https://tailwindcss.com/docs/backdrop-filter
1976
+ */
1977
+ 'backdrop-filter': [{
1978
+ 'backdrop-filter': ['', 'none']
1979
+ }],
1980
+ /**
1981
+ * Backdrop Blur
1982
+ * @see https://tailwindcss.com/docs/backdrop-blur
1983
+ */
1984
+ 'backdrop-blur': [{
1985
+ 'backdrop-blur': [blur]
1986
+ }],
1987
+ /**
1988
+ * Backdrop Brightness
1989
+ * @see https://tailwindcss.com/docs/backdrop-brightness
1990
+ */
1991
+ 'backdrop-brightness': [{
1992
+ 'backdrop-brightness': [brightness]
1993
+ }],
1994
+ /**
1995
+ * Backdrop Contrast
1996
+ * @see https://tailwindcss.com/docs/backdrop-contrast
1997
+ */
1998
+ 'backdrop-contrast': [{
1999
+ 'backdrop-contrast': [contrast]
2000
+ }],
2001
+ /**
2002
+ * Backdrop Grayscale
2003
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2004
+ */
2005
+ 'backdrop-grayscale': [{
2006
+ 'backdrop-grayscale': [grayscale]
2007
+ }],
2008
+ /**
2009
+ * Backdrop Hue Rotate
2010
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2011
+ */
2012
+ 'backdrop-hue-rotate': [{
2013
+ 'backdrop-hue-rotate': [hueRotate]
2014
+ }],
2015
+ /**
2016
+ * Backdrop Invert
2017
+ * @see https://tailwindcss.com/docs/backdrop-invert
2018
+ */
2019
+ 'backdrop-invert': [{
2020
+ 'backdrop-invert': [invert]
2021
+ }],
2022
+ /**
2023
+ * Backdrop Opacity
2024
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2025
+ */
2026
+ 'backdrop-opacity': [{
2027
+ 'backdrop-opacity': [opacity]
2028
+ }],
2029
+ /**
2030
+ * Backdrop Saturate
2031
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2032
+ */
2033
+ 'backdrop-saturate': [{
2034
+ 'backdrop-saturate': [saturate]
2035
+ }],
2036
+ /**
2037
+ * Backdrop Sepia
2038
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2039
+ */
2040
+ 'backdrop-sepia': [{
2041
+ 'backdrop-sepia': [sepia]
2042
+ }],
2043
+ // Tables
2044
+ /**
2045
+ * Border Collapse
2046
+ * @see https://tailwindcss.com/docs/border-collapse
2047
+ */
2048
+ 'border-collapse': [{
2049
+ border: ['collapse', 'separate']
2050
+ }],
2051
+ /**
2052
+ * Border Spacing
2053
+ * @see https://tailwindcss.com/docs/border-spacing
2054
+ */
2055
+ 'border-spacing': [{
2056
+ 'border-spacing': [borderSpacing]
2057
+ }],
2058
+ /**
2059
+ * Border Spacing X
2060
+ * @see https://tailwindcss.com/docs/border-spacing
2061
+ */
2062
+ 'border-spacing-x': [{
2063
+ 'border-spacing-x': [borderSpacing]
2064
+ }],
2065
+ /**
2066
+ * Border Spacing Y
2067
+ * @see https://tailwindcss.com/docs/border-spacing
2068
+ */
2069
+ 'border-spacing-y': [{
2070
+ 'border-spacing-y': [borderSpacing]
2071
+ }],
2072
+ /**
2073
+ * Table Layout
2074
+ * @see https://tailwindcss.com/docs/table-layout
2075
+ */
2076
+ 'table-layout': [{
2077
+ table: ['auto', 'fixed']
2078
+ }],
2079
+ /**
2080
+ * Caption Side
2081
+ * @see https://tailwindcss.com/docs/caption-side
2082
+ */
2083
+ caption: [{
2084
+ caption: ['top', 'bottom']
2085
+ }],
2086
+ // Transitions and Animation
2087
+ /**
2088
+ * Tranisition Property
2089
+ * @see https://tailwindcss.com/docs/transition-property
2090
+ */
2091
+ transition: [{
2092
+ transition: ['none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue]
2093
+ }],
2094
+ /**
2095
+ * Transition Duration
2096
+ * @see https://tailwindcss.com/docs/transition-duration
2097
+ */
2098
+ duration: [{
2099
+ duration: getNumberAndArbitrary()
2100
+ }],
2101
+ /**
2102
+ * Transition Timing Function
2103
+ * @see https://tailwindcss.com/docs/transition-timing-function
2104
+ */
2105
+ ease: [{
2106
+ ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue]
2107
+ }],
2108
+ /**
2109
+ * Transition Delay
2110
+ * @see https://tailwindcss.com/docs/transition-delay
2111
+ */
2112
+ delay: [{
2113
+ delay: getNumberAndArbitrary()
2114
+ }],
2115
+ /**
2116
+ * Animation
2117
+ * @see https://tailwindcss.com/docs/animation
2118
+ */
2119
+ animate: [{
2120
+ animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue]
2121
+ }],
2122
+ // Transforms
2123
+ /**
2124
+ * Transform
2125
+ * @see https://tailwindcss.com/docs/transform
2126
+ */
2127
+ transform: [{
2128
+ transform: ['', 'gpu', 'none']
2129
+ }],
2130
+ /**
2131
+ * Scale
2132
+ * @see https://tailwindcss.com/docs/scale
2133
+ */
2134
+ scale: [{
2135
+ scale: [scale]
2136
+ }],
2137
+ /**
2138
+ * Scale X
2139
+ * @see https://tailwindcss.com/docs/scale
2140
+ */
2141
+ 'scale-x': [{
2142
+ 'scale-x': [scale]
2143
+ }],
2144
+ /**
2145
+ * Scale Y
2146
+ * @see https://tailwindcss.com/docs/scale
2147
+ */
2148
+ 'scale-y': [{
2149
+ 'scale-y': [scale]
2150
+ }],
2151
+ /**
2152
+ * Rotate
2153
+ * @see https://tailwindcss.com/docs/rotate
2154
+ */
2155
+ rotate: [{
2156
+ rotate: [isInteger, isArbitraryValue]
2157
+ }],
2158
+ /**
2159
+ * Translate X
2160
+ * @see https://tailwindcss.com/docs/translate
2161
+ */
2162
+ 'translate-x': [{
2163
+ 'translate-x': [translate]
2164
+ }],
2165
+ /**
2166
+ * Translate Y
2167
+ * @see https://tailwindcss.com/docs/translate
2168
+ */
2169
+ 'translate-y': [{
2170
+ 'translate-y': [translate]
2171
+ }],
2172
+ /**
2173
+ * Skew X
2174
+ * @see https://tailwindcss.com/docs/skew
2175
+ */
2176
+ 'skew-x': [{
2177
+ 'skew-x': [skew]
2178
+ }],
2179
+ /**
2180
+ * Skew Y
2181
+ * @see https://tailwindcss.com/docs/skew
2182
+ */
2183
+ 'skew-y': [{
2184
+ 'skew-y': [skew]
2185
+ }],
2186
+ /**
2187
+ * Transform Origin
2188
+ * @see https://tailwindcss.com/docs/transform-origin
2189
+ */
2190
+ 'transform-origin': [{
2191
+ origin: ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue]
2192
+ }],
2193
+ // Interactivity
2194
+ /**
2195
+ * Accent Color
2196
+ * @see https://tailwindcss.com/docs/accent-color
2197
+ */
2198
+ accent: [{
2199
+ accent: ['auto', colors]
2200
+ }],
2201
+ /**
2202
+ * Appearance
2203
+ * @see https://tailwindcss.com/docs/appearance
2204
+ */
2205
+ appearance: [{
2206
+ appearance: ['none', 'auto']
2207
+ }],
2208
+ /**
2209
+ * Cursor
2210
+ * @see https://tailwindcss.com/docs/cursor
2211
+ */
2212
+ cursor: [{
2213
+ cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue]
2214
+ }],
2215
+ /**
2216
+ * Caret Color
2217
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2218
+ */
2219
+ 'caret-color': [{
2220
+ caret: [colors]
2221
+ }],
2222
+ /**
2223
+ * Pointer Events
2224
+ * @see https://tailwindcss.com/docs/pointer-events
2225
+ */
2226
+ 'pointer-events': [{
2227
+ 'pointer-events': ['none', 'auto']
2228
+ }],
2229
+ /**
2230
+ * Resize
2231
+ * @see https://tailwindcss.com/docs/resize
2232
+ */
2233
+ resize: [{
2234
+ resize: ['none', 'y', 'x', '']
2235
+ }],
2236
+ /**
2237
+ * Scroll Behavior
2238
+ * @see https://tailwindcss.com/docs/scroll-behavior
2239
+ */
2240
+ 'scroll-behavior': [{
2241
+ scroll: ['auto', 'smooth']
2242
+ }],
2243
+ /**
2244
+ * Scroll Margin
2245
+ * @see https://tailwindcss.com/docs/scroll-margin
2246
+ */
2247
+ 'scroll-m': [{
2248
+ 'scroll-m': getSpacingWithArbitrary()
2249
+ }],
2250
+ /**
2251
+ * Scroll Margin X
2252
+ * @see https://tailwindcss.com/docs/scroll-margin
2253
+ */
2254
+ 'scroll-mx': [{
2255
+ 'scroll-mx': getSpacingWithArbitrary()
2256
+ }],
2257
+ /**
2258
+ * Scroll Margin Y
2259
+ * @see https://tailwindcss.com/docs/scroll-margin
2260
+ */
2261
+ 'scroll-my': [{
2262
+ 'scroll-my': getSpacingWithArbitrary()
2263
+ }],
2264
+ /**
2265
+ * Scroll Margin Start
2266
+ * @see https://tailwindcss.com/docs/scroll-margin
2267
+ */
2268
+ 'scroll-ms': [{
2269
+ 'scroll-ms': getSpacingWithArbitrary()
2270
+ }],
2271
+ /**
2272
+ * Scroll Margin End
2273
+ * @see https://tailwindcss.com/docs/scroll-margin
2274
+ */
2275
+ 'scroll-me': [{
2276
+ 'scroll-me': getSpacingWithArbitrary()
2277
+ }],
2278
+ /**
2279
+ * Scroll Margin Top
2280
+ * @see https://tailwindcss.com/docs/scroll-margin
2281
+ */
2282
+ 'scroll-mt': [{
2283
+ 'scroll-mt': getSpacingWithArbitrary()
2284
+ }],
2285
+ /**
2286
+ * Scroll Margin Right
2287
+ * @see https://tailwindcss.com/docs/scroll-margin
2288
+ */
2289
+ 'scroll-mr': [{
2290
+ 'scroll-mr': getSpacingWithArbitrary()
2291
+ }],
2292
+ /**
2293
+ * Scroll Margin Bottom
2294
+ * @see https://tailwindcss.com/docs/scroll-margin
2295
+ */
2296
+ 'scroll-mb': [{
2297
+ 'scroll-mb': getSpacingWithArbitrary()
2298
+ }],
2299
+ /**
2300
+ * Scroll Margin Left
2301
+ * @see https://tailwindcss.com/docs/scroll-margin
2302
+ */
2303
+ 'scroll-ml': [{
2304
+ 'scroll-ml': getSpacingWithArbitrary()
2305
+ }],
2306
+ /**
2307
+ * Scroll Padding
2308
+ * @see https://tailwindcss.com/docs/scroll-padding
2309
+ */
2310
+ 'scroll-p': [{
2311
+ 'scroll-p': getSpacingWithArbitrary()
2312
+ }],
2313
+ /**
2314
+ * Scroll Padding X
2315
+ * @see https://tailwindcss.com/docs/scroll-padding
2316
+ */
2317
+ 'scroll-px': [{
2318
+ 'scroll-px': getSpacingWithArbitrary()
2319
+ }],
2320
+ /**
2321
+ * Scroll Padding Y
2322
+ * @see https://tailwindcss.com/docs/scroll-padding
2323
+ */
2324
+ 'scroll-py': [{
2325
+ 'scroll-py': getSpacingWithArbitrary()
2326
+ }],
2327
+ /**
2328
+ * Scroll Padding Start
2329
+ * @see https://tailwindcss.com/docs/scroll-padding
2330
+ */
2331
+ 'scroll-ps': [{
2332
+ 'scroll-ps': getSpacingWithArbitrary()
2333
+ }],
2334
+ /**
2335
+ * Scroll Padding End
2336
+ * @see https://tailwindcss.com/docs/scroll-padding
2337
+ */
2338
+ 'scroll-pe': [{
2339
+ 'scroll-pe': getSpacingWithArbitrary()
2340
+ }],
2341
+ /**
2342
+ * Scroll Padding Top
2343
+ * @see https://tailwindcss.com/docs/scroll-padding
2344
+ */
2345
+ 'scroll-pt': [{
2346
+ 'scroll-pt': getSpacingWithArbitrary()
2347
+ }],
2348
+ /**
2349
+ * Scroll Padding Right
2350
+ * @see https://tailwindcss.com/docs/scroll-padding
2351
+ */
2352
+ 'scroll-pr': [{
2353
+ 'scroll-pr': getSpacingWithArbitrary()
2354
+ }],
2355
+ /**
2356
+ * Scroll Padding Bottom
2357
+ * @see https://tailwindcss.com/docs/scroll-padding
2358
+ */
2359
+ 'scroll-pb': [{
2360
+ 'scroll-pb': getSpacingWithArbitrary()
2361
+ }],
2362
+ /**
2363
+ * Scroll Padding Left
2364
+ * @see https://tailwindcss.com/docs/scroll-padding
2365
+ */
2366
+ 'scroll-pl': [{
2367
+ 'scroll-pl': getSpacingWithArbitrary()
2368
+ }],
2369
+ /**
2370
+ * Scroll Snap Align
2371
+ * @see https://tailwindcss.com/docs/scroll-snap-align
2372
+ */
2373
+ 'snap-align': [{
2374
+ snap: ['start', 'end', 'center', 'align-none']
2375
+ }],
2376
+ /**
2377
+ * Scroll Snap Stop
2378
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
2379
+ */
2380
+ 'snap-stop': [{
2381
+ snap: ['normal', 'always']
2382
+ }],
2383
+ /**
2384
+ * Scroll Snap Type
2385
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2386
+ */
2387
+ 'snap-type': [{
2388
+ snap: ['none', 'x', 'y', 'both']
2389
+ }],
2390
+ /**
2391
+ * Scroll Snap Type Strictness
2392
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2393
+ */
2394
+ 'snap-strictness': [{
2395
+ snap: ['mandatory', 'proximity']
2396
+ }],
2397
+ /**
2398
+ * Touch Action
2399
+ * @see https://tailwindcss.com/docs/touch-action
2400
+ */
2401
+ touch: [{
2402
+ touch: ['auto', 'none', 'manipulation']
2403
+ }],
2404
+ /**
2405
+ * Touch Action X
2406
+ * @see https://tailwindcss.com/docs/touch-action
2407
+ */
2408
+ 'touch-x': [{
2409
+ 'touch-pan': ['x', 'left', 'right']
2410
+ }],
2411
+ /**
2412
+ * Touch Action Y
2413
+ * @see https://tailwindcss.com/docs/touch-action
2414
+ */
2415
+ 'touch-y': [{
2416
+ 'touch-pan': ['y', 'up', 'down']
2417
+ }],
2418
+ /**
2419
+ * Touch Action Pinch Zoom
2420
+ * @see https://tailwindcss.com/docs/touch-action
2421
+ */
2422
+ 'touch-pz': ['touch-pinch-zoom'],
2423
+ /**
2424
+ * User Select
2425
+ * @see https://tailwindcss.com/docs/user-select
2426
+ */
2427
+ select: [{
2428
+ select: ['none', 'text', 'all', 'auto']
2429
+ }],
2430
+ /**
2431
+ * Will Change
2432
+ * @see https://tailwindcss.com/docs/will-change
2433
+ */
2434
+ 'will-change': [{
2435
+ 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue]
2436
+ }],
2437
+ // SVG
2438
+ /**
2439
+ * Fill
2440
+ * @see https://tailwindcss.com/docs/fill
2441
+ */
2442
+ fill: [{
2443
+ fill: [colors, 'none']
2444
+ }],
2445
+ /**
2446
+ * Stroke Width
2447
+ * @see https://tailwindcss.com/docs/stroke-width
2448
+ */
2449
+ 'stroke-w': [{
2450
+ stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2451
+ }],
2452
+ /**
2453
+ * Stroke
2454
+ * @see https://tailwindcss.com/docs/stroke
2455
+ */
2456
+ stroke: [{
2457
+ stroke: [colors, 'none']
2458
+ }],
2459
+ // Accessibility
2460
+ /**
2461
+ * Screen Readers
2462
+ * @see https://tailwindcss.com/docs/screen-readers
2463
+ */
2464
+ sr: ['sr-only', 'not-sr-only'],
2465
+ /**
2466
+ * Forced Color Adjust
2467
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2468
+ */
2469
+ 'forced-color-adjust': [{
2470
+ 'forced-color-adjust': ['auto', 'none']
2471
+ }]
2472
+ },
2473
+ conflictingClassGroups: {
2474
+ overflow: ['overflow-x', 'overflow-y'],
2475
+ overscroll: ['overscroll-x', 'overscroll-y'],
2476
+ inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
2477
+ 'inset-x': ['right', 'left'],
2478
+ 'inset-y': ['top', 'bottom'],
2479
+ flex: ['basis', 'grow', 'shrink'],
2480
+ gap: ['gap-x', 'gap-y'],
2481
+ p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
2482
+ px: ['pr', 'pl'],
2483
+ py: ['pt', 'pb'],
2484
+ m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
2485
+ mx: ['mr', 'ml'],
2486
+ my: ['mt', 'mb'],
2487
+ size: ['w', 'h'],
2488
+ 'font-size': ['leading'],
2489
+ 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
2490
+ 'fvn-ordinal': ['fvn-normal'],
2491
+ 'fvn-slashed-zero': ['fvn-normal'],
2492
+ 'fvn-figure': ['fvn-normal'],
2493
+ 'fvn-spacing': ['fvn-normal'],
2494
+ 'fvn-fraction': ['fvn-normal'],
2495
+ 'line-clamp': ['display', 'overflow'],
2496
+ 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'],
2497
+ 'rounded-s': ['rounded-ss', 'rounded-es'],
2498
+ 'rounded-e': ['rounded-se', 'rounded-ee'],
2499
+ 'rounded-t': ['rounded-tl', 'rounded-tr'],
2500
+ 'rounded-r': ['rounded-tr', 'rounded-br'],
2501
+ 'rounded-b': ['rounded-br', 'rounded-bl'],
2502
+ 'rounded-l': ['rounded-tl', 'rounded-bl'],
2503
+ 'border-spacing': ['border-spacing-x', 'border-spacing-y'],
2504
+ 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
2505
+ 'border-w-x': ['border-w-r', 'border-w-l'],
2506
+ 'border-w-y': ['border-w-t', 'border-w-b'],
2507
+ 'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
2508
+ 'border-color-x': ['border-color-r', 'border-color-l'],
2509
+ 'border-color-y': ['border-color-t', 'border-color-b'],
2510
+ 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
2511
+ 'scroll-mx': ['scroll-mr', 'scroll-ml'],
2512
+ 'scroll-my': ['scroll-mt', 'scroll-mb'],
2513
+ 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
2514
+ 'scroll-px': ['scroll-pr', 'scroll-pl'],
2515
+ 'scroll-py': ['scroll-pt', 'scroll-pb'],
2516
+ touch: ['touch-x', 'touch-y', 'touch-pz'],
2517
+ 'touch-x': ['touch'],
2518
+ 'touch-y': ['touch'],
2519
+ 'touch-pz': ['touch']
2520
+ },
2521
+ conflictingClassGroupModifiers: {
2522
+ 'font-size': ['leading']
2523
+ }
2524
+ };
2525
+ };
2526
+ const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
2527
+
2528
+ function cn(...inputs) {
2529
+ return twMerge(clsx(inputs));
2530
+ }
2531
+
2532
+ const Button = React.forwardRef(({ className, variant = 'primary', size = 'md', children, ...props }, ref) => {
2533
+ return (jsx("button", { className: cn('inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none', {
2534
+ // Variants
2535
+ 'bg-primary-600 text-white hover:bg-primary-700': variant === 'primary',
2536
+ 'bg-gray-200 text-gray-900 hover:bg-gray-300': variant === 'secondary',
2537
+ 'border border-gray-300 bg-transparent hover:bg-gray-50': variant === 'outline',
2538
+ 'hover:bg-gray-100': variant === 'ghost',
2539
+ // Sizes
2540
+ 'h-8 px-3 text-sm': size === 'sm',
2541
+ 'h-10 px-4 py-2': size === 'md',
2542
+ 'h-11 px-6 text-lg': size === 'lg',
2543
+ }, className), ref: ref, ...props, children: children }));
2544
+ });
2545
+ Button.displayName = 'Button';
2546
+
2547
+ export { Button, cn };
2548
+ //# sourceMappingURL=index.esm.js.map