@abcagency/hc-ui-components 1.7.2 → 1.7.4

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 (115) hide show
  1. package/dist/_virtual/_rollupPluginBabelHelpers.js +306 -130
  2. package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
  3. package/dist/apis/hcApi.js.map +1 -1
  4. package/dist/clientToken.js.map +1 -1
  5. package/dist/components/HireControlMap.js +39 -43
  6. package/dist/components/HireControlMap.js.map +1 -1
  7. package/dist/components/containers/accordions/filter-container.js.map +1 -1
  8. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  9. package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
  10. package/dist/components/containers/filter/commute-container.js +22 -21
  11. package/dist/components/containers/filter/commute-container.js.map +1 -1
  12. package/dist/components/containers/filter/filter-container.js.map +1 -1
  13. package/dist/components/containers/filter/filter-item-container.js.map +1 -1
  14. package/dist/components/containers/filter/location-container.js.map +1 -1
  15. package/dist/components/containers/filter/points-of-interest-container.js.map +1 -1
  16. package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
  17. package/dist/components/containers/filter/search-container.js.map +1 -1
  18. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  19. package/dist/components/containers/list/item-list-container.js.map +1 -1
  20. package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
  21. package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
  22. package/dist/components/containers/maps/map-container.js +1 -1
  23. package/dist/components/containers/maps/map-container.js.map +1 -1
  24. package/dist/components/containers/maps/map-list-container.js.map +1 -1
  25. package/dist/components/containers/maps/map-marker-container.js.map +1 -1
  26. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  27. package/dist/components/modules/accordions/default.js.map +1 -1
  28. package/dist/components/modules/accordions/filterItem.js.map +1 -1
  29. package/dist/components/modules/accordions/filters.js.map +1 -1
  30. package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
  31. package/dist/components/modules/buttons/default.js.map +1 -1
  32. package/dist/components/modules/buttons/items-pill.js.map +1 -1
  33. package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
  34. package/dist/components/modules/buttons/show-all-button.js.map +1 -1
  35. package/dist/components/modules/cards/default.js.map +1 -1
  36. package/dist/components/modules/cards/filter.js.map +1 -1
  37. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  38. package/dist/components/modules/filter/commute.js.map +1 -1
  39. package/dist/components/modules/filter/index.js.map +1 -1
  40. package/dist/components/modules/filter/item.js.map +1 -1
  41. package/dist/components/modules/filter/location.js.map +1 -1
  42. package/dist/components/modules/filter/radio-item.js.map +1 -1
  43. package/dist/components/modules/filter/search.js.map +1 -1
  44. package/dist/components/modules/filter/sort.js.map +1 -1
  45. package/dist/components/modules/grid.js.map +1 -1
  46. package/dist/components/modules/icon.js.map +1 -1
  47. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  48. package/dist/components/modules/list/field-mapper-desktop.js.map +1 -1
  49. package/dist/components/modules/list/field-mapper-mobile.js.map +1 -1
  50. package/dist/components/modules/list/header-item.js.map +1 -1
  51. package/dist/components/modules/list/header.js.map +1 -1
  52. package/dist/components/modules/list/item-expand-card/index.js.map +1 -1
  53. package/dist/components/modules/list/item-list.js.map +1 -1
  54. package/dist/components/modules/list/list-item/list-item.js.map +1 -1
  55. package/dist/components/modules/maps/info-window-card.js.map +1 -1
  56. package/dist/components/modules/maps/info-window-content.js.map +1 -1
  57. package/dist/components/modules/maps/map-list.js.map +1 -1
  58. package/dist/components/modules/maps/map-marker.js.map +1 -1
  59. package/dist/components/modules/maps/map.js +8 -3
  60. package/dist/components/modules/maps/map.js.map +1 -1
  61. package/dist/components/modules/maps/place-marker.js.map +1 -1
  62. package/dist/components/modules/maps/tabs.js.map +1 -1
  63. package/dist/components/modules/skeleton/map-skeleton.js.map +1 -1
  64. package/dist/constants/eventTypes.js.map +1 -1
  65. package/dist/constants/placeTypes.js.map +1 -1
  66. package/dist/contexts/mapContext.js +14 -8
  67. package/dist/contexts/mapContext.js.map +1 -1
  68. package/dist/contexts/mapListContext.js +10 -3
  69. package/dist/contexts/mapListContext.js.map +1 -1
  70. package/dist/contexts/placesContext.js +21 -20
  71. package/dist/contexts/placesContext.js.map +1 -1
  72. package/dist/contexts/themeContext.js.map +1 -1
  73. package/dist/contexts/trackEventContext.js +1 -1
  74. package/dist/contexts/trackEventContext.js.map +1 -1
  75. package/dist/hooks/useList.js +3 -1
  76. package/dist/hooks/useList.js.map +1 -1
  77. package/dist/index.js +0 -1
  78. package/dist/index.js.map +1 -1
  79. package/dist/node_modules/@algolia/client-common/dist/common.js +6 -3
  80. package/dist/node_modules/@algolia/client-common/dist/common.js.map +1 -1
  81. package/dist/node_modules/@algolia/requester-browser-xhr/dist/requester.xhr.js +1 -1
  82. package/dist/node_modules/@algolia/requester-browser-xhr/dist/requester.xhr.js.map +1 -1
  83. package/dist/node_modules/algoliasearch/dist/lite/builds/browser.js +2 -2
  84. package/dist/node_modules/algoliasearch/dist/lite/builds/browser.js.map +1 -1
  85. package/dist/node_modules/fuse.js/dist/fuse.js +20 -29
  86. package/dist/node_modules/fuse.js/dist/fuse.js.map +1 -1
  87. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +162 -124
  88. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  89. package/dist/services/configService.js.map +1 -1
  90. package/dist/services/googlePlacesNearbyService.js.map +1 -1
  91. package/dist/services/listingAggregatorService.js.map +1 -1
  92. package/dist/services/listingEntityService.js.map +1 -1
  93. package/dist/services/listingService.js.map +1 -1
  94. package/dist/styles/index.css +1 -1
  95. package/dist/util/algoliaSearchUtil.js +42 -38
  96. package/dist/util/algoliaSearchUtil.js.map +1 -1
  97. package/dist/util/filterUtil.js +52 -48
  98. package/dist/util/filterUtil.js.map +1 -1
  99. package/dist/util/loading.js.map +1 -1
  100. package/dist/util/localStorageUtil.js.map +1 -1
  101. package/dist/util/mapIconUtil.js.map +1 -1
  102. package/dist/util/mapUtil.js.map +1 -1
  103. package/dist/util/sortUtil.js.map +1 -1
  104. package/dist/util/stringUtils.js.map +1 -1
  105. package/dist/util/twMerge.js.map +1 -1
  106. package/dist/util/urlFilterUtil.js +1 -1
  107. package/dist/util/urlFilterUtil.js.map +1 -1
  108. package/package.json +1 -1
  109. package/src/components/HireControlMap.js +13 -19
  110. package/src/components/modules/maps/map.js +10 -5
  111. package/src/contexts/mapContext.tsx +12 -6
  112. package/src/contexts/mapListContext.tsx +8 -2
  113. package/src/hooks/useList.js +3 -1
  114. package/src/index.js +1 -2
  115. package/src/components/modules/skeleton/map-skeleton.js +0 -51
@@ -1,31 +1,31 @@
1
1
  const CLASS_PART_SEPARATOR = '-';
2
- const createClassGroupUtils = config => {
2
+ function createClassGroupUtils(config) {
3
3
  const classMap = createClassMap(config);
4
4
  const {
5
5
  conflictingClassGroups,
6
6
  conflictingClassGroupModifiers
7
7
  } = config;
8
- const getClassGroupId = className => {
8
+ function getClassGroupId(className) {
9
9
  const classParts = className.split(CLASS_PART_SEPARATOR);
10
10
  // 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.
11
11
  if (classParts[0] === '' && classParts.length !== 1) {
12
12
  classParts.shift();
13
13
  }
14
14
  return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
15
- };
16
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
15
+ }
16
+ function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {
17
17
  const conflicts = conflictingClassGroups[classGroupId] || [];
18
18
  if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
19
19
  return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
20
20
  }
21
21
  return conflicts;
22
- };
22
+ }
23
23
  return {
24
24
  getClassGroupId,
25
25
  getConflictingClassGroupIds
26
26
  };
27
- };
28
- const getGroupRecursive = (classParts, classPartObject) => {
27
+ }
28
+ function getGroupRecursive(classParts, classPartObject) {
29
29
  if (classParts.length === 0) {
30
30
  return classPartObject.classGroupId;
31
31
  }
@@ -42,9 +42,9 @@ const getGroupRecursive = (classParts, classPartObject) => {
42
42
  return classPartObject.validators.find(({
43
43
  validator
44
44
  }) => validator(classRest))?.classGroupId;
45
- };
45
+ }
46
46
  const arbitraryPropertyRegex = /^\[(.+)\]$/;
47
- const getGroupIdForArbitraryProperty = className => {
47
+ function getGroupIdForArbitraryProperty(className) {
48
48
  if (arbitraryPropertyRegex.test(className)) {
49
49
  const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
50
50
  const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
@@ -53,11 +53,11 @@ const getGroupIdForArbitraryProperty = className => {
53
53
  return 'arbitrary..' + property;
54
54
  }
55
55
  }
56
- };
56
+ }
57
57
  /**
58
58
  * Exported for testing only
59
59
  */
60
- const createClassMap = config => {
60
+ function createClassMap(config) {
61
61
  const {
62
62
  theme,
63
63
  prefix
@@ -71,8 +71,8 @@ const createClassMap = config => {
71
71
  processClassesRecursively(classGroup, classMap, classGroupId, theme);
72
72
  });
73
73
  return classMap;
74
- };
75
- const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
74
+ }
75
+ function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
76
76
  classGroup.forEach(classDefinition => {
77
77
  if (typeof classDefinition === 'string') {
78
78
  const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
@@ -94,8 +94,8 @@ const processClassesRecursively = (classGroup, classPartObject, classGroupId, th
94
94
  processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
95
95
  });
96
96
  });
97
- };
98
- const getPart = (classPartObject, path) => {
97
+ }
98
+ function getPart(classPartObject, path) {
99
99
  let currentClassPartObject = classPartObject;
100
100
  path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
101
101
  if (!currentClassPartObject.nextPart.has(pathPart)) {
@@ -107,9 +107,11 @@ const getPart = (classPartObject, path) => {
107
107
  currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
108
108
  });
109
109
  return currentClassPartObject;
110
- };
111
- const isThemeGetter = func => func.isThemeGetter;
112
- const getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
110
+ }
111
+ function isThemeGetter(func) {
112
+ return func.isThemeGetter;
113
+ }
114
+ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
113
115
  if (!prefix) {
114
116
  return classGroupEntries;
115
117
  }
@@ -125,10 +127,10 @@ const getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
125
127
  });
126
128
  return [classGroupId, prefixedClassGroup];
127
129
  });
128
- };
130
+ }
129
131
 
130
132
  // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
131
- const createLruCache = maxCacheSize => {
133
+ function createLruCache(maxCacheSize) {
132
134
  if (maxCacheSize < 1) {
133
135
  return {
134
136
  get: () => undefined,
@@ -138,7 +140,7 @@ const createLruCache = maxCacheSize => {
138
140
  let cacheSize = 0;
139
141
  let cache = new Map();
140
142
  let previousCache = new Map();
141
- const update = (key, value) => {
143
+ function update(key, value) {
142
144
  cache.set(key, value);
143
145
  cacheSize++;
144
146
  if (cacheSize > maxCacheSize) {
@@ -146,7 +148,7 @@ const createLruCache = maxCacheSize => {
146
148
  previousCache = cache;
147
149
  cache = new Map();
148
150
  }
149
- };
151
+ }
150
152
  return {
151
153
  get(key) {
152
154
  let value = cache.get(key);
@@ -166,9 +168,9 @@ const createLruCache = maxCacheSize => {
166
168
  }
167
169
  }
168
170
  };
169
- };
171
+ }
170
172
  const IMPORTANT_MODIFIER = '!';
171
- const createParseClassName = config => {
173
+ function createParseClassName(config) {
172
174
  const {
173
175
  separator,
174
176
  experimentalParseClassName
@@ -177,7 +179,7 @@ const createParseClassName = config => {
177
179
  const firstSeparatorCharacter = separator[0];
178
180
  const separatorLength = separator.length;
179
181
  // parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
180
- const parseClassName = className => {
182
+ function parseClassName(className) {
181
183
  const modifiers = [];
182
184
  let bracketDepth = 0;
183
185
  let modifierStart = 0;
@@ -211,21 +213,23 @@ const createParseClassName = config => {
211
213
  baseClassName,
212
214
  maybePostfixModifierPosition
213
215
  };
214
- };
216
+ }
215
217
  if (experimentalParseClassName) {
216
- return className => experimentalParseClassName({
217
- className,
218
- parseClassName
219
- });
218
+ return function parseClassNameExperimental(className) {
219
+ return experimentalParseClassName({
220
+ className,
221
+ parseClassName
222
+ });
223
+ };
220
224
  }
221
225
  return parseClassName;
222
- };
226
+ }
223
227
  /**
224
228
  * Sorts modifiers according to following schema:
225
229
  * - Predefined modifiers are sorted alphabetically
226
230
  * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
227
231
  */
228
- const sortModifiers = modifiers => {
232
+ function sortModifiers(modifiers) {
229
233
  if (modifiers.length <= 1) {
230
234
  return modifiers;
231
235
  }
@@ -242,14 +246,16 @@ const sortModifiers = modifiers => {
242
246
  });
243
247
  sortedModifiers.push(...unsortedModifiers.sort());
244
248
  return sortedModifiers;
245
- };
246
- const createConfigUtils = config => ({
247
- cache: createLruCache(config.cacheSize),
248
- parseClassName: createParseClassName(config),
249
- ...createClassGroupUtils(config)
250
- });
249
+ }
250
+ function createConfigUtils(config) {
251
+ return {
252
+ cache: createLruCache(config.cacheSize),
253
+ parseClassName: createParseClassName(config),
254
+ ...createClassGroupUtils(config)
255
+ };
256
+ }
251
257
  const SPLIT_CLASSES_REGEX = /\s+/;
252
- const mergeClassList = (classList, configUtils) => {
258
+ function mergeClassList(classList, configUtils) {
253
259
  const {
254
260
  parseClassName,
255
261
  getClassGroupId,
@@ -262,11 +268,8 @@ const mergeClassList = (classList, configUtils) => {
262
268
  * @example 'hover:focus:bg-color'
263
269
  * @example 'md:!pr'
264
270
  */
265
- const classGroupsInConflict = [];
266
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
267
- let result = '';
268
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
269
- const originalClassName = classNames[index];
271
+ const classGroupsInConflict = new Set();
272
+ return classList.trim().split(SPLIT_CLASSES_REGEX).map(originalClassName => {
270
273
  const {
271
274
  modifiers,
272
275
  hasImportantModifier,
@@ -277,36 +280,49 @@ const mergeClassList = (classList, configUtils) => {
277
280
  let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
278
281
  if (!classGroupId) {
279
282
  if (!hasPostfixModifier) {
280
- // Not a Tailwind class
281
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
282
- continue;
283
+ return {
284
+ isTailwindClass: false,
285
+ originalClassName
286
+ };
283
287
  }
284
288
  classGroupId = getClassGroupId(baseClassName);
285
289
  if (!classGroupId) {
286
- // Not a Tailwind class
287
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
288
- continue;
290
+ return {
291
+ isTailwindClass: false,
292
+ originalClassName
293
+ };
289
294
  }
290
295
  hasPostfixModifier = false;
291
296
  }
292
297
  const variantModifier = sortModifiers(modifiers).join(':');
293
298
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
294
- const classId = modifierId + classGroupId;
295
- if (classGroupsInConflict.includes(classId)) {
296
- // Tailwind class omitted due to conflict
297
- continue;
299
+ return {
300
+ isTailwindClass: true,
301
+ modifierId,
302
+ classGroupId,
303
+ originalClassName,
304
+ hasPostfixModifier
305
+ };
306
+ }).reverse()
307
+ // Last class in conflict wins, so we need to filter conflicting classes in reverse order.
308
+ .filter(parsed => {
309
+ if (!parsed.isTailwindClass) {
310
+ return true;
298
311
  }
299
- classGroupsInConflict.push(classId);
300
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
301
- for (let i = 0; i < conflictGroups.length; ++i) {
302
- const group = conflictGroups[i];
303
- classGroupsInConflict.push(modifierId + group);
312
+ const {
313
+ modifierId,
314
+ classGroupId,
315
+ hasPostfixModifier
316
+ } = parsed;
317
+ const classId = modifierId + classGroupId;
318
+ if (classGroupsInConflict.has(classId)) {
319
+ return false;
304
320
  }
305
- // Tailwind class not in conflict
306
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
307
- }
308
- return result;
309
- };
321
+ classGroupsInConflict.add(classId);
322
+ getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(group => classGroupsInConflict.add(modifierId + group));
323
+ return true;
324
+ }).reverse().map(parsed => parsed.originalClassName).join(' ');
325
+ }
310
326
 
311
327
  /**
312
328
  * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
@@ -332,7 +348,7 @@ function twJoin() {
332
348
  }
333
349
  return string;
334
350
  }
335
- const toValue = mix => {
351
+ function toValue(mix) {
336
352
  if (typeof mix === 'string') {
337
353
  return mix;
338
354
  }
@@ -347,7 +363,7 @@ const toValue = mix => {
347
363
  }
348
364
  }
349
365
  return string;
350
- };
366
+ }
351
367
  function createTailwindMerge(createConfigFirst, ...createConfigRest) {
352
368
  let configUtils;
353
369
  let cacheGet;
@@ -374,11 +390,11 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
374
390
  return functionToCall(twJoin.apply(null, arguments));
375
391
  };
376
392
  }
377
- const fromTheme = key => {
393
+ function fromTheme(key) {
378
394
  const themeGetter = theme => theme[key] || [];
379
395
  themeGetter.isThemeGetter = true;
380
396
  return themeGetter;
381
- };
397
+ }
382
398
  const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
383
399
  const fractionRegex = /^\d+\/\d+$/;
384
400
  const stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);
@@ -388,22 +404,48 @@ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
388
404
  // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
389
405
  const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
390
406
  const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
391
- const isLength = value => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
392
- const isArbitraryLength = value => getIsArbitraryValue(value, 'length', isLengthOnly);
393
- const isNumber = value => Boolean(value) && !Number.isNaN(Number(value));
394
- const isArbitraryNumber = value => getIsArbitraryValue(value, 'number', isNumber);
395
- const isInteger = value => Boolean(value) && Number.isInteger(Number(value));
396
- const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
397
- const isArbitraryValue = value => arbitraryValueRegex.test(value);
398
- const isTshirtSize = value => tshirtUnitRegex.test(value);
407
+ function isLength(value) {
408
+ return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
409
+ }
410
+ function isArbitraryLength(value) {
411
+ return getIsArbitraryValue(value, 'length', isLengthOnly);
412
+ }
413
+ function isNumber(value) {
414
+ return Boolean(value) && !Number.isNaN(Number(value));
415
+ }
416
+ function isArbitraryNumber(value) {
417
+ return getIsArbitraryValue(value, 'number', isNumber);
418
+ }
419
+ function isInteger(value) {
420
+ return Boolean(value) && Number.isInteger(Number(value));
421
+ }
422
+ function isPercent(value) {
423
+ return value.endsWith('%') && isNumber(value.slice(0, -1));
424
+ }
425
+ function isArbitraryValue(value) {
426
+ return arbitraryValueRegex.test(value);
427
+ }
428
+ function isTshirtSize(value) {
429
+ return tshirtUnitRegex.test(value);
430
+ }
399
431
  const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
400
- const isArbitrarySize = value => getIsArbitraryValue(value, sizeLabels, isNever);
401
- const isArbitraryPosition = value => getIsArbitraryValue(value, 'position', isNever);
432
+ function isArbitrarySize(value) {
433
+ return getIsArbitraryValue(value, sizeLabels, isNever);
434
+ }
435
+ function isArbitraryPosition(value) {
436
+ return getIsArbitraryValue(value, 'position', isNever);
437
+ }
402
438
  const imageLabels = /*#__PURE__*/new Set(['image', 'url']);
403
- const isArbitraryImage = value => getIsArbitraryValue(value, imageLabels, isImage);
404
- const isArbitraryShadow = value => getIsArbitraryValue(value, '', isShadow);
405
- const isAny = () => true;
406
- const getIsArbitraryValue = (value, label, testValue) => {
439
+ function isArbitraryImage(value) {
440
+ return getIsArbitraryValue(value, imageLabels, isImage);
441
+ }
442
+ function isArbitraryShadow(value) {
443
+ return getIsArbitraryValue(value, '', isShadow);
444
+ }
445
+ function isAny() {
446
+ return true;
447
+ }
448
+ function getIsArbitraryValue(value, label, testValue) {
407
449
  const result = arbitraryValueRegex.exec(value);
408
450
  if (result) {
409
451
  if (result[1]) {
@@ -412,16 +454,23 @@ const getIsArbitraryValue = (value, label, testValue) => {
412
454
  return testValue(result[2]);
413
455
  }
414
456
  return false;
415
- };
416
- const isLengthOnly = value =>
417
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
418
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
419
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
420
- lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
421
- const isNever = () => false;
422
- const isShadow = value => shadowRegex.test(value);
423
- const isImage = value => imageRegex.test(value);
424
- const getDefaultConfig = () => {
457
+ }
458
+ function isLengthOnly(value) {
459
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
460
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
461
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
462
+ return lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
463
+ }
464
+ function isNever() {
465
+ return false;
466
+ }
467
+ function isShadow(value) {
468
+ return shadowRegex.test(value);
469
+ }
470
+ function isImage(value) {
471
+ return imageRegex.test(value);
472
+ }
473
+ function getDefaultConfig() {
425
474
  const colors = fromTheme('colors');
426
475
  const spacing = fromTheme('spacing');
427
476
  const blur = fromTheme('blur');
@@ -459,6 +508,7 @@ const getDefaultConfig = () => {
459
508
  const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];
460
509
  const getZeroAndEmpty = () => ['', '0', isArbitraryValue];
461
510
  const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
511
+ const getNumber = () => [isNumber, isArbitraryNumber];
462
512
  const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
463
513
  return {
464
514
  cacheSize: 500,
@@ -467,12 +517,12 @@ const getDefaultConfig = () => {
467
517
  colors: [isAny],
468
518
  spacing: [isLength, isArbitraryLength],
469
519
  blur: ['none', '', isTshirtSize, isArbitraryValue],
470
- brightness: getNumberAndArbitrary(),
520
+ brightness: getNumber(),
471
521
  borderColor: [colors],
472
522
  borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue],
473
523
  borderSpacing: getSpacingWithArbitrary(),
474
524
  borderWidth: getLengthWithEmptyAndArbitrary(),
475
- contrast: getNumberAndArbitrary(),
525
+ contrast: getNumber(),
476
526
  grayscale: getZeroAndEmpty(),
477
527
  hueRotate: getNumberAndArbitrary(),
478
528
  invert: getZeroAndEmpty(),
@@ -481,10 +531,10 @@ const getDefaultConfig = () => {
481
531
  gradientColorStopPositions: [isPercent, isArbitraryLength],
482
532
  inset: getSpacingWithAutoAndArbitrary(),
483
533
  margin: getSpacingWithAutoAndArbitrary(),
484
- opacity: getNumberAndArbitrary(),
534
+ opacity: getNumber(),
485
535
  padding: getSpacingWithArbitrary(),
486
- saturate: getNumberAndArbitrary(),
487
- scale: getNumberAndArbitrary(),
536
+ saturate: getNumber(),
537
+ scale: getNumber(),
488
538
  sepia: getZeroAndEmpty(),
489
539
  skew: getNumberAndArbitrary(),
490
540
  space: getSpacingWithArbitrary(),
@@ -1185,7 +1235,7 @@ const getDefaultConfig = () => {
1185
1235
  * Font Variant Numeric
1186
1236
  * @see https://tailwindcss.com/docs/font-variant-numeric
1187
1237
  */
1188
- 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],
1238
+ 'fvn-fraction': ['diagonal-fractions', 'stacked-fractons'],
1189
1239
  /**
1190
1240
  * Letter Spacing
1191
1241
  * @see https://tailwindcss.com/docs/letter-spacing
@@ -1709,20 +1759,6 @@ const getDefaultConfig = () => {
1709
1759
  'border-color-y': [{
1710
1760
  'border-y': [borderColor]
1711
1761
  }],
1712
- /**
1713
- * Border Color S
1714
- * @see https://tailwindcss.com/docs/border-color
1715
- */
1716
- 'border-color-s': [{
1717
- 'border-s': [borderColor]
1718
- }],
1719
- /**
1720
- * Border Color E
1721
- * @see https://tailwindcss.com/docs/border-color
1722
- */
1723
- 'border-color-e': [{
1724
- 'border-e': [borderColor]
1725
- }],
1726
1762
  /**
1727
1763
  * Border Color Top
1728
1764
  * @see https://tailwindcss.com/docs/border-color
@@ -2469,7 +2505,7 @@ const getDefaultConfig = () => {
2469
2505
  'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
2470
2506
  'border-w-x': ['border-w-r', 'border-w-l'],
2471
2507
  'border-w-y': ['border-w-t', 'border-w-b'],
2472
- 'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
2508
+ 'border-color': ['border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
2473
2509
  'border-color-x': ['border-color-r', 'border-color-l'],
2474
2510
  'border-color-y': ['border-color-t', 'border-color-b'],
2475
2511
  'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
@@ -2487,20 +2523,20 @@ const getDefaultConfig = () => {
2487
2523
  'font-size': ['leading']
2488
2524
  }
2489
2525
  };
2490
- };
2526
+ }
2491
2527
 
2492
2528
  /**
2493
2529
  * @param baseConfig Config where other config will be merged into. This object will be mutated.
2494
2530
  * @param configExtension Partial config to merge into the `baseConfig`.
2495
2531
  */
2496
- const mergeConfigs = (baseConfig, {
2532
+ function mergeConfigs(baseConfig, {
2497
2533
  cacheSize,
2498
2534
  prefix,
2499
2535
  separator,
2500
2536
  experimentalParseClassName,
2501
2537
  extend = {},
2502
2538
  override = {}
2503
- }) => {
2539
+ }) {
2504
2540
  overrideProperty(baseConfig, 'cacheSize', cacheSize);
2505
2541
  overrideProperty(baseConfig, 'prefix', prefix);
2506
2542
  overrideProperty(baseConfig, 'separator', separator);
@@ -2512,20 +2548,20 @@ const mergeConfigs = (baseConfig, {
2512
2548
  mergeConfigProperties(baseConfig[key], extend[key]);
2513
2549
  }
2514
2550
  return baseConfig;
2515
- };
2516
- const overrideProperty = (baseObject, overrideKey, overrideValue) => {
2551
+ }
2552
+ function overrideProperty(baseObject, overrideKey, overrideValue) {
2517
2553
  if (overrideValue !== undefined) {
2518
2554
  baseObject[overrideKey] = overrideValue;
2519
2555
  }
2520
- };
2521
- const overrideConfigProperties = (baseObject, overrideObject) => {
2556
+ }
2557
+ function overrideConfigProperties(baseObject, overrideObject) {
2522
2558
  if (overrideObject) {
2523
2559
  for (const key in overrideObject) {
2524
2560
  overrideProperty(baseObject, key, overrideObject[key]);
2525
2561
  }
2526
2562
  }
2527
- };
2528
- const mergeConfigProperties = (baseObject, mergeObject) => {
2563
+ }
2564
+ function mergeConfigProperties(baseObject, mergeObject) {
2529
2565
  if (mergeObject) {
2530
2566
  for (const key in mergeObject) {
2531
2567
  const mergeValue = mergeObject[key];
@@ -2534,8 +2570,10 @@ const mergeConfigProperties = (baseObject, mergeObject) => {
2534
2570
  }
2535
2571
  }
2536
2572
  }
2537
- };
2538
- const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
2573
+ }
2574
+ function extendTailwindMerge(configExtension, ...createConfig) {
2575
+ return typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
2576
+ }
2539
2577
  const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
2540
2578
 
2541
2579
  export { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge };