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 CHANGED
@@ -1,12 +1,12 @@
1
1
  import { j as a } from "./jsx-runtime-GkKLlHH4.js";
2
- import { memo as G, useMemo as H, createElement as J, isValidElement as K } from "react";
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 O from "./Spinner.es.js";
6
- const P = (r) => K(r), B = {
5
+ import U from "./Spinner.es.js";
6
+ const W = (r) => Q(r), B = {
7
7
  primary: "brand",
8
8
  secondary: "neutral"
9
- }, Q = (r) => r in B, U = (r) => Q(r) ? B[r] : r, o = {
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
- }, W = g(f.icon, {
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
- }), X = g(f.container, {
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
- }), Y = ({
307
+ }), I = K(({
308
308
  label: r,
309
- onClick: I,
309
+ onClick: z,
310
310
  icon: h,
311
- contentClassName: Z,
311
+ contentClassName: T,
312
312
  loadingText: x = "Cargando...",
313
- animate: z = !1,
314
- animateIcon: N = !1,
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: S = "button",
320
- className: E,
321
- disabled: M,
319
+ type: E = "button",
320
+ className: M,
321
+ disabled: F,
322
322
  variant: l = "fill",
323
- form: F,
323
+ form: R,
324
324
  size: t = "medium",
325
325
  color: A = "brand",
326
326
  ...D
327
- }) => {
328
- const c = !!(M || d), w = N && !c, L = z && !c, i = c ? "disabled" : U(A), v = typeof s == "string" ? s : r, p = typeof s != "string" ? s : void 0, R = H(() => {
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 q = {
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(O, { size: q[t], variant: "clip", color: "brand" }),
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 k = {
357
+ const G = {
358
358
  small: 20,
359
359
  medium: 24,
360
360
  large: 24
361
361
  };
362
- return u && (m = P(u) ? u : J(u, {
363
- size: k[t]
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: W({
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
- type: S,
405
+ ref: L,
406
+ type: E,
406
407
  className: V(
407
408
  "group",
408
- X({
409
+ _({
409
410
  size: t,
410
411
  variant: l,
411
412
  color: i,
412
- animation: L
413
+ animation: k
413
414
  }),
414
- E
415
+ M
415
416
  ),
416
417
  disabled: c,
417
- form: F,
418
- onClick: I,
418
+ form: R,
419
+ onClick: z,
419
420
  ...D,
420
- children: R
421
+ children: q
421
422
  }
422
423
  );
423
- }, ne = G(Y);
424
+ });
425
+ I.displayName = "Button";
426
+ const oe = J(I);
424
427
  export {
425
- ne as default
428
+ oe as default
426
429
  };
@@ -1,5 +1,5 @@
1
- import { a as o, u as t } from "./useModalControl-BE-IfhuR.js";
2
- import { D as u } from "./useModalControl-BE-IfhuR.js";
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,
@@ -1,4 +1,4 @@
1
- import { D as t } from "./useModalControl-BE-IfhuR.js";
1
+ import { D as t } from "./useModalControl-3Dx1Wop_.js";
2
2
  import { useDesktopModalControl as s, useDesktopModalState as l } from "./DesktopModal.es.js";
3
3
  export {
4
4
  t as default,
@@ -1,7 +1,7 @@
1
1
  import { j as n } from "./jsx-runtime-GkKLlHH4.js";
2
- import { memo as T, useMemo as k, isValidElement as V } from "react";
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 q from "./Spinner.es.js";
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
- }, I = {
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
- }, F = x(w.container, {
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
- }), G = x(w.container, {
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: I.true.container,
171
- false: I.false.container
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: $.true.icon,
225
- false: $.false.icon
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
- }), H = ({
259
+ }), $ = G(({
260
260
  onClick: z,
261
261
  icon: b,
262
262
  contentClassName: p,
263
- animate: N = !1,
264
- animateIcon: S = !1,
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: B = "button",
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: R = "brand"
276
- }) => {
277
- const l = !!(i || f), d = !!(S && !l), A = !!(N && !l), c = R, C = {
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
- }, D = k(() => {
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(q, { size: C[o], color: "brand" })) });
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 (V(r))
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
- V(t) && (m(t.type) ? a = /* @__PURE__ */ n.jsx(
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
- type: B,
366
+ ref: D,
367
+ type: R,
366
368
  className: h(
367
369
  "group",
368
- F({
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
- G({ size: o, variant: s, color: c, animation: A, disabled: l }),
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: D })
386
+ ), children: q })
384
387
  }
385
388
  );
386
- }, W = T(H);
389
+ });
390
+ $.displayName = "IconButton";
391
+ const Z = F($);
387
392
  export {
388
- W as default
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-BE-IfhuR.js";
7
- import { a as ce, u as me } from "./useModalControl-BE-IfhuR.js";
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() {