prometeo-design-system 7.3.0 → 7.3.2
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/Button.es.js +35 -32
- package/dist/DesktopModal.es.js +2 -2
- package/dist/DialogModal.es.js +1 -1
- package/dist/IconButton.es.js +32 -27
- package/dist/Modal.es.js +2 -2
- package/dist/Select.es.js +578 -581
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/IconButton/IconButton.d.ts +2 -2
- package/dist/components/Select/SelectDropdown.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/prometeo-design-system.es.js +5 -5
- package/dist/{useModalControl-BE-IfhuR.js → useModalControl-3Dx1Wop_.js} +2 -2
- package/package.json +1 -1
package/dist/Button.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as J, forwardRef as K, useMemo as O, createElement as P, isValidElement as Q } from "react";
|
|
3
3
|
import { c as V } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { c as g } from "./index-BOQuZ0gG.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import U from "./Spinner.es.js";
|
|
6
|
+
const W = (r) => Q(r), B = {
|
|
7
7
|
primary: "brand",
|
|
8
8
|
secondary: "neutral"
|
|
9
|
-
},
|
|
9
|
+
}, X = (r) => r in B, Y = (r) => X(r) ? B[r] : r, o = {
|
|
10
10
|
small: {
|
|
11
11
|
container: "h-8 px-3 py-1.5 spacing-x-2 radius-small",
|
|
12
12
|
icon: ""
|
|
@@ -156,7 +156,7 @@ const P = (r) => K(r), B = {
|
|
|
156
156
|
false: {
|
|
157
157
|
icon: ""
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, Z = g(f.icon, {
|
|
160
160
|
variants: {
|
|
161
161
|
size: {
|
|
162
162
|
small: `${n.small.icon} ${o.small.icon}`,
|
|
@@ -207,7 +207,7 @@ const P = (r) => K(r), B = {
|
|
|
207
207
|
color: "brand",
|
|
208
208
|
animateIcon: !0
|
|
209
209
|
}
|
|
210
|
-
}),
|
|
210
|
+
}), _ = g(f.container, {
|
|
211
211
|
variants: {
|
|
212
212
|
size: {
|
|
213
213
|
small: `${n.small.container} ${o.small.container}`,
|
|
@@ -304,36 +304,36 @@ const P = (r) => K(r), B = {
|
|
|
304
304
|
variant: "fill",
|
|
305
305
|
color: "brand"
|
|
306
306
|
}
|
|
307
|
-
}),
|
|
307
|
+
}), I = K(({
|
|
308
308
|
label: r,
|
|
309
|
-
onClick:
|
|
309
|
+
onClick: z,
|
|
310
310
|
icon: h,
|
|
311
|
-
contentClassName:
|
|
311
|
+
contentClassName: T,
|
|
312
312
|
loadingText: x = "Cargando...",
|
|
313
|
-
animate:
|
|
314
|
-
animateIcon:
|
|
313
|
+
animate: N = !1,
|
|
314
|
+
animateIcon: S = !1,
|
|
315
315
|
isLoading: d = !1,
|
|
316
316
|
children: s,
|
|
317
317
|
hideSpinner: y = !1,
|
|
318
318
|
spinner: b,
|
|
319
|
-
type:
|
|
320
|
-
className:
|
|
321
|
-
disabled:
|
|
319
|
+
type: E = "button",
|
|
320
|
+
className: M,
|
|
321
|
+
disabled: F,
|
|
322
322
|
variant: l = "fill",
|
|
323
|
-
form:
|
|
323
|
+
form: R,
|
|
324
324
|
size: t = "medium",
|
|
325
325
|
color: A = "brand",
|
|
326
326
|
...D
|
|
327
|
-
}) => {
|
|
328
|
-
const c = !!(
|
|
327
|
+
}, L) => {
|
|
328
|
+
const c = !!(F || d), w = S && !c, k = N && !c, i = c ? "disabled" : Y(A), v = typeof s == "string" ? s : r, p = typeof s != "string" ? s : void 0, q = O(() => {
|
|
329
329
|
if (d) {
|
|
330
|
-
const
|
|
330
|
+
const H = {
|
|
331
331
|
small: "small",
|
|
332
332
|
medium: "medium",
|
|
333
333
|
large: "medium"
|
|
334
334
|
};
|
|
335
335
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
336
|
-
!y && b ? b : /* @__PURE__ */ a.jsx(
|
|
336
|
+
!y && b ? b : /* @__PURE__ */ a.jsx(U, { size: H[t], variant: "clip", color: "brand" }),
|
|
337
337
|
/* @__PURE__ */ a.jsx(
|
|
338
338
|
"span",
|
|
339
339
|
{
|
|
@@ -354,18 +354,18 @@ const P = (r) => K(r), B = {
|
|
|
354
354
|
return p;
|
|
355
355
|
const u = h;
|
|
356
356
|
let m = null;
|
|
357
|
-
const
|
|
357
|
+
const G = {
|
|
358
358
|
small: 20,
|
|
359
359
|
medium: 24,
|
|
360
360
|
large: 24
|
|
361
361
|
};
|
|
362
|
-
return u && (m =
|
|
363
|
-
size:
|
|
362
|
+
return u && (m = W(u) ? u : P(u, {
|
|
363
|
+
size: G[t]
|
|
364
364
|
})), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
365
365
|
m && /* @__PURE__ */ a.jsx(
|
|
366
366
|
"span",
|
|
367
367
|
{
|
|
368
|
-
className:
|
|
368
|
+
className: Z({
|
|
369
369
|
size: t,
|
|
370
370
|
variant: l,
|
|
371
371
|
color: i,
|
|
@@ -402,25 +402,28 @@ const P = (r) => K(r), B = {
|
|
|
402
402
|
return /* @__PURE__ */ a.jsx(
|
|
403
403
|
"button",
|
|
404
404
|
{
|
|
405
|
-
|
|
405
|
+
ref: L,
|
|
406
|
+
type: E,
|
|
406
407
|
className: V(
|
|
407
408
|
"group",
|
|
408
|
-
|
|
409
|
+
_({
|
|
409
410
|
size: t,
|
|
410
411
|
variant: l,
|
|
411
412
|
color: i,
|
|
412
|
-
animation:
|
|
413
|
+
animation: k
|
|
413
414
|
}),
|
|
414
|
-
|
|
415
|
+
M
|
|
415
416
|
),
|
|
416
417
|
disabled: c,
|
|
417
|
-
form:
|
|
418
|
-
onClick:
|
|
418
|
+
form: R,
|
|
419
|
+
onClick: z,
|
|
419
420
|
...D,
|
|
420
|
-
children:
|
|
421
|
+
children: q
|
|
421
422
|
}
|
|
422
423
|
);
|
|
423
|
-
}
|
|
424
|
+
});
|
|
425
|
+
I.displayName = "Button";
|
|
426
|
+
const oe = J(I);
|
|
424
427
|
export {
|
|
425
|
-
|
|
428
|
+
oe as default
|
|
426
429
|
};
|
package/dist/DesktopModal.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as u } from "./useModalControl-
|
|
1
|
+
import { u as o, a as t } from "./useModalControl-3Dx1Wop_.js";
|
|
2
|
+
import { D as u } from "./useModalControl-3Dx1Wop_.js";
|
|
3
3
|
const e = o, s = t;
|
|
4
4
|
export {
|
|
5
5
|
u as default,
|
package/dist/DialogModal.es.js
CHANGED
package/dist/IconButton.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as F, forwardRef as G, useMemo as H, isValidElement as I } from "react";
|
|
3
3
|
import { i as m } from "./iconUtils-rTOfKDxE.js";
|
|
4
|
-
import
|
|
4
|
+
import J from "./Spinner.es.js";
|
|
5
5
|
import { c as x } from "./index-BOQuZ0gG.js";
|
|
6
6
|
import { c as h } from "./cn-B6yFEsav.js";
|
|
7
7
|
const u = {
|
|
@@ -117,21 +117,21 @@ const u = {
|
|
|
117
117
|
}, w = {
|
|
118
118
|
container: "flex justify-center items-center gap-1 w-max bg-transparent cursor-pointer transition-all ease-in-out duration-300 relative",
|
|
119
119
|
icon: "w-max transition-all ease-in-out duration-300 flex justify-center items-center overflow-hidden"
|
|
120
|
-
},
|
|
120
|
+
}, V = {
|
|
121
121
|
true: {
|
|
122
122
|
container: "hover:scale-105 active:scale-95 disabled:scale-100"
|
|
123
123
|
},
|
|
124
124
|
false: {
|
|
125
125
|
container: ""
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, N = {
|
|
128
128
|
true: {
|
|
129
129
|
icon: "group-hover:rotate-90 group-active:rotate-0 group-disabled:rotate-0"
|
|
130
130
|
},
|
|
131
131
|
false: {
|
|
132
132
|
icon: ""
|
|
133
133
|
}
|
|
134
|
-
},
|
|
134
|
+
}, K = x(w.container, {
|
|
135
135
|
variants: {
|
|
136
136
|
size: {
|
|
137
137
|
small: `${y.small.container} ${u.small.container}`,
|
|
@@ -147,7 +147,7 @@ const u = {
|
|
|
147
147
|
size: "medium",
|
|
148
148
|
disabled: !1
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
150
|
+
}), O = x(w.container, {
|
|
151
151
|
variants: {
|
|
152
152
|
size: {
|
|
153
153
|
small: "radius-small",
|
|
@@ -167,8 +167,8 @@ const u = {
|
|
|
167
167
|
warning: ""
|
|
168
168
|
},
|
|
169
169
|
animation: {
|
|
170
|
-
true:
|
|
171
|
-
false:
|
|
170
|
+
true: V.true.container,
|
|
171
|
+
false: V.false.container
|
|
172
172
|
},
|
|
173
173
|
disabled: {
|
|
174
174
|
true: "cursor-default!",
|
|
@@ -221,8 +221,8 @@ const u = {
|
|
|
221
221
|
warning: ""
|
|
222
222
|
},
|
|
223
223
|
animateIcon: {
|
|
224
|
-
true:
|
|
225
|
-
false:
|
|
224
|
+
true: N.true.icon,
|
|
225
|
+
false: N.false.icon
|
|
226
226
|
},
|
|
227
227
|
disabled: {
|
|
228
228
|
true: "",
|
|
@@ -256,34 +256,35 @@ const u = {
|
|
|
256
256
|
animateIcon: !0,
|
|
257
257
|
disabled: !1
|
|
258
258
|
}
|
|
259
|
-
}),
|
|
259
|
+
}), $ = G(({
|
|
260
260
|
onClick: z,
|
|
261
261
|
icon: b,
|
|
262
262
|
contentClassName: p,
|
|
263
|
-
animate:
|
|
264
|
-
animateIcon:
|
|
263
|
+
animate: S = !1,
|
|
264
|
+
animateIcon: B = !1,
|
|
265
265
|
isLoading: f = !1,
|
|
266
266
|
children: r,
|
|
267
267
|
hideSpinner: j = !1,
|
|
268
268
|
spinner: g,
|
|
269
|
-
type:
|
|
269
|
+
type: R = "button",
|
|
270
270
|
className: E,
|
|
271
271
|
disabled: i,
|
|
272
272
|
variant: s = "fill",
|
|
273
273
|
form: M,
|
|
274
274
|
size: o = "medium",
|
|
275
|
-
color:
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
color: A = "brand",
|
|
276
|
+
...C
|
|
277
|
+
}, D) => {
|
|
278
|
+
const l = !!(i || f), d = !!(B && !l), T = !!(S && !l), c = A, k = {
|
|
278
279
|
small: "small",
|
|
279
280
|
medium: "medium",
|
|
280
281
|
large: "medium"
|
|
281
|
-
},
|
|
282
|
+
}, q = H(() => {
|
|
282
283
|
if (f)
|
|
283
|
-
return /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center", children: !j && (g || /* @__PURE__ */ n.jsx(
|
|
284
|
+
return /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center", children: !j && (g || /* @__PURE__ */ n.jsx(J, { size: k[o], color: "brand" })) });
|
|
284
285
|
let a = null;
|
|
285
286
|
if (r)
|
|
286
|
-
if (
|
|
287
|
+
if (I(r))
|
|
287
288
|
m(r.type) ? a = /* @__PURE__ */ n.jsx(
|
|
288
289
|
"span",
|
|
289
290
|
{
|
|
@@ -300,7 +301,7 @@ const u = {
|
|
|
300
301
|
else if (typeof r == "function")
|
|
301
302
|
try {
|
|
302
303
|
const t = r();
|
|
303
|
-
|
|
304
|
+
I(t) && (m(t.type) ? a = /* @__PURE__ */ n.jsx(
|
|
304
305
|
"span",
|
|
305
306
|
{
|
|
306
307
|
className: v({
|
|
@@ -362,10 +363,11 @@ const u = {
|
|
|
362
363
|
return /* @__PURE__ */ n.jsx(
|
|
363
364
|
"button",
|
|
364
365
|
{
|
|
365
|
-
|
|
366
|
+
ref: D,
|
|
367
|
+
type: R,
|
|
366
368
|
className: h(
|
|
367
369
|
"group",
|
|
368
|
-
|
|
370
|
+
K({
|
|
369
371
|
size: o,
|
|
370
372
|
disabled: l
|
|
371
373
|
}),
|
|
@@ -374,16 +376,19 @@ const u = {
|
|
|
374
376
|
disabled: l,
|
|
375
377
|
form: M,
|
|
376
378
|
onClick: z,
|
|
379
|
+
...C,
|
|
377
380
|
children: /* @__PURE__ */ n.jsx("div", { className: h(
|
|
378
381
|
"flex items-center gap-1",
|
|
379
382
|
l && "pointer-events-none",
|
|
380
|
-
|
|
383
|
+
O({ size: o, variant: s, color: c, animation: T, disabled: l }),
|
|
381
384
|
"w-full h-full grid place-items-center",
|
|
382
385
|
p
|
|
383
|
-
), children:
|
|
386
|
+
), children: q })
|
|
384
387
|
}
|
|
385
388
|
);
|
|
386
|
-
}
|
|
389
|
+
});
|
|
390
|
+
$.displayName = "IconButton";
|
|
391
|
+
const Z = F($);
|
|
387
392
|
export {
|
|
388
|
-
|
|
393
|
+
Z as default
|
|
389
394
|
};
|
package/dist/Modal.es.js
CHANGED
|
@@ -3,8 +3,8 @@ import { u as V } from "./useDevice-S7cYqLVh.js";
|
|
|
3
3
|
import { createContext as q, useContext as G, memo as J, useState as L, useEffect as H, useRef as Q, isValidElement as d, Children as S, Fragment as W } from "react";
|
|
4
4
|
import { createPortal as p } from "react-dom";
|
|
5
5
|
import { D as X, u as M } from "./DrawerMobile-BzwNbhK7.js";
|
|
6
|
-
import { D as m } from "./useModalControl-
|
|
7
|
-
import {
|
|
6
|
+
import { D as m } from "./useModalControl-3Dx1Wop_.js";
|
|
7
|
+
import { u as ce, a as me } from "./useModalControl-3Dx1Wop_.js";
|
|
8
8
|
import { c as A } from "./cn-B6yFEsav.js";
|
|
9
9
|
const D = q(null);
|
|
10
10
|
function j() {
|