customer-registration 0.0.111 → 0.0.113

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 (50) hide show
  1. package/.medusa/server/src/admin/index.js +3249 -2
  2. package/.medusa/server/src/admin/index.mjs +3232 -2
  3. package/.medusa/server/src/api/admin/account-deletion-requests/route.js +30 -0
  4. package/.medusa/server/src/api/admin/account-deletion-requests/validators.js +12 -0
  5. package/.medusa/server/src/api/auth/customer/emailpass/reset-password/route.js +1 -26
  6. package/.medusa/server/src/api/auth/customer/emailpass/route.js +24 -97
  7. package/.medusa/server/src/api/auth/customer/phonepass/register/route.js +50 -0
  8. package/.medusa/server/src/api/auth/customer/phonepass/route.js +105 -0
  9. package/.medusa/server/src/api/middlewares/guard-account-deletion.js +29 -0
  10. package/.medusa/server/src/api/middlewares/ip-rate-limit.js +48 -0
  11. package/.medusa/server/src/api/middlewares/validate-customer-registration.js +60 -0
  12. package/.medusa/server/src/api/middlewares.js +30 -0
  13. package/.medusa/server/src/api/store/customers/account-deletion/cancel-confirm/route.js +36 -0
  14. package/.medusa/server/src/api/store/customers/account-deletion/cancel-request/route.js +55 -0
  15. package/.medusa/server/src/api/store/customers/account-deletion/confirm/route.js +43 -0
  16. package/.medusa/server/src/api/store/customers/account-deletion/request/route.js +40 -0
  17. package/.medusa/server/src/api/store/customers/account-deletion/validators.js +27 -0
  18. package/.medusa/server/src/api/store/customers/me/contact/route.js +95 -0
  19. package/.medusa/server/src/api/store/customers/me/contact/verify/route.js +83 -0
  20. package/.medusa/server/src/api/store/customers/me/route.js +53 -0
  21. package/.medusa/server/src/api/store/customers/otp/send/route.js +1 -6
  22. package/.medusa/server/src/api/store/customers/otp/verify/route.js +95 -3
  23. package/.medusa/server/src/api/store/customers/route.js +89 -0
  24. package/.medusa/server/src/config.js +44 -13
  25. package/.medusa/server/src/jobs/process-account-deletions.js +69 -0
  26. package/.medusa/server/src/modules/account-deletion-request/index.js +17 -0
  27. package/.medusa/server/src/modules/account-deletion-request/migrations/Migration20250221000000CreateAccountDeletionRequestTable.js +42 -0
  28. package/.medusa/server/src/modules/account-deletion-request/migrations/Migration20250221100000AddCompletedStatusToAccountDeletionRequest.js +30 -0
  29. package/.medusa/server/src/modules/account-deletion-request/models/account-deletion-request.js +26 -0
  30. package/.medusa/server/src/modules/account-deletion-request/service.js +90 -0
  31. package/.medusa/server/src/modules/otp-verification/migrations/Migration20250221000000AddAccountDeletionOtpPurposes.js +35 -0
  32. package/.medusa/server/src/modules/otp-verification/models/otp-verification.js +9 -2
  33. package/.medusa/server/src/modules/otp-verification/service.js +79 -1
  34. package/.medusa/server/src/providers/phonepass/index.js +9 -0
  35. package/.medusa/server/src/providers/phonepass/service.js +133 -0
  36. package/.medusa/server/src/subscribers/password-reset.js +1 -42
  37. package/.medusa/server/src/workflows/change-password.js +40 -64
  38. package/.medusa/server/src/workflows/send-contact-change-otp-workflow.js +41 -0
  39. package/.medusa/server/src/workflows/steps/determine-contact-method-step.js +8 -2
  40. package/.medusa/server/src/workflows/steps/generate-contact-change-otp-step.js +24 -0
  41. package/.medusa/server/src/workflows/steps/index.js +6 -2
  42. package/.medusa/server/src/workflows/steps/resolve-channel-config-step.js +10 -1
  43. package/.medusa/server/src/workflows/steps/send-notification-step.js +1 -11
  44. package/.medusa/server/src/workflows/steps/sync-phonepass-entity-id-step.js +63 -0
  45. package/.medusa/server/src/workflows/steps/update-password-step.js +21 -29
  46. package/.medusa/server/src/workflows/update-contact-workflow.js +100 -0
  47. package/.medusa/server/src/workflows/verify-phone.js +11 -4
  48. package/README.md +389 -147
  49. package/package.json +12 -3
  50. package/.medusa/server/src/subscribers/customer-updated.js +0 -100
@@ -1,10 +1,3257 @@
1
1
  "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const React = require("react");
4
+ const adminSdk = require("@medusajs/admin-sdk");
5
+ function _interopNamespace(e) {
6
+ if (e && e.__esModule) return e;
7
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
+ if (e) {
9
+ for (const k in e) {
10
+ if (k !== "default") {
11
+ const d = Object.getOwnPropertyDescriptor(e, k);
12
+ Object.defineProperty(n, k, d.get ? d : {
13
+ enumerable: true,
14
+ get: () => e[k]
15
+ });
16
+ }
17
+ }
18
+ }
19
+ n.default = e;
20
+ return Object.freeze(n);
21
+ }
22
+ const React__namespace = /* @__PURE__ */ _interopNamespace(React);
23
+ function r$1(e) {
24
+ var t, f, n = "";
25
+ if ("string" == typeof e || "number" == typeof e) n += e;
26
+ else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r$1(e[t])) && (n && (n += " "), n += f);
27
+ else for (t in e) e[t] && (n && (n += " "), n += t);
28
+ return n;
29
+ }
30
+ function clsx$1() {
31
+ for (var e, t, f = 0, n = ""; f < arguments.length; ) (e = arguments[f++]) && (t = r$1(e)) && (n && (n += " "), n += t);
32
+ return n;
33
+ }
34
+ const CLASS_PART_SEPARATOR = "-";
35
+ const createClassGroupUtils = (config2) => {
36
+ const classMap = createClassMap(config2);
37
+ const {
38
+ conflictingClassGroups,
39
+ conflictingClassGroupModifiers
40
+ } = config2;
41
+ const getClassGroupId = (className) => {
42
+ const classParts = className.split(CLASS_PART_SEPARATOR);
43
+ if (classParts[0] === "" && classParts.length !== 1) {
44
+ classParts.shift();
45
+ }
46
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
47
+ };
48
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
49
+ const conflicts = conflictingClassGroups[classGroupId] || [];
50
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
51
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
52
+ }
53
+ return conflicts;
54
+ };
55
+ return {
56
+ getClassGroupId,
57
+ getConflictingClassGroupIds
58
+ };
59
+ };
60
+ const getGroupRecursive = (classParts, classPartObject) => {
61
+ var _a;
62
+ if (classParts.length === 0) {
63
+ return classPartObject.classGroupId;
64
+ }
65
+ const currentClassPart = classParts[0];
66
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
67
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
68
+ if (classGroupFromNextClassPart) {
69
+ return classGroupFromNextClassPart;
70
+ }
71
+ if (classPartObject.validators.length === 0) {
72
+ return void 0;
73
+ }
74
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
75
+ return (_a = classPartObject.validators.find(({
76
+ validator
77
+ }) => validator(classRest))) == null ? void 0 : _a.classGroupId;
78
+ };
79
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
80
+ const getGroupIdForArbitraryProperty = (className) => {
81
+ if (arbitraryPropertyRegex.test(className)) {
82
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
83
+ const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
84
+ if (property) {
85
+ return "arbitrary.." + property;
86
+ }
87
+ }
88
+ };
89
+ const createClassMap = (config2) => {
90
+ const {
91
+ theme,
92
+ prefix
93
+ } = config2;
94
+ const classMap = {
95
+ nextPart: /* @__PURE__ */ new Map(),
96
+ validators: []
97
+ };
98
+ const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config2.classGroups), prefix);
99
+ prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
100
+ processClassesRecursively(classGroup, classMap, classGroupId, theme);
101
+ });
102
+ return classMap;
103
+ };
104
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
105
+ classGroup.forEach((classDefinition) => {
106
+ if (typeof classDefinition === "string") {
107
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
108
+ classPartObjectToEdit.classGroupId = classGroupId;
109
+ return;
110
+ }
111
+ if (typeof classDefinition === "function") {
112
+ if (isThemeGetter(classDefinition)) {
113
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
114
+ return;
115
+ }
116
+ classPartObject.validators.push({
117
+ validator: classDefinition,
118
+ classGroupId
119
+ });
120
+ return;
121
+ }
122
+ Object.entries(classDefinition).forEach(([key, classGroup2]) => {
123
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
124
+ });
125
+ });
126
+ };
127
+ const getPart = (classPartObject, path) => {
128
+ let currentClassPartObject = classPartObject;
129
+ path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
130
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
131
+ currentClassPartObject.nextPart.set(pathPart, {
132
+ nextPart: /* @__PURE__ */ new Map(),
133
+ validators: []
134
+ });
135
+ }
136
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
137
+ });
138
+ return currentClassPartObject;
139
+ };
140
+ const isThemeGetter = (func) => func.isThemeGetter;
141
+ const getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
142
+ if (!prefix) {
143
+ return classGroupEntries;
144
+ }
145
+ return classGroupEntries.map(([classGroupId, classGroup]) => {
146
+ const prefixedClassGroup = classGroup.map((classDefinition) => {
147
+ if (typeof classDefinition === "string") {
148
+ return prefix + classDefinition;
149
+ }
150
+ if (typeof classDefinition === "object") {
151
+ return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
152
+ }
153
+ return classDefinition;
154
+ });
155
+ return [classGroupId, prefixedClassGroup];
156
+ });
157
+ };
158
+ const createLruCache = (maxCacheSize) => {
159
+ if (maxCacheSize < 1) {
160
+ return {
161
+ get: () => void 0,
162
+ set: () => {
163
+ }
164
+ };
165
+ }
166
+ let cacheSize = 0;
167
+ let cache = /* @__PURE__ */ new Map();
168
+ let previousCache = /* @__PURE__ */ new Map();
169
+ const update = (key, value) => {
170
+ cache.set(key, value);
171
+ cacheSize++;
172
+ if (cacheSize > maxCacheSize) {
173
+ cacheSize = 0;
174
+ previousCache = cache;
175
+ cache = /* @__PURE__ */ new Map();
176
+ }
177
+ };
178
+ return {
179
+ get(key) {
180
+ let value = cache.get(key);
181
+ if (value !== void 0) {
182
+ return value;
183
+ }
184
+ if ((value = previousCache.get(key)) !== void 0) {
185
+ update(key, value);
186
+ return value;
187
+ }
188
+ },
189
+ set(key, value) {
190
+ if (cache.has(key)) {
191
+ cache.set(key, value);
192
+ } else {
193
+ update(key, value);
194
+ }
195
+ }
196
+ };
197
+ };
198
+ const IMPORTANT_MODIFIER = "!";
199
+ const createParseClassName = (config2) => {
200
+ const {
201
+ separator,
202
+ experimentalParseClassName
203
+ } = config2;
204
+ const isSeparatorSingleCharacter = separator.length === 1;
205
+ const firstSeparatorCharacter = separator[0];
206
+ const separatorLength = separator.length;
207
+ const parseClassName = (className) => {
208
+ const modifiers = [];
209
+ let bracketDepth = 0;
210
+ let modifierStart = 0;
211
+ let postfixModifierPosition;
212
+ for (let index = 0; index < className.length; index++) {
213
+ let currentCharacter = className[index];
214
+ if (bracketDepth === 0) {
215
+ if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
216
+ modifiers.push(className.slice(modifierStart, index));
217
+ modifierStart = index + separatorLength;
218
+ continue;
219
+ }
220
+ if (currentCharacter === "/") {
221
+ postfixModifierPosition = index;
222
+ continue;
223
+ }
224
+ }
225
+ if (currentCharacter === "[") {
226
+ bracketDepth++;
227
+ } else if (currentCharacter === "]") {
228
+ bracketDepth--;
229
+ }
230
+ }
231
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
232
+ const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
233
+ const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
234
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
235
+ return {
236
+ modifiers,
237
+ hasImportantModifier,
238
+ baseClassName,
239
+ maybePostfixModifierPosition
240
+ };
241
+ };
242
+ if (experimentalParseClassName) {
243
+ return (className) => experimentalParseClassName({
244
+ className,
245
+ parseClassName
246
+ });
247
+ }
248
+ return parseClassName;
249
+ };
250
+ const sortModifiers = (modifiers) => {
251
+ if (modifiers.length <= 1) {
252
+ return modifiers;
253
+ }
254
+ const sortedModifiers = [];
255
+ let unsortedModifiers = [];
256
+ modifiers.forEach((modifier) => {
257
+ const isArbitraryVariant = modifier[0] === "[";
258
+ if (isArbitraryVariant) {
259
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
260
+ unsortedModifiers = [];
261
+ } else {
262
+ unsortedModifiers.push(modifier);
263
+ }
264
+ });
265
+ sortedModifiers.push(...unsortedModifiers.sort());
266
+ return sortedModifiers;
267
+ };
268
+ const createConfigUtils = (config2) => ({
269
+ cache: createLruCache(config2.cacheSize),
270
+ parseClassName: createParseClassName(config2),
271
+ ...createClassGroupUtils(config2)
272
+ });
273
+ const SPLIT_CLASSES_REGEX = /\s+/;
274
+ const mergeClassList = (classList, configUtils) => {
275
+ const {
276
+ parseClassName,
277
+ getClassGroupId,
278
+ getConflictingClassGroupIds
279
+ } = configUtils;
280
+ const classGroupsInConflict = [];
281
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
282
+ let result = "";
283
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
284
+ const originalClassName = classNames[index];
285
+ const {
286
+ modifiers,
287
+ hasImportantModifier,
288
+ baseClassName,
289
+ maybePostfixModifierPosition
290
+ } = parseClassName(originalClassName);
291
+ let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
292
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
293
+ if (!classGroupId) {
294
+ if (!hasPostfixModifier) {
295
+ result = originalClassName + (result.length > 0 ? " " + result : result);
296
+ continue;
297
+ }
298
+ classGroupId = getClassGroupId(baseClassName);
299
+ if (!classGroupId) {
300
+ result = originalClassName + (result.length > 0 ? " " + result : result);
301
+ continue;
302
+ }
303
+ hasPostfixModifier = false;
304
+ }
305
+ const variantModifier = sortModifiers(modifiers).join(":");
306
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
307
+ const classId = modifierId + classGroupId;
308
+ if (classGroupsInConflict.includes(classId)) {
309
+ continue;
310
+ }
311
+ classGroupsInConflict.push(classId);
312
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
313
+ for (let i = 0; i < conflictGroups.length; ++i) {
314
+ const group = conflictGroups[i];
315
+ classGroupsInConflict.push(modifierId + group);
316
+ }
317
+ result = originalClassName + (result.length > 0 ? " " + result : result);
318
+ }
319
+ return result;
320
+ };
321
+ function twJoin() {
322
+ let index = 0;
323
+ let argument;
324
+ let resolvedValue;
325
+ let string = "";
326
+ while (index < arguments.length) {
327
+ if (argument = arguments[index++]) {
328
+ if (resolvedValue = toValue(argument)) {
329
+ string && (string += " ");
330
+ string += resolvedValue;
331
+ }
332
+ }
333
+ }
334
+ return string;
335
+ }
336
+ const toValue = (mix) => {
337
+ if (typeof mix === "string") {
338
+ return mix;
339
+ }
340
+ let resolvedValue;
341
+ let string = "";
342
+ for (let k = 0; k < mix.length; k++) {
343
+ if (mix[k]) {
344
+ if (resolvedValue = toValue(mix[k])) {
345
+ string && (string += " ");
346
+ string += resolvedValue;
347
+ }
348
+ }
349
+ }
350
+ return string;
351
+ };
352
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
353
+ let configUtils;
354
+ let cacheGet;
355
+ let cacheSet;
356
+ let functionToCall = initTailwindMerge;
357
+ function initTailwindMerge(classList) {
358
+ const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
359
+ configUtils = createConfigUtils(config2);
360
+ cacheGet = configUtils.cache.get;
361
+ cacheSet = configUtils.cache.set;
362
+ functionToCall = tailwindMerge;
363
+ return tailwindMerge(classList);
364
+ }
365
+ function tailwindMerge(classList) {
366
+ const cachedResult = cacheGet(classList);
367
+ if (cachedResult) {
368
+ return cachedResult;
369
+ }
370
+ const result = mergeClassList(classList, configUtils);
371
+ cacheSet(classList, result);
372
+ return result;
373
+ }
374
+ return function callTailwindMerge() {
375
+ return functionToCall(twJoin.apply(null, arguments));
376
+ };
377
+ }
378
+ const fromTheme = (key) => {
379
+ const themeGetter = (theme) => theme[key] || [];
380
+ themeGetter.isThemeGetter = true;
381
+ return themeGetter;
382
+ };
383
+ const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
384
+ const fractionRegex = /^\d+\/\d+$/;
385
+ const stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
386
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
387
+ 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$/;
388
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
389
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
390
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
391
+ const isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
392
+ const isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
393
+ const isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
394
+ const isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
395
+ const isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
396
+ const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
397
+ const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
398
+ const isTshirtSize = (value) => tshirtUnitRegex.test(value);
399
+ const sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
400
+ const isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
401
+ const isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
402
+ const imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
403
+ const isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
404
+ const isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
405
+ const isAny = () => true;
406
+ const getIsArbitraryValue = (value, label, testValue) => {
407
+ const result = arbitraryValueRegex.exec(value);
408
+ if (result) {
409
+ if (result[1]) {
410
+ return typeof label === "string" ? result[1] === label : label.has(result[1]);
411
+ }
412
+ return testValue(result[2]);
413
+ }
414
+ return false;
415
+ };
416
+ const isLengthOnly = (value) => (
417
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
418
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
419
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
420
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
421
+ );
422
+ const isNever = () => false;
423
+ const isShadow = (value) => shadowRegex.test(value);
424
+ const isImage = (value) => imageRegex.test(value);
425
+ const getDefaultConfig = () => {
426
+ const colors = fromTheme("colors");
427
+ const spacing = fromTheme("spacing");
428
+ const blur = fromTheme("blur");
429
+ const brightness = fromTheme("brightness");
430
+ const borderColor = fromTheme("borderColor");
431
+ const borderRadius = fromTheme("borderRadius");
432
+ const borderSpacing = fromTheme("borderSpacing");
433
+ const borderWidth = fromTheme("borderWidth");
434
+ const contrast = fromTheme("contrast");
435
+ const grayscale = fromTheme("grayscale");
436
+ const hueRotate = fromTheme("hueRotate");
437
+ const invert = fromTheme("invert");
438
+ const gap = fromTheme("gap");
439
+ const gradientColorStops = fromTheme("gradientColorStops");
440
+ const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
441
+ const inset = fromTheme("inset");
442
+ const margin = fromTheme("margin");
443
+ const opacity = fromTheme("opacity");
444
+ const padding = fromTheme("padding");
445
+ const saturate = fromTheme("saturate");
446
+ const scale = fromTheme("scale");
447
+ const sepia = fromTheme("sepia");
448
+ const skew = fromTheme("skew");
449
+ const space = fromTheme("space");
450
+ const translate = fromTheme("translate");
451
+ const getOverscroll = () => ["auto", "contain", "none"];
452
+ const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
453
+ const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
454
+ const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
455
+ const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
456
+ const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
457
+ const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
458
+ const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
459
+ const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
460
+ const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
461
+ const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
462
+ const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
463
+ const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
464
+ return {
465
+ cacheSize: 500,
466
+ separator: ":",
467
+ theme: {
468
+ colors: [isAny],
469
+ spacing: [isLength, isArbitraryLength],
470
+ blur: ["none", "", isTshirtSize, isArbitraryValue],
471
+ brightness: getNumberAndArbitrary(),
472
+ borderColor: [colors],
473
+ borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
474
+ borderSpacing: getSpacingWithArbitrary(),
475
+ borderWidth: getLengthWithEmptyAndArbitrary(),
476
+ contrast: getNumberAndArbitrary(),
477
+ grayscale: getZeroAndEmpty(),
478
+ hueRotate: getNumberAndArbitrary(),
479
+ invert: getZeroAndEmpty(),
480
+ gap: getSpacingWithArbitrary(),
481
+ gradientColorStops: [colors],
482
+ gradientColorStopPositions: [isPercent, isArbitraryLength],
483
+ inset: getSpacingWithAutoAndArbitrary(),
484
+ margin: getSpacingWithAutoAndArbitrary(),
485
+ opacity: getNumberAndArbitrary(),
486
+ padding: getSpacingWithArbitrary(),
487
+ saturate: getNumberAndArbitrary(),
488
+ scale: getNumberAndArbitrary(),
489
+ sepia: getZeroAndEmpty(),
490
+ skew: getNumberAndArbitrary(),
491
+ space: getSpacingWithArbitrary(),
492
+ translate: getSpacingWithArbitrary()
493
+ },
494
+ classGroups: {
495
+ // Layout
496
+ /**
497
+ * Aspect Ratio
498
+ * @see https://tailwindcss.com/docs/aspect-ratio
499
+ */
500
+ aspect: [{
501
+ aspect: ["auto", "square", "video", isArbitraryValue]
502
+ }],
503
+ /**
504
+ * Container
505
+ * @see https://tailwindcss.com/docs/container
506
+ */
507
+ container: ["container"],
508
+ /**
509
+ * Columns
510
+ * @see https://tailwindcss.com/docs/columns
511
+ */
512
+ columns: [{
513
+ columns: [isTshirtSize]
514
+ }],
515
+ /**
516
+ * Break After
517
+ * @see https://tailwindcss.com/docs/break-after
518
+ */
519
+ "break-after": [{
520
+ "break-after": getBreaks()
521
+ }],
522
+ /**
523
+ * Break Before
524
+ * @see https://tailwindcss.com/docs/break-before
525
+ */
526
+ "break-before": [{
527
+ "break-before": getBreaks()
528
+ }],
529
+ /**
530
+ * Break Inside
531
+ * @see https://tailwindcss.com/docs/break-inside
532
+ */
533
+ "break-inside": [{
534
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
535
+ }],
536
+ /**
537
+ * Box Decoration Break
538
+ * @see https://tailwindcss.com/docs/box-decoration-break
539
+ */
540
+ "box-decoration": [{
541
+ "box-decoration": ["slice", "clone"]
542
+ }],
543
+ /**
544
+ * Box Sizing
545
+ * @see https://tailwindcss.com/docs/box-sizing
546
+ */
547
+ box: [{
548
+ box: ["border", "content"]
549
+ }],
550
+ /**
551
+ * Display
552
+ * @see https://tailwindcss.com/docs/display
553
+ */
554
+ 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"],
555
+ /**
556
+ * Floats
557
+ * @see https://tailwindcss.com/docs/float
558
+ */
559
+ float: [{
560
+ float: ["right", "left", "none", "start", "end"]
561
+ }],
562
+ /**
563
+ * Clear
564
+ * @see https://tailwindcss.com/docs/clear
565
+ */
566
+ clear: [{
567
+ clear: ["left", "right", "both", "none", "start", "end"]
568
+ }],
569
+ /**
570
+ * Isolation
571
+ * @see https://tailwindcss.com/docs/isolation
572
+ */
573
+ isolation: ["isolate", "isolation-auto"],
574
+ /**
575
+ * Object Fit
576
+ * @see https://tailwindcss.com/docs/object-fit
577
+ */
578
+ "object-fit": [{
579
+ object: ["contain", "cover", "fill", "none", "scale-down"]
580
+ }],
581
+ /**
582
+ * Object Position
583
+ * @see https://tailwindcss.com/docs/object-position
584
+ */
585
+ "object-position": [{
586
+ object: [...getPositions(), isArbitraryValue]
587
+ }],
588
+ /**
589
+ * Overflow
590
+ * @see https://tailwindcss.com/docs/overflow
591
+ */
592
+ overflow: [{
593
+ overflow: getOverflow()
594
+ }],
595
+ /**
596
+ * Overflow X
597
+ * @see https://tailwindcss.com/docs/overflow
598
+ */
599
+ "overflow-x": [{
600
+ "overflow-x": getOverflow()
601
+ }],
602
+ /**
603
+ * Overflow Y
604
+ * @see https://tailwindcss.com/docs/overflow
605
+ */
606
+ "overflow-y": [{
607
+ "overflow-y": getOverflow()
608
+ }],
609
+ /**
610
+ * Overscroll Behavior
611
+ * @see https://tailwindcss.com/docs/overscroll-behavior
612
+ */
613
+ overscroll: [{
614
+ overscroll: getOverscroll()
615
+ }],
616
+ /**
617
+ * Overscroll Behavior X
618
+ * @see https://tailwindcss.com/docs/overscroll-behavior
619
+ */
620
+ "overscroll-x": [{
621
+ "overscroll-x": getOverscroll()
622
+ }],
623
+ /**
624
+ * Overscroll Behavior Y
625
+ * @see https://tailwindcss.com/docs/overscroll-behavior
626
+ */
627
+ "overscroll-y": [{
628
+ "overscroll-y": getOverscroll()
629
+ }],
630
+ /**
631
+ * Position
632
+ * @see https://tailwindcss.com/docs/position
633
+ */
634
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
635
+ /**
636
+ * Top / Right / Bottom / Left
637
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
638
+ */
639
+ inset: [{
640
+ inset: [inset]
641
+ }],
642
+ /**
643
+ * Right / Left
644
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
645
+ */
646
+ "inset-x": [{
647
+ "inset-x": [inset]
648
+ }],
649
+ /**
650
+ * Top / Bottom
651
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
652
+ */
653
+ "inset-y": [{
654
+ "inset-y": [inset]
655
+ }],
656
+ /**
657
+ * Start
658
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
659
+ */
660
+ start: [{
661
+ start: [inset]
662
+ }],
663
+ /**
664
+ * End
665
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
666
+ */
667
+ end: [{
668
+ end: [inset]
669
+ }],
670
+ /**
671
+ * Top
672
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
673
+ */
674
+ top: [{
675
+ top: [inset]
676
+ }],
677
+ /**
678
+ * Right
679
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
680
+ */
681
+ right: [{
682
+ right: [inset]
683
+ }],
684
+ /**
685
+ * Bottom
686
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
687
+ */
688
+ bottom: [{
689
+ bottom: [inset]
690
+ }],
691
+ /**
692
+ * Left
693
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
694
+ */
695
+ left: [{
696
+ left: [inset]
697
+ }],
698
+ /**
699
+ * Visibility
700
+ * @see https://tailwindcss.com/docs/visibility
701
+ */
702
+ visibility: ["visible", "invisible", "collapse"],
703
+ /**
704
+ * Z-Index
705
+ * @see https://tailwindcss.com/docs/z-index
706
+ */
707
+ z: [{
708
+ z: ["auto", isInteger, isArbitraryValue]
709
+ }],
710
+ // Flexbox and Grid
711
+ /**
712
+ * Flex Basis
713
+ * @see https://tailwindcss.com/docs/flex-basis
714
+ */
715
+ basis: [{
716
+ basis: getSpacingWithAutoAndArbitrary()
717
+ }],
718
+ /**
719
+ * Flex Direction
720
+ * @see https://tailwindcss.com/docs/flex-direction
721
+ */
722
+ "flex-direction": [{
723
+ flex: ["row", "row-reverse", "col", "col-reverse"]
724
+ }],
725
+ /**
726
+ * Flex Wrap
727
+ * @see https://tailwindcss.com/docs/flex-wrap
728
+ */
729
+ "flex-wrap": [{
730
+ flex: ["wrap", "wrap-reverse", "nowrap"]
731
+ }],
732
+ /**
733
+ * Flex
734
+ * @see https://tailwindcss.com/docs/flex
735
+ */
736
+ flex: [{
737
+ flex: ["1", "auto", "initial", "none", isArbitraryValue]
738
+ }],
739
+ /**
740
+ * Flex Grow
741
+ * @see https://tailwindcss.com/docs/flex-grow
742
+ */
743
+ grow: [{
744
+ grow: getZeroAndEmpty()
745
+ }],
746
+ /**
747
+ * Flex Shrink
748
+ * @see https://tailwindcss.com/docs/flex-shrink
749
+ */
750
+ shrink: [{
751
+ shrink: getZeroAndEmpty()
752
+ }],
753
+ /**
754
+ * Order
755
+ * @see https://tailwindcss.com/docs/order
756
+ */
757
+ order: [{
758
+ order: ["first", "last", "none", isInteger, isArbitraryValue]
759
+ }],
760
+ /**
761
+ * Grid Template Columns
762
+ * @see https://tailwindcss.com/docs/grid-template-columns
763
+ */
764
+ "grid-cols": [{
765
+ "grid-cols": [isAny]
766
+ }],
767
+ /**
768
+ * Grid Column Start / End
769
+ * @see https://tailwindcss.com/docs/grid-column
770
+ */
771
+ "col-start-end": [{
772
+ col: ["auto", {
773
+ span: ["full", isInteger, isArbitraryValue]
774
+ }, isArbitraryValue]
775
+ }],
776
+ /**
777
+ * Grid Column Start
778
+ * @see https://tailwindcss.com/docs/grid-column
779
+ */
780
+ "col-start": [{
781
+ "col-start": getNumberWithAutoAndArbitrary()
782
+ }],
783
+ /**
784
+ * Grid Column End
785
+ * @see https://tailwindcss.com/docs/grid-column
786
+ */
787
+ "col-end": [{
788
+ "col-end": getNumberWithAutoAndArbitrary()
789
+ }],
790
+ /**
791
+ * Grid Template Rows
792
+ * @see https://tailwindcss.com/docs/grid-template-rows
793
+ */
794
+ "grid-rows": [{
795
+ "grid-rows": [isAny]
796
+ }],
797
+ /**
798
+ * Grid Row Start / End
799
+ * @see https://tailwindcss.com/docs/grid-row
800
+ */
801
+ "row-start-end": [{
802
+ row: ["auto", {
803
+ span: [isInteger, isArbitraryValue]
804
+ }, isArbitraryValue]
805
+ }],
806
+ /**
807
+ * Grid Row Start
808
+ * @see https://tailwindcss.com/docs/grid-row
809
+ */
810
+ "row-start": [{
811
+ "row-start": getNumberWithAutoAndArbitrary()
812
+ }],
813
+ /**
814
+ * Grid Row End
815
+ * @see https://tailwindcss.com/docs/grid-row
816
+ */
817
+ "row-end": [{
818
+ "row-end": getNumberWithAutoAndArbitrary()
819
+ }],
820
+ /**
821
+ * Grid Auto Flow
822
+ * @see https://tailwindcss.com/docs/grid-auto-flow
823
+ */
824
+ "grid-flow": [{
825
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
826
+ }],
827
+ /**
828
+ * Grid Auto Columns
829
+ * @see https://tailwindcss.com/docs/grid-auto-columns
830
+ */
831
+ "auto-cols": [{
832
+ "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
833
+ }],
834
+ /**
835
+ * Grid Auto Rows
836
+ * @see https://tailwindcss.com/docs/grid-auto-rows
837
+ */
838
+ "auto-rows": [{
839
+ "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
840
+ }],
841
+ /**
842
+ * Gap
843
+ * @see https://tailwindcss.com/docs/gap
844
+ */
845
+ gap: [{
846
+ gap: [gap]
847
+ }],
848
+ /**
849
+ * Gap X
850
+ * @see https://tailwindcss.com/docs/gap
851
+ */
852
+ "gap-x": [{
853
+ "gap-x": [gap]
854
+ }],
855
+ /**
856
+ * Gap Y
857
+ * @see https://tailwindcss.com/docs/gap
858
+ */
859
+ "gap-y": [{
860
+ "gap-y": [gap]
861
+ }],
862
+ /**
863
+ * Justify Content
864
+ * @see https://tailwindcss.com/docs/justify-content
865
+ */
866
+ "justify-content": [{
867
+ justify: ["normal", ...getAlign()]
868
+ }],
869
+ /**
870
+ * Justify Items
871
+ * @see https://tailwindcss.com/docs/justify-items
872
+ */
873
+ "justify-items": [{
874
+ "justify-items": ["start", "end", "center", "stretch"]
875
+ }],
876
+ /**
877
+ * Justify Self
878
+ * @see https://tailwindcss.com/docs/justify-self
879
+ */
880
+ "justify-self": [{
881
+ "justify-self": ["auto", "start", "end", "center", "stretch"]
882
+ }],
883
+ /**
884
+ * Align Content
885
+ * @see https://tailwindcss.com/docs/align-content
886
+ */
887
+ "align-content": [{
888
+ content: ["normal", ...getAlign(), "baseline"]
889
+ }],
890
+ /**
891
+ * Align Items
892
+ * @see https://tailwindcss.com/docs/align-items
893
+ */
894
+ "align-items": [{
895
+ items: ["start", "end", "center", "baseline", "stretch"]
896
+ }],
897
+ /**
898
+ * Align Self
899
+ * @see https://tailwindcss.com/docs/align-self
900
+ */
901
+ "align-self": [{
902
+ self: ["auto", "start", "end", "center", "stretch", "baseline"]
903
+ }],
904
+ /**
905
+ * Place Content
906
+ * @see https://tailwindcss.com/docs/place-content
907
+ */
908
+ "place-content": [{
909
+ "place-content": [...getAlign(), "baseline"]
910
+ }],
911
+ /**
912
+ * Place Items
913
+ * @see https://tailwindcss.com/docs/place-items
914
+ */
915
+ "place-items": [{
916
+ "place-items": ["start", "end", "center", "baseline", "stretch"]
917
+ }],
918
+ /**
919
+ * Place Self
920
+ * @see https://tailwindcss.com/docs/place-self
921
+ */
922
+ "place-self": [{
923
+ "place-self": ["auto", "start", "end", "center", "stretch"]
924
+ }],
925
+ // Spacing
926
+ /**
927
+ * Padding
928
+ * @see https://tailwindcss.com/docs/padding
929
+ */
930
+ p: [{
931
+ p: [padding]
932
+ }],
933
+ /**
934
+ * Padding X
935
+ * @see https://tailwindcss.com/docs/padding
936
+ */
937
+ px: [{
938
+ px: [padding]
939
+ }],
940
+ /**
941
+ * Padding Y
942
+ * @see https://tailwindcss.com/docs/padding
943
+ */
944
+ py: [{
945
+ py: [padding]
946
+ }],
947
+ /**
948
+ * Padding Start
949
+ * @see https://tailwindcss.com/docs/padding
950
+ */
951
+ ps: [{
952
+ ps: [padding]
953
+ }],
954
+ /**
955
+ * Padding End
956
+ * @see https://tailwindcss.com/docs/padding
957
+ */
958
+ pe: [{
959
+ pe: [padding]
960
+ }],
961
+ /**
962
+ * Padding Top
963
+ * @see https://tailwindcss.com/docs/padding
964
+ */
965
+ pt: [{
966
+ pt: [padding]
967
+ }],
968
+ /**
969
+ * Padding Right
970
+ * @see https://tailwindcss.com/docs/padding
971
+ */
972
+ pr: [{
973
+ pr: [padding]
974
+ }],
975
+ /**
976
+ * Padding Bottom
977
+ * @see https://tailwindcss.com/docs/padding
978
+ */
979
+ pb: [{
980
+ pb: [padding]
981
+ }],
982
+ /**
983
+ * Padding Left
984
+ * @see https://tailwindcss.com/docs/padding
985
+ */
986
+ pl: [{
987
+ pl: [padding]
988
+ }],
989
+ /**
990
+ * Margin
991
+ * @see https://tailwindcss.com/docs/margin
992
+ */
993
+ m: [{
994
+ m: [margin]
995
+ }],
996
+ /**
997
+ * Margin X
998
+ * @see https://tailwindcss.com/docs/margin
999
+ */
1000
+ mx: [{
1001
+ mx: [margin]
1002
+ }],
1003
+ /**
1004
+ * Margin Y
1005
+ * @see https://tailwindcss.com/docs/margin
1006
+ */
1007
+ my: [{
1008
+ my: [margin]
1009
+ }],
1010
+ /**
1011
+ * Margin Start
1012
+ * @see https://tailwindcss.com/docs/margin
1013
+ */
1014
+ ms: [{
1015
+ ms: [margin]
1016
+ }],
1017
+ /**
1018
+ * Margin End
1019
+ * @see https://tailwindcss.com/docs/margin
1020
+ */
1021
+ me: [{
1022
+ me: [margin]
1023
+ }],
1024
+ /**
1025
+ * Margin Top
1026
+ * @see https://tailwindcss.com/docs/margin
1027
+ */
1028
+ mt: [{
1029
+ mt: [margin]
1030
+ }],
1031
+ /**
1032
+ * Margin Right
1033
+ * @see https://tailwindcss.com/docs/margin
1034
+ */
1035
+ mr: [{
1036
+ mr: [margin]
1037
+ }],
1038
+ /**
1039
+ * Margin Bottom
1040
+ * @see https://tailwindcss.com/docs/margin
1041
+ */
1042
+ mb: [{
1043
+ mb: [margin]
1044
+ }],
1045
+ /**
1046
+ * Margin Left
1047
+ * @see https://tailwindcss.com/docs/margin
1048
+ */
1049
+ ml: [{
1050
+ ml: [margin]
1051
+ }],
1052
+ /**
1053
+ * Space Between X
1054
+ * @see https://tailwindcss.com/docs/space
1055
+ */
1056
+ "space-x": [{
1057
+ "space-x": [space]
1058
+ }],
1059
+ /**
1060
+ * Space Between X Reverse
1061
+ * @see https://tailwindcss.com/docs/space
1062
+ */
1063
+ "space-x-reverse": ["space-x-reverse"],
1064
+ /**
1065
+ * Space Between Y
1066
+ * @see https://tailwindcss.com/docs/space
1067
+ */
1068
+ "space-y": [{
1069
+ "space-y": [space]
1070
+ }],
1071
+ /**
1072
+ * Space Between Y Reverse
1073
+ * @see https://tailwindcss.com/docs/space
1074
+ */
1075
+ "space-y-reverse": ["space-y-reverse"],
1076
+ // Sizing
1077
+ /**
1078
+ * Width
1079
+ * @see https://tailwindcss.com/docs/width
1080
+ */
1081
+ w: [{
1082
+ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
1083
+ }],
1084
+ /**
1085
+ * Min-Width
1086
+ * @see https://tailwindcss.com/docs/min-width
1087
+ */
1088
+ "min-w": [{
1089
+ "min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
1090
+ }],
1091
+ /**
1092
+ * Max-Width
1093
+ * @see https://tailwindcss.com/docs/max-width
1094
+ */
1095
+ "max-w": [{
1096
+ "max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
1097
+ screen: [isTshirtSize]
1098
+ }, isTshirtSize]
1099
+ }],
1100
+ /**
1101
+ * Height
1102
+ * @see https://tailwindcss.com/docs/height
1103
+ */
1104
+ h: [{
1105
+ h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
1106
+ }],
1107
+ /**
1108
+ * Min-Height
1109
+ * @see https://tailwindcss.com/docs/min-height
1110
+ */
1111
+ "min-h": [{
1112
+ "min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1113
+ }],
1114
+ /**
1115
+ * Max-Height
1116
+ * @see https://tailwindcss.com/docs/max-height
1117
+ */
1118
+ "max-h": [{
1119
+ "max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1120
+ }],
1121
+ /**
1122
+ * Size
1123
+ * @see https://tailwindcss.com/docs/size
1124
+ */
1125
+ size: [{
1126
+ size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
1127
+ }],
1128
+ // Typography
1129
+ /**
1130
+ * Font Size
1131
+ * @see https://tailwindcss.com/docs/font-size
1132
+ */
1133
+ "font-size": [{
1134
+ text: ["base", isTshirtSize, isArbitraryLength]
1135
+ }],
1136
+ /**
1137
+ * Font Smoothing
1138
+ * @see https://tailwindcss.com/docs/font-smoothing
1139
+ */
1140
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1141
+ /**
1142
+ * Font Style
1143
+ * @see https://tailwindcss.com/docs/font-style
1144
+ */
1145
+ "font-style": ["italic", "not-italic"],
1146
+ /**
1147
+ * Font Weight
1148
+ * @see https://tailwindcss.com/docs/font-weight
1149
+ */
1150
+ "font-weight": [{
1151
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
1152
+ }],
1153
+ /**
1154
+ * Font Family
1155
+ * @see https://tailwindcss.com/docs/font-family
1156
+ */
1157
+ "font-family": [{
1158
+ font: [isAny]
1159
+ }],
1160
+ /**
1161
+ * Font Variant Numeric
1162
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1163
+ */
1164
+ "fvn-normal": ["normal-nums"],
1165
+ /**
1166
+ * Font Variant Numeric
1167
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1168
+ */
1169
+ "fvn-ordinal": ["ordinal"],
1170
+ /**
1171
+ * Font Variant Numeric
1172
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1173
+ */
1174
+ "fvn-slashed-zero": ["slashed-zero"],
1175
+ /**
1176
+ * Font Variant Numeric
1177
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1178
+ */
1179
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1180
+ /**
1181
+ * Font Variant Numeric
1182
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1183
+ */
1184
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1185
+ /**
1186
+ * Font Variant Numeric
1187
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1188
+ */
1189
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1190
+ /**
1191
+ * Letter Spacing
1192
+ * @see https://tailwindcss.com/docs/letter-spacing
1193
+ */
1194
+ tracking: [{
1195
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
1196
+ }],
1197
+ /**
1198
+ * Line Clamp
1199
+ * @see https://tailwindcss.com/docs/line-clamp
1200
+ */
1201
+ "line-clamp": [{
1202
+ "line-clamp": ["none", isNumber, isArbitraryNumber]
1203
+ }],
1204
+ /**
1205
+ * Line Height
1206
+ * @see https://tailwindcss.com/docs/line-height
1207
+ */
1208
+ leading: [{
1209
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
1210
+ }],
1211
+ /**
1212
+ * List Style Image
1213
+ * @see https://tailwindcss.com/docs/list-style-image
1214
+ */
1215
+ "list-image": [{
1216
+ "list-image": ["none", isArbitraryValue]
1217
+ }],
1218
+ /**
1219
+ * List Style Type
1220
+ * @see https://tailwindcss.com/docs/list-style-type
1221
+ */
1222
+ "list-style-type": [{
1223
+ list: ["none", "disc", "decimal", isArbitraryValue]
1224
+ }],
1225
+ /**
1226
+ * List Style Position
1227
+ * @see https://tailwindcss.com/docs/list-style-position
1228
+ */
1229
+ "list-style-position": [{
1230
+ list: ["inside", "outside"]
1231
+ }],
1232
+ /**
1233
+ * Placeholder Color
1234
+ * @deprecated since Tailwind CSS v3.0.0
1235
+ * @see https://tailwindcss.com/docs/placeholder-color
1236
+ */
1237
+ "placeholder-color": [{
1238
+ placeholder: [colors]
1239
+ }],
1240
+ /**
1241
+ * Placeholder Opacity
1242
+ * @see https://tailwindcss.com/docs/placeholder-opacity
1243
+ */
1244
+ "placeholder-opacity": [{
1245
+ "placeholder-opacity": [opacity]
1246
+ }],
1247
+ /**
1248
+ * Text Alignment
1249
+ * @see https://tailwindcss.com/docs/text-align
1250
+ */
1251
+ "text-alignment": [{
1252
+ text: ["left", "center", "right", "justify", "start", "end"]
1253
+ }],
1254
+ /**
1255
+ * Text Color
1256
+ * @see https://tailwindcss.com/docs/text-color
1257
+ */
1258
+ "text-color": [{
1259
+ text: [colors]
1260
+ }],
1261
+ /**
1262
+ * Text Opacity
1263
+ * @see https://tailwindcss.com/docs/text-opacity
1264
+ */
1265
+ "text-opacity": [{
1266
+ "text-opacity": [opacity]
1267
+ }],
1268
+ /**
1269
+ * Text Decoration
1270
+ * @see https://tailwindcss.com/docs/text-decoration
1271
+ */
1272
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1273
+ /**
1274
+ * Text Decoration Style
1275
+ * @see https://tailwindcss.com/docs/text-decoration-style
1276
+ */
1277
+ "text-decoration-style": [{
1278
+ decoration: [...getLineStyles(), "wavy"]
1279
+ }],
1280
+ /**
1281
+ * Text Decoration Thickness
1282
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1283
+ */
1284
+ "text-decoration-thickness": [{
1285
+ decoration: ["auto", "from-font", isLength, isArbitraryLength]
1286
+ }],
1287
+ /**
1288
+ * Text Underline Offset
1289
+ * @see https://tailwindcss.com/docs/text-underline-offset
1290
+ */
1291
+ "underline-offset": [{
1292
+ "underline-offset": ["auto", isLength, isArbitraryValue]
1293
+ }],
1294
+ /**
1295
+ * Text Decoration Color
1296
+ * @see https://tailwindcss.com/docs/text-decoration-color
1297
+ */
1298
+ "text-decoration-color": [{
1299
+ decoration: [colors]
1300
+ }],
1301
+ /**
1302
+ * Text Transform
1303
+ * @see https://tailwindcss.com/docs/text-transform
1304
+ */
1305
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1306
+ /**
1307
+ * Text Overflow
1308
+ * @see https://tailwindcss.com/docs/text-overflow
1309
+ */
1310
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1311
+ /**
1312
+ * Text Wrap
1313
+ * @see https://tailwindcss.com/docs/text-wrap
1314
+ */
1315
+ "text-wrap": [{
1316
+ text: ["wrap", "nowrap", "balance", "pretty"]
1317
+ }],
1318
+ /**
1319
+ * Text Indent
1320
+ * @see https://tailwindcss.com/docs/text-indent
1321
+ */
1322
+ indent: [{
1323
+ indent: getSpacingWithArbitrary()
1324
+ }],
1325
+ /**
1326
+ * Vertical Alignment
1327
+ * @see https://tailwindcss.com/docs/vertical-align
1328
+ */
1329
+ "vertical-align": [{
1330
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
1331
+ }],
1332
+ /**
1333
+ * Whitespace
1334
+ * @see https://tailwindcss.com/docs/whitespace
1335
+ */
1336
+ whitespace: [{
1337
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1338
+ }],
1339
+ /**
1340
+ * Word Break
1341
+ * @see https://tailwindcss.com/docs/word-break
1342
+ */
1343
+ break: [{
1344
+ break: ["normal", "words", "all", "keep"]
1345
+ }],
1346
+ /**
1347
+ * Hyphens
1348
+ * @see https://tailwindcss.com/docs/hyphens
1349
+ */
1350
+ hyphens: [{
1351
+ hyphens: ["none", "manual", "auto"]
1352
+ }],
1353
+ /**
1354
+ * Content
1355
+ * @see https://tailwindcss.com/docs/content
1356
+ */
1357
+ content: [{
1358
+ content: ["none", isArbitraryValue]
1359
+ }],
1360
+ // Backgrounds
1361
+ /**
1362
+ * Background Attachment
1363
+ * @see https://tailwindcss.com/docs/background-attachment
1364
+ */
1365
+ "bg-attachment": [{
1366
+ bg: ["fixed", "local", "scroll"]
1367
+ }],
1368
+ /**
1369
+ * Background Clip
1370
+ * @see https://tailwindcss.com/docs/background-clip
1371
+ */
1372
+ "bg-clip": [{
1373
+ "bg-clip": ["border", "padding", "content", "text"]
1374
+ }],
1375
+ /**
1376
+ * Background Opacity
1377
+ * @deprecated since Tailwind CSS v3.0.0
1378
+ * @see https://tailwindcss.com/docs/background-opacity
1379
+ */
1380
+ "bg-opacity": [{
1381
+ "bg-opacity": [opacity]
1382
+ }],
1383
+ /**
1384
+ * Background Origin
1385
+ * @see https://tailwindcss.com/docs/background-origin
1386
+ */
1387
+ "bg-origin": [{
1388
+ "bg-origin": ["border", "padding", "content"]
1389
+ }],
1390
+ /**
1391
+ * Background Position
1392
+ * @see https://tailwindcss.com/docs/background-position
1393
+ */
1394
+ "bg-position": [{
1395
+ bg: [...getPositions(), isArbitraryPosition]
1396
+ }],
1397
+ /**
1398
+ * Background Repeat
1399
+ * @see https://tailwindcss.com/docs/background-repeat
1400
+ */
1401
+ "bg-repeat": [{
1402
+ bg: ["no-repeat", {
1403
+ repeat: ["", "x", "y", "round", "space"]
1404
+ }]
1405
+ }],
1406
+ /**
1407
+ * Background Size
1408
+ * @see https://tailwindcss.com/docs/background-size
1409
+ */
1410
+ "bg-size": [{
1411
+ bg: ["auto", "cover", "contain", isArbitrarySize]
1412
+ }],
1413
+ /**
1414
+ * Background Image
1415
+ * @see https://tailwindcss.com/docs/background-image
1416
+ */
1417
+ "bg-image": [{
1418
+ bg: ["none", {
1419
+ "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1420
+ }, isArbitraryImage]
1421
+ }],
1422
+ /**
1423
+ * Background Color
1424
+ * @see https://tailwindcss.com/docs/background-color
1425
+ */
1426
+ "bg-color": [{
1427
+ bg: [colors]
1428
+ }],
1429
+ /**
1430
+ * Gradient Color Stops From Position
1431
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1432
+ */
1433
+ "gradient-from-pos": [{
1434
+ from: [gradientColorStopPositions]
1435
+ }],
1436
+ /**
1437
+ * Gradient Color Stops Via Position
1438
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1439
+ */
1440
+ "gradient-via-pos": [{
1441
+ via: [gradientColorStopPositions]
1442
+ }],
1443
+ /**
1444
+ * Gradient Color Stops To Position
1445
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1446
+ */
1447
+ "gradient-to-pos": [{
1448
+ to: [gradientColorStopPositions]
1449
+ }],
1450
+ /**
1451
+ * Gradient Color Stops From
1452
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1453
+ */
1454
+ "gradient-from": [{
1455
+ from: [gradientColorStops]
1456
+ }],
1457
+ /**
1458
+ * Gradient Color Stops Via
1459
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1460
+ */
1461
+ "gradient-via": [{
1462
+ via: [gradientColorStops]
1463
+ }],
1464
+ /**
1465
+ * Gradient Color Stops To
1466
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1467
+ */
1468
+ "gradient-to": [{
1469
+ to: [gradientColorStops]
1470
+ }],
1471
+ // Borders
1472
+ /**
1473
+ * Border Radius
1474
+ * @see https://tailwindcss.com/docs/border-radius
1475
+ */
1476
+ rounded: [{
1477
+ rounded: [borderRadius]
1478
+ }],
1479
+ /**
1480
+ * Border Radius Start
1481
+ * @see https://tailwindcss.com/docs/border-radius
1482
+ */
1483
+ "rounded-s": [{
1484
+ "rounded-s": [borderRadius]
1485
+ }],
1486
+ /**
1487
+ * Border Radius End
1488
+ * @see https://tailwindcss.com/docs/border-radius
1489
+ */
1490
+ "rounded-e": [{
1491
+ "rounded-e": [borderRadius]
1492
+ }],
1493
+ /**
1494
+ * Border Radius Top
1495
+ * @see https://tailwindcss.com/docs/border-radius
1496
+ */
1497
+ "rounded-t": [{
1498
+ "rounded-t": [borderRadius]
1499
+ }],
1500
+ /**
1501
+ * Border Radius Right
1502
+ * @see https://tailwindcss.com/docs/border-radius
1503
+ */
1504
+ "rounded-r": [{
1505
+ "rounded-r": [borderRadius]
1506
+ }],
1507
+ /**
1508
+ * Border Radius Bottom
1509
+ * @see https://tailwindcss.com/docs/border-radius
1510
+ */
1511
+ "rounded-b": [{
1512
+ "rounded-b": [borderRadius]
1513
+ }],
1514
+ /**
1515
+ * Border Radius Left
1516
+ * @see https://tailwindcss.com/docs/border-radius
1517
+ */
1518
+ "rounded-l": [{
1519
+ "rounded-l": [borderRadius]
1520
+ }],
1521
+ /**
1522
+ * Border Radius Start Start
1523
+ * @see https://tailwindcss.com/docs/border-radius
1524
+ */
1525
+ "rounded-ss": [{
1526
+ "rounded-ss": [borderRadius]
1527
+ }],
1528
+ /**
1529
+ * Border Radius Start End
1530
+ * @see https://tailwindcss.com/docs/border-radius
1531
+ */
1532
+ "rounded-se": [{
1533
+ "rounded-se": [borderRadius]
1534
+ }],
1535
+ /**
1536
+ * Border Radius End End
1537
+ * @see https://tailwindcss.com/docs/border-radius
1538
+ */
1539
+ "rounded-ee": [{
1540
+ "rounded-ee": [borderRadius]
1541
+ }],
1542
+ /**
1543
+ * Border Radius End Start
1544
+ * @see https://tailwindcss.com/docs/border-radius
1545
+ */
1546
+ "rounded-es": [{
1547
+ "rounded-es": [borderRadius]
1548
+ }],
1549
+ /**
1550
+ * Border Radius Top Left
1551
+ * @see https://tailwindcss.com/docs/border-radius
1552
+ */
1553
+ "rounded-tl": [{
1554
+ "rounded-tl": [borderRadius]
1555
+ }],
1556
+ /**
1557
+ * Border Radius Top Right
1558
+ * @see https://tailwindcss.com/docs/border-radius
1559
+ */
1560
+ "rounded-tr": [{
1561
+ "rounded-tr": [borderRadius]
1562
+ }],
1563
+ /**
1564
+ * Border Radius Bottom Right
1565
+ * @see https://tailwindcss.com/docs/border-radius
1566
+ */
1567
+ "rounded-br": [{
1568
+ "rounded-br": [borderRadius]
1569
+ }],
1570
+ /**
1571
+ * Border Radius Bottom Left
1572
+ * @see https://tailwindcss.com/docs/border-radius
1573
+ */
1574
+ "rounded-bl": [{
1575
+ "rounded-bl": [borderRadius]
1576
+ }],
1577
+ /**
1578
+ * Border Width
1579
+ * @see https://tailwindcss.com/docs/border-width
1580
+ */
1581
+ "border-w": [{
1582
+ border: [borderWidth]
1583
+ }],
1584
+ /**
1585
+ * Border Width X
1586
+ * @see https://tailwindcss.com/docs/border-width
1587
+ */
1588
+ "border-w-x": [{
1589
+ "border-x": [borderWidth]
1590
+ }],
1591
+ /**
1592
+ * Border Width Y
1593
+ * @see https://tailwindcss.com/docs/border-width
1594
+ */
1595
+ "border-w-y": [{
1596
+ "border-y": [borderWidth]
1597
+ }],
1598
+ /**
1599
+ * Border Width Start
1600
+ * @see https://tailwindcss.com/docs/border-width
1601
+ */
1602
+ "border-w-s": [{
1603
+ "border-s": [borderWidth]
1604
+ }],
1605
+ /**
1606
+ * Border Width End
1607
+ * @see https://tailwindcss.com/docs/border-width
1608
+ */
1609
+ "border-w-e": [{
1610
+ "border-e": [borderWidth]
1611
+ }],
1612
+ /**
1613
+ * Border Width Top
1614
+ * @see https://tailwindcss.com/docs/border-width
1615
+ */
1616
+ "border-w-t": [{
1617
+ "border-t": [borderWidth]
1618
+ }],
1619
+ /**
1620
+ * Border Width Right
1621
+ * @see https://tailwindcss.com/docs/border-width
1622
+ */
1623
+ "border-w-r": [{
1624
+ "border-r": [borderWidth]
1625
+ }],
1626
+ /**
1627
+ * Border Width Bottom
1628
+ * @see https://tailwindcss.com/docs/border-width
1629
+ */
1630
+ "border-w-b": [{
1631
+ "border-b": [borderWidth]
1632
+ }],
1633
+ /**
1634
+ * Border Width Left
1635
+ * @see https://tailwindcss.com/docs/border-width
1636
+ */
1637
+ "border-w-l": [{
1638
+ "border-l": [borderWidth]
1639
+ }],
1640
+ /**
1641
+ * Border Opacity
1642
+ * @see https://tailwindcss.com/docs/border-opacity
1643
+ */
1644
+ "border-opacity": [{
1645
+ "border-opacity": [opacity]
1646
+ }],
1647
+ /**
1648
+ * Border Style
1649
+ * @see https://tailwindcss.com/docs/border-style
1650
+ */
1651
+ "border-style": [{
1652
+ border: [...getLineStyles(), "hidden"]
1653
+ }],
1654
+ /**
1655
+ * Divide Width X
1656
+ * @see https://tailwindcss.com/docs/divide-width
1657
+ */
1658
+ "divide-x": [{
1659
+ "divide-x": [borderWidth]
1660
+ }],
1661
+ /**
1662
+ * Divide Width X Reverse
1663
+ * @see https://tailwindcss.com/docs/divide-width
1664
+ */
1665
+ "divide-x-reverse": ["divide-x-reverse"],
1666
+ /**
1667
+ * Divide Width Y
1668
+ * @see https://tailwindcss.com/docs/divide-width
1669
+ */
1670
+ "divide-y": [{
1671
+ "divide-y": [borderWidth]
1672
+ }],
1673
+ /**
1674
+ * Divide Width Y Reverse
1675
+ * @see https://tailwindcss.com/docs/divide-width
1676
+ */
1677
+ "divide-y-reverse": ["divide-y-reverse"],
1678
+ /**
1679
+ * Divide Opacity
1680
+ * @see https://tailwindcss.com/docs/divide-opacity
1681
+ */
1682
+ "divide-opacity": [{
1683
+ "divide-opacity": [opacity]
1684
+ }],
1685
+ /**
1686
+ * Divide Style
1687
+ * @see https://tailwindcss.com/docs/divide-style
1688
+ */
1689
+ "divide-style": [{
1690
+ divide: getLineStyles()
1691
+ }],
1692
+ /**
1693
+ * Border Color
1694
+ * @see https://tailwindcss.com/docs/border-color
1695
+ */
1696
+ "border-color": [{
1697
+ border: [borderColor]
1698
+ }],
1699
+ /**
1700
+ * Border Color X
1701
+ * @see https://tailwindcss.com/docs/border-color
1702
+ */
1703
+ "border-color-x": [{
1704
+ "border-x": [borderColor]
1705
+ }],
1706
+ /**
1707
+ * Border Color Y
1708
+ * @see https://tailwindcss.com/docs/border-color
1709
+ */
1710
+ "border-color-y": [{
1711
+ "border-y": [borderColor]
1712
+ }],
1713
+ /**
1714
+ * Border Color S
1715
+ * @see https://tailwindcss.com/docs/border-color
1716
+ */
1717
+ "border-color-s": [{
1718
+ "border-s": [borderColor]
1719
+ }],
1720
+ /**
1721
+ * Border Color E
1722
+ * @see https://tailwindcss.com/docs/border-color
1723
+ */
1724
+ "border-color-e": [{
1725
+ "border-e": [borderColor]
1726
+ }],
1727
+ /**
1728
+ * Border Color Top
1729
+ * @see https://tailwindcss.com/docs/border-color
1730
+ */
1731
+ "border-color-t": [{
1732
+ "border-t": [borderColor]
1733
+ }],
1734
+ /**
1735
+ * Border Color Right
1736
+ * @see https://tailwindcss.com/docs/border-color
1737
+ */
1738
+ "border-color-r": [{
1739
+ "border-r": [borderColor]
1740
+ }],
1741
+ /**
1742
+ * Border Color Bottom
1743
+ * @see https://tailwindcss.com/docs/border-color
1744
+ */
1745
+ "border-color-b": [{
1746
+ "border-b": [borderColor]
1747
+ }],
1748
+ /**
1749
+ * Border Color Left
1750
+ * @see https://tailwindcss.com/docs/border-color
1751
+ */
1752
+ "border-color-l": [{
1753
+ "border-l": [borderColor]
1754
+ }],
1755
+ /**
1756
+ * Divide Color
1757
+ * @see https://tailwindcss.com/docs/divide-color
1758
+ */
1759
+ "divide-color": [{
1760
+ divide: [borderColor]
1761
+ }],
1762
+ /**
1763
+ * Outline Style
1764
+ * @see https://tailwindcss.com/docs/outline-style
1765
+ */
1766
+ "outline-style": [{
1767
+ outline: ["", ...getLineStyles()]
1768
+ }],
1769
+ /**
1770
+ * Outline Offset
1771
+ * @see https://tailwindcss.com/docs/outline-offset
1772
+ */
1773
+ "outline-offset": [{
1774
+ "outline-offset": [isLength, isArbitraryValue]
1775
+ }],
1776
+ /**
1777
+ * Outline Width
1778
+ * @see https://tailwindcss.com/docs/outline-width
1779
+ */
1780
+ "outline-w": [{
1781
+ outline: [isLength, isArbitraryLength]
1782
+ }],
1783
+ /**
1784
+ * Outline Color
1785
+ * @see https://tailwindcss.com/docs/outline-color
1786
+ */
1787
+ "outline-color": [{
1788
+ outline: [colors]
1789
+ }],
1790
+ /**
1791
+ * Ring Width
1792
+ * @see https://tailwindcss.com/docs/ring-width
1793
+ */
1794
+ "ring-w": [{
1795
+ ring: getLengthWithEmptyAndArbitrary()
1796
+ }],
1797
+ /**
1798
+ * Ring Width Inset
1799
+ * @see https://tailwindcss.com/docs/ring-width
1800
+ */
1801
+ "ring-w-inset": ["ring-inset"],
1802
+ /**
1803
+ * Ring Color
1804
+ * @see https://tailwindcss.com/docs/ring-color
1805
+ */
1806
+ "ring-color": [{
1807
+ ring: [colors]
1808
+ }],
1809
+ /**
1810
+ * Ring Opacity
1811
+ * @see https://tailwindcss.com/docs/ring-opacity
1812
+ */
1813
+ "ring-opacity": [{
1814
+ "ring-opacity": [opacity]
1815
+ }],
1816
+ /**
1817
+ * Ring Offset Width
1818
+ * @see https://tailwindcss.com/docs/ring-offset-width
1819
+ */
1820
+ "ring-offset-w": [{
1821
+ "ring-offset": [isLength, isArbitraryLength]
1822
+ }],
1823
+ /**
1824
+ * Ring Offset Color
1825
+ * @see https://tailwindcss.com/docs/ring-offset-color
1826
+ */
1827
+ "ring-offset-color": [{
1828
+ "ring-offset": [colors]
1829
+ }],
1830
+ // Effects
1831
+ /**
1832
+ * Box Shadow
1833
+ * @see https://tailwindcss.com/docs/box-shadow
1834
+ */
1835
+ shadow: [{
1836
+ shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
1837
+ }],
1838
+ /**
1839
+ * Box Shadow Color
1840
+ * @see https://tailwindcss.com/docs/box-shadow-color
1841
+ */
1842
+ "shadow-color": [{
1843
+ shadow: [isAny]
1844
+ }],
1845
+ /**
1846
+ * Opacity
1847
+ * @see https://tailwindcss.com/docs/opacity
1848
+ */
1849
+ opacity: [{
1850
+ opacity: [opacity]
1851
+ }],
1852
+ /**
1853
+ * Mix Blend Mode
1854
+ * @see https://tailwindcss.com/docs/mix-blend-mode
1855
+ */
1856
+ "mix-blend": [{
1857
+ "mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
1858
+ }],
1859
+ /**
1860
+ * Background Blend Mode
1861
+ * @see https://tailwindcss.com/docs/background-blend-mode
1862
+ */
1863
+ "bg-blend": [{
1864
+ "bg-blend": getBlendModes()
1865
+ }],
1866
+ // Filters
1867
+ /**
1868
+ * Filter
1869
+ * @deprecated since Tailwind CSS v3.0.0
1870
+ * @see https://tailwindcss.com/docs/filter
1871
+ */
1872
+ filter: [{
1873
+ filter: ["", "none"]
1874
+ }],
1875
+ /**
1876
+ * Blur
1877
+ * @see https://tailwindcss.com/docs/blur
1878
+ */
1879
+ blur: [{
1880
+ blur: [blur]
1881
+ }],
1882
+ /**
1883
+ * Brightness
1884
+ * @see https://tailwindcss.com/docs/brightness
1885
+ */
1886
+ brightness: [{
1887
+ brightness: [brightness]
1888
+ }],
1889
+ /**
1890
+ * Contrast
1891
+ * @see https://tailwindcss.com/docs/contrast
1892
+ */
1893
+ contrast: [{
1894
+ contrast: [contrast]
1895
+ }],
1896
+ /**
1897
+ * Drop Shadow
1898
+ * @see https://tailwindcss.com/docs/drop-shadow
1899
+ */
1900
+ "drop-shadow": [{
1901
+ "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
1902
+ }],
1903
+ /**
1904
+ * Grayscale
1905
+ * @see https://tailwindcss.com/docs/grayscale
1906
+ */
1907
+ grayscale: [{
1908
+ grayscale: [grayscale]
1909
+ }],
1910
+ /**
1911
+ * Hue Rotate
1912
+ * @see https://tailwindcss.com/docs/hue-rotate
1913
+ */
1914
+ "hue-rotate": [{
1915
+ "hue-rotate": [hueRotate]
1916
+ }],
1917
+ /**
1918
+ * Invert
1919
+ * @see https://tailwindcss.com/docs/invert
1920
+ */
1921
+ invert: [{
1922
+ invert: [invert]
1923
+ }],
1924
+ /**
1925
+ * Saturate
1926
+ * @see https://tailwindcss.com/docs/saturate
1927
+ */
1928
+ saturate: [{
1929
+ saturate: [saturate]
1930
+ }],
1931
+ /**
1932
+ * Sepia
1933
+ * @see https://tailwindcss.com/docs/sepia
1934
+ */
1935
+ sepia: [{
1936
+ sepia: [sepia]
1937
+ }],
1938
+ /**
1939
+ * Backdrop Filter
1940
+ * @deprecated since Tailwind CSS v3.0.0
1941
+ * @see https://tailwindcss.com/docs/backdrop-filter
1942
+ */
1943
+ "backdrop-filter": [{
1944
+ "backdrop-filter": ["", "none"]
1945
+ }],
1946
+ /**
1947
+ * Backdrop Blur
1948
+ * @see https://tailwindcss.com/docs/backdrop-blur
1949
+ */
1950
+ "backdrop-blur": [{
1951
+ "backdrop-blur": [blur]
1952
+ }],
1953
+ /**
1954
+ * Backdrop Brightness
1955
+ * @see https://tailwindcss.com/docs/backdrop-brightness
1956
+ */
1957
+ "backdrop-brightness": [{
1958
+ "backdrop-brightness": [brightness]
1959
+ }],
1960
+ /**
1961
+ * Backdrop Contrast
1962
+ * @see https://tailwindcss.com/docs/backdrop-contrast
1963
+ */
1964
+ "backdrop-contrast": [{
1965
+ "backdrop-contrast": [contrast]
1966
+ }],
1967
+ /**
1968
+ * Backdrop Grayscale
1969
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
1970
+ */
1971
+ "backdrop-grayscale": [{
1972
+ "backdrop-grayscale": [grayscale]
1973
+ }],
1974
+ /**
1975
+ * Backdrop Hue Rotate
1976
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1977
+ */
1978
+ "backdrop-hue-rotate": [{
1979
+ "backdrop-hue-rotate": [hueRotate]
1980
+ }],
1981
+ /**
1982
+ * Backdrop Invert
1983
+ * @see https://tailwindcss.com/docs/backdrop-invert
1984
+ */
1985
+ "backdrop-invert": [{
1986
+ "backdrop-invert": [invert]
1987
+ }],
1988
+ /**
1989
+ * Backdrop Opacity
1990
+ * @see https://tailwindcss.com/docs/backdrop-opacity
1991
+ */
1992
+ "backdrop-opacity": [{
1993
+ "backdrop-opacity": [opacity]
1994
+ }],
1995
+ /**
1996
+ * Backdrop Saturate
1997
+ * @see https://tailwindcss.com/docs/backdrop-saturate
1998
+ */
1999
+ "backdrop-saturate": [{
2000
+ "backdrop-saturate": [saturate]
2001
+ }],
2002
+ /**
2003
+ * Backdrop Sepia
2004
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2005
+ */
2006
+ "backdrop-sepia": [{
2007
+ "backdrop-sepia": [sepia]
2008
+ }],
2009
+ // Tables
2010
+ /**
2011
+ * Border Collapse
2012
+ * @see https://tailwindcss.com/docs/border-collapse
2013
+ */
2014
+ "border-collapse": [{
2015
+ border: ["collapse", "separate"]
2016
+ }],
2017
+ /**
2018
+ * Border Spacing
2019
+ * @see https://tailwindcss.com/docs/border-spacing
2020
+ */
2021
+ "border-spacing": [{
2022
+ "border-spacing": [borderSpacing]
2023
+ }],
2024
+ /**
2025
+ * Border Spacing X
2026
+ * @see https://tailwindcss.com/docs/border-spacing
2027
+ */
2028
+ "border-spacing-x": [{
2029
+ "border-spacing-x": [borderSpacing]
2030
+ }],
2031
+ /**
2032
+ * Border Spacing Y
2033
+ * @see https://tailwindcss.com/docs/border-spacing
2034
+ */
2035
+ "border-spacing-y": [{
2036
+ "border-spacing-y": [borderSpacing]
2037
+ }],
2038
+ /**
2039
+ * Table Layout
2040
+ * @see https://tailwindcss.com/docs/table-layout
2041
+ */
2042
+ "table-layout": [{
2043
+ table: ["auto", "fixed"]
2044
+ }],
2045
+ /**
2046
+ * Caption Side
2047
+ * @see https://tailwindcss.com/docs/caption-side
2048
+ */
2049
+ caption: [{
2050
+ caption: ["top", "bottom"]
2051
+ }],
2052
+ // Transitions and Animation
2053
+ /**
2054
+ * Tranisition Property
2055
+ * @see https://tailwindcss.com/docs/transition-property
2056
+ */
2057
+ transition: [{
2058
+ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
2059
+ }],
2060
+ /**
2061
+ * Transition Duration
2062
+ * @see https://tailwindcss.com/docs/transition-duration
2063
+ */
2064
+ duration: [{
2065
+ duration: getNumberAndArbitrary()
2066
+ }],
2067
+ /**
2068
+ * Transition Timing Function
2069
+ * @see https://tailwindcss.com/docs/transition-timing-function
2070
+ */
2071
+ ease: [{
2072
+ ease: ["linear", "in", "out", "in-out", isArbitraryValue]
2073
+ }],
2074
+ /**
2075
+ * Transition Delay
2076
+ * @see https://tailwindcss.com/docs/transition-delay
2077
+ */
2078
+ delay: [{
2079
+ delay: getNumberAndArbitrary()
2080
+ }],
2081
+ /**
2082
+ * Animation
2083
+ * @see https://tailwindcss.com/docs/animation
2084
+ */
2085
+ animate: [{
2086
+ animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
2087
+ }],
2088
+ // Transforms
2089
+ /**
2090
+ * Transform
2091
+ * @see https://tailwindcss.com/docs/transform
2092
+ */
2093
+ transform: [{
2094
+ transform: ["", "gpu", "none"]
2095
+ }],
2096
+ /**
2097
+ * Scale
2098
+ * @see https://tailwindcss.com/docs/scale
2099
+ */
2100
+ scale: [{
2101
+ scale: [scale]
2102
+ }],
2103
+ /**
2104
+ * Scale X
2105
+ * @see https://tailwindcss.com/docs/scale
2106
+ */
2107
+ "scale-x": [{
2108
+ "scale-x": [scale]
2109
+ }],
2110
+ /**
2111
+ * Scale Y
2112
+ * @see https://tailwindcss.com/docs/scale
2113
+ */
2114
+ "scale-y": [{
2115
+ "scale-y": [scale]
2116
+ }],
2117
+ /**
2118
+ * Rotate
2119
+ * @see https://tailwindcss.com/docs/rotate
2120
+ */
2121
+ rotate: [{
2122
+ rotate: [isInteger, isArbitraryValue]
2123
+ }],
2124
+ /**
2125
+ * Translate X
2126
+ * @see https://tailwindcss.com/docs/translate
2127
+ */
2128
+ "translate-x": [{
2129
+ "translate-x": [translate]
2130
+ }],
2131
+ /**
2132
+ * Translate Y
2133
+ * @see https://tailwindcss.com/docs/translate
2134
+ */
2135
+ "translate-y": [{
2136
+ "translate-y": [translate]
2137
+ }],
2138
+ /**
2139
+ * Skew X
2140
+ * @see https://tailwindcss.com/docs/skew
2141
+ */
2142
+ "skew-x": [{
2143
+ "skew-x": [skew]
2144
+ }],
2145
+ /**
2146
+ * Skew Y
2147
+ * @see https://tailwindcss.com/docs/skew
2148
+ */
2149
+ "skew-y": [{
2150
+ "skew-y": [skew]
2151
+ }],
2152
+ /**
2153
+ * Transform Origin
2154
+ * @see https://tailwindcss.com/docs/transform-origin
2155
+ */
2156
+ "transform-origin": [{
2157
+ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
2158
+ }],
2159
+ // Interactivity
2160
+ /**
2161
+ * Accent Color
2162
+ * @see https://tailwindcss.com/docs/accent-color
2163
+ */
2164
+ accent: [{
2165
+ accent: ["auto", colors]
2166
+ }],
2167
+ /**
2168
+ * Appearance
2169
+ * @see https://tailwindcss.com/docs/appearance
2170
+ */
2171
+ appearance: [{
2172
+ appearance: ["none", "auto"]
2173
+ }],
2174
+ /**
2175
+ * Cursor
2176
+ * @see https://tailwindcss.com/docs/cursor
2177
+ */
2178
+ cursor: [{
2179
+ 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]
2180
+ }],
2181
+ /**
2182
+ * Caret Color
2183
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2184
+ */
2185
+ "caret-color": [{
2186
+ caret: [colors]
2187
+ }],
2188
+ /**
2189
+ * Pointer Events
2190
+ * @see https://tailwindcss.com/docs/pointer-events
2191
+ */
2192
+ "pointer-events": [{
2193
+ "pointer-events": ["none", "auto"]
2194
+ }],
2195
+ /**
2196
+ * Resize
2197
+ * @see https://tailwindcss.com/docs/resize
2198
+ */
2199
+ resize: [{
2200
+ resize: ["none", "y", "x", ""]
2201
+ }],
2202
+ /**
2203
+ * Scroll Behavior
2204
+ * @see https://tailwindcss.com/docs/scroll-behavior
2205
+ */
2206
+ "scroll-behavior": [{
2207
+ scroll: ["auto", "smooth"]
2208
+ }],
2209
+ /**
2210
+ * Scroll Margin
2211
+ * @see https://tailwindcss.com/docs/scroll-margin
2212
+ */
2213
+ "scroll-m": [{
2214
+ "scroll-m": getSpacingWithArbitrary()
2215
+ }],
2216
+ /**
2217
+ * Scroll Margin X
2218
+ * @see https://tailwindcss.com/docs/scroll-margin
2219
+ */
2220
+ "scroll-mx": [{
2221
+ "scroll-mx": getSpacingWithArbitrary()
2222
+ }],
2223
+ /**
2224
+ * Scroll Margin Y
2225
+ * @see https://tailwindcss.com/docs/scroll-margin
2226
+ */
2227
+ "scroll-my": [{
2228
+ "scroll-my": getSpacingWithArbitrary()
2229
+ }],
2230
+ /**
2231
+ * Scroll Margin Start
2232
+ * @see https://tailwindcss.com/docs/scroll-margin
2233
+ */
2234
+ "scroll-ms": [{
2235
+ "scroll-ms": getSpacingWithArbitrary()
2236
+ }],
2237
+ /**
2238
+ * Scroll Margin End
2239
+ * @see https://tailwindcss.com/docs/scroll-margin
2240
+ */
2241
+ "scroll-me": [{
2242
+ "scroll-me": getSpacingWithArbitrary()
2243
+ }],
2244
+ /**
2245
+ * Scroll Margin Top
2246
+ * @see https://tailwindcss.com/docs/scroll-margin
2247
+ */
2248
+ "scroll-mt": [{
2249
+ "scroll-mt": getSpacingWithArbitrary()
2250
+ }],
2251
+ /**
2252
+ * Scroll Margin Right
2253
+ * @see https://tailwindcss.com/docs/scroll-margin
2254
+ */
2255
+ "scroll-mr": [{
2256
+ "scroll-mr": getSpacingWithArbitrary()
2257
+ }],
2258
+ /**
2259
+ * Scroll Margin Bottom
2260
+ * @see https://tailwindcss.com/docs/scroll-margin
2261
+ */
2262
+ "scroll-mb": [{
2263
+ "scroll-mb": getSpacingWithArbitrary()
2264
+ }],
2265
+ /**
2266
+ * Scroll Margin Left
2267
+ * @see https://tailwindcss.com/docs/scroll-margin
2268
+ */
2269
+ "scroll-ml": [{
2270
+ "scroll-ml": getSpacingWithArbitrary()
2271
+ }],
2272
+ /**
2273
+ * Scroll Padding
2274
+ * @see https://tailwindcss.com/docs/scroll-padding
2275
+ */
2276
+ "scroll-p": [{
2277
+ "scroll-p": getSpacingWithArbitrary()
2278
+ }],
2279
+ /**
2280
+ * Scroll Padding X
2281
+ * @see https://tailwindcss.com/docs/scroll-padding
2282
+ */
2283
+ "scroll-px": [{
2284
+ "scroll-px": getSpacingWithArbitrary()
2285
+ }],
2286
+ /**
2287
+ * Scroll Padding Y
2288
+ * @see https://tailwindcss.com/docs/scroll-padding
2289
+ */
2290
+ "scroll-py": [{
2291
+ "scroll-py": getSpacingWithArbitrary()
2292
+ }],
2293
+ /**
2294
+ * Scroll Padding Start
2295
+ * @see https://tailwindcss.com/docs/scroll-padding
2296
+ */
2297
+ "scroll-ps": [{
2298
+ "scroll-ps": getSpacingWithArbitrary()
2299
+ }],
2300
+ /**
2301
+ * Scroll Padding End
2302
+ * @see https://tailwindcss.com/docs/scroll-padding
2303
+ */
2304
+ "scroll-pe": [{
2305
+ "scroll-pe": getSpacingWithArbitrary()
2306
+ }],
2307
+ /**
2308
+ * Scroll Padding Top
2309
+ * @see https://tailwindcss.com/docs/scroll-padding
2310
+ */
2311
+ "scroll-pt": [{
2312
+ "scroll-pt": getSpacingWithArbitrary()
2313
+ }],
2314
+ /**
2315
+ * Scroll Padding Right
2316
+ * @see https://tailwindcss.com/docs/scroll-padding
2317
+ */
2318
+ "scroll-pr": [{
2319
+ "scroll-pr": getSpacingWithArbitrary()
2320
+ }],
2321
+ /**
2322
+ * Scroll Padding Bottom
2323
+ * @see https://tailwindcss.com/docs/scroll-padding
2324
+ */
2325
+ "scroll-pb": [{
2326
+ "scroll-pb": getSpacingWithArbitrary()
2327
+ }],
2328
+ /**
2329
+ * Scroll Padding Left
2330
+ * @see https://tailwindcss.com/docs/scroll-padding
2331
+ */
2332
+ "scroll-pl": [{
2333
+ "scroll-pl": getSpacingWithArbitrary()
2334
+ }],
2335
+ /**
2336
+ * Scroll Snap Align
2337
+ * @see https://tailwindcss.com/docs/scroll-snap-align
2338
+ */
2339
+ "snap-align": [{
2340
+ snap: ["start", "end", "center", "align-none"]
2341
+ }],
2342
+ /**
2343
+ * Scroll Snap Stop
2344
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
2345
+ */
2346
+ "snap-stop": [{
2347
+ snap: ["normal", "always"]
2348
+ }],
2349
+ /**
2350
+ * Scroll Snap Type
2351
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2352
+ */
2353
+ "snap-type": [{
2354
+ snap: ["none", "x", "y", "both"]
2355
+ }],
2356
+ /**
2357
+ * Scroll Snap Type Strictness
2358
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2359
+ */
2360
+ "snap-strictness": [{
2361
+ snap: ["mandatory", "proximity"]
2362
+ }],
2363
+ /**
2364
+ * Touch Action
2365
+ * @see https://tailwindcss.com/docs/touch-action
2366
+ */
2367
+ touch: [{
2368
+ touch: ["auto", "none", "manipulation"]
2369
+ }],
2370
+ /**
2371
+ * Touch Action X
2372
+ * @see https://tailwindcss.com/docs/touch-action
2373
+ */
2374
+ "touch-x": [{
2375
+ "touch-pan": ["x", "left", "right"]
2376
+ }],
2377
+ /**
2378
+ * Touch Action Y
2379
+ * @see https://tailwindcss.com/docs/touch-action
2380
+ */
2381
+ "touch-y": [{
2382
+ "touch-pan": ["y", "up", "down"]
2383
+ }],
2384
+ /**
2385
+ * Touch Action Pinch Zoom
2386
+ * @see https://tailwindcss.com/docs/touch-action
2387
+ */
2388
+ "touch-pz": ["touch-pinch-zoom"],
2389
+ /**
2390
+ * User Select
2391
+ * @see https://tailwindcss.com/docs/user-select
2392
+ */
2393
+ select: [{
2394
+ select: ["none", "text", "all", "auto"]
2395
+ }],
2396
+ /**
2397
+ * Will Change
2398
+ * @see https://tailwindcss.com/docs/will-change
2399
+ */
2400
+ "will-change": [{
2401
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
2402
+ }],
2403
+ // SVG
2404
+ /**
2405
+ * Fill
2406
+ * @see https://tailwindcss.com/docs/fill
2407
+ */
2408
+ fill: [{
2409
+ fill: [colors, "none"]
2410
+ }],
2411
+ /**
2412
+ * Stroke Width
2413
+ * @see https://tailwindcss.com/docs/stroke-width
2414
+ */
2415
+ "stroke-w": [{
2416
+ stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2417
+ }],
2418
+ /**
2419
+ * Stroke
2420
+ * @see https://tailwindcss.com/docs/stroke
2421
+ */
2422
+ stroke: [{
2423
+ stroke: [colors, "none"]
2424
+ }],
2425
+ // Accessibility
2426
+ /**
2427
+ * Screen Readers
2428
+ * @see https://tailwindcss.com/docs/screen-readers
2429
+ */
2430
+ sr: ["sr-only", "not-sr-only"],
2431
+ /**
2432
+ * Forced Color Adjust
2433
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2434
+ */
2435
+ "forced-color-adjust": [{
2436
+ "forced-color-adjust": ["auto", "none"]
2437
+ }]
2438
+ },
2439
+ conflictingClassGroups: {
2440
+ overflow: ["overflow-x", "overflow-y"],
2441
+ overscroll: ["overscroll-x", "overscroll-y"],
2442
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2443
+ "inset-x": ["right", "left"],
2444
+ "inset-y": ["top", "bottom"],
2445
+ flex: ["basis", "grow", "shrink"],
2446
+ gap: ["gap-x", "gap-y"],
2447
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2448
+ px: ["pr", "pl"],
2449
+ py: ["pt", "pb"],
2450
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2451
+ mx: ["mr", "ml"],
2452
+ my: ["mt", "mb"],
2453
+ size: ["w", "h"],
2454
+ "font-size": ["leading"],
2455
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2456
+ "fvn-ordinal": ["fvn-normal"],
2457
+ "fvn-slashed-zero": ["fvn-normal"],
2458
+ "fvn-figure": ["fvn-normal"],
2459
+ "fvn-spacing": ["fvn-normal"],
2460
+ "fvn-fraction": ["fvn-normal"],
2461
+ "line-clamp": ["display", "overflow"],
2462
+ 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"],
2463
+ "rounded-s": ["rounded-ss", "rounded-es"],
2464
+ "rounded-e": ["rounded-se", "rounded-ee"],
2465
+ "rounded-t": ["rounded-tl", "rounded-tr"],
2466
+ "rounded-r": ["rounded-tr", "rounded-br"],
2467
+ "rounded-b": ["rounded-br", "rounded-bl"],
2468
+ "rounded-l": ["rounded-tl", "rounded-bl"],
2469
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
2470
+ "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2471
+ "border-w-x": ["border-w-r", "border-w-l"],
2472
+ "border-w-y": ["border-w-t", "border-w-b"],
2473
+ "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2474
+ "border-color-x": ["border-color-r", "border-color-l"],
2475
+ "border-color-y": ["border-color-t", "border-color-b"],
2476
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2477
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
2478
+ "scroll-my": ["scroll-mt", "scroll-mb"],
2479
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2480
+ "scroll-px": ["scroll-pr", "scroll-pl"],
2481
+ "scroll-py": ["scroll-pt", "scroll-pb"],
2482
+ touch: ["touch-x", "touch-y", "touch-pz"],
2483
+ "touch-x": ["touch"],
2484
+ "touch-y": ["touch"],
2485
+ "touch-pz": ["touch"]
2486
+ },
2487
+ conflictingClassGroupModifiers: {
2488
+ "font-size": ["leading"]
2489
+ }
2490
+ };
2491
+ };
2492
+ const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
2493
+ function clx(...args) {
2494
+ return twMerge(clsx$1(...args));
2495
+ }
2496
+ var __defProp$1 = Object.defineProperty;
2497
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2498
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2499
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2500
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2501
+ var __spreadValues$1 = (a, b) => {
2502
+ for (var prop in b || (b = {}))
2503
+ if (__hasOwnProp$1.call(b, prop))
2504
+ __defNormalProp$1(a, prop, b[prop]);
2505
+ if (__getOwnPropSymbols$1)
2506
+ for (var prop of __getOwnPropSymbols$1(b)) {
2507
+ if (__propIsEnum$1.call(b, prop))
2508
+ __defNormalProp$1(a, prop, b[prop]);
2509
+ }
2510
+ return a;
2511
+ };
2512
+ var __objRest$1 = (source, exclude) => {
2513
+ var target = {};
2514
+ for (var prop in source)
2515
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
2516
+ target[prop] = source[prop];
2517
+ if (source != null && __getOwnPropSymbols$1)
2518
+ for (var prop of __getOwnPropSymbols$1(source)) {
2519
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
2520
+ target[prop] = source[prop];
2521
+ }
2522
+ return target;
2523
+ };
2524
+ const Spinner = React__namespace.forwardRef(
2525
+ (_a, ref) => {
2526
+ var _b = _a, { color = "currentColor" } = _b, props = __objRest$1(_b, ["color"]);
2527
+ return /* @__PURE__ */ React__namespace.createElement(
2528
+ "svg",
2529
+ __spreadValues$1({
2530
+ xmlns: "http://www.w3.org/2000/svg",
2531
+ width: 15,
2532
+ height: 15,
2533
+ fill: "none",
2534
+ ref
2535
+ }, props),
2536
+ /* @__PURE__ */ React__namespace.createElement(
2537
+ "g",
2538
+ {
2539
+ stroke: color,
2540
+ strokeLinecap: "round",
2541
+ strokeLinejoin: "round",
2542
+ strokeWidth: 1.5,
2543
+ clipPath: "url(#a)"
2544
+ },
2545
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "M3.11 2.943 4.68 4.514" }),
2546
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "M1.222 7.5h2.222", opacity: 0.88 }),
2547
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "m3.11 12.057 1.571-1.571", opacity: 0.75 }),
2548
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "M7.667 13.945v-2.222", opacity: 0.63 }),
2549
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "m12.224 12.057-1.572-1.571", opacity: 0.5 }),
2550
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "M14.112 7.5h-2.223", opacity: 0.38 }),
2551
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "m12.224 2.943-1.572 1.571", opacity: 0.25 }),
2552
+ /* @__PURE__ */ React__namespace.createElement("path", { d: "M7.667 1.055v2.223", opacity: 0.13 })
2553
+ ),
2554
+ /* @__PURE__ */ React__namespace.createElement("defs", null, /* @__PURE__ */ React__namespace.createElement("clipPath", { id: "a" }, /* @__PURE__ */ React__namespace.createElement("path", { fill: "#fff", d: "M0 0h15v15H0z" })))
2555
+ );
2556
+ }
2557
+ );
2558
+ Spinner.displayName = "Spinner";
2559
+ var __defProp = Object.defineProperty;
2560
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2561
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
2562
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
2563
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2564
+ var __spreadValues = (a, b) => {
2565
+ for (var prop in b || (b = {}))
2566
+ if (__hasOwnProp.call(b, prop))
2567
+ __defNormalProp(a, prop, b[prop]);
2568
+ if (__getOwnPropSymbols)
2569
+ for (var prop of __getOwnPropSymbols(b)) {
2570
+ if (__propIsEnum.call(b, prop))
2571
+ __defNormalProp(a, prop, b[prop]);
2572
+ }
2573
+ return a;
2574
+ };
2575
+ var __objRest = (source, exclude) => {
2576
+ var target = {};
2577
+ for (var prop in source)
2578
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
2579
+ target[prop] = source[prop];
2580
+ if (source != null && __getOwnPropSymbols)
2581
+ for (var prop of __getOwnPropSymbols(source)) {
2582
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
2583
+ target[prop] = source[prop];
2584
+ }
2585
+ return target;
2586
+ };
2587
+ const Trash = React__namespace.forwardRef(
2588
+ (_a, ref) => {
2589
+ var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
2590
+ return /* @__PURE__ */ React__namespace.createElement(
2591
+ "svg",
2592
+ __spreadValues({
2593
+ xmlns: "http://www.w3.org/2000/svg",
2594
+ width: 15,
2595
+ height: 15,
2596
+ fill: "none",
2597
+ ref
2598
+ }, props),
2599
+ /* @__PURE__ */ React__namespace.createElement(
2600
+ "path",
2601
+ {
2602
+ stroke: color,
2603
+ strokeLinecap: "round",
2604
+ strokeLinejoin: "round",
2605
+ strokeWidth: 1.5,
2606
+ d: "M1.944 3.278h11.112M5.5 3.278V1.944a.89.89 0 0 1 .889-.888H8.61a.89.89 0 0 1 .889.888v1.334M11.722 5.5v6.667c0 .982-.795 1.777-1.777 1.777h-4.89a1.777 1.777 0 0 1-1.777-1.777V5.5M5.944 7.278v4M9.056 7.278v4"
2607
+ }
2608
+ )
2609
+ );
2610
+ }
2611
+ );
2612
+ Trash.displayName = "Trash";
2613
+ function r(e) {
2614
+ var t, f, n = "";
2615
+ if ("string" == typeof e || "number" == typeof e) n += e;
2616
+ else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
2617
+ else for (t in e) e[t] && (n && (n += " "), n += t);
2618
+ return n;
2619
+ }
2620
+ function clsx() {
2621
+ for (var e, t, f = 0, n = ""; f < arguments.length; ) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
2622
+ return n;
2623
+ }
2624
+ const falsyToString = (value) => typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
2625
+ const defineConfig = (options) => {
2626
+ const cx1 = function() {
2627
+ for (var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++) {
2628
+ inputs[_key] = arguments[_key];
2629
+ }
2630
+ return clsx(inputs);
2631
+ };
2632
+ const cva1 = (config2) => {
2633
+ return (props) => {
2634
+ var ref;
2635
+ if ((config2 === null || config2 === void 0 ? void 0 : config2.variants) == null) return cx1(config2 === null || config2 === void 0 ? void 0 : config2.base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
2636
+ const { variants, defaultVariants } = config2;
2637
+ const getVariantClassNames = Object.keys(variants).map((variant) => {
2638
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
2639
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
2640
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
2641
+ return variants[variant][variantKey];
2642
+ });
2643
+ const defaultsAndProps = { ...defaultVariants, ...props && Object.entries(props).reduce((acc, param) => {
2644
+ let [key, value] = param;
2645
+ return typeof value === "undefined" ? acc : { ...acc, [key]: value };
2646
+ }, {}) };
2647
+ const getCompoundVariantClassNames = config2 === null || config2 === void 0 ? void 0 : (ref = config2.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1) => {
2648
+ let { class: cvClass, className: cvClassName, ...cvConfig } = param1;
2649
+ return Object.entries(cvConfig).every((param) => {
2650
+ let [cvKey, cvSelector] = param;
2651
+ const selector = defaultsAndProps[cvKey];
2652
+ return Array.isArray(cvSelector) ? cvSelector.includes(selector) : selector === cvSelector;
2653
+ }) ? [...acc, cvClass, cvClassName] : acc;
2654
+ }, []);
2655
+ return cx1(config2 === null || config2 === void 0 ? void 0 : config2.base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
2656
+ };
2657
+ };
2658
+ const compose1 = function() {
2659
+ for (var _len = arguments.length, components = new Array(_len), _key = 0; _key < _len; _key++) {
2660
+ components[_key] = arguments[_key];
2661
+ }
2662
+ return (props) => {
2663
+ const propsWithoutClass = Object.fromEntries(Object.entries(props || {}).filter((param) => {
2664
+ let [key] = param;
2665
+ return !["class", "className"].includes(key);
2666
+ }));
2667
+ return cx1(components.map((component) => component(propsWithoutClass)), props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
2668
+ };
2669
+ };
2670
+ return { compose: compose1, cva: cva1, cx: cx1 };
2671
+ };
2672
+ const { cva } = defineConfig();
2673
+ function setRef(ref, value) {
2674
+ if (typeof ref === "function") {
2675
+ return ref(value);
2676
+ } else if (ref !== null && ref !== void 0) {
2677
+ ref.current = value;
2678
+ }
2679
+ }
2680
+ function composeRefs(...refs) {
2681
+ return (node) => {
2682
+ let hasCleanup = false;
2683
+ const cleanups = refs.map((ref) => {
2684
+ const cleanup = setRef(ref, node);
2685
+ if (!hasCleanup && typeof cleanup == "function") {
2686
+ hasCleanup = true;
2687
+ }
2688
+ return cleanup;
2689
+ });
2690
+ if (hasCleanup) {
2691
+ return () => {
2692
+ for (let i = 0; i < cleanups.length; i++) {
2693
+ const cleanup = cleanups[i];
2694
+ if (typeof cleanup == "function") {
2695
+ cleanup();
2696
+ } else {
2697
+ setRef(refs[i], null);
2698
+ }
2699
+ }
2700
+ };
2701
+ }
2702
+ };
2703
+ }
2704
+ var Slot = React__namespace.forwardRef((props, forwardedRef) => {
2705
+ const { children, ...slotProps } = props;
2706
+ const childrenArray = React__namespace.Children.toArray(children);
2707
+ const slottable = childrenArray.find(isSlottable);
2708
+ if (slottable) {
2709
+ const newElement = slottable.props.children;
2710
+ const newChildren = childrenArray.map((child) => {
2711
+ if (child === slottable) {
2712
+ if (React__namespace.Children.count(newElement) > 1) return React__namespace.Children.only(null);
2713
+ return React__namespace.isValidElement(newElement) ? newElement.props.children : null;
2714
+ } else {
2715
+ return child;
2716
+ }
2717
+ });
2718
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React__namespace.isValidElement(newElement) ? React__namespace.cloneElement(newElement, void 0, newChildren) : null });
2719
+ }
2720
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
2721
+ });
2722
+ Slot.displayName = "Slot";
2723
+ var SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
2724
+ const { children, ...slotProps } = props;
2725
+ if (React__namespace.isValidElement(children)) {
2726
+ const childrenRef = getElementRef(children);
2727
+ return React__namespace.cloneElement(children, {
2728
+ ...mergeProps(slotProps, children.props),
2729
+ // @ts-ignore
2730
+ ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
2731
+ });
2732
+ }
2733
+ return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
2734
+ });
2735
+ SlotClone.displayName = "SlotClone";
2736
+ var Slottable = ({ children }) => {
2737
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
2738
+ };
2739
+ function isSlottable(child) {
2740
+ return React__namespace.isValidElement(child) && child.type === Slottable;
2741
+ }
2742
+ function mergeProps(slotProps, childProps) {
2743
+ const overrideProps = { ...childProps };
2744
+ for (const propName in childProps) {
2745
+ const slotPropValue = slotProps[propName];
2746
+ const childPropValue = childProps[propName];
2747
+ const isHandler = /^on[A-Z]/.test(propName);
2748
+ if (isHandler) {
2749
+ if (slotPropValue && childPropValue) {
2750
+ overrideProps[propName] = (...args) => {
2751
+ childPropValue(...args);
2752
+ slotPropValue(...args);
2753
+ };
2754
+ } else if (slotPropValue) {
2755
+ overrideProps[propName] = slotPropValue;
2756
+ }
2757
+ } else if (propName === "style") {
2758
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
2759
+ } else if (propName === "className") {
2760
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
2761
+ }
2762
+ }
2763
+ return { ...slotProps, ...overrideProps };
2764
+ }
2765
+ function getElementRef(element) {
2766
+ var _a, _b;
2767
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
2768
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2769
+ if (mayWarn) {
2770
+ return element.ref;
2771
+ }
2772
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
2773
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2774
+ if (mayWarn) {
2775
+ return element.props.ref;
2776
+ }
2777
+ return element.props.ref || element.ref;
2778
+ }
2779
+ var Root = Slot;
2780
+ const badgeColorVariants = cva({
2781
+ variants: {
2782
+ color: {
2783
+ green: "bg-ui-tag-green-bg text-ui-tag-green-text [&_svg]:text-ui-tag-green-icon border-ui-tag-green-border",
2784
+ red: "bg-ui-tag-red-bg text-ui-tag-red-text [&_svg]:text-ui-tag-red-icon border-ui-tag-red-border",
2785
+ blue: "bg-ui-tag-blue-bg text-ui-tag-blue-text [&_svg]:text-ui-tag-blue-icon border-ui-tag-blue-border",
2786
+ orange: "bg-ui-tag-orange-bg text-ui-tag-orange-text [&_svg]:text-ui-tag-orange-icon border-ui-tag-orange-border",
2787
+ grey: "bg-ui-tag-neutral-bg text-ui-tag-neutral-text [&_svg]:text-ui-tag-neutral-icon border-ui-tag-neutral-border",
2788
+ purple: "bg-ui-tag-purple-bg text-ui-tag-purple-text [&_svg]:text-ui-tag-purple-icon border-ui-tag-purple-border"
2789
+ }
2790
+ },
2791
+ defaultVariants: {
2792
+ color: "grey"
2793
+ }
2794
+ });
2795
+ const badgeSizeVariants = cva({
2796
+ base: "inline-flex items-center gap-x-0.5 border box-border",
2797
+ variants: {
2798
+ size: {
2799
+ "2xsmall": "txt-compact-xsmall-plus h-5",
2800
+ xsmall: "txt-compact-xsmall-plus py-px h-6",
2801
+ small: "txt-compact-xsmall-plus py-[3px] h-7",
2802
+ base: "txt-compact-small-plus py-[5px] h-8",
2803
+ large: "txt-compact-medium-plus py-[7px] h-10"
2804
+ },
2805
+ rounded: {
2806
+ base: "rounded-md",
2807
+ full: "rounded-full"
2808
+ }
2809
+ },
2810
+ compoundVariants: [
2811
+ {
2812
+ size: "2xsmall",
2813
+ rounded: "full",
2814
+ className: "px-1.5"
2815
+ },
2816
+ {
2817
+ size: "2xsmall",
2818
+ rounded: "base",
2819
+ className: "px-1"
2820
+ },
2821
+ {
2822
+ size: "xsmall",
2823
+ rounded: "full",
2824
+ className: "px-2"
2825
+ },
2826
+ {
2827
+ size: "xsmall",
2828
+ rounded: "base",
2829
+ className: "px-1.5"
2830
+ },
2831
+ {
2832
+ size: "small",
2833
+ rounded: "full",
2834
+ className: "px-2.5"
2835
+ },
2836
+ {
2837
+ size: "small",
2838
+ rounded: "base",
2839
+ className: "px-2"
2840
+ },
2841
+ {
2842
+ size: "base",
2843
+ rounded: "full",
2844
+ className: "px-3"
2845
+ },
2846
+ {
2847
+ size: "base",
2848
+ rounded: "base",
2849
+ className: "px-2.5"
2850
+ },
2851
+ {
2852
+ size: "large",
2853
+ rounded: "full",
2854
+ className: "px-3.5"
2855
+ },
2856
+ {
2857
+ size: "large",
2858
+ rounded: "base",
2859
+ className: "px-3"
2860
+ }
2861
+ ],
2862
+ defaultVariants: {
2863
+ size: "base",
2864
+ rounded: "base"
2865
+ }
2866
+ });
2867
+ const Badge = React__namespace.forwardRef(({
2868
+ className,
2869
+ /**
2870
+ * The badge's size.
2871
+ */
2872
+ size = "base",
2873
+ /**
2874
+ * The style of the badge's border radius.
2875
+ */
2876
+ rounded = "base",
2877
+ /**
2878
+ * The badge's color.
2879
+ */
2880
+ color = "grey",
2881
+ /**
2882
+ * Whether to remove the wrapper `span` element and use the
2883
+ * passed child element instead.
2884
+ */
2885
+ asChild = false,
2886
+ ...props
2887
+ }, ref) => {
2888
+ const Component = asChild ? Root : "span";
2889
+ return React__namespace.createElement(Component, { ref, className: clx(badgeColorVariants({ color }), badgeSizeVariants({ size, rounded }), className), ...props });
2890
+ });
2891
+ Badge.displayName = "Badge";
2892
+ const buttonVariants = cva({
2893
+ base: clx("transition-fg relative inline-flex w-fit items-center justify-center overflow-hidden rounded-md outline-none", "disabled:bg-ui-bg-disabled disabled:border-ui-border-base disabled:text-ui-fg-disabled disabled:shadow-buttons-neutral disabled:after:hidden", "after:transition-fg after:absolute after:inset-0 after:content-['']"),
2894
+ variants: {
2895
+ variant: {
2896
+ primary: clx("shadow-buttons-inverted text-ui-contrast-fg-primary bg-ui-button-inverted after:button-inverted-gradient", "hover:bg-ui-button-inverted-hover hover:after:button-inverted-hover-gradient", "active:bg-ui-button-inverted-pressed active:after:button-inverted-pressed-gradient", "focus-visible:!shadow-buttons-inverted-focus"),
2897
+ secondary: clx("shadow-buttons-neutral text-ui-fg-base bg-ui-button-neutral after:button-neutral-gradient", "hover:bg-ui-button-neutral-hover hover:after:button-neutral-hover-gradient", "active:bg-ui-button-neutral-pressed active:after:button-neutral-pressed-gradient", "focus-visible:shadow-buttons-neutral-focus"),
2898
+ transparent: clx("after:hidden", "text-ui-fg-base bg-ui-button-transparent", "hover:bg-ui-button-transparent-hover", "active:bg-ui-button-transparent-pressed", "focus-visible:shadow-buttons-neutral-focus focus-visible:bg-ui-bg-base", "disabled:!bg-transparent disabled:!shadow-none"),
2899
+ danger: clx("shadow-buttons-colored shadow-buttons-danger text-ui-fg-on-color bg-ui-button-danger after:button-danger-gradient", "hover:bg-ui-button-danger-hover hover:after:button-danger-hover-gradient", "active:bg-ui-button-danger-pressed active:after:button-danger-pressed-gradient", "focus-visible:shadow-buttons-danger-focus")
2900
+ },
2901
+ size: {
2902
+ small: "txt-compact-small-plus gap-x-1.5 px-2 py-1",
2903
+ base: "txt-compact-small-plus gap-x-1.5 px-3 py-1.5",
2904
+ large: "txt-compact-medium-plus gap-x-1.5 px-4 py-2.5",
2905
+ xlarge: "txt-compact-large-plus gap-x-1.5 px-5 py-3.5"
2906
+ }
2907
+ },
2908
+ defaultVariants: {
2909
+ size: "base",
2910
+ variant: "primary"
2911
+ }
2912
+ });
2913
+ const Button = React__namespace.forwardRef(({
2914
+ /**
2915
+ * The button's style.
2916
+ */
2917
+ variant = "primary",
2918
+ /**
2919
+ * The button's size.
2920
+ */
2921
+ size = "base",
2922
+ className,
2923
+ /**
2924
+ * Whether to remove the wrapper `button` element and use the
2925
+ * passed child element instead.
2926
+ */
2927
+ asChild = false,
2928
+ children,
2929
+ /**
2930
+ * Whether to show a loading spinner.
2931
+ */
2932
+ isLoading = false,
2933
+ disabled,
2934
+ ...props
2935
+ }, ref) => {
2936
+ const Component = asChild ? Root : "button";
2937
+ const renderInner = () => {
2938
+ if (isLoading) {
2939
+ return React__namespace.createElement(
2940
+ "span",
2941
+ { className: "pointer-events-none" },
2942
+ React__namespace.createElement(
2943
+ "div",
2944
+ { className: clx("bg-ui-bg-disabled absolute inset-0 flex items-center justify-center rounded-md") },
2945
+ React__namespace.createElement(Spinner, { className: "animate-spin" })
2946
+ ),
2947
+ children
2948
+ );
2949
+ }
2950
+ return children;
2951
+ };
2952
+ return React__namespace.createElement(Component, { ref, ...props, className: clx(buttonVariants({ variant, size }), className), disabled: disabled || isLoading }, renderInner());
2953
+ });
2954
+ Button.displayName = "Button";
2955
+ const Container = React__namespace.forwardRef(({ className, ...props }, ref) => {
2956
+ return React__namespace.createElement("div", { ref, className: clx("shadow-elevation-card-rest bg-ui-bg-base w-full rounded-lg px-6 py-4", className), ...props });
2957
+ });
2958
+ Container.displayName = "Container";
2959
+ const textVariants = cva({
2960
+ variants: {
2961
+ size: {
2962
+ xsmall: "",
2963
+ small: "",
2964
+ base: "",
2965
+ large: "",
2966
+ xlarge: ""
2967
+ },
2968
+ weight: {
2969
+ regular: "font-normal",
2970
+ plus: "font-medium"
2971
+ },
2972
+ family: {
2973
+ sans: "font-sans",
2974
+ mono: "font-mono"
2975
+ },
2976
+ leading: {
2977
+ normal: "",
2978
+ compact: ""
2979
+ }
2980
+ },
2981
+ defaultVariants: {
2982
+ family: "sans",
2983
+ size: "base",
2984
+ weight: "regular",
2985
+ leading: "normal"
2986
+ },
2987
+ compoundVariants: [
2988
+ {
2989
+ size: "xsmall",
2990
+ leading: "normal",
2991
+ className: "txt-xsmall"
2992
+ },
2993
+ {
2994
+ size: "xsmall",
2995
+ leading: "compact",
2996
+ className: "txt-compact-xsmall"
2997
+ },
2998
+ {
2999
+ size: "small",
3000
+ leading: "normal",
3001
+ className: "txt-small"
3002
+ },
3003
+ {
3004
+ size: "small",
3005
+ leading: "compact",
3006
+ className: "txt-compact-small"
3007
+ },
3008
+ {
3009
+ size: "base",
3010
+ leading: "normal",
3011
+ className: "txt-medium"
3012
+ },
3013
+ {
3014
+ size: "base",
3015
+ leading: "compact",
3016
+ className: "txt-compact-medium"
3017
+ },
3018
+ {
3019
+ size: "large",
3020
+ leading: "normal",
3021
+ className: "txt-large"
3022
+ },
3023
+ {
3024
+ size: "large",
3025
+ leading: "compact",
3026
+ className: "txt-compact-large"
3027
+ },
3028
+ {
3029
+ size: "xlarge",
3030
+ leading: "normal",
3031
+ className: "txt-xlarge"
3032
+ },
3033
+ {
3034
+ size: "xlarge",
3035
+ leading: "compact",
3036
+ className: "txt-compact-xlarge"
3037
+ }
3038
+ ]
3039
+ });
3040
+ const Text = React__namespace.forwardRef(({
3041
+ className,
3042
+ /**
3043
+ * Whether to remove the wrapper `button` element and use the
3044
+ * passed child element instead.
3045
+ */
3046
+ asChild = false,
3047
+ /**
3048
+ * The wrapper element to use when `asChild` is disabled.
3049
+ */
3050
+ as = "p",
3051
+ /**
3052
+ * The text's size.
3053
+ */
3054
+ size = "base",
3055
+ /**
3056
+ * The text's font weight.
3057
+ */
3058
+ weight = "regular",
3059
+ /**
3060
+ * The text's font family.
3061
+ */
3062
+ family = "sans",
3063
+ /**
3064
+ * The text's line height.
3065
+ */
3066
+ leading = "normal",
3067
+ children,
3068
+ ...props
3069
+ }, ref) => {
3070
+ const Component = asChild ? Root : as;
3071
+ return React__namespace.createElement(Component, { ref, className: clx(textVariants({ size, weight, family, leading }), className), ...props }, children);
3072
+ });
3073
+ Text.displayName = "Text";
3074
+ const headingVariants = cva({
3075
+ base: "font-sans font-medium",
3076
+ variants: {
3077
+ level: {
3078
+ h1: "h1-core",
3079
+ h2: "h2-core",
3080
+ h3: "h3-core"
3081
+ }
3082
+ },
3083
+ defaultVariants: {
3084
+ level: "h1"
3085
+ }
3086
+ });
3087
+ const Heading = ({
3088
+ /**
3089
+ * The heading level which specifies which heading element is used.
3090
+ */
3091
+ level = "h1",
3092
+ className,
3093
+ ...props
3094
+ }) => {
3095
+ const Component = level || "h1";
3096
+ return React__namespace.createElement(Component, { className: clx(headingVariants({ level }), className), ...props });
3097
+ };
3098
+ const getStatusBadgeClass = (status) => {
3099
+ const s = status.toLowerCase();
3100
+ if (s === "pending") return "bg-ui-tag-orange-bg text-ui-tag-orange-text";
3101
+ if (s === "confirmed") return "bg-ui-tag-red-bg text-ui-tag-red-text";
3102
+ if (s === "cancelled") return "bg-ui-tag-grey-bg text-ui-tag-grey-text";
3103
+ if (s === "completed") return "bg-ui-tag-green-bg text-ui-tag-green-text";
3104
+ return "bg-ui-tag-purple-bg text-ui-tag-purple-text";
3105
+ };
3106
+ const AccountDeletionRequestsPage = () => {
3107
+ const [items, setItems] = React.useState([]);
3108
+ const [statusFilter, setStatusFilter] = React.useState("all");
3109
+ const [isLoading, setIsLoading] = React.useState(true);
3110
+ const [isFetchingMore, setIsFetchingMore] = React.useState(false);
3111
+ const [error, setError] = React.useState(null);
3112
+ const [offset, setOffset] = React.useState(0);
3113
+ const [count, setCount] = React.useState(0);
3114
+ const limit = 50;
3115
+ const loadRequests = React.useCallback(
3116
+ async (nextOffset, replace = false) => {
3117
+ var _a;
3118
+ try {
3119
+ if (replace) setIsLoading(true);
3120
+ else setIsFetchingMore(true);
3121
+ setError(null);
3122
+ const params = new URLSearchParams();
3123
+ params.set("limit", String(limit));
3124
+ params.set("offset", String(nextOffset));
3125
+ if (statusFilter !== "all") params.set("status", statusFilter);
3126
+ params.set("order", "created_at");
3127
+ params.set("order_direction", "DESC");
3128
+ const response = await fetch(
3129
+ `/admin/account-deletion-requests?${params.toString()}`,
3130
+ { credentials: "include" }
3131
+ );
3132
+ if (!response.ok) {
3133
+ const message = await response.text();
3134
+ throw new Error(message || "Unable to load account deletion requests");
3135
+ }
3136
+ const payload = await response.json();
3137
+ setCount(payload.count ?? 0);
3138
+ setOffset(nextOffset + (((_a = payload.requests) == null ? void 0 : _a.length) ?? 0));
3139
+ setItems(
3140
+ (prev) => replace ? payload.requests ?? [] : [...prev, ...payload.requests ?? []]
3141
+ );
3142
+ } catch (e) {
3143
+ setError(
3144
+ e instanceof Error ? e.message : "Unable to load account deletion requests"
3145
+ );
3146
+ } finally {
3147
+ setIsLoading(false);
3148
+ setIsFetchingMore(false);
3149
+ }
3150
+ },
3151
+ [statusFilter]
3152
+ );
3153
+ React.useEffect(() => {
3154
+ void loadRequests(0, true);
3155
+ }, [loadRequests]);
3156
+ const hasMore = offset < count;
3157
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full p-6", children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: "mx-auto flex w-full max-w-7xl flex-col gap-6 p-6", children: [
3158
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
3159
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
3160
+ /* @__PURE__ */ jsxRuntime.jsx(Heading, { level: "h1", children: "Account Deletion Requests" }),
3161
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "small", className: "text-ui-fg-subtle", children: "View customer account deletion requests (read-only)" })
3162
+ ] }),
3163
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "secondary", onClick: () => loadRequests(0, true), children: "Refresh" })
3164
+ ] }),
3165
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3 md:flex-row md:items-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
3166
+ "select",
3167
+ {
3168
+ value: statusFilter,
3169
+ onChange: (e) => setStatusFilter(e.target.value),
3170
+ className: "h-9 rounded-md border border-ui-border-base bg-transparent px-3 text-sm text-ui-fg-base outline-none transition focus:ring-2 focus:ring-ui-fg-interactive md:max-w-xs",
3171
+ children: [
3172
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: "All statuses" }),
3173
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "pending", children: "Pending" }),
3174
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "confirmed", children: "Confirmed" }),
3175
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "cancelled", children: "Cancelled" }),
3176
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "completed", children: "Completed" })
3177
+ ]
3178
+ }
3179
+ ) }),
3180
+ error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-ui-border-strong p-6 text-center", children: [
3181
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { weight: "plus", className: "text-ui-fg-error", children: error }),
3182
+ /* @__PURE__ */ jsxRuntime.jsx(
3183
+ Button,
3184
+ {
3185
+ variant: "secondary",
3186
+ className: "mt-4",
3187
+ onClick: () => loadRequests(0, true),
3188
+ children: "Try again"
3189
+ }
3190
+ )
3191
+ ] }) : null,
3192
+ isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { children: "Loading account deletion requests..." }) }) : items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-dashed border-ui-border-strong p-10 text-center", children: [
3193
+ /* @__PURE__ */ jsxRuntime.jsx(Heading, { level: "h3", children: "No account deletion requests" }),
3194
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "small", className: "text-ui-fg-subtle", children: "Requests from the storefront will appear here." })
3195
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-xl border border-ui-border-base", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-ui-border-base", children: [
3196
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-ui-bg-subtle", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
3197
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-ui-fg-muted", children: "ID" }),
3198
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-ui-fg-muted", children: "Customer ID" }),
3199
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-ui-fg-muted", children: "Reason" }),
3200
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-ui-fg-muted", children: "Deletion scheduled" }),
3201
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-ui-fg-muted", children: "Status" }),
3202
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-ui-fg-muted", children: "Cancelled at" }),
3203
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-ui-fg-muted", children: "Created" })
3204
+ ] }) }),
3205
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-ui-border-subtle", children: items.map((row) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "hover:bg-ui-bg-subtle/60", children: [
3206
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-4 font-mono text-xs text-ui-fg-subtle", children: row.id }),
3207
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-4 font-medium text-ui-fg-base", children: row.customer_id }),
3208
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "max-w-xs truncate px-4 py-4 text-ui-fg-subtle", children: row.reason ?? "—" }),
3209
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-4 text-ui-fg-subtle", children: row.deletion_scheduled_at ? new Date(row.deletion_scheduled_at).toLocaleString() : "—" }),
3210
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-4", children: /* @__PURE__ */ jsxRuntime.jsx(
3211
+ Badge,
3212
+ {
3213
+ size: "2xsmall",
3214
+ className: getStatusBadgeClass(row.status),
3215
+ children: row.status
3216
+ }
3217
+ ) }),
3218
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-4 text-ui-fg-subtle", children: row.cancelled_at ? new Date(row.cancelled_at).toLocaleString() : "—" }),
3219
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-4 text-ui-fg-subtle", children: new Date(row.created_at).toLocaleString() })
3220
+ ] }, row.id)) })
3221
+ ] }) }),
3222
+ hasMore ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
3223
+ Button,
3224
+ {
3225
+ variant: "secondary",
3226
+ isLoading: isFetchingMore,
3227
+ onClick: () => loadRequests(offset, false),
3228
+ children: "Load more"
3229
+ }
3230
+ ) }) : null
3231
+ ] }) });
3232
+ };
3233
+ const config = adminSdk.defineRouteConfig({
3234
+ label: "Account Deletion Requests",
3235
+ icon: Trash
3236
+ });
2
3237
  const widgetModule = { widgets: [] };
3
3238
  const routeModule = {
4
- routes: []
3239
+ routes: [
3240
+ {
3241
+ Component: AccountDeletionRequestsPage,
3242
+ path: "/account-deletion-requests"
3243
+ }
3244
+ ]
5
3245
  };
6
3246
  const menuItemModule = {
7
- menuItems: []
3247
+ menuItems: [
3248
+ {
3249
+ label: config.label,
3250
+ icon: config.icon,
3251
+ path: "/account-deletion-requests",
3252
+ nested: void 0
3253
+ }
3254
+ ]
8
3255
  };
9
3256
  const formModule = { customFields: {} };
10
3257
  const displayModule = {