prometeo-design-system 4.2.5 → 4.3.1
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 +41 -40
- package/dist/CardProfile-C1F83KJV.js +280 -0
- package/dist/CardProfile.es.js +3 -291
- package/dist/CheckBox.es.js +21 -24
- package/dist/DialogModal.es.js +46 -52
- package/dist/Icons/UserAvatar.es.js +4 -4
- package/dist/Input.es.js +72 -73
- package/dist/NotificationCard.es.js +21 -27
- package/dist/PlainTooltip.es.js +19 -19
- package/dist/PyrionLayout.es.js +786 -879
- package/dist/Scrollable.es.js +127 -201
- package/dist/Select.es.js +47 -47
- package/dist/SelectSearch.es.js +83 -85
- package/dist/TabLinks.es.js +121 -2
- package/dist/TicketCard.es.js +2 -2
- package/dist/badge-CbqYNrl4.js +87 -0
- package/dist/components/Avatar/Avatar.d.ts +4 -2
- package/dist/components/CardProfile/CardProfile.d.ts +4 -7
- package/dist/components/DropZone/useFileDropzone.d.ts +1 -9
- package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
- package/dist/components/NotificationCard/NotificationCard.d.ts +2 -3
- package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +2 -5
- package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +1 -3
- package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +0 -2
- package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +0 -2
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +1 -3
- package/dist/components/Scrollable/Scrollable.d.ts +0 -19
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
- package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
- package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
- package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
- package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
- package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
- package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
- package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
- package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
- package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
- package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
- package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
- package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
- package/dist/components/Sidebar/index.d.ts +12 -0
- package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
- package/dist/components/TabLinks/TabLinks.d.ts +0 -19
- package/dist/components/UserCard/UserCard.d.ts +2 -3
- package/dist/hooks/useLabelBackground.d.ts +0 -1
- package/dist/index.d.ts +16 -0
- package/dist/prometeo-design-system.es.js +2906 -119
- package/dist/styles.css +1 -1
- package/dist/useLabelBackground-BDIHUdND.js +26 -0
- package/package.json +2 -2
- package/src/styles/base.css +46 -0
- package/dist/TabLinks-DxqprStp.js +0 -147
- package/dist/UserCard.d.ts +0 -6
- package/dist/UserCard.es.js +0 -28
- package/dist/badge-BEx-0Q-K.js +0 -35
- package/dist/exports/UserCard.d.ts +0 -2
- package/dist/useLabelBackground-D5SzHhl_.js +0 -32
package/dist/CardProfile.es.js
CHANGED
|
@@ -1,293 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as n } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { motion as i, AnimatePresence as h } from "framer-motion";
|
|
4
|
-
import { isValidElement as j } from "react";
|
|
5
|
-
import g from "./Avatar.es.js";
|
|
6
|
-
import { ChevronDown as v } from "./Icons/ChevronDown.es.js";
|
|
7
|
-
import { Logout as b } from "./Icons/Logout.es.js";
|
|
8
|
-
function y({
|
|
9
|
-
sessions: t,
|
|
10
|
-
handleTokenLogin: r
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ e.jsx("div", { className: "profile-options-container w-full ", children: t?.map((a) => /* @__PURE__ */ e.jsx(
|
|
13
|
-
"button",
|
|
14
|
-
{
|
|
15
|
-
className: "w-full ",
|
|
16
|
-
onClick: () => r?.(a.token),
|
|
17
|
-
children: /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx(
|
|
18
|
-
s.Content,
|
|
19
|
-
{
|
|
20
|
-
onClick: () => {
|
|
21
|
-
console.log("hola");
|
|
22
|
-
},
|
|
23
|
-
isExpanded: !1,
|
|
24
|
-
nameUser: a.name,
|
|
25
|
-
nameArea: a?.areaId?.name,
|
|
26
|
-
nameCompany: a.companyId.name,
|
|
27
|
-
cardProfile: /* @__PURE__ */ e.jsx(s.Image, { isExpanded: !1 })
|
|
28
|
-
}
|
|
29
|
-
) })
|
|
30
|
-
},
|
|
31
|
-
a._id
|
|
32
|
-
)) });
|
|
33
|
-
}
|
|
34
|
-
const w = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profile-container flex gap-0.5 overflow-hidden w-full min-w-0 ", children: t }), N = ({
|
|
35
|
-
isExpanded: t,
|
|
36
|
-
sessions: r,
|
|
37
|
-
onClickLogout: a,
|
|
38
|
-
handleTokenLogin: d
|
|
39
|
-
}) => /* @__PURE__ */ e.jsx(h, { mode: "wait", children: t && /* @__PURE__ */ e.jsxs(
|
|
40
|
-
i.div,
|
|
41
|
-
{
|
|
42
|
-
initial: { height: 0, opacity: 0 },
|
|
43
|
-
animate: {
|
|
44
|
-
height: "auto",
|
|
45
|
-
opacity: 1,
|
|
46
|
-
transition: {
|
|
47
|
-
height: { duration: 0.6, ease: "easeOut" },
|
|
48
|
-
opacity: { duration: 0.4, delay: 0.2 }
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
exit: {
|
|
52
|
-
height: 0,
|
|
53
|
-
opacity: 0,
|
|
54
|
-
transition: {
|
|
55
|
-
height: {
|
|
56
|
-
duration: 0.8,
|
|
57
|
-
delay: 0.2,
|
|
58
|
-
ease: "easeIn"
|
|
59
|
-
},
|
|
60
|
-
opacity: { duration: 0.3, delay: 0.1 }
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
className: "overflow-hidden",
|
|
64
|
-
children: [
|
|
65
|
-
/* @__PURE__ */ e.jsx(
|
|
66
|
-
i.div,
|
|
67
|
-
{
|
|
68
|
-
className: "flex justify-center items-center w-full mt-4",
|
|
69
|
-
exit: {
|
|
70
|
-
opacity: 0,
|
|
71
|
-
scaleX: 0,
|
|
72
|
-
height: 0,
|
|
73
|
-
transition: {
|
|
74
|
-
duration: 0.4,
|
|
75
|
-
delay: 0.5,
|
|
76
|
-
ease: "easeInOut"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "border-b border-neutral-strong-default border w-full" })
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
r && r.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
83
|
-
/* @__PURE__ */ e.jsx(
|
|
84
|
-
i.div,
|
|
85
|
-
{
|
|
86
|
-
className: "mt-4",
|
|
87
|
-
exit: {
|
|
88
|
-
opacity: 0,
|
|
89
|
-
y: -5,
|
|
90
|
-
height: 0,
|
|
91
|
-
transition: {
|
|
92
|
-
duration: 0.4,
|
|
93
|
-
delay: 0.4,
|
|
94
|
-
ease: "easeInOut"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "text-neutral-medium-default font-semibold text-xs", children: "Cambiar cuenta" })
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
/* @__PURE__ */ e.jsx(
|
|
101
|
-
i.div,
|
|
102
|
-
{
|
|
103
|
-
className: "mt-4 overflow-hidden w-full ",
|
|
104
|
-
exit: {
|
|
105
|
-
height: 0,
|
|
106
|
-
opacity: 0,
|
|
107
|
-
y: -10,
|
|
108
|
-
scale: 0.98,
|
|
109
|
-
transition: {
|
|
110
|
-
height: { duration: 0.5, delay: 0.2 },
|
|
111
|
-
opacity: { duration: 0.3, delay: 0.3 },
|
|
112
|
-
y: { duration: 0.3, delay: 0.3 },
|
|
113
|
-
scale: { duration: 0.3, delay: 0.3 },
|
|
114
|
-
ease: "easeInOut"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
children: /* @__PURE__ */ e.jsx(
|
|
118
|
-
y,
|
|
119
|
-
{
|
|
120
|
-
sessions: r,
|
|
121
|
-
handleTokenLogin: d
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
/* @__PURE__ */ e.jsx(
|
|
127
|
-
i.div,
|
|
128
|
-
{
|
|
129
|
-
className: "flex justify-center items-center w-full mt-4",
|
|
130
|
-
exit: {
|
|
131
|
-
opacity: 0,
|
|
132
|
-
scaleX: 0,
|
|
133
|
-
height: 0,
|
|
134
|
-
transition: {
|
|
135
|
-
duration: 0.4,
|
|
136
|
-
delay: 0.15,
|
|
137
|
-
ease: "easeInOut"
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "border-b border-neutral-strong-default border w-full" })
|
|
141
|
-
}
|
|
142
|
-
)
|
|
143
|
-
] }),
|
|
144
|
-
/* @__PURE__ */ e.jsxs(
|
|
145
|
-
i.button,
|
|
146
|
-
{
|
|
147
|
-
onClick: a,
|
|
148
|
-
className: "flex flex-1 h-12 w-full gap-1 rounded-md cursor-pointer mt-4 mb-4 px-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",
|
|
149
|
-
exit: {
|
|
150
|
-
opacity: 0,
|
|
151
|
-
y: -8,
|
|
152
|
-
scale: 0.96,
|
|
153
|
-
transition: {
|
|
154
|
-
duration: 0.5,
|
|
155
|
-
delay: 0,
|
|
156
|
-
ease: "easeInOut"
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
whileHover: {
|
|
160
|
-
opacity: 1,
|
|
161
|
-
scale: [1, 1.02, 1],
|
|
162
|
-
transition: { duration: 0.2 }
|
|
163
|
-
},
|
|
164
|
-
whileTap: { scale: 0.98 },
|
|
165
|
-
children: [
|
|
166
|
-
/* @__PURE__ */ e.jsx(b, { size: 24, className: "text-neutral-default-default" }),
|
|
167
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-neutral-default-default font-semibold text-sm", children: "Cerrar sesión" })
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
) }), I = ({ imageUrl: t, fallbackText: r, avatarProps: a }) => /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center profile-image-wrapper", children: /* @__PURE__ */ e.jsx(
|
|
174
|
-
g,
|
|
175
|
-
{
|
|
176
|
-
imageUrl: t,
|
|
177
|
-
sizeImage: "xxs",
|
|
178
|
-
sizeFallback: "xxs",
|
|
179
|
-
fallbackText: r,
|
|
180
|
-
...a
|
|
181
|
-
}
|
|
182
|
-
) }), O = ({
|
|
183
|
-
isExpanded: t,
|
|
184
|
-
nameUser: r,
|
|
185
|
-
nameCompany: a,
|
|
186
|
-
nameArea: d,
|
|
187
|
-
cardProfile: o,
|
|
188
|
-
onClick: u,
|
|
189
|
-
unassigned: l = !1
|
|
190
|
-
}) => {
|
|
191
|
-
const m = () => {
|
|
192
|
-
if (o && j(o) && o.type === s.Image) {
|
|
193
|
-
const c = o.props, f = l ? "" : c.fallbackText || r, x = l ? "" : c.imageUrl, p = l ? "defaultAvatar" : "initials";
|
|
194
|
-
return /* @__PURE__ */ e.jsx(s.Image, { ...c, fallbackText: f, avatarProps: { ...c.avatarProps, fallbackType: p, imageUrl: x } });
|
|
195
|
-
}
|
|
196
|
-
return o;
|
|
197
|
-
};
|
|
198
|
-
return /* @__PURE__ */ e.jsxs(
|
|
199
|
-
i.button,
|
|
200
|
-
{
|
|
201
|
-
onClick: u,
|
|
202
|
-
className: n(
|
|
203
|
-
"flex flex-1 gap-2 rounded-lg relative overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile h-max p-3",
|
|
204
|
-
t && "bg-neutral-medium-selected",
|
|
205
|
-
u && "cursor-pointer",
|
|
206
|
-
l && "hover:bg-transparent"
|
|
207
|
-
),
|
|
208
|
-
whileTap: l ? void 0 : u && { scale: 0.98 },
|
|
209
|
-
transition: { duration: 0.2, ease: "easeInOut" },
|
|
210
|
-
children: [
|
|
211
|
-
m(),
|
|
212
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center overflow-hidden flex-1 relative z-10 profile-user-info mr-2 p-0", children: [
|
|
213
|
-
/* @__PURE__ */ e.jsx(
|
|
214
|
-
"p",
|
|
215
|
-
{
|
|
216
|
-
className: n(
|
|
217
|
-
"profile-name prometeo-fonts-label-large mb-0 text-left",
|
|
218
|
-
t ? "text-primary-default-default" : "text-neutral-default-default",
|
|
219
|
-
l && "text-neutral-default-pressed"
|
|
220
|
-
),
|
|
221
|
-
children: l ? "Sin asignar" : r?.length && r?.length > 20 ? r?.slice(0, 10) + ".." : r
|
|
222
|
-
}
|
|
223
|
-
),
|
|
224
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mt-0 ", children: a && a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
225
|
-
/* @__PURE__ */ e.jsx(
|
|
226
|
-
"p",
|
|
227
|
-
{
|
|
228
|
-
className: n(
|
|
229
|
-
"profile-options truncate mt-0 prometeo-fonts-body-small",
|
|
230
|
-
t ? "text-primary-default-default" : "text-neutral-default-default",
|
|
231
|
-
l && "text-neutral-default-pressed"
|
|
232
|
-
),
|
|
233
|
-
children: a?.length && a?.length > 20 ? a?.slice(0, 10) + ".." : a
|
|
234
|
-
}
|
|
235
|
-
),
|
|
236
|
-
/* @__PURE__ */ e.jsx(
|
|
237
|
-
"p",
|
|
238
|
-
{
|
|
239
|
-
className: n(
|
|
240
|
-
"profile-options truncate prometeo-fonts-body-small mt-0",
|
|
241
|
-
t ? "text-primary-default-default" : "text-neutral-default-default",
|
|
242
|
-
l && "text-neutral-default-pressed"
|
|
243
|
-
),
|
|
244
|
-
children: "·"
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
/* @__PURE__ */ e.jsx(
|
|
248
|
-
"p",
|
|
249
|
-
{
|
|
250
|
-
className: n(
|
|
251
|
-
"profile-options truncate prometeo-fonts-body-small mt-0",
|
|
252
|
-
t ? "text-primary-default-default" : "text-neutral-default-default",
|
|
253
|
-
l && "text-neutral-default-pressed"
|
|
254
|
-
),
|
|
255
|
-
children: d || "Sin asignar"
|
|
256
|
-
}
|
|
257
|
-
)
|
|
258
|
-
] }) : /* @__PURE__ */ e.jsx("span", { className: "font-semibold leading-tight ml-3 text-xs text-blue-300 text-center", children: "Sin asignar" }) })
|
|
259
|
-
] })
|
|
260
|
-
]
|
|
261
|
-
}
|
|
262
|
-
);
|
|
263
|
-
}, C = () => /* @__PURE__ */ e.jsx("div", { className: "w-px bg-gray-500/30 my-1 border-separator-profile" }), k = ({ isExpanded: t, onClick: r }) => /* @__PURE__ */ e.jsx(
|
|
264
|
-
i.button,
|
|
265
|
-
{
|
|
266
|
-
onClick: r,
|
|
267
|
-
className: "flex items-center justify-center p-3 rounded-lg cursor-pointer relative overflow-hidden focus:outline-none w-8 min-w-8 hover:bg-neutral-medium-selected button-content-chevron",
|
|
268
|
-
whileHover: { scale: 1.05 },
|
|
269
|
-
whileTap: { scale: 0.95 },
|
|
270
|
-
transition: { duration: 0.2, ease: "easeOut" },
|
|
271
|
-
title: t ? "Ocultar opciones" : "Mostrar opciones",
|
|
272
|
-
"aria-label": t ? "Ocultar opciones" : "Mostrar opciones",
|
|
273
|
-
children: /* @__PURE__ */ e.jsx(
|
|
274
|
-
i.div,
|
|
275
|
-
{
|
|
276
|
-
animate: { rotate: t ? 180 : 0 },
|
|
277
|
-
transition: { duration: 0.3, ease: "easeOut" },
|
|
278
|
-
className: "relative button-select-crevron",
|
|
279
|
-
children: /* @__PURE__ */ e.jsx(i.div, { transition: { duration: 0.2 }, children: /* @__PURE__ */ e.jsx(v, { size: 24, className: "text-prometeo-neutral " }) })
|
|
280
|
-
}
|
|
281
|
-
)
|
|
282
|
-
}
|
|
283
|
-
), s = Object.assign(w, {
|
|
284
|
-
Menu: N,
|
|
285
|
-
Image: I,
|
|
286
|
-
Content: O,
|
|
287
|
-
Separator: C,
|
|
288
|
-
Options: k
|
|
289
|
-
});
|
|
1
|
+
import { C as e, C as f } from "./CardProfile-C1F83KJV.js";
|
|
290
2
|
export {
|
|
291
|
-
|
|
292
|
-
|
|
3
|
+
e as CardProfile,
|
|
4
|
+
f as default
|
|
293
5
|
};
|
package/dist/CheckBox.es.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const f = v(), o = C(null), p = `
|
|
2
|
+
import { memo as m, forwardRef as k, useId as g, useRef as v, useCallback as C } from "react";
|
|
3
|
+
import { Check as y } from "./Icons/Check.es.js";
|
|
4
|
+
const s = k(
|
|
5
|
+
({ className: l, disabled: e, onChange: i, value: d, ...t }, r) => {
|
|
6
|
+
const u = g(), o = v(null), f = `
|
|
8
7
|
after:content-[""]
|
|
9
8
|
after:absolute
|
|
10
9
|
after:top-1/2
|
|
@@ -26,7 +25,7 @@ const i = g(
|
|
|
26
25
|
transition-all
|
|
27
26
|
duration-200
|
|
28
27
|
ease-in-out
|
|
29
|
-
`, h = "hover:#hover-span:opacity-100",
|
|
28
|
+
`, h = "hover:#hover-span:opacity-100", p = "bg-primary-light", x = `
|
|
30
29
|
bg-transparent
|
|
31
30
|
border-[2px]
|
|
32
31
|
aria-checked:border-none
|
|
@@ -35,7 +34,7 @@ const i = g(
|
|
|
35
34
|
`, b = {
|
|
36
35
|
selected: "bg-primary-default-disabled!",
|
|
37
36
|
default: "border-neutral-default-disabled "
|
|
38
|
-
}, c =
|
|
37
|
+
}, c = C(() => {
|
|
39
38
|
if (o.current)
|
|
40
39
|
return o.current.click();
|
|
41
40
|
}, []);
|
|
@@ -57,14 +56,12 @@ const i = g(
|
|
|
57
56
|
{
|
|
58
57
|
id: "checkbox-box",
|
|
59
58
|
"aria-checked": t.checked,
|
|
60
|
-
className:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
l
|
|
67
|
-
),
|
|
59
|
+
className: `grid place-items-center absolute size-[18px] rounded-[2px]
|
|
60
|
+
${f}
|
|
61
|
+
${x}
|
|
62
|
+
${t.checked ? p : ""}
|
|
63
|
+
${e ? b[t.checked ? "selected" : "default"] : ""}
|
|
64
|
+
`,
|
|
68
65
|
onClick: c,
|
|
69
66
|
draggable: !1,
|
|
70
67
|
children: [
|
|
@@ -72,13 +69,13 @@ const i = g(
|
|
|
72
69
|
"input",
|
|
73
70
|
{
|
|
74
71
|
type: "checkbox",
|
|
75
|
-
id:
|
|
72
|
+
id: u,
|
|
76
73
|
ref: (n) => {
|
|
77
74
|
o.current = n, typeof r == "function" ? r(n) : r && (r.current = n);
|
|
78
75
|
},
|
|
79
|
-
onChange:
|
|
80
|
-
value:
|
|
81
|
-
className:
|
|
76
|
+
onChange: i,
|
|
77
|
+
value: d,
|
|
78
|
+
className: `${l} ${h}`,
|
|
82
79
|
disabled: e,
|
|
83
80
|
style: {
|
|
84
81
|
position: "absolute",
|
|
@@ -95,7 +92,7 @@ const i = g(
|
|
|
95
92
|
}
|
|
96
93
|
),
|
|
97
94
|
t.checked && /* @__PURE__ */ a.jsx(
|
|
98
|
-
|
|
95
|
+
y,
|
|
99
96
|
{
|
|
100
97
|
size: 18,
|
|
101
98
|
className: `absolute ${e ? "icon-neutral-strong-disabled" : ""} pointer-events-none icon-neutral-strong-default`
|
|
@@ -108,8 +105,8 @@ const i = g(
|
|
|
108
105
|
);
|
|
109
106
|
}
|
|
110
107
|
);
|
|
111
|
-
|
|
112
|
-
const
|
|
108
|
+
s.displayName = "CheckBox";
|
|
109
|
+
const w = m(s);
|
|
113
110
|
export {
|
|
114
|
-
|
|
111
|
+
w as default
|
|
115
112
|
};
|
package/dist/DialogModal.es.js
CHANGED
|
@@ -1,84 +1,78 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as h, memo as r, useState as D, useRef as p, useCallback as n, useImperativeHandle as R } from "react";
|
|
3
3
|
import { c as j } from "./cn-B6yFEsav.js";
|
|
4
|
-
const
|
|
5
|
-
({ children: e, onClose: t, className:
|
|
6
|
-
const [
|
|
7
|
-
|
|
8
|
-
const m =
|
|
9
|
-
g
|
|
10
|
-
}, []), d =
|
|
11
|
-
|
|
4
|
+
const b = h(
|
|
5
|
+
({ children: e, onClose: t, className: a }, i) => {
|
|
6
|
+
const [s, l] = D(!1), [c, f] = D(null), x = p(t), u = p(c);
|
|
7
|
+
x.current = t, u.current = c;
|
|
8
|
+
const m = n((g) => {
|
|
9
|
+
f(g ?? null), l(!0);
|
|
10
|
+
}, []), d = n(() => {
|
|
11
|
+
l(!1), x.current?.(u.current), setTimeout(() => f(null), 300);
|
|
12
12
|
}, []);
|
|
13
|
-
return
|
|
13
|
+
return R(
|
|
14
14
|
i,
|
|
15
15
|
() => ({
|
|
16
16
|
open: m,
|
|
17
17
|
close: d,
|
|
18
|
-
isOpen:
|
|
19
|
-
getContext: () =>
|
|
18
|
+
isOpen: s,
|
|
19
|
+
getContext: () => u.current
|
|
20
20
|
}),
|
|
21
|
-
[m, d,
|
|
22
|
-
), /* @__PURE__ */ o.jsx(o.Fragment, { children:
|
|
21
|
+
[m, d, s]
|
|
22
|
+
), /* @__PURE__ */ o.jsx(o.Fragment, { children: s && /* @__PURE__ */ o.jsx(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
|
|
26
26
|
onClick: d,
|
|
27
|
-
children:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
c
|
|
42
|
-
),
|
|
43
|
-
children: typeof e == "function" ? e(u) : e
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
]
|
|
27
|
+
children: /* @__PURE__ */ o.jsxs(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: j(
|
|
31
|
+
"bg-neutral-default-default w-3/4 h-3/4 xl:w-3/4 xl:h-10/12 rounded-lg shadow-lg border-neutral-strong-default border relative p-6",
|
|
32
|
+
a
|
|
33
|
+
),
|
|
34
|
+
onClick: (g) => g.stopPropagation(),
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ o.jsx("div", { className: "absolute bg-transparent -inset-4 z-[-1]" }),
|
|
37
|
+
typeof e == "function" ? e(c) : e
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
)
|
|
47
41
|
}
|
|
48
42
|
) });
|
|
49
43
|
}
|
|
50
44
|
);
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
|
|
45
|
+
b.displayName = "Dialog";
|
|
46
|
+
const C = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: /* @__PURE__ */ o.jsx("div", { className: j("flex flex-col gap-4 h-full"), children: e }) }));
|
|
47
|
+
C.displayName = "DialogContent";
|
|
54
48
|
const N = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("h1", { className: t, children: e }));
|
|
55
49
|
N.displayName = "DialogTitle";
|
|
56
|
-
const h = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
57
|
-
h.displayName = "DialogHeader";
|
|
58
50
|
const v = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
59
|
-
v.displayName = "
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
v.displayName = "DialogHeader";
|
|
52
|
+
const y = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
53
|
+
y.displayName = "DialogFooter";
|
|
54
|
+
const k = Object.assign(b, {
|
|
55
|
+
Content: C,
|
|
56
|
+
Header: v,
|
|
57
|
+
Footer: y,
|
|
64
58
|
Title: N
|
|
65
59
|
});
|
|
66
|
-
|
|
60
|
+
k.displayName = "DialogModal";
|
|
67
61
|
const H = () => {
|
|
68
|
-
const e =
|
|
69
|
-
e.current?.open(
|
|
70
|
-
}, []),
|
|
62
|
+
const e = p(null), t = n((l) => {
|
|
63
|
+
e.current?.open(l);
|
|
64
|
+
}, []), a = n(() => {
|
|
71
65
|
e.current?.close();
|
|
72
|
-
}, []), i =
|
|
66
|
+
}, []), i = n(() => e.current?.isOpen ?? !1, []), s = n(() => e.current?.getContext() ?? null, []);
|
|
73
67
|
return {
|
|
74
68
|
ref: e,
|
|
75
69
|
open: t,
|
|
76
|
-
close:
|
|
70
|
+
close: a,
|
|
77
71
|
isOpen: i,
|
|
78
|
-
getContext:
|
|
72
|
+
getContext: s
|
|
79
73
|
};
|
|
80
74
|
};
|
|
81
75
|
export {
|
|
82
|
-
|
|
76
|
+
k as default,
|
|
83
77
|
H as useDialogControl
|
|
84
78
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as r } from "../jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { m as o } from "../iconUtils-D0lVAgGT.js";
|
|
3
3
|
const s = o(
|
|
4
|
-
({ size: t = 24, className: e, ...l }) => /* @__PURE__ */ r.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 24 24", fill: "
|
|
5
|
-
/* @__PURE__ */ r.jsx("rect", { width: "24", height: "24", rx: "12", fill: "" }),
|
|
6
|
-
/* @__PURE__ */ r.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M15.6001 9.6C15.6001 11.5882 13.9884 13.2 12.0001 13.2C10.0119 13.2 8.40015 11.5882 8.40015 9.6C8.40015 7.61177 10.0119 6 12.0001 6C13.9884 6 15.6001 7.61177 15.6001 9.6ZM14.4001 9.6C14.4001 10.9255 13.3256 12 12.0001 12C10.6747 12 9.60015 10.9255 9.60015 9.6C9.60015 8.27452 10.6747 7.2 12.0001 7.2C13.3256 7.2 14.4001 8.27452 14.4001 9.6Z", fill: "
|
|
7
|
-
/* @__PURE__ */ r.jsx("path", { d: "M12.0001 15C8.11552 15 4.80571 17.297 3.54492 20.5152C3.85206 20.8202 4.1756 21.1087 4.51412 21.3792C5.45296 18.4246 8.39818 16.2 12.0001 16.2C15.6021 16.2 18.5473 18.4246 19.4862 21.3792C19.8247 21.1087 20.1482 20.8202 20.4554 20.5152C19.1946 17.2971 15.8848 15 12.0001 15Z", fill: "
|
|
4
|
+
({ size: t = 24, className: e, ...l }) => /* @__PURE__ */ r.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 24 24", fill: "none", ...l, className: e, children: [
|
|
5
|
+
/* @__PURE__ */ r.jsx("rect", { width: "24", height: "24", rx: "12", fill: "currentColor" }),
|
|
6
|
+
/* @__PURE__ */ r.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M15.6001 9.6C15.6001 11.5882 13.9884 13.2 12.0001 13.2C10.0119 13.2 8.40015 11.5882 8.40015 9.6C8.40015 7.61177 10.0119 6 12.0001 6C13.9884 6 15.6001 7.61177 15.6001 9.6ZM14.4001 9.6C14.4001 10.9255 13.3256 12 12.0001 12C10.6747 12 9.60015 10.9255 9.60015 9.6C9.60015 8.27452 10.6747 7.2 12.0001 7.2C13.3256 7.2 14.4001 8.27452 14.4001 9.6Z", fill: "#3F3F47" }),
|
|
7
|
+
/* @__PURE__ */ r.jsx("path", { d: "M12.0001 15C8.11552 15 4.80571 17.297 3.54492 20.5152C3.85206 20.8202 4.1756 21.1087 4.51412 21.3792C5.45296 18.4246 8.39818 16.2 12.0001 16.2C15.6021 16.2 18.5473 18.4246 19.4862 21.3792C19.8247 21.1087 20.1482 20.8202 20.4554 20.5152C19.1946 17.2971 15.8848 15 12.0001 15Z", fill: "#3F3F47" })
|
|
8
8
|
] })
|
|
9
9
|
);
|
|
10
10
|
export {
|