@meshsdk/react 1.7.19 → 1.7.21

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.
package/dist/index.js CHANGED
@@ -1,24 +1,2984 @@
1
1
  // src/cardano-wallet/index.tsx
2
- import { useEffect as useEffect7, useState as useState9 } from "react";
2
+ import { useEffect as useEffect7, useRef as useRef2, useState as useState9 } from "react";
3
+ import { DAppPeerConnect } from "@fabianbormann/cardano-peer-connect";
3
4
 
4
5
  // src/common/button.tsx
5
- import { jsx } from "react/jsx-runtime";
6
- function Button({
7
- children,
8
- isDarkMode = false,
9
- hideMenuList = false,
10
- setHideMenuList,
11
- onMouseEnter,
12
- onMouseLeave
6
+ import * as React3 from "react";
7
+
8
+ // ../../node_modules/@radix-ui/react-slot/dist/index.mjs
9
+ import * as React2 from "react";
10
+
11
+ // ../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs
12
+ import * as React from "react";
13
+ function setRef(ref, value) {
14
+ if (typeof ref === "function") {
15
+ ref(value);
16
+ } else if (ref !== null && ref !== void 0) {
17
+ ref.current = value;
18
+ }
19
+ }
20
+ function composeRefs(...refs) {
21
+ return (node) => refs.forEach((ref) => setRef(ref, node));
22
+ }
23
+
24
+ // ../../node_modules/@radix-ui/react-slot/dist/index.mjs
25
+ import { Fragment, jsx } from "react/jsx-runtime";
26
+ var Slot = React2.forwardRef((props, forwardedRef) => {
27
+ const { children, ...slotProps } = props;
28
+ const childrenArray = React2.Children.toArray(children);
29
+ const slottable = childrenArray.find(isSlottable);
30
+ if (slottable) {
31
+ const newElement = slottable.props.children;
32
+ const newChildren = childrenArray.map((child) => {
33
+ if (child === slottable) {
34
+ if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
35
+ return React2.isValidElement(newElement) ? newElement.props.children : null;
36
+ } else {
37
+ return child;
38
+ }
39
+ });
40
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
41
+ }
42
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
43
+ });
44
+ Slot.displayName = "Slot";
45
+ var SlotClone = React2.forwardRef((props, forwardedRef) => {
46
+ const { children, ...slotProps } = props;
47
+ if (React2.isValidElement(children)) {
48
+ const childrenRef = getElementRef(children);
49
+ return React2.cloneElement(children, {
50
+ ...mergeProps(slotProps, children.props),
51
+ // @ts-ignore
52
+ ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
53
+ });
54
+ }
55
+ return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
56
+ });
57
+ SlotClone.displayName = "SlotClone";
58
+ var Slottable = ({ children }) => {
59
+ return /* @__PURE__ */ jsx(Fragment, { children });
60
+ };
61
+ function isSlottable(child) {
62
+ return React2.isValidElement(child) && child.type === Slottable;
63
+ }
64
+ function mergeProps(slotProps, childProps) {
65
+ const overrideProps = { ...childProps };
66
+ for (const propName in childProps) {
67
+ const slotPropValue = slotProps[propName];
68
+ const childPropValue = childProps[propName];
69
+ const isHandler = /^on[A-Z]/.test(propName);
70
+ if (isHandler) {
71
+ if (slotPropValue && childPropValue) {
72
+ overrideProps[propName] = (...args) => {
73
+ childPropValue(...args);
74
+ slotPropValue(...args);
75
+ };
76
+ } else if (slotPropValue) {
77
+ overrideProps[propName] = slotPropValue;
78
+ }
79
+ } else if (propName === "style") {
80
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
81
+ } else if (propName === "className") {
82
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
83
+ }
84
+ }
85
+ return { ...slotProps, ...overrideProps };
86
+ }
87
+ function getElementRef(element) {
88
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
89
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
90
+ if (mayWarn) {
91
+ return element.ref;
92
+ }
93
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
94
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
95
+ if (mayWarn) {
96
+ return element.props.ref;
97
+ }
98
+ return element.props.ref || element.ref;
99
+ }
100
+
101
+ // src/common/button.tsx
102
+ import { cva } from "class-variance-authority";
103
+
104
+ // ../../node_modules/clsx/dist/clsx.mjs
105
+ function r(e) {
106
+ var t, f, n = "";
107
+ if ("string" == typeof e || "number" == typeof e) n += e;
108
+ else if ("object" == typeof e) if (Array.isArray(e)) {
109
+ var o = e.length;
110
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
111
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
112
+ return n;
113
+ }
114
+ function clsx() {
115
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
116
+ return n;
117
+ }
118
+
119
+ // ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
120
+ var CLASS_PART_SEPARATOR = "-";
121
+ function createClassUtils(config) {
122
+ const classMap = createClassMap(config);
123
+ const {
124
+ conflictingClassGroups,
125
+ conflictingClassGroupModifiers
126
+ } = config;
127
+ function getClassGroupId(className) {
128
+ const classParts = className.split(CLASS_PART_SEPARATOR);
129
+ if (classParts[0] === "" && classParts.length !== 1) {
130
+ classParts.shift();
131
+ }
132
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
133
+ }
134
+ function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {
135
+ const conflicts = conflictingClassGroups[classGroupId] || [];
136
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
137
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
138
+ }
139
+ return conflicts;
140
+ }
141
+ return {
142
+ getClassGroupId,
143
+ getConflictingClassGroupIds
144
+ };
145
+ }
146
+ function getGroupRecursive(classParts, classPartObject) {
147
+ if (classParts.length === 0) {
148
+ return classPartObject.classGroupId;
149
+ }
150
+ const currentClassPart = classParts[0];
151
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
152
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
153
+ if (classGroupFromNextClassPart) {
154
+ return classGroupFromNextClassPart;
155
+ }
156
+ if (classPartObject.validators.length === 0) {
157
+ return void 0;
158
+ }
159
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
160
+ return classPartObject.validators.find(({
161
+ validator
162
+ }) => validator(classRest))?.classGroupId;
163
+ }
164
+ var arbitraryPropertyRegex = /^\[(.+)\]$/;
165
+ function getGroupIdForArbitraryProperty(className) {
166
+ if (arbitraryPropertyRegex.test(className)) {
167
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
168
+ const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
169
+ if (property) {
170
+ return "arbitrary.." + property;
171
+ }
172
+ }
173
+ }
174
+ function createClassMap(config) {
175
+ const {
176
+ theme,
177
+ prefix
178
+ } = config;
179
+ const classMap = {
180
+ nextPart: /* @__PURE__ */ new Map(),
181
+ validators: []
182
+ };
183
+ const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
184
+ prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
185
+ processClassesRecursively(classGroup, classMap, classGroupId, theme);
186
+ });
187
+ return classMap;
188
+ }
189
+ function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
190
+ classGroup.forEach((classDefinition) => {
191
+ if (typeof classDefinition === "string") {
192
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
193
+ classPartObjectToEdit.classGroupId = classGroupId;
194
+ return;
195
+ }
196
+ if (typeof classDefinition === "function") {
197
+ if (isThemeGetter(classDefinition)) {
198
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
199
+ return;
200
+ }
201
+ classPartObject.validators.push({
202
+ validator: classDefinition,
203
+ classGroupId
204
+ });
205
+ return;
206
+ }
207
+ Object.entries(classDefinition).forEach(([key, classGroup2]) => {
208
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
209
+ });
210
+ });
211
+ }
212
+ function getPart(classPartObject, path) {
213
+ let currentClassPartObject = classPartObject;
214
+ path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
215
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
216
+ currentClassPartObject.nextPart.set(pathPart, {
217
+ nextPart: /* @__PURE__ */ new Map(),
218
+ validators: []
219
+ });
220
+ }
221
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
222
+ });
223
+ return currentClassPartObject;
224
+ }
225
+ function isThemeGetter(func) {
226
+ return func.isThemeGetter;
227
+ }
228
+ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
229
+ if (!prefix) {
230
+ return classGroupEntries;
231
+ }
232
+ return classGroupEntries.map(([classGroupId, classGroup]) => {
233
+ const prefixedClassGroup = classGroup.map((classDefinition) => {
234
+ if (typeof classDefinition === "string") {
235
+ return prefix + classDefinition;
236
+ }
237
+ if (typeof classDefinition === "object") {
238
+ return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
239
+ }
240
+ return classDefinition;
241
+ });
242
+ return [classGroupId, prefixedClassGroup];
243
+ });
244
+ }
245
+ function createLruCache(maxCacheSize) {
246
+ if (maxCacheSize < 1) {
247
+ return {
248
+ get: () => void 0,
249
+ set: () => {
250
+ }
251
+ };
252
+ }
253
+ let cacheSize = 0;
254
+ let cache = /* @__PURE__ */ new Map();
255
+ let previousCache = /* @__PURE__ */ new Map();
256
+ function update(key, value) {
257
+ cache.set(key, value);
258
+ cacheSize++;
259
+ if (cacheSize > maxCacheSize) {
260
+ cacheSize = 0;
261
+ previousCache = cache;
262
+ cache = /* @__PURE__ */ new Map();
263
+ }
264
+ }
265
+ return {
266
+ get(key) {
267
+ let value = cache.get(key);
268
+ if (value !== void 0) {
269
+ return value;
270
+ }
271
+ if ((value = previousCache.get(key)) !== void 0) {
272
+ update(key, value);
273
+ return value;
274
+ }
275
+ },
276
+ set(key, value) {
277
+ if (cache.has(key)) {
278
+ cache.set(key, value);
279
+ } else {
280
+ update(key, value);
281
+ }
282
+ }
283
+ };
284
+ }
285
+ var IMPORTANT_MODIFIER = "!";
286
+ function createSplitModifiers(config) {
287
+ const separator = config.separator;
288
+ const isSeparatorSingleCharacter = separator.length === 1;
289
+ const firstSeparatorCharacter = separator[0];
290
+ const separatorLength = separator.length;
291
+ return function splitModifiers(className) {
292
+ const modifiers = [];
293
+ let bracketDepth = 0;
294
+ let modifierStart = 0;
295
+ let postfixModifierPosition;
296
+ for (let index = 0; index < className.length; index++) {
297
+ let currentCharacter = className[index];
298
+ if (bracketDepth === 0) {
299
+ if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
300
+ modifiers.push(className.slice(modifierStart, index));
301
+ modifierStart = index + separatorLength;
302
+ continue;
303
+ }
304
+ if (currentCharacter === "/") {
305
+ postfixModifierPosition = index;
306
+ continue;
307
+ }
308
+ }
309
+ if (currentCharacter === "[") {
310
+ bracketDepth++;
311
+ } else if (currentCharacter === "]") {
312
+ bracketDepth--;
313
+ }
314
+ }
315
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
316
+ const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
317
+ const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
318
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
319
+ return {
320
+ modifiers,
321
+ hasImportantModifier,
322
+ baseClassName,
323
+ maybePostfixModifierPosition
324
+ };
325
+ };
326
+ }
327
+ function sortModifiers(modifiers) {
328
+ if (modifiers.length <= 1) {
329
+ return modifiers;
330
+ }
331
+ const sortedModifiers = [];
332
+ let unsortedModifiers = [];
333
+ modifiers.forEach((modifier) => {
334
+ const isArbitraryVariant = modifier[0] === "[";
335
+ if (isArbitraryVariant) {
336
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
337
+ unsortedModifiers = [];
338
+ } else {
339
+ unsortedModifiers.push(modifier);
340
+ }
341
+ });
342
+ sortedModifiers.push(...unsortedModifiers.sort());
343
+ return sortedModifiers;
344
+ }
345
+ function createConfigUtils(config) {
346
+ return {
347
+ cache: createLruCache(config.cacheSize),
348
+ splitModifiers: createSplitModifiers(config),
349
+ ...createClassUtils(config)
350
+ };
351
+ }
352
+ var SPLIT_CLASSES_REGEX = /\s+/;
353
+ function mergeClassList(classList, configUtils) {
354
+ const {
355
+ splitModifiers,
356
+ getClassGroupId,
357
+ getConflictingClassGroupIds
358
+ } = configUtils;
359
+ const classGroupsInConflict = /* @__PURE__ */ new Set();
360
+ return classList.trim().split(SPLIT_CLASSES_REGEX).map((originalClassName) => {
361
+ const {
362
+ modifiers,
363
+ hasImportantModifier,
364
+ baseClassName,
365
+ maybePostfixModifierPosition
366
+ } = splitModifiers(originalClassName);
367
+ let classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
368
+ let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
369
+ if (!classGroupId) {
370
+ if (!maybePostfixModifierPosition) {
371
+ return {
372
+ isTailwindClass: false,
373
+ originalClassName
374
+ };
375
+ }
376
+ classGroupId = getClassGroupId(baseClassName);
377
+ if (!classGroupId) {
378
+ return {
379
+ isTailwindClass: false,
380
+ originalClassName
381
+ };
382
+ }
383
+ hasPostfixModifier = false;
384
+ }
385
+ const variantModifier = sortModifiers(modifiers).join(":");
386
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
387
+ return {
388
+ isTailwindClass: true,
389
+ modifierId,
390
+ classGroupId,
391
+ originalClassName,
392
+ hasPostfixModifier
393
+ };
394
+ }).reverse().filter((parsed) => {
395
+ if (!parsed.isTailwindClass) {
396
+ return true;
397
+ }
398
+ const {
399
+ modifierId,
400
+ classGroupId,
401
+ hasPostfixModifier
402
+ } = parsed;
403
+ const classId = modifierId + classGroupId;
404
+ if (classGroupsInConflict.has(classId)) {
405
+ return false;
406
+ }
407
+ classGroupsInConflict.add(classId);
408
+ getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach((group) => classGroupsInConflict.add(modifierId + group));
409
+ return true;
410
+ }).reverse().map((parsed) => parsed.originalClassName).join(" ");
411
+ }
412
+ function twJoin() {
413
+ let index = 0;
414
+ let argument;
415
+ let resolvedValue;
416
+ let string = "";
417
+ while (index < arguments.length) {
418
+ if (argument = arguments[index++]) {
419
+ if (resolvedValue = toValue(argument)) {
420
+ string && (string += " ");
421
+ string += resolvedValue;
422
+ }
423
+ }
424
+ }
425
+ return string;
426
+ }
427
+ function toValue(mix) {
428
+ if (typeof mix === "string") {
429
+ return mix;
430
+ }
431
+ let resolvedValue;
432
+ let string = "";
433
+ for (let k = 0; k < mix.length; k++) {
434
+ if (mix[k]) {
435
+ if (resolvedValue = toValue(mix[k])) {
436
+ string && (string += " ");
437
+ string += resolvedValue;
438
+ }
439
+ }
440
+ }
441
+ return string;
442
+ }
443
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
444
+ let configUtils;
445
+ let cacheGet;
446
+ let cacheSet;
447
+ let functionToCall = initTailwindMerge;
448
+ function initTailwindMerge(classList) {
449
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
450
+ configUtils = createConfigUtils(config);
451
+ cacheGet = configUtils.cache.get;
452
+ cacheSet = configUtils.cache.set;
453
+ functionToCall = tailwindMerge;
454
+ return tailwindMerge(classList);
455
+ }
456
+ function tailwindMerge(classList) {
457
+ const cachedResult = cacheGet(classList);
458
+ if (cachedResult) {
459
+ return cachedResult;
460
+ }
461
+ const result = mergeClassList(classList, configUtils);
462
+ cacheSet(classList, result);
463
+ return result;
464
+ }
465
+ return function callTailwindMerge() {
466
+ return functionToCall(twJoin.apply(null, arguments));
467
+ };
468
+ }
469
+ function fromTheme(key) {
470
+ const themeGetter = (theme) => theme[key] || [];
471
+ themeGetter.isThemeGetter = true;
472
+ return themeGetter;
473
+ }
474
+ var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
475
+ var fractionRegex = /^\d+\/\d+$/;
476
+ var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
477
+ var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
478
+ var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
479
+ var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
480
+ var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
481
+ var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
482
+ function isLength(value) {
483
+ return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
484
+ }
485
+ function isArbitraryLength(value) {
486
+ return getIsArbitraryValue(value, "length", isLengthOnly);
487
+ }
488
+ function isNumber(value) {
489
+ return Boolean(value) && !Number.isNaN(Number(value));
490
+ }
491
+ function isArbitraryNumber(value) {
492
+ return getIsArbitraryValue(value, "number", isNumber);
493
+ }
494
+ function isInteger(value) {
495
+ return Boolean(value) && Number.isInteger(Number(value));
496
+ }
497
+ function isPercent(value) {
498
+ return value.endsWith("%") && isNumber(value.slice(0, -1));
499
+ }
500
+ function isArbitraryValue(value) {
501
+ return arbitraryValueRegex.test(value);
502
+ }
503
+ function isTshirtSize(value) {
504
+ return tshirtUnitRegex.test(value);
505
+ }
506
+ var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
507
+ function isArbitrarySize(value) {
508
+ return getIsArbitraryValue(value, sizeLabels, isNever);
509
+ }
510
+ function isArbitraryPosition(value) {
511
+ return getIsArbitraryValue(value, "position", isNever);
512
+ }
513
+ var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
514
+ function isArbitraryImage(value) {
515
+ return getIsArbitraryValue(value, imageLabels, isImage);
516
+ }
517
+ function isArbitraryShadow(value) {
518
+ return getIsArbitraryValue(value, "", isShadow);
519
+ }
520
+ function isAny() {
521
+ return true;
522
+ }
523
+ function getIsArbitraryValue(value, label, testValue) {
524
+ const result = arbitraryValueRegex.exec(value);
525
+ if (result) {
526
+ if (result[1]) {
527
+ return typeof label === "string" ? result[1] === label : label.has(result[1]);
528
+ }
529
+ return testValue(result[2]);
530
+ }
531
+ return false;
532
+ }
533
+ function isLengthOnly(value) {
534
+ return lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
535
+ }
536
+ function isNever() {
537
+ return false;
538
+ }
539
+ function isShadow(value) {
540
+ return shadowRegex.test(value);
541
+ }
542
+ function isImage(value) {
543
+ return imageRegex.test(value);
544
+ }
545
+ function getDefaultConfig() {
546
+ const colors = fromTheme("colors");
547
+ const spacing = fromTheme("spacing");
548
+ const blur = fromTheme("blur");
549
+ const brightness = fromTheme("brightness");
550
+ const borderColor = fromTheme("borderColor");
551
+ const borderRadius = fromTheme("borderRadius");
552
+ const borderSpacing = fromTheme("borderSpacing");
553
+ const borderWidth = fromTheme("borderWidth");
554
+ const contrast = fromTheme("contrast");
555
+ const grayscale = fromTheme("grayscale");
556
+ const hueRotate = fromTheme("hueRotate");
557
+ const invert = fromTheme("invert");
558
+ const gap = fromTheme("gap");
559
+ const gradientColorStops = fromTheme("gradientColorStops");
560
+ const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
561
+ const inset = fromTheme("inset");
562
+ const margin = fromTheme("margin");
563
+ const opacity = fromTheme("opacity");
564
+ const padding = fromTheme("padding");
565
+ const saturate = fromTheme("saturate");
566
+ const scale = fromTheme("scale");
567
+ const sepia = fromTheme("sepia");
568
+ const skew = fromTheme("skew");
569
+ const space = fromTheme("space");
570
+ const translate = fromTheme("translate");
571
+ const getOverscroll = () => ["auto", "contain", "none"];
572
+ const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
573
+ const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
574
+ const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
575
+ const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
576
+ const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
577
+ const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
578
+ const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
579
+ const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity", "plus-lighter"];
580
+ const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
581
+ const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
582
+ const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
583
+ const getNumber = () => [isNumber, isArbitraryNumber];
584
+ const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
585
+ return {
586
+ cacheSize: 500,
587
+ separator: ":",
588
+ theme: {
589
+ colors: [isAny],
590
+ spacing: [isLength, isArbitraryLength],
591
+ blur: ["none", "", isTshirtSize, isArbitraryValue],
592
+ brightness: getNumber(),
593
+ borderColor: [colors],
594
+ borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
595
+ borderSpacing: getSpacingWithArbitrary(),
596
+ borderWidth: getLengthWithEmptyAndArbitrary(),
597
+ contrast: getNumber(),
598
+ grayscale: getZeroAndEmpty(),
599
+ hueRotate: getNumberAndArbitrary(),
600
+ invert: getZeroAndEmpty(),
601
+ gap: getSpacingWithArbitrary(),
602
+ gradientColorStops: [colors],
603
+ gradientColorStopPositions: [isPercent, isArbitraryLength],
604
+ inset: getSpacingWithAutoAndArbitrary(),
605
+ margin: getSpacingWithAutoAndArbitrary(),
606
+ opacity: getNumber(),
607
+ padding: getSpacingWithArbitrary(),
608
+ saturate: getNumber(),
609
+ scale: getNumber(),
610
+ sepia: getZeroAndEmpty(),
611
+ skew: getNumberAndArbitrary(),
612
+ space: getSpacingWithArbitrary(),
613
+ translate: getSpacingWithArbitrary()
614
+ },
615
+ classGroups: {
616
+ // Layout
617
+ /**
618
+ * Aspect Ratio
619
+ * @see https://tailwindcss.com/docs/aspect-ratio
620
+ */
621
+ aspect: [{
622
+ aspect: ["auto", "square", "video", isArbitraryValue]
623
+ }],
624
+ /**
625
+ * Container
626
+ * @see https://tailwindcss.com/docs/container
627
+ */
628
+ container: ["container"],
629
+ /**
630
+ * Columns
631
+ * @see https://tailwindcss.com/docs/columns
632
+ */
633
+ columns: [{
634
+ columns: [isTshirtSize]
635
+ }],
636
+ /**
637
+ * Break After
638
+ * @see https://tailwindcss.com/docs/break-after
639
+ */
640
+ "break-after": [{
641
+ "break-after": getBreaks()
642
+ }],
643
+ /**
644
+ * Break Before
645
+ * @see https://tailwindcss.com/docs/break-before
646
+ */
647
+ "break-before": [{
648
+ "break-before": getBreaks()
649
+ }],
650
+ /**
651
+ * Break Inside
652
+ * @see https://tailwindcss.com/docs/break-inside
653
+ */
654
+ "break-inside": [{
655
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
656
+ }],
657
+ /**
658
+ * Box Decoration Break
659
+ * @see https://tailwindcss.com/docs/box-decoration-break
660
+ */
661
+ "box-decoration": [{
662
+ "box-decoration": ["slice", "clone"]
663
+ }],
664
+ /**
665
+ * Box Sizing
666
+ * @see https://tailwindcss.com/docs/box-sizing
667
+ */
668
+ box: [{
669
+ box: ["border", "content"]
670
+ }],
671
+ /**
672
+ * Display
673
+ * @see https://tailwindcss.com/docs/display
674
+ */
675
+ 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"],
676
+ /**
677
+ * Floats
678
+ * @see https://tailwindcss.com/docs/float
679
+ */
680
+ float: [{
681
+ float: ["right", "left", "none", "start", "end"]
682
+ }],
683
+ /**
684
+ * Clear
685
+ * @see https://tailwindcss.com/docs/clear
686
+ */
687
+ clear: [{
688
+ clear: ["left", "right", "both", "none", "start", "end"]
689
+ }],
690
+ /**
691
+ * Isolation
692
+ * @see https://tailwindcss.com/docs/isolation
693
+ */
694
+ isolation: ["isolate", "isolation-auto"],
695
+ /**
696
+ * Object Fit
697
+ * @see https://tailwindcss.com/docs/object-fit
698
+ */
699
+ "object-fit": [{
700
+ object: ["contain", "cover", "fill", "none", "scale-down"]
701
+ }],
702
+ /**
703
+ * Object Position
704
+ * @see https://tailwindcss.com/docs/object-position
705
+ */
706
+ "object-position": [{
707
+ object: [...getPositions(), isArbitraryValue]
708
+ }],
709
+ /**
710
+ * Overflow
711
+ * @see https://tailwindcss.com/docs/overflow
712
+ */
713
+ overflow: [{
714
+ overflow: getOverflow()
715
+ }],
716
+ /**
717
+ * Overflow X
718
+ * @see https://tailwindcss.com/docs/overflow
719
+ */
720
+ "overflow-x": [{
721
+ "overflow-x": getOverflow()
722
+ }],
723
+ /**
724
+ * Overflow Y
725
+ * @see https://tailwindcss.com/docs/overflow
726
+ */
727
+ "overflow-y": [{
728
+ "overflow-y": getOverflow()
729
+ }],
730
+ /**
731
+ * Overscroll Behavior
732
+ * @see https://tailwindcss.com/docs/overscroll-behavior
733
+ */
734
+ overscroll: [{
735
+ overscroll: getOverscroll()
736
+ }],
737
+ /**
738
+ * Overscroll Behavior X
739
+ * @see https://tailwindcss.com/docs/overscroll-behavior
740
+ */
741
+ "overscroll-x": [{
742
+ "overscroll-x": getOverscroll()
743
+ }],
744
+ /**
745
+ * Overscroll Behavior Y
746
+ * @see https://tailwindcss.com/docs/overscroll-behavior
747
+ */
748
+ "overscroll-y": [{
749
+ "overscroll-y": getOverscroll()
750
+ }],
751
+ /**
752
+ * Position
753
+ * @see https://tailwindcss.com/docs/position
754
+ */
755
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
756
+ /**
757
+ * Top / Right / Bottom / Left
758
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
759
+ */
760
+ inset: [{
761
+ inset: [inset]
762
+ }],
763
+ /**
764
+ * Right / Left
765
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
766
+ */
767
+ "inset-x": [{
768
+ "inset-x": [inset]
769
+ }],
770
+ /**
771
+ * Top / Bottom
772
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
773
+ */
774
+ "inset-y": [{
775
+ "inset-y": [inset]
776
+ }],
777
+ /**
778
+ * Start
779
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
780
+ */
781
+ start: [{
782
+ start: [inset]
783
+ }],
784
+ /**
785
+ * End
786
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
787
+ */
788
+ end: [{
789
+ end: [inset]
790
+ }],
791
+ /**
792
+ * Top
793
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
794
+ */
795
+ top: [{
796
+ top: [inset]
797
+ }],
798
+ /**
799
+ * Right
800
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
801
+ */
802
+ right: [{
803
+ right: [inset]
804
+ }],
805
+ /**
806
+ * Bottom
807
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
808
+ */
809
+ bottom: [{
810
+ bottom: [inset]
811
+ }],
812
+ /**
813
+ * Left
814
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
815
+ */
816
+ left: [{
817
+ left: [inset]
818
+ }],
819
+ /**
820
+ * Visibility
821
+ * @see https://tailwindcss.com/docs/visibility
822
+ */
823
+ visibility: ["visible", "invisible", "collapse"],
824
+ /**
825
+ * Z-Index
826
+ * @see https://tailwindcss.com/docs/z-index
827
+ */
828
+ z: [{
829
+ z: ["auto", isInteger, isArbitraryValue]
830
+ }],
831
+ // Flexbox and Grid
832
+ /**
833
+ * Flex Basis
834
+ * @see https://tailwindcss.com/docs/flex-basis
835
+ */
836
+ basis: [{
837
+ basis: getSpacingWithAutoAndArbitrary()
838
+ }],
839
+ /**
840
+ * Flex Direction
841
+ * @see https://tailwindcss.com/docs/flex-direction
842
+ */
843
+ "flex-direction": [{
844
+ flex: ["row", "row-reverse", "col", "col-reverse"]
845
+ }],
846
+ /**
847
+ * Flex Wrap
848
+ * @see https://tailwindcss.com/docs/flex-wrap
849
+ */
850
+ "flex-wrap": [{
851
+ flex: ["wrap", "wrap-reverse", "nowrap"]
852
+ }],
853
+ /**
854
+ * Flex
855
+ * @see https://tailwindcss.com/docs/flex
856
+ */
857
+ flex: [{
858
+ flex: ["1", "auto", "initial", "none", isArbitraryValue]
859
+ }],
860
+ /**
861
+ * Flex Grow
862
+ * @see https://tailwindcss.com/docs/flex-grow
863
+ */
864
+ grow: [{
865
+ grow: getZeroAndEmpty()
866
+ }],
867
+ /**
868
+ * Flex Shrink
869
+ * @see https://tailwindcss.com/docs/flex-shrink
870
+ */
871
+ shrink: [{
872
+ shrink: getZeroAndEmpty()
873
+ }],
874
+ /**
875
+ * Order
876
+ * @see https://tailwindcss.com/docs/order
877
+ */
878
+ order: [{
879
+ order: ["first", "last", "none", isInteger, isArbitraryValue]
880
+ }],
881
+ /**
882
+ * Grid Template Columns
883
+ * @see https://tailwindcss.com/docs/grid-template-columns
884
+ */
885
+ "grid-cols": [{
886
+ "grid-cols": [isAny]
887
+ }],
888
+ /**
889
+ * Grid Column Start / End
890
+ * @see https://tailwindcss.com/docs/grid-column
891
+ */
892
+ "col-start-end": [{
893
+ col: ["auto", {
894
+ span: ["full", isInteger, isArbitraryValue]
895
+ }, isArbitraryValue]
896
+ }],
897
+ /**
898
+ * Grid Column Start
899
+ * @see https://tailwindcss.com/docs/grid-column
900
+ */
901
+ "col-start": [{
902
+ "col-start": getNumberWithAutoAndArbitrary()
903
+ }],
904
+ /**
905
+ * Grid Column End
906
+ * @see https://tailwindcss.com/docs/grid-column
907
+ */
908
+ "col-end": [{
909
+ "col-end": getNumberWithAutoAndArbitrary()
910
+ }],
911
+ /**
912
+ * Grid Template Rows
913
+ * @see https://tailwindcss.com/docs/grid-template-rows
914
+ */
915
+ "grid-rows": [{
916
+ "grid-rows": [isAny]
917
+ }],
918
+ /**
919
+ * Grid Row Start / End
920
+ * @see https://tailwindcss.com/docs/grid-row
921
+ */
922
+ "row-start-end": [{
923
+ row: ["auto", {
924
+ span: [isInteger, isArbitraryValue]
925
+ }, isArbitraryValue]
926
+ }],
927
+ /**
928
+ * Grid Row Start
929
+ * @see https://tailwindcss.com/docs/grid-row
930
+ */
931
+ "row-start": [{
932
+ "row-start": getNumberWithAutoAndArbitrary()
933
+ }],
934
+ /**
935
+ * Grid Row End
936
+ * @see https://tailwindcss.com/docs/grid-row
937
+ */
938
+ "row-end": [{
939
+ "row-end": getNumberWithAutoAndArbitrary()
940
+ }],
941
+ /**
942
+ * Grid Auto Flow
943
+ * @see https://tailwindcss.com/docs/grid-auto-flow
944
+ */
945
+ "grid-flow": [{
946
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
947
+ }],
948
+ /**
949
+ * Grid Auto Columns
950
+ * @see https://tailwindcss.com/docs/grid-auto-columns
951
+ */
952
+ "auto-cols": [{
953
+ "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
954
+ }],
955
+ /**
956
+ * Grid Auto Rows
957
+ * @see https://tailwindcss.com/docs/grid-auto-rows
958
+ */
959
+ "auto-rows": [{
960
+ "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
961
+ }],
962
+ /**
963
+ * Gap
964
+ * @see https://tailwindcss.com/docs/gap
965
+ */
966
+ gap: [{
967
+ gap: [gap]
968
+ }],
969
+ /**
970
+ * Gap X
971
+ * @see https://tailwindcss.com/docs/gap
972
+ */
973
+ "gap-x": [{
974
+ "gap-x": [gap]
975
+ }],
976
+ /**
977
+ * Gap Y
978
+ * @see https://tailwindcss.com/docs/gap
979
+ */
980
+ "gap-y": [{
981
+ "gap-y": [gap]
982
+ }],
983
+ /**
984
+ * Justify Content
985
+ * @see https://tailwindcss.com/docs/justify-content
986
+ */
987
+ "justify-content": [{
988
+ justify: ["normal", ...getAlign()]
989
+ }],
990
+ /**
991
+ * Justify Items
992
+ * @see https://tailwindcss.com/docs/justify-items
993
+ */
994
+ "justify-items": [{
995
+ "justify-items": ["start", "end", "center", "stretch"]
996
+ }],
997
+ /**
998
+ * Justify Self
999
+ * @see https://tailwindcss.com/docs/justify-self
1000
+ */
1001
+ "justify-self": [{
1002
+ "justify-self": ["auto", "start", "end", "center", "stretch"]
1003
+ }],
1004
+ /**
1005
+ * Align Content
1006
+ * @see https://tailwindcss.com/docs/align-content
1007
+ */
1008
+ "align-content": [{
1009
+ content: ["normal", ...getAlign(), "baseline"]
1010
+ }],
1011
+ /**
1012
+ * Align Items
1013
+ * @see https://tailwindcss.com/docs/align-items
1014
+ */
1015
+ "align-items": [{
1016
+ items: ["start", "end", "center", "baseline", "stretch"]
1017
+ }],
1018
+ /**
1019
+ * Align Self
1020
+ * @see https://tailwindcss.com/docs/align-self
1021
+ */
1022
+ "align-self": [{
1023
+ self: ["auto", "start", "end", "center", "stretch", "baseline"]
1024
+ }],
1025
+ /**
1026
+ * Place Content
1027
+ * @see https://tailwindcss.com/docs/place-content
1028
+ */
1029
+ "place-content": [{
1030
+ "place-content": [...getAlign(), "baseline"]
1031
+ }],
1032
+ /**
1033
+ * Place Items
1034
+ * @see https://tailwindcss.com/docs/place-items
1035
+ */
1036
+ "place-items": [{
1037
+ "place-items": ["start", "end", "center", "baseline", "stretch"]
1038
+ }],
1039
+ /**
1040
+ * Place Self
1041
+ * @see https://tailwindcss.com/docs/place-self
1042
+ */
1043
+ "place-self": [{
1044
+ "place-self": ["auto", "start", "end", "center", "stretch"]
1045
+ }],
1046
+ // Spacing
1047
+ /**
1048
+ * Padding
1049
+ * @see https://tailwindcss.com/docs/padding
1050
+ */
1051
+ p: [{
1052
+ p: [padding]
1053
+ }],
1054
+ /**
1055
+ * Padding X
1056
+ * @see https://tailwindcss.com/docs/padding
1057
+ */
1058
+ px: [{
1059
+ px: [padding]
1060
+ }],
1061
+ /**
1062
+ * Padding Y
1063
+ * @see https://tailwindcss.com/docs/padding
1064
+ */
1065
+ py: [{
1066
+ py: [padding]
1067
+ }],
1068
+ /**
1069
+ * Padding Start
1070
+ * @see https://tailwindcss.com/docs/padding
1071
+ */
1072
+ ps: [{
1073
+ ps: [padding]
1074
+ }],
1075
+ /**
1076
+ * Padding End
1077
+ * @see https://tailwindcss.com/docs/padding
1078
+ */
1079
+ pe: [{
1080
+ pe: [padding]
1081
+ }],
1082
+ /**
1083
+ * Padding Top
1084
+ * @see https://tailwindcss.com/docs/padding
1085
+ */
1086
+ pt: [{
1087
+ pt: [padding]
1088
+ }],
1089
+ /**
1090
+ * Padding Right
1091
+ * @see https://tailwindcss.com/docs/padding
1092
+ */
1093
+ pr: [{
1094
+ pr: [padding]
1095
+ }],
1096
+ /**
1097
+ * Padding Bottom
1098
+ * @see https://tailwindcss.com/docs/padding
1099
+ */
1100
+ pb: [{
1101
+ pb: [padding]
1102
+ }],
1103
+ /**
1104
+ * Padding Left
1105
+ * @see https://tailwindcss.com/docs/padding
1106
+ */
1107
+ pl: [{
1108
+ pl: [padding]
1109
+ }],
1110
+ /**
1111
+ * Margin
1112
+ * @see https://tailwindcss.com/docs/margin
1113
+ */
1114
+ m: [{
1115
+ m: [margin]
1116
+ }],
1117
+ /**
1118
+ * Margin X
1119
+ * @see https://tailwindcss.com/docs/margin
1120
+ */
1121
+ mx: [{
1122
+ mx: [margin]
1123
+ }],
1124
+ /**
1125
+ * Margin Y
1126
+ * @see https://tailwindcss.com/docs/margin
1127
+ */
1128
+ my: [{
1129
+ my: [margin]
1130
+ }],
1131
+ /**
1132
+ * Margin Start
1133
+ * @see https://tailwindcss.com/docs/margin
1134
+ */
1135
+ ms: [{
1136
+ ms: [margin]
1137
+ }],
1138
+ /**
1139
+ * Margin End
1140
+ * @see https://tailwindcss.com/docs/margin
1141
+ */
1142
+ me: [{
1143
+ me: [margin]
1144
+ }],
1145
+ /**
1146
+ * Margin Top
1147
+ * @see https://tailwindcss.com/docs/margin
1148
+ */
1149
+ mt: [{
1150
+ mt: [margin]
1151
+ }],
1152
+ /**
1153
+ * Margin Right
1154
+ * @see https://tailwindcss.com/docs/margin
1155
+ */
1156
+ mr: [{
1157
+ mr: [margin]
1158
+ }],
1159
+ /**
1160
+ * Margin Bottom
1161
+ * @see https://tailwindcss.com/docs/margin
1162
+ */
1163
+ mb: [{
1164
+ mb: [margin]
1165
+ }],
1166
+ /**
1167
+ * Margin Left
1168
+ * @see https://tailwindcss.com/docs/margin
1169
+ */
1170
+ ml: [{
1171
+ ml: [margin]
1172
+ }],
1173
+ /**
1174
+ * Space Between X
1175
+ * @see https://tailwindcss.com/docs/space
1176
+ */
1177
+ "space-x": [{
1178
+ "space-x": [space]
1179
+ }],
1180
+ /**
1181
+ * Space Between X Reverse
1182
+ * @see https://tailwindcss.com/docs/space
1183
+ */
1184
+ "space-x-reverse": ["space-x-reverse"],
1185
+ /**
1186
+ * Space Between Y
1187
+ * @see https://tailwindcss.com/docs/space
1188
+ */
1189
+ "space-y": [{
1190
+ "space-y": [space]
1191
+ }],
1192
+ /**
1193
+ * Space Between Y Reverse
1194
+ * @see https://tailwindcss.com/docs/space
1195
+ */
1196
+ "space-y-reverse": ["space-y-reverse"],
1197
+ // Sizing
1198
+ /**
1199
+ * Width
1200
+ * @see https://tailwindcss.com/docs/width
1201
+ */
1202
+ w: [{
1203
+ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
1204
+ }],
1205
+ /**
1206
+ * Min-Width
1207
+ * @see https://tailwindcss.com/docs/min-width
1208
+ */
1209
+ "min-w": [{
1210
+ "min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
1211
+ }],
1212
+ /**
1213
+ * Max-Width
1214
+ * @see https://tailwindcss.com/docs/max-width
1215
+ */
1216
+ "max-w": [{
1217
+ "max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
1218
+ screen: [isTshirtSize]
1219
+ }, isTshirtSize]
1220
+ }],
1221
+ /**
1222
+ * Height
1223
+ * @see https://tailwindcss.com/docs/height
1224
+ */
1225
+ h: [{
1226
+ h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
1227
+ }],
1228
+ /**
1229
+ * Min-Height
1230
+ * @see https://tailwindcss.com/docs/min-height
1231
+ */
1232
+ "min-h": [{
1233
+ "min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1234
+ }],
1235
+ /**
1236
+ * Max-Height
1237
+ * @see https://tailwindcss.com/docs/max-height
1238
+ */
1239
+ "max-h": [{
1240
+ "max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1241
+ }],
1242
+ /**
1243
+ * Size
1244
+ * @see https://tailwindcss.com/docs/size
1245
+ */
1246
+ size: [{
1247
+ size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
1248
+ }],
1249
+ // Typography
1250
+ /**
1251
+ * Font Size
1252
+ * @see https://tailwindcss.com/docs/font-size
1253
+ */
1254
+ "font-size": [{
1255
+ text: ["base", isTshirtSize, isArbitraryLength]
1256
+ }],
1257
+ /**
1258
+ * Font Smoothing
1259
+ * @see https://tailwindcss.com/docs/font-smoothing
1260
+ */
1261
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1262
+ /**
1263
+ * Font Style
1264
+ * @see https://tailwindcss.com/docs/font-style
1265
+ */
1266
+ "font-style": ["italic", "not-italic"],
1267
+ /**
1268
+ * Font Weight
1269
+ * @see https://tailwindcss.com/docs/font-weight
1270
+ */
1271
+ "font-weight": [{
1272
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
1273
+ }],
1274
+ /**
1275
+ * Font Family
1276
+ * @see https://tailwindcss.com/docs/font-family
1277
+ */
1278
+ "font-family": [{
1279
+ font: [isAny]
1280
+ }],
1281
+ /**
1282
+ * Font Variant Numeric
1283
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1284
+ */
1285
+ "fvn-normal": ["normal-nums"],
1286
+ /**
1287
+ * Font Variant Numeric
1288
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1289
+ */
1290
+ "fvn-ordinal": ["ordinal"],
1291
+ /**
1292
+ * Font Variant Numeric
1293
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1294
+ */
1295
+ "fvn-slashed-zero": ["slashed-zero"],
1296
+ /**
1297
+ * Font Variant Numeric
1298
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1299
+ */
1300
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1301
+ /**
1302
+ * Font Variant Numeric
1303
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1304
+ */
1305
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1306
+ /**
1307
+ * Font Variant Numeric
1308
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1309
+ */
1310
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
1311
+ /**
1312
+ * Letter Spacing
1313
+ * @see https://tailwindcss.com/docs/letter-spacing
1314
+ */
1315
+ tracking: [{
1316
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
1317
+ }],
1318
+ /**
1319
+ * Line Clamp
1320
+ * @see https://tailwindcss.com/docs/line-clamp
1321
+ */
1322
+ "line-clamp": [{
1323
+ "line-clamp": ["none", isNumber, isArbitraryNumber]
1324
+ }],
1325
+ /**
1326
+ * Line Height
1327
+ * @see https://tailwindcss.com/docs/line-height
1328
+ */
1329
+ leading: [{
1330
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
1331
+ }],
1332
+ /**
1333
+ * List Style Image
1334
+ * @see https://tailwindcss.com/docs/list-style-image
1335
+ */
1336
+ "list-image": [{
1337
+ "list-image": ["none", isArbitraryValue]
1338
+ }],
1339
+ /**
1340
+ * List Style Type
1341
+ * @see https://tailwindcss.com/docs/list-style-type
1342
+ */
1343
+ "list-style-type": [{
1344
+ list: ["none", "disc", "decimal", isArbitraryValue]
1345
+ }],
1346
+ /**
1347
+ * List Style Position
1348
+ * @see https://tailwindcss.com/docs/list-style-position
1349
+ */
1350
+ "list-style-position": [{
1351
+ list: ["inside", "outside"]
1352
+ }],
1353
+ /**
1354
+ * Placeholder Color
1355
+ * @deprecated since Tailwind CSS v3.0.0
1356
+ * @see https://tailwindcss.com/docs/placeholder-color
1357
+ */
1358
+ "placeholder-color": [{
1359
+ placeholder: [colors]
1360
+ }],
1361
+ /**
1362
+ * Placeholder Opacity
1363
+ * @see https://tailwindcss.com/docs/placeholder-opacity
1364
+ */
1365
+ "placeholder-opacity": [{
1366
+ "placeholder-opacity": [opacity]
1367
+ }],
1368
+ /**
1369
+ * Text Alignment
1370
+ * @see https://tailwindcss.com/docs/text-align
1371
+ */
1372
+ "text-alignment": [{
1373
+ text: ["left", "center", "right", "justify", "start", "end"]
1374
+ }],
1375
+ /**
1376
+ * Text Color
1377
+ * @see https://tailwindcss.com/docs/text-color
1378
+ */
1379
+ "text-color": [{
1380
+ text: [colors]
1381
+ }],
1382
+ /**
1383
+ * Text Opacity
1384
+ * @see https://tailwindcss.com/docs/text-opacity
1385
+ */
1386
+ "text-opacity": [{
1387
+ "text-opacity": [opacity]
1388
+ }],
1389
+ /**
1390
+ * Text Decoration
1391
+ * @see https://tailwindcss.com/docs/text-decoration
1392
+ */
1393
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1394
+ /**
1395
+ * Text Decoration Style
1396
+ * @see https://tailwindcss.com/docs/text-decoration-style
1397
+ */
1398
+ "text-decoration-style": [{
1399
+ decoration: [...getLineStyles(), "wavy"]
1400
+ }],
1401
+ /**
1402
+ * Text Decoration Thickness
1403
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1404
+ */
1405
+ "text-decoration-thickness": [{
1406
+ decoration: ["auto", "from-font", isLength, isArbitraryLength]
1407
+ }],
1408
+ /**
1409
+ * Text Underline Offset
1410
+ * @see https://tailwindcss.com/docs/text-underline-offset
1411
+ */
1412
+ "underline-offset": [{
1413
+ "underline-offset": ["auto", isLength, isArbitraryValue]
1414
+ }],
1415
+ /**
1416
+ * Text Decoration Color
1417
+ * @see https://tailwindcss.com/docs/text-decoration-color
1418
+ */
1419
+ "text-decoration-color": [{
1420
+ decoration: [colors]
1421
+ }],
1422
+ /**
1423
+ * Text Transform
1424
+ * @see https://tailwindcss.com/docs/text-transform
1425
+ */
1426
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1427
+ /**
1428
+ * Text Overflow
1429
+ * @see https://tailwindcss.com/docs/text-overflow
1430
+ */
1431
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1432
+ /**
1433
+ * Text Wrap
1434
+ * @see https://tailwindcss.com/docs/text-wrap
1435
+ */
1436
+ "text-wrap": [{
1437
+ text: ["wrap", "nowrap", "balance", "pretty"]
1438
+ }],
1439
+ /**
1440
+ * Text Indent
1441
+ * @see https://tailwindcss.com/docs/text-indent
1442
+ */
1443
+ indent: [{
1444
+ indent: getSpacingWithArbitrary()
1445
+ }],
1446
+ /**
1447
+ * Vertical Alignment
1448
+ * @see https://tailwindcss.com/docs/vertical-align
1449
+ */
1450
+ "vertical-align": [{
1451
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
1452
+ }],
1453
+ /**
1454
+ * Whitespace
1455
+ * @see https://tailwindcss.com/docs/whitespace
1456
+ */
1457
+ whitespace: [{
1458
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1459
+ }],
1460
+ /**
1461
+ * Word Break
1462
+ * @see https://tailwindcss.com/docs/word-break
1463
+ */
1464
+ break: [{
1465
+ break: ["normal", "words", "all", "keep"]
1466
+ }],
1467
+ /**
1468
+ * Hyphens
1469
+ * @see https://tailwindcss.com/docs/hyphens
1470
+ */
1471
+ hyphens: [{
1472
+ hyphens: ["none", "manual", "auto"]
1473
+ }],
1474
+ /**
1475
+ * Content
1476
+ * @see https://tailwindcss.com/docs/content
1477
+ */
1478
+ content: [{
1479
+ content: ["none", isArbitraryValue]
1480
+ }],
1481
+ // Backgrounds
1482
+ /**
1483
+ * Background Attachment
1484
+ * @see https://tailwindcss.com/docs/background-attachment
1485
+ */
1486
+ "bg-attachment": [{
1487
+ bg: ["fixed", "local", "scroll"]
1488
+ }],
1489
+ /**
1490
+ * Background Clip
1491
+ * @see https://tailwindcss.com/docs/background-clip
1492
+ */
1493
+ "bg-clip": [{
1494
+ "bg-clip": ["border", "padding", "content", "text"]
1495
+ }],
1496
+ /**
1497
+ * Background Opacity
1498
+ * @deprecated since Tailwind CSS v3.0.0
1499
+ * @see https://tailwindcss.com/docs/background-opacity
1500
+ */
1501
+ "bg-opacity": [{
1502
+ "bg-opacity": [opacity]
1503
+ }],
1504
+ /**
1505
+ * Background Origin
1506
+ * @see https://tailwindcss.com/docs/background-origin
1507
+ */
1508
+ "bg-origin": [{
1509
+ "bg-origin": ["border", "padding", "content"]
1510
+ }],
1511
+ /**
1512
+ * Background Position
1513
+ * @see https://tailwindcss.com/docs/background-position
1514
+ */
1515
+ "bg-position": [{
1516
+ bg: [...getPositions(), isArbitraryPosition]
1517
+ }],
1518
+ /**
1519
+ * Background Repeat
1520
+ * @see https://tailwindcss.com/docs/background-repeat
1521
+ */
1522
+ "bg-repeat": [{
1523
+ bg: ["no-repeat", {
1524
+ repeat: ["", "x", "y", "round", "space"]
1525
+ }]
1526
+ }],
1527
+ /**
1528
+ * Background Size
1529
+ * @see https://tailwindcss.com/docs/background-size
1530
+ */
1531
+ "bg-size": [{
1532
+ bg: ["auto", "cover", "contain", isArbitrarySize]
1533
+ }],
1534
+ /**
1535
+ * Background Image
1536
+ * @see https://tailwindcss.com/docs/background-image
1537
+ */
1538
+ "bg-image": [{
1539
+ bg: ["none", {
1540
+ "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1541
+ }, isArbitraryImage]
1542
+ }],
1543
+ /**
1544
+ * Background Color
1545
+ * @see https://tailwindcss.com/docs/background-color
1546
+ */
1547
+ "bg-color": [{
1548
+ bg: [colors]
1549
+ }],
1550
+ /**
1551
+ * Gradient Color Stops From Position
1552
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1553
+ */
1554
+ "gradient-from-pos": [{
1555
+ from: [gradientColorStopPositions]
1556
+ }],
1557
+ /**
1558
+ * Gradient Color Stops Via Position
1559
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1560
+ */
1561
+ "gradient-via-pos": [{
1562
+ via: [gradientColorStopPositions]
1563
+ }],
1564
+ /**
1565
+ * Gradient Color Stops To Position
1566
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1567
+ */
1568
+ "gradient-to-pos": [{
1569
+ to: [gradientColorStopPositions]
1570
+ }],
1571
+ /**
1572
+ * Gradient Color Stops From
1573
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1574
+ */
1575
+ "gradient-from": [{
1576
+ from: [gradientColorStops]
1577
+ }],
1578
+ /**
1579
+ * Gradient Color Stops Via
1580
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1581
+ */
1582
+ "gradient-via": [{
1583
+ via: [gradientColorStops]
1584
+ }],
1585
+ /**
1586
+ * Gradient Color Stops To
1587
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1588
+ */
1589
+ "gradient-to": [{
1590
+ to: [gradientColorStops]
1591
+ }],
1592
+ // Borders
1593
+ /**
1594
+ * Border Radius
1595
+ * @see https://tailwindcss.com/docs/border-radius
1596
+ */
1597
+ rounded: [{
1598
+ rounded: [borderRadius]
1599
+ }],
1600
+ /**
1601
+ * Border Radius Start
1602
+ * @see https://tailwindcss.com/docs/border-radius
1603
+ */
1604
+ "rounded-s": [{
1605
+ "rounded-s": [borderRadius]
1606
+ }],
1607
+ /**
1608
+ * Border Radius End
1609
+ * @see https://tailwindcss.com/docs/border-radius
1610
+ */
1611
+ "rounded-e": [{
1612
+ "rounded-e": [borderRadius]
1613
+ }],
1614
+ /**
1615
+ * Border Radius Top
1616
+ * @see https://tailwindcss.com/docs/border-radius
1617
+ */
1618
+ "rounded-t": [{
1619
+ "rounded-t": [borderRadius]
1620
+ }],
1621
+ /**
1622
+ * Border Radius Right
1623
+ * @see https://tailwindcss.com/docs/border-radius
1624
+ */
1625
+ "rounded-r": [{
1626
+ "rounded-r": [borderRadius]
1627
+ }],
1628
+ /**
1629
+ * Border Radius Bottom
1630
+ * @see https://tailwindcss.com/docs/border-radius
1631
+ */
1632
+ "rounded-b": [{
1633
+ "rounded-b": [borderRadius]
1634
+ }],
1635
+ /**
1636
+ * Border Radius Left
1637
+ * @see https://tailwindcss.com/docs/border-radius
1638
+ */
1639
+ "rounded-l": [{
1640
+ "rounded-l": [borderRadius]
1641
+ }],
1642
+ /**
1643
+ * Border Radius Start Start
1644
+ * @see https://tailwindcss.com/docs/border-radius
1645
+ */
1646
+ "rounded-ss": [{
1647
+ "rounded-ss": [borderRadius]
1648
+ }],
1649
+ /**
1650
+ * Border Radius Start End
1651
+ * @see https://tailwindcss.com/docs/border-radius
1652
+ */
1653
+ "rounded-se": [{
1654
+ "rounded-se": [borderRadius]
1655
+ }],
1656
+ /**
1657
+ * Border Radius End End
1658
+ * @see https://tailwindcss.com/docs/border-radius
1659
+ */
1660
+ "rounded-ee": [{
1661
+ "rounded-ee": [borderRadius]
1662
+ }],
1663
+ /**
1664
+ * Border Radius End Start
1665
+ * @see https://tailwindcss.com/docs/border-radius
1666
+ */
1667
+ "rounded-es": [{
1668
+ "rounded-es": [borderRadius]
1669
+ }],
1670
+ /**
1671
+ * Border Radius Top Left
1672
+ * @see https://tailwindcss.com/docs/border-radius
1673
+ */
1674
+ "rounded-tl": [{
1675
+ "rounded-tl": [borderRadius]
1676
+ }],
1677
+ /**
1678
+ * Border Radius Top Right
1679
+ * @see https://tailwindcss.com/docs/border-radius
1680
+ */
1681
+ "rounded-tr": [{
1682
+ "rounded-tr": [borderRadius]
1683
+ }],
1684
+ /**
1685
+ * Border Radius Bottom Right
1686
+ * @see https://tailwindcss.com/docs/border-radius
1687
+ */
1688
+ "rounded-br": [{
1689
+ "rounded-br": [borderRadius]
1690
+ }],
1691
+ /**
1692
+ * Border Radius Bottom Left
1693
+ * @see https://tailwindcss.com/docs/border-radius
1694
+ */
1695
+ "rounded-bl": [{
1696
+ "rounded-bl": [borderRadius]
1697
+ }],
1698
+ /**
1699
+ * Border Width
1700
+ * @see https://tailwindcss.com/docs/border-width
1701
+ */
1702
+ "border-w": [{
1703
+ border: [borderWidth]
1704
+ }],
1705
+ /**
1706
+ * Border Width X
1707
+ * @see https://tailwindcss.com/docs/border-width
1708
+ */
1709
+ "border-w-x": [{
1710
+ "border-x": [borderWidth]
1711
+ }],
1712
+ /**
1713
+ * Border Width Y
1714
+ * @see https://tailwindcss.com/docs/border-width
1715
+ */
1716
+ "border-w-y": [{
1717
+ "border-y": [borderWidth]
1718
+ }],
1719
+ /**
1720
+ * Border Width Start
1721
+ * @see https://tailwindcss.com/docs/border-width
1722
+ */
1723
+ "border-w-s": [{
1724
+ "border-s": [borderWidth]
1725
+ }],
1726
+ /**
1727
+ * Border Width End
1728
+ * @see https://tailwindcss.com/docs/border-width
1729
+ */
1730
+ "border-w-e": [{
1731
+ "border-e": [borderWidth]
1732
+ }],
1733
+ /**
1734
+ * Border Width Top
1735
+ * @see https://tailwindcss.com/docs/border-width
1736
+ */
1737
+ "border-w-t": [{
1738
+ "border-t": [borderWidth]
1739
+ }],
1740
+ /**
1741
+ * Border Width Right
1742
+ * @see https://tailwindcss.com/docs/border-width
1743
+ */
1744
+ "border-w-r": [{
1745
+ "border-r": [borderWidth]
1746
+ }],
1747
+ /**
1748
+ * Border Width Bottom
1749
+ * @see https://tailwindcss.com/docs/border-width
1750
+ */
1751
+ "border-w-b": [{
1752
+ "border-b": [borderWidth]
1753
+ }],
1754
+ /**
1755
+ * Border Width Left
1756
+ * @see https://tailwindcss.com/docs/border-width
1757
+ */
1758
+ "border-w-l": [{
1759
+ "border-l": [borderWidth]
1760
+ }],
1761
+ /**
1762
+ * Border Opacity
1763
+ * @see https://tailwindcss.com/docs/border-opacity
1764
+ */
1765
+ "border-opacity": [{
1766
+ "border-opacity": [opacity]
1767
+ }],
1768
+ /**
1769
+ * Border Style
1770
+ * @see https://tailwindcss.com/docs/border-style
1771
+ */
1772
+ "border-style": [{
1773
+ border: [...getLineStyles(), "hidden"]
1774
+ }],
1775
+ /**
1776
+ * Divide Width X
1777
+ * @see https://tailwindcss.com/docs/divide-width
1778
+ */
1779
+ "divide-x": [{
1780
+ "divide-x": [borderWidth]
1781
+ }],
1782
+ /**
1783
+ * Divide Width X Reverse
1784
+ * @see https://tailwindcss.com/docs/divide-width
1785
+ */
1786
+ "divide-x-reverse": ["divide-x-reverse"],
1787
+ /**
1788
+ * Divide Width Y
1789
+ * @see https://tailwindcss.com/docs/divide-width
1790
+ */
1791
+ "divide-y": [{
1792
+ "divide-y": [borderWidth]
1793
+ }],
1794
+ /**
1795
+ * Divide Width Y Reverse
1796
+ * @see https://tailwindcss.com/docs/divide-width
1797
+ */
1798
+ "divide-y-reverse": ["divide-y-reverse"],
1799
+ /**
1800
+ * Divide Opacity
1801
+ * @see https://tailwindcss.com/docs/divide-opacity
1802
+ */
1803
+ "divide-opacity": [{
1804
+ "divide-opacity": [opacity]
1805
+ }],
1806
+ /**
1807
+ * Divide Style
1808
+ * @see https://tailwindcss.com/docs/divide-style
1809
+ */
1810
+ "divide-style": [{
1811
+ divide: getLineStyles()
1812
+ }],
1813
+ /**
1814
+ * Border Color
1815
+ * @see https://tailwindcss.com/docs/border-color
1816
+ */
1817
+ "border-color": [{
1818
+ border: [borderColor]
1819
+ }],
1820
+ /**
1821
+ * Border Color X
1822
+ * @see https://tailwindcss.com/docs/border-color
1823
+ */
1824
+ "border-color-x": [{
1825
+ "border-x": [borderColor]
1826
+ }],
1827
+ /**
1828
+ * Border Color Y
1829
+ * @see https://tailwindcss.com/docs/border-color
1830
+ */
1831
+ "border-color-y": [{
1832
+ "border-y": [borderColor]
1833
+ }],
1834
+ /**
1835
+ * Border Color Top
1836
+ * @see https://tailwindcss.com/docs/border-color
1837
+ */
1838
+ "border-color-t": [{
1839
+ "border-t": [borderColor]
1840
+ }],
1841
+ /**
1842
+ * Border Color Right
1843
+ * @see https://tailwindcss.com/docs/border-color
1844
+ */
1845
+ "border-color-r": [{
1846
+ "border-r": [borderColor]
1847
+ }],
1848
+ /**
1849
+ * Border Color Bottom
1850
+ * @see https://tailwindcss.com/docs/border-color
1851
+ */
1852
+ "border-color-b": [{
1853
+ "border-b": [borderColor]
1854
+ }],
1855
+ /**
1856
+ * Border Color Left
1857
+ * @see https://tailwindcss.com/docs/border-color
1858
+ */
1859
+ "border-color-l": [{
1860
+ "border-l": [borderColor]
1861
+ }],
1862
+ /**
1863
+ * Divide Color
1864
+ * @see https://tailwindcss.com/docs/divide-color
1865
+ */
1866
+ "divide-color": [{
1867
+ divide: [borderColor]
1868
+ }],
1869
+ /**
1870
+ * Outline Style
1871
+ * @see https://tailwindcss.com/docs/outline-style
1872
+ */
1873
+ "outline-style": [{
1874
+ outline: ["", ...getLineStyles()]
1875
+ }],
1876
+ /**
1877
+ * Outline Offset
1878
+ * @see https://tailwindcss.com/docs/outline-offset
1879
+ */
1880
+ "outline-offset": [{
1881
+ "outline-offset": [isLength, isArbitraryValue]
1882
+ }],
1883
+ /**
1884
+ * Outline Width
1885
+ * @see https://tailwindcss.com/docs/outline-width
1886
+ */
1887
+ "outline-w": [{
1888
+ outline: [isLength, isArbitraryLength]
1889
+ }],
1890
+ /**
1891
+ * Outline Color
1892
+ * @see https://tailwindcss.com/docs/outline-color
1893
+ */
1894
+ "outline-color": [{
1895
+ outline: [colors]
1896
+ }],
1897
+ /**
1898
+ * Ring Width
1899
+ * @see https://tailwindcss.com/docs/ring-width
1900
+ */
1901
+ "ring-w": [{
1902
+ ring: getLengthWithEmptyAndArbitrary()
1903
+ }],
1904
+ /**
1905
+ * Ring Width Inset
1906
+ * @see https://tailwindcss.com/docs/ring-width
1907
+ */
1908
+ "ring-w-inset": ["ring-inset"],
1909
+ /**
1910
+ * Ring Color
1911
+ * @see https://tailwindcss.com/docs/ring-color
1912
+ */
1913
+ "ring-color": [{
1914
+ ring: [colors]
1915
+ }],
1916
+ /**
1917
+ * Ring Opacity
1918
+ * @see https://tailwindcss.com/docs/ring-opacity
1919
+ */
1920
+ "ring-opacity": [{
1921
+ "ring-opacity": [opacity]
1922
+ }],
1923
+ /**
1924
+ * Ring Offset Width
1925
+ * @see https://tailwindcss.com/docs/ring-offset-width
1926
+ */
1927
+ "ring-offset-w": [{
1928
+ "ring-offset": [isLength, isArbitraryLength]
1929
+ }],
1930
+ /**
1931
+ * Ring Offset Color
1932
+ * @see https://tailwindcss.com/docs/ring-offset-color
1933
+ */
1934
+ "ring-offset-color": [{
1935
+ "ring-offset": [colors]
1936
+ }],
1937
+ // Effects
1938
+ /**
1939
+ * Box Shadow
1940
+ * @see https://tailwindcss.com/docs/box-shadow
1941
+ */
1942
+ shadow: [{
1943
+ shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
1944
+ }],
1945
+ /**
1946
+ * Box Shadow Color
1947
+ * @see https://tailwindcss.com/docs/box-shadow-color
1948
+ */
1949
+ "shadow-color": [{
1950
+ shadow: [isAny]
1951
+ }],
1952
+ /**
1953
+ * Opacity
1954
+ * @see https://tailwindcss.com/docs/opacity
1955
+ */
1956
+ opacity: [{
1957
+ opacity: [opacity]
1958
+ }],
1959
+ /**
1960
+ * Mix Blend Mode
1961
+ * @see https://tailwindcss.com/docs/mix-blend-mode
1962
+ */
1963
+ "mix-blend": [{
1964
+ "mix-blend": getBlendModes()
1965
+ }],
1966
+ /**
1967
+ * Background Blend Mode
1968
+ * @see https://tailwindcss.com/docs/background-blend-mode
1969
+ */
1970
+ "bg-blend": [{
1971
+ "bg-blend": getBlendModes()
1972
+ }],
1973
+ // Filters
1974
+ /**
1975
+ * Filter
1976
+ * @deprecated since Tailwind CSS v3.0.0
1977
+ * @see https://tailwindcss.com/docs/filter
1978
+ */
1979
+ filter: [{
1980
+ filter: ["", "none"]
1981
+ }],
1982
+ /**
1983
+ * Blur
1984
+ * @see https://tailwindcss.com/docs/blur
1985
+ */
1986
+ blur: [{
1987
+ blur: [blur]
1988
+ }],
1989
+ /**
1990
+ * Brightness
1991
+ * @see https://tailwindcss.com/docs/brightness
1992
+ */
1993
+ brightness: [{
1994
+ brightness: [brightness]
1995
+ }],
1996
+ /**
1997
+ * Contrast
1998
+ * @see https://tailwindcss.com/docs/contrast
1999
+ */
2000
+ contrast: [{
2001
+ contrast: [contrast]
2002
+ }],
2003
+ /**
2004
+ * Drop Shadow
2005
+ * @see https://tailwindcss.com/docs/drop-shadow
2006
+ */
2007
+ "drop-shadow": [{
2008
+ "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
2009
+ }],
2010
+ /**
2011
+ * Grayscale
2012
+ * @see https://tailwindcss.com/docs/grayscale
2013
+ */
2014
+ grayscale: [{
2015
+ grayscale: [grayscale]
2016
+ }],
2017
+ /**
2018
+ * Hue Rotate
2019
+ * @see https://tailwindcss.com/docs/hue-rotate
2020
+ */
2021
+ "hue-rotate": [{
2022
+ "hue-rotate": [hueRotate]
2023
+ }],
2024
+ /**
2025
+ * Invert
2026
+ * @see https://tailwindcss.com/docs/invert
2027
+ */
2028
+ invert: [{
2029
+ invert: [invert]
2030
+ }],
2031
+ /**
2032
+ * Saturate
2033
+ * @see https://tailwindcss.com/docs/saturate
2034
+ */
2035
+ saturate: [{
2036
+ saturate: [saturate]
2037
+ }],
2038
+ /**
2039
+ * Sepia
2040
+ * @see https://tailwindcss.com/docs/sepia
2041
+ */
2042
+ sepia: [{
2043
+ sepia: [sepia]
2044
+ }],
2045
+ /**
2046
+ * Backdrop Filter
2047
+ * @deprecated since Tailwind CSS v3.0.0
2048
+ * @see https://tailwindcss.com/docs/backdrop-filter
2049
+ */
2050
+ "backdrop-filter": [{
2051
+ "backdrop-filter": ["", "none"]
2052
+ }],
2053
+ /**
2054
+ * Backdrop Blur
2055
+ * @see https://tailwindcss.com/docs/backdrop-blur
2056
+ */
2057
+ "backdrop-blur": [{
2058
+ "backdrop-blur": [blur]
2059
+ }],
2060
+ /**
2061
+ * Backdrop Brightness
2062
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2063
+ */
2064
+ "backdrop-brightness": [{
2065
+ "backdrop-brightness": [brightness]
2066
+ }],
2067
+ /**
2068
+ * Backdrop Contrast
2069
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2070
+ */
2071
+ "backdrop-contrast": [{
2072
+ "backdrop-contrast": [contrast]
2073
+ }],
2074
+ /**
2075
+ * Backdrop Grayscale
2076
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2077
+ */
2078
+ "backdrop-grayscale": [{
2079
+ "backdrop-grayscale": [grayscale]
2080
+ }],
2081
+ /**
2082
+ * Backdrop Hue Rotate
2083
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2084
+ */
2085
+ "backdrop-hue-rotate": [{
2086
+ "backdrop-hue-rotate": [hueRotate]
2087
+ }],
2088
+ /**
2089
+ * Backdrop Invert
2090
+ * @see https://tailwindcss.com/docs/backdrop-invert
2091
+ */
2092
+ "backdrop-invert": [{
2093
+ "backdrop-invert": [invert]
2094
+ }],
2095
+ /**
2096
+ * Backdrop Opacity
2097
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2098
+ */
2099
+ "backdrop-opacity": [{
2100
+ "backdrop-opacity": [opacity]
2101
+ }],
2102
+ /**
2103
+ * Backdrop Saturate
2104
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2105
+ */
2106
+ "backdrop-saturate": [{
2107
+ "backdrop-saturate": [saturate]
2108
+ }],
2109
+ /**
2110
+ * Backdrop Sepia
2111
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2112
+ */
2113
+ "backdrop-sepia": [{
2114
+ "backdrop-sepia": [sepia]
2115
+ }],
2116
+ // Tables
2117
+ /**
2118
+ * Border Collapse
2119
+ * @see https://tailwindcss.com/docs/border-collapse
2120
+ */
2121
+ "border-collapse": [{
2122
+ border: ["collapse", "separate"]
2123
+ }],
2124
+ /**
2125
+ * Border Spacing
2126
+ * @see https://tailwindcss.com/docs/border-spacing
2127
+ */
2128
+ "border-spacing": [{
2129
+ "border-spacing": [borderSpacing]
2130
+ }],
2131
+ /**
2132
+ * Border Spacing X
2133
+ * @see https://tailwindcss.com/docs/border-spacing
2134
+ */
2135
+ "border-spacing-x": [{
2136
+ "border-spacing-x": [borderSpacing]
2137
+ }],
2138
+ /**
2139
+ * Border Spacing Y
2140
+ * @see https://tailwindcss.com/docs/border-spacing
2141
+ */
2142
+ "border-spacing-y": [{
2143
+ "border-spacing-y": [borderSpacing]
2144
+ }],
2145
+ /**
2146
+ * Table Layout
2147
+ * @see https://tailwindcss.com/docs/table-layout
2148
+ */
2149
+ "table-layout": [{
2150
+ table: ["auto", "fixed"]
2151
+ }],
2152
+ /**
2153
+ * Caption Side
2154
+ * @see https://tailwindcss.com/docs/caption-side
2155
+ */
2156
+ caption: [{
2157
+ caption: ["top", "bottom"]
2158
+ }],
2159
+ // Transitions and Animation
2160
+ /**
2161
+ * Tranisition Property
2162
+ * @see https://tailwindcss.com/docs/transition-property
2163
+ */
2164
+ transition: [{
2165
+ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
2166
+ }],
2167
+ /**
2168
+ * Transition Duration
2169
+ * @see https://tailwindcss.com/docs/transition-duration
2170
+ */
2171
+ duration: [{
2172
+ duration: getNumberAndArbitrary()
2173
+ }],
2174
+ /**
2175
+ * Transition Timing Function
2176
+ * @see https://tailwindcss.com/docs/transition-timing-function
2177
+ */
2178
+ ease: [{
2179
+ ease: ["linear", "in", "out", "in-out", isArbitraryValue]
2180
+ }],
2181
+ /**
2182
+ * Transition Delay
2183
+ * @see https://tailwindcss.com/docs/transition-delay
2184
+ */
2185
+ delay: [{
2186
+ delay: getNumberAndArbitrary()
2187
+ }],
2188
+ /**
2189
+ * Animation
2190
+ * @see https://tailwindcss.com/docs/animation
2191
+ */
2192
+ animate: [{
2193
+ animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
2194
+ }],
2195
+ // Transforms
2196
+ /**
2197
+ * Transform
2198
+ * @see https://tailwindcss.com/docs/transform
2199
+ */
2200
+ transform: [{
2201
+ transform: ["", "gpu", "none"]
2202
+ }],
2203
+ /**
2204
+ * Scale
2205
+ * @see https://tailwindcss.com/docs/scale
2206
+ */
2207
+ scale: [{
2208
+ scale: [scale]
2209
+ }],
2210
+ /**
2211
+ * Scale X
2212
+ * @see https://tailwindcss.com/docs/scale
2213
+ */
2214
+ "scale-x": [{
2215
+ "scale-x": [scale]
2216
+ }],
2217
+ /**
2218
+ * Scale Y
2219
+ * @see https://tailwindcss.com/docs/scale
2220
+ */
2221
+ "scale-y": [{
2222
+ "scale-y": [scale]
2223
+ }],
2224
+ /**
2225
+ * Rotate
2226
+ * @see https://tailwindcss.com/docs/rotate
2227
+ */
2228
+ rotate: [{
2229
+ rotate: [isInteger, isArbitraryValue]
2230
+ }],
2231
+ /**
2232
+ * Translate X
2233
+ * @see https://tailwindcss.com/docs/translate
2234
+ */
2235
+ "translate-x": [{
2236
+ "translate-x": [translate]
2237
+ }],
2238
+ /**
2239
+ * Translate Y
2240
+ * @see https://tailwindcss.com/docs/translate
2241
+ */
2242
+ "translate-y": [{
2243
+ "translate-y": [translate]
2244
+ }],
2245
+ /**
2246
+ * Skew X
2247
+ * @see https://tailwindcss.com/docs/skew
2248
+ */
2249
+ "skew-x": [{
2250
+ "skew-x": [skew]
2251
+ }],
2252
+ /**
2253
+ * Skew Y
2254
+ * @see https://tailwindcss.com/docs/skew
2255
+ */
2256
+ "skew-y": [{
2257
+ "skew-y": [skew]
2258
+ }],
2259
+ /**
2260
+ * Transform Origin
2261
+ * @see https://tailwindcss.com/docs/transform-origin
2262
+ */
2263
+ "transform-origin": [{
2264
+ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
2265
+ }],
2266
+ // Interactivity
2267
+ /**
2268
+ * Accent Color
2269
+ * @see https://tailwindcss.com/docs/accent-color
2270
+ */
2271
+ accent: [{
2272
+ accent: ["auto", colors]
2273
+ }],
2274
+ /**
2275
+ * Appearance
2276
+ * @see https://tailwindcss.com/docs/appearance
2277
+ */
2278
+ appearance: [{
2279
+ appearance: ["none", "auto"]
2280
+ }],
2281
+ /**
2282
+ * Cursor
2283
+ * @see https://tailwindcss.com/docs/cursor
2284
+ */
2285
+ cursor: [{
2286
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
2287
+ }],
2288
+ /**
2289
+ * Caret Color
2290
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2291
+ */
2292
+ "caret-color": [{
2293
+ caret: [colors]
2294
+ }],
2295
+ /**
2296
+ * Pointer Events
2297
+ * @see https://tailwindcss.com/docs/pointer-events
2298
+ */
2299
+ "pointer-events": [{
2300
+ "pointer-events": ["none", "auto"]
2301
+ }],
2302
+ /**
2303
+ * Resize
2304
+ * @see https://tailwindcss.com/docs/resize
2305
+ */
2306
+ resize: [{
2307
+ resize: ["none", "y", "x", ""]
2308
+ }],
2309
+ /**
2310
+ * Scroll Behavior
2311
+ * @see https://tailwindcss.com/docs/scroll-behavior
2312
+ */
2313
+ "scroll-behavior": [{
2314
+ scroll: ["auto", "smooth"]
2315
+ }],
2316
+ /**
2317
+ * Scroll Margin
2318
+ * @see https://tailwindcss.com/docs/scroll-margin
2319
+ */
2320
+ "scroll-m": [{
2321
+ "scroll-m": getSpacingWithArbitrary()
2322
+ }],
2323
+ /**
2324
+ * Scroll Margin X
2325
+ * @see https://tailwindcss.com/docs/scroll-margin
2326
+ */
2327
+ "scroll-mx": [{
2328
+ "scroll-mx": getSpacingWithArbitrary()
2329
+ }],
2330
+ /**
2331
+ * Scroll Margin Y
2332
+ * @see https://tailwindcss.com/docs/scroll-margin
2333
+ */
2334
+ "scroll-my": [{
2335
+ "scroll-my": getSpacingWithArbitrary()
2336
+ }],
2337
+ /**
2338
+ * Scroll Margin Start
2339
+ * @see https://tailwindcss.com/docs/scroll-margin
2340
+ */
2341
+ "scroll-ms": [{
2342
+ "scroll-ms": getSpacingWithArbitrary()
2343
+ }],
2344
+ /**
2345
+ * Scroll Margin End
2346
+ * @see https://tailwindcss.com/docs/scroll-margin
2347
+ */
2348
+ "scroll-me": [{
2349
+ "scroll-me": getSpacingWithArbitrary()
2350
+ }],
2351
+ /**
2352
+ * Scroll Margin Top
2353
+ * @see https://tailwindcss.com/docs/scroll-margin
2354
+ */
2355
+ "scroll-mt": [{
2356
+ "scroll-mt": getSpacingWithArbitrary()
2357
+ }],
2358
+ /**
2359
+ * Scroll Margin Right
2360
+ * @see https://tailwindcss.com/docs/scroll-margin
2361
+ */
2362
+ "scroll-mr": [{
2363
+ "scroll-mr": getSpacingWithArbitrary()
2364
+ }],
2365
+ /**
2366
+ * Scroll Margin Bottom
2367
+ * @see https://tailwindcss.com/docs/scroll-margin
2368
+ */
2369
+ "scroll-mb": [{
2370
+ "scroll-mb": getSpacingWithArbitrary()
2371
+ }],
2372
+ /**
2373
+ * Scroll Margin Left
2374
+ * @see https://tailwindcss.com/docs/scroll-margin
2375
+ */
2376
+ "scroll-ml": [{
2377
+ "scroll-ml": getSpacingWithArbitrary()
2378
+ }],
2379
+ /**
2380
+ * Scroll Padding
2381
+ * @see https://tailwindcss.com/docs/scroll-padding
2382
+ */
2383
+ "scroll-p": [{
2384
+ "scroll-p": getSpacingWithArbitrary()
2385
+ }],
2386
+ /**
2387
+ * Scroll Padding X
2388
+ * @see https://tailwindcss.com/docs/scroll-padding
2389
+ */
2390
+ "scroll-px": [{
2391
+ "scroll-px": getSpacingWithArbitrary()
2392
+ }],
2393
+ /**
2394
+ * Scroll Padding Y
2395
+ * @see https://tailwindcss.com/docs/scroll-padding
2396
+ */
2397
+ "scroll-py": [{
2398
+ "scroll-py": getSpacingWithArbitrary()
2399
+ }],
2400
+ /**
2401
+ * Scroll Padding Start
2402
+ * @see https://tailwindcss.com/docs/scroll-padding
2403
+ */
2404
+ "scroll-ps": [{
2405
+ "scroll-ps": getSpacingWithArbitrary()
2406
+ }],
2407
+ /**
2408
+ * Scroll Padding End
2409
+ * @see https://tailwindcss.com/docs/scroll-padding
2410
+ */
2411
+ "scroll-pe": [{
2412
+ "scroll-pe": getSpacingWithArbitrary()
2413
+ }],
2414
+ /**
2415
+ * Scroll Padding Top
2416
+ * @see https://tailwindcss.com/docs/scroll-padding
2417
+ */
2418
+ "scroll-pt": [{
2419
+ "scroll-pt": getSpacingWithArbitrary()
2420
+ }],
2421
+ /**
2422
+ * Scroll Padding Right
2423
+ * @see https://tailwindcss.com/docs/scroll-padding
2424
+ */
2425
+ "scroll-pr": [{
2426
+ "scroll-pr": getSpacingWithArbitrary()
2427
+ }],
2428
+ /**
2429
+ * Scroll Padding Bottom
2430
+ * @see https://tailwindcss.com/docs/scroll-padding
2431
+ */
2432
+ "scroll-pb": [{
2433
+ "scroll-pb": getSpacingWithArbitrary()
2434
+ }],
2435
+ /**
2436
+ * Scroll Padding Left
2437
+ * @see https://tailwindcss.com/docs/scroll-padding
2438
+ */
2439
+ "scroll-pl": [{
2440
+ "scroll-pl": getSpacingWithArbitrary()
2441
+ }],
2442
+ /**
2443
+ * Scroll Snap Align
2444
+ * @see https://tailwindcss.com/docs/scroll-snap-align
2445
+ */
2446
+ "snap-align": [{
2447
+ snap: ["start", "end", "center", "align-none"]
2448
+ }],
2449
+ /**
2450
+ * Scroll Snap Stop
2451
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
2452
+ */
2453
+ "snap-stop": [{
2454
+ snap: ["normal", "always"]
2455
+ }],
2456
+ /**
2457
+ * Scroll Snap Type
2458
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2459
+ */
2460
+ "snap-type": [{
2461
+ snap: ["none", "x", "y", "both"]
2462
+ }],
2463
+ /**
2464
+ * Scroll Snap Type Strictness
2465
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2466
+ */
2467
+ "snap-strictness": [{
2468
+ snap: ["mandatory", "proximity"]
2469
+ }],
2470
+ /**
2471
+ * Touch Action
2472
+ * @see https://tailwindcss.com/docs/touch-action
2473
+ */
2474
+ touch: [{
2475
+ touch: ["auto", "none", "manipulation"]
2476
+ }],
2477
+ /**
2478
+ * Touch Action X
2479
+ * @see https://tailwindcss.com/docs/touch-action
2480
+ */
2481
+ "touch-x": [{
2482
+ "touch-pan": ["x", "left", "right"]
2483
+ }],
2484
+ /**
2485
+ * Touch Action Y
2486
+ * @see https://tailwindcss.com/docs/touch-action
2487
+ */
2488
+ "touch-y": [{
2489
+ "touch-pan": ["y", "up", "down"]
2490
+ }],
2491
+ /**
2492
+ * Touch Action Pinch Zoom
2493
+ * @see https://tailwindcss.com/docs/touch-action
2494
+ */
2495
+ "touch-pz": ["touch-pinch-zoom"],
2496
+ /**
2497
+ * User Select
2498
+ * @see https://tailwindcss.com/docs/user-select
2499
+ */
2500
+ select: [{
2501
+ select: ["none", "text", "all", "auto"]
2502
+ }],
2503
+ /**
2504
+ * Will Change
2505
+ * @see https://tailwindcss.com/docs/will-change
2506
+ */
2507
+ "will-change": [{
2508
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
2509
+ }],
2510
+ // SVG
2511
+ /**
2512
+ * Fill
2513
+ * @see https://tailwindcss.com/docs/fill
2514
+ */
2515
+ fill: [{
2516
+ fill: [colors, "none"]
2517
+ }],
2518
+ /**
2519
+ * Stroke Width
2520
+ * @see https://tailwindcss.com/docs/stroke-width
2521
+ */
2522
+ "stroke-w": [{
2523
+ stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2524
+ }],
2525
+ /**
2526
+ * Stroke
2527
+ * @see https://tailwindcss.com/docs/stroke
2528
+ */
2529
+ stroke: [{
2530
+ stroke: [colors, "none"]
2531
+ }],
2532
+ // Accessibility
2533
+ /**
2534
+ * Screen Readers
2535
+ * @see https://tailwindcss.com/docs/screen-readers
2536
+ */
2537
+ sr: ["sr-only", "not-sr-only"],
2538
+ /**
2539
+ * Forced Color Adjust
2540
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2541
+ */
2542
+ "forced-color-adjust": [{
2543
+ "forced-color-adjust": ["auto", "none"]
2544
+ }]
2545
+ },
2546
+ conflictingClassGroups: {
2547
+ overflow: ["overflow-x", "overflow-y"],
2548
+ overscroll: ["overscroll-x", "overscroll-y"],
2549
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2550
+ "inset-x": ["right", "left"],
2551
+ "inset-y": ["top", "bottom"],
2552
+ flex: ["basis", "grow", "shrink"],
2553
+ gap: ["gap-x", "gap-y"],
2554
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2555
+ px: ["pr", "pl"],
2556
+ py: ["pt", "pb"],
2557
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2558
+ mx: ["mr", "ml"],
2559
+ my: ["mt", "mb"],
2560
+ size: ["w", "h"],
2561
+ "font-size": ["leading"],
2562
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2563
+ "fvn-ordinal": ["fvn-normal"],
2564
+ "fvn-slashed-zero": ["fvn-normal"],
2565
+ "fvn-figure": ["fvn-normal"],
2566
+ "fvn-spacing": ["fvn-normal"],
2567
+ "fvn-fraction": ["fvn-normal"],
2568
+ "line-clamp": ["display", "overflow"],
2569
+ 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"],
2570
+ "rounded-s": ["rounded-ss", "rounded-es"],
2571
+ "rounded-e": ["rounded-se", "rounded-ee"],
2572
+ "rounded-t": ["rounded-tl", "rounded-tr"],
2573
+ "rounded-r": ["rounded-tr", "rounded-br"],
2574
+ "rounded-b": ["rounded-br", "rounded-bl"],
2575
+ "rounded-l": ["rounded-tl", "rounded-bl"],
2576
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
2577
+ "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2578
+ "border-w-x": ["border-w-r", "border-w-l"],
2579
+ "border-w-y": ["border-w-t", "border-w-b"],
2580
+ "border-color": ["border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2581
+ "border-color-x": ["border-color-r", "border-color-l"],
2582
+ "border-color-y": ["border-color-t", "border-color-b"],
2583
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2584
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
2585
+ "scroll-my": ["scroll-mt", "scroll-mb"],
2586
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2587
+ "scroll-px": ["scroll-pr", "scroll-pl"],
2588
+ "scroll-py": ["scroll-pt", "scroll-pb"],
2589
+ touch: ["touch-x", "touch-y", "touch-pz"],
2590
+ "touch-x": ["touch"],
2591
+ "touch-y": ["touch"],
2592
+ "touch-pz": ["touch"]
2593
+ },
2594
+ conflictingClassGroupModifiers: {
2595
+ "font-size": ["leading"]
2596
+ }
2597
+ };
2598
+ }
2599
+ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
2600
+
2601
+ // src/common/cn.ts
2602
+ function cn(...inputs) {
2603
+ return twMerge(clsx(inputs));
2604
+ }
2605
+
2606
+ // src/common/button.tsx
2607
+ import { jsx as jsx2 } from "react/jsx-runtime";
2608
+ var buttonVariants = cva(
2609
+ "mesh-inline-flex mesh-items-center mesh-justify-center mesh-whitespace-nowrap mesh-rounded-md mesh-text-sm mesh-font-medium mesh-transition-colors focus-visible:mesh-outline-none focus-visible:mesh-ring-1 focus-visible:mesh-ring-zinc-950 disabled:mesh-pointer-events-none disabled:mesh-opacity-50 dark:focus-visible:mesh-ring-zinc-300",
2610
+ {
2611
+ variants: {
2612
+ variant: {
2613
+ default: "mesh-bg-zinc-900 mesh-text-zinc-50 mesh-shadow hover:mesh-bg-zinc-900/90 dark:mesh-bg-zinc-50 dark:mesh-text-zinc-900 dark:hover:mesh-bg-zinc-50/90",
2614
+ destructive: "mesh-bg-red-500 mesh-text-zinc-50 mesh-shadow-sm hover:mesh-bg-red-500/90 dark:mesh-bg-red-900 dark:mesh-text-zinc-50 dark:hover:mesh-bg-red-900/90",
2615
+ outline: "mesh-border mesh-border-zinc-200 mesh-bg-white mesh-shadow-sm hover:mesh-bg-zinc-100 hover:mesh-text-zinc-900 dark:mesh-border-zinc-800 dark:mesh-bg-zinc-950 dark:hover:mesh-bg-zinc-800 dark:hover:mesh-text-zinc-50",
2616
+ secondary: "mesh-bg-zinc-100 mesh-text-zinc-900 mesh-shadow-sm hover:mesh-bg-zinc-100/80 dark:mesh-bg-zinc-800 dark:mesh-text-zinc-50 dark:hover:mesh-bg-zinc-800/80",
2617
+ ghost: "hover:mesh-bg-zinc-100 hover:mesh-text-zinc-900 dark:hover:mesh-bg-zinc-800 dark:hover:mesh-text-zinc-50",
2618
+ link: "mesh-text-zinc-900 mesh-underline-offset-4 hover:mesh-underline dark:mesh-text-zinc-50"
2619
+ },
2620
+ size: {
2621
+ default: "mesh-h-9 mesh-px-4 mesh-py-2",
2622
+ sm: "mesh-h-8 mesh-rounded-md mesh-px-3 mesh-text-xs",
2623
+ lg: "mesh-h-10 mesh-rounded-md mesh-px-8",
2624
+ icon: "mesh-h-9 mesh-w-9"
2625
+ }
2626
+ },
2627
+ defaultVariants: {
2628
+ variant: "default",
2629
+ size: "default"
2630
+ }
2631
+ }
2632
+ );
2633
+ var Button = React3.forwardRef(
2634
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
2635
+ const Comp = asChild ? Slot : "button";
2636
+ return /* @__PURE__ */ jsx2(
2637
+ Comp,
2638
+ {
2639
+ className: cn(buttonVariants({ variant, size, className })),
2640
+ ref,
2641
+ ...props
2642
+ }
2643
+ );
2644
+ }
2645
+ );
2646
+ Button.displayName = "Button";
2647
+
2648
+ // src/common/dialog.tsx
2649
+ import * as React4 from "react";
2650
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
2651
+ import { Cross2Icon } from "@radix-ui/react-icons";
2652
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
2653
+ var Dialog = DialogPrimitive.Root;
2654
+ var DialogTrigger = DialogPrimitive.Trigger;
2655
+ var DialogPortal = DialogPrimitive.Portal;
2656
+ var DialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
2657
+ DialogPrimitive.Overlay,
2658
+ {
2659
+ ref,
2660
+ className: cn(
2661
+ "mesh-fixed mesh-inset-0 mesh-z-50 mesh-bg-black/80 data-[state=open]:mesh-animate-in data-[state=closed]:mesh-animate-out data-[state=closed]:mesh-fade-out-0 data-[state=open]:mesh-fade-in-0",
2662
+ className
2663
+ ),
2664
+ ...props
2665
+ }
2666
+ ));
2667
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
2668
+ var DialogContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
2669
+ /* @__PURE__ */ jsx3(DialogOverlay, {}),
2670
+ /* @__PURE__ */ jsxs(
2671
+ DialogPrimitive.Content,
2672
+ {
2673
+ ref,
2674
+ className: cn(
2675
+ `mesh-fixed mesh-left-[50%] mesh-top-[50%] mesh-z-50 mesh-grid mesh-w-full mesh-max-w-lg mesh-translate-x-[-50%] mesh-translate-y-[-50%] mesh-gap-4 mesh-p-6 mesh-shadow-lg mesh-duration-200 data-[state=open]:mesh-animate-in data-[state=closed]:mesh-animate-out data-[state=closed]:mesh-fade-out-0 data-[state=open]:mesh-fade-in-0 data-[state=closed]:mesh-zoom-out-95 data-[state=open]:mesh-zoom-in-95 data-[state=closed]:mesh-slide-out-to-left-1/2 data-[state=closed]:mesh-slide-out-to-top-[48%] data-[state=open]:mesh-slide-in-from-left-1/2 data-[state=open]:mesh-slide-in-from-top-[48%] sm:mesh-rounded-lg mesh-bg-zinc-900 mesh-text-white mesh-border mesh-border-zinc-700`,
2676
+ className
2677
+ ),
2678
+ ...props,
2679
+ children: [
2680
+ children,
2681
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "mesh-absolute mesh-right-4 mesh-top-4 mesh-rounded-sm mesh-opacity-70 mesh-ring-offset-background mesh-transition-opacity hover:mesh-opacity-100 disabled:mesh-pointer-events-none data-[state=open]:mesh-bg-black data-[state=open]:mesh-text-white", children: [
2682
+ /* @__PURE__ */ jsx3(Cross2Icon, { className: "mesh-h-4 mesh-w-4" }),
2683
+ /* @__PURE__ */ jsx3("span", { className: "mesh-sr-only", children: "Close" })
2684
+ ] })
2685
+ ]
2686
+ }
2687
+ )
2688
+ ] }));
2689
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
2690
+ var DialogHeader = ({
2691
+ className,
2692
+ ...props
2693
+ }) => /* @__PURE__ */ jsx3(
2694
+ "div",
2695
+ {
2696
+ className: cn(
2697
+ "mesh-flex mesh-flex-col mesh-space-y-1.5 mesh-text-center sm:mesh-text-left",
2698
+ className
2699
+ ),
2700
+ ...props
2701
+ }
2702
+ );
2703
+ DialogHeader.displayName = "DialogHeader";
2704
+ var DialogFooter = ({
2705
+ className,
2706
+ ...props
2707
+ }) => /* @__PURE__ */ jsx3(
2708
+ "div",
2709
+ {
2710
+ className: cn(
2711
+ "mesh-flex mesh-flex-col-reverse sm:mesh-flex-row sm:mesh-justify-end sm:mesh-space-x-2",
2712
+ className
2713
+ ),
2714
+ ...props
2715
+ }
2716
+ );
2717
+ DialogFooter.displayName = "DialogFooter";
2718
+ var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
2719
+ DialogPrimitive.Title,
2720
+ {
2721
+ ref,
2722
+ className: cn(
2723
+ "mesh-text-lg mesh-font-semibold mesh-leading-none mesh-tracking-tight",
2724
+ className
2725
+ ),
2726
+ ...props
2727
+ }
2728
+ ));
2729
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
2730
+ var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
2731
+ DialogPrimitive.Description,
2732
+ {
2733
+ ref,
2734
+ className: cn("mesh-text-sm mesh-text-white", className),
2735
+ ...props
2736
+ }
2737
+ ));
2738
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
2739
+
2740
+ // src/common/dropdown-menu.tsx
2741
+ import * as React5 from "react";
2742
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
2743
+ import {
2744
+ CheckIcon,
2745
+ ChevronRightIcon,
2746
+ DotFilledIcon
2747
+ } from "@radix-ui/react-icons";
2748
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
2749
+ var DropdownMenu = DropdownMenuPrimitive.Root;
2750
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
2751
+ var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs2(
2752
+ DropdownMenuPrimitive.SubTrigger,
2753
+ {
2754
+ ref,
2755
+ className: cn(
2756
+ "mesh-flex mesh-cursor-default mesh-select-none mesh-items-center mesh-rounded-sm mesh-px-2 mesh-py-1.5 mesh-text-sm mesh-outline-none focus:mesh-bg-zinc-100 data-[state=open]:mesh-bg-zinc-100 dark:focus:mesh-bg-zinc-800 dark:data-[state=open]:mesh-bg-zinc-800",
2757
+ inset && "mesh-pl-8",
2758
+ className
2759
+ ),
2760
+ ...props,
2761
+ children: [
2762
+ children,
2763
+ /* @__PURE__ */ jsx4(ChevronRightIcon, { className: "mesh-ml-auto mesh-h-4 mesh-w-4" })
2764
+ ]
2765
+ }
2766
+ ));
2767
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
2768
+ var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
2769
+ DropdownMenuPrimitive.SubContent,
2770
+ {
2771
+ ref,
2772
+ className: cn(
2773
+ "mesh-z-50 mesh-min-w-[8rem] mesh-overflow-hidden mesh-rounded-md mesh-border mesh-border-zinc-200 mesh-bg-white mesh-p-1 mesh-text-zinc-950 mesh-shadow-lg data-[state=open]:mesh-animate-in data-[state=closed]:mesh-animate-out data-[state=closed]:mesh-fade-out-0 data-[state=open]:mesh-fade-in-0 data-[state=closed]:mesh-zoom-out-95 data-[state=open]:mesh-zoom-in-95 data-[side=bottom]:mesh-slide-in-from-top-2 data-[side=left]:mesh-slide-in-from-right-2 data-[side=right]:mesh-slide-in-from-left-2 data-[side=top]:mesh-slide-in-from-bottom-2 dark:mesh-border-zinc-800 dark:mesh-bg-zinc-950 dark:mesh-text-zinc-50",
2774
+ className
2775
+ ),
2776
+ ...props
2777
+ }
2778
+ ));
2779
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2780
+ var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx4(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx4(
2781
+ DropdownMenuPrimitive.Content,
2782
+ {
2783
+ ref,
2784
+ sideOffset,
2785
+ className: cn(
2786
+ "mesh-z-50 mesh-min-w-[8rem] mesh-overflow-hidden mesh-rounded-md mesh-border mesh-border-zinc-200 mesh-bg-white mesh-p-1 mesh-text-zinc-950 mesh-shadow-md dark:mesh-border-zinc-800 dark:mesh-bg-zinc-950 dark:mesh-text-zinc-50",
2787
+ "data-[state=open]:mesh-animate-in data-[state=closed]:mesh-animate-out data-[state=closed]:mesh-fade-out-0 data-[state=open]:mesh-fade-in-0 data-[state=closed]:mesh-zoom-out-95 data-[state=open]:mesh-zoom-in-95 data-[side=bottom]:mesh-slide-in-from-top-2 data-[side=left]:mesh-slide-in-from-right-2 data-[side=right]:mesh-slide-in-from-left-2 data-[side=top]:mesh-slide-in-from-bottom-2",
2788
+ className
2789
+ ),
2790
+ ...props
2791
+ }
2792
+ ) }));
2793
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
2794
+ var DropdownMenuItem = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx4(
2795
+ DropdownMenuPrimitive.Item,
2796
+ {
2797
+ ref,
2798
+ className: cn(
2799
+ "mesh-relative mesh-flex mesh-cursor-default mesh-select-none mesh-items-center mesh-rounded-sm mesh-px-2 mesh-py-1.5 mesh-text-sm mesh-outline-none mesh-transition-colors focus:mesh-bg-zinc-100 focus:mesh-text-zinc-900 data-[disabled]:mesh-pointer-events-none data-[disabled]:mesh-opacity-50 dark:focus:mesh-bg-zinc-800 dark:focus:mesh-text-zinc-50",
2800
+ inset && "mesh-pl-8",
2801
+ className
2802
+ ),
2803
+ ...props
2804
+ }
2805
+ ));
2806
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2807
+ var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs2(
2808
+ DropdownMenuPrimitive.CheckboxItem,
2809
+ {
2810
+ ref,
2811
+ className: cn(
2812
+ "mesh-relative mesh-flex mesh-cursor-default mesh-select-none mesh-items-center mesh-rounded-sm mesh-py-1.5 mesh-pl-8 mesh-pr-2 mesh-text-sm mesh-outline-none mesh-transition-colors focus:mesh-bg-zinc-100 focus:mesh-text-zinc-900 data-[disabled]:mesh-pointer-events-none data-[disabled]:mesh-opacity-50 dark:focus:mesh-bg-zinc-800 dark:focus:mesh-text-zinc-50",
2813
+ className
2814
+ ),
2815
+ checked,
2816
+ ...props,
2817
+ children: [
2818
+ /* @__PURE__ */ jsx4("span", { className: "mesh-absolute mesh-left-2 mesh-flex mesh-h-3.5 mesh-w-3.5 mesh-items-center mesh-justify-center", children: /* @__PURE__ */ jsx4(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx4(CheckIcon, { className: "mesh-h-4 mesh-w-4" }) }) }),
2819
+ children
2820
+ ]
2821
+ }
2822
+ ));
2823
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
2824
+ var DropdownMenuRadioItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs2(
2825
+ DropdownMenuPrimitive.RadioItem,
2826
+ {
2827
+ ref,
2828
+ className: cn(
2829
+ "mesh-relative mesh-flex mesh-cursor-default mesh-select-none mesh-items-center mesh-rounded-sm mesh-py-1.5 mesh-pl-8 mesh-pr-2 mesh-text-sm mesh-outline-none mesh-transition-colors focus:mesh-bg-zinc-100 focus:mesh-text-zinc-900 data-[disabled]:mesh-pointer-events-none data-[disabled]:mesh-opacity-50 dark:focus:mesh-bg-zinc-800 dark:focus:mesh-text-zinc-50",
2830
+ className
2831
+ ),
2832
+ ...props,
2833
+ children: [
2834
+ /* @__PURE__ */ jsx4("span", { className: "mesh-absolute mesh-left-2 mesh-flex mesh-h-3.5 mesh-w-3.5 mesh-items-center mesh-justify-center", children: /* @__PURE__ */ jsx4(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx4(DotFilledIcon, { className: "mesh-h-4 mesh-w-4 mesh-fill-current" }) }) }),
2835
+ children
2836
+ ]
2837
+ }
2838
+ ));
2839
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
2840
+ var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx4(
2841
+ DropdownMenuPrimitive.Label,
2842
+ {
2843
+ ref,
2844
+ className: cn(
2845
+ "mesh-px-2 mesh-py-1.5 mesh-text-sm mesh-font-semibold",
2846
+ inset && "mesh-pl-8",
2847
+ className
2848
+ ),
2849
+ ...props
2850
+ }
2851
+ ));
2852
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
2853
+ var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
2854
+ DropdownMenuPrimitive.Separator,
2855
+ {
2856
+ ref,
2857
+ className: cn("-mesh-mx-1 mesh-my-1 mesh-h-px mesh-bg-zinc-100 dark:mesh-bg-zinc-800", className),
2858
+ ...props
2859
+ }
2860
+ ));
2861
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
2862
+ var DropdownMenuShortcut = ({
2863
+ className,
2864
+ ...props
2865
+ }) => {
2866
+ return /* @__PURE__ */ jsx4(
2867
+ "span",
2868
+ {
2869
+ className: cn("mesh-ml-auto mesh-text-xs mesh-tracking-widest mesh-opacity-60", className),
2870
+ ...props
2871
+ }
2872
+ );
2873
+ };
2874
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
2875
+
2876
+ // src/common/icons/icon-chevron-right.tsx
2877
+ import { jsx as jsx5 } from "react/jsx-runtime";
2878
+ function IconChevronRight() {
2879
+ return /* @__PURE__ */ jsx5(
2880
+ "svg",
2881
+ {
2882
+ xmlns: "http://www.w3.org/2000/svg",
2883
+ width: "24",
2884
+ height: "24",
2885
+ viewBox: "0 0 24 24",
2886
+ fill: "none",
2887
+ stroke: "gray",
2888
+ strokeWidth: "2",
2889
+ strokeLinecap: "round",
2890
+ strokeLinejoin: "round",
2891
+ style: {
2892
+ color: "#ffadff",
2893
+ width: "24px",
2894
+ height: "24px",
2895
+ strokeWidth: "1px"
2896
+ },
2897
+ className: "hover:mesh-fill-white",
2898
+ children: /* @__PURE__ */ jsx5("path", { d: "m15 18-6-6 6-6" })
2899
+ }
2900
+ );
2901
+ }
2902
+
2903
+ // src/common/icons/icon-download.tsx
2904
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
2905
+ function IconDownload() {
2906
+ return /* @__PURE__ */ jsxs3(
2907
+ "svg",
2908
+ {
2909
+ xmlns: "http://www.w3.org/2000/svg",
2910
+ width: "24",
2911
+ height: "24",
2912
+ viewBox: "0 0 24 24",
2913
+ fill: "none",
2914
+ stroke: "gray",
2915
+ strokeWidth: "2",
2916
+ strokeLinecap: "round",
2917
+ strokeLinejoin: "round",
2918
+ style: {
2919
+ color: "#ffadff",
2920
+ width: "24px",
2921
+ height: "24px",
2922
+ strokeWidth: "1px"
2923
+ },
2924
+ className: "hover:mesh-fill-white",
2925
+ children: [
2926
+ /* @__PURE__ */ jsx6("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
2927
+ /* @__PURE__ */ jsx6("polyline", { points: "7 10 12 15 17 10" }),
2928
+ /* @__PURE__ */ jsx6("line", { x1: "12", x2: "12", y1: "15", y2: "3" })
2929
+ ]
2930
+ }
2931
+ );
2932
+ }
2933
+
2934
+ // src/common/icons/icon-monitor-smartphone.tsx
2935
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
2936
+ function IconMonitorSmartphone() {
2937
+ return /* @__PURE__ */ jsxs4(
2938
+ "svg",
2939
+ {
2940
+ xmlns: "http://www.w3.org/2000/svg",
2941
+ width: "24",
2942
+ height: "24",
2943
+ viewBox: "0 0 24 24",
2944
+ fill: "none",
2945
+ stroke: "black",
2946
+ strokeWidth: "2",
2947
+ strokeLinecap: "round",
2948
+ strokeLinejoin: "round",
2949
+ style: {
2950
+ color: "#ffadff",
2951
+ width: "56px",
2952
+ height: "56px",
2953
+ strokeWidth: "1px"
2954
+ },
2955
+ children: [
2956
+ /* @__PURE__ */ jsx7("path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }),
2957
+ /* @__PURE__ */ jsx7("path", { d: "M10 19v-3.96 3.15" }),
2958
+ /* @__PURE__ */ jsx7("path", { d: "M7 19h5" }),
2959
+ /* @__PURE__ */ jsx7("rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" })
2960
+ ]
2961
+ }
2962
+ );
2963
+ }
2964
+
2965
+ // src/common/icons/wallet-icon.tsx
2966
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
2967
+ function WalletIcon({
2968
+ icon,
2969
+ name,
2970
+ action,
2971
+ iconReactNode
13
2972
  }) {
14
- return /* @__PURE__ */ jsx(
2973
+ return /* @__PURE__ */ jsxs5(
15
2974
  "button",
16
2975
  {
17
- className: `mesh-mr-menu-list mesh-flex mesh-w-60 mesh-items-center mesh-justify-center mesh-rounded-t-md mesh-border mesh-px-4 mesh-py-2 mesh-text-lg mesh-font-normal mesh-shadow-sm ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
18
- onClick: () => setHideMenuList && setHideMenuList(!hideMenuList),
19
- onMouseEnter,
20
- onMouseLeave,
21
- children
2976
+ className: "mesh-flex mesh-items-center mesh-justify-center mesh-rounded-lg mesh-w-10 mesh-h-10 mesh-bg-neutral-50 mesh-border mesh-border-zinc-700 hover:mesh-border-zinc-200 mesh-cursor-pointer",
2977
+ onClick: action,
2978
+ children: [
2979
+ icon && /* @__PURE__ */ jsx8("img", { src: icon, alt: name, className: "mesh-w-8 mesh-h-8" }),
2980
+ iconReactNode && iconReactNode
2981
+ ]
22
2982
  }
23
2983
  );
24
2984
  }
@@ -27,7 +2987,7 @@ function Button({
27
2987
  import { useContext, useEffect, useState as useState2 } from "react";
28
2988
 
29
2989
  // src/contexts/WalletContext.ts
30
- import { createContext, useCallback, useState } from "react";
2990
+ import { createContext, useCallback as useCallback2, useState } from "react";
31
2991
  import { BrowserWallet } from "@meshsdk/wallet";
32
2992
  var INITIAL_STATE = {
33
2993
  walletName: "",
@@ -40,7 +3000,7 @@ var useWalletStore = () => {
40
3000
  const [connectedWalletName, setConnectedWalletName] = useState(
41
3001
  INITIAL_STATE.walletName
42
3002
  );
43
- const connectWallet = useCallback(
3003
+ const connectWallet = useCallback2(
44
3004
  async (walletName, extensions) => {
45
3005
  setConnectingWallet(true);
46
3006
  try {
@@ -58,7 +3018,7 @@ var useWalletStore = () => {
58
3018
  },
59
3019
  []
60
3020
  );
61
- const disconnect = useCallback(() => {
3021
+ const disconnect = useCallback2(() => {
62
3022
  setConnectedWalletName(INITIAL_STATE.walletName);
63
3023
  setConnectedWalletInstance(INITIAL_STATE.walletInstance);
64
3024
  }, []);
@@ -80,10 +3040,10 @@ var WalletContext = createContext({
80
3040
  });
81
3041
 
82
3042
  // src/contexts/index.tsx
83
- import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
3043
+ import { Fragment as Fragment2, jsx as jsx9 } from "react/jsx-runtime";
84
3044
  var MeshProvider = (props) => {
85
3045
  const store = useWalletStore();
86
- return /* @__PURE__ */ jsx2(WalletContext.Provider, { value: store, children: /* @__PURE__ */ jsx2(Fragment, { children: props.children }) });
3046
+ return /* @__PURE__ */ jsx9(WalletContext.Provider, { value: store, children: /* @__PURE__ */ jsx9(Fragment2, { children: props.children }) });
87
3047
  };
88
3048
 
89
3049
  // src/hooks/useAddress.ts
@@ -213,13 +3173,13 @@ var useWallet = () => {
213
3173
  };
214
3174
 
215
3175
  // src/hooks/useWalletSubmit.ts
216
- import { useCallback as useCallback2, useContext as useContext7, useState as useState8 } from "react";
3176
+ import { useCallback as useCallback3, useContext as useContext7, useState as useState8 } from "react";
217
3177
  var useWalletSubmit = () => {
218
3178
  const [error, setError] = useState8();
219
3179
  const [result, setResult] = useState8();
220
3180
  const [submitting, setSubmitting] = useState8(false);
221
3181
  const { hasConnectedWallet, connectedWalletInstance } = useContext7(WalletContext);
222
- const submitTx = useCallback2(async (signedTx) => {
3182
+ const submitTx = useCallback3(async (signedTx) => {
223
3183
  setSubmitting(true);
224
3184
  try {
225
3185
  if (hasConnectedWallet) {
@@ -243,22 +3203,304 @@ var useWalletSubmit = () => {
243
3203
  };
244
3204
  };
245
3205
 
246
- // src/cardano-wallet/menu-item.tsx
247
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
3206
+ // src/cardano-wallet/index.tsx
3207
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
3208
+ var CardanoWallet = ({
3209
+ label = "Connect Wallet",
3210
+ onConnected = void 0,
3211
+ isDark = false,
3212
+ metamask = void 0,
3213
+ extensions = [],
3214
+ cardanoPeerConnect = void 0
3215
+ }) => {
3216
+ const [open, setOpen] = useState9(false);
3217
+ const [screen, setScreen] = useState9("main");
3218
+ const { wallet, connected } = useWallet();
3219
+ useEffect7(() => {
3220
+ if (connected && wallet) {
3221
+ if (onConnected) onConnected();
3222
+ }
3223
+ }, [connected, wallet]);
3224
+ return /* @__PURE__ */ jsxs6(Dialog, { open, onOpenChange: setOpen, children: [
3225
+ !connected ? /* @__PURE__ */ jsx10(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx10(Button, { variant: "outline", className: "mesh-text-white", children: label }) }) : /* @__PURE__ */ jsx10(ConnectedDropdown, {}),
3226
+ /* @__PURE__ */ jsxs6(DialogContent, { className: "sm:mesh-max-w-[425px]", children: [
3227
+ /* @__PURE__ */ jsxs6(DialogHeader, { children: [
3228
+ /* @__PURE__ */ jsxs6(DialogTitle, { className: "mesh-flex mesh-justify-between", children: [
3229
+ screen != "main" ? /* @__PURE__ */ jsx10("button", { onClick: () => setScreen("main"), children: /* @__PURE__ */ jsx10(IconChevronRight, {}) }) : /* @__PURE__ */ jsx10("span", { style: { width: "24px" } }),
3230
+ /* @__PURE__ */ jsxs6("span", { children: [
3231
+ screen == "main" && "Connect Wallet",
3232
+ screen == "p2p" && "P2P Connect"
3233
+ ] }),
3234
+ /* @__PURE__ */ jsx10("span", { style: { width: "24px" } })
3235
+ ] }),
3236
+ /* @__PURE__ */ jsx10(DialogDescription, { children: screen == "p2p" && "Use wallet that supports CIP-45, scan this QR code to connect." })
3237
+ ] }),
3238
+ screen == "main" && /* @__PURE__ */ jsx10(
3239
+ MainScreen,
3240
+ {
3241
+ metamask,
3242
+ extensions,
3243
+ setOpen,
3244
+ setScreen
3245
+ }
3246
+ ),
3247
+ screen == "p2p" && /* @__PURE__ */ jsx10(P2PScreen, { cardanoPeerConnect }),
3248
+ /* @__PURE__ */ jsx10(DialogFooter, { className: "mesh-justify-center mesh-text-sm", children: /* @__PURE__ */ jsxs6(
3249
+ "a",
3250
+ {
3251
+ href: "https://meshjs.dev/",
3252
+ target: "_blank",
3253
+ className: "mesh-grow mesh-flex mesh-gap-1 mesh-items-center mesh-justify-center mesh-text-zinc-500 hover:mesh-text-white mesh-fill-zinc-500 hover:mesh-fill-white",
3254
+ children: [
3255
+ /* @__PURE__ */ jsx10("span", { className: "", children: "Powered by" }),
3256
+ /* @__PURE__ */ jsx10(
3257
+ "svg",
3258
+ {
3259
+ width: 24,
3260
+ height: 24,
3261
+ enableBackground: "new 0 0 300 200",
3262
+ viewBox: "0 0 300 200",
3263
+ xmlns: "http://www.w3.org/2000/svg",
3264
+ children: /* @__PURE__ */ jsx10("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
3265
+ }
3266
+ ),
3267
+ /* @__PURE__ */ jsx10("span", { className: "", children: "Mesh SDK" })
3268
+ ]
3269
+ }
3270
+ ) })
3271
+ ] })
3272
+ ] });
3273
+ };
3274
+ function ConnectedDropdown() {
3275
+ const { wallet, connected, disconnect } = useWallet();
3276
+ const [address, setAddress] = useState9("");
3277
+ useEffect7(() => {
3278
+ if (connected && wallet) {
3279
+ async function afterConnectedWallet() {
3280
+ let address2 = (await wallet.getUnusedAddresses())[0];
3281
+ if (!address2) address2 = await wallet.getChangeAddress();
3282
+ setAddress(address2);
3283
+ }
3284
+ afterConnectedWallet();
3285
+ }
3286
+ }, [connected, wallet]);
3287
+ return /* @__PURE__ */ jsxs6(DropdownMenu, { children: [
3288
+ /* @__PURE__ */ jsx10(DropdownMenuTrigger, { children: /* @__PURE__ */ jsxs6(Button, { variant: "outline", className: "mesh-text-white", children: [
3289
+ address.slice(0, 6),
3290
+ "...",
3291
+ address.slice(-6)
3292
+ ] }) }),
3293
+ /* @__PURE__ */ jsxs6(DropdownMenuContent, { children: [
3294
+ /* @__PURE__ */ jsx10(DropdownMenuLabel, { children: "Wallet" }),
3295
+ /* @__PURE__ */ jsx10(DropdownMenuSeparator, {}),
3296
+ /* @__PURE__ */ jsx10(
3297
+ DropdownMenuItem,
3298
+ {
3299
+ onClick: () => {
3300
+ navigator.clipboard.writeText(address);
3301
+ },
3302
+ children: "Copy Address"
3303
+ }
3304
+ ),
3305
+ /* @__PURE__ */ jsx10(
3306
+ DropdownMenuItem,
3307
+ {
3308
+ onClick: () => {
3309
+ disconnect();
3310
+ },
3311
+ children: "Disconnect"
3312
+ }
3313
+ )
3314
+ ] })
3315
+ ] });
3316
+ }
3317
+ function MainScreen({
3318
+ metamask,
3319
+ extensions,
3320
+ setOpen,
3321
+ setScreen
3322
+ }) {
3323
+ const wallets = useWalletList({ metamask });
3324
+ const { connect } = useWallet();
3325
+ return /* @__PURE__ */ jsxs6("div", { className: "mesh-grid mesh-gap-4 mesh-py-4 mesh-grid-cols-4 mesh-place-items-center", children: [
3326
+ wallets.map((wallet, index) => /* @__PURE__ */ jsx10(
3327
+ WalletIcon,
3328
+ {
3329
+ icon: wallet.icon,
3330
+ name: wallet.name,
3331
+ action: () => {
3332
+ connect(wallet.id, extensions);
3333
+ setOpen(false);
3334
+ }
3335
+ },
3336
+ index
3337
+ )),
3338
+ /* @__PURE__ */ jsx10(
3339
+ WalletIcon,
3340
+ {
3341
+ iconReactNode: IconMonitorSmartphone(),
3342
+ name: `P2P`,
3343
+ action: () => {
3344
+ setScreen("p2p");
3345
+ }
3346
+ }
3347
+ ),
3348
+ /* @__PURE__ */ jsx10(
3349
+ WalletIcon,
3350
+ {
3351
+ iconReactNode: IconDownload(),
3352
+ name: `P2P`,
3353
+ action: () => {
3354
+ window.open(
3355
+ "https://developers.cardano.org/showcase/?tags=wallet",
3356
+ "_blank"
3357
+ );
3358
+ }
3359
+ }
3360
+ )
3361
+ ] });
3362
+ }
3363
+ function P2PScreen({
3364
+ cardanoPeerConnect
3365
+ }) {
3366
+ const dAppConnect = useRef2(null);
3367
+ const qrCodeField = useRef2(null);
3368
+ const [address, setAddress] = useState9("");
3369
+ const [copied, setCopied] = useState9(false);
3370
+ const [connected, setConnected] = useState9(false);
3371
+ console.log("address", address);
3372
+ useEffect7(() => {
3373
+ if (cardanoPeerConnect) {
3374
+ if (dAppConnect.current === null) {
3375
+ dAppConnect.current = new DAppPeerConnect({
3376
+ dAppInfo: {
3377
+ name: cardanoPeerConnect.dAppInfo.name,
3378
+ url: cardanoPeerConnect.dAppInfo.url
3379
+ },
3380
+ announce: cardanoPeerConnect.announce,
3381
+ onApiInject: (name, address2) => {
3382
+ console.log("onApiInject", name, address2);
3383
+ },
3384
+ onApiEject: (name, address2) => {
3385
+ console.log("onApiEject", name, address2);
3386
+ },
3387
+ onConnect: (address2, walletInfo) => {
3388
+ console.log("Connected to wallet", address2, walletInfo);
3389
+ },
3390
+ onDisconnect: () => {
3391
+ console.log("Disconnected from wallet");
3392
+ },
3393
+ verifyConnection: (walletInfo, callback) => {
3394
+ console.log("verifyConnection", walletInfo);
3395
+ callback(true, true);
3396
+ },
3397
+ useWalletDiscovery: true
3398
+ });
3399
+ console.log(1, dAppConnect.current);
3400
+ if (dAppConnect.current) {
3401
+ setAddress(dAppConnect.current.getAddress());
3402
+ if (qrCodeField.current !== null) {
3403
+ dAppConnect.current.generateQRCode(qrCodeField.current);
3404
+ }
3405
+ }
3406
+ }
3407
+ }
3408
+ }, []);
3409
+ return /* @__PURE__ */ jsxs6("div", { className: "mesh-flex mesh-flex-col mesh-items-center mesh-justify-center", children: [
3410
+ /* @__PURE__ */ jsx10("div", { style: { marginTop: 16, marginBottom: 16 }, ref: qrCodeField }),
3411
+ /* @__PURE__ */ jsx10(
3412
+ Button,
3413
+ {
3414
+ variant: "outline",
3415
+ className: "mesh-text-white",
3416
+ onClick: () => {
3417
+ navigator.clipboard.writeText(address);
3418
+ setCopied(true);
3419
+ },
3420
+ children: copied ? "Copied" : "Copy Address"
3421
+ }
3422
+ )
3423
+ ] });
3424
+ }
3425
+
3426
+ // src/mesh-badge/mesh-logo.tsx
3427
+ import { jsx as jsx11 } from "react/jsx-runtime";
3428
+ var MeshLogo = () => /* @__PURE__ */ jsx11(
3429
+ "svg",
3430
+ {
3431
+ className: "mesh-h-16 mesh-p-2",
3432
+ fill: "currentColor",
3433
+ viewBox: "0 0 300 200",
3434
+ xmlns: "http://www.w3.org/2000/svg",
3435
+ children: /* @__PURE__ */ jsx11("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
3436
+ }
3437
+ );
3438
+
3439
+ // src/mesh-badge/index.tsx
3440
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
3441
+ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ jsxs7(
3442
+ "a",
3443
+ {
3444
+ className: `mesh-flex mesh-max-w-fit mesh-flex-col mesh-items-center mesh-rounded-md mesh-border mesh-border-solid mesh-border-current mesh-p-1 mesh-text-xl mesh-font-semibold mesh-no-underline ${isDark ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
3445
+ style: {
3446
+ color: isDark ? "#EEEEEE" : "#111111",
3447
+ backgroundColor: isDark ? "#111111" : "#EEEEEE"
3448
+ },
3449
+ href: "https://meshjs.dev/",
3450
+ rel: "noopener noreferrer",
3451
+ target: "_blank",
3452
+ children: [
3453
+ /* @__PURE__ */ jsx12(MeshLogo, {}),
3454
+ "Mesh"
3455
+ ]
3456
+ }
3457
+ );
3458
+
3459
+ // src/stake-button/index.tsx
3460
+ import { useEffect as useEffect9, useState as useState11 } from "react";
3461
+ import { Transaction } from "@meshsdk/transaction";
3462
+
3463
+ // src/cardano-wallet-dropdown/index.tsx
3464
+ import { useEffect as useEffect8, useState as useState10 } from "react";
3465
+
3466
+ // src/common/button-dropdown.tsx
3467
+ import { jsx as jsx13 } from "react/jsx-runtime";
3468
+ function ButtonDropdown({
3469
+ children,
3470
+ isDarkMode = false,
3471
+ hideMenuList = false,
3472
+ setHideMenuList,
3473
+ onMouseEnter,
3474
+ onMouseLeave
3475
+ }) {
3476
+ return /* @__PURE__ */ jsx13(
3477
+ "button",
3478
+ {
3479
+ className: `mesh-mr-menu-list mesh-flex mesh-w-60 mesh-items-center mesh-justify-center mesh-rounded-t-md mesh-border mesh-px-4 mesh-py-2 mesh-text-lg mesh-font-normal mesh-shadow-sm ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
3480
+ onClick: () => setHideMenuList && setHideMenuList(!hideMenuList),
3481
+ onMouseEnter,
3482
+ onMouseLeave,
3483
+ children
3484
+ }
3485
+ );
3486
+ }
3487
+
3488
+ // src/cardano-wallet-dropdown/menu-item.tsx
3489
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
248
3490
  function MenuItem({
249
3491
  icon,
250
3492
  label,
251
3493
  action,
252
3494
  active
253
3495
  }) {
254
- return /* @__PURE__ */ jsxs(
3496
+ return /* @__PURE__ */ jsxs8(
255
3497
  "div",
256
3498
  {
257
3499
  className: "mesh-flex mesh-cursor-pointer mesh-items-center mesh-px-4 mesh-py-2 mesh-opacity-80 hover:mesh-opacity-100 mesh-h-16",
258
3500
  onClick: action,
259
3501
  children: [
260
- icon && /* @__PURE__ */ jsx3("img", { className: "mesh-pr-2 mesh-m-1 mesh-h-8", src: icon }),
261
- /* @__PURE__ */ jsx3("span", { className: "mesh-mr-menu-item mesh-text-xl mesh-font-normal mesh-text-gray-700 hover:mesh-text-black", children: label.split(" ").map((word) => {
3502
+ icon && /* @__PURE__ */ jsx14("img", { className: "mesh-pr-2 mesh-m-1 mesh-h-8", src: icon }),
3503
+ /* @__PURE__ */ jsx14("span", { className: "mesh-mr-menu-item mesh-text-xl mesh-font-normal mesh-text-gray-700 hover:mesh-text-black", children: label.split(" ").map((word) => {
262
3504
  return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
263
3505
  }).join(" ") })
264
3506
  ]
@@ -266,9 +3508,9 @@ function MenuItem({
266
3508
  );
267
3509
  }
268
3510
 
269
- // src/cardano-wallet/chevron-down.tsx
270
- import { jsx as jsx4 } from "react/jsx-runtime";
271
- var ChevronDown = () => /* @__PURE__ */ jsx4(
3511
+ // src/cardano-wallet-dropdown/chevron-down.tsx
3512
+ import { jsx as jsx15 } from "react/jsx-runtime";
3513
+ var ChevronDown = () => /* @__PURE__ */ jsx15(
272
3514
  "svg",
273
3515
  {
274
3516
  className: "mesh-m-2 mesh-h-6",
@@ -277,7 +3519,7 @@ var ChevronDown = () => /* @__PURE__ */ jsx4(
277
3519
  viewBox: "0 0 24 24",
278
3520
  stroke: "currentColor",
279
3521
  xmlns: "http://www.w3.org/2000/svg",
280
- children: /* @__PURE__ */ jsx4(
3522
+ children: /* @__PURE__ */ jsx15(
281
3523
  "path",
282
3524
  {
283
3525
  strokeLinecap: "round",
@@ -289,8 +3531,8 @@ var ChevronDown = () => /* @__PURE__ */ jsx4(
289
3531
  }
290
3532
  );
291
3533
 
292
- // src/cardano-wallet/wallet-balance.tsx
293
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
3534
+ // src/cardano-wallet-dropdown/wallet-balance.tsx
3535
+ import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
294
3536
  var WalletBalance = ({
295
3537
  connected,
296
3538
  connecting,
@@ -298,55 +3540,56 @@ var WalletBalance = ({
298
3540
  wallet
299
3541
  }) => {
300
3542
  const lovelace = useLovelace();
301
- return connected && lovelace && wallet?.icon ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
302
- /* @__PURE__ */ jsx5("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }),
3543
+ return connected && lovelace && wallet?.icon ? /* @__PURE__ */ jsxs9(Fragment3, { children: [
3544
+ /* @__PURE__ */ jsx16("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }),
303
3545
  "\u20B3",
304
3546
  " ",
305
3547
  parseInt((parseInt(lovelace, 10) / 1e6).toString(), 10),
306
3548
  ".",
307
- /* @__PURE__ */ jsx5("span", { className: "mesh-text-xs", children: lovelace.substring(lovelace.length - 6) })
308
- ] }) : connected && wallet?.icon ? /* @__PURE__ */ jsx5(Fragment2, { children: /* @__PURE__ */ jsx5("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }) }) : connecting ? /* @__PURE__ */ jsx5(Fragment2, { children: "Connecting..." }) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
3549
+ /* @__PURE__ */ jsx16("span", { className: "mesh-text-xs", children: lovelace.substring(lovelace.length - 6) })
3550
+ ] }) : connected && wallet?.icon ? /* @__PURE__ */ jsx16(Fragment3, { children: /* @__PURE__ */ jsx16("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }) }) : connecting ? /* @__PURE__ */ jsx16(Fragment3, { children: "Connecting..." }) : /* @__PURE__ */ jsxs9(Fragment3, { children: [
309
3551
  label,
310
3552
  " ",
311
- /* @__PURE__ */ jsx5(ChevronDown, {})
3553
+ /* @__PURE__ */ jsx16(ChevronDown, {})
312
3554
  ] });
313
3555
  };
314
3556
 
315
- // src/cardano-wallet/index.tsx
316
- import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
317
- var CardanoWallet = ({
3557
+ // src/cardano-wallet-dropdown/index.tsx
3558
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
3559
+ var CardanoWallet2 = ({
318
3560
  label = "Connect Wallet",
319
3561
  onConnected = void 0,
320
3562
  isDark = false,
321
3563
  metamask = void 0,
322
- extensions = []
3564
+ extensions = [],
3565
+ cardanoPeerConnect = void 0
323
3566
  }) => {
324
- const [isDarkMode, setIsDarkMode] = useState9(false);
325
- const [hideMenuList, setHideMenuList] = useState9(true);
3567
+ const [isDarkMode, setIsDarkMode] = useState10(false);
3568
+ const [hideMenuList, setHideMenuList] = useState10(true);
326
3569
  const { connect, connecting, connected, disconnect, name } = useWallet();
327
3570
  const wallets = useWalletList({ metamask });
328
- useEffect7(() => {
3571
+ useEffect8(() => {
329
3572
  if (connected && onConnected) {
330
3573
  onConnected();
331
3574
  }
332
3575
  }, [connected]);
333
- useEffect7(() => {
3576
+ useEffect8(() => {
334
3577
  setIsDarkMode(isDark);
335
3578
  }, [isDark]);
336
- return /* @__PURE__ */ jsxs3(
3579
+ return /* @__PURE__ */ jsxs10(
337
3580
  "div",
338
3581
  {
339
3582
  onMouseEnter: () => setHideMenuList(false),
340
3583
  onMouseLeave: () => setHideMenuList(true),
341
3584
  style: { width: "min-content", zIndex: 50 },
342
3585
  children: [
343
- /* @__PURE__ */ jsx6(
344
- Button,
3586
+ /* @__PURE__ */ jsx17(
3587
+ ButtonDropdown,
345
3588
  {
346
3589
  isDarkMode,
347
3590
  hideMenuList,
348
3591
  setHideMenuList,
349
- children: /* @__PURE__ */ jsx6(
3592
+ children: /* @__PURE__ */ jsx17(
350
3593
  WalletBalance,
351
3594
  {
352
3595
  connected,
@@ -357,12 +3600,12 @@ var CardanoWallet = ({
357
3600
  )
358
3601
  }
359
3602
  ),
360
- /* @__PURE__ */ jsx6(
3603
+ /* @__PURE__ */ jsx17(
361
3604
  "div",
362
3605
  {
363
3606
  className: `mesh-mr-menu-list mesh-absolute mesh-w-60 mesh-rounded-b-md mesh-border mesh-text-center mesh-shadow-sm mesh-backdrop-blur ${hideMenuList && "mesh-hidden"} ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
364
3607
  style: { zIndex: 50 },
365
- children: !connected && wallets.length > 0 ? /* @__PURE__ */ jsx6(Fragment3, { children: wallets.map((wallet, index) => /* @__PURE__ */ jsx6(
3608
+ children: !connected && wallets.length > 0 ? /* @__PURE__ */ jsx17(Fragment4, { children: wallets.map((wallet, index) => /* @__PURE__ */ jsx17(
366
3609
  MenuItem,
367
3610
  {
368
3611
  icon: wallet.icon,
@@ -374,7 +3617,7 @@ var CardanoWallet = ({
374
3617
  active: name === wallet.id
375
3618
  },
376
3619
  index
377
- )) }) : wallets.length === 0 ? /* @__PURE__ */ jsx6("span", { children: "No Wallet Found" }) : /* @__PURE__ */ jsx6(Fragment3, { children: /* @__PURE__ */ jsx6(
3620
+ )) }) : wallets.length === 0 ? /* @__PURE__ */ jsx17("span", { children: "No Wallet Found" }) : /* @__PURE__ */ jsx17(Fragment4, { children: /* @__PURE__ */ jsx17(
378
3621
  MenuItem,
379
3622
  {
380
3623
  active: false,
@@ -390,43 +3633,8 @@ var CardanoWallet = ({
390
3633
  );
391
3634
  };
392
3635
 
393
- // src/mesh-badge/mesh-logo.tsx
394
- import { jsx as jsx7 } from "react/jsx-runtime";
395
- var MeshLogo = () => /* @__PURE__ */ jsx7(
396
- "svg",
397
- {
398
- className: "mesh-h-16 mesh-p-2",
399
- fill: "currentColor",
400
- viewBox: "0 0 300 200",
401
- xmlns: "http://www.w3.org/2000/svg",
402
- children: /* @__PURE__ */ jsx7("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
403
- }
404
- );
405
-
406
- // src/mesh-badge/index.tsx
407
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
408
- var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ jsxs4(
409
- "a",
410
- {
411
- className: `mesh-flex mesh-max-w-fit mesh-flex-col mesh-items-center mesh-rounded-md mesh-border mesh-border-solid mesh-border-current mesh-p-1 mesh-text-xl mesh-font-semibold mesh-no-underline ${isDark ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
412
- style: {
413
- color: isDark ? "#EEEEEE" : "#111111",
414
- backgroundColor: isDark ? "#111111" : "#EEEEEE"
415
- },
416
- href: "https://meshjs.dev/",
417
- rel: "noopener noreferrer",
418
- target: "_blank",
419
- children: [
420
- /* @__PURE__ */ jsx8(MeshLogo, {}),
421
- "Mesh"
422
- ]
423
- }
424
- );
425
-
426
3636
  // src/stake-button/index.tsx
427
- import { useEffect as useEffect8, useState as useState10 } from "react";
428
- import { Transaction } from "@meshsdk/transaction";
429
- import { Fragment as Fragment4, jsx as jsx9 } from "react/jsx-runtime";
3637
+ import { Fragment as Fragment5, jsx as jsx18 } from "react/jsx-runtime";
430
3638
  var StakeButton = ({
431
3639
  label = "Stake your ADA",
432
3640
  isDark = false,
@@ -434,19 +3642,19 @@ var StakeButton = ({
434
3642
  onCheck,
435
3643
  onDelegated = void 0
436
3644
  }) => {
437
- const [isDarkMode, setIsDarkMode] = useState10(false);
3645
+ const [isDarkMode, setIsDarkMode] = useState11(false);
438
3646
  const { connected } = useWallet();
439
- useEffect8(() => {
3647
+ useEffect9(() => {
440
3648
  setIsDarkMode(isDark);
441
3649
  }, [isDark]);
442
- return /* @__PURE__ */ jsx9(Fragment4, { children: connected ? /* @__PURE__ */ jsx9(Button, { isDarkMode, children: /* @__PURE__ */ jsx9(
3650
+ return /* @__PURE__ */ jsx18(Fragment5, { children: connected ? /* @__PURE__ */ jsx18(ButtonDropdown, { isDarkMode, children: /* @__PURE__ */ jsx18(
443
3651
  Delegate,
444
3652
  {
445
3653
  poolId,
446
3654
  onCheck,
447
3655
  onDelegated
448
3656
  }
449
- ) }) : /* @__PURE__ */ jsx9(CardanoWallet, { label, isDark }) });
3657
+ ) }) : /* @__PURE__ */ jsx18(CardanoWallet2, { label, isDark }) });
450
3658
  };
451
3659
  var Delegate = ({
452
3660
  poolId,
@@ -455,11 +3663,11 @@ var Delegate = ({
455
3663
  }) => {
456
3664
  const { wallet } = useWallet();
457
3665
  const rewardAddress = useRewardAddress();
458
- const [_, setError] = useState10();
459
- const [checking, setChecking] = useState10(false);
460
- const [accountInfo, setAccountInfo] = useState10();
461
- const [processing, setProcessing] = useState10(false);
462
- const [done, setDone] = useState10(false);
3666
+ const [_, setError] = useState11();
3667
+ const [checking, setChecking] = useState11(false);
3668
+ const [accountInfo, setAccountInfo] = useState11();
3669
+ const [processing, setProcessing] = useState11(false);
3670
+ const [done, setDone] = useState11(false);
463
3671
  const checkAccountStatus = async () => {
464
3672
  try {
465
3673
  setChecking(true);
@@ -510,22 +3718,22 @@ var Delegate = ({
510
3718
  }
511
3719
  setProcessing(false);
512
3720
  };
513
- useEffect8(() => {
3721
+ useEffect9(() => {
514
3722
  checkAccountStatus();
515
3723
  }, [rewardAddress]);
516
3724
  if (checking) {
517
- return /* @__PURE__ */ jsx9("span", { children: "Checking..." });
3725
+ return /* @__PURE__ */ jsx18("span", { children: "Checking..." });
518
3726
  }
519
3727
  if (processing) {
520
- return /* @__PURE__ */ jsx9("span", { children: "Loading..." });
3728
+ return /* @__PURE__ */ jsx18("span", { children: "Loading..." });
521
3729
  }
522
3730
  if (done) {
523
- return /* @__PURE__ */ jsx9("span", { children: "Stake Delegated" });
3731
+ return /* @__PURE__ */ jsx18("span", { children: "Stake Delegated" });
524
3732
  }
525
3733
  if (accountInfo?.active) {
526
- return accountInfo.poolId === poolId ? /* @__PURE__ */ jsx9("span", { children: "Stake Delegated" }) : /* @__PURE__ */ jsx9("span", { onClick: delegateStake, children: "Begin Staking" });
3734
+ return accountInfo.poolId === poolId ? /* @__PURE__ */ jsx18("span", { children: "Stake Delegated" }) : /* @__PURE__ */ jsx18("span", { onClick: delegateStake, children: "Begin Staking" });
527
3735
  }
528
- return /* @__PURE__ */ jsx9("span", { onClick: registerAddress, children: "Begin Staking" });
3736
+ return /* @__PURE__ */ jsx18("span", { onClick: registerAddress, children: "Begin Staking" });
529
3737
  };
530
3738
  export {
531
3739
  CardanoWallet,