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