levannta-ui 1.0.3 → 1.0.4
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/README.md +5 -0
- package/dist/components/ui/Button.d.ts +1 -0
- package/dist/index.esm.js +144 -135
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -126,6 +126,10 @@ import { HomeIcon } from 'levannta-ui/icons';
|
|
126
126
|
|
127
127
|
// Botón de solo icono redondo
|
128
128
|
<Button iconOnly={<HomeIcon />} pill aria-label="Home" />
|
129
|
+
|
130
|
+
// Botón con ancho personalizado
|
131
|
+
<Button width="200px">Ancho fijo</Button>
|
132
|
+
<Button width="100%">Ancho completo</Button>
|
129
133
|
```
|
130
134
|
|
131
135
|
#### Props
|
@@ -143,6 +147,7 @@ import { HomeIcon } from 'levannta-ui/icons';
|
|
143
147
|
| iconLeftJustified | ReactNode | - | - | Icono para mostrar a la izquierda con mayor espacio respecto al texto |
|
144
148
|
| iconRightJustified | ReactNode | - | - | Icono para mostrar a la derecha con mayor espacio respecto al texto |
|
145
149
|
| iconOnly | ReactNode | - | - | Icono para mostrar como botón de solo icono (sin texto) |
|
150
|
+
| width | string \| number | - | - | Ancho personalizado (ej: '200px', '100%', 300) |
|
146
151
|
|
147
152
|
## Desarrollo
|
148
153
|
|
@@ -20,6 +20,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
20
20
|
iconLeftJustified?: ReactNode;
|
21
21
|
iconRightJustified?: ReactNode;
|
22
22
|
iconOnly?: ReactNode;
|
23
|
+
width?: string | number;
|
23
24
|
}
|
24
25
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
25
26
|
export { Button, buttonVariants };
|
package/dist/index.esm.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import ke, { forwardRef as br } from "react";
|
2
|
-
var te = { exports: {} },
|
2
|
+
var te = { exports: {} }, L = {};
|
3
3
|
/**
|
4
4
|
* @license React
|
5
5
|
* react-jsx-runtime.production.min.js
|
@@ -12,22 +12,22 @@ var te = { exports: {} }, W = {};
|
|
12
12
|
var Ce;
|
13
13
|
function pr() {
|
14
14
|
if (Ce)
|
15
|
-
return
|
15
|
+
return L;
|
16
16
|
Ce = 1;
|
17
17
|
var l = ke, f = Symbol.for("react.element"), i = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, T = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, O = { key: !0, ref: !0, __self: !0, __source: !0 };
|
18
|
-
function
|
19
|
-
var d,
|
18
|
+
function w(E, v, b) {
|
19
|
+
var d, m = {}, h = null, S = null;
|
20
20
|
b !== void 0 && (h = "" + b), v.key !== void 0 && (h = "" + v.key), v.ref !== void 0 && (S = v.ref);
|
21
21
|
for (d in v)
|
22
|
-
c.call(v, d) && !O.hasOwnProperty(d) && (
|
22
|
+
c.call(v, d) && !O.hasOwnProperty(d) && (m[d] = v[d]);
|
23
23
|
if (E && E.defaultProps)
|
24
24
|
for (d in v = E.defaultProps, v)
|
25
|
-
|
26
|
-
return { $$typeof: f, type: E, key: h, ref: S, props:
|
25
|
+
m[d] === void 0 && (m[d] = v[d]);
|
26
|
+
return { $$typeof: f, type: E, key: h, ref: S, props: m, _owner: T.current };
|
27
27
|
}
|
28
|
-
return
|
28
|
+
return L.Fragment = i, L.jsx = w, L.jsxs = w, L;
|
29
29
|
}
|
30
|
-
var
|
30
|
+
var U = {};
|
31
31
|
/**
|
32
32
|
* @license React
|
33
33
|
* react-jsx-runtime.development.js
|
@@ -38,16 +38,16 @@ var Y = {};
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
39
39
|
*/
|
40
40
|
var Se;
|
41
|
-
function
|
41
|
+
function yr() {
|
42
42
|
return Se || (Se = 1, process.env.NODE_ENV !== "production" && function() {
|
43
|
-
var l = ke, f = Symbol.for("react.element"), i = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"),
|
44
|
-
function
|
43
|
+
var l = ke, f = Symbol.for("react.element"), i = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), E = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), A = Symbol.iterator, N = "@@iterator";
|
44
|
+
function P(e) {
|
45
45
|
if (e === null || typeof e != "object")
|
46
46
|
return null;
|
47
|
-
var r =
|
47
|
+
var r = A && e[A] || e[N];
|
48
48
|
return typeof r == "function" ? r : null;
|
49
49
|
}
|
50
|
-
var
|
50
|
+
var D = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
51
51
|
function g(e) {
|
52
52
|
{
|
53
53
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
@@ -57,7 +57,7 @@ function mr() {
|
|
57
57
|
}
|
58
58
|
function Ne(e, r, t) {
|
59
59
|
{
|
60
|
-
var n =
|
60
|
+
var n = D.ReactDebugCurrentFrame, u = n.getStackAddendum();
|
61
61
|
u !== "" && (r += "%s", t = t.concat([u]));
|
62
62
|
var s = t.map(function(o) {
|
63
63
|
return String(o);
|
@@ -68,7 +68,7 @@ function mr() {
|
|
68
68
|
var De = !1, Fe = !1, Ie = !1, Ve = !1, $e = !1, ne;
|
69
69
|
ne = Symbol.for("react.module.reference");
|
70
70
|
function We(e) {
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === O || $e || e === T || e === b || e === d || Ve || e === S || De || Fe || Ie || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof ===
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === O || $e || e === T || e === b || e === d || Ve || e === S || De || Fe || Ie || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === w || e.$$typeof === E || e.$$typeof === v || // This needs to include all possible module reference object
|
72
72
|
// types supported by any Flight configuration anywhere since
|
73
73
|
// we don't know which Flight build this will end up being used
|
74
74
|
// with.
|
@@ -110,12 +110,12 @@ function mr() {
|
|
110
110
|
case E:
|
111
111
|
var r = e;
|
112
112
|
return ae(r) + ".Consumer";
|
113
|
-
case
|
113
|
+
case w:
|
114
114
|
var t = e;
|
115
115
|
return ae(t._context) + ".Provider";
|
116
116
|
case v:
|
117
117
|
return Ye(e, e.render, "ForwardRef");
|
118
|
-
case
|
118
|
+
case m:
|
119
119
|
var n = e.displayName || null;
|
120
120
|
return n !== null ? n : C(e.type) || "Memo";
|
121
121
|
case h: {
|
@@ -129,13 +129,13 @@ function mr() {
|
|
129
129
|
}
|
130
130
|
return null;
|
131
131
|
}
|
132
|
-
var
|
132
|
+
var x = Object.assign, $ = 0, oe, ie, ue, le, se, ce, fe;
|
133
133
|
function de() {
|
134
134
|
}
|
135
135
|
de.__reactDisabledLog = !0;
|
136
136
|
function Le() {
|
137
137
|
{
|
138
|
-
if (
|
138
|
+
if ($ === 0) {
|
139
139
|
oe = console.log, ie = console.info, ue = console.warn, le = console.error, se = console.group, ce = console.groupCollapsed, fe = console.groupEnd;
|
140
140
|
var e = {
|
141
141
|
configurable: !0,
|
@@ -153,45 +153,45 @@ function mr() {
|
|
153
153
|
groupEnd: e
|
154
154
|
});
|
155
155
|
}
|
156
|
-
|
156
|
+
$++;
|
157
157
|
}
|
158
158
|
}
|
159
159
|
function Ue() {
|
160
160
|
{
|
161
|
-
if (
|
161
|
+
if ($--, $ === 0) {
|
162
162
|
var e = {
|
163
163
|
configurable: !0,
|
164
164
|
enumerable: !0,
|
165
165
|
writable: !0
|
166
166
|
};
|
167
167
|
Object.defineProperties(console, {
|
168
|
-
log:
|
168
|
+
log: x({}, e, {
|
169
169
|
value: oe
|
170
170
|
}),
|
171
|
-
info:
|
171
|
+
info: x({}, e, {
|
172
172
|
value: ie
|
173
173
|
}),
|
174
|
-
warn:
|
174
|
+
warn: x({}, e, {
|
175
175
|
value: ue
|
176
176
|
}),
|
177
|
-
error:
|
177
|
+
error: x({}, e, {
|
178
178
|
value: le
|
179
179
|
}),
|
180
|
-
group:
|
180
|
+
group: x({}, e, {
|
181
181
|
value: se
|
182
182
|
}),
|
183
|
-
groupCollapsed:
|
183
|
+
groupCollapsed: x({}, e, {
|
184
184
|
value: ce
|
185
185
|
}),
|
186
|
-
groupEnd:
|
186
|
+
groupEnd: x({}, e, {
|
187
187
|
value: fe
|
188
188
|
})
|
189
189
|
});
|
190
190
|
}
|
191
|
-
|
191
|
+
$ < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
192
192
|
}
|
193
193
|
}
|
194
|
-
var K =
|
194
|
+
var K = D.ReactCurrentDispatcher, q;
|
195
195
|
function M(e, r, t) {
|
196
196
|
{
|
197
197
|
if (q === void 0)
|
@@ -260,26 +260,26 @@ function mr() {
|
|
260
260
|
if (R && n && typeof R.stack == "string") {
|
261
261
|
for (var a = R.stack.split(`
|
262
262
|
`), _ = n.stack.split(`
|
263
|
-
`), p = a.length - 1,
|
264
|
-
|
265
|
-
for (; p >= 1 &&
|
266
|
-
if (a[p] !== _[
|
267
|
-
if (p !== 1 ||
|
263
|
+
`), p = a.length - 1, y = _.length - 1; p >= 1 && y >= 0 && a[p] !== _[y]; )
|
264
|
+
y--;
|
265
|
+
for (; p >= 1 && y >= 0; p--, y--)
|
266
|
+
if (a[p] !== _[y]) {
|
267
|
+
if (p !== 1 || y !== 1)
|
268
268
|
do
|
269
|
-
if (p--,
|
270
|
-
var
|
269
|
+
if (p--, y--, y < 0 || a[p] !== _[y]) {
|
270
|
+
var j = `
|
271
271
|
` + a[p].replace(" at new ", " at ");
|
272
|
-
return e.displayName &&
|
272
|
+
return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, j), j;
|
273
273
|
}
|
274
|
-
while (p >= 1 &&
|
274
|
+
while (p >= 1 && y >= 0);
|
275
275
|
break;
|
276
276
|
}
|
277
277
|
}
|
278
278
|
} finally {
|
279
279
|
G = !1, K.current = s, Ue(), Error.prepareStackTrace = u;
|
280
280
|
}
|
281
|
-
var
|
282
|
-
return typeof e == "function" && B.set(e,
|
281
|
+
var I = e ? e.displayName || e.name : "", k = I ? M(I) : "";
|
282
|
+
return typeof e == "function" && B.set(e, k), k;
|
283
283
|
}
|
284
284
|
function Be(e, r, t) {
|
285
285
|
return ve(e, !1);
|
@@ -305,7 +305,7 @@ function mr() {
|
|
305
305
|
switch (e.$$typeof) {
|
306
306
|
case v:
|
307
307
|
return Be(e.render);
|
308
|
-
case
|
308
|
+
case m:
|
309
309
|
return z(e.type, r, t);
|
310
310
|
case h: {
|
311
311
|
var n = e, u = n._payload, s = n._init;
|
@@ -317,7 +317,7 @@ function mr() {
|
|
317
317
|
}
|
318
318
|
return "";
|
319
319
|
}
|
320
|
-
var
|
320
|
+
var W = Object.prototype.hasOwnProperty, be = {}, pe = D.ReactDebugCurrentFrame;
|
321
321
|
function J(e) {
|
322
322
|
if (e) {
|
323
323
|
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
|
@@ -327,7 +327,7 @@ function mr() {
|
|
327
327
|
}
|
328
328
|
function Je(e, r, t, n, u) {
|
329
329
|
{
|
330
|
-
var s = Function.call.bind(
|
330
|
+
var s = Function.call.bind(W);
|
331
331
|
for (var o in e)
|
332
332
|
if (s(e, o)) {
|
333
333
|
var a = void 0;
|
@@ -356,19 +356,19 @@ function mr() {
|
|
356
356
|
}
|
357
357
|
function Ge(e) {
|
358
358
|
try {
|
359
|
-
return
|
359
|
+
return ye(e), !1;
|
360
360
|
} catch {
|
361
361
|
return !0;
|
362
362
|
}
|
363
363
|
}
|
364
|
-
function
|
364
|
+
function ye(e) {
|
365
365
|
return "" + e;
|
366
366
|
}
|
367
|
-
function
|
367
|
+
function me(e) {
|
368
368
|
if (Ge(e))
|
369
|
-
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)),
|
369
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), ye(e);
|
370
370
|
}
|
371
|
-
var
|
371
|
+
var Y = D.ReactCurrentOwner, Xe = {
|
372
372
|
key: !0,
|
373
373
|
ref: !0,
|
374
374
|
__self: !0,
|
@@ -376,7 +376,7 @@ function mr() {
|
|
376
376
|
}, he, ge, H;
|
377
377
|
H = {};
|
378
378
|
function He(e) {
|
379
|
-
if (
|
379
|
+
if (W.call(e, "ref")) {
|
380
380
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
381
381
|
if (r && r.isReactWarning)
|
382
382
|
return !1;
|
@@ -384,7 +384,7 @@ function mr() {
|
|
384
384
|
return e.ref !== void 0;
|
385
385
|
}
|
386
386
|
function Ze(e) {
|
387
|
-
if (
|
387
|
+
if (W.call(e, "key")) {
|
388
388
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
389
389
|
if (r && r.isReactWarning)
|
390
390
|
return !1;
|
@@ -392,9 +392,9 @@ function mr() {
|
|
392
392
|
return e.key !== void 0;
|
393
393
|
}
|
394
394
|
function Qe(e, r) {
|
395
|
-
if (typeof e.ref == "string" &&
|
396
|
-
var t = C(
|
397
|
-
H[t] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', C(
|
395
|
+
if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
|
396
|
+
var t = C(Y.current.type);
|
397
|
+
H[t] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', C(Y.current.type), e.ref), H[t] = !0);
|
398
398
|
}
|
399
399
|
}
|
400
400
|
function er(e, r) {
|
@@ -451,23 +451,23 @@ function mr() {
|
|
451
451
|
function nr(e, r, t, n, u) {
|
452
452
|
{
|
453
453
|
var s, o = {}, a = null, _ = null;
|
454
|
-
t !== void 0 && (
|
454
|
+
t !== void 0 && (me(t), a = "" + t), Ze(r) && (me(r.key), a = "" + r.key), He(r) && (_ = r.ref, Qe(r, u));
|
455
455
|
for (s in r)
|
456
|
-
|
456
|
+
W.call(r, s) && !Xe.hasOwnProperty(s) && (o[s] = r[s]);
|
457
457
|
if (e && e.defaultProps) {
|
458
458
|
var p = e.defaultProps;
|
459
459
|
for (s in p)
|
460
460
|
o[s] === void 0 && (o[s] = p[s]);
|
461
461
|
}
|
462
462
|
if (a || _) {
|
463
|
-
var
|
464
|
-
a && er(o,
|
463
|
+
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
464
|
+
a && er(o, y), _ && rr(o, y);
|
465
465
|
}
|
466
|
-
return tr(e, a, _, u, n,
|
466
|
+
return tr(e, a, _, u, n, Y.current, o);
|
467
467
|
}
|
468
468
|
}
|
469
|
-
var Z =
|
470
|
-
function
|
469
|
+
var Z = D.ReactCurrentOwner, _e = D.ReactDebugCurrentFrame;
|
470
|
+
function F(e) {
|
471
471
|
if (e) {
|
472
472
|
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
|
473
473
|
_e.setExtraStackFrame(t);
|
@@ -525,7 +525,7 @@ Check the top-level render call using <` + t + ">.");
|
|
525
525
|
return;
|
526
526
|
Re[t] = !0;
|
527
527
|
var n = "";
|
528
|
-
e && e._owner && e._owner !== Z.current && (n = " It was passed a child from " + C(e._owner.type) + "."),
|
528
|
+
e && e._owner && e._owner !== Z.current && (n = " It was passed a child from " + C(e._owner.type) + "."), F(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), F(null);
|
529
529
|
}
|
530
530
|
}
|
531
531
|
function Oe(e, r) {
|
@@ -540,7 +540,7 @@ Check the top-level render call using <` + t + ">.");
|
|
540
540
|
else if (ee(e))
|
541
541
|
e._store && (e._store.validated = !0);
|
542
542
|
else if (e) {
|
543
|
-
var u =
|
543
|
+
var u = P(e);
|
544
544
|
if (typeof u == "function" && u !== e.entries)
|
545
545
|
for (var s = u.call(e), o; !(o = s.next()).done; )
|
546
546
|
ee(o.value) && Te(o.value, r);
|
@@ -557,7 +557,7 @@ Check the top-level render call using <` + t + ">.");
|
|
557
557
|
t = r.propTypes;
|
558
558
|
else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
|
559
559
|
// Inner props are checked in the reconciler.
|
560
|
-
r.$$typeof ===
|
560
|
+
r.$$typeof === m))
|
561
561
|
t = r.propTypes;
|
562
562
|
else
|
563
563
|
return;
|
@@ -577,15 +577,15 @@ Check the top-level render call using <` + t + ">.");
|
|
577
577
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
578
578
|
var n = r[t];
|
579
579
|
if (n !== "children" && n !== "key") {
|
580
|
-
|
580
|
+
F(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), F(null);
|
581
581
|
break;
|
582
582
|
}
|
583
583
|
}
|
584
|
-
e.ref !== null && (
|
584
|
+
e.ref !== null && (F(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
585
585
|
}
|
586
586
|
}
|
587
|
-
var
|
588
|
-
function
|
587
|
+
var je = {};
|
588
|
+
function we(e, r, t, n, u, s) {
|
589
589
|
{
|
590
590
|
var o = We(e);
|
591
591
|
if (!o) {
|
@@ -596,51 +596,51 @@ Check the top-level render call using <` + t + ">.");
|
|
596
596
|
var p;
|
597
597
|
e === null ? p = "null" : X(e) ? p = "array" : e !== void 0 && e.$$typeof === f ? (p = "<" + (C(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, a);
|
598
598
|
}
|
599
|
-
var
|
600
|
-
if (
|
601
|
-
return
|
599
|
+
var y = nr(e, r, t, u, s);
|
600
|
+
if (y == null)
|
601
|
+
return y;
|
602
602
|
if (o) {
|
603
|
-
var
|
604
|
-
if (
|
603
|
+
var j = r.children;
|
604
|
+
if (j !== void 0)
|
605
605
|
if (n)
|
606
|
-
if (X(
|
607
|
-
for (var
|
608
|
-
Oe(
|
609
|
-
Object.freeze && Object.freeze(
|
606
|
+
if (X(j)) {
|
607
|
+
for (var I = 0; I < j.length; I++)
|
608
|
+
Oe(j[I], e);
|
609
|
+
Object.freeze && Object.freeze(j);
|
610
610
|
} else
|
611
611
|
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
612
612
|
else
|
613
|
-
Oe(
|
613
|
+
Oe(j, e);
|
614
614
|
}
|
615
|
-
if (
|
616
|
-
var
|
615
|
+
if (W.call(r, "key")) {
|
616
|
+
var k = C(e), R = Object.keys(r).filter(function(vr) {
|
617
617
|
return vr !== "key";
|
618
618
|
}), re = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
|
619
|
-
if (!
|
619
|
+
if (!je[k + re]) {
|
620
620
|
var dr = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
|
621
621
|
g(`A props object containing a "key" prop is being spread into JSX:
|
622
622
|
let props = %s;
|
623
623
|
<%s {...props} />
|
624
624
|
React keys must be passed directly to JSX without using spread:
|
625
625
|
let props = %s;
|
626
|
-
<%s key={someKey} {...props} />`, re,
|
626
|
+
<%s key={someKey} {...props} />`, re, k, dr, k), je[k + re] = !0;
|
627
627
|
}
|
628
628
|
}
|
629
|
-
return e === c ? ur(
|
629
|
+
return e === c ? ur(y) : ir(y), y;
|
630
630
|
}
|
631
631
|
}
|
632
632
|
function lr(e, r, t) {
|
633
|
-
return
|
633
|
+
return we(e, r, t, !0);
|
634
634
|
}
|
635
635
|
function sr(e, r, t) {
|
636
|
-
return
|
636
|
+
return we(e, r, t, !1);
|
637
637
|
}
|
638
638
|
var cr = sr, fr = lr;
|
639
|
-
|
640
|
-
}()),
|
639
|
+
U.Fragment = c, U.jsx = cr, U.jsxs = fr;
|
640
|
+
}()), U;
|
641
641
|
}
|
642
|
-
process.env.NODE_ENV === "production" ? te.exports = pr() : te.exports =
|
643
|
-
var
|
642
|
+
process.env.NODE_ENV === "production" ? te.exports = pr() : te.exports = yr();
|
643
|
+
var V = te.exports;
|
644
644
|
function Ae(l) {
|
645
645
|
var f, i, c = "";
|
646
646
|
if (typeof l == "string" || typeof l == "number")
|
@@ -655,42 +655,42 @@ function Ae(l) {
|
|
655
655
|
l[i] && (c && (c += " "), c += i);
|
656
656
|
return c;
|
657
657
|
}
|
658
|
-
function
|
658
|
+
function mr() {
|
659
659
|
for (var l, f, i = 0, c = "", T = arguments.length; i < T; i++)
|
660
660
|
(l = arguments[i]) && (f = Ae(l)) && (c && (c += " "), c += f);
|
661
661
|
return c;
|
662
662
|
}
|
663
|
-
const Pe = (l) => typeof l == "boolean" ? `${l}` : l === 0 ? "0" : l, xe =
|
663
|
+
const Pe = (l) => typeof l == "boolean" ? `${l}` : l === 0 ? "0" : l, xe = mr, hr = (l, f) => (i) => {
|
664
664
|
var c;
|
665
665
|
if ((f == null ? void 0 : f.variants) == null)
|
666
666
|
return xe(l, i == null ? void 0 : i.class, i == null ? void 0 : i.className);
|
667
|
-
const { variants: T, defaultVariants: O } = f,
|
668
|
-
const d = i == null ? void 0 : i[b],
|
667
|
+
const { variants: T, defaultVariants: O } = f, w = Object.keys(T).map((b) => {
|
668
|
+
const d = i == null ? void 0 : i[b], m = O == null ? void 0 : O[b];
|
669
669
|
if (d === null)
|
670
670
|
return null;
|
671
|
-
const h = Pe(d) || Pe(
|
671
|
+
const h = Pe(d) || Pe(m);
|
672
672
|
return T[b][h];
|
673
673
|
}), E = i && Object.entries(i).reduce((b, d) => {
|
674
|
-
let [
|
675
|
-
return h === void 0 || (b[
|
674
|
+
let [m, h] = d;
|
675
|
+
return h === void 0 || (b[m] = h), b;
|
676
676
|
}, {}), v = f == null || (c = f.compoundVariants) === null || c === void 0 ? void 0 : c.reduce((b, d) => {
|
677
|
-
let { class:
|
678
|
-
return Object.entries(S).every((
|
679
|
-
let [
|
680
|
-
return Array.isArray(
|
677
|
+
let { class: m, className: h, ...S } = d;
|
678
|
+
return Object.entries(S).every((A) => {
|
679
|
+
let [N, P] = A;
|
680
|
+
return Array.isArray(P) ? P.includes({
|
681
681
|
...O,
|
682
682
|
...E
|
683
|
-
}[
|
683
|
+
}[N]) : {
|
684
684
|
...O,
|
685
685
|
...E
|
686
|
-
}[
|
686
|
+
}[N] === P;
|
687
687
|
}) ? [
|
688
688
|
...b,
|
689
|
-
|
689
|
+
m,
|
690
690
|
h
|
691
691
|
] : b;
|
692
692
|
}, []);
|
693
|
-
return xe(l,
|
693
|
+
return xe(l, w, v, i == null ? void 0 : i.class, i == null ? void 0 : i.className);
|
694
694
|
};
|
695
695
|
const gr = hr("button", {
|
696
696
|
variants: {
|
@@ -761,40 +761,49 @@ const gr = hr("button", {
|
|
761
761
|
size: c,
|
762
762
|
pill: T,
|
763
763
|
active: O,
|
764
|
-
iconLeft:
|
764
|
+
iconLeft: w,
|
765
765
|
iconRight: E,
|
766
766
|
iconLeftJustified: v,
|
767
767
|
iconRightJustified: b,
|
768
768
|
iconOnly: d,
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
769
|
+
width: m,
|
770
|
+
children: h,
|
771
|
+
style: S,
|
772
|
+
...A
|
773
|
+
}, N) => {
|
774
|
+
const P = {
|
775
|
+
...S || {},
|
776
|
+
...m ? { width: m } : {}
|
777
|
+
};
|
778
|
+
return /* @__PURE__ */ V.jsxs(
|
779
|
+
"button",
|
780
|
+
{
|
781
|
+
className: gr({
|
782
|
+
variant: f,
|
783
|
+
color: i,
|
784
|
+
size: c,
|
785
|
+
pill: T,
|
786
|
+
active: O,
|
787
|
+
iconLeft: !!w,
|
788
|
+
iconRight: !!E,
|
789
|
+
iconLeftJustified: !!v,
|
790
|
+
iconRightJustified: !!b,
|
791
|
+
iconOnly: !!d,
|
792
|
+
className: l
|
793
|
+
}),
|
794
|
+
style: P,
|
795
|
+
ref: N,
|
796
|
+
...A,
|
797
|
+
children: [
|
798
|
+
w && /* @__PURE__ */ V.jsx("span", { className: "button-icon-left", children: w }),
|
799
|
+
v && /* @__PURE__ */ V.jsx("span", { className: "button-icon-left", children: v }),
|
800
|
+
d ? /* @__PURE__ */ V.jsx("span", { children: d }) : h,
|
801
|
+
E && /* @__PURE__ */ V.jsx("span", { className: "button-icon-right", children: E }),
|
802
|
+
b && /* @__PURE__ */ V.jsx("span", { className: "button-icon-right", children: b })
|
803
|
+
]
|
804
|
+
}
|
805
|
+
);
|
806
|
+
}
|
798
807
|
);
|
799
808
|
_r.displayName = "Button";
|
800
809
|
export {
|