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