bromcom-ui 2.12.1 → 2.12.2-rc.1

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 (118) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-28c2da95.entry.js → p-008825e9.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-adc705e4.entry.js → p-05fb1c0d.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-4a14dcce.entry.js → p-07a23b37.entry.js} +2 -2
  5. package/dist/bromcom-ui/p-08c75801.js +5 -0
  6. package/dist/bromcom-ui/{p-65c3745b.js → p-09dd8940.js} +1 -1
  7. package/dist/bromcom-ui/{p-d12c23ef.entry.js → p-0d6f146b.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-bb062396.entry.js → p-1686d554.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-894491ba.entry.js → p-2410665a.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-0c71ac41.entry.js → p-34a4d9cc.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-272c20fa.entry.js → p-36d493c0.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-1c0d550d.entry.js → p-38cfc7a2.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-beee9228.entry.js → p-496ce707.entry.js} +1 -1
  14. package/dist/bromcom-ui/p-49b16843.entry.js +5 -0
  15. package/dist/bromcom-ui/{p-421cff4a.entry.js → p-4c0c2d0d.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-911510fd.entry.js → p-59b6881a.entry.js} +1 -1
  17. package/dist/bromcom-ui/p-5a6da455.entry.js +5 -0
  18. package/dist/bromcom-ui/{p-49f6976d.entry.js → p-66fb9365.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-fc04fa93.js → p-76f3765e.js} +1 -1
  20. package/dist/bromcom-ui/{p-7c8b099f.entry.js → p-858c43a5.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-bde0f04a.entry.js → p-86965d28.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-67eac255.entry.js → p-8b838bc6.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-1b422511.entry.js → p-8f40a21a.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-f197ab71.entry.js → p-93863713.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-43728934.entry.js → p-a20056c8.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-6e5bed12.js → p-c5bafb96.js} +1 -1
  27. package/dist/bromcom-ui/{p-155da55c.js → p-d1298c40.js} +1 -1
  28. package/dist/bromcom-ui/{p-8b2166b4.entry.js → p-d38326a1.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-63f582ce.js → p-d98d6060.js} +1 -1
  30. package/dist/bromcom-ui/{p-d95588c5.js → p-db6f63b7.js} +1 -1
  31. package/dist/bromcom-ui/{p-f66b54af.entry.js → p-e10ed966.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-e4ce91d5.entry.js → p-e1159c94.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-310657c7.entry.js → p-ee223f5f.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-8d8b4193.entry.js → p-eedab0f1.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-b7142d16.entry.js → p-f5928068.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-01aece46.entry.js → p-f71abd15.entry.js} +1 -1
  37. package/dist/cjs/bcm-accordion_63.cjs.entry.js +7 -7
  38. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  39. package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +5 -5
  40. package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +5 -5
  41. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  42. package/dist/cjs/bcm-caption.cjs.entry.js +4 -4
  43. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  44. package/dist/cjs/bcm-chip-group.cjs.entry.js +4 -4
  45. package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
  46. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +2 -2
  47. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  48. package/dist/cjs/bcm-form-2.cjs.entry.js +2 -2
  49. package/dist/cjs/bcm-input-2.cjs.entry.js +4 -4
  50. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  51. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +5 -5
  52. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
  53. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
  54. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
  55. package/dist/cjs/bcm-number-input.cjs.entry.js +6 -6
  56. package/dist/cjs/bcm-popover.cjs.entry.js +4 -4
  57. package/dist/cjs/bcm-range.cjs.entry.js +2 -2
  58. package/dist/cjs/bcm-skeleton.cjs.entry.js +5 -5
  59. package/dist/cjs/bcm-table.cjs.entry.js +4 -4
  60. package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
  61. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  62. package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
  63. package/dist/cjs/bromcom-ui.cjs.js +2 -2
  64. package/dist/cjs/{generate-6e358f9a.js → generate-655d8a9d.js} +1 -1
  65. package/dist/cjs/{global-070f1384.js → global-76cf2eb1.js} +1 -1
  66. package/dist/cjs/{index-d3b89435.js → index-5279dea2.js} +347 -386
  67. package/dist/cjs/{input.style-890ee369.js → input.style-b5676e6a.js} +1 -1
  68. package/dist/cjs/loader.cjs.js +2 -2
  69. package/dist/cjs/{number-helper-a0552778.js → number-helper-b6f669b2.js} +1 -1
  70. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  71. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  72. package/dist/cjs/{package-f3052296.js → package-79bffd7c.js} +1 -1
  73. package/dist/cjs/{validators-9e4395ac.js → validators-8a657450.js} +1 -1
  74. package/dist/collection/components/organism/list/list.js +2 -2
  75. package/dist/components/generate.js +1 -1
  76. package/dist/components/index5.js +347 -386
  77. package/dist/components/list.js +2 -2
  78. package/dist/esm/bcm-accordion_63.entry.js +7 -7
  79. package/dist/esm/bcm-alert.entry.js +2 -2
  80. package/dist/esm/bcm-attendance-actions-comment.entry.js +5 -5
  81. package/dist/esm/bcm-attendance-actions-dropdown.entry.js +5 -5
  82. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  83. package/dist/esm/bcm-caption.entry.js +4 -4
  84. package/dist/esm/bcm-card.entry.js +2 -2
  85. package/dist/esm/bcm-chip-group.entry.js +4 -4
  86. package/dist/esm/bcm-date-picker.entry.js +2 -2
  87. package/dist/esm/bcm-datetime-picker.entry.js +2 -2
  88. package/dist/esm/bcm-default.entry.js +2 -2
  89. package/dist/esm/bcm-form-2.entry.js +2 -2
  90. package/dist/esm/bcm-input-2.entry.js +4 -4
  91. package/dist/esm/bcm-input-custom.entry.js +2 -2
  92. package/dist/esm/bcm-input-dropdown.entry.js +5 -5
  93. package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
  94. package/dist/esm/bcm-modal-2-header.entry.js +4 -4
  95. package/dist/esm/bcm-modal-2.entry.js +4 -4
  96. package/dist/esm/bcm-number-input.entry.js +6 -6
  97. package/dist/esm/bcm-popover.entry.js +4 -4
  98. package/dist/esm/bcm-range.entry.js +2 -2
  99. package/dist/esm/bcm-skeleton.entry.js +5 -5
  100. package/dist/esm/bcm-table.entry.js +4 -4
  101. package/dist/esm/bcm-tag.entry.js +3 -3
  102. package/dist/esm/bcm-time-picker.entry.js +2 -2
  103. package/dist/esm/bcm-toast.entry.js +2 -2
  104. package/dist/esm/bromcom-ui.js +2 -2
  105. package/dist/esm/{generate-2af3f6c6.js → generate-5b2c41dd.js} +1 -1
  106. package/dist/esm/{global-e0801f6b.js → global-1a041ae3.js} +1 -1
  107. package/dist/esm/{index-9f698d35.js → index-3bc8c6e3.js} +347 -386
  108. package/dist/esm/{input.style-fadcc0bd.js → input.style-e855c0f3.js} +1 -1
  109. package/dist/esm/loader.js +2 -2
  110. package/dist/esm/{number-helper-b496c950.js → number-helper-73915feb.js} +1 -1
  111. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  112. package/dist/esm/old-bcm-popover.entry.js +2 -2
  113. package/dist/esm/{package-5d6c3b5f.js → package-a0f98e5f.js} +1 -1
  114. package/dist/esm/{validators-178f5d88.js → validators-af8f369d.js} +1 -1
  115. package/package.json +1 -1
  116. package/dist/bromcom-ui/p-24b620ac.entry.js +0 -5
  117. package/dist/bromcom-ui/p-ccc61045.js +0 -5
  118. package/dist/bromcom-ui/p-d6c9aead.entry.js +0 -5
@@ -2,24 +2,57 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import { c as createCommonjsModule } from './_commonjsHelpers-7002e5de.js';
5
+ var a=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,l=t=>!t||typeof t!="object"||Object.keys(t).length===0,u=(t,e)=>JSON.stringify(t)===JSON.stringify(e);function i(t,e){t.forEach(function(n){Array.isArray(n)?i(n,e):e.push(n);});}function y(t){let e=[];return i(t,e),e}var x=(...t)=>y(t).filter(Boolean),p=(t,e)=>{let n={},c=Object.keys(t),f=Object.keys(e);for(let o of c)if(f.includes(o)){let r=t[o],s=e[o];typeof r=="object"&&typeof s=="object"?n[o]=p(r,s):n[o]=s+" "+r;}else n[o]=t[o];for(let o of f)c.includes(o)||(n[o]=e[o]);return n},g=t=>!t||typeof t!="string"?t:t.replace(/\s+/g," ").trim();
6
6
 
7
- var l=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,u=e=>!e||typeof e!="object"||Object.keys(e).length===0,x=(e,o)=>JSON.stringify(e)===JSON.stringify(o);function i(e,o){e.forEach(function(r){Array.isArray(r)?i(r,o):o.push(r);});}function y(e){let o=[];return i(e,o),o}var a=(...e)=>y(e).filter(Boolean),p=(e,o)=>{let r={},c=Object.keys(e),f=Object.keys(o);for(let t of c)if(f.includes(t)){let s=e[t],n=o[t];typeof s=="object"&&typeof n=="object"?r[t]=p(s,n):Array.isArray(s)||Array.isArray(n)?r[t]=a(n,s):r[t]=n+" "+s;}else r[t]=e[t];for(let t of f)c.includes(t)||(r[t]=o[t]);return r},g=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();
8
-
9
- var bundleCjs = createCommonjsModule(function (module, exports) {
7
+ /**
8
+ * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
9
+ *
10
+ * Specifically:
11
+ * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
12
+ * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
13
+ *
14
+ * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
15
+ */
16
+ function twJoin() {
17
+ var index = 0;
18
+ var argument;
19
+ var resolvedValue;
20
+ var string = '';
21
+ while (index < arguments.length) {
22
+ if (argument = arguments[index++]) {
23
+ if (resolvedValue = toValue(argument)) {
24
+ string && (string += ' ');
25
+ string += resolvedValue;
26
+ }
27
+ }
28
+ }
29
+ return string;
30
+ }
31
+ function toValue(mix) {
32
+ if (typeof mix === 'string') {
33
+ return mix;
34
+ }
35
+ var resolvedValue;
36
+ var string = '';
37
+ for (var k = 0; k < mix.length; k++) {
38
+ if (mix[k]) {
39
+ if (resolvedValue = toValue(mix[k])) {
40
+ string && (string += ' ');
41
+ string += resolvedValue;
42
+ }
43
+ }
44
+ }
45
+ return string;
46
+ }
10
47
 
11
- Object.defineProperty(exports, Symbol.toStringTag, {
12
- value: 'Module'
13
- });
14
- const CLASS_PART_SEPARATOR = '-';
48
+ var CLASS_PART_SEPARATOR = '-';
15
49
  function createClassUtils(config) {
16
- const classMap = createClassMap(config);
17
- const {
18
- conflictingClassGroups,
19
- conflictingClassGroupModifiers
20
- } = config;
50
+ var classMap = createClassMap(config);
51
+ var conflictingClassGroups = config.conflictingClassGroups,
52
+ _config$conflictingCl = config.conflictingClassGroupModifiers,
53
+ conflictingClassGroupModifiers = _config$conflictingCl === void 0 ? {} : _config$conflictingCl;
21
54
  function getClassGroupId(className) {
22
- const classParts = className.split(CLASS_PART_SEPARATOR);
55
+ var classParts = className.split(CLASS_PART_SEPARATOR);
23
56
  // 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.
24
57
  if (classParts[0] === '' && classParts.length !== 1) {
25
58
  classParts.shift();
@@ -27,40 +60,41 @@ function createClassUtils(config) {
27
60
  return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
28
61
  }
29
62
  function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {
30
- const conflicts = conflictingClassGroups[classGroupId] || [];
63
+ var conflicts = conflictingClassGroups[classGroupId] || [];
31
64
  if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
32
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
65
+ return [].concat(conflicts, conflictingClassGroupModifiers[classGroupId]);
33
66
  }
34
67
  return conflicts;
35
68
  }
36
69
  return {
37
- getClassGroupId,
38
- getConflictingClassGroupIds
70
+ getClassGroupId: getClassGroupId,
71
+ getConflictingClassGroupIds: getConflictingClassGroupIds
39
72
  };
40
73
  }
41
74
  function getGroupRecursive(classParts, classPartObject) {
42
75
  if (classParts.length === 0) {
43
76
  return classPartObject.classGroupId;
44
77
  }
45
- const currentClassPart = classParts[0];
46
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
47
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
78
+ var currentClassPart = classParts[0];
79
+ var nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
80
+ var classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
48
81
  if (classGroupFromNextClassPart) {
49
82
  return classGroupFromNextClassPart;
50
83
  }
51
84
  if (classPartObject.validators.length === 0) {
52
85
  return undefined;
53
86
  }
54
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
55
- return classPartObject.validators.find(({
56
- validator
57
- }) => validator(classRest))?.classGroupId;
87
+ var classRest = classParts.join(CLASS_PART_SEPARATOR);
88
+ return classPartObject.validators.find(function (_ref) {
89
+ var validator = _ref.validator;
90
+ return validator(classRest);
91
+ })?.classGroupId;
58
92
  }
59
- const arbitraryPropertyRegex = /^\[(.+)\]$/;
93
+ var arbitraryPropertyRegex = /^\[(.+)\]$/;
60
94
  function getGroupIdForArbitraryProperty(className) {
61
95
  if (arbitraryPropertyRegex.test(className)) {
62
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
63
- const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
96
+ var arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
97
+ var property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
64
98
  if (property) {
65
99
  // I use two dots here because one dot is used as prefix for class groups in plugins
66
100
  return 'arbitrary..' + property;
@@ -71,24 +105,24 @@ function getGroupIdForArbitraryProperty(className) {
71
105
  * Exported for testing only
72
106
  */
73
107
  function createClassMap(config) {
74
- const {
75
- theme,
76
- prefix
77
- } = config;
78
- const classMap = {
108
+ var theme = config.theme,
109
+ prefix = config.prefix;
110
+ var classMap = {
79
111
  nextPart: new Map(),
80
112
  validators: []
81
113
  };
82
- const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
83
- prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
114
+ var prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
115
+ prefixedClassGroupEntries.forEach(function (_ref2) {
116
+ var classGroupId = _ref2[0],
117
+ classGroup = _ref2[1];
84
118
  processClassesRecursively(classGroup, classMap, classGroupId, theme);
85
119
  });
86
120
  return classMap;
87
121
  }
88
122
  function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
89
- classGroup.forEach(classDefinition => {
123
+ classGroup.forEach(function (classDefinition) {
90
124
  if (typeof classDefinition === 'string') {
91
- const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
125
+ var classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
92
126
  classPartObjectToEdit.classGroupId = classGroupId;
93
127
  return;
94
128
  }
@@ -99,18 +133,20 @@ function processClassesRecursively(classGroup, classPartObject, classGroupId, th
99
133
  }
100
134
  classPartObject.validators.push({
101
135
  validator: classDefinition,
102
- classGroupId
136
+ classGroupId: classGroupId
103
137
  });
104
138
  return;
105
139
  }
106
- Object.entries(classDefinition).forEach(([key, classGroup]) => {
140
+ Object.entries(classDefinition).forEach(function (_ref3) {
141
+ var key = _ref3[0],
142
+ classGroup = _ref3[1];
107
143
  processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
108
144
  });
109
145
  });
110
146
  }
111
147
  function getPart(classPartObject, path) {
112
- let currentClassPartObject = classPartObject;
113
- path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
148
+ var currentClassPartObject = classPartObject;
149
+ path.split(CLASS_PART_SEPARATOR).forEach(function (pathPart) {
114
150
  if (!currentClassPartObject.nextPart.has(pathPart)) {
115
151
  currentClassPartObject.nextPart.set(pathPart, {
116
152
  nextPart: new Map(),
@@ -128,13 +164,19 @@ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
128
164
  if (!prefix) {
129
165
  return classGroupEntries;
130
166
  }
131
- return classGroupEntries.map(([classGroupId, classGroup]) => {
132
- const prefixedClassGroup = classGroup.map(classDefinition => {
167
+ return classGroupEntries.map(function (_ref4) {
168
+ var classGroupId = _ref4[0],
169
+ classGroup = _ref4[1];
170
+ var prefixedClassGroup = classGroup.map(function (classDefinition) {
133
171
  if (typeof classDefinition === 'string') {
134
172
  return prefix + classDefinition;
135
173
  }
136
174
  if (typeof classDefinition === 'object') {
137
- return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
175
+ return Object.fromEntries(Object.entries(classDefinition).map(function (_ref5) {
176
+ var key = _ref5[0],
177
+ value = _ref5[1];
178
+ return [prefix + key, value];
179
+ }));
138
180
  }
139
181
  return classDefinition;
140
182
  });
@@ -146,13 +188,15 @@ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
146
188
  function createLruCache(maxCacheSize) {
147
189
  if (maxCacheSize < 1) {
148
190
  return {
149
- get: () => undefined,
150
- set: () => {}
191
+ get: function get() {
192
+ return undefined;
193
+ },
194
+ set: function set() {}
151
195
  };
152
196
  }
153
- let cacheSize = 0;
154
- let cache = new Map();
155
- let previousCache = new Map();
197
+ var cacheSize = 0;
198
+ var cache = new Map();
199
+ var previousCache = new Map();
156
200
  function update(key, value) {
157
201
  cache.set(key, value);
158
202
  cacheSize++;
@@ -163,8 +207,8 @@ function createLruCache(maxCacheSize) {
163
207
  }
164
208
  }
165
209
  return {
166
- get(key) {
167
- let value = cache.get(key);
210
+ get: function get(key) {
211
+ var value = cache.get(key);
168
212
  if (value !== undefined) {
169
213
  return value;
170
214
  }
@@ -173,7 +217,7 @@ function createLruCache(maxCacheSize) {
173
217
  return value;
174
218
  }
175
219
  },
176
- set(key, value) {
220
+ set: function set(key, value) {
177
221
  if (cache.has(key)) {
178
222
  cache.set(key, value);
179
223
  } else {
@@ -182,20 +226,21 @@ function createLruCache(maxCacheSize) {
182
226
  }
183
227
  };
184
228
  }
185
- const IMPORTANT_MODIFIER = '!';
229
+
230
+ var IMPORTANT_MODIFIER = '!';
186
231
  function createSplitModifiers(config) {
187
- const separator = config.separator;
188
- const isSeparatorSingleCharacter = separator.length === 1;
189
- const firstSeparatorCharacter = separator[0];
190
- const separatorLength = separator.length;
232
+ var separator = config.separator || ':';
233
+ var isSeparatorSingleCharacter = separator.length === 1;
234
+ var firstSeparatorCharacter = separator[0];
235
+ var separatorLength = separator.length;
191
236
  // splitModifiers inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
192
237
  return function splitModifiers(className) {
193
- const modifiers = [];
194
- let bracketDepth = 0;
195
- let modifierStart = 0;
196
- let postfixModifierPosition;
197
- for (let index = 0; index < className.length; index++) {
198
- let currentCharacter = className[index];
238
+ var modifiers = [];
239
+ var bracketDepth = 0;
240
+ var modifierStart = 0;
241
+ var postfixModifierPosition;
242
+ for (var index = 0; index < className.length; index++) {
243
+ var currentCharacter = className[index];
199
244
  if (bracketDepth === 0) {
200
245
  if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
201
246
  modifiers.push(className.slice(modifierStart, index));
@@ -213,15 +258,15 @@ function createSplitModifiers(config) {
213
258
  bracketDepth--;
214
259
  }
215
260
  }
216
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
217
- const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
218
- const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
219
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
261
+ var baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
262
+ var hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
263
+ var baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
264
+ var maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
220
265
  return {
221
- modifiers,
222
- hasImportantModifier,
223
- baseClassName,
224
- maybePostfixModifierPosition
266
+ modifiers: modifiers,
267
+ hasImportantModifier: hasImportantModifier,
268
+ baseClassName: baseClassName,
269
+ maybePostfixModifierPosition: maybePostfixModifierPosition
225
270
  };
226
271
  };
227
272
  }
@@ -234,20 +279,21 @@ function sortModifiers(modifiers) {
234
279
  if (modifiers.length <= 1) {
235
280
  return modifiers;
236
281
  }
237
- const sortedModifiers = [];
238
- let unsortedModifiers = [];
239
- modifiers.forEach(modifier => {
240
- const isArbitraryVariant = modifier[0] === '[';
282
+ var sortedModifiers = [];
283
+ var unsortedModifiers = [];
284
+ modifiers.forEach(function (modifier) {
285
+ var isArbitraryVariant = modifier[0] === '[';
241
286
  if (isArbitraryVariant) {
242
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
287
+ sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort().concat([modifier]));
243
288
  unsortedModifiers = [];
244
289
  } else {
245
290
  unsortedModifiers.push(modifier);
246
291
  }
247
292
  });
248
- sortedModifiers.push(...unsortedModifiers.sort());
293
+ sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort());
249
294
  return sortedModifiers;
250
295
  }
296
+
251
297
  function createConfigUtils(config) {
252
298
  return {
253
299
  cache: createLruCache(config.cacheSize),
@@ -255,13 +301,12 @@ function createConfigUtils(config) {
255
301
  ...createClassUtils(config)
256
302
  };
257
303
  }
258
- const SPLIT_CLASSES_REGEX = /\s+/;
304
+
305
+ var SPLIT_CLASSES_REGEX = /\s+/;
259
306
  function mergeClassList(classList, configUtils) {
260
- const {
261
- splitModifiers,
262
- getClassGroupId,
263
- getConflictingClassGroupIds
264
- } = configUtils;
307
+ var splitModifiers = configUtils.splitModifiers,
308
+ getClassGroupId = configUtils.getClassGroupId,
309
+ getConflictingClassGroupIds = configUtils.getConflictingClassGroupIds;
265
310
  /**
266
311
  * Set of classGroupIds in following format:
267
312
  * `{importantModifier}{variantModifiers}{classGroupId}`
@@ -269,109 +314,77 @@ function mergeClassList(classList, configUtils) {
269
314
  * @example 'hover:focus:bg-color'
270
315
  * @example 'md:!pr'
271
316
  */
272
- const classGroupsInConflict = new Set();
273
- return classList.trim().split(SPLIT_CLASSES_REGEX).map(originalClassName => {
274
- const {
275
- modifiers,
276
- hasImportantModifier,
277
- baseClassName,
278
- maybePostfixModifierPosition
279
- } = splitModifiers(originalClassName);
280
- let classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
281
- let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
317
+ var classGroupsInConflict = new Set();
318
+ return classList.trim().split(SPLIT_CLASSES_REGEX).map(function (originalClassName) {
319
+ var _splitModifiers = splitModifiers(originalClassName),
320
+ modifiers = _splitModifiers.modifiers,
321
+ hasImportantModifier = _splitModifiers.hasImportantModifier,
322
+ baseClassName = _splitModifiers.baseClassName,
323
+ maybePostfixModifierPosition = _splitModifiers.maybePostfixModifierPosition;
324
+ var classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
325
+ var hasPostfixModifier = Boolean(maybePostfixModifierPosition);
282
326
  if (!classGroupId) {
283
327
  if (!maybePostfixModifierPosition) {
284
328
  return {
285
329
  isTailwindClass: false,
286
- originalClassName
330
+ originalClassName: originalClassName
287
331
  };
288
332
  }
289
333
  classGroupId = getClassGroupId(baseClassName);
290
334
  if (!classGroupId) {
291
335
  return {
292
336
  isTailwindClass: false,
293
- originalClassName
337
+ originalClassName: originalClassName
294
338
  };
295
339
  }
296
340
  hasPostfixModifier = false;
297
341
  }
298
- const variantModifier = sortModifiers(modifiers).join(':');
299
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
342
+ var variantModifier = sortModifiers(modifiers).join(':');
343
+ var modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
300
344
  return {
301
345
  isTailwindClass: true,
302
- modifierId,
303
- classGroupId,
304
- originalClassName,
305
- hasPostfixModifier
346
+ modifierId: modifierId,
347
+ classGroupId: classGroupId,
348
+ originalClassName: originalClassName,
349
+ hasPostfixModifier: hasPostfixModifier
306
350
  };
307
351
  }).reverse()
308
352
  // Last class in conflict wins, so we need to filter conflicting classes in reverse order.
309
- .filter(parsed => {
353
+ .filter(function (parsed) {
310
354
  if (!parsed.isTailwindClass) {
311
355
  return true;
312
356
  }
313
- const {
314
- modifierId,
315
- classGroupId,
316
- hasPostfixModifier
317
- } = parsed;
318
- const classId = modifierId + classGroupId;
357
+ var modifierId = parsed.modifierId,
358
+ classGroupId = parsed.classGroupId,
359
+ hasPostfixModifier = parsed.hasPostfixModifier;
360
+ var classId = modifierId + classGroupId;
319
361
  if (classGroupsInConflict.has(classId)) {
320
362
  return false;
321
363
  }
322
364
  classGroupsInConflict.add(classId);
323
- getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(group => classGroupsInConflict.add(modifierId + group));
365
+ getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(function (group) {
366
+ return classGroupsInConflict.add(modifierId + group);
367
+ });
324
368
  return true;
325
- }).reverse().map(parsed => parsed.originalClassName).join(' ');
369
+ }).reverse().map(function (parsed) {
370
+ return parsed.originalClassName;
371
+ }).join(' ');
326
372
  }
327
373
 
328
- /**
329
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
330
- *
331
- * Specifically:
332
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
333
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
334
- *
335
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
336
- */
337
- function twJoin() {
338
- let index = 0;
339
- let argument;
340
- let resolvedValue;
341
- let string = '';
342
- while (index < arguments.length) {
343
- if (argument = arguments[index++]) {
344
- if (resolvedValue = toValue(argument)) {
345
- string && (string += ' ');
346
- string += resolvedValue;
347
- }
348
- }
349
- }
350
- return string;
351
- }
352
- function toValue(mix) {
353
- if (typeof mix === 'string') {
354
- return mix;
355
- }
356
- let resolvedValue;
357
- let string = '';
358
- for (let k = 0; k < mix.length; k++) {
359
- if (mix[k]) {
360
- if (resolvedValue = toValue(mix[k])) {
361
- string && (string += ' ');
362
- string += resolvedValue;
363
- }
364
- }
374
+ function createTailwindMerge() {
375
+ for (var _len = arguments.length, createConfig = new Array(_len), _key = 0; _key < _len; _key++) {
376
+ createConfig[_key] = arguments[_key];
365
377
  }
366
- return string;
367
- }
368
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
369
- let configUtils;
370
- let cacheGet;
371
- let cacheSet;
372
- let functionToCall = initTailwindMerge;
378
+ var configUtils;
379
+ var cacheGet;
380
+ var cacheSet;
381
+ var functionToCall = initTailwindMerge;
373
382
  function initTailwindMerge(classList) {
374
- const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
383
+ var firstCreateConfig = createConfig[0],
384
+ restCreateConfig = createConfig.slice(1);
385
+ var config = restCreateConfig.reduce(function (previousConfig, createConfigCurrent) {
386
+ return createConfigCurrent(previousConfig);
387
+ }, firstCreateConfig());
375
388
  configUtils = createConfigUtils(config);
376
389
  cacheGet = configUtils.cache.get;
377
390
  cacheSet = configUtils.cache.set;
@@ -379,11 +392,11 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
379
392
  return tailwindMerge(classList);
380
393
  }
381
394
  function tailwindMerge(classList) {
382
- const cachedResult = cacheGet(classList);
395
+ var cachedResult = cacheGet(classList);
383
396
  if (cachedResult) {
384
397
  return cachedResult;
385
398
  }
386
- const result = mergeClassList(classList, configUtils);
399
+ var result = mergeClassList(classList, configUtils);
387
400
  cacheSet(classList, result);
388
401
  return result;
389
402
  }
@@ -391,156 +404,166 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
391
404
  return functionToCall(twJoin.apply(null, arguments));
392
405
  };
393
406
  }
407
+
394
408
  function fromTheme(key) {
395
- const themeGetter = theme => theme[key] || [];
409
+ var themeGetter = function themeGetter(theme) {
410
+ return theme[key] || [];
411
+ };
396
412
  themeGetter.isThemeGetter = true;
397
413
  return themeGetter;
398
414
  }
399
- const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
400
- const fractionRegex = /^\d+\/\d+$/;
401
- const stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);
402
- const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
403
- 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$/;
404
- const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
405
- // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
406
- const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
407
- const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
415
+
416
+ var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
417
+ var fractionRegex = /^\d+\/\d+$/;
418
+ var stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);
419
+ var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
420
+ var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
421
+ // Shadow always begins with x and y offset separated by underscore
422
+ var shadowRegex = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
408
423
  function isLength(value) {
409
- return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
424
+ return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value) || isArbitraryLength(value);
410
425
  }
411
426
  function isArbitraryLength(value) {
412
427
  return getIsArbitraryValue(value, 'length', isLengthOnly);
413
428
  }
414
- function isNumber(value) {
415
- return Boolean(value) && !Number.isNaN(Number(value));
429
+ function isArbitrarySize(value) {
430
+ return getIsArbitraryValue(value, 'size', isNever);
431
+ }
432
+ function isArbitraryPosition(value) {
433
+ return getIsArbitraryValue(value, 'position', isNever);
434
+ }
435
+ function isArbitraryUrl(value) {
436
+ return getIsArbitraryValue(value, 'url', isUrl);
416
437
  }
417
438
  function isArbitraryNumber(value) {
418
439
  return getIsArbitraryValue(value, 'number', isNumber);
419
440
  }
420
- function isInteger(value) {
421
- return Boolean(value) && Number.isInteger(Number(value));
441
+ function isNumber(value) {
442
+ return !Number.isNaN(Number(value));
422
443
  }
423
444
  function isPercent(value) {
424
445
  return value.endsWith('%') && isNumber(value.slice(0, -1));
425
446
  }
447
+ function isInteger(value) {
448
+ return isIntegerOnly(value) || getIsArbitraryValue(value, 'number', isIntegerOnly);
449
+ }
426
450
  function isArbitraryValue(value) {
427
451
  return arbitraryValueRegex.test(value);
428
452
  }
453
+ function isAny() {
454
+ return true;
455
+ }
429
456
  function isTshirtSize(value) {
430
457
  return tshirtUnitRegex.test(value);
431
458
  }
432
- const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
433
- function isArbitrarySize(value) {
434
- return getIsArbitraryValue(value, sizeLabels, isNever);
435
- }
436
- function isArbitraryPosition(value) {
437
- return getIsArbitraryValue(value, 'position', isNever);
438
- }
439
- const imageLabels = /*#__PURE__*/new Set(['image', 'url']);
440
- function isArbitraryImage(value) {
441
- return getIsArbitraryValue(value, imageLabels, isImage);
442
- }
443
459
  function isArbitraryShadow(value) {
444
460
  return getIsArbitraryValue(value, '', isShadow);
445
461
  }
446
- function isAny() {
447
- return true;
448
- }
449
462
  function getIsArbitraryValue(value, label, testValue) {
450
- const result = arbitraryValueRegex.exec(value);
463
+ var result = arbitraryValueRegex.exec(value);
451
464
  if (result) {
452
465
  if (result[1]) {
453
- return typeof label === 'string' ? result[1] === label : label.has(result[1]);
466
+ return result[1] === label;
454
467
  }
455
468
  return testValue(result[2]);
456
469
  }
457
470
  return false;
458
471
  }
459
472
  function isLengthOnly(value) {
460
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
461
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
462
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
463
- return lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
473
+ return lengthUnitRegex.test(value);
464
474
  }
465
475
  function isNever() {
466
476
  return false;
467
477
  }
478
+ function isUrl(value) {
479
+ return value.startsWith('url(');
480
+ }
481
+ function isIntegerOnly(value) {
482
+ return Number.isInteger(Number(value));
483
+ }
468
484
  function isShadow(value) {
469
485
  return shadowRegex.test(value);
470
486
  }
471
- function isImage(value) {
472
- return imageRegex.test(value);
473
- }
474
- const validators = /*#__PURE__*/Object.defineProperty({
475
- __proto__: null,
476
- isAny,
477
- isArbitraryImage,
478
- isArbitraryLength,
479
- isArbitraryNumber,
480
- isArbitraryPosition,
481
- isArbitraryShadow,
482
- isArbitrarySize,
483
- isArbitraryValue,
484
- isInteger,
485
- isLength,
486
- isNumber,
487
- isPercent,
488
- isTshirtSize
489
- }, Symbol.toStringTag, {
490
- value: 'Module'
491
- });
487
+
492
488
  function getDefaultConfig() {
493
- const colors = fromTheme('colors');
494
- const spacing = fromTheme('spacing');
495
- const blur = fromTheme('blur');
496
- const brightness = fromTheme('brightness');
497
- const borderColor = fromTheme('borderColor');
498
- const borderRadius = fromTheme('borderRadius');
499
- const borderSpacing = fromTheme('borderSpacing');
500
- const borderWidth = fromTheme('borderWidth');
501
- const contrast = fromTheme('contrast');
502
- const grayscale = fromTheme('grayscale');
503
- const hueRotate = fromTheme('hueRotate');
504
- const invert = fromTheme('invert');
505
- const gap = fromTheme('gap');
506
- const gradientColorStops = fromTheme('gradientColorStops');
507
- const gradientColorStopPositions = fromTheme('gradientColorStopPositions');
508
- const inset = fromTheme('inset');
509
- const margin = fromTheme('margin');
510
- const opacity = fromTheme('opacity');
511
- const padding = fromTheme('padding');
512
- const saturate = fromTheme('saturate');
513
- const scale = fromTheme('scale');
514
- const sepia = fromTheme('sepia');
515
- const skew = fromTheme('skew');
516
- const space = fromTheme('space');
517
- const translate = fromTheme('translate');
518
- const getOverscroll = () => ['auto', 'contain', 'none'];
519
- const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
520
- const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing];
521
- const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
522
- const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength];
523
- const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue];
524
- const getPositions = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
525
- const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none'];
526
- const getBlendModes = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'plus-lighter'];
527
- const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];
528
- const getZeroAndEmpty = () => ['', '0', isArbitraryValue];
529
- const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
530
- const getNumber = () => [isNumber, isArbitraryNumber];
531
- const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
489
+ var colors = fromTheme('colors');
490
+ var spacing = fromTheme('spacing');
491
+ var blur = fromTheme('blur');
492
+ var brightness = fromTheme('brightness');
493
+ var borderColor = fromTheme('borderColor');
494
+ var borderRadius = fromTheme('borderRadius');
495
+ var borderSpacing = fromTheme('borderSpacing');
496
+ var borderWidth = fromTheme('borderWidth');
497
+ var contrast = fromTheme('contrast');
498
+ var grayscale = fromTheme('grayscale');
499
+ var hueRotate = fromTheme('hueRotate');
500
+ var invert = fromTheme('invert');
501
+ var gap = fromTheme('gap');
502
+ var gradientColorStops = fromTheme('gradientColorStops');
503
+ var gradientColorStopPositions = fromTheme('gradientColorStopPositions');
504
+ var inset = fromTheme('inset');
505
+ var margin = fromTheme('margin');
506
+ var opacity = fromTheme('opacity');
507
+ var padding = fromTheme('padding');
508
+ var saturate = fromTheme('saturate');
509
+ var scale = fromTheme('scale');
510
+ var sepia = fromTheme('sepia');
511
+ var skew = fromTheme('skew');
512
+ var space = fromTheme('space');
513
+ var translate = fromTheme('translate');
514
+ var getOverscroll = function getOverscroll() {
515
+ return ['auto', 'contain', 'none'];
516
+ };
517
+ var getOverflow = function getOverflow() {
518
+ return ['auto', 'hidden', 'clip', 'visible', 'scroll'];
519
+ };
520
+ var getSpacingWithAutoAndArbitrary = function getSpacingWithAutoAndArbitrary() {
521
+ return ['auto', isArbitraryValue, spacing];
522
+ };
523
+ var getSpacingWithArbitrary = function getSpacingWithArbitrary() {
524
+ return [isArbitraryValue, spacing];
525
+ };
526
+ var getLengthWithEmpty = function getLengthWithEmpty() {
527
+ return ['', isLength];
528
+ };
529
+ var getNumberWithAutoAndArbitrary = function getNumberWithAutoAndArbitrary() {
530
+ return ['auto', isNumber, isArbitraryValue];
531
+ };
532
+ var getPositions = function getPositions() {
533
+ return ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
534
+ };
535
+ var getLineStyles = function getLineStyles() {
536
+ return ['solid', 'dashed', 'dotted', 'double', 'none'];
537
+ };
538
+ var getBlendModes = function getBlendModes() {
539
+ return ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'plus-lighter'];
540
+ };
541
+ var getAlign = function getAlign() {
542
+ return ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];
543
+ };
544
+ var getZeroAndEmpty = function getZeroAndEmpty() {
545
+ return ['', '0', isArbitraryValue];
546
+ };
547
+ var getBreaks = function getBreaks() {
548
+ return ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
549
+ };
550
+ var getNumber = function getNumber() {
551
+ return [isNumber, isArbitraryNumber];
552
+ };
553
+ var getNumberAndArbitrary = function getNumberAndArbitrary() {
554
+ return [isNumber, isArbitraryValue];
555
+ };
532
556
  return {
533
557
  cacheSize: 500,
534
- separator: ':',
535
558
  theme: {
536
559
  colors: [isAny],
537
- spacing: [isLength, isArbitraryLength],
560
+ spacing: [isLength],
538
561
  blur: ['none', '', isTshirtSize, isArbitraryValue],
539
562
  brightness: getNumber(),
540
563
  borderColor: [colors],
541
564
  borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue],
542
565
  borderSpacing: getSpacingWithArbitrary(),
543
- borderWidth: getLengthWithEmptyAndArbitrary(),
566
+ borderWidth: getLengthWithEmpty(),
544
567
  contrast: getNumber(),
545
568
  grayscale: getZeroAndEmpty(),
546
569
  hueRotate: getNumberAndArbitrary(),
@@ -624,15 +647,15 @@ function getDefaultConfig() {
624
647
  * Floats
625
648
  * @see https://tailwindcss.com/docs/float
626
649
  */
627
- float: [{
628
- float: ['right', 'left', 'none', 'start', 'end']
650
+ "float": [{
651
+ "float": ['right', 'left', 'none']
629
652
  }],
630
653
  /**
631
654
  * Clear
632
655
  * @see https://tailwindcss.com/docs/clear
633
656
  */
634
657
  clear: [{
635
- clear: ['left', 'right', 'both', 'none', 'start', 'end']
658
+ clear: ['left', 'right', 'both', 'none']
636
659
  }],
637
660
  /**
638
661
  * Isolation
@@ -651,7 +674,7 @@ function getDefaultConfig() {
651
674
  * @see https://tailwindcss.com/docs/object-position
652
675
  */
653
676
  'object-position': [{
654
- object: [...getPositions(), isArbitraryValue]
677
+ object: [].concat(getPositions(), [isArbitraryValue])
655
678
  }],
656
679
  /**
657
680
  * Overflow
@@ -773,7 +796,7 @@ function getDefaultConfig() {
773
796
  * @see https://tailwindcss.com/docs/z-index
774
797
  */
775
798
  z: [{
776
- z: ['auto', isInteger, isArbitraryValue]
799
+ z: ['auto', isInteger]
777
800
  }],
778
801
  // Flexbox and Grid
779
802
  /**
@@ -823,7 +846,7 @@ function getDefaultConfig() {
823
846
  * @see https://tailwindcss.com/docs/order
824
847
  */
825
848
  order: [{
826
- order: ['first', 'last', 'none', isInteger, isArbitraryValue]
849
+ order: ['first', 'last', 'none', isInteger]
827
850
  }],
828
851
  /**
829
852
  * Grid Template Columns
@@ -838,7 +861,7 @@ function getDefaultConfig() {
838
861
  */
839
862
  'col-start-end': [{
840
863
  col: ['auto', {
841
- span: ['full', isInteger, isArbitraryValue]
864
+ span: ['full', isInteger]
842
865
  }, isArbitraryValue]
843
866
  }],
844
867
  /**
@@ -868,7 +891,7 @@ function getDefaultConfig() {
868
891
  */
869
892
  'row-start-end': [{
870
893
  row: ['auto', {
871
- span: [isInteger, isArbitraryValue]
894
+ span: [isInteger]
872
895
  }, isArbitraryValue]
873
896
  }],
874
897
  /**
@@ -932,7 +955,7 @@ function getDefaultConfig() {
932
955
  * @see https://tailwindcss.com/docs/justify-content
933
956
  */
934
957
  'justify-content': [{
935
- justify: ['normal', ...getAlign()]
958
+ justify: ['normal'].concat(getAlign())
936
959
  }],
937
960
  /**
938
961
  * Justify Items
@@ -953,7 +976,7 @@ function getDefaultConfig() {
953
976
  * @see https://tailwindcss.com/docs/align-content
954
977
  */
955
978
  'align-content': [{
956
- content: ['normal', ...getAlign(), 'baseline']
979
+ content: ['normal'].concat(getAlign(), ['baseline'])
957
980
  }],
958
981
  /**
959
982
  * Align Items
@@ -974,7 +997,7 @@ function getDefaultConfig() {
974
997
  * @see https://tailwindcss.com/docs/place-content
975
998
  */
976
999
  'place-content': [{
977
- 'place-content': [...getAlign(), 'baseline']
1000
+ 'place-content': [].concat(getAlign(), ['baseline'])
978
1001
  }],
979
1002
  /**
980
1003
  * Place Items
@@ -1147,51 +1170,44 @@ function getDefaultConfig() {
1147
1170
  * @see https://tailwindcss.com/docs/width
1148
1171
  */
1149
1172
  w: [{
1150
- w: ['auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing]
1173
+ w: ['auto', 'min', 'max', 'fit', isArbitraryValue, spacing]
1151
1174
  }],
1152
1175
  /**
1153
1176
  * Min-Width
1154
1177
  * @see https://tailwindcss.com/docs/min-width
1155
1178
  */
1156
1179
  'min-w': [{
1157
- 'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit']
1180
+ 'min-w': ['min', 'max', 'fit', isArbitraryValue, isLength]
1158
1181
  }],
1159
1182
  /**
1160
1183
  * Max-Width
1161
1184
  * @see https://tailwindcss.com/docs/max-width
1162
1185
  */
1163
1186
  'max-w': [{
1164
- 'max-w': [isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', {
1187
+ 'max-w': ['0', 'none', 'full', 'min', 'max', 'fit', 'prose', {
1165
1188
  screen: [isTshirtSize]
1166
- }, isTshirtSize]
1189
+ }, isTshirtSize, isArbitraryValue]
1167
1190
  }],
1168
1191
  /**
1169
1192
  * Height
1170
1193
  * @see https://tailwindcss.com/docs/height
1171
1194
  */
1172
1195
  h: [{
1173
- h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1196
+ h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit']
1174
1197
  }],
1175
1198
  /**
1176
1199
  * Min-Height
1177
1200
  * @see https://tailwindcss.com/docs/min-height
1178
1201
  */
1179
1202
  'min-h': [{
1180
- 'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1203
+ 'min-h': ['min', 'max', 'fit', isArbitraryValue, isLength]
1181
1204
  }],
1182
1205
  /**
1183
1206
  * Max-Height
1184
1207
  * @see https://tailwindcss.com/docs/max-height
1185
1208
  */
1186
1209
  'max-h': [{
1187
- 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1188
- }],
1189
- /**
1190
- * Size
1191
- * @see https://tailwindcss.com/docs/size
1192
- */
1193
- size: [{
1194
- size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit']
1210
+ 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit']
1195
1211
  }],
1196
1212
  // Typography
1197
1213
  /**
@@ -1274,7 +1290,7 @@ function getDefaultConfig() {
1274
1290
  * @see https://tailwindcss.com/docs/line-height
1275
1291
  */
1276
1292
  leading: [{
1277
- leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue]
1293
+ leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isArbitraryValue, isLength]
1278
1294
  }],
1279
1295
  /**
1280
1296
  * List Style Image
@@ -1343,21 +1359,21 @@ function getDefaultConfig() {
1343
1359
  * @see https://tailwindcss.com/docs/text-decoration-style
1344
1360
  */
1345
1361
  'text-decoration-style': [{
1346
- decoration: [...getLineStyles(), 'wavy']
1362
+ decoration: [].concat(getLineStyles(), ['wavy'])
1347
1363
  }],
1348
1364
  /**
1349
1365
  * Text Decoration Thickness
1350
1366
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1351
1367
  */
1352
1368
  'text-decoration-thickness': [{
1353
- decoration: ['auto', 'from-font', isLength, isArbitraryLength]
1369
+ decoration: ['auto', 'from-font', isLength]
1354
1370
  }],
1355
1371
  /**
1356
1372
  * Text Underline Offset
1357
1373
  * @see https://tailwindcss.com/docs/text-underline-offset
1358
1374
  */
1359
1375
  'underline-offset': [{
1360
- 'underline-offset': ['auto', isLength, isArbitraryValue]
1376
+ 'underline-offset': ['auto', isArbitraryValue, isLength]
1361
1377
  }],
1362
1378
  /**
1363
1379
  * Text Decoration Color
@@ -1376,13 +1392,6 @@ function getDefaultConfig() {
1376
1392
  * @see https://tailwindcss.com/docs/text-overflow
1377
1393
  */
1378
1394
  'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
1379
- /**
1380
- * Text Wrap
1381
- * @see https://tailwindcss.com/docs/text-wrap
1382
- */
1383
- 'text-wrap': [{
1384
- text: ['wrap', 'nowrap', 'balance', 'pretty']
1385
- }],
1386
1395
  /**
1387
1396
  * Text Indent
1388
1397
  * @see https://tailwindcss.com/docs/text-indent
@@ -1408,8 +1417,8 @@ function getDefaultConfig() {
1408
1417
  * Word Break
1409
1418
  * @see https://tailwindcss.com/docs/word-break
1410
1419
  */
1411
- break: [{
1412
- break: ['normal', 'words', 'all', 'keep']
1420
+ "break": [{
1421
+ "break": ['normal', 'words', 'all', 'keep']
1413
1422
  }],
1414
1423
  /**
1415
1424
  * Hyphens
@@ -1460,7 +1469,7 @@ function getDefaultConfig() {
1460
1469
  * @see https://tailwindcss.com/docs/background-position
1461
1470
  */
1462
1471
  'bg-position': [{
1463
- bg: [...getPositions(), isArbitraryPosition]
1472
+ bg: [].concat(getPositions(), [isArbitraryPosition])
1464
1473
  }],
1465
1474
  /**
1466
1475
  * Background Repeat
@@ -1485,7 +1494,7 @@ function getDefaultConfig() {
1485
1494
  'bg-image': [{
1486
1495
  bg: ['none', {
1487
1496
  'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
1488
- }, isArbitraryImage]
1497
+ }, isArbitraryUrl]
1489
1498
  }],
1490
1499
  /**
1491
1500
  * Background Color
@@ -1717,7 +1726,7 @@ function getDefaultConfig() {
1717
1726
  * @see https://tailwindcss.com/docs/border-style
1718
1727
  */
1719
1728
  'border-style': [{
1720
- border: [...getLineStyles(), 'hidden']
1729
+ border: [].concat(getLineStyles(), ['hidden'])
1721
1730
  }],
1722
1731
  /**
1723
1732
  * Divide Width X
@@ -1818,21 +1827,21 @@ function getDefaultConfig() {
1818
1827
  * @see https://tailwindcss.com/docs/outline-style
1819
1828
  */
1820
1829
  'outline-style': [{
1821
- outline: ['', ...getLineStyles()]
1830
+ outline: [''].concat(getLineStyles())
1822
1831
  }],
1823
1832
  /**
1824
1833
  * Outline Offset
1825
1834
  * @see https://tailwindcss.com/docs/outline-offset
1826
1835
  */
1827
1836
  'outline-offset': [{
1828
- 'outline-offset': [isLength, isArbitraryValue]
1837
+ 'outline-offset': [isArbitraryValue, isLength]
1829
1838
  }],
1830
1839
  /**
1831
1840
  * Outline Width
1832
1841
  * @see https://tailwindcss.com/docs/outline-width
1833
1842
  */
1834
1843
  'outline-w': [{
1835
- outline: [isLength, isArbitraryLength]
1844
+ outline: [isLength]
1836
1845
  }],
1837
1846
  /**
1838
1847
  * Outline Color
@@ -1846,7 +1855,7 @@ function getDefaultConfig() {
1846
1855
  * @see https://tailwindcss.com/docs/ring-width
1847
1856
  */
1848
1857
  'ring-w': [{
1849
- ring: getLengthWithEmptyAndArbitrary()
1858
+ ring: getLengthWithEmpty()
1850
1859
  }],
1851
1860
  /**
1852
1861
  * Ring Width Inset
@@ -1872,7 +1881,7 @@ function getDefaultConfig() {
1872
1881
  * @see https://tailwindcss.com/docs/ring-offset-width
1873
1882
  */
1874
1883
  'ring-offset-w': [{
1875
- 'ring-offset': [isLength, isArbitraryLength]
1884
+ 'ring-offset': [isLength]
1876
1885
  }],
1877
1886
  /**
1878
1887
  * Ring Offset Color
@@ -2222,9 +2231,7 @@ function getDefaultConfig() {
2222
2231
  * Appearance
2223
2232
  * @see https://tailwindcss.com/docs/appearance
2224
2233
  */
2225
- appearance: [{
2226
- appearance: ['none', 'auto']
2227
- }],
2234
+ appearance: ['appearance-none'],
2228
2235
  /**
2229
2236
  * Cursor
2230
2237
  * @see https://tailwindcss.com/docs/cursor
@@ -2419,27 +2426,10 @@ function getDefaultConfig() {
2419
2426
  * @see https://tailwindcss.com/docs/touch-action
2420
2427
  */
2421
2428
  touch: [{
2422
- touch: ['auto', 'none', 'manipulation']
2423
- }],
2424
- /**
2425
- * Touch Action X
2426
- * @see https://tailwindcss.com/docs/touch-action
2427
- */
2428
- 'touch-x': [{
2429
- 'touch-pan': ['x', 'left', 'right']
2430
- }],
2431
- /**
2432
- * Touch Action Y
2433
- * @see https://tailwindcss.com/docs/touch-action
2434
- */
2435
- 'touch-y': [{
2436
- 'touch-pan': ['y', 'up', 'down']
2429
+ touch: ['auto', 'none', 'pinch-zoom', 'manipulation', {
2430
+ pan: ['x', 'left', 'right', 'y', 'up', 'down']
2431
+ }]
2437
2432
  }],
2438
- /**
2439
- * Touch Action Pinch Zoom
2440
- * @see https://tailwindcss.com/docs/touch-action
2441
- */
2442
- 'touch-pz': ['touch-pinch-zoom'],
2443
2433
  /**
2444
2434
  * User Select
2445
2435
  * @see https://tailwindcss.com/docs/user-select
@@ -2467,7 +2457,7 @@ function getDefaultConfig() {
2467
2457
  * @see https://tailwindcss.com/docs/stroke-width
2468
2458
  */
2469
2459
  'stroke-w': [{
2470
- stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2460
+ stroke: [isLength, isArbitraryNumber]
2471
2461
  }],
2472
2462
  /**
2473
2463
  * Stroke
@@ -2481,14 +2471,7 @@ function getDefaultConfig() {
2481
2471
  * Screen Readers
2482
2472
  * @see https://tailwindcss.com/docs/screen-readers
2483
2473
  */
2484
- sr: ['sr-only', 'not-sr-only'],
2485
- /**
2486
- * Forced Color Adjust
2487
- * @see https://tailwindcss.com/docs/forced-color-adjust
2488
- */
2489
- 'forced-color-adjust': [{
2490
- 'forced-color-adjust': ['auto', 'none']
2491
- }]
2474
+ sr: ['sr-only', 'not-sr-only']
2492
2475
  },
2493
2476
  conflictingClassGroups: {
2494
2477
  overflow: ['overflow-x', 'overflow-y'],
@@ -2504,7 +2487,6 @@ function getDefaultConfig() {
2504
2487
  m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
2505
2488
  mx: ['mr', 'ml'],
2506
2489
  my: ['mt', 'mb'],
2507
- size: ['w', 'h'],
2508
2490
  'font-size': ['leading'],
2509
2491
  'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
2510
2492
  'fvn-ordinal': ['fvn-normal'],
@@ -2512,7 +2494,6 @@ function getDefaultConfig() {
2512
2494
  'fvn-figure': ['fvn-normal'],
2513
2495
  'fvn-spacing': ['fvn-normal'],
2514
2496
  'fvn-fraction': ['fvn-normal'],
2515
- 'line-clamp': ['display', 'overflow'],
2516
2497
  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'],
2517
2498
  'rounded-s': ['rounded-ss', 'rounded-es'],
2518
2499
  'rounded-e': ['rounded-se', 'rounded-ee'],
@@ -2532,11 +2513,7 @@ function getDefaultConfig() {
2532
2513
  'scroll-my': ['scroll-mt', 'scroll-mb'],
2533
2514
  'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
2534
2515
  'scroll-px': ['scroll-pr', 'scroll-pl'],
2535
- 'scroll-py': ['scroll-pt', 'scroll-pb'],
2536
- touch: ['touch-x', 'touch-y', 'touch-pz'],
2537
- 'touch-x': ['touch'],
2538
- 'touch-y': ['touch'],
2539
- 'touch-pz': ['touch']
2516
+ 'scroll-py': ['scroll-pt', 'scroll-pb']
2540
2517
  },
2541
2518
  conflictingClassGroupModifiers: {
2542
2519
  'font-size': ['leading']
@@ -2548,61 +2525,45 @@ function getDefaultConfig() {
2548
2525
  * @param baseConfig Config where other config will be merged into. This object will be mutated.
2549
2526
  * @param configExtension Partial config to merge into the `baseConfig`.
2550
2527
  */
2551
- function mergeConfigs(baseConfig, {
2552
- cacheSize,
2553
- prefix,
2554
- separator,
2555
- extend = {},
2556
- override = {}
2557
- }) {
2558
- overrideProperty(baseConfig, 'cacheSize', cacheSize);
2559
- overrideProperty(baseConfig, 'prefix', prefix);
2560
- overrideProperty(baseConfig, 'separator', separator);
2561
- for (const configKey in override) {
2562
- overrideConfigProperties(baseConfig[configKey], override[configKey]);
2563
- }
2564
- for (const key in extend) {
2565
- mergeConfigProperties(baseConfig[key], extend[key]);
2528
+ function mergeConfigs(baseConfig, configExtension) {
2529
+ for (var key in configExtension) {
2530
+ mergePropertyRecursively(baseConfig, key, configExtension[key]);
2566
2531
  }
2567
2532
  return baseConfig;
2568
2533
  }
2569
- function overrideProperty(baseObject, overrideKey, overrideValue) {
2570
- if (overrideValue !== undefined) {
2571
- baseObject[overrideKey] = overrideValue;
2534
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2535
+ var overrideTypes = /*#__PURE__*/new Set(['string', 'number', 'boolean']);
2536
+ function mergePropertyRecursively(baseObject, mergeKey, mergeValue) {
2537
+ if (!hasOwnProperty.call(baseObject, mergeKey) || overrideTypes.has(typeof mergeValue) || mergeValue === null) {
2538
+ baseObject[mergeKey] = mergeValue;
2539
+ return;
2572
2540
  }
2573
- }
2574
- function overrideConfigProperties(baseObject, overrideObject) {
2575
- if (overrideObject) {
2576
- for (const key in overrideObject) {
2577
- overrideProperty(baseObject, key, overrideObject[key]);
2578
- }
2541
+ if (Array.isArray(mergeValue) && Array.isArray(baseObject[mergeKey])) {
2542
+ baseObject[mergeKey] = baseObject[mergeKey].concat(mergeValue);
2543
+ return;
2579
2544
  }
2580
- }
2581
- function mergeConfigProperties(baseObject, mergeObject) {
2582
- if (mergeObject) {
2583
- for (const key in mergeObject) {
2584
- const mergeValue = mergeObject[key];
2585
- if (mergeValue !== undefined) {
2586
- baseObject[key] = (baseObject[key] || []).concat(mergeValue);
2587
- }
2545
+ if (typeof mergeValue === 'object' && typeof baseObject[mergeKey] === 'object') {
2546
+ if (baseObject[mergeKey] === null) {
2547
+ baseObject[mergeKey] = mergeValue;
2548
+ return;
2549
+ }
2550
+ for (var nextKey in mergeValue) {
2551
+ mergePropertyRecursively(baseObject[mergeKey], nextKey, mergeValue[nextKey]);
2588
2552
  }
2589
2553
  }
2590
2554
  }
2591
- function extendTailwindMerge(configExtension, ...createConfig) {
2592
- return typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
2555
+
2556
+ function extendTailwindMerge(configExtension) {
2557
+ for (var _len = arguments.length, createConfig = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2558
+ createConfig[_key - 1] = arguments[_key];
2559
+ }
2560
+ return typeof configExtension === 'function' ? createTailwindMerge.apply(void 0, [getDefaultConfig, configExtension].concat(createConfig)) : createTailwindMerge.apply(void 0, [function () {
2561
+ return mergeConfigs(getDefaultConfig(), configExtension);
2562
+ }].concat(createConfig));
2593
2563
  }
2594
- const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
2595
- exports.createTailwindMerge = createTailwindMerge;
2596
- exports.extendTailwindMerge = extendTailwindMerge;
2597
- exports.fromTheme = fromTheme;
2598
- exports.getDefaultConfig = getDefaultConfig;
2599
- exports.mergeConfigs = mergeConfigs;
2600
- exports.twJoin = twJoin;
2601
- exports.twMerge = twMerge;
2602
- exports.validators = validators;
2603
- //# sourceMappingURL=bundle-cjs.js.map
2604
- });
2605
2564
 
2606
- var ie={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},_=s=>s||void 0,M=(...s)=>_(y(s).filter(Boolean).join(" ")),R=null,v={},q=!1,j=(...s)=>b$1=>b$1.twMerge?((!R||q)&&(q=!1,R=u(v)?bundleCjs.twMerge:bundleCjs.extendTailwindMerge({...v,extend:{theme:v.theme,classGroups:v.classGroups,conflictingClassGroupModifiers:v.conflictingClassGroupModifiers,conflictingClassGroups:v.conflictingClassGroups,...v.extend}})),_(R(M(s)))):M(s),Z=(s,b)=>{for(let e in b)s.hasOwnProperty(e)?s[e]=M(s[e],b[e]):s[e]=b[e];return s},ce=(s,b$1)=>{let{extend:e=null,slots:N={},variants:F={},compoundVariants:U=[],compoundSlots:C=[],defaultVariants:W={}}=s,m={...ie,...b$1},S=e!=null&&e.base?M(e.base,s==null?void 0:s.base):s==null?void 0:s.base,g$1=e!=null&&e.variants&&!u(e.variants)?p(F,e.variants):F,A=e!=null&&e.defaultVariants&&!u(e.defaultVariants)?{...e.defaultVariants,...W}:W;!u(m.twMergeConfig)&&!x(m.twMergeConfig,v)&&(q=!0,v=m.twMergeConfig);let O=u(e==null?void 0:e.slots),$=u(N)?{}:{base:M(s==null?void 0:s.base,O&&(e==null?void 0:e.base)),...N},w=O?$:Z({...e==null?void 0:e.slots},u($)?{base:s==null?void 0:s.base}:$),h$1=u(e==null?void 0:e.compoundVariants)?U:a(e==null?void 0:e.compoundVariants,U),V=f=>{if(u(g$1)&&u(N)&&O)return j(S,f==null?void 0:f.class,f==null?void 0:f.className)(m);if(h$1&&!Array.isArray(h$1))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof h$1}`);if(C&&!Array.isArray(C))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof C}`);let K=(t,n,a=[],i)=>{let r=a;if(typeof n=="string")r=r.concat(g(n).split(" ").map(o=>`${t}:${o}`));else if(Array.isArray(n))r=r.concat(n.reduce((o,c)=>o.concat(`${t}:${c}`),[]));else if(typeof n=="object"&&typeof i=="string"){for(let o in n)if(n.hasOwnProperty(o)&&o===i){let c=n[o];if(c&&typeof c=="string"){let l=g(c);r[i]?r[i]=r[i].concat(l.split(" ").map(u=>`${t}:${u}`)):r[i]=l.split(" ").map(u=>`${t}:${u}`);}else Array.isArray(c)&&c.length>0&&(r[i]=c.reduce((l,u)=>l.concat(`${t}:${u}`),[]));}}return r},z=(t,n=g$1,a$1=null,i=null)=>{var J;let r=n[t];if(!r||u(r))return null;let o=(J=i==null?void 0:i[t])!=null?J:f==null?void 0:f[t];if(o===null)return null;let c=l(o),l$1=Array.isArray(m.responsiveVariants)&&m.responsiveVariants.length>0||m.responsiveVariants===!0,u$1=A==null?void 0:A[t],d=[];if(typeof c=="object"&&l$1)for(let[T,L]of Object.entries(c)){let ne=r[L];if(T==="initial"){u$1=L;continue}Array.isArray(m.responsiveVariants)&&!m.responsiveVariants.includes(T)||(d=K(T,ne,d,a$1));}let ae=c!=null&&typeof c!="object"?c:l(u$1),k=r[ae||"false"];return typeof d=="object"&&typeof a$1=="string"&&d[a$1]?Z(d,k):d.length>0?(d.push(k),d):k},P=()=>g$1?Object.keys(g$1).map(t=>z(t,g$1)):null,p=(t,n)=>{if(!g$1||typeof g$1!="object")return null;let a=new Array;for(let i in g$1){let r=z(i,g$1,t,n),o=t==="base"&&typeof r=="string"?r:r&&r[t];o&&(a[a.length]=o);}return a},D={};for(let t in f)f[t]!==void 0&&(D[t]=f[t]);let H=(t,n)=>{var i;let a=typeof(f==null?void 0:f[t])=="object"?{[t]:(i=f[t])==null?void 0:i.initial}:{};return {...A,...D,...a,...n}},I=(t=[],n)=>{let a=[];for(let{class:i,className:r,...o}of t){let c=!0;for(let[l,u]of Object.entries(o)){let d=H(l,n);if(Array.isArray(u)){if(!u.includes(d[l])){c=!1;break}}else if(d[l]!==u){c=!1;break}}c&&(i&&a.push(i),r&&a.push(r));}return a},ee=t=>{let n=I(h$1,t);if(!Array.isArray(n))return n;let a={};for(let i of n)if(typeof i=="string"&&(a.base=j(a.base,i)(m)),typeof i=="object")for(let[r,o]of Object.entries(i))a[r]=j(a[r],o)(m);return a},te=t=>{if(C.length<1)return null;let n={};for(let{slots:a=[],class:i,className:r,...o}of C){if(!u(o)){let c=!0;for(let l of Object.keys(o)){let u=H(l,t)[l];if(u===void 0||(Array.isArray(o[l])?!o[l].includes(u):o[l]!==u)){c=!1;break}}if(!c)continue}for(let c of a)n[c]=n[c]||[],n[c].push([i,r]);}return n};if(!u(N)||!O){let t={};if(typeof w=="object"&&!u(w))for(let n of Object.keys(w))t[n]=a=>{var i,r;return j(w[n],p(n,a),((i=ee(a))!=null?i:[])[n],((r=te(a))!=null?r:[])[n],a==null?void 0:a.class,a==null?void 0:a.className)(m)};return t}return j(S,P(),I(h$1),f==null?void 0:f.class,f==null?void 0:f.className)(m)},x$1=()=>{if(!(!g$1||typeof g$1!="object"))return Object.keys(g$1)};return V.variantKeys=x$1(),V.extend=e,V.base=S,V.slots=w,V.variants=g$1,V.defaultVariants=A,V.compoundSlots=C,V.compoundVariants=h$1,V};
2565
+ var twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
2566
+
2567
+ var re={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Z=i=>i||void 0,j=(...i)=>Z(y(i).filter(Boolean).join(" ")),B=null,O={},R=!1,A=(...i)=>v=>v.twMerge?((!B||R)&&(R=!1,B=l(O)?twMerge:extendTailwindMerge(O)),Z(B(j(i)))):j(i),Y=(i,v)=>{for(let e in v)i.hasOwnProperty(e)?i[e]=j(i[e],v[e]):i[e]=v[e];return i},ce=(i,v)=>{let{extend:e$1=null,slots:N={},variants:q={},compoundVariants:C=[],compoundSlots:V=[],defaultVariants:F={}}=i,m={...re,...v},M=e$1!=null&&e$1.base?j(e$1.base,i==null?void 0:i.base):i==null?void 0:i.base,g$1=e$1!=null&&e$1.variants&&!l(e$1.variants)?p(q,e$1.variants):q,h=e$1!=null&&e$1.defaultVariants&&!l(e$1.defaultVariants)?{...e$1.defaultVariants,...F}:F;!l(m.twMergeConfig)&&!u(m.twMergeConfig,O)&&(R=!0,O=m.twMergeConfig);let $=l(N)?{}:{base:i==null?void 0:i.base,...N},w=l(e$1==null?void 0:e$1.slots)?$:Y(e$1==null?void 0:e$1.slots,l($)?{base:i==null?void 0:i.base}:$),d=f=>{if(l(g$1)&&l(N)&&l(e$1==null?void 0:e$1.slots))return A(M,f==null?void 0:f.class,f==null?void 0:f.className)(m);if(C&&!Array.isArray(C))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof C}`);if(V&&!Array.isArray(V))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof V}`);let K=(t,n,a=[],s)=>{let r=a;if(typeof n=="string")r=r.concat(g(n).split(" ").map(l=>`${t}:${l}`));else if(Array.isArray(n))r=r.concat(n.reduce((l,c)=>l.concat(`${t}:${c}`),[]));else if(typeof n=="object"&&typeof s=="string"){for(let l in n)if(n.hasOwnProperty(l)&&l===s){let c=n[l];if(c&&typeof c=="string"){let y=g(c);r[s]?r[s]=r[s].concat(y.split(" ").map(u=>`${t}:${u}`)):r[s]=y.split(" ").map(u=>`${t}:${u}`);}else Array.isArray(c)&&c.length>0&&(r[s]=c.reduce((y,u)=>y.concat(`${t}:${u}`),[]));}}return r},U=(t,n=g$1,a$1=null,s=null)=>{var H;let r=n[t];if(!r||l(r))return null;let l$1=(H=s==null?void 0:s[t])!=null?H:f==null?void 0:f[t];if(l$1===null)return null;let c=a(l$1),y=Array.isArray(m.responsiveVariants)&&m.responsiveVariants.length>0||m.responsiveVariants===!0,u=h==null?void 0:h[t],b$1=[];if(typeof c=="object"&&y)for(let[k,I]of Object.entries(c)){let te=r[I];if(k==="initial"){u=I;continue}Array.isArray(m.responsiveVariants)&&!m.responsiveVariants.includes(k)||(b$1=K(k,te,b$1,a$1));}let S=r[c]||r[a(u)];return typeof b$1=="object"&&typeof a$1=="string"&&b$1[a$1]?Y(b$1,S):b$1.length>0?(b$1.push(S),b$1):S},x$1=()=>g$1?Object.keys(g$1).map(t=>U(t,g$1)):null,P=(t,n)=>{if(!g$1||typeof g$1!="object")return null;let a=new Array;for(let s in g$1){let r=U(s,g$1,t,n),l=t==="base"&&typeof r=="string"?r:r&&r[t];l&&(a[a.length]=l);}return a},W={};for(let t in f)f[t]!==void 0&&(W[t]=f[t]);let z=(t,n)=>{var s;let a=typeof(f==null?void 0:f[t])=="object"?{[t]:(s=f[t])==null?void 0:s.initial}:{};return {...h,...W,...a,...n}},D=(t=[],n)=>{let a=[];for(let{class:s,className:r,...l}of t){let c=!0;for(let[y,u]of Object.entries(l)){let b=z(y,n);if(Array.isArray(u)){if(!u.includes(b[y])){c=!1;break}}else if(b[y]!==u){c=!1;break}}c&&(s&&a.push(s),r&&a.push(r));}return a},G=t=>{let n=D(C,t),a=D(e$1==null?void 0:e$1.compoundVariants,t);return x(a,n)},p=t=>{let n=G(t);if(!Array.isArray(n))return n;let a={};for(let s of n)if(typeof s=="string"&&(a.base=A(a.base,s)(m)),typeof s=="object")for(let[r,l]of Object.entries(s))a[r]=A(a[r],l)(m);return a},ee=t=>{if(V.length<1)return null;let n={};for(let{slots:a=[],class:s,className:r,...l$1}of V){if(!l(l$1)){let c=!0;for(let y of Object.keys(l$1)){let u=z(y,t)[y];if(u===void 0||u!==l$1[y]){c=!1;break}}if(!c)continue}for(let c of a)n[c]=n[c]||[],n[c].push([s,r]);}return n};if(!l(N)||!l(e$1==null?void 0:e$1.slots)){let t={};if(typeof w=="object"&&!l(w))for(let n of Object.keys(w))t[n]=a=>{var s,r;return A(w[n],P(n,a),((s=p(a))!=null?s:[])[n],((r=ee(a))!=null?r:[])[n],a==null?void 0:a.class,a==null?void 0:a.className)(m)};return t}return A(M,x$1(),G(),f==null?void 0:f.class,f==null?void 0:f.className)(m)},_=()=>{if(!(!g$1||typeof g$1!="object"))return Object.keys(g$1)};return d.variantKeys=_(),d.extend=e$1,d.base=M,d.slots=w,d.variants=g$1,d.defaultVariants=h,d.compoundSlots=V,d.compoundVariants=C,d};
2607
2568
 
2608
2569
  export { ce as c };