@nuvra-ui/react 0.0.13 → 0.0.14
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.d.ts +2 -0
- package/dist/index.js +129 -120
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare function Button({ className, children, ...props }: React.ButtonHT
|
|
|
6
6
|
|
|
7
7
|
export declare function Link({ className, children, ...props }: React.AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element;
|
|
8
8
|
|
|
9
|
+
export declare function PinInput({ className, children, ...props }: React.InputHTMLAttributes<HTMLInputElement>): JSX.Element;
|
|
10
|
+
|
|
9
11
|
export declare function Status({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
10
12
|
|
|
11
13
|
export declare function Switch({ className, ...props }: React.InputHTMLAttributes<HTMLInputElement>): JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1,142 +1,142 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
function r(
|
|
2
|
+
function r(e) {
|
|
3
3
|
var o, c, l = "";
|
|
4
|
-
if (typeof
|
|
5
|
-
else if (typeof
|
|
6
|
-
var u =
|
|
7
|
-
for (o = 0; o < u; o++)
|
|
8
|
-
} else for (c in
|
|
4
|
+
if (typeof e == "string" || typeof e == "number") l += e;
|
|
5
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
6
|
+
var u = e.length;
|
|
7
|
+
for (o = 0; o < u; o++) e[o] && (c = r(e[o])) && (l && (l += " "), l += c);
|
|
8
|
+
} else for (c in e) e[c] && (l && (l += " "), l += c);
|
|
9
9
|
return l;
|
|
10
10
|
}
|
|
11
11
|
function clsx() {
|
|
12
|
-
for (var
|
|
12
|
+
for (var e, o, c = 0, l = "", u = arguments.length; c < u; c++) (e = arguments[c]) && (o = r(e)) && (l && (l += " "), l += o);
|
|
13
13
|
return l;
|
|
14
14
|
}
|
|
15
|
-
var concatArrays = (
|
|
16
|
-
let s = Array(
|
|
17
|
-
for (let o = 0; o <
|
|
18
|
-
for (let c = 0; c < o.length; c++) s[
|
|
15
|
+
var concatArrays = (e, o) => {
|
|
16
|
+
let s = Array(e.length + o.length);
|
|
17
|
+
for (let o = 0; o < e.length; o++) s[o] = e[o];
|
|
18
|
+
for (let c = 0; c < o.length; c++) s[e.length + c] = o[c];
|
|
19
19
|
return s;
|
|
20
|
-
}, createClassValidatorObject = (
|
|
21
|
-
classGroupId:
|
|
20
|
+
}, createClassValidatorObject = (e, o) => ({
|
|
21
|
+
classGroupId: e,
|
|
22
22
|
validator: o
|
|
23
|
-
}), createClassPartObject = (
|
|
24
|
-
nextPart:
|
|
23
|
+
}), createClassPartObject = (e = /* @__PURE__ */ new Map(), o = null, s) => ({
|
|
24
|
+
nextPart: e,
|
|
25
25
|
validators: o,
|
|
26
26
|
classGroupId: s
|
|
27
|
-
}), CLASS_PART_SEPARATOR = "-", EMPTY_CONFLICTS = [], ARBITRARY_PROPERTY_PREFIX = "arbitrary..", createClassGroupUtils = (
|
|
28
|
-
let o = createClassMap(
|
|
27
|
+
}), CLASS_PART_SEPARATOR = "-", EMPTY_CONFLICTS = [], ARBITRARY_PROPERTY_PREFIX = "arbitrary..", createClassGroupUtils = (e) => {
|
|
28
|
+
let o = createClassMap(e), { conflictingClassGroups: s, conflictingClassGroupModifiers: c } = e;
|
|
29
29
|
return {
|
|
30
|
-
getClassGroupId: (
|
|
31
|
-
if (
|
|
32
|
-
let s =
|
|
30
|
+
getClassGroupId: (e) => {
|
|
31
|
+
if (e.startsWith("[") && e.endsWith("]")) return getGroupIdForArbitraryProperty(e);
|
|
32
|
+
let s = e.split(CLASS_PART_SEPARATOR);
|
|
33
33
|
return getGroupRecursive(s, s[0] === "" && s.length > 1 ? 1 : 0, o);
|
|
34
34
|
},
|
|
35
|
-
getConflictingClassGroupIds: (
|
|
35
|
+
getConflictingClassGroupIds: (e, o) => {
|
|
36
36
|
if (o) {
|
|
37
|
-
let o = c[
|
|
37
|
+
let o = c[e], u = s[e];
|
|
38
38
|
return o ? u ? concatArrays(u, o) : o : u || EMPTY_CONFLICTS;
|
|
39
39
|
}
|
|
40
|
-
return s[
|
|
40
|
+
return s[e] || EMPTY_CONFLICTS;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
}, getGroupRecursive = (
|
|
44
|
-
if (
|
|
45
|
-
let c =
|
|
43
|
+
}, getGroupRecursive = (e, o, s) => {
|
|
44
|
+
if (e.length - o === 0) return s.classGroupId;
|
|
45
|
+
let c = e[o], l = s.nextPart.get(c);
|
|
46
46
|
if (l) {
|
|
47
|
-
let s = getGroupRecursive(
|
|
47
|
+
let s = getGroupRecursive(e, o + 1, l);
|
|
48
48
|
if (s) return s;
|
|
49
49
|
}
|
|
50
50
|
let u = s.validators;
|
|
51
51
|
if (u === null) return;
|
|
52
|
-
let d = o === 0 ?
|
|
53
|
-
for (let
|
|
54
|
-
let o = u[
|
|
52
|
+
let d = o === 0 ? e.join(CLASS_PART_SEPARATOR) : e.slice(o).join(CLASS_PART_SEPARATOR), p = u.length;
|
|
53
|
+
for (let e = 0; e < p; e++) {
|
|
54
|
+
let o = u[e];
|
|
55
55
|
if (o.validator(d)) return o.classGroupId;
|
|
56
56
|
}
|
|
57
|
-
}, getGroupIdForArbitraryProperty = (
|
|
58
|
-
let o =
|
|
57
|
+
}, getGroupIdForArbitraryProperty = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
58
|
+
let o = e.slice(1, -1), s = o.indexOf(":"), c = o.slice(0, s);
|
|
59
59
|
return c ? ARBITRARY_PROPERTY_PREFIX + c : void 0;
|
|
60
|
-
})(), createClassMap = (
|
|
61
|
-
let { theme: o, classGroups: s } =
|
|
60
|
+
})(), createClassMap = (e) => {
|
|
61
|
+
let { theme: o, classGroups: s } = e;
|
|
62
62
|
return processClassGroups(s, o);
|
|
63
|
-
}, processClassGroups = (
|
|
63
|
+
}, processClassGroups = (e, o) => {
|
|
64
64
|
let s = createClassPartObject();
|
|
65
|
-
for (let c in
|
|
66
|
-
let l =
|
|
65
|
+
for (let c in e) {
|
|
66
|
+
let l = e[c];
|
|
67
67
|
processClassesRecursively(l, s, c, o);
|
|
68
68
|
}
|
|
69
69
|
return s;
|
|
70
|
-
}, processClassesRecursively = (
|
|
71
|
-
let l =
|
|
70
|
+
}, processClassesRecursively = (e, o, s, c) => {
|
|
71
|
+
let l = e.length;
|
|
72
72
|
for (let u = 0; u < l; u++) {
|
|
73
|
-
let l =
|
|
73
|
+
let l = e[u];
|
|
74
74
|
processClassDefinition(l, o, s, c);
|
|
75
75
|
}
|
|
76
|
-
}, processClassDefinition = (
|
|
77
|
-
if (typeof
|
|
78
|
-
processStringDefinition(
|
|
76
|
+
}, processClassDefinition = (e, o, s, c) => {
|
|
77
|
+
if (typeof e == "string") {
|
|
78
|
+
processStringDefinition(e, o, s);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
if (typeof
|
|
82
|
-
processFunctionDefinition(
|
|
81
|
+
if (typeof e == "function") {
|
|
82
|
+
processFunctionDefinition(e, o, s, c);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
processObjectDefinition(
|
|
86
|
-
}, processStringDefinition = (
|
|
87
|
-
let c =
|
|
85
|
+
processObjectDefinition(e, o, s, c);
|
|
86
|
+
}, processStringDefinition = (e, o, s) => {
|
|
87
|
+
let c = e === "" ? o : getPart(o, e);
|
|
88
88
|
c.classGroupId = s;
|
|
89
|
-
}, processFunctionDefinition = (
|
|
90
|
-
if (isThemeGetter(
|
|
91
|
-
processClassesRecursively(
|
|
89
|
+
}, processFunctionDefinition = (e, o, s, c) => {
|
|
90
|
+
if (isThemeGetter(e)) {
|
|
91
|
+
processClassesRecursively(e(c), o, s, c);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
o.validators === null && (o.validators = []), o.validators.push(createClassValidatorObject(s,
|
|
95
|
-
}, processObjectDefinition = (
|
|
96
|
-
let l = Object.entries(
|
|
97
|
-
for (let
|
|
98
|
-
let [u, d] = l[
|
|
94
|
+
o.validators === null && (o.validators = []), o.validators.push(createClassValidatorObject(s, e));
|
|
95
|
+
}, processObjectDefinition = (e, o, s, c) => {
|
|
96
|
+
let l = Object.entries(e), u = l.length;
|
|
97
|
+
for (let e = 0; e < u; e++) {
|
|
98
|
+
let [u, d] = l[e];
|
|
99
99
|
processClassesRecursively(d, getPart(o, u), s, c);
|
|
100
100
|
}
|
|
101
|
-
}, getPart = (
|
|
102
|
-
let s =
|
|
103
|
-
for (let
|
|
104
|
-
let o = c[
|
|
101
|
+
}, getPart = (e, o) => {
|
|
102
|
+
let s = e, c = o.split(CLASS_PART_SEPARATOR), l = c.length;
|
|
103
|
+
for (let e = 0; e < l; e++) {
|
|
104
|
+
let o = c[e], l = s.nextPart.get(o);
|
|
105
105
|
l || (l = createClassPartObject(), s.nextPart.set(o, l)), s = l;
|
|
106
106
|
}
|
|
107
107
|
return s;
|
|
108
|
-
}, isThemeGetter = (
|
|
109
|
-
if (
|
|
108
|
+
}, isThemeGetter = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, createLruCache = (e) => {
|
|
109
|
+
if (e < 1) return {
|
|
110
110
|
get: () => void 0,
|
|
111
111
|
set: () => {}
|
|
112
112
|
};
|
|
113
113
|
let o = 0, s = Object.create(null), c = Object.create(null), l = (l, u) => {
|
|
114
|
-
s[l] = u, o++, o >
|
|
114
|
+
s[l] = u, o++, o > e && (o = 0, c = s, s = Object.create(null));
|
|
115
115
|
};
|
|
116
116
|
return {
|
|
117
|
-
get(
|
|
118
|
-
let o = s[
|
|
117
|
+
get(e) {
|
|
118
|
+
let o = s[e];
|
|
119
119
|
if (o !== void 0) return o;
|
|
120
|
-
if ((o = c[
|
|
120
|
+
if ((o = c[e]) !== void 0) return l(e, o), o;
|
|
121
121
|
},
|
|
122
|
-
set(
|
|
123
|
-
|
|
122
|
+
set(e, o) {
|
|
123
|
+
e in s ? s[e] = o : l(e, o);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
|
-
}, IMPORTANT_MODIFIER = "!", MODIFIER_SEPARATOR = ":", EMPTY_MODIFIERS = [], createResultObject = (
|
|
127
|
-
modifiers:
|
|
126
|
+
}, IMPORTANT_MODIFIER = "!", MODIFIER_SEPARATOR = ":", EMPTY_MODIFIERS = [], createResultObject = (e, o, s, c, l) => ({
|
|
127
|
+
modifiers: e,
|
|
128
128
|
hasImportantModifier: o,
|
|
129
129
|
baseClassName: s,
|
|
130
130
|
maybePostfixModifierPosition: c,
|
|
131
131
|
isExternal: l
|
|
132
|
-
}), createParseClassName = (
|
|
133
|
-
let { prefix: o, experimentalParseClassName: s } =
|
|
134
|
-
let o = [], s = 0, c = 0, l = 0, u, d =
|
|
132
|
+
}), createParseClassName = (e) => {
|
|
133
|
+
let { prefix: o, experimentalParseClassName: s } = e, c = (e) => {
|
|
134
|
+
let o = [], s = 0, c = 0, l = 0, u, d = e.length;
|
|
135
135
|
for (let f = 0; f < d; f++) {
|
|
136
|
-
let d =
|
|
136
|
+
let d = e[f];
|
|
137
137
|
if (s === 0 && c === 0) {
|
|
138
138
|
if (d === MODIFIER_SEPARATOR) {
|
|
139
|
-
o.push(
|
|
139
|
+
o.push(e.slice(l, f)), l = f + 1;
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
142
|
if (d === "/") {
|
|
@@ -146,44 +146,44 @@ var concatArrays = (t, o) => {
|
|
|
146
146
|
}
|
|
147
147
|
d === "[" ? s++ : d === "]" ? s-- : d === "(" ? c++ : d === ")" && c--;
|
|
148
148
|
}
|
|
149
|
-
let f = o.length === 0 ?
|
|
149
|
+
let f = o.length === 0 ? e : e.slice(l), p = f, m = !1;
|
|
150
150
|
f.endsWith(IMPORTANT_MODIFIER) ? (p = f.slice(0, -1), m = !0) : f.startsWith(IMPORTANT_MODIFIER) && (p = f.slice(1), m = !0);
|
|
151
151
|
let h = u && u > l ? u - l : void 0;
|
|
152
152
|
return createResultObject(o, m, p, h);
|
|
153
153
|
};
|
|
154
154
|
if (o) {
|
|
155
|
-
let
|
|
156
|
-
c = (o) => o.startsWith(
|
|
155
|
+
let e = o + MODIFIER_SEPARATOR, s = c;
|
|
156
|
+
c = (o) => o.startsWith(e) ? s(o.slice(e.length)) : createResultObject(EMPTY_MODIFIERS, !1, o, void 0, !0);
|
|
157
157
|
}
|
|
158
158
|
if (s) {
|
|
159
|
-
let
|
|
159
|
+
let e = c;
|
|
160
160
|
c = (o) => s({
|
|
161
161
|
className: o,
|
|
162
|
-
parseClassName:
|
|
162
|
+
parseClassName: e
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
return c;
|
|
166
|
-
}, createSortModifiers = (
|
|
166
|
+
}, createSortModifiers = (e) => {
|
|
167
167
|
let o = /* @__PURE__ */ new Map();
|
|
168
|
-
return
|
|
169
|
-
o.set(
|
|
170
|
-
}), (
|
|
168
|
+
return e.orderSensitiveModifiers.forEach((e, s) => {
|
|
169
|
+
o.set(e, 1e6 + s);
|
|
170
|
+
}), (e) => {
|
|
171
171
|
let s = [], c = [];
|
|
172
|
-
for (let l = 0; l <
|
|
173
|
-
let u =
|
|
172
|
+
for (let l = 0; l < e.length; l++) {
|
|
173
|
+
let u = e[l], d = u[0] === "[", f = o.has(u);
|
|
174
174
|
d || f ? (c.length > 0 && (c.sort(), s.push(...c), c = []), s.push(u)) : c.push(u);
|
|
175
175
|
}
|
|
176
176
|
return c.length > 0 && (c.sort(), s.push(...c)), s;
|
|
177
177
|
};
|
|
178
|
-
}, createConfigUtils = (
|
|
179
|
-
cache: createLruCache(
|
|
180
|
-
parseClassName: createParseClassName(
|
|
181
|
-
sortModifiers: createSortModifiers(
|
|
182
|
-
...createClassGroupUtils(
|
|
183
|
-
}), SPLIT_CLASSES_REGEX = /\s+/, mergeClassList = (
|
|
184
|
-
let { parseClassName: s, getClassGroupId: c, getConflictingClassGroupIds: l, sortModifiers: u } = o, d = [], f =
|
|
185
|
-
for (let
|
|
186
|
-
let o = f[
|
|
178
|
+
}, createConfigUtils = (e) => ({
|
|
179
|
+
cache: createLruCache(e.cacheSize),
|
|
180
|
+
parseClassName: createParseClassName(e),
|
|
181
|
+
sortModifiers: createSortModifiers(e),
|
|
182
|
+
...createClassGroupUtils(e)
|
|
183
|
+
}), SPLIT_CLASSES_REGEX = /\s+/, mergeClassList = (e, o) => {
|
|
184
|
+
let { parseClassName: s, getClassGroupId: c, getConflictingClassGroupIds: l, sortModifiers: u } = o, d = [], f = e.trim().split(SPLIT_CLASSES_REGEX), p = "";
|
|
185
|
+
for (let e = f.length - 1; e >= 0; --e) {
|
|
186
|
+
let o = f[e], { isExternal: m, modifiers: h, hasImportantModifier: g, baseClassName: _, maybePostfixModifierPosition: v } = s(o);
|
|
187
187
|
if (m) {
|
|
188
188
|
p = o + (p.length > 0 ? " " + p : p);
|
|
189
189
|
continue;
|
|
@@ -204,41 +204,41 @@ var concatArrays = (t, o) => {
|
|
|
204
204
|
if (d.indexOf(C) > -1) continue;
|
|
205
205
|
d.push(C);
|
|
206
206
|
let w = l(b, y);
|
|
207
|
-
for (let
|
|
208
|
-
let o = w[
|
|
207
|
+
for (let e = 0; e < w.length; ++e) {
|
|
208
|
+
let o = w[e];
|
|
209
209
|
d.push(S + o);
|
|
210
210
|
}
|
|
211
211
|
p = o + (p.length > 0 ? " " + p : p);
|
|
212
212
|
}
|
|
213
213
|
return p;
|
|
214
|
-
}, twJoin = (...
|
|
214
|
+
}, twJoin = (...e) => {
|
|
215
215
|
let o = 0, s, c, l = "";
|
|
216
|
-
for (; o <
|
|
216
|
+
for (; o < e.length;) (s = e[o++]) && (c = toValue(s)) && (l && (l += " "), l += c);
|
|
217
217
|
return l;
|
|
218
|
-
}, toValue = (
|
|
219
|
-
if (typeof
|
|
218
|
+
}, toValue = (e) => {
|
|
219
|
+
if (typeof e == "string") return e;
|
|
220
220
|
let o, s = "";
|
|
221
|
-
for (let c = 0; c <
|
|
221
|
+
for (let c = 0; c < e.length; c++) e[c] && (o = toValue(e[c])) && (s && (s += " "), s += o);
|
|
222
222
|
return s;
|
|
223
|
-
}, createTailwindMerge = (
|
|
224
|
-
let s, c, l, u, d = (d) => (s = createConfigUtils(o.reduce((
|
|
225
|
-
let o = c(
|
|
223
|
+
}, createTailwindMerge = (e, ...o) => {
|
|
224
|
+
let s, c, l, u, d = (d) => (s = createConfigUtils(o.reduce((e, o) => o(e), e())), c = s.cache.get, l = s.cache.set, u = f, f(d)), f = (e) => {
|
|
225
|
+
let o = c(e);
|
|
226
226
|
if (o) return o;
|
|
227
|
-
let u = mergeClassList(
|
|
228
|
-
return l(
|
|
227
|
+
let u = mergeClassList(e, s);
|
|
228
|
+
return l(e, u), u;
|
|
229
229
|
};
|
|
230
|
-
return u = d, (...
|
|
231
|
-
}, fallbackThemeArr = [], fromTheme = (
|
|
232
|
-
let o = (o) => o[
|
|
230
|
+
return u = d, (...e) => u(twJoin(...e));
|
|
231
|
+
}, fallbackThemeArr = [], fromTheme = (e) => {
|
|
232
|
+
let o = (o) => o[e] || fallbackThemeArr;
|
|
233
233
|
return o.isThemeGetter = !0, o;
|
|
234
|
-
}, arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i, fractionRegex = /^\d+\/\d+$/, tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, 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$/, colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, isFraction = (
|
|
235
|
-
let c = arbitraryValueRegex.exec(
|
|
234
|
+
}, arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i, fractionRegex = /^\d+\/\d+$/, tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, 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$/, colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, isFraction = (e) => fractionRegex.test(e), isNumber = (e) => !!e && !Number.isNaN(Number(e)), isInteger = (e) => !!e && Number.isInteger(Number(e)), isPercent = (e) => e.endsWith("%") && isNumber(e.slice(0, -1)), isTshirtSize = (e) => tshirtUnitRegex.test(e), isAny = () => !0, isLengthOnly = (e) => lengthUnitRegex.test(e) && !colorFunctionRegex.test(e), isNever = () => !1, isShadow = (e) => shadowRegex.test(e), isImage = (e) => imageRegex.test(e), isAnyNonArbitrary = (e) => !isArbitraryValue(e) && !isArbitraryVariable(e), isArbitrarySize = (e) => getIsArbitraryValue(e, isLabelSize, isNever), isArbitraryValue = (e) => arbitraryValueRegex.test(e), isArbitraryLength = (e) => getIsArbitraryValue(e, isLabelLength, isLengthOnly), isArbitraryNumber = (e) => getIsArbitraryValue(e, isLabelNumber, isNumber), isArbitraryPosition = (e) => getIsArbitraryValue(e, isLabelPosition, isNever), isArbitraryImage = (e) => getIsArbitraryValue(e, isLabelImage, isImage), isArbitraryShadow = (e) => getIsArbitraryValue(e, isLabelShadow, isShadow), isArbitraryVariable = (e) => arbitraryVariableRegex.test(e), isArbitraryVariableLength = (e) => getIsArbitraryVariable(e, isLabelLength), isArbitraryVariableFamilyName = (e) => getIsArbitraryVariable(e, isLabelFamilyName), isArbitraryVariablePosition = (e) => getIsArbitraryVariable(e, isLabelPosition), isArbitraryVariableSize = (e) => getIsArbitraryVariable(e, isLabelSize), isArbitraryVariableImage = (e) => getIsArbitraryVariable(e, isLabelImage), isArbitraryVariableShadow = (e) => getIsArbitraryVariable(e, isLabelShadow, !0), getIsArbitraryValue = (e, o, s) => {
|
|
235
|
+
let c = arbitraryValueRegex.exec(e);
|
|
236
236
|
return c ? c[1] ? o(c[1]) : s(c[2]) : !1;
|
|
237
|
-
}, getIsArbitraryVariable = (
|
|
238
|
-
let c = arbitraryVariableRegex.exec(
|
|
237
|
+
}, getIsArbitraryVariable = (e, o, s = !1) => {
|
|
238
|
+
let c = arbitraryVariableRegex.exec(e);
|
|
239
239
|
return c ? c[1] ? o(c[1]) : s : !1;
|
|
240
|
-
}, isLabelPosition = (
|
|
241
|
-
let
|
|
240
|
+
}, isLabelPosition = (e) => e === "position" || e === "percentage", isLabelImage = (e) => e === "image" || e === "url", isLabelSize = (e) => e === "length" || e === "size" || e === "bg-size", isLabelLength = (e) => e === "length", isLabelNumber = (e) => e === "number", isLabelFamilyName = (e) => e === "family-name", isLabelShadow = (e) => e === "shadow", twMerge = /* @__PURE__ */ createTailwindMerge(() => {
|
|
241
|
+
let e = fromTheme("color"), o = fromTheme("font"), s = fromTheme("text"), c = fromTheme("font-weight"), l = fromTheme("tracking"), u = fromTheme("leading"), d = fromTheme("breakpoint"), f = fromTheme("container"), p = fromTheme("spacing"), m = fromTheme("radius"), h = fromTheme("shadow"), g = fromTheme("inset-shadow"), _ = fromTheme("text-shadow"), v = fromTheme("drop-shadow"), y = fromTheme("blur"), b = fromTheme("perspective"), x = fromTheme("aspect"), S = fromTheme("ease"), C = fromTheme("animate"), w = () => [
|
|
242
242
|
"auto",
|
|
243
243
|
"avoid",
|
|
244
244
|
"all",
|
|
@@ -346,7 +346,7 @@ var concatArrays = (t, o) => {
|
|
|
346
346
|
"fit",
|
|
347
347
|
...k()
|
|
348
348
|
], z = () => [
|
|
349
|
-
|
|
349
|
+
e,
|
|
350
350
|
isArbitraryVariable,
|
|
351
351
|
isArbitraryValue
|
|
352
352
|
], B = () => [
|
|
@@ -1617,8 +1617,8 @@ var concatArrays = (t, o) => {
|
|
|
1617
1617
|
]
|
|
1618
1618
|
};
|
|
1619
1619
|
});
|
|
1620
|
-
function cn(...
|
|
1621
|
-
return twMerge(clsx(
|
|
1620
|
+
function cn(...e) {
|
|
1621
|
+
return twMerge(clsx(e));
|
|
1622
1622
|
}
|
|
1623
1623
|
function Badge({ className: o, children: s, ...c }) {
|
|
1624
1624
|
return /* @__PURE__ */ jsx("span", {
|
|
@@ -1660,4 +1660,13 @@ function Textarea({ className: o, ...s }) {
|
|
|
1660
1660
|
function Status({ className: o, children: s, ...c }) {
|
|
1661
1661
|
return /* @__PURE__ */ jsx("div", { className: cn("rounded-full w-[6px] h-[6px] bg-success", o) });
|
|
1662
1662
|
}
|
|
1663
|
-
|
|
1663
|
+
function PinInput({ className: o, children: s, ...c }) {
|
|
1664
|
+
return /* @__PURE__ */ jsx("input", {
|
|
1665
|
+
className: cn("bg-secondary border-2 text-center text-12 text-xl font-bold border-secondary-foreground rounded-md w-10 h-10", o),
|
|
1666
|
+
type: "text",
|
|
1667
|
+
inputMode: "numeric",
|
|
1668
|
+
maxLength: 1,
|
|
1669
|
+
...c
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
export { Badge, Button, Link, PinInput, Status, Switch, Textarea };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuvra-ui/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"typescript-eslint": "^8.46.4",
|
|
37
37
|
"vite": "npm:rolldown-vite@7.2.5",
|
|
38
38
|
"vite-plugin-dts": "^4.5.4",
|
|
39
|
-
"@nuvra-ui/
|
|
40
|
-
"@nuvra-ui/
|
|
39
|
+
"@nuvra-ui/typescript-config": "0.0.0",
|
|
40
|
+
"@nuvra-ui/eslint-config": "0.0.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "vite build --watch",
|