@machinemetrics/mm-react-components 0.1.1-1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +218 -0
  3. package/dist/App.d.ts +3 -0
  4. package/dist/App.d.ts.map +1 -0
  5. package/dist/components/ui/button.d.ts +23 -0
  6. package/dist/components/ui/button.d.ts.map +1 -0
  7. package/dist/components/ui/checkbox.d.ts +17 -0
  8. package/dist/components/ui/checkbox.d.ts.map +1 -0
  9. package/dist/components/ui/input.d.ts +18 -0
  10. package/dist/components/ui/input.d.ts.map +1 -0
  11. package/dist/components/ui/label.d.ts +14 -0
  12. package/dist/components/ui/label.d.ts.map +1 -0
  13. package/dist/components/ui/radio-group.d.ts +25 -0
  14. package/dist/components/ui/radio-group.d.ts.map +1 -0
  15. package/dist/index.d.ts +8 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/lib/theme-utils.d.ts +104 -0
  18. package/dist/lib/theme-utils.d.ts.map +1 -0
  19. package/dist/lib/utils.d.ts +3 -0
  20. package/dist/lib/utils.d.ts.map +1 -0
  21. package/dist/main.d.ts +3 -0
  22. package/dist/main.d.ts.map +1 -0
  23. package/dist/mm-react-components.es.js +4873 -26
  24. package/dist/mm-react-components.es.js.map +1 -0
  25. package/dist/mm-react-components.umd.js +36 -1
  26. package/dist/mm-react-components.umd.js.map +1 -0
  27. package/dist/preview/ButtonPreview.d.ts +2 -0
  28. package/dist/preview/ButtonPreview.d.ts.map +1 -0
  29. package/dist/preview/CheckboxPreview.d.ts +2 -0
  30. package/dist/preview/CheckboxPreview.d.ts.map +1 -0
  31. package/dist/preview/InputPreview.d.ts +2 -0
  32. package/dist/preview/InputPreview.d.ts.map +1 -0
  33. package/dist/preview/LabelPreview.d.ts +2 -0
  34. package/dist/preview/LabelPreview.d.ts.map +1 -0
  35. package/dist/preview/RadioGroupPreview.d.ts +2 -0
  36. package/dist/preview/RadioGroupPreview.d.ts.map +1 -0
  37. package/package.json +88 -15
@@ -1,29 +1,4876 @@
1
- import { Tr as s, Td as l, Link as m } from "@chakra-ui/react";
2
- import e, { createContext as d, useContext as p } from "react";
3
- import { Link as k } from "react-router-dom";
4
- const c = d(), L = ({
5
- url: t,
6
- children: r,
7
- isExternal: n,
8
- as: o,
9
- asFlyout: a,
10
- ...i
11
- }) => /* @__PURE__ */ e.createElement(c.Provider, { value: { url: t, isExternal: n, as: o, asFlyout: a } }, /* @__PURE__ */ e.createElement(s, { ...i }, r)), T = ({ children: t, ...r }) => {
12
- const { url: n, isExternal: o, as: a, asFlyout: i } = p(c);
13
- return /* @__PURE__ */ e.createElement(l, { ...r, padding: 0 }, /* @__PURE__ */ e.createElement(
14
- m,
15
- {
16
- as: a || k,
17
- to: n,
18
- display: "block",
19
- padding: 4,
20
- isExternal: o,
21
- asFlyout: i
22
- },
23
- t
24
- ));
1
+ import * as React from "react";
2
+ import React__default, { forwardRef, createElement } from "react";
3
+ import "react-dom";
4
+ function r(e) {
5
+ var t, f, n = "";
6
+ if ("string" == typeof e || "number" == typeof e) n += e;
7
+ else if ("object" == typeof e) if (Array.isArray(e)) {
8
+ var o = e.length;
9
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
10
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
11
+ return n;
12
+ }
13
+ function clsx() {
14
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
15
+ return n;
16
+ }
17
+ const CLASS_PART_SEPARATOR = "-";
18
+ const createClassGroupUtils = (config) => {
19
+ const classMap = createClassMap(config);
20
+ const {
21
+ conflictingClassGroups,
22
+ conflictingClassGroupModifiers
23
+ } = config;
24
+ const getClassGroupId = (className) => {
25
+ const classParts = className.split(CLASS_PART_SEPARATOR);
26
+ if (classParts[0] === "" && classParts.length !== 1) {
27
+ classParts.shift();
28
+ }
29
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
30
+ };
31
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
32
+ const conflicts = conflictingClassGroups[classGroupId] || [];
33
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
34
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
35
+ }
36
+ return conflicts;
37
+ };
38
+ return {
39
+ getClassGroupId,
40
+ getConflictingClassGroupIds
41
+ };
25
42
  };
43
+ const getGroupRecursive = (classParts, classPartObject) => {
44
+ if (classParts.length === 0) {
45
+ return classPartObject.classGroupId;
46
+ }
47
+ const currentClassPart = classParts[0];
48
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
49
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
50
+ if (classGroupFromNextClassPart) {
51
+ return classGroupFromNextClassPart;
52
+ }
53
+ if (classPartObject.validators.length === 0) {
54
+ return void 0;
55
+ }
56
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
57
+ return classPartObject.validators.find(({
58
+ validator
59
+ }) => validator(classRest))?.classGroupId;
60
+ };
61
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
62
+ const getGroupIdForArbitraryProperty = (className) => {
63
+ if (arbitraryPropertyRegex.test(className)) {
64
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
65
+ const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
66
+ if (property) {
67
+ return "arbitrary.." + property;
68
+ }
69
+ }
70
+ };
71
+ const createClassMap = (config) => {
72
+ const {
73
+ theme,
74
+ classGroups
75
+ } = config;
76
+ const classMap = {
77
+ nextPart: /* @__PURE__ */ new Map(),
78
+ validators: []
79
+ };
80
+ for (const classGroupId in classGroups) {
81
+ processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
82
+ }
83
+ return classMap;
84
+ };
85
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
86
+ classGroup.forEach((classDefinition) => {
87
+ if (typeof classDefinition === "string") {
88
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
89
+ classPartObjectToEdit.classGroupId = classGroupId;
90
+ return;
91
+ }
92
+ if (typeof classDefinition === "function") {
93
+ if (isThemeGetter(classDefinition)) {
94
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
95
+ return;
96
+ }
97
+ classPartObject.validators.push({
98
+ validator: classDefinition,
99
+ classGroupId
100
+ });
101
+ return;
102
+ }
103
+ Object.entries(classDefinition).forEach(([key, classGroup2]) => {
104
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
105
+ });
106
+ });
107
+ };
108
+ const getPart = (classPartObject, path) => {
109
+ let currentClassPartObject = classPartObject;
110
+ path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
111
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
112
+ currentClassPartObject.nextPart.set(pathPart, {
113
+ nextPart: /* @__PURE__ */ new Map(),
114
+ validators: []
115
+ });
116
+ }
117
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
118
+ });
119
+ return currentClassPartObject;
120
+ };
121
+ const isThemeGetter = (func) => func.isThemeGetter;
122
+ const createLruCache = (maxCacheSize) => {
123
+ if (maxCacheSize < 1) {
124
+ return {
125
+ get: () => void 0,
126
+ set: () => {
127
+ }
128
+ };
129
+ }
130
+ let cacheSize = 0;
131
+ let cache = /* @__PURE__ */ new Map();
132
+ let previousCache = /* @__PURE__ */ new Map();
133
+ const update = (key, value) => {
134
+ cache.set(key, value);
135
+ cacheSize++;
136
+ if (cacheSize > maxCacheSize) {
137
+ cacheSize = 0;
138
+ previousCache = cache;
139
+ cache = /* @__PURE__ */ new Map();
140
+ }
141
+ };
142
+ return {
143
+ get(key) {
144
+ let value = cache.get(key);
145
+ if (value !== void 0) {
146
+ return value;
147
+ }
148
+ if ((value = previousCache.get(key)) !== void 0) {
149
+ update(key, value);
150
+ return value;
151
+ }
152
+ },
153
+ set(key, value) {
154
+ if (cache.has(key)) {
155
+ cache.set(key, value);
156
+ } else {
157
+ update(key, value);
158
+ }
159
+ }
160
+ };
161
+ };
162
+ const IMPORTANT_MODIFIER = "!";
163
+ const MODIFIER_SEPARATOR = ":";
164
+ const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
165
+ const createParseClassName = (config) => {
166
+ const {
167
+ prefix,
168
+ experimentalParseClassName
169
+ } = config;
170
+ let parseClassName = (className) => {
171
+ const modifiers = [];
172
+ let bracketDepth = 0;
173
+ let parenDepth = 0;
174
+ let modifierStart = 0;
175
+ let postfixModifierPosition;
176
+ for (let index = 0; index < className.length; index++) {
177
+ let currentCharacter = className[index];
178
+ if (bracketDepth === 0 && parenDepth === 0) {
179
+ if (currentCharacter === MODIFIER_SEPARATOR) {
180
+ modifiers.push(className.slice(modifierStart, index));
181
+ modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
182
+ continue;
183
+ }
184
+ if (currentCharacter === "/") {
185
+ postfixModifierPosition = index;
186
+ continue;
187
+ }
188
+ }
189
+ if (currentCharacter === "[") {
190
+ bracketDepth++;
191
+ } else if (currentCharacter === "]") {
192
+ bracketDepth--;
193
+ } else if (currentCharacter === "(") {
194
+ parenDepth++;
195
+ } else if (currentCharacter === ")") {
196
+ parenDepth--;
197
+ }
198
+ }
199
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
200
+ const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
201
+ const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
202
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
203
+ return {
204
+ modifiers,
205
+ hasImportantModifier,
206
+ baseClassName,
207
+ maybePostfixModifierPosition
208
+ };
209
+ };
210
+ if (prefix) {
211
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
212
+ const parseClassNameOriginal = parseClassName;
213
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
214
+ isExternal: true,
215
+ modifiers: [],
216
+ hasImportantModifier: false,
217
+ baseClassName: className,
218
+ maybePostfixModifierPosition: void 0
219
+ };
220
+ }
221
+ if (experimentalParseClassName) {
222
+ const parseClassNameOriginal = parseClassName;
223
+ parseClassName = (className) => experimentalParseClassName({
224
+ className,
225
+ parseClassName: parseClassNameOriginal
226
+ });
227
+ }
228
+ return parseClassName;
229
+ };
230
+ const stripImportantModifier = (baseClassName) => {
231
+ if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
232
+ return baseClassName.substring(0, baseClassName.length - 1);
233
+ }
234
+ if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
235
+ return baseClassName.substring(1);
236
+ }
237
+ return baseClassName;
238
+ };
239
+ const createSortModifiers = (config) => {
240
+ const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map((modifier) => [modifier, true]));
241
+ const sortModifiers = (modifiers) => {
242
+ if (modifiers.length <= 1) {
243
+ return modifiers;
244
+ }
245
+ const sortedModifiers = [];
246
+ let unsortedModifiers = [];
247
+ modifiers.forEach((modifier) => {
248
+ const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
249
+ if (isPositionSensitive) {
250
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
251
+ unsortedModifiers = [];
252
+ } else {
253
+ unsortedModifiers.push(modifier);
254
+ }
255
+ });
256
+ sortedModifiers.push(...unsortedModifiers.sort());
257
+ return sortedModifiers;
258
+ };
259
+ return sortModifiers;
260
+ };
261
+ const createConfigUtils = (config) => ({
262
+ cache: createLruCache(config.cacheSize),
263
+ parseClassName: createParseClassName(config),
264
+ sortModifiers: createSortModifiers(config),
265
+ ...createClassGroupUtils(config)
266
+ });
267
+ const SPLIT_CLASSES_REGEX = /\s+/;
268
+ const mergeClassList = (classList, configUtils) => {
269
+ const {
270
+ parseClassName,
271
+ getClassGroupId,
272
+ getConflictingClassGroupIds,
273
+ sortModifiers
274
+ } = configUtils;
275
+ const classGroupsInConflict = [];
276
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
277
+ let result = "";
278
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
279
+ const originalClassName = classNames[index];
280
+ const {
281
+ isExternal,
282
+ modifiers,
283
+ hasImportantModifier,
284
+ baseClassName,
285
+ maybePostfixModifierPosition
286
+ } = parseClassName(originalClassName);
287
+ if (isExternal) {
288
+ result = originalClassName + (result.length > 0 ? " " + result : result);
289
+ continue;
290
+ }
291
+ let hasPostfixModifier = !!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 config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
359
+ configUtils = createConfigUtils(config);
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 = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
384
+ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
385
+ const fractionRegex = /^\d+\/\d+$/;
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)|color-mix)\(.+\)$/;
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 isFraction = (value) => fractionRegex.test(value);
392
+ const isNumber = (value) => !!value && !Number.isNaN(Number(value));
393
+ const isInteger = (value) => !!value && Number.isInteger(Number(value));
394
+ const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
395
+ const isTshirtSize = (value) => tshirtUnitRegex.test(value);
396
+ const isAny = () => true;
397
+ const isLengthOnly = (value) => (
398
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
399
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
400
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
401
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
402
+ );
403
+ const isNever = () => false;
404
+ const isShadow = (value) => shadowRegex.test(value);
405
+ const isImage = (value) => imageRegex.test(value);
406
+ const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
407
+ const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
408
+ const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
409
+ const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
410
+ const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
411
+ const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
412
+ const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
413
+ const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
414
+ const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
415
+ const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
416
+ const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
417
+ const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
418
+ const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
419
+ const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
420
+ const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
421
+ const getIsArbitraryValue = (value, testLabel, testValue) => {
422
+ const result = arbitraryValueRegex.exec(value);
423
+ if (result) {
424
+ if (result[1]) {
425
+ return testLabel(result[1]);
426
+ }
427
+ return testValue(result[2]);
428
+ }
429
+ return false;
430
+ };
431
+ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
432
+ const result = arbitraryVariableRegex.exec(value);
433
+ if (result) {
434
+ if (result[1]) {
435
+ return testLabel(result[1]);
436
+ }
437
+ return shouldMatchNoLabel;
438
+ }
439
+ return false;
440
+ };
441
+ const isLabelPosition = (label) => label === "position" || label === "percentage";
442
+ const isLabelImage = (label) => label === "image" || label === "url";
443
+ const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
444
+ const isLabelLength = (label) => label === "length";
445
+ const isLabelNumber = (label) => label === "number";
446
+ const isLabelFamilyName = (label) => label === "family-name";
447
+ const isLabelShadow = (label) => label === "shadow";
448
+ const getDefaultConfig = () => {
449
+ const themeColor = fromTheme("color");
450
+ const themeFont = fromTheme("font");
451
+ const themeText = fromTheme("text");
452
+ const themeFontWeight = fromTheme("font-weight");
453
+ const themeTracking = fromTheme("tracking");
454
+ const themeLeading = fromTheme("leading");
455
+ const themeBreakpoint = fromTheme("breakpoint");
456
+ const themeContainer = fromTheme("container");
457
+ const themeSpacing = fromTheme("spacing");
458
+ const themeRadius = fromTheme("radius");
459
+ const themeShadow = fromTheme("shadow");
460
+ const themeInsetShadow = fromTheme("inset-shadow");
461
+ const themeTextShadow = fromTheme("text-shadow");
462
+ const themeDropShadow = fromTheme("drop-shadow");
463
+ const themeBlur = fromTheme("blur");
464
+ const themePerspective = fromTheme("perspective");
465
+ const themeAspect = fromTheme("aspect");
466
+ const themeEase = fromTheme("ease");
467
+ const themeAnimate = fromTheme("animate");
468
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
469
+ const scalePosition = () => [
470
+ "center",
471
+ "top",
472
+ "bottom",
473
+ "left",
474
+ "right",
475
+ "top-left",
476
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
477
+ "left-top",
478
+ "top-right",
479
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
480
+ "right-top",
481
+ "bottom-right",
482
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
483
+ "right-bottom",
484
+ "bottom-left",
485
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
486
+ "left-bottom"
487
+ ];
488
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
489
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
490
+ const scaleOverscroll = () => ["auto", "contain", "none"];
491
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
492
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
493
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
494
+ const scaleGridColRowStartAndEnd = () => ["auto", {
495
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
496
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
497
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
498
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
499
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
500
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
501
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
502
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
503
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
504
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
505
+ position: [isArbitraryVariable, isArbitraryValue]
506
+ }];
507
+ const scaleBgRepeat = () => ["no-repeat", {
508
+ repeat: ["", "x", "y", "space", "round"]
509
+ }];
510
+ const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
511
+ size: [isArbitraryVariable, isArbitraryValue]
512
+ }];
513
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
514
+ const scaleRadius = () => [
515
+ // Deprecated since Tailwind CSS v4.0.0
516
+ "",
517
+ "none",
518
+ "full",
519
+ themeRadius,
520
+ isArbitraryVariable,
521
+ isArbitraryValue
522
+ ];
523
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
524
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
525
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
526
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
527
+ const scaleBlur = () => [
528
+ // Deprecated since Tailwind CSS v4.0.0
529
+ "",
530
+ "none",
531
+ themeBlur,
532
+ isArbitraryVariable,
533
+ isArbitraryValue
534
+ ];
535
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
536
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
537
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
538
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
539
+ return {
540
+ cacheSize: 500,
541
+ theme: {
542
+ animate: ["spin", "ping", "pulse", "bounce"],
543
+ aspect: ["video"],
544
+ blur: [isTshirtSize],
545
+ breakpoint: [isTshirtSize],
546
+ color: [isAny],
547
+ container: [isTshirtSize],
548
+ "drop-shadow": [isTshirtSize],
549
+ ease: ["in", "out", "in-out"],
550
+ font: [isAnyNonArbitrary],
551
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
552
+ "inset-shadow": [isTshirtSize],
553
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
554
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
555
+ radius: [isTshirtSize],
556
+ shadow: [isTshirtSize],
557
+ spacing: ["px", isNumber],
558
+ text: [isTshirtSize],
559
+ "text-shadow": [isTshirtSize],
560
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
561
+ },
562
+ classGroups: {
563
+ // --------------
564
+ // --- Layout ---
565
+ // --------------
566
+ /**
567
+ * Aspect Ratio
568
+ * @see https://tailwindcss.com/docs/aspect-ratio
569
+ */
570
+ aspect: [{
571
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
572
+ }],
573
+ /**
574
+ * Container
575
+ * @see https://tailwindcss.com/docs/container
576
+ * @deprecated since Tailwind CSS v4.0.0
577
+ */
578
+ container: ["container"],
579
+ /**
580
+ * Columns
581
+ * @see https://tailwindcss.com/docs/columns
582
+ */
583
+ columns: [{
584
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
585
+ }],
586
+ /**
587
+ * Break After
588
+ * @see https://tailwindcss.com/docs/break-after
589
+ */
590
+ "break-after": [{
591
+ "break-after": scaleBreak()
592
+ }],
593
+ /**
594
+ * Break Before
595
+ * @see https://tailwindcss.com/docs/break-before
596
+ */
597
+ "break-before": [{
598
+ "break-before": scaleBreak()
599
+ }],
600
+ /**
601
+ * Break Inside
602
+ * @see https://tailwindcss.com/docs/break-inside
603
+ */
604
+ "break-inside": [{
605
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
606
+ }],
607
+ /**
608
+ * Box Decoration Break
609
+ * @see https://tailwindcss.com/docs/box-decoration-break
610
+ */
611
+ "box-decoration": [{
612
+ "box-decoration": ["slice", "clone"]
613
+ }],
614
+ /**
615
+ * Box Sizing
616
+ * @see https://tailwindcss.com/docs/box-sizing
617
+ */
618
+ box: [{
619
+ box: ["border", "content"]
620
+ }],
621
+ /**
622
+ * Display
623
+ * @see https://tailwindcss.com/docs/display
624
+ */
625
+ 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"],
626
+ /**
627
+ * Screen Reader Only
628
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
629
+ */
630
+ sr: ["sr-only", "not-sr-only"],
631
+ /**
632
+ * Floats
633
+ * @see https://tailwindcss.com/docs/float
634
+ */
635
+ float: [{
636
+ float: ["right", "left", "none", "start", "end"]
637
+ }],
638
+ /**
639
+ * Clear
640
+ * @see https://tailwindcss.com/docs/clear
641
+ */
642
+ clear: [{
643
+ clear: ["left", "right", "both", "none", "start", "end"]
644
+ }],
645
+ /**
646
+ * Isolation
647
+ * @see https://tailwindcss.com/docs/isolation
648
+ */
649
+ isolation: ["isolate", "isolation-auto"],
650
+ /**
651
+ * Object Fit
652
+ * @see https://tailwindcss.com/docs/object-fit
653
+ */
654
+ "object-fit": [{
655
+ object: ["contain", "cover", "fill", "none", "scale-down"]
656
+ }],
657
+ /**
658
+ * Object Position
659
+ * @see https://tailwindcss.com/docs/object-position
660
+ */
661
+ "object-position": [{
662
+ object: scalePositionWithArbitrary()
663
+ }],
664
+ /**
665
+ * Overflow
666
+ * @see https://tailwindcss.com/docs/overflow
667
+ */
668
+ overflow: [{
669
+ overflow: scaleOverflow()
670
+ }],
671
+ /**
672
+ * Overflow X
673
+ * @see https://tailwindcss.com/docs/overflow
674
+ */
675
+ "overflow-x": [{
676
+ "overflow-x": scaleOverflow()
677
+ }],
678
+ /**
679
+ * Overflow Y
680
+ * @see https://tailwindcss.com/docs/overflow
681
+ */
682
+ "overflow-y": [{
683
+ "overflow-y": scaleOverflow()
684
+ }],
685
+ /**
686
+ * Overscroll Behavior
687
+ * @see https://tailwindcss.com/docs/overscroll-behavior
688
+ */
689
+ overscroll: [{
690
+ overscroll: scaleOverscroll()
691
+ }],
692
+ /**
693
+ * Overscroll Behavior X
694
+ * @see https://tailwindcss.com/docs/overscroll-behavior
695
+ */
696
+ "overscroll-x": [{
697
+ "overscroll-x": scaleOverscroll()
698
+ }],
699
+ /**
700
+ * Overscroll Behavior Y
701
+ * @see https://tailwindcss.com/docs/overscroll-behavior
702
+ */
703
+ "overscroll-y": [{
704
+ "overscroll-y": scaleOverscroll()
705
+ }],
706
+ /**
707
+ * Position
708
+ * @see https://tailwindcss.com/docs/position
709
+ */
710
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
711
+ /**
712
+ * Top / Right / Bottom / Left
713
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
714
+ */
715
+ inset: [{
716
+ inset: scaleInset()
717
+ }],
718
+ /**
719
+ * Right / Left
720
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
721
+ */
722
+ "inset-x": [{
723
+ "inset-x": scaleInset()
724
+ }],
725
+ /**
726
+ * Top / Bottom
727
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
728
+ */
729
+ "inset-y": [{
730
+ "inset-y": scaleInset()
731
+ }],
732
+ /**
733
+ * Start
734
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
735
+ */
736
+ start: [{
737
+ start: scaleInset()
738
+ }],
739
+ /**
740
+ * End
741
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
742
+ */
743
+ end: [{
744
+ end: scaleInset()
745
+ }],
746
+ /**
747
+ * Top
748
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
749
+ */
750
+ top: [{
751
+ top: scaleInset()
752
+ }],
753
+ /**
754
+ * Right
755
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
756
+ */
757
+ right: [{
758
+ right: scaleInset()
759
+ }],
760
+ /**
761
+ * Bottom
762
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
763
+ */
764
+ bottom: [{
765
+ bottom: scaleInset()
766
+ }],
767
+ /**
768
+ * Left
769
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
770
+ */
771
+ left: [{
772
+ left: scaleInset()
773
+ }],
774
+ /**
775
+ * Visibility
776
+ * @see https://tailwindcss.com/docs/visibility
777
+ */
778
+ visibility: ["visible", "invisible", "collapse"],
779
+ /**
780
+ * Z-Index
781
+ * @see https://tailwindcss.com/docs/z-index
782
+ */
783
+ z: [{
784
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
785
+ }],
786
+ // ------------------------
787
+ // --- Flexbox and Grid ---
788
+ // ------------------------
789
+ /**
790
+ * Flex Basis
791
+ * @see https://tailwindcss.com/docs/flex-basis
792
+ */
793
+ basis: [{
794
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
795
+ }],
796
+ /**
797
+ * Flex Direction
798
+ * @see https://tailwindcss.com/docs/flex-direction
799
+ */
800
+ "flex-direction": [{
801
+ flex: ["row", "row-reverse", "col", "col-reverse"]
802
+ }],
803
+ /**
804
+ * Flex Wrap
805
+ * @see https://tailwindcss.com/docs/flex-wrap
806
+ */
807
+ "flex-wrap": [{
808
+ flex: ["nowrap", "wrap", "wrap-reverse"]
809
+ }],
810
+ /**
811
+ * Flex
812
+ * @see https://tailwindcss.com/docs/flex
813
+ */
814
+ flex: [{
815
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
816
+ }],
817
+ /**
818
+ * Flex Grow
819
+ * @see https://tailwindcss.com/docs/flex-grow
820
+ */
821
+ grow: [{
822
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
823
+ }],
824
+ /**
825
+ * Flex Shrink
826
+ * @see https://tailwindcss.com/docs/flex-shrink
827
+ */
828
+ shrink: [{
829
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
830
+ }],
831
+ /**
832
+ * Order
833
+ * @see https://tailwindcss.com/docs/order
834
+ */
835
+ order: [{
836
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
837
+ }],
838
+ /**
839
+ * Grid Template Columns
840
+ * @see https://tailwindcss.com/docs/grid-template-columns
841
+ */
842
+ "grid-cols": [{
843
+ "grid-cols": scaleGridTemplateColsRows()
844
+ }],
845
+ /**
846
+ * Grid Column Start / End
847
+ * @see https://tailwindcss.com/docs/grid-column
848
+ */
849
+ "col-start-end": [{
850
+ col: scaleGridColRowStartAndEnd()
851
+ }],
852
+ /**
853
+ * Grid Column Start
854
+ * @see https://tailwindcss.com/docs/grid-column
855
+ */
856
+ "col-start": [{
857
+ "col-start": scaleGridColRowStartOrEnd()
858
+ }],
859
+ /**
860
+ * Grid Column End
861
+ * @see https://tailwindcss.com/docs/grid-column
862
+ */
863
+ "col-end": [{
864
+ "col-end": scaleGridColRowStartOrEnd()
865
+ }],
866
+ /**
867
+ * Grid Template Rows
868
+ * @see https://tailwindcss.com/docs/grid-template-rows
869
+ */
870
+ "grid-rows": [{
871
+ "grid-rows": scaleGridTemplateColsRows()
872
+ }],
873
+ /**
874
+ * Grid Row Start / End
875
+ * @see https://tailwindcss.com/docs/grid-row
876
+ */
877
+ "row-start-end": [{
878
+ row: scaleGridColRowStartAndEnd()
879
+ }],
880
+ /**
881
+ * Grid Row Start
882
+ * @see https://tailwindcss.com/docs/grid-row
883
+ */
884
+ "row-start": [{
885
+ "row-start": scaleGridColRowStartOrEnd()
886
+ }],
887
+ /**
888
+ * Grid Row End
889
+ * @see https://tailwindcss.com/docs/grid-row
890
+ */
891
+ "row-end": [{
892
+ "row-end": scaleGridColRowStartOrEnd()
893
+ }],
894
+ /**
895
+ * Grid Auto Flow
896
+ * @see https://tailwindcss.com/docs/grid-auto-flow
897
+ */
898
+ "grid-flow": [{
899
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
900
+ }],
901
+ /**
902
+ * Grid Auto Columns
903
+ * @see https://tailwindcss.com/docs/grid-auto-columns
904
+ */
905
+ "auto-cols": [{
906
+ "auto-cols": scaleGridAutoColsRows()
907
+ }],
908
+ /**
909
+ * Grid Auto Rows
910
+ * @see https://tailwindcss.com/docs/grid-auto-rows
911
+ */
912
+ "auto-rows": [{
913
+ "auto-rows": scaleGridAutoColsRows()
914
+ }],
915
+ /**
916
+ * Gap
917
+ * @see https://tailwindcss.com/docs/gap
918
+ */
919
+ gap: [{
920
+ gap: scaleUnambiguousSpacing()
921
+ }],
922
+ /**
923
+ * Gap X
924
+ * @see https://tailwindcss.com/docs/gap
925
+ */
926
+ "gap-x": [{
927
+ "gap-x": scaleUnambiguousSpacing()
928
+ }],
929
+ /**
930
+ * Gap Y
931
+ * @see https://tailwindcss.com/docs/gap
932
+ */
933
+ "gap-y": [{
934
+ "gap-y": scaleUnambiguousSpacing()
935
+ }],
936
+ /**
937
+ * Justify Content
938
+ * @see https://tailwindcss.com/docs/justify-content
939
+ */
940
+ "justify-content": [{
941
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
942
+ }],
943
+ /**
944
+ * Justify Items
945
+ * @see https://tailwindcss.com/docs/justify-items
946
+ */
947
+ "justify-items": [{
948
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
949
+ }],
950
+ /**
951
+ * Justify Self
952
+ * @see https://tailwindcss.com/docs/justify-self
953
+ */
954
+ "justify-self": [{
955
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
956
+ }],
957
+ /**
958
+ * Align Content
959
+ * @see https://tailwindcss.com/docs/align-content
960
+ */
961
+ "align-content": [{
962
+ content: ["normal", ...scaleAlignPrimaryAxis()]
963
+ }],
964
+ /**
965
+ * Align Items
966
+ * @see https://tailwindcss.com/docs/align-items
967
+ */
968
+ "align-items": [{
969
+ items: [...scaleAlignSecondaryAxis(), {
970
+ baseline: ["", "last"]
971
+ }]
972
+ }],
973
+ /**
974
+ * Align Self
975
+ * @see https://tailwindcss.com/docs/align-self
976
+ */
977
+ "align-self": [{
978
+ self: ["auto", ...scaleAlignSecondaryAxis(), {
979
+ baseline: ["", "last"]
980
+ }]
981
+ }],
982
+ /**
983
+ * Place Content
984
+ * @see https://tailwindcss.com/docs/place-content
985
+ */
986
+ "place-content": [{
987
+ "place-content": scaleAlignPrimaryAxis()
988
+ }],
989
+ /**
990
+ * Place Items
991
+ * @see https://tailwindcss.com/docs/place-items
992
+ */
993
+ "place-items": [{
994
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
995
+ }],
996
+ /**
997
+ * Place Self
998
+ * @see https://tailwindcss.com/docs/place-self
999
+ */
1000
+ "place-self": [{
1001
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
1002
+ }],
1003
+ // Spacing
1004
+ /**
1005
+ * Padding
1006
+ * @see https://tailwindcss.com/docs/padding
1007
+ */
1008
+ p: [{
1009
+ p: scaleUnambiguousSpacing()
1010
+ }],
1011
+ /**
1012
+ * Padding X
1013
+ * @see https://tailwindcss.com/docs/padding
1014
+ */
1015
+ px: [{
1016
+ px: scaleUnambiguousSpacing()
1017
+ }],
1018
+ /**
1019
+ * Padding Y
1020
+ * @see https://tailwindcss.com/docs/padding
1021
+ */
1022
+ py: [{
1023
+ py: scaleUnambiguousSpacing()
1024
+ }],
1025
+ /**
1026
+ * Padding Start
1027
+ * @see https://tailwindcss.com/docs/padding
1028
+ */
1029
+ ps: [{
1030
+ ps: scaleUnambiguousSpacing()
1031
+ }],
1032
+ /**
1033
+ * Padding End
1034
+ * @see https://tailwindcss.com/docs/padding
1035
+ */
1036
+ pe: [{
1037
+ pe: scaleUnambiguousSpacing()
1038
+ }],
1039
+ /**
1040
+ * Padding Top
1041
+ * @see https://tailwindcss.com/docs/padding
1042
+ */
1043
+ pt: [{
1044
+ pt: scaleUnambiguousSpacing()
1045
+ }],
1046
+ /**
1047
+ * Padding Right
1048
+ * @see https://tailwindcss.com/docs/padding
1049
+ */
1050
+ pr: [{
1051
+ pr: scaleUnambiguousSpacing()
1052
+ }],
1053
+ /**
1054
+ * Padding Bottom
1055
+ * @see https://tailwindcss.com/docs/padding
1056
+ */
1057
+ pb: [{
1058
+ pb: scaleUnambiguousSpacing()
1059
+ }],
1060
+ /**
1061
+ * Padding Left
1062
+ * @see https://tailwindcss.com/docs/padding
1063
+ */
1064
+ pl: [{
1065
+ pl: scaleUnambiguousSpacing()
1066
+ }],
1067
+ /**
1068
+ * Margin
1069
+ * @see https://tailwindcss.com/docs/margin
1070
+ */
1071
+ m: [{
1072
+ m: scaleMargin()
1073
+ }],
1074
+ /**
1075
+ * Margin X
1076
+ * @see https://tailwindcss.com/docs/margin
1077
+ */
1078
+ mx: [{
1079
+ mx: scaleMargin()
1080
+ }],
1081
+ /**
1082
+ * Margin Y
1083
+ * @see https://tailwindcss.com/docs/margin
1084
+ */
1085
+ my: [{
1086
+ my: scaleMargin()
1087
+ }],
1088
+ /**
1089
+ * Margin Start
1090
+ * @see https://tailwindcss.com/docs/margin
1091
+ */
1092
+ ms: [{
1093
+ ms: scaleMargin()
1094
+ }],
1095
+ /**
1096
+ * Margin End
1097
+ * @see https://tailwindcss.com/docs/margin
1098
+ */
1099
+ me: [{
1100
+ me: scaleMargin()
1101
+ }],
1102
+ /**
1103
+ * Margin Top
1104
+ * @see https://tailwindcss.com/docs/margin
1105
+ */
1106
+ mt: [{
1107
+ mt: scaleMargin()
1108
+ }],
1109
+ /**
1110
+ * Margin Right
1111
+ * @see https://tailwindcss.com/docs/margin
1112
+ */
1113
+ mr: [{
1114
+ mr: scaleMargin()
1115
+ }],
1116
+ /**
1117
+ * Margin Bottom
1118
+ * @see https://tailwindcss.com/docs/margin
1119
+ */
1120
+ mb: [{
1121
+ mb: scaleMargin()
1122
+ }],
1123
+ /**
1124
+ * Margin Left
1125
+ * @see https://tailwindcss.com/docs/margin
1126
+ */
1127
+ ml: [{
1128
+ ml: scaleMargin()
1129
+ }],
1130
+ /**
1131
+ * Space Between X
1132
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1133
+ */
1134
+ "space-x": [{
1135
+ "space-x": scaleUnambiguousSpacing()
1136
+ }],
1137
+ /**
1138
+ * Space Between X Reverse
1139
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1140
+ */
1141
+ "space-x-reverse": ["space-x-reverse"],
1142
+ /**
1143
+ * Space Between Y
1144
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1145
+ */
1146
+ "space-y": [{
1147
+ "space-y": scaleUnambiguousSpacing()
1148
+ }],
1149
+ /**
1150
+ * Space Between Y Reverse
1151
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1152
+ */
1153
+ "space-y-reverse": ["space-y-reverse"],
1154
+ // --------------
1155
+ // --- Sizing ---
1156
+ // --------------
1157
+ /**
1158
+ * Size
1159
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1160
+ */
1161
+ size: [{
1162
+ size: scaleSizing()
1163
+ }],
1164
+ /**
1165
+ * Width
1166
+ * @see https://tailwindcss.com/docs/width
1167
+ */
1168
+ w: [{
1169
+ w: [themeContainer, "screen", ...scaleSizing()]
1170
+ }],
1171
+ /**
1172
+ * Min-Width
1173
+ * @see https://tailwindcss.com/docs/min-width
1174
+ */
1175
+ "min-w": [{
1176
+ "min-w": [
1177
+ themeContainer,
1178
+ "screen",
1179
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1180
+ "none",
1181
+ ...scaleSizing()
1182
+ ]
1183
+ }],
1184
+ /**
1185
+ * Max-Width
1186
+ * @see https://tailwindcss.com/docs/max-width
1187
+ */
1188
+ "max-w": [{
1189
+ "max-w": [
1190
+ themeContainer,
1191
+ "screen",
1192
+ "none",
1193
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1194
+ "prose",
1195
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1196
+ {
1197
+ screen: [themeBreakpoint]
1198
+ },
1199
+ ...scaleSizing()
1200
+ ]
1201
+ }],
1202
+ /**
1203
+ * Height
1204
+ * @see https://tailwindcss.com/docs/height
1205
+ */
1206
+ h: [{
1207
+ h: ["screen", "lh", ...scaleSizing()]
1208
+ }],
1209
+ /**
1210
+ * Min-Height
1211
+ * @see https://tailwindcss.com/docs/min-height
1212
+ */
1213
+ "min-h": [{
1214
+ "min-h": ["screen", "lh", "none", ...scaleSizing()]
1215
+ }],
1216
+ /**
1217
+ * Max-Height
1218
+ * @see https://tailwindcss.com/docs/max-height
1219
+ */
1220
+ "max-h": [{
1221
+ "max-h": ["screen", "lh", ...scaleSizing()]
1222
+ }],
1223
+ // ------------------
1224
+ // --- Typography ---
1225
+ // ------------------
1226
+ /**
1227
+ * Font Size
1228
+ * @see https://tailwindcss.com/docs/font-size
1229
+ */
1230
+ "font-size": [{
1231
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
1232
+ }],
1233
+ /**
1234
+ * Font Smoothing
1235
+ * @see https://tailwindcss.com/docs/font-smoothing
1236
+ */
1237
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1238
+ /**
1239
+ * Font Style
1240
+ * @see https://tailwindcss.com/docs/font-style
1241
+ */
1242
+ "font-style": ["italic", "not-italic"],
1243
+ /**
1244
+ * Font Weight
1245
+ * @see https://tailwindcss.com/docs/font-weight
1246
+ */
1247
+ "font-weight": [{
1248
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
1249
+ }],
1250
+ /**
1251
+ * Font Stretch
1252
+ * @see https://tailwindcss.com/docs/font-stretch
1253
+ */
1254
+ "font-stretch": [{
1255
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
1256
+ }],
1257
+ /**
1258
+ * Font Family
1259
+ * @see https://tailwindcss.com/docs/font-family
1260
+ */
1261
+ "font-family": [{
1262
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
1263
+ }],
1264
+ /**
1265
+ * Font Variant Numeric
1266
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1267
+ */
1268
+ "fvn-normal": ["normal-nums"],
1269
+ /**
1270
+ * Font Variant Numeric
1271
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1272
+ */
1273
+ "fvn-ordinal": ["ordinal"],
1274
+ /**
1275
+ * Font Variant Numeric
1276
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1277
+ */
1278
+ "fvn-slashed-zero": ["slashed-zero"],
1279
+ /**
1280
+ * Font Variant Numeric
1281
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1282
+ */
1283
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1284
+ /**
1285
+ * Font Variant Numeric
1286
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1287
+ */
1288
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1289
+ /**
1290
+ * Font Variant Numeric
1291
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1292
+ */
1293
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1294
+ /**
1295
+ * Letter Spacing
1296
+ * @see https://tailwindcss.com/docs/letter-spacing
1297
+ */
1298
+ tracking: [{
1299
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1300
+ }],
1301
+ /**
1302
+ * Line Clamp
1303
+ * @see https://tailwindcss.com/docs/line-clamp
1304
+ */
1305
+ "line-clamp": [{
1306
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
1307
+ }],
1308
+ /**
1309
+ * Line Height
1310
+ * @see https://tailwindcss.com/docs/line-height
1311
+ */
1312
+ leading: [{
1313
+ leading: [
1314
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1315
+ themeLeading,
1316
+ ...scaleUnambiguousSpacing()
1317
+ ]
1318
+ }],
1319
+ /**
1320
+ * List Style Image
1321
+ * @see https://tailwindcss.com/docs/list-style-image
1322
+ */
1323
+ "list-image": [{
1324
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
1325
+ }],
1326
+ /**
1327
+ * List Style Position
1328
+ * @see https://tailwindcss.com/docs/list-style-position
1329
+ */
1330
+ "list-style-position": [{
1331
+ list: ["inside", "outside"]
1332
+ }],
1333
+ /**
1334
+ * List Style Type
1335
+ * @see https://tailwindcss.com/docs/list-style-type
1336
+ */
1337
+ "list-style-type": [{
1338
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1339
+ }],
1340
+ /**
1341
+ * Text Alignment
1342
+ * @see https://tailwindcss.com/docs/text-align
1343
+ */
1344
+ "text-alignment": [{
1345
+ text: ["left", "center", "right", "justify", "start", "end"]
1346
+ }],
1347
+ /**
1348
+ * Placeholder Color
1349
+ * @deprecated since Tailwind CSS v3.0.0
1350
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1351
+ */
1352
+ "placeholder-color": [{
1353
+ placeholder: scaleColor()
1354
+ }],
1355
+ /**
1356
+ * Text Color
1357
+ * @see https://tailwindcss.com/docs/text-color
1358
+ */
1359
+ "text-color": [{
1360
+ text: scaleColor()
1361
+ }],
1362
+ /**
1363
+ * Text Decoration
1364
+ * @see https://tailwindcss.com/docs/text-decoration
1365
+ */
1366
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1367
+ /**
1368
+ * Text Decoration Style
1369
+ * @see https://tailwindcss.com/docs/text-decoration-style
1370
+ */
1371
+ "text-decoration-style": [{
1372
+ decoration: [...scaleLineStyle(), "wavy"]
1373
+ }],
1374
+ /**
1375
+ * Text Decoration Thickness
1376
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1377
+ */
1378
+ "text-decoration-thickness": [{
1379
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1380
+ }],
1381
+ /**
1382
+ * Text Decoration Color
1383
+ * @see https://tailwindcss.com/docs/text-decoration-color
1384
+ */
1385
+ "text-decoration-color": [{
1386
+ decoration: scaleColor()
1387
+ }],
1388
+ /**
1389
+ * Text Underline Offset
1390
+ * @see https://tailwindcss.com/docs/text-underline-offset
1391
+ */
1392
+ "underline-offset": [{
1393
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1394
+ }],
1395
+ /**
1396
+ * Text Transform
1397
+ * @see https://tailwindcss.com/docs/text-transform
1398
+ */
1399
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1400
+ /**
1401
+ * Text Overflow
1402
+ * @see https://tailwindcss.com/docs/text-overflow
1403
+ */
1404
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1405
+ /**
1406
+ * Text Wrap
1407
+ * @see https://tailwindcss.com/docs/text-wrap
1408
+ */
1409
+ "text-wrap": [{
1410
+ text: ["wrap", "nowrap", "balance", "pretty"]
1411
+ }],
1412
+ /**
1413
+ * Text Indent
1414
+ * @see https://tailwindcss.com/docs/text-indent
1415
+ */
1416
+ indent: [{
1417
+ indent: scaleUnambiguousSpacing()
1418
+ }],
1419
+ /**
1420
+ * Vertical Alignment
1421
+ * @see https://tailwindcss.com/docs/vertical-align
1422
+ */
1423
+ "vertical-align": [{
1424
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1425
+ }],
1426
+ /**
1427
+ * Whitespace
1428
+ * @see https://tailwindcss.com/docs/whitespace
1429
+ */
1430
+ whitespace: [{
1431
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1432
+ }],
1433
+ /**
1434
+ * Word Break
1435
+ * @see https://tailwindcss.com/docs/word-break
1436
+ */
1437
+ break: [{
1438
+ break: ["normal", "words", "all", "keep"]
1439
+ }],
1440
+ /**
1441
+ * Overflow Wrap
1442
+ * @see https://tailwindcss.com/docs/overflow-wrap
1443
+ */
1444
+ wrap: [{
1445
+ wrap: ["break-word", "anywhere", "normal"]
1446
+ }],
1447
+ /**
1448
+ * Hyphens
1449
+ * @see https://tailwindcss.com/docs/hyphens
1450
+ */
1451
+ hyphens: [{
1452
+ hyphens: ["none", "manual", "auto"]
1453
+ }],
1454
+ /**
1455
+ * Content
1456
+ * @see https://tailwindcss.com/docs/content
1457
+ */
1458
+ content: [{
1459
+ content: ["none", isArbitraryVariable, isArbitraryValue]
1460
+ }],
1461
+ // -------------------
1462
+ // --- Backgrounds ---
1463
+ // -------------------
1464
+ /**
1465
+ * Background Attachment
1466
+ * @see https://tailwindcss.com/docs/background-attachment
1467
+ */
1468
+ "bg-attachment": [{
1469
+ bg: ["fixed", "local", "scroll"]
1470
+ }],
1471
+ /**
1472
+ * Background Clip
1473
+ * @see https://tailwindcss.com/docs/background-clip
1474
+ */
1475
+ "bg-clip": [{
1476
+ "bg-clip": ["border", "padding", "content", "text"]
1477
+ }],
1478
+ /**
1479
+ * Background Origin
1480
+ * @see https://tailwindcss.com/docs/background-origin
1481
+ */
1482
+ "bg-origin": [{
1483
+ "bg-origin": ["border", "padding", "content"]
1484
+ }],
1485
+ /**
1486
+ * Background Position
1487
+ * @see https://tailwindcss.com/docs/background-position
1488
+ */
1489
+ "bg-position": [{
1490
+ bg: scaleBgPosition()
1491
+ }],
1492
+ /**
1493
+ * Background Repeat
1494
+ * @see https://tailwindcss.com/docs/background-repeat
1495
+ */
1496
+ "bg-repeat": [{
1497
+ bg: scaleBgRepeat()
1498
+ }],
1499
+ /**
1500
+ * Background Size
1501
+ * @see https://tailwindcss.com/docs/background-size
1502
+ */
1503
+ "bg-size": [{
1504
+ bg: scaleBgSize()
1505
+ }],
1506
+ /**
1507
+ * Background Image
1508
+ * @see https://tailwindcss.com/docs/background-image
1509
+ */
1510
+ "bg-image": [{
1511
+ bg: ["none", {
1512
+ linear: [{
1513
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1514
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
1515
+ radial: ["", isArbitraryVariable, isArbitraryValue],
1516
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1517
+ }, isArbitraryVariableImage, isArbitraryImage]
1518
+ }],
1519
+ /**
1520
+ * Background Color
1521
+ * @see https://tailwindcss.com/docs/background-color
1522
+ */
1523
+ "bg-color": [{
1524
+ bg: scaleColor()
1525
+ }],
1526
+ /**
1527
+ * Gradient Color Stops From Position
1528
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1529
+ */
1530
+ "gradient-from-pos": [{
1531
+ from: scaleGradientStopPosition()
1532
+ }],
1533
+ /**
1534
+ * Gradient Color Stops Via Position
1535
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1536
+ */
1537
+ "gradient-via-pos": [{
1538
+ via: scaleGradientStopPosition()
1539
+ }],
1540
+ /**
1541
+ * Gradient Color Stops To Position
1542
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1543
+ */
1544
+ "gradient-to-pos": [{
1545
+ to: scaleGradientStopPosition()
1546
+ }],
1547
+ /**
1548
+ * Gradient Color Stops From
1549
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1550
+ */
1551
+ "gradient-from": [{
1552
+ from: scaleColor()
1553
+ }],
1554
+ /**
1555
+ * Gradient Color Stops Via
1556
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1557
+ */
1558
+ "gradient-via": [{
1559
+ via: scaleColor()
1560
+ }],
1561
+ /**
1562
+ * Gradient Color Stops To
1563
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1564
+ */
1565
+ "gradient-to": [{
1566
+ to: scaleColor()
1567
+ }],
1568
+ // ---------------
1569
+ // --- Borders ---
1570
+ // ---------------
1571
+ /**
1572
+ * Border Radius
1573
+ * @see https://tailwindcss.com/docs/border-radius
1574
+ */
1575
+ rounded: [{
1576
+ rounded: scaleRadius()
1577
+ }],
1578
+ /**
1579
+ * Border Radius Start
1580
+ * @see https://tailwindcss.com/docs/border-radius
1581
+ */
1582
+ "rounded-s": [{
1583
+ "rounded-s": scaleRadius()
1584
+ }],
1585
+ /**
1586
+ * Border Radius End
1587
+ * @see https://tailwindcss.com/docs/border-radius
1588
+ */
1589
+ "rounded-e": [{
1590
+ "rounded-e": scaleRadius()
1591
+ }],
1592
+ /**
1593
+ * Border Radius Top
1594
+ * @see https://tailwindcss.com/docs/border-radius
1595
+ */
1596
+ "rounded-t": [{
1597
+ "rounded-t": scaleRadius()
1598
+ }],
1599
+ /**
1600
+ * Border Radius Right
1601
+ * @see https://tailwindcss.com/docs/border-radius
1602
+ */
1603
+ "rounded-r": [{
1604
+ "rounded-r": scaleRadius()
1605
+ }],
1606
+ /**
1607
+ * Border Radius Bottom
1608
+ * @see https://tailwindcss.com/docs/border-radius
1609
+ */
1610
+ "rounded-b": [{
1611
+ "rounded-b": scaleRadius()
1612
+ }],
1613
+ /**
1614
+ * Border Radius Left
1615
+ * @see https://tailwindcss.com/docs/border-radius
1616
+ */
1617
+ "rounded-l": [{
1618
+ "rounded-l": scaleRadius()
1619
+ }],
1620
+ /**
1621
+ * Border Radius Start Start
1622
+ * @see https://tailwindcss.com/docs/border-radius
1623
+ */
1624
+ "rounded-ss": [{
1625
+ "rounded-ss": scaleRadius()
1626
+ }],
1627
+ /**
1628
+ * Border Radius Start End
1629
+ * @see https://tailwindcss.com/docs/border-radius
1630
+ */
1631
+ "rounded-se": [{
1632
+ "rounded-se": scaleRadius()
1633
+ }],
1634
+ /**
1635
+ * Border Radius End End
1636
+ * @see https://tailwindcss.com/docs/border-radius
1637
+ */
1638
+ "rounded-ee": [{
1639
+ "rounded-ee": scaleRadius()
1640
+ }],
1641
+ /**
1642
+ * Border Radius End Start
1643
+ * @see https://tailwindcss.com/docs/border-radius
1644
+ */
1645
+ "rounded-es": [{
1646
+ "rounded-es": scaleRadius()
1647
+ }],
1648
+ /**
1649
+ * Border Radius Top Left
1650
+ * @see https://tailwindcss.com/docs/border-radius
1651
+ */
1652
+ "rounded-tl": [{
1653
+ "rounded-tl": scaleRadius()
1654
+ }],
1655
+ /**
1656
+ * Border Radius Top Right
1657
+ * @see https://tailwindcss.com/docs/border-radius
1658
+ */
1659
+ "rounded-tr": [{
1660
+ "rounded-tr": scaleRadius()
1661
+ }],
1662
+ /**
1663
+ * Border Radius Bottom Right
1664
+ * @see https://tailwindcss.com/docs/border-radius
1665
+ */
1666
+ "rounded-br": [{
1667
+ "rounded-br": scaleRadius()
1668
+ }],
1669
+ /**
1670
+ * Border Radius Bottom Left
1671
+ * @see https://tailwindcss.com/docs/border-radius
1672
+ */
1673
+ "rounded-bl": [{
1674
+ "rounded-bl": scaleRadius()
1675
+ }],
1676
+ /**
1677
+ * Border Width
1678
+ * @see https://tailwindcss.com/docs/border-width
1679
+ */
1680
+ "border-w": [{
1681
+ border: scaleBorderWidth()
1682
+ }],
1683
+ /**
1684
+ * Border Width X
1685
+ * @see https://tailwindcss.com/docs/border-width
1686
+ */
1687
+ "border-w-x": [{
1688
+ "border-x": scaleBorderWidth()
1689
+ }],
1690
+ /**
1691
+ * Border Width Y
1692
+ * @see https://tailwindcss.com/docs/border-width
1693
+ */
1694
+ "border-w-y": [{
1695
+ "border-y": scaleBorderWidth()
1696
+ }],
1697
+ /**
1698
+ * Border Width Start
1699
+ * @see https://tailwindcss.com/docs/border-width
1700
+ */
1701
+ "border-w-s": [{
1702
+ "border-s": scaleBorderWidth()
1703
+ }],
1704
+ /**
1705
+ * Border Width End
1706
+ * @see https://tailwindcss.com/docs/border-width
1707
+ */
1708
+ "border-w-e": [{
1709
+ "border-e": scaleBorderWidth()
1710
+ }],
1711
+ /**
1712
+ * Border Width Top
1713
+ * @see https://tailwindcss.com/docs/border-width
1714
+ */
1715
+ "border-w-t": [{
1716
+ "border-t": scaleBorderWidth()
1717
+ }],
1718
+ /**
1719
+ * Border Width Right
1720
+ * @see https://tailwindcss.com/docs/border-width
1721
+ */
1722
+ "border-w-r": [{
1723
+ "border-r": scaleBorderWidth()
1724
+ }],
1725
+ /**
1726
+ * Border Width Bottom
1727
+ * @see https://tailwindcss.com/docs/border-width
1728
+ */
1729
+ "border-w-b": [{
1730
+ "border-b": scaleBorderWidth()
1731
+ }],
1732
+ /**
1733
+ * Border Width Left
1734
+ * @see https://tailwindcss.com/docs/border-width
1735
+ */
1736
+ "border-w-l": [{
1737
+ "border-l": scaleBorderWidth()
1738
+ }],
1739
+ /**
1740
+ * Divide Width X
1741
+ * @see https://tailwindcss.com/docs/border-width#between-children
1742
+ */
1743
+ "divide-x": [{
1744
+ "divide-x": scaleBorderWidth()
1745
+ }],
1746
+ /**
1747
+ * Divide Width X Reverse
1748
+ * @see https://tailwindcss.com/docs/border-width#between-children
1749
+ */
1750
+ "divide-x-reverse": ["divide-x-reverse"],
1751
+ /**
1752
+ * Divide Width Y
1753
+ * @see https://tailwindcss.com/docs/border-width#between-children
1754
+ */
1755
+ "divide-y": [{
1756
+ "divide-y": scaleBorderWidth()
1757
+ }],
1758
+ /**
1759
+ * Divide Width Y Reverse
1760
+ * @see https://tailwindcss.com/docs/border-width#between-children
1761
+ */
1762
+ "divide-y-reverse": ["divide-y-reverse"],
1763
+ /**
1764
+ * Border Style
1765
+ * @see https://tailwindcss.com/docs/border-style
1766
+ */
1767
+ "border-style": [{
1768
+ border: [...scaleLineStyle(), "hidden", "none"]
1769
+ }],
1770
+ /**
1771
+ * Divide Style
1772
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
1773
+ */
1774
+ "divide-style": [{
1775
+ divide: [...scaleLineStyle(), "hidden", "none"]
1776
+ }],
1777
+ /**
1778
+ * Border Color
1779
+ * @see https://tailwindcss.com/docs/border-color
1780
+ */
1781
+ "border-color": [{
1782
+ border: scaleColor()
1783
+ }],
1784
+ /**
1785
+ * Border Color X
1786
+ * @see https://tailwindcss.com/docs/border-color
1787
+ */
1788
+ "border-color-x": [{
1789
+ "border-x": scaleColor()
1790
+ }],
1791
+ /**
1792
+ * Border Color Y
1793
+ * @see https://tailwindcss.com/docs/border-color
1794
+ */
1795
+ "border-color-y": [{
1796
+ "border-y": scaleColor()
1797
+ }],
1798
+ /**
1799
+ * Border Color S
1800
+ * @see https://tailwindcss.com/docs/border-color
1801
+ */
1802
+ "border-color-s": [{
1803
+ "border-s": scaleColor()
1804
+ }],
1805
+ /**
1806
+ * Border Color E
1807
+ * @see https://tailwindcss.com/docs/border-color
1808
+ */
1809
+ "border-color-e": [{
1810
+ "border-e": scaleColor()
1811
+ }],
1812
+ /**
1813
+ * Border Color Top
1814
+ * @see https://tailwindcss.com/docs/border-color
1815
+ */
1816
+ "border-color-t": [{
1817
+ "border-t": scaleColor()
1818
+ }],
1819
+ /**
1820
+ * Border Color Right
1821
+ * @see https://tailwindcss.com/docs/border-color
1822
+ */
1823
+ "border-color-r": [{
1824
+ "border-r": scaleColor()
1825
+ }],
1826
+ /**
1827
+ * Border Color Bottom
1828
+ * @see https://tailwindcss.com/docs/border-color
1829
+ */
1830
+ "border-color-b": [{
1831
+ "border-b": scaleColor()
1832
+ }],
1833
+ /**
1834
+ * Border Color Left
1835
+ * @see https://tailwindcss.com/docs/border-color
1836
+ */
1837
+ "border-color-l": [{
1838
+ "border-l": scaleColor()
1839
+ }],
1840
+ /**
1841
+ * Divide Color
1842
+ * @see https://tailwindcss.com/docs/divide-color
1843
+ */
1844
+ "divide-color": [{
1845
+ divide: scaleColor()
1846
+ }],
1847
+ /**
1848
+ * Outline Style
1849
+ * @see https://tailwindcss.com/docs/outline-style
1850
+ */
1851
+ "outline-style": [{
1852
+ outline: [...scaleLineStyle(), "none", "hidden"]
1853
+ }],
1854
+ /**
1855
+ * Outline Offset
1856
+ * @see https://tailwindcss.com/docs/outline-offset
1857
+ */
1858
+ "outline-offset": [{
1859
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
1860
+ }],
1861
+ /**
1862
+ * Outline Width
1863
+ * @see https://tailwindcss.com/docs/outline-width
1864
+ */
1865
+ "outline-w": [{
1866
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
1867
+ }],
1868
+ /**
1869
+ * Outline Color
1870
+ * @see https://tailwindcss.com/docs/outline-color
1871
+ */
1872
+ "outline-color": [{
1873
+ outline: scaleColor()
1874
+ }],
1875
+ // ---------------
1876
+ // --- Effects ---
1877
+ // ---------------
1878
+ /**
1879
+ * Box Shadow
1880
+ * @see https://tailwindcss.com/docs/box-shadow
1881
+ */
1882
+ shadow: [{
1883
+ shadow: [
1884
+ // Deprecated since Tailwind CSS v4.0.0
1885
+ "",
1886
+ "none",
1887
+ themeShadow,
1888
+ isArbitraryVariableShadow,
1889
+ isArbitraryShadow
1890
+ ]
1891
+ }],
1892
+ /**
1893
+ * Box Shadow Color
1894
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
1895
+ */
1896
+ "shadow-color": [{
1897
+ shadow: scaleColor()
1898
+ }],
1899
+ /**
1900
+ * Inset Box Shadow
1901
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
1902
+ */
1903
+ "inset-shadow": [{
1904
+ "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
1905
+ }],
1906
+ /**
1907
+ * Inset Box Shadow Color
1908
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
1909
+ */
1910
+ "inset-shadow-color": [{
1911
+ "inset-shadow": scaleColor()
1912
+ }],
1913
+ /**
1914
+ * Ring Width
1915
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
1916
+ */
1917
+ "ring-w": [{
1918
+ ring: scaleBorderWidth()
1919
+ }],
1920
+ /**
1921
+ * Ring Width Inset
1922
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
1923
+ * @deprecated since Tailwind CSS v4.0.0
1924
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1925
+ */
1926
+ "ring-w-inset": ["ring-inset"],
1927
+ /**
1928
+ * Ring Color
1929
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
1930
+ */
1931
+ "ring-color": [{
1932
+ ring: scaleColor()
1933
+ }],
1934
+ /**
1935
+ * Ring Offset Width
1936
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
1937
+ * @deprecated since Tailwind CSS v4.0.0
1938
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1939
+ */
1940
+ "ring-offset-w": [{
1941
+ "ring-offset": [isNumber, isArbitraryLength]
1942
+ }],
1943
+ /**
1944
+ * Ring Offset Color
1945
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
1946
+ * @deprecated since Tailwind CSS v4.0.0
1947
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1948
+ */
1949
+ "ring-offset-color": [{
1950
+ "ring-offset": scaleColor()
1951
+ }],
1952
+ /**
1953
+ * Inset Ring Width
1954
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
1955
+ */
1956
+ "inset-ring-w": [{
1957
+ "inset-ring": scaleBorderWidth()
1958
+ }],
1959
+ /**
1960
+ * Inset Ring Color
1961
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
1962
+ */
1963
+ "inset-ring-color": [{
1964
+ "inset-ring": scaleColor()
1965
+ }],
1966
+ /**
1967
+ * Text Shadow
1968
+ * @see https://tailwindcss.com/docs/text-shadow
1969
+ */
1970
+ "text-shadow": [{
1971
+ "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
1972
+ }],
1973
+ /**
1974
+ * Text Shadow Color
1975
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
1976
+ */
1977
+ "text-shadow-color": [{
1978
+ "text-shadow": scaleColor()
1979
+ }],
1980
+ /**
1981
+ * Opacity
1982
+ * @see https://tailwindcss.com/docs/opacity
1983
+ */
1984
+ opacity: [{
1985
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
1986
+ }],
1987
+ /**
1988
+ * Mix Blend Mode
1989
+ * @see https://tailwindcss.com/docs/mix-blend-mode
1990
+ */
1991
+ "mix-blend": [{
1992
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
1993
+ }],
1994
+ /**
1995
+ * Background Blend Mode
1996
+ * @see https://tailwindcss.com/docs/background-blend-mode
1997
+ */
1998
+ "bg-blend": [{
1999
+ "bg-blend": scaleBlendMode()
2000
+ }],
2001
+ /**
2002
+ * Mask Clip
2003
+ * @see https://tailwindcss.com/docs/mask-clip
2004
+ */
2005
+ "mask-clip": [{
2006
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2007
+ }, "mask-no-clip"],
2008
+ /**
2009
+ * Mask Composite
2010
+ * @see https://tailwindcss.com/docs/mask-composite
2011
+ */
2012
+ "mask-composite": [{
2013
+ mask: ["add", "subtract", "intersect", "exclude"]
2014
+ }],
2015
+ /**
2016
+ * Mask Image
2017
+ * @see https://tailwindcss.com/docs/mask-image
2018
+ */
2019
+ "mask-image-linear-pos": [{
2020
+ "mask-linear": [isNumber]
2021
+ }],
2022
+ "mask-image-linear-from-pos": [{
2023
+ "mask-linear-from": scaleMaskImagePosition()
2024
+ }],
2025
+ "mask-image-linear-to-pos": [{
2026
+ "mask-linear-to": scaleMaskImagePosition()
2027
+ }],
2028
+ "mask-image-linear-from-color": [{
2029
+ "mask-linear-from": scaleColor()
2030
+ }],
2031
+ "mask-image-linear-to-color": [{
2032
+ "mask-linear-to": scaleColor()
2033
+ }],
2034
+ "mask-image-t-from-pos": [{
2035
+ "mask-t-from": scaleMaskImagePosition()
2036
+ }],
2037
+ "mask-image-t-to-pos": [{
2038
+ "mask-t-to": scaleMaskImagePosition()
2039
+ }],
2040
+ "mask-image-t-from-color": [{
2041
+ "mask-t-from": scaleColor()
2042
+ }],
2043
+ "mask-image-t-to-color": [{
2044
+ "mask-t-to": scaleColor()
2045
+ }],
2046
+ "mask-image-r-from-pos": [{
2047
+ "mask-r-from": scaleMaskImagePosition()
2048
+ }],
2049
+ "mask-image-r-to-pos": [{
2050
+ "mask-r-to": scaleMaskImagePosition()
2051
+ }],
2052
+ "mask-image-r-from-color": [{
2053
+ "mask-r-from": scaleColor()
2054
+ }],
2055
+ "mask-image-r-to-color": [{
2056
+ "mask-r-to": scaleColor()
2057
+ }],
2058
+ "mask-image-b-from-pos": [{
2059
+ "mask-b-from": scaleMaskImagePosition()
2060
+ }],
2061
+ "mask-image-b-to-pos": [{
2062
+ "mask-b-to": scaleMaskImagePosition()
2063
+ }],
2064
+ "mask-image-b-from-color": [{
2065
+ "mask-b-from": scaleColor()
2066
+ }],
2067
+ "mask-image-b-to-color": [{
2068
+ "mask-b-to": scaleColor()
2069
+ }],
2070
+ "mask-image-l-from-pos": [{
2071
+ "mask-l-from": scaleMaskImagePosition()
2072
+ }],
2073
+ "mask-image-l-to-pos": [{
2074
+ "mask-l-to": scaleMaskImagePosition()
2075
+ }],
2076
+ "mask-image-l-from-color": [{
2077
+ "mask-l-from": scaleColor()
2078
+ }],
2079
+ "mask-image-l-to-color": [{
2080
+ "mask-l-to": scaleColor()
2081
+ }],
2082
+ "mask-image-x-from-pos": [{
2083
+ "mask-x-from": scaleMaskImagePosition()
2084
+ }],
2085
+ "mask-image-x-to-pos": [{
2086
+ "mask-x-to": scaleMaskImagePosition()
2087
+ }],
2088
+ "mask-image-x-from-color": [{
2089
+ "mask-x-from": scaleColor()
2090
+ }],
2091
+ "mask-image-x-to-color": [{
2092
+ "mask-x-to": scaleColor()
2093
+ }],
2094
+ "mask-image-y-from-pos": [{
2095
+ "mask-y-from": scaleMaskImagePosition()
2096
+ }],
2097
+ "mask-image-y-to-pos": [{
2098
+ "mask-y-to": scaleMaskImagePosition()
2099
+ }],
2100
+ "mask-image-y-from-color": [{
2101
+ "mask-y-from": scaleColor()
2102
+ }],
2103
+ "mask-image-y-to-color": [{
2104
+ "mask-y-to": scaleColor()
2105
+ }],
2106
+ "mask-image-radial": [{
2107
+ "mask-radial": [isArbitraryVariable, isArbitraryValue]
2108
+ }],
2109
+ "mask-image-radial-from-pos": [{
2110
+ "mask-radial-from": scaleMaskImagePosition()
2111
+ }],
2112
+ "mask-image-radial-to-pos": [{
2113
+ "mask-radial-to": scaleMaskImagePosition()
2114
+ }],
2115
+ "mask-image-radial-from-color": [{
2116
+ "mask-radial-from": scaleColor()
2117
+ }],
2118
+ "mask-image-radial-to-color": [{
2119
+ "mask-radial-to": scaleColor()
2120
+ }],
2121
+ "mask-image-radial-shape": [{
2122
+ "mask-radial": ["circle", "ellipse"]
2123
+ }],
2124
+ "mask-image-radial-size": [{
2125
+ "mask-radial": [{
2126
+ closest: ["side", "corner"],
2127
+ farthest: ["side", "corner"]
2128
+ }]
2129
+ }],
2130
+ "mask-image-radial-pos": [{
2131
+ "mask-radial-at": scalePosition()
2132
+ }],
2133
+ "mask-image-conic-pos": [{
2134
+ "mask-conic": [isNumber]
2135
+ }],
2136
+ "mask-image-conic-from-pos": [{
2137
+ "mask-conic-from": scaleMaskImagePosition()
2138
+ }],
2139
+ "mask-image-conic-to-pos": [{
2140
+ "mask-conic-to": scaleMaskImagePosition()
2141
+ }],
2142
+ "mask-image-conic-from-color": [{
2143
+ "mask-conic-from": scaleColor()
2144
+ }],
2145
+ "mask-image-conic-to-color": [{
2146
+ "mask-conic-to": scaleColor()
2147
+ }],
2148
+ /**
2149
+ * Mask Mode
2150
+ * @see https://tailwindcss.com/docs/mask-mode
2151
+ */
2152
+ "mask-mode": [{
2153
+ mask: ["alpha", "luminance", "match"]
2154
+ }],
2155
+ /**
2156
+ * Mask Origin
2157
+ * @see https://tailwindcss.com/docs/mask-origin
2158
+ */
2159
+ "mask-origin": [{
2160
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2161
+ }],
2162
+ /**
2163
+ * Mask Position
2164
+ * @see https://tailwindcss.com/docs/mask-position
2165
+ */
2166
+ "mask-position": [{
2167
+ mask: scaleBgPosition()
2168
+ }],
2169
+ /**
2170
+ * Mask Repeat
2171
+ * @see https://tailwindcss.com/docs/mask-repeat
2172
+ */
2173
+ "mask-repeat": [{
2174
+ mask: scaleBgRepeat()
2175
+ }],
2176
+ /**
2177
+ * Mask Size
2178
+ * @see https://tailwindcss.com/docs/mask-size
2179
+ */
2180
+ "mask-size": [{
2181
+ mask: scaleBgSize()
2182
+ }],
2183
+ /**
2184
+ * Mask Type
2185
+ * @see https://tailwindcss.com/docs/mask-type
2186
+ */
2187
+ "mask-type": [{
2188
+ "mask-type": ["alpha", "luminance"]
2189
+ }],
2190
+ /**
2191
+ * Mask Image
2192
+ * @see https://tailwindcss.com/docs/mask-image
2193
+ */
2194
+ "mask-image": [{
2195
+ mask: ["none", isArbitraryVariable, isArbitraryValue]
2196
+ }],
2197
+ // ---------------
2198
+ // --- Filters ---
2199
+ // ---------------
2200
+ /**
2201
+ * Filter
2202
+ * @see https://tailwindcss.com/docs/filter
2203
+ */
2204
+ filter: [{
2205
+ filter: [
2206
+ // Deprecated since Tailwind CSS v3.0.0
2207
+ "",
2208
+ "none",
2209
+ isArbitraryVariable,
2210
+ isArbitraryValue
2211
+ ]
2212
+ }],
2213
+ /**
2214
+ * Blur
2215
+ * @see https://tailwindcss.com/docs/blur
2216
+ */
2217
+ blur: [{
2218
+ blur: scaleBlur()
2219
+ }],
2220
+ /**
2221
+ * Brightness
2222
+ * @see https://tailwindcss.com/docs/brightness
2223
+ */
2224
+ brightness: [{
2225
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
2226
+ }],
2227
+ /**
2228
+ * Contrast
2229
+ * @see https://tailwindcss.com/docs/contrast
2230
+ */
2231
+ contrast: [{
2232
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
2233
+ }],
2234
+ /**
2235
+ * Drop Shadow
2236
+ * @see https://tailwindcss.com/docs/drop-shadow
2237
+ */
2238
+ "drop-shadow": [{
2239
+ "drop-shadow": [
2240
+ // Deprecated since Tailwind CSS v4.0.0
2241
+ "",
2242
+ "none",
2243
+ themeDropShadow,
2244
+ isArbitraryVariableShadow,
2245
+ isArbitraryShadow
2246
+ ]
2247
+ }],
2248
+ /**
2249
+ * Drop Shadow Color
2250
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2251
+ */
2252
+ "drop-shadow-color": [{
2253
+ "drop-shadow": scaleColor()
2254
+ }],
2255
+ /**
2256
+ * Grayscale
2257
+ * @see https://tailwindcss.com/docs/grayscale
2258
+ */
2259
+ grayscale: [{
2260
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2261
+ }],
2262
+ /**
2263
+ * Hue Rotate
2264
+ * @see https://tailwindcss.com/docs/hue-rotate
2265
+ */
2266
+ "hue-rotate": [{
2267
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2268
+ }],
2269
+ /**
2270
+ * Invert
2271
+ * @see https://tailwindcss.com/docs/invert
2272
+ */
2273
+ invert: [{
2274
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2275
+ }],
2276
+ /**
2277
+ * Saturate
2278
+ * @see https://tailwindcss.com/docs/saturate
2279
+ */
2280
+ saturate: [{
2281
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
2282
+ }],
2283
+ /**
2284
+ * Sepia
2285
+ * @see https://tailwindcss.com/docs/sepia
2286
+ */
2287
+ sepia: [{
2288
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2289
+ }],
2290
+ /**
2291
+ * Backdrop Filter
2292
+ * @see https://tailwindcss.com/docs/backdrop-filter
2293
+ */
2294
+ "backdrop-filter": [{
2295
+ "backdrop-filter": [
2296
+ // Deprecated since Tailwind CSS v3.0.0
2297
+ "",
2298
+ "none",
2299
+ isArbitraryVariable,
2300
+ isArbitraryValue
2301
+ ]
2302
+ }],
2303
+ /**
2304
+ * Backdrop Blur
2305
+ * @see https://tailwindcss.com/docs/backdrop-blur
2306
+ */
2307
+ "backdrop-blur": [{
2308
+ "backdrop-blur": scaleBlur()
2309
+ }],
2310
+ /**
2311
+ * Backdrop Brightness
2312
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2313
+ */
2314
+ "backdrop-brightness": [{
2315
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
2316
+ }],
2317
+ /**
2318
+ * Backdrop Contrast
2319
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2320
+ */
2321
+ "backdrop-contrast": [{
2322
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
2323
+ }],
2324
+ /**
2325
+ * Backdrop Grayscale
2326
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2327
+ */
2328
+ "backdrop-grayscale": [{
2329
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2330
+ }],
2331
+ /**
2332
+ * Backdrop Hue Rotate
2333
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2334
+ */
2335
+ "backdrop-hue-rotate": [{
2336
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2337
+ }],
2338
+ /**
2339
+ * Backdrop Invert
2340
+ * @see https://tailwindcss.com/docs/backdrop-invert
2341
+ */
2342
+ "backdrop-invert": [{
2343
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2344
+ }],
2345
+ /**
2346
+ * Backdrop Opacity
2347
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2348
+ */
2349
+ "backdrop-opacity": [{
2350
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
2351
+ }],
2352
+ /**
2353
+ * Backdrop Saturate
2354
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2355
+ */
2356
+ "backdrop-saturate": [{
2357
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
2358
+ }],
2359
+ /**
2360
+ * Backdrop Sepia
2361
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2362
+ */
2363
+ "backdrop-sepia": [{
2364
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2365
+ }],
2366
+ // --------------
2367
+ // --- Tables ---
2368
+ // --------------
2369
+ /**
2370
+ * Border Collapse
2371
+ * @see https://tailwindcss.com/docs/border-collapse
2372
+ */
2373
+ "border-collapse": [{
2374
+ border: ["collapse", "separate"]
2375
+ }],
2376
+ /**
2377
+ * Border Spacing
2378
+ * @see https://tailwindcss.com/docs/border-spacing
2379
+ */
2380
+ "border-spacing": [{
2381
+ "border-spacing": scaleUnambiguousSpacing()
2382
+ }],
2383
+ /**
2384
+ * Border Spacing X
2385
+ * @see https://tailwindcss.com/docs/border-spacing
2386
+ */
2387
+ "border-spacing-x": [{
2388
+ "border-spacing-x": scaleUnambiguousSpacing()
2389
+ }],
2390
+ /**
2391
+ * Border Spacing Y
2392
+ * @see https://tailwindcss.com/docs/border-spacing
2393
+ */
2394
+ "border-spacing-y": [{
2395
+ "border-spacing-y": scaleUnambiguousSpacing()
2396
+ }],
2397
+ /**
2398
+ * Table Layout
2399
+ * @see https://tailwindcss.com/docs/table-layout
2400
+ */
2401
+ "table-layout": [{
2402
+ table: ["auto", "fixed"]
2403
+ }],
2404
+ /**
2405
+ * Caption Side
2406
+ * @see https://tailwindcss.com/docs/caption-side
2407
+ */
2408
+ caption: [{
2409
+ caption: ["top", "bottom"]
2410
+ }],
2411
+ // ---------------------------------
2412
+ // --- Transitions and Animation ---
2413
+ // ---------------------------------
2414
+ /**
2415
+ * Transition Property
2416
+ * @see https://tailwindcss.com/docs/transition-property
2417
+ */
2418
+ transition: [{
2419
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
2420
+ }],
2421
+ /**
2422
+ * Transition Behavior
2423
+ * @see https://tailwindcss.com/docs/transition-behavior
2424
+ */
2425
+ "transition-behavior": [{
2426
+ transition: ["normal", "discrete"]
2427
+ }],
2428
+ /**
2429
+ * Transition Duration
2430
+ * @see https://tailwindcss.com/docs/transition-duration
2431
+ */
2432
+ duration: [{
2433
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
2434
+ }],
2435
+ /**
2436
+ * Transition Timing Function
2437
+ * @see https://tailwindcss.com/docs/transition-timing-function
2438
+ */
2439
+ ease: [{
2440
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
2441
+ }],
2442
+ /**
2443
+ * Transition Delay
2444
+ * @see https://tailwindcss.com/docs/transition-delay
2445
+ */
2446
+ delay: [{
2447
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2448
+ }],
2449
+ /**
2450
+ * Animation
2451
+ * @see https://tailwindcss.com/docs/animation
2452
+ */
2453
+ animate: [{
2454
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
2455
+ }],
2456
+ // ------------------
2457
+ // --- Transforms ---
2458
+ // ------------------
2459
+ /**
2460
+ * Backface Visibility
2461
+ * @see https://tailwindcss.com/docs/backface-visibility
2462
+ */
2463
+ backface: [{
2464
+ backface: ["hidden", "visible"]
2465
+ }],
2466
+ /**
2467
+ * Perspective
2468
+ * @see https://tailwindcss.com/docs/perspective
2469
+ */
2470
+ perspective: [{
2471
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2472
+ }],
2473
+ /**
2474
+ * Perspective Origin
2475
+ * @see https://tailwindcss.com/docs/perspective-origin
2476
+ */
2477
+ "perspective-origin": [{
2478
+ "perspective-origin": scalePositionWithArbitrary()
2479
+ }],
2480
+ /**
2481
+ * Rotate
2482
+ * @see https://tailwindcss.com/docs/rotate
2483
+ */
2484
+ rotate: [{
2485
+ rotate: scaleRotate()
2486
+ }],
2487
+ /**
2488
+ * Rotate X
2489
+ * @see https://tailwindcss.com/docs/rotate
2490
+ */
2491
+ "rotate-x": [{
2492
+ "rotate-x": scaleRotate()
2493
+ }],
2494
+ /**
2495
+ * Rotate Y
2496
+ * @see https://tailwindcss.com/docs/rotate
2497
+ */
2498
+ "rotate-y": [{
2499
+ "rotate-y": scaleRotate()
2500
+ }],
2501
+ /**
2502
+ * Rotate Z
2503
+ * @see https://tailwindcss.com/docs/rotate
2504
+ */
2505
+ "rotate-z": [{
2506
+ "rotate-z": scaleRotate()
2507
+ }],
2508
+ /**
2509
+ * Scale
2510
+ * @see https://tailwindcss.com/docs/scale
2511
+ */
2512
+ scale: [{
2513
+ scale: scaleScale()
2514
+ }],
2515
+ /**
2516
+ * Scale X
2517
+ * @see https://tailwindcss.com/docs/scale
2518
+ */
2519
+ "scale-x": [{
2520
+ "scale-x": scaleScale()
2521
+ }],
2522
+ /**
2523
+ * Scale Y
2524
+ * @see https://tailwindcss.com/docs/scale
2525
+ */
2526
+ "scale-y": [{
2527
+ "scale-y": scaleScale()
2528
+ }],
2529
+ /**
2530
+ * Scale Z
2531
+ * @see https://tailwindcss.com/docs/scale
2532
+ */
2533
+ "scale-z": [{
2534
+ "scale-z": scaleScale()
2535
+ }],
2536
+ /**
2537
+ * Scale 3D
2538
+ * @see https://tailwindcss.com/docs/scale
2539
+ */
2540
+ "scale-3d": ["scale-3d"],
2541
+ /**
2542
+ * Skew
2543
+ * @see https://tailwindcss.com/docs/skew
2544
+ */
2545
+ skew: [{
2546
+ skew: scaleSkew()
2547
+ }],
2548
+ /**
2549
+ * Skew X
2550
+ * @see https://tailwindcss.com/docs/skew
2551
+ */
2552
+ "skew-x": [{
2553
+ "skew-x": scaleSkew()
2554
+ }],
2555
+ /**
2556
+ * Skew Y
2557
+ * @see https://tailwindcss.com/docs/skew
2558
+ */
2559
+ "skew-y": [{
2560
+ "skew-y": scaleSkew()
2561
+ }],
2562
+ /**
2563
+ * Transform
2564
+ * @see https://tailwindcss.com/docs/transform
2565
+ */
2566
+ transform: [{
2567
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
2568
+ }],
2569
+ /**
2570
+ * Transform Origin
2571
+ * @see https://tailwindcss.com/docs/transform-origin
2572
+ */
2573
+ "transform-origin": [{
2574
+ origin: scalePositionWithArbitrary()
2575
+ }],
2576
+ /**
2577
+ * Transform Style
2578
+ * @see https://tailwindcss.com/docs/transform-style
2579
+ */
2580
+ "transform-style": [{
2581
+ transform: ["3d", "flat"]
2582
+ }],
2583
+ /**
2584
+ * Translate
2585
+ * @see https://tailwindcss.com/docs/translate
2586
+ */
2587
+ translate: [{
2588
+ translate: scaleTranslate()
2589
+ }],
2590
+ /**
2591
+ * Translate X
2592
+ * @see https://tailwindcss.com/docs/translate
2593
+ */
2594
+ "translate-x": [{
2595
+ "translate-x": scaleTranslate()
2596
+ }],
2597
+ /**
2598
+ * Translate Y
2599
+ * @see https://tailwindcss.com/docs/translate
2600
+ */
2601
+ "translate-y": [{
2602
+ "translate-y": scaleTranslate()
2603
+ }],
2604
+ /**
2605
+ * Translate Z
2606
+ * @see https://tailwindcss.com/docs/translate
2607
+ */
2608
+ "translate-z": [{
2609
+ "translate-z": scaleTranslate()
2610
+ }],
2611
+ /**
2612
+ * Translate None
2613
+ * @see https://tailwindcss.com/docs/translate
2614
+ */
2615
+ "translate-none": ["translate-none"],
2616
+ // ---------------------
2617
+ // --- Interactivity ---
2618
+ // ---------------------
2619
+ /**
2620
+ * Accent Color
2621
+ * @see https://tailwindcss.com/docs/accent-color
2622
+ */
2623
+ accent: [{
2624
+ accent: scaleColor()
2625
+ }],
2626
+ /**
2627
+ * Appearance
2628
+ * @see https://tailwindcss.com/docs/appearance
2629
+ */
2630
+ appearance: [{
2631
+ appearance: ["none", "auto"]
2632
+ }],
2633
+ /**
2634
+ * Caret Color
2635
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2636
+ */
2637
+ "caret-color": [{
2638
+ caret: scaleColor()
2639
+ }],
2640
+ /**
2641
+ * Color Scheme
2642
+ * @see https://tailwindcss.com/docs/color-scheme
2643
+ */
2644
+ "color-scheme": [{
2645
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
2646
+ }],
2647
+ /**
2648
+ * Cursor
2649
+ * @see https://tailwindcss.com/docs/cursor
2650
+ */
2651
+ cursor: [{
2652
+ 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", isArbitraryVariable, isArbitraryValue]
2653
+ }],
2654
+ /**
2655
+ * Field Sizing
2656
+ * @see https://tailwindcss.com/docs/field-sizing
2657
+ */
2658
+ "field-sizing": [{
2659
+ "field-sizing": ["fixed", "content"]
2660
+ }],
2661
+ /**
2662
+ * Pointer Events
2663
+ * @see https://tailwindcss.com/docs/pointer-events
2664
+ */
2665
+ "pointer-events": [{
2666
+ "pointer-events": ["auto", "none"]
2667
+ }],
2668
+ /**
2669
+ * Resize
2670
+ * @see https://tailwindcss.com/docs/resize
2671
+ */
2672
+ resize: [{
2673
+ resize: ["none", "", "y", "x"]
2674
+ }],
2675
+ /**
2676
+ * Scroll Behavior
2677
+ * @see https://tailwindcss.com/docs/scroll-behavior
2678
+ */
2679
+ "scroll-behavior": [{
2680
+ scroll: ["auto", "smooth"]
2681
+ }],
2682
+ /**
2683
+ * Scroll Margin
2684
+ * @see https://tailwindcss.com/docs/scroll-margin
2685
+ */
2686
+ "scroll-m": [{
2687
+ "scroll-m": scaleUnambiguousSpacing()
2688
+ }],
2689
+ /**
2690
+ * Scroll Margin X
2691
+ * @see https://tailwindcss.com/docs/scroll-margin
2692
+ */
2693
+ "scroll-mx": [{
2694
+ "scroll-mx": scaleUnambiguousSpacing()
2695
+ }],
2696
+ /**
2697
+ * Scroll Margin Y
2698
+ * @see https://tailwindcss.com/docs/scroll-margin
2699
+ */
2700
+ "scroll-my": [{
2701
+ "scroll-my": scaleUnambiguousSpacing()
2702
+ }],
2703
+ /**
2704
+ * Scroll Margin Start
2705
+ * @see https://tailwindcss.com/docs/scroll-margin
2706
+ */
2707
+ "scroll-ms": [{
2708
+ "scroll-ms": scaleUnambiguousSpacing()
2709
+ }],
2710
+ /**
2711
+ * Scroll Margin End
2712
+ * @see https://tailwindcss.com/docs/scroll-margin
2713
+ */
2714
+ "scroll-me": [{
2715
+ "scroll-me": scaleUnambiguousSpacing()
2716
+ }],
2717
+ /**
2718
+ * Scroll Margin Top
2719
+ * @see https://tailwindcss.com/docs/scroll-margin
2720
+ */
2721
+ "scroll-mt": [{
2722
+ "scroll-mt": scaleUnambiguousSpacing()
2723
+ }],
2724
+ /**
2725
+ * Scroll Margin Right
2726
+ * @see https://tailwindcss.com/docs/scroll-margin
2727
+ */
2728
+ "scroll-mr": [{
2729
+ "scroll-mr": scaleUnambiguousSpacing()
2730
+ }],
2731
+ /**
2732
+ * Scroll Margin Bottom
2733
+ * @see https://tailwindcss.com/docs/scroll-margin
2734
+ */
2735
+ "scroll-mb": [{
2736
+ "scroll-mb": scaleUnambiguousSpacing()
2737
+ }],
2738
+ /**
2739
+ * Scroll Margin Left
2740
+ * @see https://tailwindcss.com/docs/scroll-margin
2741
+ */
2742
+ "scroll-ml": [{
2743
+ "scroll-ml": scaleUnambiguousSpacing()
2744
+ }],
2745
+ /**
2746
+ * Scroll Padding
2747
+ * @see https://tailwindcss.com/docs/scroll-padding
2748
+ */
2749
+ "scroll-p": [{
2750
+ "scroll-p": scaleUnambiguousSpacing()
2751
+ }],
2752
+ /**
2753
+ * Scroll Padding X
2754
+ * @see https://tailwindcss.com/docs/scroll-padding
2755
+ */
2756
+ "scroll-px": [{
2757
+ "scroll-px": scaleUnambiguousSpacing()
2758
+ }],
2759
+ /**
2760
+ * Scroll Padding Y
2761
+ * @see https://tailwindcss.com/docs/scroll-padding
2762
+ */
2763
+ "scroll-py": [{
2764
+ "scroll-py": scaleUnambiguousSpacing()
2765
+ }],
2766
+ /**
2767
+ * Scroll Padding Start
2768
+ * @see https://tailwindcss.com/docs/scroll-padding
2769
+ */
2770
+ "scroll-ps": [{
2771
+ "scroll-ps": scaleUnambiguousSpacing()
2772
+ }],
2773
+ /**
2774
+ * Scroll Padding End
2775
+ * @see https://tailwindcss.com/docs/scroll-padding
2776
+ */
2777
+ "scroll-pe": [{
2778
+ "scroll-pe": scaleUnambiguousSpacing()
2779
+ }],
2780
+ /**
2781
+ * Scroll Padding Top
2782
+ * @see https://tailwindcss.com/docs/scroll-padding
2783
+ */
2784
+ "scroll-pt": [{
2785
+ "scroll-pt": scaleUnambiguousSpacing()
2786
+ }],
2787
+ /**
2788
+ * Scroll Padding Right
2789
+ * @see https://tailwindcss.com/docs/scroll-padding
2790
+ */
2791
+ "scroll-pr": [{
2792
+ "scroll-pr": scaleUnambiguousSpacing()
2793
+ }],
2794
+ /**
2795
+ * Scroll Padding Bottom
2796
+ * @see https://tailwindcss.com/docs/scroll-padding
2797
+ */
2798
+ "scroll-pb": [{
2799
+ "scroll-pb": scaleUnambiguousSpacing()
2800
+ }],
2801
+ /**
2802
+ * Scroll Padding Left
2803
+ * @see https://tailwindcss.com/docs/scroll-padding
2804
+ */
2805
+ "scroll-pl": [{
2806
+ "scroll-pl": scaleUnambiguousSpacing()
2807
+ }],
2808
+ /**
2809
+ * Scroll Snap Align
2810
+ * @see https://tailwindcss.com/docs/scroll-snap-align
2811
+ */
2812
+ "snap-align": [{
2813
+ snap: ["start", "end", "center", "align-none"]
2814
+ }],
2815
+ /**
2816
+ * Scroll Snap Stop
2817
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
2818
+ */
2819
+ "snap-stop": [{
2820
+ snap: ["normal", "always"]
2821
+ }],
2822
+ /**
2823
+ * Scroll Snap Type
2824
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2825
+ */
2826
+ "snap-type": [{
2827
+ snap: ["none", "x", "y", "both"]
2828
+ }],
2829
+ /**
2830
+ * Scroll Snap Type Strictness
2831
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2832
+ */
2833
+ "snap-strictness": [{
2834
+ snap: ["mandatory", "proximity"]
2835
+ }],
2836
+ /**
2837
+ * Touch Action
2838
+ * @see https://tailwindcss.com/docs/touch-action
2839
+ */
2840
+ touch: [{
2841
+ touch: ["auto", "none", "manipulation"]
2842
+ }],
2843
+ /**
2844
+ * Touch Action X
2845
+ * @see https://tailwindcss.com/docs/touch-action
2846
+ */
2847
+ "touch-x": [{
2848
+ "touch-pan": ["x", "left", "right"]
2849
+ }],
2850
+ /**
2851
+ * Touch Action Y
2852
+ * @see https://tailwindcss.com/docs/touch-action
2853
+ */
2854
+ "touch-y": [{
2855
+ "touch-pan": ["y", "up", "down"]
2856
+ }],
2857
+ /**
2858
+ * Touch Action Pinch Zoom
2859
+ * @see https://tailwindcss.com/docs/touch-action
2860
+ */
2861
+ "touch-pz": ["touch-pinch-zoom"],
2862
+ /**
2863
+ * User Select
2864
+ * @see https://tailwindcss.com/docs/user-select
2865
+ */
2866
+ select: [{
2867
+ select: ["none", "text", "all", "auto"]
2868
+ }],
2869
+ /**
2870
+ * Will Change
2871
+ * @see https://tailwindcss.com/docs/will-change
2872
+ */
2873
+ "will-change": [{
2874
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
2875
+ }],
2876
+ // -----------
2877
+ // --- SVG ---
2878
+ // -----------
2879
+ /**
2880
+ * Fill
2881
+ * @see https://tailwindcss.com/docs/fill
2882
+ */
2883
+ fill: [{
2884
+ fill: ["none", ...scaleColor()]
2885
+ }],
2886
+ /**
2887
+ * Stroke Width
2888
+ * @see https://tailwindcss.com/docs/stroke-width
2889
+ */
2890
+ "stroke-w": [{
2891
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
2892
+ }],
2893
+ /**
2894
+ * Stroke
2895
+ * @see https://tailwindcss.com/docs/stroke
2896
+ */
2897
+ stroke: [{
2898
+ stroke: ["none", ...scaleColor()]
2899
+ }],
2900
+ // ---------------------
2901
+ // --- Accessibility ---
2902
+ // ---------------------
2903
+ /**
2904
+ * Forced Color Adjust
2905
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2906
+ */
2907
+ "forced-color-adjust": [{
2908
+ "forced-color-adjust": ["auto", "none"]
2909
+ }]
2910
+ },
2911
+ conflictingClassGroups: {
2912
+ overflow: ["overflow-x", "overflow-y"],
2913
+ overscroll: ["overscroll-x", "overscroll-y"],
2914
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2915
+ "inset-x": ["right", "left"],
2916
+ "inset-y": ["top", "bottom"],
2917
+ flex: ["basis", "grow", "shrink"],
2918
+ gap: ["gap-x", "gap-y"],
2919
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2920
+ px: ["pr", "pl"],
2921
+ py: ["pt", "pb"],
2922
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2923
+ mx: ["mr", "ml"],
2924
+ my: ["mt", "mb"],
2925
+ size: ["w", "h"],
2926
+ "font-size": ["leading"],
2927
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2928
+ "fvn-ordinal": ["fvn-normal"],
2929
+ "fvn-slashed-zero": ["fvn-normal"],
2930
+ "fvn-figure": ["fvn-normal"],
2931
+ "fvn-spacing": ["fvn-normal"],
2932
+ "fvn-fraction": ["fvn-normal"],
2933
+ "line-clamp": ["display", "overflow"],
2934
+ 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"],
2935
+ "rounded-s": ["rounded-ss", "rounded-es"],
2936
+ "rounded-e": ["rounded-se", "rounded-ee"],
2937
+ "rounded-t": ["rounded-tl", "rounded-tr"],
2938
+ "rounded-r": ["rounded-tr", "rounded-br"],
2939
+ "rounded-b": ["rounded-br", "rounded-bl"],
2940
+ "rounded-l": ["rounded-tl", "rounded-bl"],
2941
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
2942
+ "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2943
+ "border-w-x": ["border-w-r", "border-w-l"],
2944
+ "border-w-y": ["border-w-t", "border-w-b"],
2945
+ "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2946
+ "border-color-x": ["border-color-r", "border-color-l"],
2947
+ "border-color-y": ["border-color-t", "border-color-b"],
2948
+ translate: ["translate-x", "translate-y", "translate-none"],
2949
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
2950
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2951
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
2952
+ "scroll-my": ["scroll-mt", "scroll-mb"],
2953
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2954
+ "scroll-px": ["scroll-pr", "scroll-pl"],
2955
+ "scroll-py": ["scroll-pt", "scroll-pb"],
2956
+ touch: ["touch-x", "touch-y", "touch-pz"],
2957
+ "touch-x": ["touch"],
2958
+ "touch-y": ["touch"],
2959
+ "touch-pz": ["touch"]
2960
+ },
2961
+ conflictingClassGroupModifiers: {
2962
+ "font-size": ["leading"]
2963
+ },
2964
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
2965
+ };
2966
+ };
2967
+ const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
2968
+ function cn(...inputs) {
2969
+ return twMerge(clsx(inputs));
2970
+ }
2971
+ var jsxRuntime = { exports: {} };
2972
+ var reactJsxRuntime_production = {};
2973
+ /**
2974
+ * @license React
2975
+ * react-jsx-runtime.production.js
2976
+ *
2977
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2978
+ *
2979
+ * This source code is licensed under the MIT license found in the
2980
+ * LICENSE file in the root directory of this source tree.
2981
+ */
2982
+ var hasRequiredReactJsxRuntime_production;
2983
+ function requireReactJsxRuntime_production() {
2984
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
2985
+ hasRequiredReactJsxRuntime_production = 1;
2986
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
2987
+ function jsxProd(type, config, maybeKey) {
2988
+ var key = null;
2989
+ void 0 !== maybeKey && (key = "" + maybeKey);
2990
+ void 0 !== config.key && (key = "" + config.key);
2991
+ if ("key" in config) {
2992
+ maybeKey = {};
2993
+ for (var propName in config)
2994
+ "key" !== propName && (maybeKey[propName] = config[propName]);
2995
+ } else maybeKey = config;
2996
+ config = maybeKey.ref;
2997
+ return {
2998
+ $$typeof: REACT_ELEMENT_TYPE,
2999
+ type,
3000
+ key,
3001
+ ref: void 0 !== config ? config : null,
3002
+ props: maybeKey
3003
+ };
3004
+ }
3005
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
3006
+ reactJsxRuntime_production.jsx = jsxProd;
3007
+ reactJsxRuntime_production.jsxs = jsxProd;
3008
+ return reactJsxRuntime_production;
3009
+ }
3010
+ var reactJsxRuntime_development = {};
3011
+ /**
3012
+ * @license React
3013
+ * react-jsx-runtime.development.js
3014
+ *
3015
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3016
+ *
3017
+ * This source code is licensed under the MIT license found in the
3018
+ * LICENSE file in the root directory of this source tree.
3019
+ */
3020
+ var hasRequiredReactJsxRuntime_development;
3021
+ function requireReactJsxRuntime_development() {
3022
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
3023
+ hasRequiredReactJsxRuntime_development = 1;
3024
+ "production" !== process.env.NODE_ENV && (function() {
3025
+ function getComponentNameFromType(type) {
3026
+ if (null == type) return null;
3027
+ if ("function" === typeof type)
3028
+ return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
3029
+ if ("string" === typeof type) return type;
3030
+ switch (type) {
3031
+ case REACT_FRAGMENT_TYPE:
3032
+ return "Fragment";
3033
+ case REACT_PROFILER_TYPE:
3034
+ return "Profiler";
3035
+ case REACT_STRICT_MODE_TYPE:
3036
+ return "StrictMode";
3037
+ case REACT_SUSPENSE_TYPE:
3038
+ return "Suspense";
3039
+ case REACT_SUSPENSE_LIST_TYPE:
3040
+ return "SuspenseList";
3041
+ case REACT_ACTIVITY_TYPE:
3042
+ return "Activity";
3043
+ }
3044
+ if ("object" === typeof type)
3045
+ switch ("number" === typeof type.tag && console.error(
3046
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
3047
+ ), type.$$typeof) {
3048
+ case REACT_PORTAL_TYPE:
3049
+ return "Portal";
3050
+ case REACT_CONTEXT_TYPE:
3051
+ return (type.displayName || "Context") + ".Provider";
3052
+ case REACT_CONSUMER_TYPE:
3053
+ return (type._context.displayName || "Context") + ".Consumer";
3054
+ case REACT_FORWARD_REF_TYPE:
3055
+ var innerType = type.render;
3056
+ type = type.displayName;
3057
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
3058
+ return type;
3059
+ case REACT_MEMO_TYPE:
3060
+ return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
3061
+ case REACT_LAZY_TYPE:
3062
+ innerType = type._payload;
3063
+ type = type._init;
3064
+ try {
3065
+ return getComponentNameFromType(type(innerType));
3066
+ } catch (x) {
3067
+ }
3068
+ }
3069
+ return null;
3070
+ }
3071
+ function testStringCoercion(value) {
3072
+ return "" + value;
3073
+ }
3074
+ function checkKeyStringCoercion(value) {
3075
+ try {
3076
+ testStringCoercion(value);
3077
+ var JSCompiler_inline_result = false;
3078
+ } catch (e) {
3079
+ JSCompiler_inline_result = true;
3080
+ }
3081
+ if (JSCompiler_inline_result) {
3082
+ JSCompiler_inline_result = console;
3083
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
3084
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
3085
+ JSCompiler_temp_const.call(
3086
+ JSCompiler_inline_result,
3087
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
3088
+ JSCompiler_inline_result$jscomp$0
3089
+ );
3090
+ return testStringCoercion(value);
3091
+ }
3092
+ }
3093
+ function getTaskName(type) {
3094
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
3095
+ if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
3096
+ return "<...>";
3097
+ try {
3098
+ var name = getComponentNameFromType(type);
3099
+ return name ? "<" + name + ">" : "<...>";
3100
+ } catch (x) {
3101
+ return "<...>";
3102
+ }
3103
+ }
3104
+ function getOwner() {
3105
+ var dispatcher = ReactSharedInternals.A;
3106
+ return null === dispatcher ? null : dispatcher.getOwner();
3107
+ }
3108
+ function UnknownOwner() {
3109
+ return Error("react-stack-top-frame");
3110
+ }
3111
+ function hasValidKey(config) {
3112
+ if (hasOwnProperty.call(config, "key")) {
3113
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
3114
+ if (getter && getter.isReactWarning) return false;
3115
+ }
3116
+ return void 0 !== config.key;
3117
+ }
3118
+ function defineKeyPropWarningGetter(props, displayName) {
3119
+ function warnAboutAccessingKey() {
3120
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
3121
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
3122
+ displayName
3123
+ ));
3124
+ }
3125
+ warnAboutAccessingKey.isReactWarning = true;
3126
+ Object.defineProperty(props, "key", {
3127
+ get: warnAboutAccessingKey,
3128
+ configurable: true
3129
+ });
3130
+ }
3131
+ function elementRefGetterWithDeprecationWarning() {
3132
+ var componentName = getComponentNameFromType(this.type);
3133
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
3134
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
3135
+ ));
3136
+ componentName = this.props.ref;
3137
+ return void 0 !== componentName ? componentName : null;
3138
+ }
3139
+ function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
3140
+ self = props.ref;
3141
+ type = {
3142
+ $$typeof: REACT_ELEMENT_TYPE,
3143
+ type,
3144
+ key,
3145
+ props,
3146
+ _owner: owner
3147
+ };
3148
+ null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
3149
+ enumerable: false,
3150
+ get: elementRefGetterWithDeprecationWarning
3151
+ }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
3152
+ type._store = {};
3153
+ Object.defineProperty(type._store, "validated", {
3154
+ configurable: false,
3155
+ enumerable: false,
3156
+ writable: true,
3157
+ value: 0
3158
+ });
3159
+ Object.defineProperty(type, "_debugInfo", {
3160
+ configurable: false,
3161
+ enumerable: false,
3162
+ writable: true,
3163
+ value: null
3164
+ });
3165
+ Object.defineProperty(type, "_debugStack", {
3166
+ configurable: false,
3167
+ enumerable: false,
3168
+ writable: true,
3169
+ value: debugStack
3170
+ });
3171
+ Object.defineProperty(type, "_debugTask", {
3172
+ configurable: false,
3173
+ enumerable: false,
3174
+ writable: true,
3175
+ value: debugTask
3176
+ });
3177
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
3178
+ return type;
3179
+ }
3180
+ function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
3181
+ var children = config.children;
3182
+ if (void 0 !== children)
3183
+ if (isStaticChildren)
3184
+ if (isArrayImpl(children)) {
3185
+ for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
3186
+ validateChildKeys(children[isStaticChildren]);
3187
+ Object.freeze && Object.freeze(children);
3188
+ } else
3189
+ console.error(
3190
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
3191
+ );
3192
+ else validateChildKeys(children);
3193
+ if (hasOwnProperty.call(config, "key")) {
3194
+ children = getComponentNameFromType(type);
3195
+ var keys = Object.keys(config).filter(function(k) {
3196
+ return "key" !== k;
3197
+ });
3198
+ isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
3199
+ didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
3200
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
3201
+ isStaticChildren,
3202
+ children,
3203
+ keys,
3204
+ children
3205
+ ), didWarnAboutKeySpread[children + isStaticChildren] = true);
3206
+ }
3207
+ children = null;
3208
+ void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
3209
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
3210
+ if ("key" in config) {
3211
+ maybeKey = {};
3212
+ for (var propName in config)
3213
+ "key" !== propName && (maybeKey[propName] = config[propName]);
3214
+ } else maybeKey = config;
3215
+ children && defineKeyPropWarningGetter(
3216
+ maybeKey,
3217
+ "function" === typeof type ? type.displayName || type.name || "Unknown" : type
3218
+ );
3219
+ return ReactElement(
3220
+ type,
3221
+ children,
3222
+ self,
3223
+ source,
3224
+ getOwner(),
3225
+ maybeKey,
3226
+ debugStack,
3227
+ debugTask
3228
+ );
3229
+ }
3230
+ function validateChildKeys(node) {
3231
+ "object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
3232
+ }
3233
+ var React2 = React__default, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
3234
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
3235
+ return null;
3236
+ };
3237
+ React2 = {
3238
+ react_stack_bottom_frame: function(callStackForError) {
3239
+ return callStackForError();
3240
+ }
3241
+ };
3242
+ var specialPropKeyWarningShown;
3243
+ var didWarnAboutElementRef = {};
3244
+ var unknownOwnerDebugStack = React2.react_stack_bottom_frame.bind(
3245
+ React2,
3246
+ UnknownOwner
3247
+ )();
3248
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
3249
+ var didWarnAboutKeySpread = {};
3250
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
3251
+ reactJsxRuntime_development.jsx = function(type, config, maybeKey, source, self) {
3252
+ var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
3253
+ return jsxDEVImpl(
3254
+ type,
3255
+ config,
3256
+ maybeKey,
3257
+ false,
3258
+ source,
3259
+ self,
3260
+ trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
3261
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
3262
+ );
3263
+ };
3264
+ reactJsxRuntime_development.jsxs = function(type, config, maybeKey, source, self) {
3265
+ var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
3266
+ return jsxDEVImpl(
3267
+ type,
3268
+ config,
3269
+ maybeKey,
3270
+ true,
3271
+ source,
3272
+ self,
3273
+ trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
3274
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
3275
+ );
3276
+ };
3277
+ })();
3278
+ return reactJsxRuntime_development;
3279
+ }
3280
+ var hasRequiredJsxRuntime;
3281
+ function requireJsxRuntime() {
3282
+ if (hasRequiredJsxRuntime) return jsxRuntime.exports;
3283
+ hasRequiredJsxRuntime = 1;
3284
+ if (process.env.NODE_ENV === "production") {
3285
+ jsxRuntime.exports = requireReactJsxRuntime_production();
3286
+ } else {
3287
+ jsxRuntime.exports = requireReactJsxRuntime_development();
3288
+ }
3289
+ return jsxRuntime.exports;
3290
+ }
3291
+ var jsxRuntimeExports = requireJsxRuntime();
3292
+ function setRef(ref, value) {
3293
+ if (typeof ref === "function") {
3294
+ return ref(value);
3295
+ } else if (ref !== null && ref !== void 0) {
3296
+ ref.current = value;
3297
+ }
3298
+ }
3299
+ function composeRefs(...refs) {
3300
+ return (node) => {
3301
+ let hasCleanup = false;
3302
+ const cleanups = refs.map((ref) => {
3303
+ const cleanup = setRef(ref, node);
3304
+ if (!hasCleanup && typeof cleanup == "function") {
3305
+ hasCleanup = true;
3306
+ }
3307
+ return cleanup;
3308
+ });
3309
+ if (hasCleanup) {
3310
+ return () => {
3311
+ for (let i = 0; i < cleanups.length; i++) {
3312
+ const cleanup = cleanups[i];
3313
+ if (typeof cleanup == "function") {
3314
+ cleanup();
3315
+ } else {
3316
+ setRef(refs[i], null);
3317
+ }
3318
+ }
3319
+ };
3320
+ }
3321
+ };
3322
+ }
3323
+ function useComposedRefs(...refs) {
3324
+ return React.useCallback(composeRefs(...refs), refs);
3325
+ }
3326
+ // @__NO_SIDE_EFFECTS__
3327
+ function createSlot(ownerName) {
3328
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
3329
+ const Slot2 = React.forwardRef((props, forwardedRef) => {
3330
+ const { children, ...slotProps } = props;
3331
+ const childrenArray = React.Children.toArray(children);
3332
+ const slottable = childrenArray.find(isSlottable);
3333
+ if (slottable) {
3334
+ const newElement = slottable.props.children;
3335
+ const newChildren = childrenArray.map((child) => {
3336
+ if (child === slottable) {
3337
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
3338
+ return React.isValidElement(newElement) ? newElement.props.children : null;
3339
+ } else {
3340
+ return child;
3341
+ }
3342
+ });
3343
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
3344
+ }
3345
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
3346
+ });
3347
+ Slot2.displayName = `${ownerName}.Slot`;
3348
+ return Slot2;
3349
+ }
3350
+ var Slot = /* @__PURE__ */ createSlot("Slot");
3351
+ // @__NO_SIDE_EFFECTS__
3352
+ function createSlotClone(ownerName) {
3353
+ const SlotClone = React.forwardRef((props, forwardedRef) => {
3354
+ const { children, ...slotProps } = props;
3355
+ if (React.isValidElement(children)) {
3356
+ const childrenRef = getElementRef$1(children);
3357
+ const props2 = mergeProps(slotProps, children.props);
3358
+ if (children.type !== React.Fragment) {
3359
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
3360
+ }
3361
+ return React.cloneElement(children, props2);
3362
+ }
3363
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
3364
+ });
3365
+ SlotClone.displayName = `${ownerName}.SlotClone`;
3366
+ return SlotClone;
3367
+ }
3368
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
3369
+ function isSlottable(child) {
3370
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
3371
+ }
3372
+ function mergeProps(slotProps, childProps) {
3373
+ const overrideProps = { ...childProps };
3374
+ for (const propName in childProps) {
3375
+ const slotPropValue = slotProps[propName];
3376
+ const childPropValue = childProps[propName];
3377
+ const isHandler = /^on[A-Z]/.test(propName);
3378
+ if (isHandler) {
3379
+ if (slotPropValue && childPropValue) {
3380
+ overrideProps[propName] = (...args) => {
3381
+ const result = childPropValue(...args);
3382
+ slotPropValue(...args);
3383
+ return result;
3384
+ };
3385
+ } else if (slotPropValue) {
3386
+ overrideProps[propName] = slotPropValue;
3387
+ }
3388
+ } else if (propName === "style") {
3389
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
3390
+ } else if (propName === "className") {
3391
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
3392
+ }
3393
+ }
3394
+ return { ...slotProps, ...overrideProps };
3395
+ }
3396
+ function getElementRef$1(element) {
3397
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
3398
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
3399
+ if (mayWarn) {
3400
+ return element.ref;
3401
+ }
3402
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
3403
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
3404
+ if (mayWarn) {
3405
+ return element.props.ref;
3406
+ }
3407
+ return element.props.ref || element.ref;
3408
+ }
3409
+ const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
3410
+ const cx = clsx;
3411
+ const cva = (base, config) => (props) => {
3412
+ var _config_compoundVariants;
3413
+ if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
3414
+ const { variants, defaultVariants } = config;
3415
+ const getVariantClassNames = Object.keys(variants).map((variant) => {
3416
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
3417
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
3418
+ if (variantProp === null) return null;
3419
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
3420
+ return variants[variant][variantKey];
3421
+ });
3422
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
3423
+ let [key, value] = param;
3424
+ if (value === void 0) {
3425
+ return acc;
3426
+ }
3427
+ acc[key] = value;
3428
+ return acc;
3429
+ }, {});
3430
+ const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
3431
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
3432
+ return Object.entries(compoundVariantOptions).every((param2) => {
3433
+ let [key, value] = param2;
3434
+ return Array.isArray(value) ? value.includes({
3435
+ ...defaultVariants,
3436
+ ...propsWithoutUndefined
3437
+ }[key]) : {
3438
+ ...defaultVariants,
3439
+ ...propsWithoutUndefined
3440
+ }[key] === value;
3441
+ }) ? [
3442
+ ...acc,
3443
+ cvClass,
3444
+ cvClassName
3445
+ ] : acc;
3446
+ }, []);
3447
+ return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
3448
+ };
3449
+ const buttonVariants = cva(
3450
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
3451
+ {
3452
+ variants: {
3453
+ variant: {
3454
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
3455
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
3456
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
3457
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
3458
+ ghost: "hover:bg-accent hover:text-accent-foreground",
3459
+ link: "text-primary underline-offset-4 hover:underline"
3460
+ },
3461
+ size: {
3462
+ default: "h-10 px-4 py-2",
3463
+ sm: "h-9 rounded-md px-3",
3464
+ lg: "h-11 rounded-md px-8",
3465
+ icon: "h-10 w-10"
3466
+ }
3467
+ },
3468
+ defaultVariants: {
3469
+ variant: "default",
3470
+ size: "default"
3471
+ }
3472
+ }
3473
+ );
3474
+ const Button = React.forwardRef(
3475
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
3476
+ const Comp = asChild ? Slot : "button";
3477
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
3478
+ Comp,
3479
+ {
3480
+ className: cn(buttonVariants({ variant, size, className })),
3481
+ ref,
3482
+ ...props
3483
+ }
3484
+ );
3485
+ }
3486
+ );
3487
+ Button.displayName = "Button";
3488
+ const Input = React.forwardRef(
3489
+ ({ className, type, ...props }, ref) => {
3490
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
3491
+ "input",
3492
+ {
3493
+ type,
3494
+ className: cn(
3495
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
3496
+ className
3497
+ ),
3498
+ ref,
3499
+ ...props
3500
+ }
3501
+ );
3502
+ }
3503
+ );
3504
+ Input.displayName = "Input";
3505
+ function activateCarbideTheme() {
3506
+ if (typeof document !== "undefined") {
3507
+ document.documentElement.classList.add("carbide");
3508
+ }
3509
+ }
3510
+ var NODES = [
3511
+ "a",
3512
+ "button",
3513
+ "div",
3514
+ "form",
3515
+ "h2",
3516
+ "h3",
3517
+ "img",
3518
+ "input",
3519
+ "label",
3520
+ "li",
3521
+ "nav",
3522
+ "ol",
3523
+ "p",
3524
+ "select",
3525
+ "span",
3526
+ "svg",
3527
+ "ul"
3528
+ ];
3529
+ var Primitive = NODES.reduce((primitive, node) => {
3530
+ const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
3531
+ const Node = React.forwardRef((props, forwardedRef) => {
3532
+ const { asChild, ...primitiveProps } = props;
3533
+ const Comp = asChild ? Slot2 : node;
3534
+ if (typeof window !== "undefined") {
3535
+ window[Symbol.for("radix-ui")] = true;
3536
+ }
3537
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
3538
+ });
3539
+ Node.displayName = `Primitive.${node}`;
3540
+ return { ...primitive, [node]: Node };
3541
+ }, {});
3542
+ var NAME = "Label";
3543
+ var Label$1 = React.forwardRef((props, forwardedRef) => {
3544
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
3545
+ Primitive.label,
3546
+ {
3547
+ ...props,
3548
+ ref: forwardedRef,
3549
+ onMouseDown: (event) => {
3550
+ const target = event.target;
3551
+ if (target.closest("button, input, select, textarea")) return;
3552
+ props.onMouseDown?.(event);
3553
+ if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
3554
+ }
3555
+ }
3556
+ );
3557
+ });
3558
+ Label$1.displayName = NAME;
3559
+ var Root$1 = Label$1;
3560
+ function Label({
3561
+ className,
3562
+ ...props
3563
+ }) {
3564
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
3565
+ Root$1,
3566
+ {
3567
+ "data-slot": "label",
3568
+ className: cn(
3569
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
3570
+ className
3571
+ ),
3572
+ ...props
3573
+ }
3574
+ );
3575
+ }
3576
+ function createContextScope(scopeName, createContextScopeDeps = []) {
3577
+ let defaultContexts = [];
3578
+ function createContext3(rootComponentName, defaultContext) {
3579
+ const BaseContext = React.createContext(defaultContext);
3580
+ const index = defaultContexts.length;
3581
+ defaultContexts = [...defaultContexts, defaultContext];
3582
+ const Provider = (props) => {
3583
+ const { scope, children, ...context } = props;
3584
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
3585
+ const value = React.useMemo(() => context, Object.values(context));
3586
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Context.Provider, { value, children });
3587
+ };
3588
+ Provider.displayName = rootComponentName + "Provider";
3589
+ function useContext2(consumerName, scope) {
3590
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
3591
+ const context = React.useContext(Context);
3592
+ if (context) return context;
3593
+ if (defaultContext !== void 0) return defaultContext;
3594
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
3595
+ }
3596
+ return [Provider, useContext2];
3597
+ }
3598
+ const createScope = () => {
3599
+ const scopeContexts = defaultContexts.map((defaultContext) => {
3600
+ return React.createContext(defaultContext);
3601
+ });
3602
+ return function useScope(scope) {
3603
+ const contexts = scope?.[scopeName] || scopeContexts;
3604
+ return React.useMemo(
3605
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
3606
+ [scope, contexts]
3607
+ );
3608
+ };
3609
+ };
3610
+ createScope.scopeName = scopeName;
3611
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
3612
+ }
3613
+ function composeContextScopes(...scopes) {
3614
+ const baseScope = scopes[0];
3615
+ if (scopes.length === 1) return baseScope;
3616
+ const createScope = () => {
3617
+ const scopeHooks = scopes.map((createScope2) => ({
3618
+ useScope: createScope2(),
3619
+ scopeName: createScope2.scopeName
3620
+ }));
3621
+ return function useComposedScopes(overrideScopes) {
3622
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
3623
+ const scopeProps = useScope(overrideScopes);
3624
+ const currentScope = scopeProps[`__scope${scopeName}`];
3625
+ return { ...nextScopes2, ...currentScope };
3626
+ }, {});
3627
+ return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
3628
+ };
3629
+ };
3630
+ createScope.scopeName = baseScope.scopeName;
3631
+ return createScope;
3632
+ }
3633
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
3634
+ return function handleEvent(event) {
3635
+ originalEventHandler?.(event);
3636
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
3637
+ return ourEventHandler?.(event);
3638
+ }
3639
+ };
3640
+ }
3641
+ var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
3642
+ };
3643
+ var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
3644
+ function useControllableState({
3645
+ prop,
3646
+ defaultProp,
3647
+ onChange = () => {
3648
+ },
3649
+ caller
3650
+ }) {
3651
+ const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
3652
+ defaultProp,
3653
+ onChange
3654
+ });
3655
+ const isControlled = prop !== void 0;
3656
+ const value = isControlled ? prop : uncontrolledProp;
3657
+ {
3658
+ const isControlledRef = React.useRef(prop !== void 0);
3659
+ React.useEffect(() => {
3660
+ const wasControlled = isControlledRef.current;
3661
+ if (wasControlled !== isControlled) {
3662
+ const from = wasControlled ? "controlled" : "uncontrolled";
3663
+ const to = isControlled ? "controlled" : "uncontrolled";
3664
+ console.warn(
3665
+ `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
3666
+ );
3667
+ }
3668
+ isControlledRef.current = isControlled;
3669
+ }, [isControlled, caller]);
3670
+ }
3671
+ const setValue = React.useCallback(
3672
+ (nextValue) => {
3673
+ if (isControlled) {
3674
+ const value2 = isFunction$1(nextValue) ? nextValue(prop) : nextValue;
3675
+ if (value2 !== prop) {
3676
+ onChangeRef.current?.(value2);
3677
+ }
3678
+ } else {
3679
+ setUncontrolledProp(nextValue);
3680
+ }
3681
+ },
3682
+ [isControlled, prop, setUncontrolledProp, onChangeRef]
3683
+ );
3684
+ return [value, setValue];
3685
+ }
3686
+ function useUncontrolledState({
3687
+ defaultProp,
3688
+ onChange
3689
+ }) {
3690
+ const [value, setValue] = React.useState(defaultProp);
3691
+ const prevValueRef = React.useRef(value);
3692
+ const onChangeRef = React.useRef(onChange);
3693
+ useInsertionEffect(() => {
3694
+ onChangeRef.current = onChange;
3695
+ }, [onChange]);
3696
+ React.useEffect(() => {
3697
+ if (prevValueRef.current !== value) {
3698
+ onChangeRef.current?.(value);
3699
+ prevValueRef.current = value;
3700
+ }
3701
+ }, [value, prevValueRef]);
3702
+ return [value, setValue, onChangeRef];
3703
+ }
3704
+ function isFunction$1(value) {
3705
+ return typeof value === "function";
3706
+ }
3707
+ function usePrevious(value) {
3708
+ const ref = React.useRef({ value, previous: value });
3709
+ return React.useMemo(() => {
3710
+ if (ref.current.value !== value) {
3711
+ ref.current.previous = ref.current.value;
3712
+ ref.current.value = value;
3713
+ }
3714
+ return ref.current.previous;
3715
+ }, [value]);
3716
+ }
3717
+ function useSize(element) {
3718
+ const [size, setSize] = React.useState(void 0);
3719
+ useLayoutEffect2(() => {
3720
+ if (element) {
3721
+ setSize({ width: element.offsetWidth, height: element.offsetHeight });
3722
+ const resizeObserver = new ResizeObserver((entries) => {
3723
+ if (!Array.isArray(entries)) {
3724
+ return;
3725
+ }
3726
+ if (!entries.length) {
3727
+ return;
3728
+ }
3729
+ const entry = entries[0];
3730
+ let width;
3731
+ let height;
3732
+ if ("borderBoxSize" in entry) {
3733
+ const borderSizeEntry = entry["borderBoxSize"];
3734
+ const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
3735
+ width = borderSize["inlineSize"];
3736
+ height = borderSize["blockSize"];
3737
+ } else {
3738
+ width = element.offsetWidth;
3739
+ height = element.offsetHeight;
3740
+ }
3741
+ setSize({ width, height });
3742
+ });
3743
+ resizeObserver.observe(element, { box: "border-box" });
3744
+ return () => resizeObserver.unobserve(element);
3745
+ } else {
3746
+ setSize(void 0);
3747
+ }
3748
+ }, [element]);
3749
+ return size;
3750
+ }
3751
+ function useStateMachine(initialState, machine) {
3752
+ return React.useReducer((state, event) => {
3753
+ const nextState = machine[state][event];
3754
+ return nextState ?? state;
3755
+ }, initialState);
3756
+ }
3757
+ var Presence = (props) => {
3758
+ const { present, children } = props;
3759
+ const presence = usePresence(present);
3760
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
3761
+ const ref = useComposedRefs(presence.ref, getElementRef(child));
3762
+ const forceMount = typeof children === "function";
3763
+ return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
3764
+ };
3765
+ Presence.displayName = "Presence";
3766
+ function usePresence(present) {
3767
+ const [node, setNode] = React.useState();
3768
+ const stylesRef = React.useRef(null);
3769
+ const prevPresentRef = React.useRef(present);
3770
+ const prevAnimationNameRef = React.useRef("none");
3771
+ const initialState = present ? "mounted" : "unmounted";
3772
+ const [state, send] = useStateMachine(initialState, {
3773
+ mounted: {
3774
+ UNMOUNT: "unmounted",
3775
+ ANIMATION_OUT: "unmountSuspended"
3776
+ },
3777
+ unmountSuspended: {
3778
+ MOUNT: "mounted",
3779
+ ANIMATION_END: "unmounted"
3780
+ },
3781
+ unmounted: {
3782
+ MOUNT: "mounted"
3783
+ }
3784
+ });
3785
+ React.useEffect(() => {
3786
+ const currentAnimationName = getAnimationName(stylesRef.current);
3787
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
3788
+ }, [state]);
3789
+ useLayoutEffect2(() => {
3790
+ const styles = stylesRef.current;
3791
+ const wasPresent = prevPresentRef.current;
3792
+ const hasPresentChanged = wasPresent !== present;
3793
+ if (hasPresentChanged) {
3794
+ const prevAnimationName = prevAnimationNameRef.current;
3795
+ const currentAnimationName = getAnimationName(styles);
3796
+ if (present) {
3797
+ send("MOUNT");
3798
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
3799
+ send("UNMOUNT");
3800
+ } else {
3801
+ const isAnimating = prevAnimationName !== currentAnimationName;
3802
+ if (wasPresent && isAnimating) {
3803
+ send("ANIMATION_OUT");
3804
+ } else {
3805
+ send("UNMOUNT");
3806
+ }
3807
+ }
3808
+ prevPresentRef.current = present;
3809
+ }
3810
+ }, [present, send]);
3811
+ useLayoutEffect2(() => {
3812
+ if (node) {
3813
+ let timeoutId;
3814
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
3815
+ const handleAnimationEnd = (event) => {
3816
+ const currentAnimationName = getAnimationName(stylesRef.current);
3817
+ const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
3818
+ if (event.target === node && isCurrentAnimation) {
3819
+ send("ANIMATION_END");
3820
+ if (!prevPresentRef.current) {
3821
+ const currentFillMode = node.style.animationFillMode;
3822
+ node.style.animationFillMode = "forwards";
3823
+ timeoutId = ownerWindow.setTimeout(() => {
3824
+ if (node.style.animationFillMode === "forwards") {
3825
+ node.style.animationFillMode = currentFillMode;
3826
+ }
3827
+ });
3828
+ }
3829
+ }
3830
+ };
3831
+ const handleAnimationStart = (event) => {
3832
+ if (event.target === node) {
3833
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
3834
+ }
3835
+ };
3836
+ node.addEventListener("animationstart", handleAnimationStart);
3837
+ node.addEventListener("animationcancel", handleAnimationEnd);
3838
+ node.addEventListener("animationend", handleAnimationEnd);
3839
+ return () => {
3840
+ ownerWindow.clearTimeout(timeoutId);
3841
+ node.removeEventListener("animationstart", handleAnimationStart);
3842
+ node.removeEventListener("animationcancel", handleAnimationEnd);
3843
+ node.removeEventListener("animationend", handleAnimationEnd);
3844
+ };
3845
+ } else {
3846
+ send("ANIMATION_END");
3847
+ }
3848
+ }, [node, send]);
3849
+ return {
3850
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
3851
+ ref: React.useCallback((node2) => {
3852
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
3853
+ setNode(node2);
3854
+ }, [])
3855
+ };
3856
+ }
3857
+ function getAnimationName(styles) {
3858
+ return styles?.animationName || "none";
3859
+ }
3860
+ function getElementRef(element) {
3861
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
3862
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
3863
+ if (mayWarn) {
3864
+ return element.ref;
3865
+ }
3866
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
3867
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
3868
+ if (mayWarn) {
3869
+ return element.props.ref;
3870
+ }
3871
+ return element.props.ref || element.ref;
3872
+ }
3873
+ var CHECKBOX_NAME = "Checkbox";
3874
+ var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
3875
+ var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
3876
+ function CheckboxProvider(props) {
3877
+ const {
3878
+ __scopeCheckbox,
3879
+ checked: checkedProp,
3880
+ children,
3881
+ defaultChecked,
3882
+ disabled,
3883
+ form,
3884
+ name,
3885
+ onCheckedChange,
3886
+ required,
3887
+ value = "on",
3888
+ // @ts-expect-error
3889
+ internal_do_not_use_render
3890
+ } = props;
3891
+ const [checked, setChecked] = useControllableState({
3892
+ prop: checkedProp,
3893
+ defaultProp: defaultChecked ?? false,
3894
+ onChange: onCheckedChange,
3895
+ caller: CHECKBOX_NAME
3896
+ });
3897
+ const [control, setControl] = React.useState(null);
3898
+ const [bubbleInput, setBubbleInput] = React.useState(null);
3899
+ const hasConsumerStoppedPropagationRef = React.useRef(false);
3900
+ const isFormControl = control ? !!form || !!control.closest("form") : (
3901
+ // We set this to true by default so that events bubble to forms without JS (SSR)
3902
+ true
3903
+ );
3904
+ const context = {
3905
+ checked,
3906
+ disabled,
3907
+ setChecked,
3908
+ control,
3909
+ setControl,
3910
+ name,
3911
+ form,
3912
+ value,
3913
+ hasConsumerStoppedPropagationRef,
3914
+ required,
3915
+ defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
3916
+ isFormControl,
3917
+ bubbleInput,
3918
+ setBubbleInput
3919
+ };
3920
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
3921
+ CheckboxProviderImpl,
3922
+ {
3923
+ scope: __scopeCheckbox,
3924
+ ...context,
3925
+ children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
3926
+ }
3927
+ );
3928
+ }
3929
+ var TRIGGER_NAME = "CheckboxTrigger";
3930
+ var CheckboxTrigger = React.forwardRef(
3931
+ ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
3932
+ const {
3933
+ control,
3934
+ value,
3935
+ disabled,
3936
+ checked,
3937
+ required,
3938
+ setControl,
3939
+ setChecked,
3940
+ hasConsumerStoppedPropagationRef,
3941
+ isFormControl,
3942
+ bubbleInput
3943
+ } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
3944
+ const composedRefs = useComposedRefs(forwardedRef, setControl);
3945
+ const initialCheckedStateRef = React.useRef(checked);
3946
+ React.useEffect(() => {
3947
+ const form = control?.form;
3948
+ if (form) {
3949
+ const reset = () => setChecked(initialCheckedStateRef.current);
3950
+ form.addEventListener("reset", reset);
3951
+ return () => form.removeEventListener("reset", reset);
3952
+ }
3953
+ }, [control, setChecked]);
3954
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
3955
+ Primitive.button,
3956
+ {
3957
+ type: "button",
3958
+ role: "checkbox",
3959
+ "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
3960
+ "aria-required": required,
3961
+ "data-state": getState$1(checked),
3962
+ "data-disabled": disabled ? "" : void 0,
3963
+ disabled,
3964
+ value,
3965
+ ...checkboxProps,
3966
+ ref: composedRefs,
3967
+ onKeyDown: composeEventHandlers(onKeyDown, (event) => {
3968
+ if (event.key === "Enter") event.preventDefault();
3969
+ }),
3970
+ onClick: composeEventHandlers(onClick, (event) => {
3971
+ setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
3972
+ if (bubbleInput && isFormControl) {
3973
+ hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
3974
+ if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
3975
+ }
3976
+ })
3977
+ }
3978
+ );
3979
+ }
3980
+ );
3981
+ CheckboxTrigger.displayName = TRIGGER_NAME;
3982
+ var Checkbox$1 = React.forwardRef(
3983
+ (props, forwardedRef) => {
3984
+ const {
3985
+ __scopeCheckbox,
3986
+ name,
3987
+ checked,
3988
+ defaultChecked,
3989
+ required,
3990
+ disabled,
3991
+ value,
3992
+ onCheckedChange,
3993
+ form,
3994
+ ...checkboxProps
3995
+ } = props;
3996
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
3997
+ CheckboxProvider,
3998
+ {
3999
+ __scopeCheckbox,
4000
+ checked,
4001
+ defaultChecked,
4002
+ disabled,
4003
+ required,
4004
+ onCheckedChange,
4005
+ name,
4006
+ form,
4007
+ value,
4008
+ internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
4009
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
4010
+ CheckboxTrigger,
4011
+ {
4012
+ ...checkboxProps,
4013
+ ref: forwardedRef,
4014
+ __scopeCheckbox
4015
+ }
4016
+ ),
4017
+ isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
4018
+ CheckboxBubbleInput,
4019
+ {
4020
+ __scopeCheckbox
4021
+ }
4022
+ )
4023
+ ] })
4024
+ }
4025
+ );
4026
+ }
4027
+ );
4028
+ Checkbox$1.displayName = CHECKBOX_NAME;
4029
+ var INDICATOR_NAME$1 = "CheckboxIndicator";
4030
+ var CheckboxIndicator = React.forwardRef(
4031
+ (props, forwardedRef) => {
4032
+ const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
4033
+ const context = useCheckboxContext(INDICATOR_NAME$1, __scopeCheckbox);
4034
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4035
+ Presence,
4036
+ {
4037
+ present: forceMount || isIndeterminate(context.checked) || context.checked === true,
4038
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4039
+ Primitive.span,
4040
+ {
4041
+ "data-state": getState$1(context.checked),
4042
+ "data-disabled": context.disabled ? "" : void 0,
4043
+ ...indicatorProps,
4044
+ ref: forwardedRef,
4045
+ style: { pointerEvents: "none", ...props.style }
4046
+ }
4047
+ )
4048
+ }
4049
+ );
4050
+ }
4051
+ );
4052
+ CheckboxIndicator.displayName = INDICATOR_NAME$1;
4053
+ var BUBBLE_INPUT_NAME$1 = "CheckboxBubbleInput";
4054
+ var CheckboxBubbleInput = React.forwardRef(
4055
+ ({ __scopeCheckbox, ...props }, forwardedRef) => {
4056
+ const {
4057
+ control,
4058
+ hasConsumerStoppedPropagationRef,
4059
+ checked,
4060
+ defaultChecked,
4061
+ required,
4062
+ disabled,
4063
+ name,
4064
+ value,
4065
+ form,
4066
+ bubbleInput,
4067
+ setBubbleInput
4068
+ } = useCheckboxContext(BUBBLE_INPUT_NAME$1, __scopeCheckbox);
4069
+ const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
4070
+ const prevChecked = usePrevious(checked);
4071
+ const controlSize = useSize(control);
4072
+ React.useEffect(() => {
4073
+ const input = bubbleInput;
4074
+ if (!input) return;
4075
+ const inputProto = window.HTMLInputElement.prototype;
4076
+ const descriptor = Object.getOwnPropertyDescriptor(
4077
+ inputProto,
4078
+ "checked"
4079
+ );
4080
+ const setChecked = descriptor.set;
4081
+ const bubbles = !hasConsumerStoppedPropagationRef.current;
4082
+ if (prevChecked !== checked && setChecked) {
4083
+ const event = new Event("click", { bubbles });
4084
+ input.indeterminate = isIndeterminate(checked);
4085
+ setChecked.call(input, isIndeterminate(checked) ? false : checked);
4086
+ input.dispatchEvent(event);
4087
+ }
4088
+ }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
4089
+ const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);
4090
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4091
+ Primitive.input,
4092
+ {
4093
+ type: "checkbox",
4094
+ "aria-hidden": true,
4095
+ defaultChecked: defaultChecked ?? defaultCheckedRef.current,
4096
+ required,
4097
+ disabled,
4098
+ name,
4099
+ value,
4100
+ form,
4101
+ ...props,
4102
+ tabIndex: -1,
4103
+ ref: composedRefs,
4104
+ style: {
4105
+ ...props.style,
4106
+ ...controlSize,
4107
+ position: "absolute",
4108
+ pointerEvents: "none",
4109
+ opacity: 0,
4110
+ margin: 0,
4111
+ // We transform because the input is absolutely positioned but we have
4112
+ // rendered it **after** the button. This pulls it back to sit on top
4113
+ // of the button.
4114
+ transform: "translateX(-100%)"
4115
+ }
4116
+ }
4117
+ );
4118
+ }
4119
+ );
4120
+ CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME$1;
4121
+ function isFunction(value) {
4122
+ return typeof value === "function";
4123
+ }
4124
+ function isIndeterminate(checked) {
4125
+ return checked === "indeterminate";
4126
+ }
4127
+ function getState$1(checked) {
4128
+ return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
4129
+ }
4130
+ /**
4131
+ * @license lucide-react v0.544.0 - ISC
4132
+ *
4133
+ * This source code is licensed under the ISC license.
4134
+ * See the LICENSE file in the root directory of this source tree.
4135
+ */
4136
+ const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
4137
+ const toCamelCase = (string) => string.replace(
4138
+ /^([A-Z])|[\s-_]+(\w)/g,
4139
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
4140
+ );
4141
+ const toPascalCase = (string) => {
4142
+ const camelCase = toCamelCase(string);
4143
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
4144
+ };
4145
+ const mergeClasses = (...classes) => classes.filter((className, index, array) => {
4146
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
4147
+ }).join(" ").trim();
4148
+ const hasA11yProp = (props) => {
4149
+ for (const prop in props) {
4150
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
4151
+ return true;
4152
+ }
4153
+ }
4154
+ };
4155
+ /**
4156
+ * @license lucide-react v0.544.0 - ISC
4157
+ *
4158
+ * This source code is licensed under the ISC license.
4159
+ * See the LICENSE file in the root directory of this source tree.
4160
+ */
4161
+ var defaultAttributes = {
4162
+ xmlns: "http://www.w3.org/2000/svg",
4163
+ width: 24,
4164
+ height: 24,
4165
+ viewBox: "0 0 24 24",
4166
+ fill: "none",
4167
+ stroke: "currentColor",
4168
+ strokeWidth: 2,
4169
+ strokeLinecap: "round",
4170
+ strokeLinejoin: "round"
4171
+ };
4172
+ /**
4173
+ * @license lucide-react v0.544.0 - ISC
4174
+ *
4175
+ * This source code is licensed under the ISC license.
4176
+ * See the LICENSE file in the root directory of this source tree.
4177
+ */
4178
+ const Icon = forwardRef(
4179
+ ({
4180
+ color = "currentColor",
4181
+ size = 24,
4182
+ strokeWidth = 2,
4183
+ absoluteStrokeWidth,
4184
+ className = "",
4185
+ children,
4186
+ iconNode,
4187
+ ...rest
4188
+ }, ref) => createElement(
4189
+ "svg",
4190
+ {
4191
+ ref,
4192
+ ...defaultAttributes,
4193
+ width: size,
4194
+ height: size,
4195
+ stroke: color,
4196
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
4197
+ className: mergeClasses("lucide", className),
4198
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
4199
+ ...rest
4200
+ },
4201
+ [
4202
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
4203
+ ...Array.isArray(children) ? children : [children]
4204
+ ]
4205
+ )
4206
+ );
4207
+ /**
4208
+ * @license lucide-react v0.544.0 - ISC
4209
+ *
4210
+ * This source code is licensed under the ISC license.
4211
+ * See the LICENSE file in the root directory of this source tree.
4212
+ */
4213
+ const createLucideIcon = (iconName, iconNode) => {
4214
+ const Component = forwardRef(
4215
+ ({ className, ...props }, ref) => createElement(Icon, {
4216
+ ref,
4217
+ iconNode,
4218
+ className: mergeClasses(
4219
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
4220
+ `lucide-${iconName}`,
4221
+ className
4222
+ ),
4223
+ ...props
4224
+ })
4225
+ );
4226
+ Component.displayName = toPascalCase(iconName);
4227
+ return Component;
4228
+ };
4229
+ /**
4230
+ * @license lucide-react v0.544.0 - ISC
4231
+ *
4232
+ * This source code is licensed under the ISC license.
4233
+ * See the LICENSE file in the root directory of this source tree.
4234
+ */
4235
+ const __iconNode$1 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
4236
+ const Check = createLucideIcon("check", __iconNode$1);
4237
+ /**
4238
+ * @license lucide-react v0.544.0 - ISC
4239
+ *
4240
+ * This source code is licensed under the ISC license.
4241
+ * See the LICENSE file in the root directory of this source tree.
4242
+ */
4243
+ const __iconNode = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
4244
+ const Circle = createLucideIcon("circle", __iconNode);
4245
+ function Checkbox({
4246
+ className,
4247
+ ...props
4248
+ }) {
4249
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4250
+ Checkbox$1,
4251
+ {
4252
+ "data-slot": "checkbox",
4253
+ className: cn(
4254
+ "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
4255
+ className
4256
+ ),
4257
+ ...props,
4258
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4259
+ CheckboxIndicator,
4260
+ {
4261
+ "data-slot": "checkbox-indicator",
4262
+ className: "flex items-center justify-center text-current transition-none",
4263
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3.5" })
4264
+ }
4265
+ )
4266
+ }
4267
+ );
4268
+ }
4269
+ function createCollection(name) {
4270
+ const PROVIDER_NAME = name + "CollectionProvider";
4271
+ const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
4272
+ const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
4273
+ PROVIDER_NAME,
4274
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
4275
+ );
4276
+ const CollectionProvider = (props) => {
4277
+ const { scope, children } = props;
4278
+ const ref = React__default.useRef(null);
4279
+ const itemMap = React__default.useRef(/* @__PURE__ */ new Map()).current;
4280
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
4281
+ };
4282
+ CollectionProvider.displayName = PROVIDER_NAME;
4283
+ const COLLECTION_SLOT_NAME = name + "CollectionSlot";
4284
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
4285
+ const CollectionSlot = React__default.forwardRef(
4286
+ (props, forwardedRef) => {
4287
+ const { scope, children } = props;
4288
+ const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
4289
+ const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
4290
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionSlotImpl, { ref: composedRefs, children });
4291
+ }
4292
+ );
4293
+ CollectionSlot.displayName = COLLECTION_SLOT_NAME;
4294
+ const ITEM_SLOT_NAME = name + "CollectionItemSlot";
4295
+ const ITEM_DATA_ATTR = "data-radix-collection-item";
4296
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
4297
+ const CollectionItemSlot = React__default.forwardRef(
4298
+ (props, forwardedRef) => {
4299
+ const { scope, children, ...itemData } = props;
4300
+ const ref = React__default.useRef(null);
4301
+ const composedRefs = useComposedRefs(forwardedRef, ref);
4302
+ const context = useCollectionContext(ITEM_SLOT_NAME, scope);
4303
+ React__default.useEffect(() => {
4304
+ context.itemMap.set(ref, { ref, ...itemData });
4305
+ return () => void context.itemMap.delete(ref);
4306
+ });
4307
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
4308
+ }
4309
+ );
4310
+ CollectionItemSlot.displayName = ITEM_SLOT_NAME;
4311
+ function useCollection2(scope) {
4312
+ const context = useCollectionContext(name + "CollectionConsumer", scope);
4313
+ const getItems = React__default.useCallback(() => {
4314
+ const collectionNode = context.collectionRef.current;
4315
+ if (!collectionNode) return [];
4316
+ const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
4317
+ const items = Array.from(context.itemMap.values());
4318
+ const orderedItems = items.sort(
4319
+ (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
4320
+ );
4321
+ return orderedItems;
4322
+ }, [context.collectionRef, context.itemMap]);
4323
+ return getItems;
4324
+ }
4325
+ return [
4326
+ { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
4327
+ useCollection2,
4328
+ createCollectionScope2
4329
+ ];
4330
+ }
4331
+ var useReactId = React[" useId ".trim().toString()] || (() => void 0);
4332
+ var count = 0;
4333
+ function useId(deterministicId) {
4334
+ const [id, setId] = React.useState(useReactId());
4335
+ useLayoutEffect2(() => {
4336
+ setId((reactId) => reactId ?? String(count++));
4337
+ }, [deterministicId]);
4338
+ return id ? `radix-${id}` : "";
4339
+ }
4340
+ function useCallbackRef(callback) {
4341
+ const callbackRef = React.useRef(callback);
4342
+ React.useEffect(() => {
4343
+ callbackRef.current = callback;
4344
+ });
4345
+ return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
4346
+ }
4347
+ var DirectionContext = React.createContext(void 0);
4348
+ function useDirection(localDir) {
4349
+ const globalDir = React.useContext(DirectionContext);
4350
+ return localDir || globalDir || "ltr";
4351
+ }
4352
+ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
4353
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
4354
+ var GROUP_NAME = "RovingFocusGroup";
4355
+ var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
4356
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
4357
+ GROUP_NAME,
4358
+ [createCollectionScope]
4359
+ );
4360
+ var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
4361
+ var RovingFocusGroup = React.forwardRef(
4362
+ (props, forwardedRef) => {
4363
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntimeExports.jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
4364
+ }
4365
+ );
4366
+ RovingFocusGroup.displayName = GROUP_NAME;
4367
+ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
4368
+ const {
4369
+ __scopeRovingFocusGroup,
4370
+ orientation,
4371
+ loop = false,
4372
+ dir,
4373
+ currentTabStopId: currentTabStopIdProp,
4374
+ defaultCurrentTabStopId,
4375
+ onCurrentTabStopIdChange,
4376
+ onEntryFocus,
4377
+ preventScrollOnEntryFocus = false,
4378
+ ...groupProps
4379
+ } = props;
4380
+ const ref = React.useRef(null);
4381
+ const composedRefs = useComposedRefs(forwardedRef, ref);
4382
+ const direction = useDirection(dir);
4383
+ const [currentTabStopId, setCurrentTabStopId] = useControllableState({
4384
+ prop: currentTabStopIdProp,
4385
+ defaultProp: defaultCurrentTabStopId ?? null,
4386
+ onChange: onCurrentTabStopIdChange,
4387
+ caller: GROUP_NAME
4388
+ });
4389
+ const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
4390
+ const handleEntryFocus = useCallbackRef(onEntryFocus);
4391
+ const getItems = useCollection(__scopeRovingFocusGroup);
4392
+ const isClickFocusRef = React.useRef(false);
4393
+ const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
4394
+ React.useEffect(() => {
4395
+ const node = ref.current;
4396
+ if (node) {
4397
+ node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
4398
+ return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
4399
+ }
4400
+ }, [handleEntryFocus]);
4401
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4402
+ RovingFocusProvider,
4403
+ {
4404
+ scope: __scopeRovingFocusGroup,
4405
+ orientation,
4406
+ dir: direction,
4407
+ loop,
4408
+ currentTabStopId,
4409
+ onItemFocus: React.useCallback(
4410
+ (tabStopId) => setCurrentTabStopId(tabStopId),
4411
+ [setCurrentTabStopId]
4412
+ ),
4413
+ onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),
4414
+ onFocusableItemAdd: React.useCallback(
4415
+ () => setFocusableItemsCount((prevCount) => prevCount + 1),
4416
+ []
4417
+ ),
4418
+ onFocusableItemRemove: React.useCallback(
4419
+ () => setFocusableItemsCount((prevCount) => prevCount - 1),
4420
+ []
4421
+ ),
4422
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4423
+ Primitive.div,
4424
+ {
4425
+ tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
4426
+ "data-orientation": orientation,
4427
+ ...groupProps,
4428
+ ref: composedRefs,
4429
+ style: { outline: "none", ...props.style },
4430
+ onMouseDown: composeEventHandlers(props.onMouseDown, () => {
4431
+ isClickFocusRef.current = true;
4432
+ }),
4433
+ onFocus: composeEventHandlers(props.onFocus, (event) => {
4434
+ const isKeyboardFocus = !isClickFocusRef.current;
4435
+ if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
4436
+ const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
4437
+ event.currentTarget.dispatchEvent(entryFocusEvent);
4438
+ if (!entryFocusEvent.defaultPrevented) {
4439
+ const items = getItems().filter((item) => item.focusable);
4440
+ const activeItem = items.find((item) => item.active);
4441
+ const currentItem = items.find((item) => item.id === currentTabStopId);
4442
+ const candidateItems = [activeItem, currentItem, ...items].filter(
4443
+ Boolean
4444
+ );
4445
+ const candidateNodes = candidateItems.map((item) => item.ref.current);
4446
+ focusFirst(candidateNodes, preventScrollOnEntryFocus);
4447
+ }
4448
+ }
4449
+ isClickFocusRef.current = false;
4450
+ }),
4451
+ onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
4452
+ }
4453
+ )
4454
+ }
4455
+ );
4456
+ });
4457
+ var ITEM_NAME$1 = "RovingFocusGroupItem";
4458
+ var RovingFocusGroupItem = React.forwardRef(
4459
+ (props, forwardedRef) => {
4460
+ const {
4461
+ __scopeRovingFocusGroup,
4462
+ focusable = true,
4463
+ active = false,
4464
+ tabStopId,
4465
+ children,
4466
+ ...itemProps
4467
+ } = props;
4468
+ const autoId = useId();
4469
+ const id = tabStopId || autoId;
4470
+ const context = useRovingFocusContext(ITEM_NAME$1, __scopeRovingFocusGroup);
4471
+ const isCurrentTabStop = context.currentTabStopId === id;
4472
+ const getItems = useCollection(__scopeRovingFocusGroup);
4473
+ const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
4474
+ React.useEffect(() => {
4475
+ if (focusable) {
4476
+ onFocusableItemAdd();
4477
+ return () => onFocusableItemRemove();
4478
+ }
4479
+ }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
4480
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4481
+ Collection.ItemSlot,
4482
+ {
4483
+ scope: __scopeRovingFocusGroup,
4484
+ id,
4485
+ focusable,
4486
+ active,
4487
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4488
+ Primitive.span,
4489
+ {
4490
+ tabIndex: isCurrentTabStop ? 0 : -1,
4491
+ "data-orientation": context.orientation,
4492
+ ...itemProps,
4493
+ ref: forwardedRef,
4494
+ onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
4495
+ if (!focusable) event.preventDefault();
4496
+ else context.onItemFocus(id);
4497
+ }),
4498
+ onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
4499
+ onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
4500
+ if (event.key === "Tab" && event.shiftKey) {
4501
+ context.onItemShiftTab();
4502
+ return;
4503
+ }
4504
+ if (event.target !== event.currentTarget) return;
4505
+ const focusIntent = getFocusIntent(event, context.orientation, context.dir);
4506
+ if (focusIntent !== void 0) {
4507
+ if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
4508
+ event.preventDefault();
4509
+ const items = getItems().filter((item) => item.focusable);
4510
+ let candidateNodes = items.map((item) => item.ref.current);
4511
+ if (focusIntent === "last") candidateNodes.reverse();
4512
+ else if (focusIntent === "prev" || focusIntent === "next") {
4513
+ if (focusIntent === "prev") candidateNodes.reverse();
4514
+ const currentIndex = candidateNodes.indexOf(event.currentTarget);
4515
+ candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
4516
+ }
4517
+ setTimeout(() => focusFirst(candidateNodes));
4518
+ }
4519
+ }),
4520
+ children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
4521
+ }
4522
+ )
4523
+ }
4524
+ );
4525
+ }
4526
+ );
4527
+ RovingFocusGroupItem.displayName = ITEM_NAME$1;
4528
+ var MAP_KEY_TO_FOCUS_INTENT = {
4529
+ ArrowLeft: "prev",
4530
+ ArrowUp: "prev",
4531
+ ArrowRight: "next",
4532
+ ArrowDown: "next",
4533
+ PageUp: "first",
4534
+ Home: "first",
4535
+ PageDown: "last",
4536
+ End: "last"
4537
+ };
4538
+ function getDirectionAwareKey(key, dir) {
4539
+ if (dir !== "rtl") return key;
4540
+ return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
4541
+ }
4542
+ function getFocusIntent(event, orientation, dir) {
4543
+ const key = getDirectionAwareKey(event.key, dir);
4544
+ if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
4545
+ if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
4546
+ return MAP_KEY_TO_FOCUS_INTENT[key];
4547
+ }
4548
+ function focusFirst(candidates, preventScroll = false) {
4549
+ const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
4550
+ for (const candidate of candidates) {
4551
+ if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
4552
+ candidate.focus({ preventScroll });
4553
+ if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
4554
+ }
4555
+ }
4556
+ function wrapArray(array, startIndex) {
4557
+ return array.map((_, index) => array[(startIndex + index) % array.length]);
4558
+ }
4559
+ var Root = RovingFocusGroup;
4560
+ var Item = RovingFocusGroupItem;
4561
+ var RADIO_NAME = "Radio";
4562
+ var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
4563
+ var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
4564
+ var Radio = React.forwardRef(
4565
+ (props, forwardedRef) => {
4566
+ const {
4567
+ __scopeRadio,
4568
+ name,
4569
+ checked = false,
4570
+ required,
4571
+ disabled,
4572
+ value = "on",
4573
+ onCheck,
4574
+ form,
4575
+ ...radioProps
4576
+ } = props;
4577
+ const [button, setButton] = React.useState(null);
4578
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
4579
+ const hasConsumerStoppedPropagationRef = React.useRef(false);
4580
+ const isFormControl = button ? form || !!button.closest("form") : true;
4581
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
4582
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
4583
+ Primitive.button,
4584
+ {
4585
+ type: "button",
4586
+ role: "radio",
4587
+ "aria-checked": checked,
4588
+ "data-state": getState(checked),
4589
+ "data-disabled": disabled ? "" : void 0,
4590
+ disabled,
4591
+ value,
4592
+ ...radioProps,
4593
+ ref: composedRefs,
4594
+ onClick: composeEventHandlers(props.onClick, (event) => {
4595
+ if (!checked) onCheck?.();
4596
+ if (isFormControl) {
4597
+ hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
4598
+ if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
4599
+ }
4600
+ })
4601
+ }
4602
+ ),
4603
+ isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
4604
+ RadioBubbleInput,
4605
+ {
4606
+ control: button,
4607
+ bubbles: !hasConsumerStoppedPropagationRef.current,
4608
+ name,
4609
+ value,
4610
+ checked,
4611
+ required,
4612
+ disabled,
4613
+ form,
4614
+ style: { transform: "translateX(-100%)" }
4615
+ }
4616
+ )
4617
+ ] });
4618
+ }
4619
+ );
4620
+ Radio.displayName = RADIO_NAME;
4621
+ var INDICATOR_NAME = "RadioIndicator";
4622
+ var RadioIndicator = React.forwardRef(
4623
+ (props, forwardedRef) => {
4624
+ const { __scopeRadio, forceMount, ...indicatorProps } = props;
4625
+ const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
4626
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4627
+ Primitive.span,
4628
+ {
4629
+ "data-state": getState(context.checked),
4630
+ "data-disabled": context.disabled ? "" : void 0,
4631
+ ...indicatorProps,
4632
+ ref: forwardedRef
4633
+ }
4634
+ ) });
4635
+ }
4636
+ );
4637
+ RadioIndicator.displayName = INDICATOR_NAME;
4638
+ var BUBBLE_INPUT_NAME = "RadioBubbleInput";
4639
+ var RadioBubbleInput = React.forwardRef(
4640
+ ({
4641
+ __scopeRadio,
4642
+ control,
4643
+ checked,
4644
+ bubbles = true,
4645
+ ...props
4646
+ }, forwardedRef) => {
4647
+ const ref = React.useRef(null);
4648
+ const composedRefs = useComposedRefs(ref, forwardedRef);
4649
+ const prevChecked = usePrevious(checked);
4650
+ const controlSize = useSize(control);
4651
+ React.useEffect(() => {
4652
+ const input = ref.current;
4653
+ if (!input) return;
4654
+ const inputProto = window.HTMLInputElement.prototype;
4655
+ const descriptor = Object.getOwnPropertyDescriptor(
4656
+ inputProto,
4657
+ "checked"
4658
+ );
4659
+ const setChecked = descriptor.set;
4660
+ if (prevChecked !== checked && setChecked) {
4661
+ const event = new Event("click", { bubbles });
4662
+ setChecked.call(input, checked);
4663
+ input.dispatchEvent(event);
4664
+ }
4665
+ }, [prevChecked, checked, bubbles]);
4666
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4667
+ Primitive.input,
4668
+ {
4669
+ type: "radio",
4670
+ "aria-hidden": true,
4671
+ defaultChecked: checked,
4672
+ ...props,
4673
+ tabIndex: -1,
4674
+ ref: composedRefs,
4675
+ style: {
4676
+ ...props.style,
4677
+ ...controlSize,
4678
+ position: "absolute",
4679
+ pointerEvents: "none",
4680
+ opacity: 0,
4681
+ margin: 0
4682
+ }
4683
+ }
4684
+ );
4685
+ }
4686
+ );
4687
+ RadioBubbleInput.displayName = BUBBLE_INPUT_NAME;
4688
+ function getState(checked) {
4689
+ return checked ? "checked" : "unchecked";
4690
+ }
4691
+ var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
4692
+ var RADIO_GROUP_NAME = "RadioGroup";
4693
+ var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME, [
4694
+ createRovingFocusGroupScope,
4695
+ createRadioScope
4696
+ ]);
4697
+ var useRovingFocusGroupScope = createRovingFocusGroupScope();
4698
+ var useRadioScope = createRadioScope();
4699
+ var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);
4700
+ var RadioGroup$1 = React.forwardRef(
4701
+ (props, forwardedRef) => {
4702
+ const {
4703
+ __scopeRadioGroup,
4704
+ name,
4705
+ defaultValue,
4706
+ value: valueProp,
4707
+ required = false,
4708
+ disabled = false,
4709
+ orientation,
4710
+ dir,
4711
+ loop = true,
4712
+ onValueChange,
4713
+ ...groupProps
4714
+ } = props;
4715
+ const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
4716
+ const direction = useDirection(dir);
4717
+ const [value, setValue] = useControllableState({
4718
+ prop: valueProp,
4719
+ defaultProp: defaultValue ?? null,
4720
+ onChange: onValueChange,
4721
+ caller: RADIO_GROUP_NAME
4722
+ });
4723
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4724
+ RadioGroupProvider,
4725
+ {
4726
+ scope: __scopeRadioGroup,
4727
+ name,
4728
+ required,
4729
+ disabled,
4730
+ value,
4731
+ onValueChange: setValue,
4732
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4733
+ Root,
4734
+ {
4735
+ asChild: true,
4736
+ ...rovingFocusGroupScope,
4737
+ orientation,
4738
+ dir: direction,
4739
+ loop,
4740
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4741
+ Primitive.div,
4742
+ {
4743
+ role: "radiogroup",
4744
+ "aria-required": required,
4745
+ "aria-orientation": orientation,
4746
+ "data-disabled": disabled ? "" : void 0,
4747
+ dir: direction,
4748
+ ...groupProps,
4749
+ ref: forwardedRef
4750
+ }
4751
+ )
4752
+ }
4753
+ )
4754
+ }
4755
+ );
4756
+ }
4757
+ );
4758
+ RadioGroup$1.displayName = RADIO_GROUP_NAME;
4759
+ var ITEM_NAME = "RadioGroupItem";
4760
+ var RadioGroupItem$1 = React.forwardRef(
4761
+ (props, forwardedRef) => {
4762
+ const { __scopeRadioGroup, disabled, ...itemProps } = props;
4763
+ const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);
4764
+ const isDisabled = context.disabled || disabled;
4765
+ const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
4766
+ const radioScope = useRadioScope(__scopeRadioGroup);
4767
+ const ref = React.useRef(null);
4768
+ const composedRefs = useComposedRefs(forwardedRef, ref);
4769
+ const checked = context.value === itemProps.value;
4770
+ const isArrowKeyPressedRef = React.useRef(false);
4771
+ React.useEffect(() => {
4772
+ const handleKeyDown = (event) => {
4773
+ if (ARROW_KEYS.includes(event.key)) {
4774
+ isArrowKeyPressedRef.current = true;
4775
+ }
4776
+ };
4777
+ const handleKeyUp = () => isArrowKeyPressedRef.current = false;
4778
+ document.addEventListener("keydown", handleKeyDown);
4779
+ document.addEventListener("keyup", handleKeyUp);
4780
+ return () => {
4781
+ document.removeEventListener("keydown", handleKeyDown);
4782
+ document.removeEventListener("keyup", handleKeyUp);
4783
+ };
4784
+ }, []);
4785
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4786
+ Item,
4787
+ {
4788
+ asChild: true,
4789
+ ...rovingFocusGroupScope,
4790
+ focusable: !isDisabled,
4791
+ active: checked,
4792
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4793
+ Radio,
4794
+ {
4795
+ disabled: isDisabled,
4796
+ required: context.required,
4797
+ checked,
4798
+ ...radioScope,
4799
+ ...itemProps,
4800
+ name: context.name,
4801
+ ref: composedRefs,
4802
+ onCheck: () => context.onValueChange(itemProps.value),
4803
+ onKeyDown: composeEventHandlers((event) => {
4804
+ if (event.key === "Enter") event.preventDefault();
4805
+ }),
4806
+ onFocus: composeEventHandlers(itemProps.onFocus, () => {
4807
+ if (isArrowKeyPressedRef.current) ref.current?.click();
4808
+ })
4809
+ }
4810
+ )
4811
+ }
4812
+ );
4813
+ }
4814
+ );
4815
+ RadioGroupItem$1.displayName = ITEM_NAME;
4816
+ var INDICATOR_NAME2 = "RadioGroupIndicator";
4817
+ var RadioGroupIndicator = React.forwardRef(
4818
+ (props, forwardedRef) => {
4819
+ const { __scopeRadioGroup, ...indicatorProps } = props;
4820
+ const radioScope = useRadioScope(__scopeRadioGroup);
4821
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });
4822
+ }
4823
+ );
4824
+ RadioGroupIndicator.displayName = INDICATOR_NAME2;
4825
+ var Root2 = RadioGroup$1;
4826
+ var Item2 = RadioGroupItem$1;
4827
+ var Indicator = RadioGroupIndicator;
4828
+ function RadioGroup({
4829
+ className,
4830
+ ...props
4831
+ }) {
4832
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4833
+ Root2,
4834
+ {
4835
+ "data-slot": "radio-group",
4836
+ className: cn("grid gap-3", className),
4837
+ ...props
4838
+ }
4839
+ );
4840
+ }
4841
+ function RadioGroupItem({
4842
+ className,
4843
+ ...props
4844
+ }) {
4845
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
4846
+ Item2,
4847
+ {
4848
+ "data-slot": "radio-group-item",
4849
+ className: cn(
4850
+ "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
4851
+ className
4852
+ ),
4853
+ ...props,
4854
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
4855
+ Indicator,
4856
+ {
4857
+ "data-slot": "radio-group-indicator",
4858
+ className: "relative flex items-center justify-center",
4859
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
4860
+ }
4861
+ )
4862
+ }
4863
+ );
4864
+ }
26
4865
  export {
27
- T as TdLink,
28
- L as TrLink
4866
+ Button,
4867
+ Checkbox,
4868
+ Input,
4869
+ Label,
4870
+ RadioGroup,
4871
+ RadioGroupItem,
4872
+ activateCarbideTheme,
4873
+ buttonVariants,
4874
+ cn
29
4875
  };
4876
+ //# sourceMappingURL=mm-react-components.es.js.map