prometeo-design-system 2.6.2 → 2.6.3
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/DatePicker.es.js +1 -1
- package/dist/DialogModal.es.js +1 -1
- package/dist/{Input-r2N9xkjM.js → Input-BsGk4qj1.js} +27 -27
- package/dist/Input.es.js +1 -1
- package/dist/InputFormikV2.es.js +1 -1
- package/dist/Select-CSFKGhU7.js +812 -0
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectSearch.es.js +49 -45
- package/dist/components/Dialog/DialogV2.d.ts +35 -0
- package/dist/components/Select/Select.d.ts +16 -9
- package/dist/components/SelectSearch/SelectSearch.d.ts +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/pages/DialogPage.d.ts +2 -0
- package/dist/preview/DialogModalPreview.d.ts +2 -0
- package/dist/preview/SelectPreview/CustomFooterExample.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +56 -58
- package/package.json +1 -1
- package/dist/Select-IAQKEfnq.js +0 -798
- /package/dist/preview/{SelectPreview.d.ts → SelectPreview/SelectPreview.d.ts} +0 -0
|
@@ -7,20 +7,20 @@ import { default as De, useDialogControl as Ee } from "./DialogModal.es.js";
|
|
|
7
7
|
import { default as Fe, useDrawerDesktop as He } from "./DrawerDesktop.es.js";
|
|
8
8
|
import { default as $e, useDrawerMobile as Me } from "./DrawerMobile.es.js";
|
|
9
9
|
import { default as Ve } from "./Header.es.js";
|
|
10
|
-
import { I as _e } from "./Input-
|
|
10
|
+
import { I as _e } from "./Input-BsGk4qj1.js";
|
|
11
11
|
import { default as Ze } from "./InputFormik.es.js";
|
|
12
12
|
import { InputMultiple as Ke } from "./InputMultiple.es.js";
|
|
13
13
|
import { default as Ye } from "./Logo.es.js";
|
|
14
14
|
import { Menu as tt } from "./Menu.es.js";
|
|
15
15
|
import { default as rt } from "./Pagination.es.js";
|
|
16
16
|
import { ProfilePictureUpload as nt } from "./ProfilePictureUpload.es.js";
|
|
17
|
-
import { default as
|
|
18
|
-
import { S as ct } from "./Select-
|
|
17
|
+
import { default as st } from "./ProgressBar.es.js";
|
|
18
|
+
import { S as ct } from "./Select-CSFKGhU7.js";
|
|
19
19
|
import { default as dt } from "./SelectFormikLegacy.es.js";
|
|
20
20
|
import { default as mt } from "./SelectFormik.es.js";
|
|
21
21
|
import { default as xt } from "./Spinner.es.js";
|
|
22
|
-
import { Steps as
|
|
23
|
-
import { default as
|
|
22
|
+
import { Steps as vt } from "./Steps.es.js";
|
|
23
|
+
import { default as gt } from "./SwipeContainer.es.js";
|
|
24
24
|
import { Switch as wt } from "./Switch.es.js";
|
|
25
25
|
import { default as Nt } from "./DatePicker.es.js";
|
|
26
26
|
import { Table as St, TableBody as kt, TableCaption as It, TableCell as Bt, TableFooter as Rt, TableHead as Lt, TableHeader as Tt, TableRow as At } from "./Table.es.js";
|
|
@@ -37,12 +37,12 @@ import { default as Kt, toastpyrion as Qt } from "./Toast.es.js";
|
|
|
37
37
|
import { default as ea } from "./ToastProvider.es.js";
|
|
38
38
|
import { default as aa } from "./SelectSearch.es.js";
|
|
39
39
|
import { default as oa } from "./FAButton.es.js";
|
|
40
|
-
import { default as
|
|
40
|
+
import { default as ia } from "./InputFormikV2.es.js";
|
|
41
41
|
import { RadioButtonFormik as la } from "./RadioButtonFormik.es.js";
|
|
42
42
|
import { RadioButton as ua } from "./RadioButton.es.js";
|
|
43
43
|
import { j as a } from "./jsx-runtime-ByW6EXIE.js";
|
|
44
44
|
import { c as u } from "./cn-B6yFEsav.js";
|
|
45
|
-
import A, { useRef as
|
|
45
|
+
import A, { useRef as y, useState as g, useLayoutEffect as P, createContext as q, useContext as z, forwardRef as C, useEffect as h, useCallback as D } from "react";
|
|
46
46
|
import { useGSAP as I } from "@gsap/react";
|
|
47
47
|
import x from "gsap";
|
|
48
48
|
import { Icons as w } from "./Icons.es.js";
|
|
@@ -110,19 +110,19 @@ const O = (t, e) => {
|
|
|
110
110
|
className: r = "",
|
|
111
111
|
width: n = "w-96",
|
|
112
112
|
action: o,
|
|
113
|
-
primarySidebarCollapsed:
|
|
113
|
+
primarySidebarCollapsed: s,
|
|
114
114
|
onClose: l
|
|
115
115
|
}) => {
|
|
116
|
-
const c =
|
|
116
|
+
const c = y(null), [d, i] = g({ left: 0, width: 0 }), { primarySidebarRef: f, tabBarRef: m } = k();
|
|
117
117
|
return P(() => {
|
|
118
118
|
if (f?.current && m?.current) {
|
|
119
119
|
const p = f.current.getBoundingClientRect();
|
|
120
|
-
|
|
120
|
+
i({
|
|
121
121
|
left: p.width + m.current.offsetWidth,
|
|
122
122
|
width: p.width
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
}, [f, e,
|
|
125
|
+
}, [f, e, s, m]), O(c, e), /* @__PURE__ */ a.jsx(a.Fragment, { children: e && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
126
126
|
/* @__PURE__ */ a.jsx(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
@@ -167,14 +167,14 @@ const O = (t, e) => {
|
|
|
167
167
|
}, M = ({
|
|
168
168
|
children: t
|
|
169
169
|
}) => {
|
|
170
|
-
const [e, r] =
|
|
170
|
+
const [e, r] = g(!1), [n, o] = g(!1), s = y(null), l = () => {
|
|
171
171
|
r(!1), o(!1);
|
|
172
172
|
}, c = () => {
|
|
173
173
|
r(!0), o(!1);
|
|
174
174
|
}, p = {
|
|
175
175
|
isCollapsed: e,
|
|
176
176
|
setIsCollapsed: r,
|
|
177
|
-
navbarRef:
|
|
177
|
+
navbarRef: s,
|
|
178
178
|
toggleCollapse: () => {
|
|
179
179
|
e ? l() : c();
|
|
180
180
|
},
|
|
@@ -186,7 +186,7 @@ const O = (t, e) => {
|
|
|
186
186
|
o(!1);
|
|
187
187
|
},
|
|
188
188
|
toggleSecondaryBar: () => {
|
|
189
|
-
o((
|
|
189
|
+
o((v) => !v);
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
192
|
return /* @__PURE__ */ a.jsx(R.Provider, { value: p, children: t });
|
|
@@ -511,11 +511,11 @@ const O = (t, e) => {
|
|
|
511
511
|
ease: "power2.in"
|
|
512
512
|
});
|
|
513
513
|
}, X = C((t, e) => {
|
|
514
|
-
const [r, n] =
|
|
514
|
+
const [r, n] = g(t?.currentTabName || t.tabs[0].name), o = y(null), { tabs: s = [], className: l, activeColor: c = "var(--neutral-900)" } = t;
|
|
515
515
|
h(() => {
|
|
516
516
|
o.current?.style.setProperty("--tab-bg", c);
|
|
517
517
|
}, [c]);
|
|
518
|
-
const d =
|
|
518
|
+
const d = s.find((i) => i.name === (t?.currentTabName || r));
|
|
519
519
|
return /* @__PURE__ */ a.jsx(
|
|
520
520
|
"div",
|
|
521
521
|
{
|
|
@@ -527,10 +527,10 @@ const O = (t, e) => {
|
|
|
527
527
|
" border-r-[1px] border-neutral-default-default",
|
|
528
528
|
l
|
|
529
529
|
),
|
|
530
|
-
children:
|
|
531
|
-
(
|
|
532
|
-
const f =
|
|
533
|
-
|
|
530
|
+
children: s.map(
|
|
531
|
+
(i) => {
|
|
532
|
+
const f = i.name === d?.name, m = typeof i.thumbnail == "string" ? /* @__PURE__ */ a.jsx("img", { src: i.thumbnail, alt: i.description, className: "aspect-square object-contain" }) : i.thumbnail, p = () => {
|
|
533
|
+
i.disabled || (n(i.name), i.onClick && i.onClick(i.name));
|
|
534
534
|
};
|
|
535
535
|
return /* @__PURE__ */ a.jsx(
|
|
536
536
|
"div",
|
|
@@ -550,27 +550,25 @@ const O = (t, e) => {
|
|
|
550
550
|
"grid place-items-center",
|
|
551
551
|
"tab-thumbnail-icon",
|
|
552
552
|
"bg-transparent text-neutral-default-default",
|
|
553
|
-
|
|
553
|
+
i?.className
|
|
554
554
|
), children: m })
|
|
555
555
|
},
|
|
556
|
-
|
|
556
|
+
i.name
|
|
557
557
|
);
|
|
558
558
|
}
|
|
559
559
|
)
|
|
560
560
|
}
|
|
561
561
|
);
|
|
562
562
|
}), Z = C(
|
|
563
|
-
({ children: t, isCollapsed: e = !1, className: r = "", tabs: n = [], currentTabName: o },
|
|
564
|
-
const l =
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
l.current = m, typeof i == "function" ? (console.log("soy ref function"), i(m)) : i && (console.log("estoy entrand aca"), i.current = m);
|
|
568
|
-
}, [i]);
|
|
563
|
+
({ children: t, isCollapsed: e = !1, className: r = "", tabs: n = [], currentTabName: o }, s) => {
|
|
564
|
+
const l = y(null), c = y(null), { registerPrimarySidebar: d, registerTabBar: i } = k(), f = D((m) => {
|
|
565
|
+
l.current = m, typeof s == "function" ? s(m) : s && (s.current = m);
|
|
566
|
+
}, [s]);
|
|
569
567
|
return h(() => {
|
|
570
568
|
l.current && d(l);
|
|
571
569
|
}, [d]), h(() => {
|
|
572
|
-
c.current &&
|
|
573
|
-
}, [
|
|
570
|
+
c.current && i(c);
|
|
571
|
+
}, [i]), U(l, e, !1), /* @__PURE__ */ a.jsxs(
|
|
574
572
|
"div",
|
|
575
573
|
{
|
|
576
574
|
className: u(
|
|
@@ -641,7 +639,7 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
641
639
|
label: r,
|
|
642
640
|
href: n,
|
|
643
641
|
onClick: o,
|
|
644
|
-
isActive:
|
|
642
|
+
isActive: s = !1,
|
|
645
643
|
className: l
|
|
646
644
|
}) => {
|
|
647
645
|
const c = n ? "a" : "button";
|
|
@@ -655,7 +653,7 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
655
653
|
"flex items-center w-full px-3 py-2 text-left",
|
|
656
654
|
"hover:bg-neutral-medium-default transition-colors rounded-lg",
|
|
657
655
|
"focus:outline-none focus:ring-2 focus:ring-primary-default-default",
|
|
658
|
-
|
|
656
|
+
s && "bg-neutral-medium-default",
|
|
659
657
|
l
|
|
660
658
|
),
|
|
661
659
|
children: [
|
|
@@ -671,15 +669,15 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
671
669
|
className: r = "",
|
|
672
670
|
size: n = "medium",
|
|
673
671
|
variant: o = "primary",
|
|
674
|
-
showZero:
|
|
672
|
+
showZero: s = !1
|
|
675
673
|
}) => {
|
|
676
674
|
const l = t, c = l > e ? `+${e}` : l;
|
|
677
|
-
if (l === 0 && !
|
|
675
|
+
if (l === 0 && !s) return null;
|
|
678
676
|
const d = {
|
|
679
677
|
small: "w-4.5 h-4.5 text-xs ",
|
|
680
678
|
medium: "w-5 h-5 text-xs",
|
|
681
679
|
large: "w-6 h-6 text-sm"
|
|
682
|
-
},
|
|
680
|
+
}, i = {
|
|
683
681
|
primary: "bg-primary-default-default text-neutral-strong-default",
|
|
684
682
|
secondary: "bg-neutral-medium-default text-neutral-strong-default",
|
|
685
683
|
success: "bg-green-500 text-white",
|
|
@@ -689,7 +687,7 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
689
687
|
return /* @__PURE__ */ a.jsx("div", { className: u(
|
|
690
688
|
"rounded-full flex items-center justify-center font-medium ",
|
|
691
689
|
d[n],
|
|
692
|
-
|
|
690
|
+
i[o],
|
|
693
691
|
r
|
|
694
692
|
), children: /* @__PURE__ */ a.jsx("span", { children: c }) });
|
|
695
693
|
}, xe = ({
|
|
@@ -697,7 +695,7 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
697
695
|
onClick: e,
|
|
698
696
|
activeAction: r
|
|
699
697
|
}) => /* @__PURE__ */ a.jsx("nav", { className: "flex flex-col gap-1", children: t?.map((n, o) => {
|
|
700
|
-
const { isView:
|
|
698
|
+
const { isView: s = !1, actionName: l, title: c, icon: d, count: i, viewAccess: f } = n || {}, m = (typeof s == "function" ? s() : s !== !1) && (!f || f()), p = r === l;
|
|
701
699
|
return m && /* @__PURE__ */ a.jsx(
|
|
702
700
|
b.div,
|
|
703
701
|
{
|
|
@@ -772,7 +770,7 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
772
770
|
),
|
|
773
771
|
/* @__PURE__ */ a.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: c })
|
|
774
772
|
] }),
|
|
775
|
-
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children:
|
|
773
|
+
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: i && i >= 1 ? /* @__PURE__ */ a.jsx(L, { count: i, maxCount: 9, className: "" }) : "" })
|
|
776
774
|
]
|
|
777
775
|
}
|
|
778
776
|
)
|
|
@@ -787,7 +785,7 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
787
785
|
isLinkActive: e,
|
|
788
786
|
onLinkClick: r
|
|
789
787
|
}) => /* @__PURE__ */ a.jsx("nav", { className: "flex flex-col gap-1", children: t?.map((n, o) => {
|
|
790
|
-
const { isView:
|
|
788
|
+
const { isView: s = !1, viewAccess: l, path: c, title: d, icon: i, count: f, relatedPaths: m } = n, p = (typeof s == "function" ? s() : s !== !1) && (!l || l()), v = e(c) || (m?.some(
|
|
791
789
|
(T) => e(T)
|
|
792
790
|
) ?? !1);
|
|
793
791
|
return p && /* @__PURE__ */ a.jsx(
|
|
@@ -811,10 +809,10 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
811
809
|
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
812
810
|
"transition-all duration-300 ease-out w-full",
|
|
813
811
|
"group hover:bg-neutral-medium-selected",
|
|
814
|
-
|
|
812
|
+
v ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
815
813
|
),
|
|
816
814
|
children: [
|
|
817
|
-
/* @__PURE__ */ a.jsx(B, { mode: "wait", children:
|
|
815
|
+
/* @__PURE__ */ a.jsx(B, { mode: "wait", children: v && /* @__PURE__ */ a.jsx(
|
|
818
816
|
b.div,
|
|
819
817
|
{
|
|
820
818
|
layoutId: "nav-active-bg",
|
|
@@ -847,17 +845,17 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
847
845
|
{
|
|
848
846
|
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
849
847
|
animate: {
|
|
850
|
-
scale:
|
|
848
|
+
scale: v ? 1.05 : 1
|
|
851
849
|
},
|
|
852
850
|
transition: {
|
|
853
851
|
duration: 0.25,
|
|
854
852
|
ease: "easeOut"
|
|
855
853
|
},
|
|
856
|
-
children: typeof
|
|
854
|
+
children: typeof i == "function" ? i({
|
|
857
855
|
size: 24,
|
|
858
856
|
className: u(
|
|
859
857
|
"nav-icon transition-colors duration-250 ease-out",
|
|
860
|
-
|
|
858
|
+
v ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
861
859
|
)
|
|
862
860
|
}) : null
|
|
863
861
|
}
|
|
@@ -874,18 +872,18 @@ const J = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
874
872
|
},
|
|
875
873
|
o
|
|
876
874
|
);
|
|
877
|
-
}) }),
|
|
875
|
+
}) }), ve = ({
|
|
878
876
|
isActiveModalNotification: t,
|
|
879
877
|
setIsActiveModalNotification: e
|
|
880
878
|
}) => ({ handleNotificationClick: () => {
|
|
881
879
|
e(!0);
|
|
882
|
-
}, isActiveModalNotification: t }),
|
|
883
|
-
const e =
|
|
880
|
+
}, isActiveModalNotification: t }), ye = (t) => {
|
|
881
|
+
const e = y(null);
|
|
884
882
|
return {
|
|
885
883
|
isCollapsed: t,
|
|
886
884
|
navbarRef: e
|
|
887
885
|
};
|
|
888
|
-
},
|
|
886
|
+
}, ge = ({
|
|
889
887
|
isCollapsed: t,
|
|
890
888
|
onToggle: e
|
|
891
889
|
}) => /* @__PURE__ */ a.jsx("div", { className: "", children: /* @__PURE__ */ a.jsx(
|
|
@@ -911,8 +909,8 @@ function we({
|
|
|
911
909
|
...r
|
|
912
910
|
}) {
|
|
913
911
|
const n = A.useCallback(
|
|
914
|
-
(
|
|
915
|
-
|
|
912
|
+
(s, l) => {
|
|
913
|
+
s.length > 0 && t?.(s), l.length > 0 && e?.(l);
|
|
916
914
|
},
|
|
917
915
|
[t, e]
|
|
918
916
|
), o = E({
|
|
@@ -925,7 +923,7 @@ function we({
|
|
|
925
923
|
};
|
|
926
924
|
}
|
|
927
925
|
const je = (t, e = !0) => {
|
|
928
|
-
const r =
|
|
926
|
+
const r = y(null);
|
|
929
927
|
return h(() => {
|
|
930
928
|
if (!e) return;
|
|
931
929
|
const n = (o) => {
|
|
@@ -965,19 +963,19 @@ export {
|
|
|
965
963
|
_t as ImageGallery,
|
|
966
964
|
_e as Input,
|
|
967
965
|
Ze as InputFormik,
|
|
968
|
-
|
|
966
|
+
ia as InputFormikV2,
|
|
969
967
|
Ke as InputMultiple,
|
|
970
968
|
Ut as LayoutGeneric,
|
|
971
969
|
Ye as Logo,
|
|
972
970
|
tt as Menu,
|
|
973
971
|
xe as NavBarActions,
|
|
974
|
-
|
|
972
|
+
ge as NavbarCollapseButton,
|
|
975
973
|
be as NavbarLinks,
|
|
976
974
|
pe as NavigationLink,
|
|
977
975
|
fa as OtpInput,
|
|
978
976
|
rt as Pagination,
|
|
979
977
|
nt as ProfilePictureUpload,
|
|
980
|
-
|
|
978
|
+
st as ProgressBar,
|
|
981
979
|
ua as RadioButton,
|
|
982
980
|
la as RadioButtonFormik,
|
|
983
981
|
de as SecondaryBar,
|
|
@@ -991,8 +989,8 @@ export {
|
|
|
991
989
|
Vt as SidebarRefProvider,
|
|
992
990
|
Ht as Skeleton,
|
|
993
991
|
xt as Spinner,
|
|
994
|
-
|
|
995
|
-
|
|
992
|
+
vt as Steps,
|
|
993
|
+
gt as SwipeContainer,
|
|
996
994
|
wt as Switch,
|
|
997
995
|
qt as TabLinks,
|
|
998
996
|
St as Table,
|
|
@@ -1008,14 +1006,14 @@ export {
|
|
|
1008
1006
|
ea as ToastProvider,
|
|
1009
1007
|
Ot as Tooltip,
|
|
1010
1008
|
Qt as toastpyrion,
|
|
1011
|
-
|
|
1009
|
+
ve as useActionsNavbar,
|
|
1012
1010
|
je as useClickOutside,
|
|
1013
1011
|
Ee as useDialogControl,
|
|
1014
1012
|
He as useDrawerDesktop,
|
|
1015
1013
|
Me as useDrawerMobile,
|
|
1016
1014
|
we as useFileDropzone,
|
|
1017
1015
|
pa as useIsMobile,
|
|
1018
|
-
|
|
1016
|
+
ye as useNavbarCollapse,
|
|
1019
1017
|
fe as useSidebar,
|
|
1020
1018
|
k as useSidebarContext
|
|
1021
1019
|
};
|