prometeo-design-system 3.1.3 → 3.1.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/dist/Avatar.es.js +42 -36
- package/dist/Button.es.js +27 -27
- package/dist/{CardProfile-BVO6fKr9.js → CardProfile-y9Knsg26.js} +23 -23
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/DatePicker-CehTiXGa.js +3631 -0
- package/dist/DatePicker.es.js +1 -1
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +78 -72
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/FAButton.es.js +1 -1
- package/dist/Header.es.js +4 -4
- package/dist/{HelperComponent-DhGU_ug-.js → HelperComponent-ljsn0xD6.js} +1 -1
- package/dist/Icons/AccountCircle.es.js +1 -1
- package/dist/Icons/Add.es.js +1 -1
- package/dist/Icons/ArrowLeft.es.js +1 -1
- package/dist/Icons/ArrowUpDown.es.js +1 -1
- package/dist/Icons/AttachFile.es.js +1 -1
- package/dist/Icons/Boards.es.js +1 -1
- package/dist/Icons/Calendar.es.js +1 -1
- package/dist/Icons/Cancel.es.js +1 -1
- package/dist/Icons/Check.es.js +1 -1
- package/dist/Icons/CheckCircle.es.js +1 -1
- package/dist/Icons/CheckList.es.js +1 -1
- package/dist/Icons/ChevronDown.es.js +1 -1
- package/dist/Icons/Clock.es.js +1 -1
- package/dist/Icons/Close.es.js +1 -1
- package/dist/Icons/CloseNavBarDesktop.es.js +1 -1
- package/dist/Icons/Collapse.es.js +1 -1
- package/dist/Icons/Company.es.js +1 -1
- package/dist/Icons/Copy.es.js +1 -1
- package/dist/Icons/CrevronLeft.es.js +1 -1
- package/dist/Icons/CrevronRight.es.js +1 -1
- package/dist/Icons/DocumentFill.es.js +1 -1
- package/dist/Icons/Download.es.js +1 -1
- package/dist/Icons/Edit.es.js +1 -1
- package/dist/Icons/EditFill.es.js +1 -1
- package/dist/Icons/Email.es.js +1 -1
- package/dist/Icons/Error.es.js +1 -1
- package/dist/Icons/EyeVisibility.es.js +1 -1
- package/dist/Icons/EyeVisibilityOff.es.js +1 -1
- package/dist/Icons/FaLock.es.js +1 -1
- package/dist/Icons/FastForward.es.js +1 -1
- package/dist/Icons/File.es.js +1 -1
- package/dist/Icons/Filter.es.js +1 -1
- package/dist/Icons/FormatColorText.es.js +1 -1
- package/dist/Icons/Help.es.js +1 -1
- package/dist/Icons/HistoryActivity.es.js +1 -1
- package/dist/Icons/Home.es.js +1 -1
- package/dist/Icons/Image.es.js +1 -1
- package/dist/Icons/Info.es.js +1 -1
- package/dist/Icons/Logout.es.js +1 -1
- package/dist/Icons/MessageSquare.es.js +1 -1
- package/dist/Icons/MessageSquareFill.es.js +1 -1
- package/dist/Icons/MoreVert.es.js +1 -1
- package/dist/Icons/Notifications.es.js +1 -1
- package/dist/Icons/Pause.es.js +1 -1
- package/dist/Icons/Reload.es.js +1 -1
- package/dist/Icons/Search.es.js +1 -1
- package/dist/Icons/Settings.es.js +1 -1
- package/dist/Icons/Shared.es.js +1 -1
- package/dist/Icons/Sort.es.js +1 -1
- package/dist/Icons/Stars.es.js +1 -1
- package/dist/Icons/Ticket.es.js +1 -1
- package/dist/Icons/TicketFilled.es.js +1 -1
- package/dist/Icons/Trash.es.js +1 -1
- package/dist/Icons/TrashFill.es.js +1 -1
- package/dist/Icons/Upload.es.js +1 -1
- package/dist/Icons/UploadCloud.es.js +1 -1
- package/dist/Icons/UserAdd.es.js +1 -1
- package/dist/Icons/UserAddFill.es.js +1 -1
- package/dist/Icons/UserPerson.es.js +1 -1
- package/dist/Icons/WhatsApp.es.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/{ImageGallery-4DdXqwRy.js → ImageGallery-DG9ovlQ-.js} +1 -1
- package/dist/ImageGallery.es.js +1 -1
- package/dist/Input.es.js +218 -2
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-CbaoatQB.js → LayoutGeneric-CfWhV1ov.js} +6 -6
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +1 -1
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/RadioButton.es.js +2 -2
- package/dist/RecurrentDatePicker.es.js +7 -7
- package/dist/RecurrentDatePickerRRule.es.js +2 -4
- package/dist/Scrollable.d.ts +2 -0
- package/dist/Scrollable.es.js +260 -0
- package/dist/SegmentedButton.es.js +1 -1
- package/dist/{Select-Bq1fVlwM.js → Select-BdxmkrjB.js} +12 -11
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +2 -2
- package/dist/Skeleton.es.js +1 -1
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.es.js +7 -7
- package/dist/TabLinks.es.js +9 -9
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Toast.es.js +1 -1
- package/dist/ToastProvider.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Drawer/DrawerDesktop.d.ts +1 -0
- package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +18 -2
- package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +3 -1
- package/dist/components/NavigationDrawer/NavigationDrawerItemBase.d.ts +1 -0
- package/dist/components/NavigationDrawer/NavigationDrawerLinkItem.d.ts +1 -0
- package/dist/components/NotificationCard/NotificationCard.d.ts +25 -0
- package/dist/components/PyrionNavigationDrawer/PyrionHelpSection.d.ts +8 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawer.d.ts +90 -11
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerMobileAppSwitcher.d.ts +10 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerSystemLogo.d.ts +7 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNotificationsList.d.ts +8 -0
- package/dist/components/PyrionNavigationDrawer/SidebarContent.d.ts +13 -0
- package/dist/components/PyrionNavigationDrawer/SystemSessions.d.ts +12 -0
- package/dist/components/Scrollable/Scrollable.d.ts +9 -3
- package/dist/components/Sidebar/components/badge.d.ts +2 -1
- package/dist/components/TicketCard/TicketCard.d.ts +32 -0
- package/dist/components/UserCard/UserCard.d.ts +12 -0
- package/dist/exports/Scrollable.d.ts +2 -0
- package/dist/hooks/useLabelBackground.d.ts +1 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-GkKLlHH4.js} +2 -20
- package/dist/lib/utils.d.ts +2 -2
- package/dist/prometeo-design-system.es.js +54 -51
- package/dist/styles.css +1 -1
- package/dist/useLabelBackground-BDIHUdND.js +26 -0
- package/package.json +9 -5
- package/src/styles/base.css +25 -0
- package/src/styles/palette.css +3 -0
- package/dist/DatePicker-D1EwMGIN.js +0 -3568
- package/dist/Input-EkMrxcNX.js +0 -241
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { j as h } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { useIsMobile as et } from "./useDevice.es.js";
|
|
3
|
+
import { g as rt } from "./useLabelBackground-BDIHUdND.js";
|
|
4
|
+
import { c as m } from "./cn-B6yFEsav.js";
|
|
5
|
+
import { c as C } from "./index-BOQuZ0gG.js";
|
|
6
|
+
import U, { useRef as i, useEffect as V } from "react";
|
|
7
|
+
import { CrevronLeft as ot } from "./Icons/CrevronLeft.es.js";
|
|
8
|
+
const _ = C(
|
|
9
|
+
"",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
axis: {
|
|
13
|
+
x: " overflow-x-auto overflow-y-hidden",
|
|
14
|
+
y: " overflow-y-auto overflow-x-hidden",
|
|
15
|
+
both: " overflow-auto"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
), $ = C("", {
|
|
20
|
+
variants: {
|
|
21
|
+
position: {
|
|
22
|
+
top: "",
|
|
23
|
+
bottom: "",
|
|
24
|
+
left: "",
|
|
25
|
+
right: ""
|
|
26
|
+
},
|
|
27
|
+
type: {
|
|
28
|
+
icon: " absolute z-100 rounded-full hover:scale-125 transition-all duration-300 ease-in-out shadow-xs rounded-full shadow-white/10 text-neutral-default-pressed",
|
|
29
|
+
shadow: "absolute z-100 transition-all duration-400 ease-in-out"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
compoundVariants: [
|
|
33
|
+
{ type: "icon", position: "top", className: "rotate-90 top-0 left-1/2 -translate-x-1/2 -translate-y-1/2" },
|
|
34
|
+
{ type: "icon", position: "bottom", className: "rotate-270 bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2" },
|
|
35
|
+
{ type: "icon", position: "left", className: "top-1/2 -translate-y-1/2 -translate-x-1/2" },
|
|
36
|
+
{ type: "icon", position: "right", className: "rotate-180 right-0 top-1/2 -translate-y-1/2 translate-x-1/2" },
|
|
37
|
+
{ type: "shadow", position: "top", className: "top-0 left-0 w-full h-14" },
|
|
38
|
+
{ type: "shadow", position: "bottom", className: "bottom-0 left-0 w-full h-14 rotate-180" },
|
|
39
|
+
{ type: "shadow", position: "left", className: "left-0 top-0 h-full w-5" },
|
|
40
|
+
{ type: "shadow", position: "right", className: "right-0 top-0 h-full w-5 rotate-180" }
|
|
41
|
+
]
|
|
42
|
+
}), st = C("", {
|
|
43
|
+
variants: {
|
|
44
|
+
hide: {
|
|
45
|
+
true: " prometeo-scrollbar-none",
|
|
46
|
+
false: ""
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
small: "prometeo-scrollbar-thin",
|
|
50
|
+
medium: ""
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}), ht = (I) => {
|
|
54
|
+
const { defaultBehavior: y = "scroll-on-click" } = I, F = et(), P = {
|
|
55
|
+
top: { show: !0, type: "shadow", behavior: y },
|
|
56
|
+
bottom: { show: !0, type: "shadow", behavior: y },
|
|
57
|
+
left: { show: !0, type: "icon", behavior: y },
|
|
58
|
+
right: { show: !0, type: "icon", behavior: y }
|
|
59
|
+
}, G = {
|
|
60
|
+
hide: !1,
|
|
61
|
+
size: "medium"
|
|
62
|
+
}, {
|
|
63
|
+
debugMode: J = !1,
|
|
64
|
+
className: j,
|
|
65
|
+
axis: k = "both",
|
|
66
|
+
children: K,
|
|
67
|
+
indicators: v = P,
|
|
68
|
+
scrollbarProps: R = G,
|
|
69
|
+
disableMouseScroll: z = !1
|
|
70
|
+
} = I, s = i({}), l = i(null), d = i(null), b = i(null), a = i(null), u = i(5), f = i({}), w = i(null), p = i(!1), Q = (e) => {
|
|
71
|
+
if (!l.current) return 0;
|
|
72
|
+
const { scrollTop: t, scrollLeft: r, scrollHeight: o, clientHeight: n, scrollWidth: c, clientWidth: g } = l.current;
|
|
73
|
+
switch (e) {
|
|
74
|
+
case "top":
|
|
75
|
+
return Math.max(0, t);
|
|
76
|
+
case "bottom":
|
|
77
|
+
return Math.max(0, o - (t + n));
|
|
78
|
+
case "left":
|
|
79
|
+
return Math.max(0, r);
|
|
80
|
+
case "right":
|
|
81
|
+
return Math.max(0, c - (r + g));
|
|
82
|
+
default:
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
85
|
+
}, x = (e, t = 100, r = !0) => {
|
|
86
|
+
if (!l.current) return;
|
|
87
|
+
const o = Q(e), n = Math.min(Math.abs(t), o);
|
|
88
|
+
if (n === 0) return;
|
|
89
|
+
const c = e === "top" || e === "left" ? -n : n, g = {
|
|
90
|
+
top: { top: c, left: 0 },
|
|
91
|
+
bottom: { top: c, left: 0 },
|
|
92
|
+
left: { top: 0, left: c },
|
|
93
|
+
right: { top: 0, left: c }
|
|
94
|
+
};
|
|
95
|
+
l.current.scrollBy({ ...g[e], behavior: r ? "smooth" : "auto" });
|
|
96
|
+
}, X = (e) => {
|
|
97
|
+
if (!l.current) return;
|
|
98
|
+
const t = l.current, r = {
|
|
99
|
+
top: { top: 0, left: t.scrollLeft },
|
|
100
|
+
bottom: { top: t.scrollHeight, left: t.scrollLeft },
|
|
101
|
+
left: { top: t.scrollTop, left: 0 },
|
|
102
|
+
right: { top: t.scrollTop, left: t.scrollWidth }
|
|
103
|
+
};
|
|
104
|
+
t.scrollTo({ ...r[e], behavior: "smooth" });
|
|
105
|
+
}, Y = (e, t) => {
|
|
106
|
+
const r = s.current[e];
|
|
107
|
+
if (r) {
|
|
108
|
+
if (r.style.cursor = "pointer", t === "icon") {
|
|
109
|
+
const o = r.querySelector("svg");
|
|
110
|
+
o && (o.style.transition = "all 0.3s ease-in-out", o.style.transform = "scale(1.3)", o.style.backgroundColor = "rgba(255, 255, 255, 0.2)", o.style.borderRadius = "100%");
|
|
111
|
+
} else if (t === "shadow") {
|
|
112
|
+
const o = r.querySelector("span");
|
|
113
|
+
o && (e === "top" || e === "bottom" ? o.style.height = "90px" : o.style.width = "40px");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, L = (e) => {
|
|
117
|
+
const t = s.current[e];
|
|
118
|
+
if (!t) return;
|
|
119
|
+
t.style.cursor = "";
|
|
120
|
+
const r = t.querySelector("svg");
|
|
121
|
+
r && (r.style.transform = "", r.style.backgroundColor = "", r.style.borderRadius = "");
|
|
122
|
+
const o = t.querySelector("span");
|
|
123
|
+
o && (o.style.height = "", o.style.width = "");
|
|
124
|
+
}, A = (e, t) => {
|
|
125
|
+
if (t === "scroll-on-click" && p.current) {
|
|
126
|
+
p.current = !1;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (f.current[e]) {
|
|
130
|
+
a.current && (clearTimeout(a.current), a.current = null), d.current && (clearInterval(d.current), d.current = null), L(e), f.current[e] = !1, X(e);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (t === "scroll-on-click") {
|
|
134
|
+
if (!l.current) return;
|
|
135
|
+
const { clientHeight: r, clientWidth: o } = l.current, n = e === "top" || e === "bottom" ? r * 0.8 : o * 0.8;
|
|
136
|
+
x(e, n);
|
|
137
|
+
}
|
|
138
|
+
}, D = (e, t) => {
|
|
139
|
+
a.current && (clearTimeout(a.current), a.current = null), p.current = !0, u.current = 3;
|
|
140
|
+
let r = 0;
|
|
141
|
+
w.current = e, f.current[e] = !1, x(e, u.current, !1), d.current = setInterval(() => {
|
|
142
|
+
r += 16;
|
|
143
|
+
const o = r / 1e3;
|
|
144
|
+
if (o >= 2 && !f.current[e] && (f.current[e] = !0, Y(e, t)), o <= 2)
|
|
145
|
+
u.current = 5 + o * 0.4;
|
|
146
|
+
else {
|
|
147
|
+
const n = o - 2;
|
|
148
|
+
u.current += Math.pow(n, 1.1) * 2;
|
|
149
|
+
}
|
|
150
|
+
u.current = Math.min(u.current, 100), x(e, u.current, !1);
|
|
151
|
+
}, 16);
|
|
152
|
+
}, B = (e) => {
|
|
153
|
+
b.current && (clearTimeout(b.current), b.current = null), d.current && (clearInterval(d.current), d.current = null), u.current = 5;
|
|
154
|
+
const t = e || w.current;
|
|
155
|
+
t ? f.current[t] ? (a.current && clearTimeout(a.current), a.current = setTimeout(() => {
|
|
156
|
+
L(t), f.current[t] = !1, p.current = !1;
|
|
157
|
+
}, 1e3)) : (L(t), f.current[t] = !1, p.current = !1) : p.current = !1, w.current = null;
|
|
158
|
+
}, W = (e, t, r) => {
|
|
159
|
+
F || t === "scroll-on-hover" && (b.current = setTimeout(() => {
|
|
160
|
+
D(e, r);
|
|
161
|
+
}, 200));
|
|
162
|
+
}, H = (e, t) => {
|
|
163
|
+
t === "scroll-on-hover" && B(e);
|
|
164
|
+
}, O = (e, t, r) => {
|
|
165
|
+
t === "scroll-on-click" && (p.current = !1, b.current = setTimeout(() => {
|
|
166
|
+
D(e, r);
|
|
167
|
+
}, 200));
|
|
168
|
+
}, q = (e, t) => {
|
|
169
|
+
t === "scroll-on-click" && B(e);
|
|
170
|
+
}, M = () => {
|
|
171
|
+
if (!l.current) return;
|
|
172
|
+
const e = l.current, { scrollTop: t, scrollLeft: r, scrollHeight: o, scrollWidth: n, clientHeight: c, clientWidth: g } = e, E = t <= 10, T = t + c >= o - 10, N = r <= 10, S = r + g >= n - 10;
|
|
173
|
+
s.current.top?.classList.toggle("opacity-0", E), s.current.top?.classList.toggle("pointer-events-none", E), s.current.top?.classList.toggle("pointer-events-auto", !E), s.current.bottom?.classList.toggle("opacity-0", T), s.current.bottom?.classList.toggle("pointer-events-none", T), s.current.bottom?.classList.toggle("pointer-events-auto", !T), s.current.left?.classList.toggle("opacity-0", N), s.current.left?.classList.toggle("pointer-events-none", N), s.current.left?.classList.toggle("pointer-events-auto", !N), s.current.right?.classList.toggle("opacity-0", S), s.current.right?.classList.toggle("pointer-events-none", S), s.current.right?.classList.toggle("pointer-events-auto", !S);
|
|
174
|
+
};
|
|
175
|
+
V(() => {
|
|
176
|
+
if (!l.current) return;
|
|
177
|
+
const e = l.current;
|
|
178
|
+
M(), e.addEventListener("scroll", M);
|
|
179
|
+
const t = (r) => {
|
|
180
|
+
z && r.preventDefault();
|
|
181
|
+
};
|
|
182
|
+
return e.addEventListener("wheel", t, { passive: !1 }), () => {
|
|
183
|
+
e.removeEventListener("scroll", M), e.removeEventListener("wheel", t);
|
|
184
|
+
};
|
|
185
|
+
}, [z]), V(() => {
|
|
186
|
+
if (!l.current) return;
|
|
187
|
+
const e = rt(l.current);
|
|
188
|
+
Object.entries(v).forEach(([t, r]) => {
|
|
189
|
+
if (r?.show && r.type === "shadow") {
|
|
190
|
+
const n = s.current[t]?.querySelector("span");
|
|
191
|
+
if (n) {
|
|
192
|
+
n.dataset.bgColor = e;
|
|
193
|
+
const c = t === "left" || t === "right" ? "to right" : "to bottom";
|
|
194
|
+
n.style.background = `linear-gradient(${c}, ${e} 40%, transparent)`, n.style.background = `linear-gradient(${c}, ${e} 40%, transparent)`;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}, [v]);
|
|
199
|
+
const Z = U.Children.toArray(K), tt = Object.values(v).some((e) => e?.show && e?.type === "icon");
|
|
200
|
+
return /* @__PURE__ */ h.jsxs("div", { className: m("relative p-0", j, _({ axis: k }), "scrolleable", tt ? "overflow-visible" : "overflow-hidden!"), children: [
|
|
201
|
+
/* @__PURE__ */ h.jsx(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
ref: l,
|
|
205
|
+
className: m(
|
|
206
|
+
J && "border border-red-900 border-dashed",
|
|
207
|
+
j,
|
|
208
|
+
"py-2 relative w-full h-full min-h-full",
|
|
209
|
+
_({ axis: k }),
|
|
210
|
+
st({ hide: R?.hide, size: R?.size }),
|
|
211
|
+
""
|
|
212
|
+
),
|
|
213
|
+
children: Z?.map((e) => U.cloneElement(e, { className: m(e?.props?.className, "shrink-0! pointer-events-auto") }))
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
/* @__PURE__ */ h.jsx("div", { className: "h-full w-full z-10 absolute inset-0 pointer-events-none overflow-hidden rounded-[inherit]", children: Object.entries(v).map(([e, t]) => {
|
|
217
|
+
if (!t?.show || t.type !== "shadow") return null;
|
|
218
|
+
const r = e;
|
|
219
|
+
return /* @__PURE__ */ h.jsx(
|
|
220
|
+
"span",
|
|
221
|
+
{
|
|
222
|
+
ref: (o) => {
|
|
223
|
+
s.current[e] = o;
|
|
224
|
+
},
|
|
225
|
+
className: m("cursor-default transition-all duration-500 ease-in-out z-100"),
|
|
226
|
+
onClick: () => A(r, t.behavior),
|
|
227
|
+
onMouseEnter: () => W(r, t.behavior, t.type),
|
|
228
|
+
onMouseLeave: () => H(r, t.behavior),
|
|
229
|
+
onMouseDown: () => O(r, t.behavior, t.type),
|
|
230
|
+
onMouseUp: () => q(r, t.behavior),
|
|
231
|
+
children: /* @__PURE__ */ h.jsx("span", { className: m($({ position: r, type: "shadow" }), t.className) })
|
|
232
|
+
},
|
|
233
|
+
e
|
|
234
|
+
);
|
|
235
|
+
}) }),
|
|
236
|
+
/* @__PURE__ */ h.jsx("div", { className: "h-full w-full z-20 absolute inset-0 pointer-events-none", children: Object.entries(v).map(([e, t]) => {
|
|
237
|
+
if (!t?.show || t.type !== "icon") return null;
|
|
238
|
+
const r = e;
|
|
239
|
+
return /* @__PURE__ */ h.jsx(
|
|
240
|
+
"span",
|
|
241
|
+
{
|
|
242
|
+
ref: (o) => {
|
|
243
|
+
s.current[e] = o;
|
|
244
|
+
},
|
|
245
|
+
className: "pointer-events-auto cursor-default transition-all duration-300 opacity-0",
|
|
246
|
+
onClick: () => A(r, t.behavior),
|
|
247
|
+
onMouseEnter: () => W(r, t.behavior, t.type),
|
|
248
|
+
onMouseLeave: () => H(r, t.behavior),
|
|
249
|
+
onMouseDown: () => O(r, t.behavior, t.type),
|
|
250
|
+
onMouseUp: () => q(r, t.behavior),
|
|
251
|
+
children: /* @__PURE__ */ h.jsx(ot, { size: 20, className: m($({ position: r, type: "icon" }), t.className) })
|
|
252
|
+
},
|
|
253
|
+
e
|
|
254
|
+
);
|
|
255
|
+
}) })
|
|
256
|
+
] });
|
|
257
|
+
};
|
|
258
|
+
export {
|
|
259
|
+
ht as Scrollable
|
|
260
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-
|
|
1
|
+
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as f } from "./cn-B6yFEsav.js";
|
|
3
3
|
import Ne, { memo as Z, useState as je, useRef as ce, useMemo as oe, useCallback as U, useEffect as ve, useImperativeHandle as Qe } from "react";
|
|
4
4
|
import Xe from "./Spinner.es.js";
|
|
5
5
|
import { createPortal as Ye } from "react-dom";
|
|
6
6
|
import { u as Ze } from "./useDragScroll-CHN9OMwn.js";
|
|
7
|
-
import { u as et
|
|
8
|
-
import { H as
|
|
9
|
-
import { Close as
|
|
10
|
-
import
|
|
7
|
+
import { u as et } from "./useLabelBackground-BDIHUdND.js";
|
|
8
|
+
import { H as tt } from "./HelperComponent-ljsn0xD6.js";
|
|
9
|
+
import { Close as nt } from "./Icons/Close.es.js";
|
|
10
|
+
import rt from "./CheckBox.es.js";
|
|
11
|
+
import lt from "./Input.es.js";
|
|
11
12
|
import Ke from "./Skeleton.es.js";
|
|
12
13
|
import { Cancel as ot } from "./Icons/Cancel.es.js";
|
|
13
14
|
import { ChevronDown as Ue } from "./Icons/ChevronDown.es.js";
|
|
@@ -52,7 +53,7 @@ const at = {
|
|
|
52
53
|
),
|
|
53
54
|
type: "button",
|
|
54
55
|
tabIndex: p,
|
|
55
|
-
children: /* @__PURE__ */ a.jsx(
|
|
56
|
+
children: /* @__PURE__ */ a.jsx(nt, { size: 18, className: f(u && Fe.icon) })
|
|
56
57
|
}
|
|
57
58
|
)
|
|
58
59
|
]
|
|
@@ -607,7 +608,7 @@ function ct(e) {
|
|
|
607
608
|
}
|
|
608
609
|
),
|
|
609
610
|
(Ce || ee) && /* @__PURE__ */ a.jsx("div", { className: "min-h-6", children: /* @__PURE__ */ a.jsx(
|
|
610
|
-
|
|
611
|
+
tt,
|
|
611
612
|
{
|
|
612
613
|
ref: W,
|
|
613
614
|
variant: F,
|
|
@@ -619,7 +620,7 @@ function ct(e) {
|
|
|
619
620
|
}
|
|
620
621
|
);
|
|
621
622
|
}
|
|
622
|
-
const dt = Z(ct, (e, n) => e.value === n.value && e.options === n.options && e.isLoading === n.isLoading && e.disabled === n.disabled && e.errorComponent === n.errorComponent && e.helperComponent === n.helperComponent && e.variant === n.variant && e.label === n.label && e.id === n.id && e.name === n.name && e.placeholder === n.placeholder && e.renderOptionContext === n.renderOptionContext && e.dropdownOptions?.controledSearchValue === n.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === n.dropdownOptions?.isLoading),
|
|
623
|
+
const dt = Z(ct, (e, n) => e.value === n.value && e.options === n.options && e.isLoading === n.isLoading && e.disabled === n.disabled && e.errorComponent === n.errorComponent && e.helperComponent === n.helperComponent && e.variant === n.variant && e.label === n.label && e.id === n.id && e.name === n.name && e.placeholder === n.placeholder && e.renderOptionContext === n.renderOptionContext && e.dropdownOptions?.controledSearchValue === n.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === n.dropdownOptions?.isLoading), Et = dt;
|
|
623
624
|
function ft({
|
|
624
625
|
footer: e,
|
|
625
626
|
isOpen: n,
|
|
@@ -867,7 +868,7 @@ function ft({
|
|
|
867
868
|
},
|
|
868
869
|
children: [
|
|
869
870
|
!Ce && /* @__PURE__ */ a.jsx(
|
|
870
|
-
|
|
871
|
+
lt,
|
|
871
872
|
{
|
|
872
873
|
name: "",
|
|
873
874
|
label: "",
|
|
@@ -1067,7 +1068,7 @@ const mt = Z(
|
|
|
1067
1068
|
u && !p && "text-neutral-default-disabled hover:bg-neutral-default-default"
|
|
1068
1069
|
),
|
|
1069
1070
|
children: [
|
|
1070
|
-
i && !p && /* @__PURE__ */ a.jsx(
|
|
1071
|
+
i && !p && /* @__PURE__ */ a.jsx(rt, { checked: n, disabled: u }),
|
|
1071
1072
|
/* @__PURE__ */ a.jsx("span", { children: g })
|
|
1072
1073
|
]
|
|
1073
1074
|
},
|
|
@@ -1105,6 +1106,6 @@ const Je = Z(
|
|
|
1105
1106
|
);
|
|
1106
1107
|
Je.displayName = "DefaultSelectionDisplay";
|
|
1107
1108
|
export {
|
|
1108
|
-
|
|
1109
|
+
Et as S,
|
|
1109
1110
|
G as g
|
|
1110
1111
|
};
|
package/dist/Select.es.js
CHANGED
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as Y } from "./jsx-runtime-
|
|
2
|
-
import { g as i, S as Z } from "./Select-
|
|
1
|
+
import { j as Y } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { g as i, S as Z } from "./Select-BdxmkrjB.js";
|
|
3
3
|
import { useState as A, useRef as E, useEffect as b, useMemo as ee, useCallback as te } from "react";
|
|
4
4
|
function re(e) {
|
|
5
5
|
const {
|
package/dist/Skeleton.es.js
CHANGED
package/dist/Spinner.es.js
CHANGED
package/dist/Steps.es.js
CHANGED
package/dist/Switch.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-
|
|
1
|
+
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { memo as w, useRef as b } from "react";
|
|
4
|
-
import { motion as
|
|
5
|
-
const
|
|
4
|
+
import { motion as l } from "framer-motion";
|
|
5
|
+
const c = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
6
6
|
const n = b(null), h = (u) => {
|
|
7
7
|
if (!n.current || t) return;
|
|
8
8
|
u.preventDefault(), u.stopPropagation();
|
|
@@ -59,7 +59,7 @@ const l = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
|
59
59
|
i[e][s].container
|
|
60
60
|
),
|
|
61
61
|
children: /* @__PURE__ */ a.jsx(
|
|
62
|
-
|
|
62
|
+
l.span,
|
|
63
63
|
{
|
|
64
64
|
animate: m[e],
|
|
65
65
|
whileHover: t ? {} : {
|
|
@@ -70,7 +70,7 @@ const l = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
|
70
70
|
"size-10 aspect-square rounded-full absolute top-1/2 -translate-y-1/2"
|
|
71
71
|
),
|
|
72
72
|
children: /* @__PURE__ */ a.jsx(
|
|
73
|
-
|
|
73
|
+
l.span,
|
|
74
74
|
{
|
|
75
75
|
animate: p[e],
|
|
76
76
|
whileTap: t ? {} : {
|
|
@@ -89,8 +89,8 @@ const l = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
|
89
89
|
)
|
|
90
90
|
] });
|
|
91
91
|
};
|
|
92
|
-
|
|
93
|
-
const y = w(
|
|
92
|
+
c.displayName = "Switch";
|
|
93
|
+
const y = w(c);
|
|
94
94
|
export {
|
|
95
95
|
y as Switch,
|
|
96
96
|
y as default
|
package/dist/TabLinks.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { j as n } from "./jsx-runtime-
|
|
1
|
+
import { j as n } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { motion as x } from "framer-motion";
|
|
3
3
|
import { memo as N } from "react";
|
|
4
4
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
5
|
-
function
|
|
5
|
+
function c({
|
|
6
6
|
items: t,
|
|
7
7
|
activeTab: e,
|
|
8
8
|
onTabChange: i,
|
|
9
9
|
className: l,
|
|
10
10
|
tabClassName: d,
|
|
11
|
-
activeTabClassName:
|
|
11
|
+
activeTabClassName: o,
|
|
12
12
|
indicatorClassName: f,
|
|
13
13
|
animated: b = !0,
|
|
14
14
|
renderTab: m
|
|
@@ -25,18 +25,18 @@ function o({
|
|
|
25
25
|
),
|
|
26
26
|
role: "tablist",
|
|
27
27
|
children: t?.map((a) => {
|
|
28
|
-
const s = e === a.id,
|
|
29
|
-
return m ? /* @__PURE__ */ n.jsx("div", { children: m(a, s,
|
|
28
|
+
const s = e === a.id, u = () => h(a);
|
|
29
|
+
return m ? /* @__PURE__ */ n.jsx("div", { children: m(a, s, u) }, a.id) : /* @__PURE__ */ n.jsxs(
|
|
30
30
|
"button",
|
|
31
31
|
{
|
|
32
|
-
onClick:
|
|
32
|
+
onClick: u,
|
|
33
33
|
disabled: a.disabled,
|
|
34
34
|
className: r(
|
|
35
35
|
"relative flex justify-center items-center h-10 px-4 font-medium focus:outline-none transition-colors",
|
|
36
36
|
!a.disabled && "hover:text-primary-default-default cursor-pointer",
|
|
37
37
|
a.disabled && "opacity-50 cursor-default",
|
|
38
38
|
d,
|
|
39
|
-
s &&
|
|
39
|
+
s && o
|
|
40
40
|
),
|
|
41
41
|
tabIndex: a.disabled ? -1 : 0,
|
|
42
42
|
"aria-label": a.title,
|
|
@@ -78,8 +78,8 @@ function o({
|
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
const C = N(
|
|
81
|
+
c.displayName = "TabLinks";
|
|
82
|
+
const C = N(c, (t, e) => {
|
|
83
83
|
if (t.activeTab !== e.activeTab || t.className !== e.className || t.tabClassName !== e.tabClassName || t.activeTabClassName !== e.activeTabClassName || t.indicatorClassName !== e.indicatorClassName || t.animated !== e.animated || t.onTabChange !== e.onTabChange || t.renderTab !== e.renderTab || t.items.length !== e.items.length)
|
|
84
84
|
return !1;
|
|
85
85
|
for (let i = 0; i < t.items.length; i++) {
|
package/dist/Table.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
package/dist/TextArea.es.js
CHANGED
package/dist/Toast.es.js
CHANGED
package/dist/ToastProvider.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { Toaster as r } from "sonner";
|
|
3
3
|
const i = ({ ...o }) => /* @__PURE__ */ t.jsx(r, { ...o, position: "bottom-right", richColors: !1, theme: "light" });
|
|
4
4
|
export {
|
package/dist/Tooltip.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
3
|
import { useState as p, cloneElement as x } from "react";
|
|
4
4
|
import { Close as b } from "./Icons/Close.es.js";
|
|
@@ -7,5 +7,5 @@ interface IAvatar {
|
|
|
7
7
|
subImageUrl?: string;
|
|
8
8
|
borderColor?: string;
|
|
9
9
|
}
|
|
10
|
-
export default function Avatar({ imageUrl, sizeImage, sizeFallback, fallbackText, subImageUrl,
|
|
10
|
+
export default function Avatar({ imageUrl, sizeImage, sizeFallback, fallbackText, subImageUrl, }: IAvatar): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -15,6 +15,7 @@ export interface DrawerDesktopProps<TContext = unknown> {
|
|
|
15
15
|
attachToParent?: boolean;
|
|
16
16
|
closeOnOverlayClick?: boolean;
|
|
17
17
|
hideCloseButton?: boolean;
|
|
18
|
+
unmountChildrenOnClose?: boolean;
|
|
18
19
|
}
|
|
19
20
|
declare const DrawerDesktop: import('react').ForwardRefExoticComponent<DrawerDesktopProps<any> & import('react').RefAttributes<DrawerDesktopHandle<any>>>;
|
|
20
21
|
export default DrawerDesktop;
|
|
@@ -3,10 +3,17 @@ type NavigationDrawerRenderContext = {
|
|
|
3
3
|
toggleCollapse: () => void;
|
|
4
4
|
getIsCollapsed: () => boolean;
|
|
5
5
|
subscribeToCollapse: (listener: (collapsed: boolean) => void) => () => void;
|
|
6
|
+
openSidebar: () => void;
|
|
7
|
+
closeSidebar: () => void;
|
|
8
|
+
toggleSidebar: () => void;
|
|
9
|
+
getIsSidebarOpen: () => boolean;
|
|
10
|
+
subscribeToSidebarOpen: (listener: (open: boolean) => void) => () => void;
|
|
6
11
|
};
|
|
7
12
|
type NavigationDrawerSlotChildren = ReactNode | ((context: NavigationDrawerRenderContext) => ReactNode);
|
|
8
13
|
export interface NavigationDrawerProps {
|
|
9
14
|
children?: NavigationDrawerSlotChildren;
|
|
15
|
+
classNameDrawer?: string;
|
|
16
|
+
classNameSidebar?: string;
|
|
10
17
|
}
|
|
11
18
|
type SlotBaseProps = {
|
|
12
19
|
children?: NavigationDrawerSlotChildren;
|
|
@@ -14,6 +21,14 @@ type SlotBaseProps = {
|
|
|
14
21
|
context?: NavigationDrawerRenderContext;
|
|
15
22
|
};
|
|
16
23
|
type ContentProps = SlotBaseProps & Omit<React.AllHTMLAttributes<HTMLDivElement>, "children">;
|
|
24
|
+
export type NavigationDrawerSidebarProps = {
|
|
25
|
+
children?: NavigationDrawerSlotChildren;
|
|
26
|
+
className?: string;
|
|
27
|
+
context?: NavigationDrawerRenderContext;
|
|
28
|
+
modal?: boolean;
|
|
29
|
+
closeOnOverlayClick?: boolean;
|
|
30
|
+
unmountChildrenOnClose?: boolean;
|
|
31
|
+
};
|
|
17
32
|
declare const NavigationDrawer: React.NamedExoticComponent<NavigationDrawerProps> & {
|
|
18
33
|
readonly type: (props: NavigationDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
34
|
} & {
|
|
@@ -24,10 +39,11 @@ declare const NavigationDrawer: React.NamedExoticComponent<NavigationDrawerProps
|
|
|
24
39
|
Spacer: React.MemoExoticComponent<({ className }: {
|
|
25
40
|
className?: string;
|
|
26
41
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
27
|
-
Outlet: React.
|
|
42
|
+
Outlet: React.NamedExoticComponent<{
|
|
28
43
|
children?: NavigationDrawerSlotChildren;
|
|
29
44
|
className?: string;
|
|
30
45
|
context?: NavigationDrawerRenderContext;
|
|
31
|
-
}
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
Sidebar: React.NamedExoticComponent<NavigationDrawerSidebarProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
48
|
};
|
|
33
49
|
export default NavigationDrawer;
|
|
@@ -6,9 +6,11 @@ export interface NavigationDrawerActionItemProps {
|
|
|
6
6
|
count?: number;
|
|
7
7
|
className?: string;
|
|
8
8
|
isActive?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
onClick?: () => void;
|
|
10
11
|
isView?: boolean | (() => boolean);
|
|
12
|
+
order?: number;
|
|
11
13
|
}
|
|
12
|
-
declare const NavigationDrawerActionItem: import('react').MemoExoticComponent<(props: NavigationDrawerActionItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
declare const NavigationDrawerActionItem: import('react').MemoExoticComponent<(props: NavigationDrawerActionItemProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
13
15
|
export default NavigationDrawerActionItem;
|
|
14
16
|
export type { NavigationDrawerActionItemProps as NavigationDrawerActionItemPropsType };
|
|
@@ -12,6 +12,7 @@ export interface NavigationDrawerItemBaseProps {
|
|
|
12
12
|
as?: "a" | "button" | "div";
|
|
13
13
|
onClick?: React.MouseEventHandler;
|
|
14
14
|
onAuxClick?: React.MouseEventHandler;
|
|
15
|
+
disabled?: boolean;
|
|
15
16
|
}
|
|
16
17
|
declare const NavigationDrawerItemBase: React.MemoExoticComponent<(props: NavigationDrawerItemBaseProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
18
|
export default NavigationDrawerItemBase;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonVariant } from '../Shared/types';
|
|
3
|
+
export interface NotificationAction<NotificationMetadata = unknown> {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: (metadata?: NotificationMetadata) => void;
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface NoitificationUser {
|
|
11
|
+
name: string;
|
|
12
|
+
profile_picture?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface NotificationCardProps<NotificationMetadata = unknown> {
|
|
15
|
+
user: NoitificationUser;
|
|
16
|
+
body: string | React.ReactNode | ((metadata?: NotificationMetadata) => React.ReactNode);
|
|
17
|
+
date: string | Date;
|
|
18
|
+
actions?: [NotificationAction<NotificationMetadata>, NotificationAction<NotificationMetadata>] | [NotificationAction<NotificationMetadata>];
|
|
19
|
+
isNew?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
metadata?: NotificationMetadata;
|
|
22
|
+
}
|
|
23
|
+
declare const NotificationCard: <NotificationMetadata = unknown>({ user, body, date, actions, isNew, className, metadata }: NotificationCardProps<NotificationMetadata>) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default NotificationCard;
|
|
25
|
+
export type NotificationCardComponent = typeof NotificationCard;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface PyrionHelpSectionProps {
|
|
3
|
+
onCloseClick?: VoidFunction;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const PyrionHelpSection: ({ onCloseClick, children, title }: PyrionHelpSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default PyrionHelpSection;
|