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