prometeo-design-system 4.6.4 → 4.7.0

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.
Files changed (86) hide show
  1. package/dist/DialogModal.es.js +123 -112
  2. package/dist/Header.es.js +22 -22
  3. package/dist/IconButton.es.js +124 -77
  4. package/dist/Icons/AccountCircle.es.js +1 -1
  5. package/dist/Icons/Add.es.js +1 -1
  6. package/dist/Icons/ArrowDownward.es.js +1 -1
  7. package/dist/Icons/ArrowLeft.es.js +1 -1
  8. package/dist/Icons/ArrowUpDown.es.js +1 -1
  9. package/dist/Icons/ArrowUpward.es.js +1 -1
  10. package/dist/Icons/AttachFile.es.js +1 -1
  11. package/dist/Icons/Boards.es.js +1 -1
  12. package/dist/Icons/Calendar.es.js +1 -1
  13. package/dist/Icons/Cancel.es.js +1 -1
  14. package/dist/Icons/Check.es.js +1 -1
  15. package/dist/Icons/CheckCircle.es.js +1 -1
  16. package/dist/Icons/CheckList.es.js +1 -1
  17. package/dist/Icons/ChevronDown.es.js +1 -1
  18. package/dist/Icons/Clock.es.js +1 -1
  19. package/dist/Icons/Close.es.js +1 -1
  20. package/dist/Icons/CloseNavBarDesktop.es.js +1 -1
  21. package/dist/Icons/Collapse.es.js +1 -1
  22. package/dist/Icons/Company.es.js +1 -1
  23. package/dist/Icons/Copy.es.js +1 -1
  24. package/dist/Icons/CrevronLeft.es.js +1 -1
  25. package/dist/Icons/CrevronRight.es.js +1 -1
  26. package/dist/Icons/DocumentFill.es.js +1 -1
  27. package/dist/Icons/Download.es.js +1 -1
  28. package/dist/Icons/DragIndicator.es.js +1 -1
  29. package/dist/Icons/Edit.es.js +1 -1
  30. package/dist/Icons/EditFill.es.js +1 -1
  31. package/dist/Icons/Email.es.js +1 -1
  32. package/dist/Icons/Error.es.js +1 -1
  33. package/dist/Icons/EyeVisibility.es.js +1 -1
  34. package/dist/Icons/EyeVisibilityOff.es.js +1 -1
  35. package/dist/Icons/FaLock.es.js +1 -1
  36. package/dist/Icons/FastForward.es.js +1 -1
  37. package/dist/Icons/File.es.js +1 -1
  38. package/dist/Icons/Filter.es.js +1 -1
  39. package/dist/Icons/FormatColorText.es.js +1 -1
  40. package/dist/Icons/Help.es.js +1 -1
  41. package/dist/Icons/HistoryActivity.es.js +1 -1
  42. package/dist/Icons/Home.es.js +1 -1
  43. package/dist/Icons/Image.es.js +1 -1
  44. package/dist/Icons/Info.es.js +1 -1
  45. package/dist/Icons/Logout.es.js +1 -1
  46. package/dist/Icons/MessageSquare.es.js +1 -1
  47. package/dist/Icons/MessageSquareFill.es.js +1 -1
  48. package/dist/Icons/MoreVert.es.js +1 -1
  49. package/dist/Icons/Notifications.es.js +1 -1
  50. package/dist/Icons/Pause.es.js +1 -1
  51. package/dist/Icons/Reassignment.es.js +1 -1
  52. package/dist/Icons/ReassignmentFill.es.js +1 -1
  53. package/dist/Icons/Reload.es.js +1 -1
  54. package/dist/Icons/Search.es.js +1 -1
  55. package/dist/Icons/Send.es.js +1 -1
  56. package/dist/Icons/Settings.es.js +1 -1
  57. package/dist/Icons/Shared.es.js +1 -1
  58. package/dist/Icons/Sort.es.js +1 -1
  59. package/dist/Icons/StarFill.es.js +1 -1
  60. package/dist/Icons/Stars.es.js +1 -1
  61. package/dist/Icons/Ticket.es.js +1 -1
  62. package/dist/Icons/TicketFilled.es.js +1 -1
  63. package/dist/Icons/Trash.es.js +1 -1
  64. package/dist/Icons/TrashFill.es.js +1 -1
  65. package/dist/Icons/Upload.es.js +1 -1
  66. package/dist/Icons/UploadCloud.es.js +1 -1
  67. package/dist/Icons/UserAdd.es.js +1 -1
  68. package/dist/Icons/UserAddFill.es.js +1 -1
  69. package/dist/Icons/UserAvatar.es.js +1 -1
  70. package/dist/Icons/UserPerson.es.js +1 -1
  71. package/dist/Icons/WhatsApp.es.js +1 -1
  72. package/dist/Icons/iconUtils.d.ts +2 -0
  73. package/dist/PyrionLayout.es.js +764 -745
  74. package/dist/Scrollable.es.js +136 -133
  75. package/dist/Skeleton.es.js +1 -1
  76. package/dist/assets/DialogModal.png +0 -0
  77. package/dist/assets/Header.png +0 -0
  78. package/dist/components/Header/Header.d.ts +2 -1
  79. package/dist/components/IconButton/IconButton.d.ts +1 -1
  80. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +4 -1
  81. package/dist/components/PyrionNavigationDrawer/PLNotificationsLoader.d.ts +6 -0
  82. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +3 -1
  83. package/dist/components/Scrollable/Scrollable.d.ts +2 -0
  84. package/dist/iconUtils-rTOfKDxE.js +9 -0
  85. package/package.json +1 -1
  86. package/dist/iconUtils-D0lVAgGT.js +0 -5
@@ -1,162 +1,173 @@
1
- import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
- import { forwardRef as _, memo as b, useState as H, useRef as R, useCallback as p, useImperativeHandle as $, Children as q, isValidElement as I } from "react";
3
- import { createPortal as B } from "react-dom";
4
- import { c } from "./cn-B6yFEsav.js";
5
- const A = _(
6
- ({ children: r, onClose: a, className: n, attachToParent: o = !1, zindex: y = 40, debugMode: l = !1, safeMarginSize: S = 24, title: j, scroll: x = "content" }, G) => {
7
- const [C, F] = H(!1), [v, T] = H(null), z = R(a), N = R(v);
8
- z.current = a, N.current = v;
9
- const O = p((e) => {
10
- T(e ?? null), F(!0);
11
- }, []), D = p(() => {
12
- F(!1), z.current?.(N.current), setTimeout(() => T(null), 300);
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
+ import { forwardRef as Q, memo as j, useState as L, useRef as F, useCallback as x, useImperativeHandle as W, Children as R, isValidElement as U } from "react";
3
+ import { createPortal as X } from "react-dom";
4
+ import { c as p } from "./cn-B6yFEsav.js";
5
+ const V = Q(
6
+ ({ children: t, onClose: n, className: o, attachToParent: s = !1, zindex: v = 40, debugMode: a = !1, safeMarginSize: _ = 24, title: T, scroll: m = "content" }, $) => {
7
+ const [N, z] = L(!1), [D, O] = L(null), k = F(n), w = F(D);
8
+ k.current = n, w.current = D;
9
+ const P = x((f) => {
10
+ O(f ?? null), z(!0);
11
+ }, []), E = x(() => {
12
+ z(!1), k.current?.(w.current), setTimeout(() => O(null), 300);
13
13
  }, []);
14
- $(
15
- G,
14
+ W(
15
+ $,
16
16
  () => ({
17
- open: O,
18
- close: D,
19
- isOpen: C,
20
- getContext: () => N.current
17
+ open: P,
18
+ close: E,
19
+ isOpen: N,
20
+ getContext: () => w.current
21
21
  }),
22
- [O, D, C]
22
+ [P, E, N]
23
23
  );
24
- const L = `max-[500px]:max-w-[calc(100%-32px)]
24
+ const q = `max-[500px]:max-w-[calc(100%-32px)]
25
25
  max-[1200px]:max-w-[min(800px,calc(100%-32px))]
26
- min-[1200px]:max-w-[min(1224px,calc(100%-100px))] min-[1200px]:min-w-[1100px]`, U = typeof r == "function" ? r(v) : r, V = q.toArray(U);
27
- let s = null, u = null, w = null;
28
- const h = [];
29
- let E = null;
30
- if (V.forEach((e) => {
31
- if (!I(e)) {
32
- h.push(e);
33
- return;
34
- }
35
- if (e.type === g && !j) {
36
- u = e;
37
- return;
38
- }
39
- if (e.type === i && !s) {
40
- const f = e.props;
41
- s = /* @__PURE__ */ t.jsx(i, { ...f, debugMode: l, children: f.children });
42
- return;
43
- }
44
- if (e.type === d && !w) {
45
- const f = e.props;
46
- w = /* @__PURE__ */ t.jsx(d, { ...f, debugMode: l, scroll: x, children: f.children });
47
- return;
48
- }
49
- if (e.type === m && !E) {
50
- const f = e.props;
51
- E = /* @__PURE__ */ t.jsx(m, { ...f, debugMode: l, children: f.children });
52
- return;
53
- }
54
- e.type !== i && e.type !== d && e.type !== m && e.type !== g && h.push(e);
55
- }), !s && j && (s = /* @__PURE__ */ t.jsx(i, { title: j, debugMode: l }), u = null), s && u && I(s)) {
56
- const e = s.props;
57
- e.title && (s = /* @__PURE__ */ t.jsx(i, { ...e, title: "", debugMode: l, children: u }), u = null);
26
+ min-[1200px]:max-w-[min(1224px,calc(100%-100px))] min-[1200px]:min-w-[1100px]`;
27
+ let C, b;
28
+ typeof t == "function" ? (console.log("es un child de tipo function"), C = t(D), b = R.toArray(C), console.log(b, "Child array")) : (C = t, b = R.toArray(C));
29
+ const B = (f) => {
30
+ const l = {
31
+ header: null,
32
+ titleContent: null,
33
+ content: null,
34
+ footer: null,
35
+ middleChildren: []
36
+ }, S = (r) => {
37
+ if (!U(r)) {
38
+ l.middleChildren.push(r);
39
+ return;
40
+ }
41
+ if (r.type === g && !l.titleContent) {
42
+ l.titleContent = r;
43
+ return;
44
+ }
45
+ if (r.type === d && !l.header) {
46
+ const i = r.props;
47
+ l.header = /* @__PURE__ */ e.jsx(d, { ...i, debugMode: a, children: i.children });
48
+ return;
49
+ }
50
+ if (r.type === u && !l.content) {
51
+ const i = r.props;
52
+ l.content = /* @__PURE__ */ e.jsx(u, { ...i, debugMode: a, scroll: m, children: i.children });
53
+ return;
54
+ }
55
+ if (r.type === h && !l.footer) {
56
+ const i = r.props;
57
+ l.footer = /* @__PURE__ */ e.jsx(h, { ...i, debugMode: a, children: i.children });
58
+ return;
59
+ }
60
+ const G = r.props;
61
+ G?.children && R.toArray(G.children).forEach(S), r.type !== d && r.type !== u && r.type !== h && r.type !== g && l.middleChildren.push(r);
62
+ };
63
+ return f.forEach(S), l;
64
+ };
65
+ let { header: c, titleContent: y, content: J, footer: K, middleChildren: A } = B(b);
66
+ if (!c && T && (c = /* @__PURE__ */ e.jsx(d, { title: T, debugMode: a }), y = null), c && y && U(c)) {
67
+ const f = c.props;
68
+ f.title && (c = /* @__PURE__ */ e.jsx(d, { ...f, title: "", debugMode: a, children: y }), y = null);
58
69
  }
59
- const k = w ?? (h.length ? /* @__PURE__ */ t.jsx(d, { debugMode: l, scroll: x, children: h }) : null), P = /* @__PURE__ */ t.jsx(t.Fragment, { children: C && /* @__PURE__ */ t.jsx(
70
+ const H = J ?? (A.length ? /* @__PURE__ */ e.jsx(u, { debugMode: a, scroll: m, children: A }) : null), I = /* @__PURE__ */ e.jsx(e.Fragment, { children: N && /* @__PURE__ */ e.jsx(
60
71
  "div",
61
72
  {
62
73
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
63
- style: { zIndex: y },
64
- onClick: D,
65
- children: /* @__PURE__ */ t.jsxs(
74
+ style: { zIndex: v },
75
+ onClick: E,
76
+ children: /* @__PURE__ */ e.jsxs(
66
77
  "div",
67
78
  {
68
- onClick: (e) => e.stopPropagation(),
69
- className: c(
79
+ onClick: (f) => f.stopPropagation(),
80
+ className: p(
70
81
  "bg-neutral-default-default rounded-lg shadow-lg border-neutral-strong-default border relative ",
71
82
  "max-h-[calc(100%-128px)] h-dvh w-full",
72
83
  "flex flex-col ",
73
- L,
74
- n
84
+ q,
85
+ o
75
86
  ),
76
87
  style: {
77
- "--safe-margin-size": `${S}px`
88
+ "--safe-margin-size": `${_}px`
78
89
  },
79
90
  children: [
80
- /* @__PURE__ */ t.jsx(
91
+ /* @__PURE__ */ e.jsx(
81
92
  "div",
82
93
  {
83
- className: c(
94
+ className: p(
84
95
  "absolute bg-transparent z-[-1] -top-(--safe-margin-size) -left-(--safe-margin-size) -right-(--safe-margin-size) -bottom-(--safe-margin-size)",
85
- l && "after:content-['SECURE_MARGIN'] after:text-red-300 after:prometeo-fonts-label-small after:ml-2 "
96
+ a && "after:content-['SECURE_MARGIN'] after:text-red-300 after:prometeo-fonts-label-small after:ml-2 "
86
97
  ),
87
98
  style: {
88
- background: l ? "#FF393973" : "auto",
89
- border: l ? "solid 1px #FF3939" : ""
99
+ background: a ? "#FF393973" : "auto",
100
+ border: a ? "solid 1px #FF3939" : ""
90
101
  }
91
102
  }
92
103
  ),
93
- /* @__PURE__ */ t.jsxs("div", { className: c(
104
+ /* @__PURE__ */ e.jsxs("div", { className: p(
94
105
  "flex flex-col h-full",
95
- x === "dialog" && "overflow-y-auto",
96
- x === "content" && "overflow-hidden"
106
+ m === "dialog" && "overflow-y-auto",
107
+ m === "content" && "overflow-hidden"
97
108
  ), children: [
98
- s,
99
- x === "dialog" ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col flex-1", children: k }) : k,
100
- E
109
+ c,
110
+ m === "dialog" ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col flex-1", children: H }) : H,
111
+ K
101
112
  ] })
102
113
  ]
103
114
  }
104
115
  )
105
116
  }
106
117
  ) });
107
- return o ? P : B(P, document.body);
118
+ return s ? I : X(I, document.body);
108
119
  }
109
120
  );
110
- A.displayName = "Dialog";
111
- const d = b(({ children: r, className: a, debugMode: n, scroll: o }) => /* @__PURE__ */ t.jsx("div", { className: c(
112
- "flex flex-col gap-4 p-4",
113
- n && "border-2 border-dashed border-red-500 bg-red-200/40 relative after:content-['CONTENT'] after:absolute after:top-2 after:left-1/2 after:w-max after:h-full after:text-red-500 ",
114
- a,
121
+ V.displayName = "Dialog";
122
+ const u = j(({ children: t, className: n, debugMode: o, scroll: s }) => /* @__PURE__ */ e.jsx("div", { className: p(
123
+ "flex flex-col p-4",
124
+ o && "border-2 border-dashed border-red-500 bg-red-200/40 relative after:content-['CONTENT'] after:absolute after:top-2 after:left-1/2 after:w-max after:h-full after:text-red-500 ",
125
+ n,
115
126
  // Para scroll='content', este componente necesita su propio scroll y altura mínima
116
- o === "content" && "overflow-y-auto min-h-0 flex-1 ",
127
+ s === "content" && "overflow-y-auto min-h-0 flex-1 ",
117
128
  // Para scroll='dialog', el contenido debe ocupar todo el espacio disponible pero sin scroll
118
- o === "dialog" && "flex-1 min-h-max "
119
- ), children: r }));
120
- d.displayName = "DialogContent";
121
- const g = b(({ children: r, className: a, debugMode: n }) => /* @__PURE__ */ t.jsx("h1", { className: c("prometeo-fonts-headline-small text-neutral-strong-default w-max", n && 'bg-red-400/40 relative after:content-["TITLE"] after:absolute after:top-0 after:-translate-y-5 after:left-0 after:w-max after:h-full after:text-red-500 after:prometeo-fonts-label-large', a), children: r }));
129
+ s === "dialog" && "flex-1 min-h-max "
130
+ ), children: t }));
131
+ u.displayName = "DialogContent";
132
+ const g = j(({ children: t, className: n, debugMode: o }) => /* @__PURE__ */ e.jsx("h1", { className: p("prometeo-fonts-headline-small text-neutral-strong-default w-max", o && 'bg-red-400/40 relative after:content-["TITLE"] after:absolute after:top-0 after:-translate-y-5 after:left-0 after:w-max after:h-full after:text-red-500 after:prometeo-fonts-label-large', n), children: t }));
122
133
  g.displayName = "DialogTitle";
123
- const i = b(({ children: r, className: a, title: n, debugMode: o }) => /* @__PURE__ */ t.jsxs("div", { className: c(
134
+ const d = j(({ children: t, className: n, title: o, debugMode: s }) => /* @__PURE__ */ e.jsxs("div", { className: p(
124
135
  "p-4",
125
- o && "border-2 border-dashed border-red-600 bg-red-200/40! relative after:content-['HEADER'] after:absolute after:top-1 after:left-1/2 after:w-max after:h-full after:text-red-500",
126
- a
136
+ s && "border-2 border-dashed border-red-600 bg-red-200/40! relative after:content-['HEADER'] after:absolute after:top-1 after:left-1/2 after:w-max after:h-full after:text-red-500",
137
+ n
127
138
  ), children: [
128
- n && /* @__PURE__ */ t.jsx(g, { debugMode: o, children: n }),
129
- r
139
+ o && /* @__PURE__ */ e.jsx(g, { debugMode: s, children: o }),
140
+ t
130
141
  ] }));
131
- i.displayName = "DialogHeader";
132
- const m = b(({ children: r, className: a, debugMode: n }) => /* @__PURE__ */ t.jsx("div", { className: c(
133
- n && "border-2 border-dashed border-red-600 bg-red-200/40! relative after:content-['FOOTER'] after:absolute after:top-1 after:left-1/2 after:w-max after:h-full after:text-red-500",
142
+ d.displayName = "DialogHeader";
143
+ const h = j(({ children: t, className: n, debugMode: o }) => /* @__PURE__ */ e.jsx("div", { className: p(
144
+ o && "border-2 border-dashed border-red-600 bg-red-200/40! relative after:content-['FOOTER'] after:absolute after:top-1 after:left-1/2 after:w-max after:h-full after:text-red-500",
134
145
  "border-t border-neutral-strong-default p-4",
135
- a
136
- ), children: r }));
137
- m.displayName = "DialogFooter";
138
- const J = Object.assign(A, {
139
- Content: d,
140
- Header: i,
141
- Footer: m,
146
+ n
147
+ ), children: t }));
148
+ h.displayName = "DialogFooter";
149
+ const Y = Object.assign(V, {
150
+ Content: u,
151
+ Header: d,
152
+ Footer: h,
142
153
  Title: g
143
154
  });
144
- J.displayName = "DialogModal";
145
- const Y = () => {
146
- const r = R(null), a = p((l) => {
147
- r.current?.open(l);
148
- }, []), n = p(() => {
149
- r.current?.close();
150
- }, []), o = p(() => r.current?.isOpen ?? !1, []), y = p(() => r.current?.getContext() ?? null, []);
155
+ Y.displayName = "DialogModal";
156
+ const re = () => {
157
+ const t = F(null), n = x((a) => {
158
+ t.current?.open(a);
159
+ }, []), o = x(() => {
160
+ t.current?.close();
161
+ }, []), s = x(() => t.current?.isOpen ?? !1, []), v = x(() => t.current?.getContext() ?? null, []);
151
162
  return {
152
- ref: r,
153
- open: a,
154
- close: n,
155
- isOpen: o,
156
- getContext: y
163
+ ref: t,
164
+ open: n,
165
+ close: o,
166
+ isOpen: s,
167
+ getContext: v
157
168
  };
158
169
  };
159
170
  export {
160
- J as default,
161
- Y as useDialogControl
171
+ Y as default,
172
+ re as useDialogControl
162
173
  };
package/dist/Header.es.js CHANGED
@@ -1,34 +1,34 @@
1
- import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
- import { c as a } from "./cn-B6yFEsav.js";
3
- import { motion as n } from "framer-motion";
1
+ import { j as s } from "./jsx-runtime-DKDX3adD.js";
2
+ import { c as i } from "./cn-B6yFEsav.js";
3
+ import { motion as o } from "framer-motion";
4
4
  import { memo as f } from "react";
5
- const c = ({ title: e, subtitle: l, children: s, className: r, subtitleClassName: d, titleClassName: m, mainActionSlot: i }) => /* @__PURE__ */ t.jsxs(
6
- n.header,
5
+ const c = ({ title: e, subtitle: l, children: m, className: d, subtitleClassName: r, titleClassName: n, mainActionSlot: a, secondarySlot: t }) => /* @__PURE__ */ s.jsxs(
6
+ o.header,
7
7
  {
8
8
  initial: { opacity: 0, y: -10 },
9
9
  animate: { opacity: 1, y: 0 },
10
10
  transition: { duration: 0.6, ease: "easeOut" },
11
- className: a(
12
- "flex items-center sm:min-h-20 md:min-h-24 lg:min-h-28 xl:min-h-32 2xl:min-h-36 overflow-hidden px-4 md:px-4 py-2 md:py-3",
13
- "flex justify-between items-center w-full max-w-full overflow-hidden",
14
- r
11
+ className: i(
12
+ "flex md:flex-col gap-1 w-full max-w-full",
13
+ d
15
14
  ),
16
15
  children: [
17
- /* @__PURE__ */ t.jsxs("div", { className: a(
18
- "flex items-center md:items-start md:flex-col leading-6 h-full justify-center overflow-hidden",
19
- i && "justify-start gap-1 w-full"
20
- ), children: [
21
- i && /* @__PURE__ */ t.jsx("div", { className: "", children: typeof i == "function" ? i() : i }),
22
- /* @__PURE__ */ t.jsxs("div", { className: a("flex flex-col leading-6 justify-center relative overflow-hidden md:px-2 "), children: [
23
- l && /* @__PURE__ */ t.jsx("h3", { className: a(" prometeo-fonts-body-medium text-neutral-medium-default line-clamp-1 text-nowrap overflow-hidden text-ellipsis w-full", d), children: l }),
24
- e && /* @__PURE__ */ t.jsx("h1", { className: a("prometeo-fonts-headline-small text-neutral-strong-default line-clamp-1 text-nowrap overflow-hidden text-ellipsis w-full wrap-break-word", m), children: e })
25
- ] })
16
+ /* @__PURE__ */ s.jsxs("div", { className: "md:w-full min-h-12 md:px-3 flex justify-between", children: [
17
+ a && /* @__PURE__ */ s.jsx("div", { className: "", children: typeof a == "function" ? a() : a }),
18
+ t && /* @__PURE__ */ s.jsx("div", { className: "hidden md:flex", children: typeof t == "function" ? t() : t })
26
19
  ] }),
27
- s && /* @__PURE__ */ t.jsx("div", { className: "shrink relative", children: s })
20
+ /* @__PURE__ */ s.jsxs("div", { className: "w-full min-h-12 flex justify-between md:px-6", children: [
21
+ /* @__PURE__ */ s.jsxs("div", { className: i("flex flex-col leading-6 justify-center relative overflow-hidden"), children: [
22
+ l && /* @__PURE__ */ s.jsx("h3", { className: i(" prometeo-fonts-body-small md:prometeo-fonts-body-medium text-neutral-medium-default line-clamp-1 text-nowrap overflow-hidden text-ellipsis w-full", r), children: l }),
23
+ e && /* @__PURE__ */ s.jsx("h1", { className: i("prometeo-fonts-headline-xsmall md:prometeo-fonts-headline-small text-neutral-strong-default line-clamp-1 text-nowrap overflow-hidden text-ellipsis w-full wrap-break-word", n), children: e })
24
+ ] }),
25
+ m,
26
+ t && /* @__PURE__ */ s.jsx("div", { className: "md:hidden", children: typeof t == "function" ? t() : t })
27
+ ] })
28
28
  ]
29
29
  }
30
- ), o = f(c, (e, l) => e.title !== l.title || e.subtitle !== l.subtitle || e.className !== l.className ? !1 : e.children !== l.children ? !e.children && !l.children : !0);
31
- o.displayName = "Header";
30
+ ), x = f(c, (e, l) => e.title === l.title && e.subtitle === l.subtitle && e.className === l.className && e.subtitleClassName === l.subtitleClassName && e.titleClassName === l.titleClassName && e.mainActionSlot === l.mainActionSlot && e.secondarySlot === l.secondarySlot && e.children === l.children);
31
+ x.displayName = "Header";
32
32
  export {
33
- o as default
33
+ x as default
34
34
  };
@@ -1,9 +1,10 @@
1
- import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
- import { memo as C, useMemo as E } from "react";
3
- import R from "./Spinner.es.js";
4
- import { c as b } from "./index-BOQuZ0gG.js";
5
- import { c as f } from "./cn-B6yFEsav.js";
6
- const u = {
1
+ import { j as a } from "./jsx-runtime-DKDX3adD.js";
2
+ import { memo as A, useMemo as M, isValidElement as h } from "react";
3
+ import { i as v } from "./iconUtils-rTOfKDxE.js";
4
+ import T from "./Spinner.es.js";
5
+ import { c as I } from "./index-BOQuZ0gG.js";
6
+ import { c as y } from "./cn-B6yFEsav.js";
7
+ const g = {
7
8
  small: {
8
9
  container: "w-8 h-8 p-0 rounded-[6px]"
9
10
  },
@@ -100,7 +101,7 @@ const u = {
100
101
  icon: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused"
101
102
  }
102
103
  }
103
- }, a = {
104
+ }, c = {
104
105
  small: {
105
106
  container: "",
106
107
  icon: ""
@@ -113,29 +114,29 @@ const u = {
113
114
  container: "",
114
115
  icon: ""
115
116
  }
116
- }, h = {
117
+ }, V = {
117
118
  container: "flex justify-center items-center gap-1 w-max rounded-lg bg-transparent cursor-pointer transition-all ease-in-out duration-300 relative",
118
119
  icon: "w-max transition-all ease-in-out duration-300 flex justify-center items-center"
119
- }, p = {
120
+ }, w = {
120
121
  true: {
121
122
  container: "hover:scale-105 active:scale-95 disabled:scale-100"
122
123
  },
123
124
  false: {
124
125
  container: ""
125
126
  }
126
- }, g = {
127
+ }, j = {
127
128
  true: {
128
129
  icon: "group-hover:rotate-90 group-active:rotate-0 group-disabled:rotate-0"
129
130
  },
130
131
  false: {
131
132
  icon: ""
132
133
  }
133
- }, q = b(h.container, {
134
+ }, q = I(V.container, {
134
135
  variants: {
135
136
  size: {
136
- small: `${a.small.container} ${u.small.container}`,
137
- medium: `${a.medium.container} ${u.medium.container}`,
138
- large: `${a.large.container} ${u.large.container}`
137
+ small: `${c.small.container} ${g.small.container}`,
138
+ medium: `${c.medium.container} ${g.medium.container}`,
139
+ large: `${c.large.container} ${g.large.container}`
139
140
  },
140
141
  variant: {
141
142
  fill: "",
@@ -151,8 +152,8 @@ const u = {
151
152
  disabled: ""
152
153
  },
153
154
  animation: {
154
- true: p.true.container,
155
- false: p.false.container
155
+ true: w.true.container,
156
+ false: w.false.container
156
157
  }
157
158
  },
158
159
  compoundVariants: [
@@ -181,12 +182,12 @@ const u = {
181
182
  color: "primary",
182
183
  animation: !0
183
184
  }
184
- }), A = b(h.icon, {
185
+ }), f = I(V.icon, {
185
186
  variants: {
186
187
  size: {
187
- small: a.small.icon,
188
- medium: a.medium.icon,
189
- large: a.large.icon
188
+ small: c.small.icon,
189
+ medium: c.medium.icon,
190
+ large: c.large.icon
190
191
  },
191
192
  variant: {
192
193
  fill: "",
@@ -202,8 +203,8 @@ const u = {
202
203
  disabled: ""
203
204
  },
204
205
  animateIcon: {
205
- true: g.true.icon,
206
- false: g.false.icon
206
+ true: j.true.icon,
207
+ false: j.false.icon
207
208
  }
208
209
  },
209
210
  compoundVariants: [
@@ -232,75 +233,121 @@ const u = {
232
233
  color: "primary",
233
234
  animateIcon: !0
234
235
  }
235
- }), M = ({
236
- onClick: x,
237
- icon: y,
238
- contentClassName: n,
239
- animate: w = !1,
240
- animateIcon: j = !1,
241
- isLoading: t = !1,
242
- children: V,
243
- hideSpinner: d = !1,
244
- spinner: v = /* @__PURE__ */ r.jsx(R, { size: "small", variant: "clip", color: "var(--neutral-600)", className: "size-4 " }),
245
- type: I,
246
- className: $,
247
- disabled: o,
236
+ }), D = ({
237
+ onClick: $,
238
+ icon: d,
239
+ contentClassName: p,
240
+ animate: N = !1,
241
+ animateIcon: k = !1,
242
+ isLoading: n = !1,
243
+ children: r,
244
+ hideSpinner: b = !1,
245
+ spinner: x = /* @__PURE__ */ a.jsx(T, { size: "small", variant: "clip", color: "var(--neutral-600)", className: "size-4 " }),
246
+ type: S,
247
+ className: z,
248
+ disabled: m,
248
249
  variant: i = "fill",
249
- form: k,
250
- size: l = "medium",
251
- color: z = "primary"
250
+ form: B,
251
+ size: s = "medium",
252
+ color: C = "primary"
252
253
  }) => {
253
- const s = V || y;
254
- if (!s)
255
- throw new Error('IconButton: Se requiere un icon (prop "icon" o "children")');
256
- const m = !!(j && !o && !t), S = !!(w && !o && !t), c = o || t ? "disabled" : z, N = E(() => {
257
- if (t)
258
- return /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center", children: !d && v });
259
- const B = s;
260
- return /* @__PURE__ */ r.jsx("div", { className: f("flex items-center justify-center select-none", n), children: /* @__PURE__ */ r.jsx(
261
- "span",
262
- {
263
- className: A({
264
- size: l,
265
- variant: i,
266
- color: c,
267
- animateIcon: m
268
- }),
269
- children: /* @__PURE__ */ r.jsx(B, {})
270
- }
271
- ) });
254
+ const u = !!(k && !m && !n), E = !!(N && !m && !n), l = m || n ? "disabled" : C, R = M(() => {
255
+ if (n)
256
+ return /* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-center", children: !b && x });
257
+ let t = null;
258
+ if (console.log(typeof r), r)
259
+ if (h(r))
260
+ v(r.type) ? t = t = /* @__PURE__ */ a.jsx(
261
+ "span",
262
+ {
263
+ className: f({
264
+ size: s,
265
+ variant: i,
266
+ color: l,
267
+ animateIcon: u
268
+ }),
269
+ children: r
270
+ }
271
+ ) : t = r;
272
+ else if (typeof r == "function")
273
+ try {
274
+ const o = r();
275
+ h(o) && (v(o.type) ? t = /* @__PURE__ */ a.jsx(
276
+ "span",
277
+ {
278
+ className: f({
279
+ size: s,
280
+ variant: i,
281
+ color: l,
282
+ animateIcon: u
283
+ }),
284
+ children: o
285
+ }
286
+ ) : t = o);
287
+ } catch {
288
+ t = null;
289
+ }
290
+ else typeof r == "object" && (v(r) ? t = /* @__PURE__ */ a.jsx(
291
+ "span",
292
+ {
293
+ className: f({
294
+ size: s,
295
+ variant: i,
296
+ color: l,
297
+ animateIcon: u
298
+ }),
299
+ children: r
300
+ }
301
+ ) : t = r);
302
+ else if (d && v(d)) {
303
+ const o = d;
304
+ t = /* @__PURE__ */ a.jsx(
305
+ "span",
306
+ {
307
+ className: f({
308
+ size: s,
309
+ variant: i,
310
+ color: l,
311
+ animateIcon: u
312
+ }),
313
+ children: /* @__PURE__ */ a.jsx(o, {})
314
+ }
315
+ );
316
+ }
317
+ return t ? /* @__PURE__ */ a.jsx("div", { className: y("flex items-center justify-center select-none", p), children: t }) : null;
272
318
  }, [
273
- n,
274
- s,
319
+ p,
320
+ r,
321
+ d,
275
322
  i,
323
+ s,
276
324
  l,
277
- c,
278
- t,
279
- d,
280
- v,
281
- m
325
+ n,
326
+ b,
327
+ x,
328
+ u
282
329
  ]);
283
- return /* @__PURE__ */ r.jsx(
330
+ return /* @__PURE__ */ a.jsx(
284
331
  "button",
285
332
  {
286
- type: I,
287
- className: f(
333
+ type: S,
334
+ className: y(
288
335
  "group",
289
336
  q({
290
- size: l,
337
+ size: s,
291
338
  variant: i,
292
- color: c,
293
- animation: S
339
+ color: l,
340
+ animation: E
294
341
  }),
295
- $
342
+ z
296
343
  ),
297
- disabled: o || t,
298
- form: k,
299
- onClick: x,
300
- children: /* @__PURE__ */ r.jsx("div", { className: `flex items-center gap-1 ${n}`, children: N })
344
+ disabled: m || n,
345
+ form: B,
346
+ onClick: $,
347
+ children: /* @__PURE__ */ a.jsx("div", { className: `flex items-center gap-1 ${p}`, children: R })
301
348
  }
302
349
  );
303
- }, J = C(M);
350
+ }, P = A(D);
304
351
  export {
305
- J as default
352
+ P as default
306
353
  };
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "../jsx-runtime-DKDX3adD.js";
2
- import { m as o } from "../iconUtils-D0lVAgGT.js";
2
+ import { m as o } from "../iconUtils-rTOfKDxE.js";
3
3
  const e = o(
4
4
  ({ size: q = 24, className: T, ...m }) => /* @__PURE__ */ t.jsx(
5
5
  "svg",
@@ -1,5 +1,5 @@
1
1
  import { j as o } from "../jsx-runtime-DKDX3adD.js";
2
- import { m as s } from "../iconUtils-D0lVAgGT.js";
2
+ import { m as s } from "../iconUtils-rTOfKDxE.js";
3
3
  const e = s(({ size: t = 24, className: r, ...h }) => /* @__PURE__ */ o.jsx(
4
4
  "svg",
5
5
  {