bromcom-ui 2.12.1-test.1 → 2.12.2-test.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 (120) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-641977db.entry.js → p-056785ca.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-bcf286cb.js → p-12133565.js} +1 -1
  4. package/dist/bromcom-ui/{p-678b25bb.entry.js → p-14b725a7.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-d1298c40.js → p-155da55c.js} +1 -1
  6. package/dist/bromcom-ui/{p-a959de89.entry.js → p-15f73583.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-a2324032.entry.js → p-1f8c2199.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-d6dd26f2.entry.js → p-25b5138d.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-9f8aed8c.entry.js → p-2a609520.entry.js} +1 -1
  10. package/dist/bromcom-ui/p-2e9ac83b.entry.js +5 -0
  11. package/dist/bromcom-ui/{p-0c1ab9c7.entry.js → p-2f5c9906.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-d5931cf3.entry.js → p-33a40e22.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-8f76ddd6.entry.js → p-41e60400.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-91b72db1.js → p-518bddef.js} +1 -1
  15. package/dist/bromcom-ui/{p-db2551ef.entry.js → p-5c03c44b.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-3575cff5.js → p-67352697.js} +1 -1
  17. package/dist/bromcom-ui/{p-9e755088.entry.js → p-6ebbc0c7.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-9a92e61e.entry.js → p-758bf843.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-ef04fd6b.entry.js → p-84f2a816.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-c66192fb.entry.js → p-8b7bb213.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-e9c348e7.js → p-8c312ed4.js} +1 -1
  22. package/dist/bromcom-ui/{p-01d5ea34.entry.js → p-acad99a2.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-0def72fe.entry.js → p-b721a12e.entry.js} +1 -1
  24. package/dist/bromcom-ui/p-c0b3bf0d.entry.js +5 -0
  25. package/dist/bromcom-ui/{p-3440e8b9.js → p-c0be6529.js} +1 -1
  26. package/dist/bromcom-ui/{p-7e608148.entry.js → p-c73b74f6.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-9a906583.entry.js → p-cb99a9b8.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-ccc61045.js +5 -0
  29. package/dist/bromcom-ui/{p-44545e3c.entry.js → p-ccf83587.entry.js} +2 -2
  30. package/dist/bromcom-ui/{p-23922dab.entry.js → p-cd9b19ec.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-38b02377.entry.js → p-ce99c0ec.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-e896ce94.entry.js → p-d4cc8b4d.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-4e5491bc.entry.js → p-d587c02a.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-f8a795ec.entry.js → p-d938b428.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-8811428c.entry.js → p-df48ff39.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-0ce727a4.entry.js → p-e4f7a11e.entry.js} +1 -1
  37. package/dist/cjs/bcm-accordion_63.cjs.entry.js +36 -23
  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-920aff8f.js → generate-8b79fe19.js} +1 -1
  65. package/dist/cjs/{global-1526173b.js → global-8d54b6ff.js} +1 -1
  66. package/dist/cjs/{index-5279dea2.js → index-d3b89435.js} +386 -347
  67. package/dist/cjs/{input.style-b5676e6a.js → input.style-890ee369.js} +1 -1
  68. package/dist/cjs/loader.cjs.js +2 -2
  69. package/dist/cjs/{number-helper-a99f8b57.js → number-helper-0dcca04f.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-fc8c9633.js → package-2af5ef6d.js} +1 -1
  73. package/dist/cjs/{validators-aafcc99c.js → validators-5c1442df.js} +1 -1
  74. package/dist/collection/components/molecules/menu/menu.js +14 -0
  75. package/dist/components/generate.js +1 -1
  76. package/dist/components/index5.js +386 -347
  77. package/dist/components/menu.js +14 -0
  78. package/dist/esm/bcm-accordion_63.entry.js +36 -23
  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-d71d0301.js → generate-e0d0677e.js} +1 -1
  106. package/dist/esm/{global-80fedcf7.js → global-b4aafa0d.js} +1 -1
  107. package/dist/esm/{index-3bc8c6e3.js → index-9f698d35.js} +386 -347
  108. package/dist/esm/{input.style-e855c0f3.js → input.style-fadcc0bd.js} +1 -1
  109. package/dist/esm/loader.js +2 -2
  110. package/dist/esm/{number-helper-407e89d0.js → number-helper-423b9a17.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-dec9ed1a.js → package-bb25563a.js} +1 -1
  114. package/dist/esm/{validators-2cce19e1.js → validators-4aa12ffe.js} +1 -1
  115. package/package.json +1 -1
  116. package/dist/bromcom-ui/p-08c75801.js +0 -5
  117. package/dist/bromcom-ui/p-42111a9b.entry.js +0 -5
  118. package/dist/bromcom-ui/p-c1d7db8f.entry.js +0 -5
  119. package/dist/collection/stories/ui-library/components/list/country.js +0 -186
  120. package/dist/types/stories/ui-library/components/list/country.d.ts +0 -6
@@ -4,57 +4,24 @@
4
4
  */
5
5
  'use strict';
6
6
 
7
- 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();
7
+ const _commonjsHelpers = require('./_commonjsHelpers-ed84c3ca.js');
8
8
 
9
- /**
10
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
11
- *
12
- * Specifically:
13
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
14
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
15
- *
16
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
17
- */
18
- function twJoin() {
19
- var index = 0;
20
- var argument;
21
- var resolvedValue;
22
- var string = '';
23
- while (index < arguments.length) {
24
- if (argument = arguments[index++]) {
25
- if (resolvedValue = toValue(argument)) {
26
- string && (string += ' ');
27
- string += resolvedValue;
28
- }
29
- }
30
- }
31
- return string;
32
- }
33
- function toValue(mix) {
34
- if (typeof mix === 'string') {
35
- return mix;
36
- }
37
- var resolvedValue;
38
- var string = '';
39
- for (var k = 0; k < mix.length; k++) {
40
- if (mix[k]) {
41
- if (resolvedValue = toValue(mix[k])) {
42
- string && (string += ' ');
43
- string += resolvedValue;
44
- }
45
- }
46
- }
47
- return string;
48
- }
9
+ 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();
10
+
11
+ var bundleCjs = _commonjsHelpers.createCommonjsModule(function (module, exports) {
49
12
 
50
- var CLASS_PART_SEPARATOR = '-';
13
+ Object.defineProperty(exports, Symbol.toStringTag, {
14
+ value: 'Module'
15
+ });
16
+ const CLASS_PART_SEPARATOR = '-';
51
17
  function createClassUtils(config) {
52
- var classMap = createClassMap(config);
53
- var conflictingClassGroups = config.conflictingClassGroups,
54
- _config$conflictingCl = config.conflictingClassGroupModifiers,
55
- conflictingClassGroupModifiers = _config$conflictingCl === void 0 ? {} : _config$conflictingCl;
18
+ const classMap = createClassMap(config);
19
+ const {
20
+ conflictingClassGroups,
21
+ conflictingClassGroupModifiers
22
+ } = config;
56
23
  function getClassGroupId(className) {
57
- var classParts = className.split(CLASS_PART_SEPARATOR);
24
+ const classParts = className.split(CLASS_PART_SEPARATOR);
58
25
  // 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.
59
26
  if (classParts[0] === '' && classParts.length !== 1) {
60
27
  classParts.shift();
@@ -62,41 +29,40 @@ function createClassUtils(config) {
62
29
  return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
63
30
  }
64
31
  function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {
65
- var conflicts = conflictingClassGroups[classGroupId] || [];
32
+ const conflicts = conflictingClassGroups[classGroupId] || [];
66
33
  if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
67
- return [].concat(conflicts, conflictingClassGroupModifiers[classGroupId]);
34
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
68
35
  }
69
36
  return conflicts;
70
37
  }
71
38
  return {
72
- getClassGroupId: getClassGroupId,
73
- getConflictingClassGroupIds: getConflictingClassGroupIds
39
+ getClassGroupId,
40
+ getConflictingClassGroupIds
74
41
  };
75
42
  }
76
43
  function getGroupRecursive(classParts, classPartObject) {
77
44
  if (classParts.length === 0) {
78
45
  return classPartObject.classGroupId;
79
46
  }
80
- var currentClassPart = classParts[0];
81
- var nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
82
- var classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
47
+ const currentClassPart = classParts[0];
48
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
49
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
83
50
  if (classGroupFromNextClassPart) {
84
51
  return classGroupFromNextClassPart;
85
52
  }
86
53
  if (classPartObject.validators.length === 0) {
87
54
  return undefined;
88
55
  }
89
- var classRest = classParts.join(CLASS_PART_SEPARATOR);
90
- return classPartObject.validators.find(function (_ref) {
91
- var validator = _ref.validator;
92
- return validator(classRest);
93
- })?.classGroupId;
56
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
57
+ return classPartObject.validators.find(({
58
+ validator
59
+ }) => validator(classRest))?.classGroupId;
94
60
  }
95
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
61
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
96
62
  function getGroupIdForArbitraryProperty(className) {
97
63
  if (arbitraryPropertyRegex.test(className)) {
98
- var arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
99
- var property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
64
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
65
+ const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
100
66
  if (property) {
101
67
  // I use two dots here because one dot is used as prefix for class groups in plugins
102
68
  return 'arbitrary..' + property;
@@ -107,24 +73,24 @@ function getGroupIdForArbitraryProperty(className) {
107
73
  * Exported for testing only
108
74
  */
109
75
  function createClassMap(config) {
110
- var theme = config.theme,
111
- prefix = config.prefix;
112
- var classMap = {
76
+ const {
77
+ theme,
78
+ prefix
79
+ } = config;
80
+ const classMap = {
113
81
  nextPart: new Map(),
114
82
  validators: []
115
83
  };
116
- var prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
117
- prefixedClassGroupEntries.forEach(function (_ref2) {
118
- var classGroupId = _ref2[0],
119
- classGroup = _ref2[1];
84
+ const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
85
+ prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
120
86
  processClassesRecursively(classGroup, classMap, classGroupId, theme);
121
87
  });
122
88
  return classMap;
123
89
  }
124
90
  function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
125
- classGroup.forEach(function (classDefinition) {
91
+ classGroup.forEach(classDefinition => {
126
92
  if (typeof classDefinition === 'string') {
127
- var classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
93
+ const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
128
94
  classPartObjectToEdit.classGroupId = classGroupId;
129
95
  return;
130
96
  }
@@ -135,20 +101,18 @@ function processClassesRecursively(classGroup, classPartObject, classGroupId, th
135
101
  }
136
102
  classPartObject.validators.push({
137
103
  validator: classDefinition,
138
- classGroupId: classGroupId
104
+ classGroupId
139
105
  });
140
106
  return;
141
107
  }
142
- Object.entries(classDefinition).forEach(function (_ref3) {
143
- var key = _ref3[0],
144
- classGroup = _ref3[1];
108
+ Object.entries(classDefinition).forEach(([key, classGroup]) => {
145
109
  processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
146
110
  });
147
111
  });
148
112
  }
149
113
  function getPart(classPartObject, path) {
150
- var currentClassPartObject = classPartObject;
151
- path.split(CLASS_PART_SEPARATOR).forEach(function (pathPart) {
114
+ let currentClassPartObject = classPartObject;
115
+ path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
152
116
  if (!currentClassPartObject.nextPart.has(pathPart)) {
153
117
  currentClassPartObject.nextPart.set(pathPart, {
154
118
  nextPart: new Map(),
@@ -166,19 +130,13 @@ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
166
130
  if (!prefix) {
167
131
  return classGroupEntries;
168
132
  }
169
- return classGroupEntries.map(function (_ref4) {
170
- var classGroupId = _ref4[0],
171
- classGroup = _ref4[1];
172
- var prefixedClassGroup = classGroup.map(function (classDefinition) {
133
+ return classGroupEntries.map(([classGroupId, classGroup]) => {
134
+ const prefixedClassGroup = classGroup.map(classDefinition => {
173
135
  if (typeof classDefinition === 'string') {
174
136
  return prefix + classDefinition;
175
137
  }
176
138
  if (typeof classDefinition === 'object') {
177
- return Object.fromEntries(Object.entries(classDefinition).map(function (_ref5) {
178
- var key = _ref5[0],
179
- value = _ref5[1];
180
- return [prefix + key, value];
181
- }));
139
+ return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
182
140
  }
183
141
  return classDefinition;
184
142
  });
@@ -190,15 +148,13 @@ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
190
148
  function createLruCache(maxCacheSize) {
191
149
  if (maxCacheSize < 1) {
192
150
  return {
193
- get: function get() {
194
- return undefined;
195
- },
196
- set: function set() {}
151
+ get: () => undefined,
152
+ set: () => {}
197
153
  };
198
154
  }
199
- var cacheSize = 0;
200
- var cache = new Map();
201
- var previousCache = new Map();
155
+ let cacheSize = 0;
156
+ let cache = new Map();
157
+ let previousCache = new Map();
202
158
  function update(key, value) {
203
159
  cache.set(key, value);
204
160
  cacheSize++;
@@ -209,8 +165,8 @@ function createLruCache(maxCacheSize) {
209
165
  }
210
166
  }
211
167
  return {
212
- get: function get(key) {
213
- var value = cache.get(key);
168
+ get(key) {
169
+ let value = cache.get(key);
214
170
  if (value !== undefined) {
215
171
  return value;
216
172
  }
@@ -219,7 +175,7 @@ function createLruCache(maxCacheSize) {
219
175
  return value;
220
176
  }
221
177
  },
222
- set: function set(key, value) {
178
+ set(key, value) {
223
179
  if (cache.has(key)) {
224
180
  cache.set(key, value);
225
181
  } else {
@@ -228,21 +184,20 @@ function createLruCache(maxCacheSize) {
228
184
  }
229
185
  };
230
186
  }
231
-
232
- var IMPORTANT_MODIFIER = '!';
187
+ const IMPORTANT_MODIFIER = '!';
233
188
  function createSplitModifiers(config) {
234
- var separator = config.separator || ':';
235
- var isSeparatorSingleCharacter = separator.length === 1;
236
- var firstSeparatorCharacter = separator[0];
237
- var separatorLength = separator.length;
189
+ const separator = config.separator;
190
+ const isSeparatorSingleCharacter = separator.length === 1;
191
+ const firstSeparatorCharacter = separator[0];
192
+ const separatorLength = separator.length;
238
193
  // splitModifiers inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
239
194
  return function splitModifiers(className) {
240
- var modifiers = [];
241
- var bracketDepth = 0;
242
- var modifierStart = 0;
243
- var postfixModifierPosition;
244
- for (var index = 0; index < className.length; index++) {
245
- var currentCharacter = className[index];
195
+ const modifiers = [];
196
+ let bracketDepth = 0;
197
+ let modifierStart = 0;
198
+ let postfixModifierPosition;
199
+ for (let index = 0; index < className.length; index++) {
200
+ let currentCharacter = className[index];
246
201
  if (bracketDepth === 0) {
247
202
  if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
248
203
  modifiers.push(className.slice(modifierStart, index));
@@ -260,15 +215,15 @@ function createSplitModifiers(config) {
260
215
  bracketDepth--;
261
216
  }
262
217
  }
263
- var baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
264
- var hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
265
- var baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
266
- var maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
218
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
219
+ const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
220
+ const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
221
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
267
222
  return {
268
- modifiers: modifiers,
269
- hasImportantModifier: hasImportantModifier,
270
- baseClassName: baseClassName,
271
- maybePostfixModifierPosition: maybePostfixModifierPosition
223
+ modifiers,
224
+ hasImportantModifier,
225
+ baseClassName,
226
+ maybePostfixModifierPosition
272
227
  };
273
228
  };
274
229
  }
@@ -281,21 +236,20 @@ function sortModifiers(modifiers) {
281
236
  if (modifiers.length <= 1) {
282
237
  return modifiers;
283
238
  }
284
- var sortedModifiers = [];
285
- var unsortedModifiers = [];
286
- modifiers.forEach(function (modifier) {
287
- var isArbitraryVariant = modifier[0] === '[';
239
+ const sortedModifiers = [];
240
+ let unsortedModifiers = [];
241
+ modifiers.forEach(modifier => {
242
+ const isArbitraryVariant = modifier[0] === '[';
288
243
  if (isArbitraryVariant) {
289
- sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort().concat([modifier]));
244
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
290
245
  unsortedModifiers = [];
291
246
  } else {
292
247
  unsortedModifiers.push(modifier);
293
248
  }
294
249
  });
295
- sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort());
250
+ sortedModifiers.push(...unsortedModifiers.sort());
296
251
  return sortedModifiers;
297
252
  }
298
-
299
253
  function createConfigUtils(config) {
300
254
  return {
301
255
  cache: createLruCache(config.cacheSize),
@@ -303,12 +257,13 @@ function createConfigUtils(config) {
303
257
  ...createClassUtils(config)
304
258
  };
305
259
  }
306
-
307
- var SPLIT_CLASSES_REGEX = /\s+/;
260
+ const SPLIT_CLASSES_REGEX = /\s+/;
308
261
  function mergeClassList(classList, configUtils) {
309
- var splitModifiers = configUtils.splitModifiers,
310
- getClassGroupId = configUtils.getClassGroupId,
311
- getConflictingClassGroupIds = configUtils.getConflictingClassGroupIds;
262
+ const {
263
+ splitModifiers,
264
+ getClassGroupId,
265
+ getConflictingClassGroupIds
266
+ } = configUtils;
312
267
  /**
313
268
  * Set of classGroupIds in following format:
314
269
  * `{importantModifier}{variantModifiers}{classGroupId}`
@@ -316,77 +271,109 @@ function mergeClassList(classList, configUtils) {
316
271
  * @example 'hover:focus:bg-color'
317
272
  * @example 'md:!pr'
318
273
  */
319
- var classGroupsInConflict = new Set();
320
- return classList.trim().split(SPLIT_CLASSES_REGEX).map(function (originalClassName) {
321
- var _splitModifiers = splitModifiers(originalClassName),
322
- modifiers = _splitModifiers.modifiers,
323
- hasImportantModifier = _splitModifiers.hasImportantModifier,
324
- baseClassName = _splitModifiers.baseClassName,
325
- maybePostfixModifierPosition = _splitModifiers.maybePostfixModifierPosition;
326
- var classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
327
- var hasPostfixModifier = Boolean(maybePostfixModifierPosition);
274
+ const classGroupsInConflict = new Set();
275
+ return classList.trim().split(SPLIT_CLASSES_REGEX).map(originalClassName => {
276
+ const {
277
+ modifiers,
278
+ hasImportantModifier,
279
+ baseClassName,
280
+ maybePostfixModifierPosition
281
+ } = splitModifiers(originalClassName);
282
+ let classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
283
+ let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
328
284
  if (!classGroupId) {
329
285
  if (!maybePostfixModifierPosition) {
330
286
  return {
331
287
  isTailwindClass: false,
332
- originalClassName: originalClassName
288
+ originalClassName
333
289
  };
334
290
  }
335
291
  classGroupId = getClassGroupId(baseClassName);
336
292
  if (!classGroupId) {
337
293
  return {
338
294
  isTailwindClass: false,
339
- originalClassName: originalClassName
295
+ originalClassName
340
296
  };
341
297
  }
342
298
  hasPostfixModifier = false;
343
299
  }
344
- var variantModifier = sortModifiers(modifiers).join(':');
345
- var modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
300
+ const variantModifier = sortModifiers(modifiers).join(':');
301
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
346
302
  return {
347
303
  isTailwindClass: true,
348
- modifierId: modifierId,
349
- classGroupId: classGroupId,
350
- originalClassName: originalClassName,
351
- hasPostfixModifier: hasPostfixModifier
304
+ modifierId,
305
+ classGroupId,
306
+ originalClassName,
307
+ hasPostfixModifier
352
308
  };
353
309
  }).reverse()
354
310
  // Last class in conflict wins, so we need to filter conflicting classes in reverse order.
355
- .filter(function (parsed) {
311
+ .filter(parsed => {
356
312
  if (!parsed.isTailwindClass) {
357
313
  return true;
358
314
  }
359
- var modifierId = parsed.modifierId,
360
- classGroupId = parsed.classGroupId,
361
- hasPostfixModifier = parsed.hasPostfixModifier;
362
- var classId = modifierId + classGroupId;
315
+ const {
316
+ modifierId,
317
+ classGroupId,
318
+ hasPostfixModifier
319
+ } = parsed;
320
+ const classId = modifierId + classGroupId;
363
321
  if (classGroupsInConflict.has(classId)) {
364
322
  return false;
365
323
  }
366
324
  classGroupsInConflict.add(classId);
367
- getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(function (group) {
368
- return classGroupsInConflict.add(modifierId + group);
369
- });
325
+ getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(group => classGroupsInConflict.add(modifierId + group));
370
326
  return true;
371
- }).reverse().map(function (parsed) {
372
- return parsed.originalClassName;
373
- }).join(' ');
327
+ }).reverse().map(parsed => parsed.originalClassName).join(' ');
374
328
  }
375
329
 
376
- function createTailwindMerge() {
377
- for (var _len = arguments.length, createConfig = new Array(_len), _key = 0; _key < _len; _key++) {
378
- createConfig[_key] = arguments[_key];
330
+ /**
331
+ * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
332
+ *
333
+ * Specifically:
334
+ * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
335
+ * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
336
+ *
337
+ * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
338
+ */
339
+ function twJoin() {
340
+ let index = 0;
341
+ let argument;
342
+ let resolvedValue;
343
+ let string = '';
344
+ while (index < arguments.length) {
345
+ if (argument = arguments[index++]) {
346
+ if (resolvedValue = toValue(argument)) {
347
+ string && (string += ' ');
348
+ string += resolvedValue;
349
+ }
350
+ }
351
+ }
352
+ return string;
353
+ }
354
+ function toValue(mix) {
355
+ if (typeof mix === 'string') {
356
+ return mix;
357
+ }
358
+ let resolvedValue;
359
+ let string = '';
360
+ for (let k = 0; k < mix.length; k++) {
361
+ if (mix[k]) {
362
+ if (resolvedValue = toValue(mix[k])) {
363
+ string && (string += ' ');
364
+ string += resolvedValue;
365
+ }
366
+ }
379
367
  }
380
- var configUtils;
381
- var cacheGet;
382
- var cacheSet;
383
- var functionToCall = initTailwindMerge;
368
+ return string;
369
+ }
370
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
371
+ let configUtils;
372
+ let cacheGet;
373
+ let cacheSet;
374
+ let functionToCall = initTailwindMerge;
384
375
  function initTailwindMerge(classList) {
385
- var firstCreateConfig = createConfig[0],
386
- restCreateConfig = createConfig.slice(1);
387
- var config = restCreateConfig.reduce(function (previousConfig, createConfigCurrent) {
388
- return createConfigCurrent(previousConfig);
389
- }, firstCreateConfig());
376
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
390
377
  configUtils = createConfigUtils(config);
391
378
  cacheGet = configUtils.cache.get;
392
379
  cacheSet = configUtils.cache.set;
@@ -394,11 +381,11 @@ function createTailwindMerge() {
394
381
  return tailwindMerge(classList);
395
382
  }
396
383
  function tailwindMerge(classList) {
397
- var cachedResult = cacheGet(classList);
384
+ const cachedResult = cacheGet(classList);
398
385
  if (cachedResult) {
399
386
  return cachedResult;
400
387
  }
401
- var result = mergeClassList(classList, configUtils);
388
+ const result = mergeClassList(classList, configUtils);
402
389
  cacheSet(classList, result);
403
390
  return result;
404
391
  }
@@ -406,166 +393,156 @@ function createTailwindMerge() {
406
393
  return functionToCall(twJoin.apply(null, arguments));
407
394
  };
408
395
  }
409
-
410
396
  function fromTheme(key) {
411
- var themeGetter = function themeGetter(theme) {
412
- return theme[key] || [];
413
- };
397
+ const themeGetter = theme => theme[key] || [];
414
398
  themeGetter.isThemeGetter = true;
415
399
  return themeGetter;
416
400
  }
417
-
418
- var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
419
- var fractionRegex = /^\d+\/\d+$/;
420
- var stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);
421
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
422
- 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$/;
423
- // Shadow always begins with x and y offset separated by underscore
424
- var shadowRegex = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
401
+ const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
402
+ const fractionRegex = /^\d+\/\d+$/;
403
+ const stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);
404
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
405
+ 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$/;
406
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
407
+ // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
408
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
409
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
425
410
  function isLength(value) {
426
- return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value) || isArbitraryLength(value);
411
+ return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
427
412
  }
428
413
  function isArbitraryLength(value) {
429
414
  return getIsArbitraryValue(value, 'length', isLengthOnly);
430
415
  }
431
- function isArbitrarySize(value) {
432
- return getIsArbitraryValue(value, 'size', isNever);
433
- }
434
- function isArbitraryPosition(value) {
435
- return getIsArbitraryValue(value, 'position', isNever);
436
- }
437
- function isArbitraryUrl(value) {
438
- return getIsArbitraryValue(value, 'url', isUrl);
416
+ function isNumber(value) {
417
+ return Boolean(value) && !Number.isNaN(Number(value));
439
418
  }
440
419
  function isArbitraryNumber(value) {
441
420
  return getIsArbitraryValue(value, 'number', isNumber);
442
421
  }
443
- function isNumber(value) {
444
- return !Number.isNaN(Number(value));
422
+ function isInteger(value) {
423
+ return Boolean(value) && Number.isInteger(Number(value));
445
424
  }
446
425
  function isPercent(value) {
447
426
  return value.endsWith('%') && isNumber(value.slice(0, -1));
448
427
  }
449
- function isInteger(value) {
450
- return isIntegerOnly(value) || getIsArbitraryValue(value, 'number', isIntegerOnly);
451
- }
452
428
  function isArbitraryValue(value) {
453
429
  return arbitraryValueRegex.test(value);
454
430
  }
455
- function isAny() {
456
- return true;
457
- }
458
431
  function isTshirtSize(value) {
459
432
  return tshirtUnitRegex.test(value);
460
433
  }
434
+ const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
435
+ function isArbitrarySize(value) {
436
+ return getIsArbitraryValue(value, sizeLabels, isNever);
437
+ }
438
+ function isArbitraryPosition(value) {
439
+ return getIsArbitraryValue(value, 'position', isNever);
440
+ }
441
+ const imageLabels = /*#__PURE__*/new Set(['image', 'url']);
442
+ function isArbitraryImage(value) {
443
+ return getIsArbitraryValue(value, imageLabels, isImage);
444
+ }
461
445
  function isArbitraryShadow(value) {
462
446
  return getIsArbitraryValue(value, '', isShadow);
463
447
  }
448
+ function isAny() {
449
+ return true;
450
+ }
464
451
  function getIsArbitraryValue(value, label, testValue) {
465
- var result = arbitraryValueRegex.exec(value);
452
+ const result = arbitraryValueRegex.exec(value);
466
453
  if (result) {
467
454
  if (result[1]) {
468
- return result[1] === label;
455
+ return typeof label === 'string' ? result[1] === label : label.has(result[1]);
469
456
  }
470
457
  return testValue(result[2]);
471
458
  }
472
459
  return false;
473
460
  }
474
461
  function isLengthOnly(value) {
475
- return lengthUnitRegex.test(value);
462
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
463
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
464
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
465
+ return lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
476
466
  }
477
467
  function isNever() {
478
468
  return false;
479
469
  }
480
- function isUrl(value) {
481
- return value.startsWith('url(');
482
- }
483
- function isIntegerOnly(value) {
484
- return Number.isInteger(Number(value));
485
- }
486
470
  function isShadow(value) {
487
471
  return shadowRegex.test(value);
488
472
  }
489
-
473
+ function isImage(value) {
474
+ return imageRegex.test(value);
475
+ }
476
+ const validators = /*#__PURE__*/Object.defineProperty({
477
+ __proto__: null,
478
+ isAny,
479
+ isArbitraryImage,
480
+ isArbitraryLength,
481
+ isArbitraryNumber,
482
+ isArbitraryPosition,
483
+ isArbitraryShadow,
484
+ isArbitrarySize,
485
+ isArbitraryValue,
486
+ isInteger,
487
+ isLength,
488
+ isNumber,
489
+ isPercent,
490
+ isTshirtSize
491
+ }, Symbol.toStringTag, {
492
+ value: 'Module'
493
+ });
490
494
  function getDefaultConfig() {
491
- var colors = fromTheme('colors');
492
- var spacing = fromTheme('spacing');
493
- var blur = fromTheme('blur');
494
- var brightness = fromTheme('brightness');
495
- var borderColor = fromTheme('borderColor');
496
- var borderRadius = fromTheme('borderRadius');
497
- var borderSpacing = fromTheme('borderSpacing');
498
- var borderWidth = fromTheme('borderWidth');
499
- var contrast = fromTheme('contrast');
500
- var grayscale = fromTheme('grayscale');
501
- var hueRotate = fromTheme('hueRotate');
502
- var invert = fromTheme('invert');
503
- var gap = fromTheme('gap');
504
- var gradientColorStops = fromTheme('gradientColorStops');
505
- var gradientColorStopPositions = fromTheme('gradientColorStopPositions');
506
- var inset = fromTheme('inset');
507
- var margin = fromTheme('margin');
508
- var opacity = fromTheme('opacity');
509
- var padding = fromTheme('padding');
510
- var saturate = fromTheme('saturate');
511
- var scale = fromTheme('scale');
512
- var sepia = fromTheme('sepia');
513
- var skew = fromTheme('skew');
514
- var space = fromTheme('space');
515
- var translate = fromTheme('translate');
516
- var getOverscroll = function getOverscroll() {
517
- return ['auto', 'contain', 'none'];
518
- };
519
- var getOverflow = function getOverflow() {
520
- return ['auto', 'hidden', 'clip', 'visible', 'scroll'];
521
- };
522
- var getSpacingWithAutoAndArbitrary = function getSpacingWithAutoAndArbitrary() {
523
- return ['auto', isArbitraryValue, spacing];
524
- };
525
- var getSpacingWithArbitrary = function getSpacingWithArbitrary() {
526
- return [isArbitraryValue, spacing];
527
- };
528
- var getLengthWithEmpty = function getLengthWithEmpty() {
529
- return ['', isLength];
530
- };
531
- var getNumberWithAutoAndArbitrary = function getNumberWithAutoAndArbitrary() {
532
- return ['auto', isNumber, isArbitraryValue];
533
- };
534
- var getPositions = function getPositions() {
535
- return ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
536
- };
537
- var getLineStyles = function getLineStyles() {
538
- return ['solid', 'dashed', 'dotted', 'double', 'none'];
539
- };
540
- var getBlendModes = function getBlendModes() {
541
- return ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'plus-lighter'];
542
- };
543
- var getAlign = function getAlign() {
544
- return ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];
545
- };
546
- var getZeroAndEmpty = function getZeroAndEmpty() {
547
- return ['', '0', isArbitraryValue];
548
- };
549
- var getBreaks = function getBreaks() {
550
- return ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
551
- };
552
- var getNumber = function getNumber() {
553
- return [isNumber, isArbitraryNumber];
554
- };
555
- var getNumberAndArbitrary = function getNumberAndArbitrary() {
556
- return [isNumber, isArbitraryValue];
557
- };
495
+ const colors = fromTheme('colors');
496
+ const spacing = fromTheme('spacing');
497
+ const blur = fromTheme('blur');
498
+ const brightness = fromTheme('brightness');
499
+ const borderColor = fromTheme('borderColor');
500
+ const borderRadius = fromTheme('borderRadius');
501
+ const borderSpacing = fromTheme('borderSpacing');
502
+ const borderWidth = fromTheme('borderWidth');
503
+ const contrast = fromTheme('contrast');
504
+ const grayscale = fromTheme('grayscale');
505
+ const hueRotate = fromTheme('hueRotate');
506
+ const invert = fromTheme('invert');
507
+ const gap = fromTheme('gap');
508
+ const gradientColorStops = fromTheme('gradientColorStops');
509
+ const gradientColorStopPositions = fromTheme('gradientColorStopPositions');
510
+ const inset = fromTheme('inset');
511
+ const margin = fromTheme('margin');
512
+ const opacity = fromTheme('opacity');
513
+ const padding = fromTheme('padding');
514
+ const saturate = fromTheme('saturate');
515
+ const scale = fromTheme('scale');
516
+ const sepia = fromTheme('sepia');
517
+ const skew = fromTheme('skew');
518
+ const space = fromTheme('space');
519
+ const translate = fromTheme('translate');
520
+ const getOverscroll = () => ['auto', 'contain', 'none'];
521
+ const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
522
+ const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing];
523
+ const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
524
+ const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength];
525
+ const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue];
526
+ const getPositions = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
527
+ const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none'];
528
+ const getBlendModes = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'plus-lighter'];
529
+ const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];
530
+ const getZeroAndEmpty = () => ['', '0', isArbitraryValue];
531
+ const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
532
+ const getNumber = () => [isNumber, isArbitraryNumber];
533
+ const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
558
534
  return {
559
535
  cacheSize: 500,
536
+ separator: ':',
560
537
  theme: {
561
538
  colors: [isAny],
562
- spacing: [isLength],
539
+ spacing: [isLength, isArbitraryLength],
563
540
  blur: ['none', '', isTshirtSize, isArbitraryValue],
564
541
  brightness: getNumber(),
565
542
  borderColor: [colors],
566
543
  borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue],
567
544
  borderSpacing: getSpacingWithArbitrary(),
568
- borderWidth: getLengthWithEmpty(),
545
+ borderWidth: getLengthWithEmptyAndArbitrary(),
569
546
  contrast: getNumber(),
570
547
  grayscale: getZeroAndEmpty(),
571
548
  hueRotate: getNumberAndArbitrary(),
@@ -649,15 +626,15 @@ function getDefaultConfig() {
649
626
  * Floats
650
627
  * @see https://tailwindcss.com/docs/float
651
628
  */
652
- "float": [{
653
- "float": ['right', 'left', 'none']
629
+ float: [{
630
+ float: ['right', 'left', 'none', 'start', 'end']
654
631
  }],
655
632
  /**
656
633
  * Clear
657
634
  * @see https://tailwindcss.com/docs/clear
658
635
  */
659
636
  clear: [{
660
- clear: ['left', 'right', 'both', 'none']
637
+ clear: ['left', 'right', 'both', 'none', 'start', 'end']
661
638
  }],
662
639
  /**
663
640
  * Isolation
@@ -676,7 +653,7 @@ function getDefaultConfig() {
676
653
  * @see https://tailwindcss.com/docs/object-position
677
654
  */
678
655
  'object-position': [{
679
- object: [].concat(getPositions(), [isArbitraryValue])
656
+ object: [...getPositions(), isArbitraryValue]
680
657
  }],
681
658
  /**
682
659
  * Overflow
@@ -798,7 +775,7 @@ function getDefaultConfig() {
798
775
  * @see https://tailwindcss.com/docs/z-index
799
776
  */
800
777
  z: [{
801
- z: ['auto', isInteger]
778
+ z: ['auto', isInteger, isArbitraryValue]
802
779
  }],
803
780
  // Flexbox and Grid
804
781
  /**
@@ -848,7 +825,7 @@ function getDefaultConfig() {
848
825
  * @see https://tailwindcss.com/docs/order
849
826
  */
850
827
  order: [{
851
- order: ['first', 'last', 'none', isInteger]
828
+ order: ['first', 'last', 'none', isInteger, isArbitraryValue]
852
829
  }],
853
830
  /**
854
831
  * Grid Template Columns
@@ -863,7 +840,7 @@ function getDefaultConfig() {
863
840
  */
864
841
  'col-start-end': [{
865
842
  col: ['auto', {
866
- span: ['full', isInteger]
843
+ span: ['full', isInteger, isArbitraryValue]
867
844
  }, isArbitraryValue]
868
845
  }],
869
846
  /**
@@ -893,7 +870,7 @@ function getDefaultConfig() {
893
870
  */
894
871
  'row-start-end': [{
895
872
  row: ['auto', {
896
- span: [isInteger]
873
+ span: [isInteger, isArbitraryValue]
897
874
  }, isArbitraryValue]
898
875
  }],
899
876
  /**
@@ -957,7 +934,7 @@ function getDefaultConfig() {
957
934
  * @see https://tailwindcss.com/docs/justify-content
958
935
  */
959
936
  'justify-content': [{
960
- justify: ['normal'].concat(getAlign())
937
+ justify: ['normal', ...getAlign()]
961
938
  }],
962
939
  /**
963
940
  * Justify Items
@@ -978,7 +955,7 @@ function getDefaultConfig() {
978
955
  * @see https://tailwindcss.com/docs/align-content
979
956
  */
980
957
  'align-content': [{
981
- content: ['normal'].concat(getAlign(), ['baseline'])
958
+ content: ['normal', ...getAlign(), 'baseline']
982
959
  }],
983
960
  /**
984
961
  * Align Items
@@ -999,7 +976,7 @@ function getDefaultConfig() {
999
976
  * @see https://tailwindcss.com/docs/place-content
1000
977
  */
1001
978
  'place-content': [{
1002
- 'place-content': [].concat(getAlign(), ['baseline'])
979
+ 'place-content': [...getAlign(), 'baseline']
1003
980
  }],
1004
981
  /**
1005
982
  * Place Items
@@ -1172,44 +1149,51 @@ function getDefaultConfig() {
1172
1149
  * @see https://tailwindcss.com/docs/width
1173
1150
  */
1174
1151
  w: [{
1175
- w: ['auto', 'min', 'max', 'fit', isArbitraryValue, spacing]
1152
+ w: ['auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing]
1176
1153
  }],
1177
1154
  /**
1178
1155
  * Min-Width
1179
1156
  * @see https://tailwindcss.com/docs/min-width
1180
1157
  */
1181
1158
  'min-w': [{
1182
- 'min-w': ['min', 'max', 'fit', isArbitraryValue, isLength]
1159
+ 'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit']
1183
1160
  }],
1184
1161
  /**
1185
1162
  * Max-Width
1186
1163
  * @see https://tailwindcss.com/docs/max-width
1187
1164
  */
1188
1165
  'max-w': [{
1189
- 'max-w': ['0', 'none', 'full', 'min', 'max', 'fit', 'prose', {
1166
+ 'max-w': [isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', {
1190
1167
  screen: [isTshirtSize]
1191
- }, isTshirtSize, isArbitraryValue]
1168
+ }, isTshirtSize]
1192
1169
  }],
1193
1170
  /**
1194
1171
  * Height
1195
1172
  * @see https://tailwindcss.com/docs/height
1196
1173
  */
1197
1174
  h: [{
1198
- h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit']
1175
+ h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1199
1176
  }],
1200
1177
  /**
1201
1178
  * Min-Height
1202
1179
  * @see https://tailwindcss.com/docs/min-height
1203
1180
  */
1204
1181
  'min-h': [{
1205
- 'min-h': ['min', 'max', 'fit', isArbitraryValue, isLength]
1182
+ 'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1206
1183
  }],
1207
1184
  /**
1208
1185
  * Max-Height
1209
1186
  * @see https://tailwindcss.com/docs/max-height
1210
1187
  */
1211
1188
  'max-h': [{
1212
- 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit']
1189
+ 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']
1190
+ }],
1191
+ /**
1192
+ * Size
1193
+ * @see https://tailwindcss.com/docs/size
1194
+ */
1195
+ size: [{
1196
+ size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit']
1213
1197
  }],
1214
1198
  // Typography
1215
1199
  /**
@@ -1292,7 +1276,7 @@ function getDefaultConfig() {
1292
1276
  * @see https://tailwindcss.com/docs/line-height
1293
1277
  */
1294
1278
  leading: [{
1295
- leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isArbitraryValue, isLength]
1279
+ leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue]
1296
1280
  }],
1297
1281
  /**
1298
1282
  * List Style Image
@@ -1361,21 +1345,21 @@ function getDefaultConfig() {
1361
1345
  * @see https://tailwindcss.com/docs/text-decoration-style
1362
1346
  */
1363
1347
  'text-decoration-style': [{
1364
- decoration: [].concat(getLineStyles(), ['wavy'])
1348
+ decoration: [...getLineStyles(), 'wavy']
1365
1349
  }],
1366
1350
  /**
1367
1351
  * Text Decoration Thickness
1368
1352
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1369
1353
  */
1370
1354
  'text-decoration-thickness': [{
1371
- decoration: ['auto', 'from-font', isLength]
1355
+ decoration: ['auto', 'from-font', isLength, isArbitraryLength]
1372
1356
  }],
1373
1357
  /**
1374
1358
  * Text Underline Offset
1375
1359
  * @see https://tailwindcss.com/docs/text-underline-offset
1376
1360
  */
1377
1361
  'underline-offset': [{
1378
- 'underline-offset': ['auto', isArbitraryValue, isLength]
1362
+ 'underline-offset': ['auto', isLength, isArbitraryValue]
1379
1363
  }],
1380
1364
  /**
1381
1365
  * Text Decoration Color
@@ -1394,6 +1378,13 @@ function getDefaultConfig() {
1394
1378
  * @see https://tailwindcss.com/docs/text-overflow
1395
1379
  */
1396
1380
  'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
1381
+ /**
1382
+ * Text Wrap
1383
+ * @see https://tailwindcss.com/docs/text-wrap
1384
+ */
1385
+ 'text-wrap': [{
1386
+ text: ['wrap', 'nowrap', 'balance', 'pretty']
1387
+ }],
1397
1388
  /**
1398
1389
  * Text Indent
1399
1390
  * @see https://tailwindcss.com/docs/text-indent
@@ -1419,8 +1410,8 @@ function getDefaultConfig() {
1419
1410
  * Word Break
1420
1411
  * @see https://tailwindcss.com/docs/word-break
1421
1412
  */
1422
- "break": [{
1423
- "break": ['normal', 'words', 'all', 'keep']
1413
+ break: [{
1414
+ break: ['normal', 'words', 'all', 'keep']
1424
1415
  }],
1425
1416
  /**
1426
1417
  * Hyphens
@@ -1471,7 +1462,7 @@ function getDefaultConfig() {
1471
1462
  * @see https://tailwindcss.com/docs/background-position
1472
1463
  */
1473
1464
  'bg-position': [{
1474
- bg: [].concat(getPositions(), [isArbitraryPosition])
1465
+ bg: [...getPositions(), isArbitraryPosition]
1475
1466
  }],
1476
1467
  /**
1477
1468
  * Background Repeat
@@ -1496,7 +1487,7 @@ function getDefaultConfig() {
1496
1487
  'bg-image': [{
1497
1488
  bg: ['none', {
1498
1489
  'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
1499
- }, isArbitraryUrl]
1490
+ }, isArbitraryImage]
1500
1491
  }],
1501
1492
  /**
1502
1493
  * Background Color
@@ -1728,7 +1719,7 @@ function getDefaultConfig() {
1728
1719
  * @see https://tailwindcss.com/docs/border-style
1729
1720
  */
1730
1721
  'border-style': [{
1731
- border: [].concat(getLineStyles(), ['hidden'])
1722
+ border: [...getLineStyles(), 'hidden']
1732
1723
  }],
1733
1724
  /**
1734
1725
  * Divide Width X
@@ -1829,21 +1820,21 @@ function getDefaultConfig() {
1829
1820
  * @see https://tailwindcss.com/docs/outline-style
1830
1821
  */
1831
1822
  'outline-style': [{
1832
- outline: [''].concat(getLineStyles())
1823
+ outline: ['', ...getLineStyles()]
1833
1824
  }],
1834
1825
  /**
1835
1826
  * Outline Offset
1836
1827
  * @see https://tailwindcss.com/docs/outline-offset
1837
1828
  */
1838
1829
  'outline-offset': [{
1839
- 'outline-offset': [isArbitraryValue, isLength]
1830
+ 'outline-offset': [isLength, isArbitraryValue]
1840
1831
  }],
1841
1832
  /**
1842
1833
  * Outline Width
1843
1834
  * @see https://tailwindcss.com/docs/outline-width
1844
1835
  */
1845
1836
  'outline-w': [{
1846
- outline: [isLength]
1837
+ outline: [isLength, isArbitraryLength]
1847
1838
  }],
1848
1839
  /**
1849
1840
  * Outline Color
@@ -1857,7 +1848,7 @@ function getDefaultConfig() {
1857
1848
  * @see https://tailwindcss.com/docs/ring-width
1858
1849
  */
1859
1850
  'ring-w': [{
1860
- ring: getLengthWithEmpty()
1851
+ ring: getLengthWithEmptyAndArbitrary()
1861
1852
  }],
1862
1853
  /**
1863
1854
  * Ring Width Inset
@@ -1883,7 +1874,7 @@ function getDefaultConfig() {
1883
1874
  * @see https://tailwindcss.com/docs/ring-offset-width
1884
1875
  */
1885
1876
  'ring-offset-w': [{
1886
- 'ring-offset': [isLength]
1877
+ 'ring-offset': [isLength, isArbitraryLength]
1887
1878
  }],
1888
1879
  /**
1889
1880
  * Ring Offset Color
@@ -2233,7 +2224,9 @@ function getDefaultConfig() {
2233
2224
  * Appearance
2234
2225
  * @see https://tailwindcss.com/docs/appearance
2235
2226
  */
2236
- appearance: ['appearance-none'],
2227
+ appearance: [{
2228
+ appearance: ['none', 'auto']
2229
+ }],
2237
2230
  /**
2238
2231
  * Cursor
2239
2232
  * @see https://tailwindcss.com/docs/cursor
@@ -2428,10 +2421,27 @@ function getDefaultConfig() {
2428
2421
  * @see https://tailwindcss.com/docs/touch-action
2429
2422
  */
2430
2423
  touch: [{
2431
- touch: ['auto', 'none', 'pinch-zoom', 'manipulation', {
2432
- pan: ['x', 'left', 'right', 'y', 'up', 'down']
2433
- }]
2424
+ touch: ['auto', 'none', 'manipulation']
2425
+ }],
2426
+ /**
2427
+ * Touch Action X
2428
+ * @see https://tailwindcss.com/docs/touch-action
2429
+ */
2430
+ 'touch-x': [{
2431
+ 'touch-pan': ['x', 'left', 'right']
2432
+ }],
2433
+ /**
2434
+ * Touch Action Y
2435
+ * @see https://tailwindcss.com/docs/touch-action
2436
+ */
2437
+ 'touch-y': [{
2438
+ 'touch-pan': ['y', 'up', 'down']
2434
2439
  }],
2440
+ /**
2441
+ * Touch Action Pinch Zoom
2442
+ * @see https://tailwindcss.com/docs/touch-action
2443
+ */
2444
+ 'touch-pz': ['touch-pinch-zoom'],
2435
2445
  /**
2436
2446
  * User Select
2437
2447
  * @see https://tailwindcss.com/docs/user-select
@@ -2459,7 +2469,7 @@ function getDefaultConfig() {
2459
2469
  * @see https://tailwindcss.com/docs/stroke-width
2460
2470
  */
2461
2471
  'stroke-w': [{
2462
- stroke: [isLength, isArbitraryNumber]
2472
+ stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2463
2473
  }],
2464
2474
  /**
2465
2475
  * Stroke
@@ -2473,7 +2483,14 @@ function getDefaultConfig() {
2473
2483
  * Screen Readers
2474
2484
  * @see https://tailwindcss.com/docs/screen-readers
2475
2485
  */
2476
- sr: ['sr-only', 'not-sr-only']
2486
+ sr: ['sr-only', 'not-sr-only'],
2487
+ /**
2488
+ * Forced Color Adjust
2489
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2490
+ */
2491
+ 'forced-color-adjust': [{
2492
+ 'forced-color-adjust': ['auto', 'none']
2493
+ }]
2477
2494
  },
2478
2495
  conflictingClassGroups: {
2479
2496
  overflow: ['overflow-x', 'overflow-y'],
@@ -2489,6 +2506,7 @@ function getDefaultConfig() {
2489
2506
  m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
2490
2507
  mx: ['mr', 'ml'],
2491
2508
  my: ['mt', 'mb'],
2509
+ size: ['w', 'h'],
2492
2510
  'font-size': ['leading'],
2493
2511
  'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
2494
2512
  'fvn-ordinal': ['fvn-normal'],
@@ -2496,6 +2514,7 @@ function getDefaultConfig() {
2496
2514
  'fvn-figure': ['fvn-normal'],
2497
2515
  'fvn-spacing': ['fvn-normal'],
2498
2516
  'fvn-fraction': ['fvn-normal'],
2517
+ 'line-clamp': ['display', 'overflow'],
2499
2518
  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'],
2500
2519
  'rounded-s': ['rounded-ss', 'rounded-es'],
2501
2520
  'rounded-e': ['rounded-se', 'rounded-ee'],
@@ -2515,7 +2534,11 @@ function getDefaultConfig() {
2515
2534
  'scroll-my': ['scroll-mt', 'scroll-mb'],
2516
2535
  'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
2517
2536
  'scroll-px': ['scroll-pr', 'scroll-pl'],
2518
- 'scroll-py': ['scroll-pt', 'scroll-pb']
2537
+ 'scroll-py': ['scroll-pt', 'scroll-pb'],
2538
+ touch: ['touch-x', 'touch-y', 'touch-pz'],
2539
+ 'touch-x': ['touch'],
2540
+ 'touch-y': ['touch'],
2541
+ 'touch-pz': ['touch']
2519
2542
  },
2520
2543
  conflictingClassGroupModifiers: {
2521
2544
  'font-size': ['leading']
@@ -2527,45 +2550,61 @@ function getDefaultConfig() {
2527
2550
  * @param baseConfig Config where other config will be merged into. This object will be mutated.
2528
2551
  * @param configExtension Partial config to merge into the `baseConfig`.
2529
2552
  */
2530
- function mergeConfigs(baseConfig, configExtension) {
2531
- for (var key in configExtension) {
2532
- mergePropertyRecursively(baseConfig, key, configExtension[key]);
2553
+ function mergeConfigs(baseConfig, {
2554
+ cacheSize,
2555
+ prefix,
2556
+ separator,
2557
+ extend = {},
2558
+ override = {}
2559
+ }) {
2560
+ overrideProperty(baseConfig, 'cacheSize', cacheSize);
2561
+ overrideProperty(baseConfig, 'prefix', prefix);
2562
+ overrideProperty(baseConfig, 'separator', separator);
2563
+ for (const configKey in override) {
2564
+ overrideConfigProperties(baseConfig[configKey], override[configKey]);
2565
+ }
2566
+ for (const key in extend) {
2567
+ mergeConfigProperties(baseConfig[key], extend[key]);
2533
2568
  }
2534
2569
  return baseConfig;
2535
2570
  }
2536
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2537
- var overrideTypes = /*#__PURE__*/new Set(['string', 'number', 'boolean']);
2538
- function mergePropertyRecursively(baseObject, mergeKey, mergeValue) {
2539
- if (!hasOwnProperty.call(baseObject, mergeKey) || overrideTypes.has(typeof mergeValue) || mergeValue === null) {
2540
- baseObject[mergeKey] = mergeValue;
2541
- return;
2571
+ function overrideProperty(baseObject, overrideKey, overrideValue) {
2572
+ if (overrideValue !== undefined) {
2573
+ baseObject[overrideKey] = overrideValue;
2542
2574
  }
2543
- if (Array.isArray(mergeValue) && Array.isArray(baseObject[mergeKey])) {
2544
- baseObject[mergeKey] = baseObject[mergeKey].concat(mergeValue);
2545
- return;
2546
- }
2547
- if (typeof mergeValue === 'object' && typeof baseObject[mergeKey] === 'object') {
2548
- if (baseObject[mergeKey] === null) {
2549
- baseObject[mergeKey] = mergeValue;
2550
- return;
2551
- }
2552
- for (var nextKey in mergeValue) {
2553
- mergePropertyRecursively(baseObject[mergeKey], nextKey, mergeValue[nextKey]);
2575
+ }
2576
+ function overrideConfigProperties(baseObject, overrideObject) {
2577
+ if (overrideObject) {
2578
+ for (const key in overrideObject) {
2579
+ overrideProperty(baseObject, key, overrideObject[key]);
2554
2580
  }
2555
2581
  }
2556
2582
  }
2557
-
2558
- function extendTailwindMerge(configExtension) {
2559
- for (var _len = arguments.length, createConfig = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2560
- createConfig[_key - 1] = arguments[_key];
2583
+ function mergeConfigProperties(baseObject, mergeObject) {
2584
+ if (mergeObject) {
2585
+ for (const key in mergeObject) {
2586
+ const mergeValue = mergeObject[key];
2587
+ if (mergeValue !== undefined) {
2588
+ baseObject[key] = (baseObject[key] || []).concat(mergeValue);
2589
+ }
2590
+ }
2561
2591
  }
2562
- return typeof configExtension === 'function' ? createTailwindMerge.apply(void 0, [getDefaultConfig, configExtension].concat(createConfig)) : createTailwindMerge.apply(void 0, [function () {
2563
- return mergeConfigs(getDefaultConfig(), configExtension);
2564
- }].concat(createConfig));
2565
2592
  }
2593
+ function extendTailwindMerge(configExtension, ...createConfig) {
2594
+ return typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
2595
+ }
2596
+ const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
2597
+ exports.createTailwindMerge = createTailwindMerge;
2598
+ exports.extendTailwindMerge = extendTailwindMerge;
2599
+ exports.fromTheme = fromTheme;
2600
+ exports.getDefaultConfig = getDefaultConfig;
2601
+ exports.mergeConfigs = mergeConfigs;
2602
+ exports.twJoin = twJoin;
2603
+ exports.twMerge = twMerge;
2604
+ exports.validators = validators;
2605
+ //# sourceMappingURL=bundle-cjs.js.map
2606
+ });
2566
2607
 
2567
- var twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
2568
-
2569
- 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};
2608
+ 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};
2570
2609
 
2571
2610
  exports.ce = ce;