prometeo-design-system 2.2.1 → 2.3.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.
- package/dist/Avatar.es.js +1 -1
- package/dist/{Button-DsbEyjth.js → Button-Bc0LYLfg.js} +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-BhFog7j5.js → CardProfile-BiYr6kY9.js} +1 -1
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/CheckboxFormik.es.js +1 -1
- package/dist/DatePicker.es.js +2 -2
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +3 -3
- package/dist/DrawerMobile.es.js +131 -131
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/Icons.es.js +1 -1
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +1 -1
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-p4Pll4Cm.js → LayoutGeneric-jDE96L2N.js} +1 -1
- 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/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/Skeleton.es.js +33 -32
- 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 +1 -1
- package/dist/TabLinks.es.js +1 -1
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Image/GalleryPreview.d.ts +8 -0
- package/dist/components/Image/Image.d.ts +23 -0
- package/dist/components/Image/ImageGallery.d.ts +18 -0
- package/dist/components/Image/LightBox.d.ts +14 -0
- package/dist/components/Image/index.d.ts +5 -0
- package/dist/components/Image/useImageGallery.d.ts +10 -0
- package/dist/exports/Image.d.ts +1 -0
- package/dist/exports/ImageGallery.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/pages/ImagesPage.d.ts +2 -0
- package/dist/preview/ImagePreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +742 -313
- package/package.json +9 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { B as
|
|
3
|
-
import { C as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { InputMultiple as
|
|
13
|
-
import { default as
|
|
14
|
-
import { Menu as
|
|
15
|
-
import { default as
|
|
16
|
-
import { ProfilePictureUpload as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import
|
|
21
|
-
import { Steps as
|
|
22
|
-
import { default as
|
|
23
|
-
import { Switch as
|
|
24
|
-
import { default as
|
|
25
|
-
import { Table as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { Skeleton as
|
|
30
|
-
import { j as a } from "./jsx-runtime-
|
|
31
|
-
import { c as
|
|
32
|
-
import
|
|
33
|
-
import { motion as
|
|
34
|
-
import { u as
|
|
35
|
-
import { L as
|
|
36
|
-
import {
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import { default as
|
|
40
|
-
import { useDropzone as
|
|
41
|
-
import { useIsMobile as
|
|
42
|
-
import { DropZone as
|
|
43
|
-
const
|
|
44
|
-
const [e, o] =
|
|
1
|
+
import { default as ht } from "./Avatar.es.js";
|
|
2
|
+
import { B as $ } from "./Button-Bc0LYLfg.js";
|
|
3
|
+
import { C as gt, a as bt } from "./CardProfile-BiYr6kY9.js";
|
|
4
|
+
import { default as vt } from "./CheckBox.es.js";
|
|
5
|
+
import { default as jt } from "./CheckboxFormik.es.js";
|
|
6
|
+
import { default as Ct, useDialogControl as kt } from "./DialogModal.es.js";
|
|
7
|
+
import { default as It, useDrawerDesktop as Lt } from "./DrawerDesktop.es.js";
|
|
8
|
+
import { default as Rt, useDrawerMobile as Tt } from "./DrawerMobile.es.js";
|
|
9
|
+
import { default as Pt } from "./Header.es.js";
|
|
10
|
+
import { default as Ot } from "./Input.es.js";
|
|
11
|
+
import { default as Et } from "./InputFormik.es.js";
|
|
12
|
+
import { InputMultiple as Mt } from "./InputMultiple.es.js";
|
|
13
|
+
import { default as qt } from "./Logo.es.js";
|
|
14
|
+
import { Menu as Ht } from "./Menu.es.js";
|
|
15
|
+
import { default as Ft } from "./Pagination.es.js";
|
|
16
|
+
import { ProfilePictureUpload as Gt } from "./ProfilePictureUpload.es.js";
|
|
17
|
+
import { default as Kt } from "./ProgressBar.es.js";
|
|
18
|
+
import { default as Zt } from "./Select.es.js";
|
|
19
|
+
import { default as Qt } from "./SelectFormik.es.js";
|
|
20
|
+
import me from "./Spinner.es.js";
|
|
21
|
+
import { Steps as ta } from "./Steps.es.js";
|
|
22
|
+
import { default as ra } from "./SwipeContainer.es.js";
|
|
23
|
+
import { Switch as oa } from "./Switch.es.js";
|
|
24
|
+
import { default as la } from "./DatePicker.es.js";
|
|
25
|
+
import { Table as ca, TableBody as ua, TableCaption as da, TableCell as fa, TableFooter as ma, TableHead as pa, TableHeader as ha, TableRow as xa } from "./Table.es.js";
|
|
26
|
+
import { default as ba } from "./TabLinks.es.js";
|
|
27
|
+
import { default as va } from "./TextArea.es.js";
|
|
28
|
+
import { default as ja } from "./Tooltip.es.js";
|
|
29
|
+
import { Skeleton as pe } from "./Skeleton.es.js";
|
|
30
|
+
import { j as a } from "./jsx-runtime-ByW6EXIE.js";
|
|
31
|
+
import { c as h } from "./cn-B6yFEsav.js";
|
|
32
|
+
import V, { useState as A, useMemo as U, useEffect as E, memo as q, forwardRef as Y, useRef as I, useCallback as b, useImperativeHandle as he, useLayoutEffect as xe, createContext as ge, useContext as be } from "react";
|
|
33
|
+
import { motion as z, AnimatePresence as J } from "framer-motion";
|
|
34
|
+
import { u as Q } from "./LayoutGeneric-jDE96L2N.js";
|
|
35
|
+
import { L as Ca, S as ka } from "./LayoutGeneric-jDE96L2N.js";
|
|
36
|
+
import { Icons as B } from "./Icons.es.js";
|
|
37
|
+
import { useGSAP as ee } from "@gsap/react";
|
|
38
|
+
import D from "gsap";
|
|
39
|
+
import { default as Ia } from "./OtpInput.es.js";
|
|
40
|
+
import { useDropzone as ye } from "react-dropzone";
|
|
41
|
+
import { useIsMobile as Da } from "./useDevice.es.js";
|
|
42
|
+
import { DropZone as Ta } from "./DropZone.es.js";
|
|
43
|
+
const et = (t) => {
|
|
44
|
+
const [e, o] = A({}), { size: r = "medium", color: n = "default", options: s, value: l, name: c, onChange: m, icon: f, allowExpand: u = !1, disabled: x = !1 } = t, p = Math.max(s.findIndex((v) => v.value === l), 0), i = s.length, g = 9, S = 26, w = {
|
|
45
45
|
small: 120,
|
|
46
46
|
medium: 120,
|
|
47
47
|
large: 120
|
|
48
|
-
},
|
|
48
|
+
}, j = {
|
|
49
49
|
small: 94,
|
|
50
50
|
medium: 94,
|
|
51
51
|
large: 94
|
|
52
|
-
},
|
|
52
|
+
}, L = 16, R = {
|
|
53
53
|
small: { container: "p-2" },
|
|
54
54
|
medium: { container: "p-4 h-[48px] rounded-lg" },
|
|
55
55
|
large: { container: "p-6" }
|
|
56
|
-
},
|
|
56
|
+
}, y = {
|
|
57
57
|
default: {
|
|
58
58
|
switch: "bg-primary-medium-default text-neutral-weak-default ",
|
|
59
59
|
container: "border-neutral-default-default",
|
|
@@ -84,79 +84,79 @@ const We = (t) => {
|
|
|
84
84
|
icon: "text-neutral-strong-disabled",
|
|
85
85
|
option: "text-neutral-strong-disabled"
|
|
86
86
|
}
|
|
87
|
-
},
|
|
88
|
-
small:
|
|
89
|
-
medium:
|
|
90
|
-
large:
|
|
87
|
+
}, d = s.find((v) => v.value === l) ?? s[0], N = d.label.length * g + L * 2 + S, C = () => U(() => Object.values(e).reduce((k, T) => k + T, 0) + S, [e]), P = {
|
|
88
|
+
small: u ? C() : (i - 1) * j.small + w.small,
|
|
89
|
+
medium: u ? C() : (i - 1) * j.medium + w.medium,
|
|
90
|
+
large: u ? C() : (i - 1) * j.large + w.large
|
|
91
91
|
};
|
|
92
|
-
|
|
93
|
-
if (!
|
|
94
|
-
let
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}), o(
|
|
92
|
+
E(() => {
|
|
93
|
+
if (!u) return;
|
|
94
|
+
let v = {};
|
|
95
|
+
s.forEach((k, T) => {
|
|
96
|
+
v[T] = k.label.length * g + L * 2;
|
|
97
|
+
}), o(v);
|
|
98
98
|
}, []);
|
|
99
|
-
const
|
|
99
|
+
const M = U(() => u ? Object.values(e).reduce((v, k, T) => T < p ? v + k : v, 0) : Math.max(p * j[r] - 2, 0), [p]), H = () => {
|
|
100
100
|
if (x) return;
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
},
|
|
101
|
+
const v = p === s.length - 1 ? s[0] : s[p + 1];
|
|
102
|
+
m?.(c, v.value);
|
|
103
|
+
}, O = x ? "disabled" : n;
|
|
104
104
|
return /* @__PURE__ */ a.jsxs(
|
|
105
105
|
"button",
|
|
106
106
|
{
|
|
107
|
-
name:
|
|
107
|
+
name: c,
|
|
108
108
|
type: "button",
|
|
109
109
|
id: "segmented-button-container",
|
|
110
110
|
style: {
|
|
111
|
-
width:
|
|
112
|
-
minWidth:
|
|
113
|
-
maxWidth:
|
|
111
|
+
width: P[r],
|
|
112
|
+
minWidth: P[r],
|
|
113
|
+
maxWidth: P[r]
|
|
114
114
|
},
|
|
115
|
-
className:
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
className: h(
|
|
116
|
+
R[r].container,
|
|
117
|
+
y[O].container,
|
|
118
118
|
"border-[1px]",
|
|
119
119
|
!x && "cursor-pointer",
|
|
120
120
|
"relative"
|
|
121
121
|
),
|
|
122
122
|
children: [
|
|
123
123
|
/* @__PURE__ */ a.jsxs(
|
|
124
|
-
|
|
124
|
+
z.div,
|
|
125
125
|
{
|
|
126
126
|
id: "segmented-button-switcher",
|
|
127
127
|
animate: {
|
|
128
|
-
left: `${
|
|
129
|
-
width:
|
|
130
|
-
minWidth:
|
|
131
|
-
maxWidth:
|
|
128
|
+
left: `${M}px`,
|
|
129
|
+
width: u ? N : w[r],
|
|
130
|
+
minWidth: u ? N : w[r],
|
|
131
|
+
maxWidth: u ? N : w[r]
|
|
132
132
|
},
|
|
133
133
|
transition: {
|
|
134
134
|
type: "spring",
|
|
135
135
|
stiffness: 260,
|
|
136
136
|
damping: 30
|
|
137
137
|
},
|
|
138
|
-
className:
|
|
138
|
+
className: h(
|
|
139
139
|
"absolute top-0 left-0 h-full rounded-[6px] z-30",
|
|
140
140
|
"flex items-center justify-center gap-[2px] p-4",
|
|
141
|
-
|
|
141
|
+
y[O].switch
|
|
142
142
|
),
|
|
143
143
|
onClick: () => {
|
|
144
|
-
!x &&
|
|
144
|
+
!x && H();
|
|
145
145
|
},
|
|
146
146
|
children: [
|
|
147
|
-
f &&
|
|
147
|
+
f && V.cloneElement(f, { className: h(
|
|
148
148
|
"w-6 h-6 text-neutral-weak-default min-w-6 min-h-6",
|
|
149
|
-
|
|
149
|
+
y[O].icon
|
|
150
150
|
) }),
|
|
151
151
|
/* @__PURE__ */ a.jsx(
|
|
152
152
|
"p",
|
|
153
153
|
{
|
|
154
|
-
className:
|
|
154
|
+
className: h(
|
|
155
155
|
"prometeo-fonts-label-large ",
|
|
156
156
|
" overflow-hidden overflow-ellipsis text-nowrap ",
|
|
157
|
-
|
|
157
|
+
y[O].switch
|
|
158
158
|
),
|
|
159
|
-
children:
|
|
159
|
+
children: d.label
|
|
160
160
|
}
|
|
161
161
|
)
|
|
162
162
|
]
|
|
@@ -166,53 +166,53 @@ const We = (t) => {
|
|
|
166
166
|
"div",
|
|
167
167
|
{
|
|
168
168
|
id: "segmented-button-options",
|
|
169
|
-
className:
|
|
169
|
+
className: h(
|
|
170
170
|
"absolute top-0 left-0 w-full h-full overflow-hidden",
|
|
171
171
|
"flex justify-center"
|
|
172
172
|
),
|
|
173
|
-
children:
|
|
174
|
-
const
|
|
173
|
+
children: s?.map((v, k) => {
|
|
174
|
+
const T = v.value === (l || s[0].value), _ = u ? e[k] + S : w[r], F = u ? e[k] : j[r], W = T ? _ : F;
|
|
175
175
|
return /* @__PURE__ */ a.jsx(
|
|
176
|
-
|
|
176
|
+
z.span,
|
|
177
177
|
{
|
|
178
178
|
id: "segmented-button-option",
|
|
179
179
|
onClick: () => {
|
|
180
|
-
!x &&
|
|
180
|
+
!x && m?.(c, v.value);
|
|
181
181
|
},
|
|
182
182
|
animate: {
|
|
183
|
-
width:
|
|
184
|
-
minWidth:
|
|
185
|
-
maxWidth:
|
|
183
|
+
width: W,
|
|
184
|
+
minWidth: W,
|
|
185
|
+
maxWidth: W
|
|
186
186
|
},
|
|
187
187
|
transition: {
|
|
188
188
|
duration: 0.3,
|
|
189
189
|
delay: 0
|
|
190
190
|
},
|
|
191
|
-
className:
|
|
191
|
+
className: h(
|
|
192
192
|
"z-20 h-full ",
|
|
193
193
|
"flex items-center justify-center px-3 py-[6px]",
|
|
194
194
|
"prometeo-fonts-label-large text-neutral-medium-default",
|
|
195
195
|
" overflow-hidden ",
|
|
196
196
|
!x && "cursor-pointer"
|
|
197
197
|
),
|
|
198
|
-
"aria-label":
|
|
198
|
+
"aria-label": v.label,
|
|
199
199
|
children: /* @__PURE__ */ a.jsx(
|
|
200
200
|
"p",
|
|
201
201
|
{
|
|
202
202
|
style: {
|
|
203
|
-
width:
|
|
204
|
-
minWidth:
|
|
205
|
-
maxWidth:
|
|
203
|
+
width: u ? "max-content" : j[r],
|
|
204
|
+
minWidth: u ? "max-content" : j[r],
|
|
205
|
+
maxWidth: u ? "max-content" : j[r]
|
|
206
206
|
},
|
|
207
|
-
className:
|
|
207
|
+
className: h(
|
|
208
208
|
"px-3 place-content-center overflow-hidden text-ellipsis text-wrap prometeo-fonts-label-large h-full",
|
|
209
|
-
|
|
209
|
+
y[O].option
|
|
210
210
|
),
|
|
211
|
-
children:
|
|
211
|
+
children: v.label
|
|
212
212
|
}
|
|
213
213
|
)
|
|
214
214
|
},
|
|
215
|
-
|
|
215
|
+
v.value
|
|
216
216
|
);
|
|
217
217
|
})
|
|
218
218
|
}
|
|
@@ -220,13 +220,440 @@ const We = (t) => {
|
|
|
220
220
|
]
|
|
221
221
|
}
|
|
222
222
|
);
|
|
223
|
-
},
|
|
224
|
-
|
|
223
|
+
}, te = q(Y(({ images: t, className: e }, o) => {
|
|
224
|
+
const r = I(null), n = I({
|
|
225
|
+
isDragging: !1,
|
|
226
|
+
startX: 0,
|
|
227
|
+
scrollLeft: 0,
|
|
228
|
+
totalDistance: 0,
|
|
229
|
+
lastX: 0,
|
|
230
|
+
lastTime: 0,
|
|
231
|
+
velocity: 0
|
|
232
|
+
}), s = I(null), l = b(() => {
|
|
233
|
+
const i = r.current;
|
|
234
|
+
if (!i) return;
|
|
235
|
+
const g = 0.9;
|
|
236
|
+
Math.abs(n.current.velocity) > 0.5 ? (i.scrollLeft -= n.current.velocity, n.current.velocity *= g, s.current = requestAnimationFrame(l)) : (n.current.velocity = 0, s.current && (cancelAnimationFrame(s.current), s.current = null));
|
|
237
|
+
}, []), c = b((i) => {
|
|
238
|
+
const g = r.current;
|
|
239
|
+
if (!g) return;
|
|
240
|
+
s.current && (cancelAnimationFrame(s.current), s.current = null);
|
|
241
|
+
const S = Date.now();
|
|
242
|
+
n.current = {
|
|
243
|
+
isDragging: !0,
|
|
244
|
+
startX: i.pageX - g.offsetLeft,
|
|
245
|
+
scrollLeft: g.scrollLeft,
|
|
246
|
+
totalDistance: 0,
|
|
247
|
+
lastX: i.pageX - g.offsetLeft,
|
|
248
|
+
lastTime: S,
|
|
249
|
+
velocity: 0
|
|
250
|
+
}, g.style.cursor = "grabbing", g.style.scrollBehavior = "auto", g.style.userSelect = "none";
|
|
251
|
+
}, []), m = b((i) => {
|
|
252
|
+
const g = r.current;
|
|
253
|
+
if (!g || !n.current.isDragging) return;
|
|
254
|
+
i.preventDefault();
|
|
255
|
+
const S = Date.now(), w = i.pageX - g.offsetLeft, j = w - n.current.startX, L = S - n.current.lastTime;
|
|
256
|
+
if (n.current.totalDistance += Math.abs(j), L > 0) {
|
|
257
|
+
const R = w - n.current.lastX;
|
|
258
|
+
n.current.velocity = R / L * 16;
|
|
259
|
+
}
|
|
260
|
+
n.current.lastX = w, n.current.lastTime = S, g.scrollLeft = n.current.scrollLeft - j;
|
|
261
|
+
}, []), f = b(() => {
|
|
262
|
+
const i = r.current;
|
|
263
|
+
i && (i.style.cursor = "grab", i.style.userSelect = "auto", Math.abs(n.current.velocity) > 1 && l(), n.current.isDragging = !1);
|
|
264
|
+
}, [l]), u = b(() => {
|
|
265
|
+
const i = r.current;
|
|
266
|
+
i && n.current.isDragging && (i.style.cursor = "grab", i.style.userSelect = "auto", Math.abs(n.current.velocity) > 1 && l(), n.current.isDragging = !1);
|
|
267
|
+
}, [l]), x = b(() => n.current.totalDistance < 5, []), p = b((i) => {
|
|
268
|
+
x() || (i.preventDefault(), i.stopPropagation());
|
|
269
|
+
}, [x]);
|
|
270
|
+
return /* @__PURE__ */ a.jsx(
|
|
271
|
+
"section",
|
|
272
|
+
{
|
|
273
|
+
ref: r,
|
|
274
|
+
className: h("flex gap-4 w-full overflow-x-auto py-2 relative", e),
|
|
275
|
+
style: {},
|
|
276
|
+
onMouseDown: c,
|
|
277
|
+
onMouseMove: m,
|
|
278
|
+
onMouseUp: f,
|
|
279
|
+
onMouseLeave: u,
|
|
280
|
+
onClickCapture: p,
|
|
281
|
+
"aria-label": "Image gallery",
|
|
282
|
+
children: t && t.length > 0 && t.map((i, g) => V.cloneElement(i, {
|
|
283
|
+
key: i.props.src || g,
|
|
284
|
+
...i.props,
|
|
285
|
+
galleryRef: o,
|
|
286
|
+
allowPreview: !0
|
|
287
|
+
}))
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}));
|
|
291
|
+
te.displayName = "GalleryPreview";
|
|
292
|
+
const ae = q(({ images: t, lightboxClassName: e, closeLightbox: o, showThumbnails: r, thumbnailsClassName: n, currentIndex: s, goToNext: l, goToPrevious: c, goToIndex: m }) => {
|
|
293
|
+
const f = I(null), u = I(null), x = I(null), p = I({
|
|
294
|
+
scale: 1,
|
|
295
|
+
translateX: 0,
|
|
296
|
+
translateY: 0
|
|
297
|
+
}), i = I({
|
|
298
|
+
startX: 0,
|
|
299
|
+
startY: 0,
|
|
300
|
+
isDragging: !1,
|
|
301
|
+
distanceX: 0,
|
|
302
|
+
distanceY: 0
|
|
303
|
+
});
|
|
304
|
+
E(() => {
|
|
305
|
+
x.current && x.current.focus();
|
|
306
|
+
}, []);
|
|
307
|
+
const g = b((d) => {
|
|
308
|
+
d.preventDefault(), d.stopPropagation(), d.key === "Escape" ? o() : d.key === "ArrowLeft" ? c() : d.key === "ArrowRight" && l();
|
|
309
|
+
}, [o, c, l]), S = b((d) => {
|
|
310
|
+
i.current = { startX: d.touches[0].clientX, startY: d.touches[0].clientY, isDragging: !0, distanceX: 0, distanceY: 0 };
|
|
311
|
+
}, []), w = b((d) => {
|
|
312
|
+
const N = d.touches[0];
|
|
313
|
+
i.current = { ...i.current, isDragging: !0, distanceX: N.clientX - i.current.startX, distanceY: N.clientY - i.current.startY };
|
|
314
|
+
}, []), j = b(() => {
|
|
315
|
+
i.current = { ...i.current, startX: 0, startY: 0, isDragging: !1 }, Math.abs(i.current.distanceX) > Math.abs(i.current.distanceY) && (i.current.distanceX < 0 ? l() : c());
|
|
316
|
+
}, [l, c]), L = b(() => {
|
|
317
|
+
const d = f.current;
|
|
318
|
+
if (!d) return;
|
|
319
|
+
const { scale: N, translateX: C, translateY: P } = p.current;
|
|
320
|
+
d.style.transform = `scale(${N}) translate(${C}px, ${P}px)`, d.style.transformOrigin = "center center", d.style.transition = "transform 0.1s ease-out";
|
|
321
|
+
}, []), R = b(() => {
|
|
322
|
+
p.current = { scale: 1, translateX: 0, translateY: 0 }, f.current && (f.current.style.transform = "scale(1) translate(0px, 0px)", f.current.style.transformOrigin = "center center");
|
|
323
|
+
}, []), y = b((d) => {
|
|
324
|
+
const N = f.current, C = u.current;
|
|
325
|
+
if (!N || !C) return;
|
|
326
|
+
if (d.shiftKey) {
|
|
327
|
+
d.deltaY < 0 ? l() : d.deltaY > 0 && c();
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const P = 2e-3, M = 1, H = 8, O = -d.deltaY * P, v = p.current.scale;
|
|
331
|
+
let k = v + O;
|
|
332
|
+
if (k = Math.max(M, Math.min(H, k)), k === M) {
|
|
333
|
+
R();
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
const T = C.getBoundingClientRect(), _ = d.clientX - T.left, F = d.clientY - T.top, W = T.width / 2, se = T.height / 2, le = _ - W, ie = F - se, K = k / v, ce = p.current.translateX, ue = p.current.translateY, de = ce - le * (K - 1) / k, fe = ue - ie * (K - 1) / k;
|
|
337
|
+
p.current = {
|
|
338
|
+
scale: k,
|
|
339
|
+
translateX: de,
|
|
340
|
+
translateY: fe
|
|
341
|
+
}, L();
|
|
342
|
+
}, [l, c, L, R]);
|
|
343
|
+
return t.length === 0 ? null : /* @__PURE__ */ a.jsxs(
|
|
344
|
+
"div",
|
|
345
|
+
{
|
|
346
|
+
ref: x,
|
|
347
|
+
className: h("fixed inset-0 z-50 bg-black/90 flex items-center justify-center lg:px-16", e),
|
|
348
|
+
onClick: o,
|
|
349
|
+
onKeyDown: g,
|
|
350
|
+
onTouchStart: S,
|
|
351
|
+
onTouchMove: w,
|
|
352
|
+
onTouchEnd: j,
|
|
353
|
+
tabIndex: 0,
|
|
354
|
+
role: "dialog",
|
|
355
|
+
"aria-modal": "true",
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ a.jsx("div", { className: "absolute top-4 right-4 z-110", children: /* @__PURE__ */ a.jsx(
|
|
358
|
+
$,
|
|
359
|
+
{
|
|
360
|
+
variant: "text",
|
|
361
|
+
color: "secondary",
|
|
362
|
+
size: "small",
|
|
363
|
+
onClick: o,
|
|
364
|
+
className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
|
|
365
|
+
"aria-label": "Close gallery",
|
|
366
|
+
children: /* @__PURE__ */ a.jsx(B.Close, { size: 24 })
|
|
367
|
+
}
|
|
368
|
+
) }),
|
|
369
|
+
t.length > 1 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
370
|
+
/* @__PURE__ */ a.jsx(
|
|
371
|
+
"div",
|
|
372
|
+
{
|
|
373
|
+
className: "absolute left-0 lg:h-full items-center flex justify-center w-16 z-100 cursor-w-resize",
|
|
374
|
+
onClick: (d) => {
|
|
375
|
+
d.stopPropagation(), c();
|
|
376
|
+
},
|
|
377
|
+
children: /* @__PURE__ */ a.jsx(
|
|
378
|
+
$,
|
|
379
|
+
{
|
|
380
|
+
variant: "text",
|
|
381
|
+
color: "secondary",
|
|
382
|
+
size: "small",
|
|
383
|
+
onClick: (d) => {
|
|
384
|
+
d.stopPropagation(), c();
|
|
385
|
+
},
|
|
386
|
+
className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
|
|
387
|
+
"aria-label": "Previous image",
|
|
388
|
+
children: /* @__PURE__ */ a.jsx(B.CrevronLeft, { size: 24 })
|
|
389
|
+
}
|
|
390
|
+
)
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ a.jsx(
|
|
394
|
+
"div",
|
|
395
|
+
{
|
|
396
|
+
className: "absolute right-0 lg:h-full items-center flex justify-center w-16 z-100 cursor-e-resize",
|
|
397
|
+
onClick: (d) => {
|
|
398
|
+
d.stopPropagation(), l();
|
|
399
|
+
},
|
|
400
|
+
children: /* @__PURE__ */ a.jsx(
|
|
401
|
+
$,
|
|
402
|
+
{
|
|
403
|
+
variant: "text",
|
|
404
|
+
color: "secondary",
|
|
405
|
+
size: "small",
|
|
406
|
+
onClick: (d) => {
|
|
407
|
+
d.stopPropagation(), l();
|
|
408
|
+
},
|
|
409
|
+
className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
|
|
410
|
+
"aria-label": "Next image",
|
|
411
|
+
children: /* @__PURE__ */ a.jsx(B.CrevronRight, { size: 24 })
|
|
412
|
+
}
|
|
413
|
+
)
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
] }),
|
|
417
|
+
/* @__PURE__ */ a.jsx(
|
|
418
|
+
"div",
|
|
419
|
+
{
|
|
420
|
+
ref: u,
|
|
421
|
+
onClick: (d) => d.stopPropagation(),
|
|
422
|
+
className: "relative max-w-[90vw] max-h-[98vh] mx-auto flex flex-col w-max lg:h-full h-max",
|
|
423
|
+
onWheel: y,
|
|
424
|
+
children: /* @__PURE__ */ a.jsx(
|
|
425
|
+
"div",
|
|
426
|
+
{
|
|
427
|
+
className: "max-h-[98vh] relative overflow-hidden w-full h-full",
|
|
428
|
+
style: {
|
|
429
|
+
animation: "galleryFadeIn 0.6s ease-in-out"
|
|
430
|
+
},
|
|
431
|
+
ref: f,
|
|
432
|
+
children: /* @__PURE__ */ a.jsx(
|
|
433
|
+
"img",
|
|
434
|
+
{
|
|
435
|
+
src: t[s].src,
|
|
436
|
+
alt: t[s].alt,
|
|
437
|
+
className: h(
|
|
438
|
+
" w-full h-full object-contain select-none",
|
|
439
|
+
"prometeo-lightbox-image"
|
|
440
|
+
),
|
|
441
|
+
onLoad: () => R()
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
},
|
|
445
|
+
s
|
|
446
|
+
)
|
|
447
|
+
}
|
|
448
|
+
),
|
|
449
|
+
r && /* @__PURE__ */ a.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-[100] bottom-0", children: /* @__PURE__ */ a.jsx(re, { images: t, currentIndex: s, goToIndex: m, thumbnailsClassName: n }) }),
|
|
450
|
+
t.length > 1 && /* @__PURE__ */ a.jsxs("div", { className: "absolute bottom-20 left-1/2 transform -translate-x-1/2 text-neutral-default-default prometeo-fonts-label-xlarge px-4 py-2 rounded-full", children: [
|
|
451
|
+
s + 1,
|
|
452
|
+
" / ",
|
|
453
|
+
t.length
|
|
454
|
+
] })
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
});
|
|
459
|
+
ae.displayName = "LightBox";
|
|
460
|
+
const ve = (t, e) => {
|
|
461
|
+
if (t.currentIndex !== e.currentIndex || t.thumbnailsClassName !== e.thumbnailsClassName || t.images.length !== e.images.length) return !1;
|
|
462
|
+
for (let o = 0; o < t.images.length; o++)
|
|
463
|
+
if (t.images[o].src !== e.images[o].src) return !1;
|
|
464
|
+
return !0;
|
|
465
|
+
}, re = q(({ images: t, currentIndex: e, goToIndex: o, thumbnailsClassName: r }) => /* @__PURE__ */ a.jsxs(
|
|
466
|
+
"div",
|
|
467
|
+
{
|
|
468
|
+
className: "flex gap-4 w-max overflow-x-auto overflow-y-visible max-w-full px-16 py-4",
|
|
469
|
+
style: {
|
|
470
|
+
scrollbarWidth: "none",
|
|
471
|
+
msOverflowStyle: "none",
|
|
472
|
+
WebkitOverflowScrolling: "touch"
|
|
473
|
+
},
|
|
474
|
+
children: [
|
|
475
|
+
/* @__PURE__ */ a.jsx("style", { children: `
|
|
476
|
+
.flex.gap-4.w-max::-webkit-scrollbar {
|
|
477
|
+
display: none;
|
|
478
|
+
}
|
|
479
|
+
` }),
|
|
480
|
+
t.map((n, s) => /* @__PURE__ */ a.jsx(
|
|
481
|
+
"button",
|
|
482
|
+
{
|
|
483
|
+
type: "button",
|
|
484
|
+
onClick: (l) => {
|
|
485
|
+
l.stopPropagation(), o(s);
|
|
486
|
+
},
|
|
487
|
+
className: h(
|
|
488
|
+
"w-16 h-16 aspect-square min-w-16 rounded overflow-hidden transition-all duration-300 hover:scale-125 cursor-pointer",
|
|
489
|
+
r,
|
|
490
|
+
s === e ? "scale-110" : ""
|
|
491
|
+
),
|
|
492
|
+
children: /* @__PURE__ */ a.jsx(
|
|
493
|
+
"img",
|
|
494
|
+
{
|
|
495
|
+
src: n.src,
|
|
496
|
+
alt: n.alt,
|
|
497
|
+
className: "w-full h-full object-cover select-none"
|
|
498
|
+
}
|
|
499
|
+
)
|
|
500
|
+
},
|
|
501
|
+
n.src
|
|
502
|
+
))
|
|
503
|
+
]
|
|
504
|
+
}
|
|
505
|
+
), ve);
|
|
506
|
+
re.displayName = "Thumbnails";
|
|
507
|
+
const we = Y(
|
|
508
|
+
(t, e) => {
|
|
509
|
+
const {
|
|
510
|
+
children: o,
|
|
511
|
+
className: r,
|
|
512
|
+
lightboxClassName: n,
|
|
513
|
+
showThumbnails: s,
|
|
514
|
+
thumbnailsClassName: l
|
|
515
|
+
} = t, [c, m] = A([]), [f, u] = A(!1), [x, p] = A(0), i = o ? Array.isArray(o) ? o : [o] : [], g = b((y) => {
|
|
516
|
+
m((d) => d.some((C) => C.src === y.src) ? d : [...d, y]);
|
|
517
|
+
}, []), S = b((y = 0) => {
|
|
518
|
+
p(y), u(!0);
|
|
519
|
+
}, []), w = b(() => {
|
|
520
|
+
u(!1);
|
|
521
|
+
}, []);
|
|
522
|
+
he(
|
|
523
|
+
e,
|
|
524
|
+
() => ({
|
|
525
|
+
openLightbox: S,
|
|
526
|
+
closeLightbox: w,
|
|
527
|
+
isOpen: f,
|
|
528
|
+
addImage: g,
|
|
529
|
+
images: c
|
|
530
|
+
}),
|
|
531
|
+
[c]
|
|
532
|
+
);
|
|
533
|
+
const j = b(() => {
|
|
534
|
+
p((y) => (y + 1) % c.length);
|
|
535
|
+
}, [c.length]), L = b(() => {
|
|
536
|
+
p((y) => (y - 1 + c.length) % c.length);
|
|
537
|
+
}, [c.length]), R = b((y) => {
|
|
538
|
+
p(y);
|
|
539
|
+
}, []);
|
|
540
|
+
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
541
|
+
/* @__PURE__ */ a.jsx(
|
|
542
|
+
te,
|
|
543
|
+
{
|
|
544
|
+
images: i,
|
|
545
|
+
className: r,
|
|
546
|
+
ref: e
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
f && /* @__PURE__ */ a.jsx(
|
|
550
|
+
ae,
|
|
551
|
+
{
|
|
552
|
+
images: c,
|
|
553
|
+
closeLightbox: w,
|
|
554
|
+
showThumbnails: s,
|
|
555
|
+
lightboxClassName: n,
|
|
556
|
+
thumbnailsClassName: l,
|
|
557
|
+
currentIndex: x,
|
|
558
|
+
goToNext: j,
|
|
559
|
+
goToPrevious: L,
|
|
560
|
+
goToIndex: R
|
|
561
|
+
}
|
|
562
|
+
)
|
|
563
|
+
] });
|
|
564
|
+
}
|
|
565
|
+
);
|
|
566
|
+
we.displayName = "ImageGallery";
|
|
567
|
+
const je = (t, e) => {
|
|
568
|
+
if (t.src !== e.src || t.alt !== e.alt || t.width !== e.width || t.height !== e.height || t.className !== e.className || t.lazy !== e.lazy || t.showLoader !== e.showLoader || t.allowPreview !== e.allowPreview) return !1;
|
|
569
|
+
const o = t.loaderProps, r = e.loaderProps;
|
|
570
|
+
return !(o !== r && (!o || !r || o.loaderType !== r.loaderType || o.variant !== r.variant || o.speedMultiplier !== r.speedMultiplier || o.className !== r.className || o.size !== r.size || o.backdropClassName !== r.backdropClassName));
|
|
571
|
+
}, Ne = q(
|
|
572
|
+
(t) => {
|
|
573
|
+
const { src: e, alt: o, width: r, height: n, className: s, lazy: l = !0, showLoader: c = !0, loaderProps: m, allowPreview: f = !1, galleryRef: u } = t, { variant: x = "clip", speedMultiplier: p = 0.7, className: i, size: g = 48, backdropClassName: S, loaderType: w = "clasic" } = m || {}, [j, L] = A(!0), R = I(!1), y = b((N) => {
|
|
574
|
+
const C = new Image();
|
|
575
|
+
C.src = N, C.onload = () => {
|
|
576
|
+
L(!1);
|
|
577
|
+
}, C.onerror = () => {
|
|
578
|
+
L(!1);
|
|
579
|
+
};
|
|
580
|
+
}, []);
|
|
581
|
+
E(() => {
|
|
582
|
+
y(e);
|
|
583
|
+
}, [e, y]), E(() => {
|
|
584
|
+
u?.current && !R.current && (u.current.addImage({ src: e, alt: o, width: r, height: n, className: s }), R.current = !0);
|
|
585
|
+
}, [u, e, o, r, n, s]);
|
|
586
|
+
const d = b(() => {
|
|
587
|
+
if (f && u?.current) {
|
|
588
|
+
const C = u.current.images.findIndex((P) => P.src === e);
|
|
589
|
+
u.current.openLightbox(C >= 0 ? C : 0);
|
|
590
|
+
}
|
|
591
|
+
}, [f, u, e]);
|
|
592
|
+
return (
|
|
593
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: false positive
|
|
594
|
+
/* @__PURE__ */ a.jsxs(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
className: h(
|
|
598
|
+
"relative rounded-2xl overflow-hidden select-none",
|
|
599
|
+
f && u && "cursor-pointer hover:brightness-75 transition-all ease-in-out duration-300",
|
|
600
|
+
s
|
|
601
|
+
),
|
|
602
|
+
style: {
|
|
603
|
+
width: r,
|
|
604
|
+
height: n,
|
|
605
|
+
minWidth: r,
|
|
606
|
+
minHeight: n
|
|
607
|
+
},
|
|
608
|
+
onClick: d,
|
|
609
|
+
role: f ? "button" : void 0,
|
|
610
|
+
tabIndex: f ? 0 : void 0,
|
|
611
|
+
onKeyDown: f ? (N) => {
|
|
612
|
+
(N.key === "Enter" || N.key === " ") && (N.preventDefault(), d());
|
|
613
|
+
} : void 0,
|
|
614
|
+
children: [
|
|
615
|
+
/* @__PURE__ */ a.jsx(
|
|
616
|
+
"img",
|
|
617
|
+
{
|
|
618
|
+
draggable: !1,
|
|
619
|
+
src: e,
|
|
620
|
+
alt: o,
|
|
621
|
+
className: h("object-cover", s, "w-full h-full"),
|
|
622
|
+
loading: l ? "lazy" : "eager"
|
|
623
|
+
}
|
|
624
|
+
),
|
|
625
|
+
j && c && /* @__PURE__ */ a.jsx(
|
|
626
|
+
"div",
|
|
627
|
+
{
|
|
628
|
+
className: h(
|
|
629
|
+
"absolute grid place-items-center",
|
|
630
|
+
"inset-0",
|
|
631
|
+
w === "skeleton" ? "bg-inherit" : "bg-black/30",
|
|
632
|
+
S
|
|
633
|
+
),
|
|
634
|
+
children: w === "clasic" ? /* @__PURE__ */ a.jsx(me, { variant: x, speedMultiplier: p, loading: j, className: i, size: g }) : /* @__PURE__ */ a.jsx(
|
|
635
|
+
pe,
|
|
636
|
+
{
|
|
637
|
+
className: "w-full h-full z-100"
|
|
638
|
+
}
|
|
639
|
+
)
|
|
640
|
+
}
|
|
641
|
+
)
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
)
|
|
645
|
+
);
|
|
646
|
+
},
|
|
647
|
+
je
|
|
648
|
+
);
|
|
649
|
+
Ne.displayName = "Image";
|
|
650
|
+
const Ce = (t, e) => {
|
|
651
|
+
ee(
|
|
225
652
|
() => {
|
|
226
653
|
if (!t.current) return;
|
|
227
654
|
const o = t.current, r = document.querySelector('[data-main-content="true"]');
|
|
228
655
|
if (e) {
|
|
229
|
-
|
|
656
|
+
D.fromTo(
|
|
230
657
|
o,
|
|
231
658
|
{
|
|
232
659
|
width: "0rem",
|
|
@@ -238,13 +665,13 @@ const We = (t) => {
|
|
|
238
665
|
duration: 0.4,
|
|
239
666
|
ease: "power2.out"
|
|
240
667
|
}
|
|
241
|
-
), r &&
|
|
668
|
+
), r && D.to(r, {
|
|
242
669
|
marginLeft: o.offsetWidth + "px",
|
|
243
670
|
duration: 0.4,
|
|
244
671
|
ease: "power2.out"
|
|
245
672
|
});
|
|
246
673
|
const n = o.querySelectorAll(".secondary-bar-content > *");
|
|
247
|
-
n.length > 0 &&
|
|
674
|
+
n.length > 0 && D.fromTo(
|
|
248
675
|
n,
|
|
249
676
|
{
|
|
250
677
|
y: 20,
|
|
@@ -260,12 +687,12 @@ const We = (t) => {
|
|
|
260
687
|
}
|
|
261
688
|
);
|
|
262
689
|
} else
|
|
263
|
-
|
|
690
|
+
D.to(o, {
|
|
264
691
|
width: "0rem",
|
|
265
692
|
opacity: 0,
|
|
266
693
|
duration: 0.3,
|
|
267
694
|
ease: "power2.in"
|
|
268
|
-
}), r &&
|
|
695
|
+
}), r && D.to(r, {
|
|
269
696
|
marginLeft: "0px",
|
|
270
697
|
duration: 0.3,
|
|
271
698
|
ease: "power2.in"
|
|
@@ -273,79 +700,79 @@ const We = (t) => {
|
|
|
273
700
|
},
|
|
274
701
|
{ scope: t, dependencies: [e] }
|
|
275
702
|
);
|
|
276
|
-
},
|
|
703
|
+
}, Z = ({
|
|
277
704
|
children: t,
|
|
278
705
|
isOpen: e = !1,
|
|
279
706
|
className: o = "",
|
|
280
707
|
width: r = "w-96",
|
|
281
708
|
action: n,
|
|
282
|
-
primarySidebarCollapsed:
|
|
283
|
-
onClose:
|
|
709
|
+
primarySidebarCollapsed: s,
|
|
710
|
+
onClose: l
|
|
284
711
|
}) => {
|
|
285
|
-
const
|
|
286
|
-
return
|
|
287
|
-
if (
|
|
288
|
-
const x =
|
|
712
|
+
const c = I(null), [m, f] = A({ left: 0, width: 0 }), { primarySidebarRef: u } = Q();
|
|
713
|
+
return xe(() => {
|
|
714
|
+
if (u?.current) {
|
|
715
|
+
const x = u.current.getBoundingClientRect();
|
|
289
716
|
f({
|
|
290
717
|
left: x.width,
|
|
291
718
|
width: x.width
|
|
292
719
|
});
|
|
293
720
|
}
|
|
294
|
-
}, [
|
|
721
|
+
}, [u, e, s]), Ce(c, e), /* @__PURE__ */ a.jsx(a.Fragment, { children: e && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
295
722
|
/* @__PURE__ */ a.jsx(
|
|
296
723
|
"div",
|
|
297
724
|
{
|
|
298
725
|
className: "fixed inset-0 bg-black/95 z-20",
|
|
299
726
|
style: {
|
|
300
|
-
left:
|
|
727
|
+
left: m.left
|
|
301
728
|
},
|
|
302
|
-
onClick:
|
|
729
|
+
onClick: l
|
|
303
730
|
}
|
|
304
731
|
),
|
|
305
732
|
/* @__PURE__ */ a.jsx(
|
|
306
733
|
"div",
|
|
307
734
|
{
|
|
308
|
-
ref:
|
|
309
|
-
className:
|
|
735
|
+
ref: c,
|
|
736
|
+
className: h(
|
|
310
737
|
"h-screen bg-neutral-default-default border-r-1 border-neutral-strong-default flex flex-col secondary-bar flex-shrink-0",
|
|
311
738
|
"absolute top-0 z-30",
|
|
312
739
|
r,
|
|
313
740
|
o
|
|
314
741
|
),
|
|
315
742
|
style: {
|
|
316
|
-
left:
|
|
743
|
+
left: m.left
|
|
317
744
|
},
|
|
318
745
|
"data-action": n,
|
|
319
746
|
children: /* @__PURE__ */ a.jsx("div", { className: "secondary-bar-content", children: t })
|
|
320
747
|
}
|
|
321
748
|
)
|
|
322
749
|
] }) });
|
|
323
|
-
},
|
|
324
|
-
Root:
|
|
325
|
-
Header:
|
|
326
|
-
Content:
|
|
327
|
-
Footer:
|
|
328
|
-
Spacer:
|
|
329
|
-
}),
|
|
750
|
+
}, ke = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: h("h-16 ", e), children: t }), Se = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: h("flex-1 overflow-y-auto p-4", e), children: t }), Ie = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: h("p-4 border-t border-neutral-strong-default", e), children: t }), Le = ({ className: t }) => /* @__PURE__ */ a.jsx("div", { className: h("flex-1", t) }), tt = Object.assign(Z, {
|
|
751
|
+
Root: Z,
|
|
752
|
+
Header: ke,
|
|
753
|
+
Content: Se,
|
|
754
|
+
Footer: Ie,
|
|
755
|
+
Spacer: Le
|
|
756
|
+
}), ne = ge(
|
|
330
757
|
void 0
|
|
331
|
-
),
|
|
332
|
-
const t =
|
|
758
|
+
), at = () => {
|
|
759
|
+
const t = be(ne);
|
|
333
760
|
if (!t)
|
|
334
761
|
throw new Error("useSidebar must be used within a Sidebar.Root");
|
|
335
762
|
return t;
|
|
336
|
-
},
|
|
763
|
+
}, De = ({
|
|
337
764
|
children: t
|
|
338
765
|
}) => {
|
|
339
|
-
const [e, o] =
|
|
766
|
+
const [e, o] = A(!1), [r, n] = A(!1), s = I(null), l = () => {
|
|
340
767
|
o(!1), n(!1);
|
|
341
|
-
},
|
|
768
|
+
}, c = () => {
|
|
342
769
|
o(!0), n(!1);
|
|
343
770
|
}, p = {
|
|
344
771
|
isCollapsed: e,
|
|
345
772
|
setIsCollapsed: o,
|
|
346
|
-
navbarRef:
|
|
773
|
+
navbarRef: s,
|
|
347
774
|
toggleCollapse: () => {
|
|
348
|
-
e ?
|
|
775
|
+
e ? l() : c();
|
|
349
776
|
},
|
|
350
777
|
activeSecondaryBar: r ? "notifications" : null,
|
|
351
778
|
openSecondaryBar: () => {
|
|
@@ -355,22 +782,22 @@ const We = (t) => {
|
|
|
355
782
|
n(!1);
|
|
356
783
|
},
|
|
357
784
|
toggleSecondaryBar: () => {
|
|
358
|
-
n((
|
|
785
|
+
n((i) => !i);
|
|
359
786
|
}
|
|
360
787
|
};
|
|
361
|
-
return /* @__PURE__ */ a.jsx(
|
|
362
|
-
},
|
|
363
|
-
|
|
788
|
+
return /* @__PURE__ */ a.jsx(ne.Provider, { value: p, children: t });
|
|
789
|
+
}, X = (t, e, o, r) => e && (Array.isArray(e) ? e.length > 0 : e) ? t.to(e, o, r) : t, Re = (t, e, o) => {
|
|
790
|
+
ee(
|
|
364
791
|
() => {
|
|
365
792
|
if (!t.current) return;
|
|
366
|
-
const r =
|
|
793
|
+
const r = D.timeline({
|
|
367
794
|
defaults: { duration: 0.7, ease: "power1.out" }
|
|
368
795
|
}), n = {
|
|
369
796
|
navbar: t.current,
|
|
370
|
-
navLabels:
|
|
371
|
-
navIconWrappers:
|
|
372
|
-
navIcons:
|
|
373
|
-
navLinkItems:
|
|
797
|
+
navLabels: D.utils.toArray(".nav-label"),
|
|
798
|
+
navIconWrappers: D.utils.toArray(".nav-icon-wrapper"),
|
|
799
|
+
navIcons: D.utils.toArray(".nav-icon"),
|
|
800
|
+
navLinkItems: D.utils.toArray(".nav-link-item"),
|
|
374
801
|
logoutButton: document.querySelector(".logout-button"),
|
|
375
802
|
logoutLabel: document.querySelector(".logout-label"),
|
|
376
803
|
logoutIcon: document.querySelector(".logout-icon"),
|
|
@@ -398,14 +825,14 @@ const We = (t) => {
|
|
|
398
825
|
),
|
|
399
826
|
// Secondary bar elements
|
|
400
827
|
secondaryBar: document.querySelector(".secondary-bar"),
|
|
401
|
-
secondaryBarContent:
|
|
402
|
-
badgeInLink:
|
|
828
|
+
secondaryBarContent: D.utils.toArray(".secondary-bar *"),
|
|
829
|
+
badgeInLink: D.utils.toArray(".badge-in-link")
|
|
403
830
|
};
|
|
404
|
-
e ?
|
|
831
|
+
e ? Te(r, n) : ze(r, n), n.secondaryBar && Pe(n.secondaryBar);
|
|
405
832
|
},
|
|
406
833
|
{ scope: t, dependencies: [e, o] }
|
|
407
834
|
);
|
|
408
|
-
},
|
|
835
|
+
}, Te = (t, e) => {
|
|
409
836
|
t.to(e.navbar, {
|
|
410
837
|
width: "5rem",
|
|
411
838
|
duration: 0.2,
|
|
@@ -464,7 +891,7 @@ const We = (t) => {
|
|
|
464
891
|
marginLeft: 0
|
|
465
892
|
},
|
|
466
893
|
0
|
|
467
|
-
).to(e.navIcons, { scale: 0.95, ease: "elastic.out(1, 0.3)" }, 0),
|
|
894
|
+
).to(e.navIcons, { scale: 0.95, ease: "elastic.out(1, 0.3)" }, 0), X(
|
|
468
895
|
t,
|
|
469
896
|
e.buttonCrevron,
|
|
470
897
|
{
|
|
@@ -477,7 +904,7 @@ const We = (t) => {
|
|
|
477
904
|
}
|
|
478
905
|
},
|
|
479
906
|
0
|
|
480
|
-
),
|
|
907
|
+
), X(
|
|
481
908
|
t,
|
|
482
909
|
e.buttonContentChevron,
|
|
483
910
|
{
|
|
@@ -544,7 +971,7 @@ const We = (t) => {
|
|
|
544
971
|
},
|
|
545
972
|
-1
|
|
546
973
|
);
|
|
547
|
-
},
|
|
974
|
+
}, ze = (t, e) => {
|
|
548
975
|
t.to(e.navbar, { width: "20rem" }, -1).to(
|
|
549
976
|
e.navLinkItems,
|
|
550
977
|
{
|
|
@@ -554,7 +981,7 @@ const We = (t) => {
|
|
|
554
981
|
justifyContent: "flex-start"
|
|
555
982
|
},
|
|
556
983
|
-1
|
|
557
|
-
),
|
|
984
|
+
), X(
|
|
558
985
|
t,
|
|
559
986
|
e.buttonCrevron,
|
|
560
987
|
{
|
|
@@ -567,7 +994,7 @@ const We = (t) => {
|
|
|
567
994
|
}
|
|
568
995
|
},
|
|
569
996
|
0
|
|
570
|
-
),
|
|
997
|
+
), X(
|
|
571
998
|
t,
|
|
572
999
|
e.buttonContentChevron,
|
|
573
1000
|
{
|
|
@@ -672,53 +1099,53 @@ const We = (t) => {
|
|
|
672
1099
|
},
|
|
673
1100
|
0
|
|
674
1101
|
).to(e.navIcons, { scale: 1 }, 0.3);
|
|
675
|
-
},
|
|
676
|
-
|
|
1102
|
+
}, Pe = (t, e) => {
|
|
1103
|
+
D.to(t, {
|
|
677
1104
|
x: "-100%",
|
|
678
1105
|
opacity: 0,
|
|
679
1106
|
duration: 0.3,
|
|
680
1107
|
ease: "power2.in"
|
|
681
1108
|
});
|
|
682
|
-
},
|
|
683
|
-
const [e, o] =
|
|
684
|
-
|
|
685
|
-
r.current?.style.setProperty("--tab-bg",
|
|
686
|
-
}, [
|
|
687
|
-
const
|
|
1109
|
+
}, Ae = (t) => {
|
|
1110
|
+
const [e, o] = A(t?.currentTabName || t.tabs[0].name), r = I(null), { tabs: n = [], className: s, activeColor: l = "var(--neutral-900)" } = t;
|
|
1111
|
+
E(() => {
|
|
1112
|
+
r.current?.style.setProperty("--tab-bg", l);
|
|
1113
|
+
}, [l]);
|
|
1114
|
+
const c = n.find((m) => m.name === (t?.currentTabName || e));
|
|
688
1115
|
return /* @__PURE__ */ a.jsx(
|
|
689
1116
|
"div",
|
|
690
1117
|
{
|
|
691
|
-
className:
|
|
1118
|
+
className: h(
|
|
692
1119
|
"flex flex-col gap-2",
|
|
693
1120
|
"bg-neutral-strong-default",
|
|
694
1121
|
"h-full w-14 max-w-14 pl-[6px] py-6",
|
|
695
1122
|
" border-r-[1px] border-neutral-default-default",
|
|
696
|
-
|
|
1123
|
+
s
|
|
697
1124
|
),
|
|
698
1125
|
children: n.map(
|
|
699
|
-
(
|
|
700
|
-
const
|
|
701
|
-
|
|
1126
|
+
(m, f) => {
|
|
1127
|
+
const u = m.name === c?.name, x = typeof m.thumbnail == "string" ? /* @__PURE__ */ a.jsx("img", { src: m.thumbnail, alt: m.description, className: "aspect-square object-contain" }) : m.thumbnail, p = () => {
|
|
1128
|
+
m.disabled || (o(m.name), m.onClick && m.onClick(m.name));
|
|
702
1129
|
};
|
|
703
1130
|
return /* @__PURE__ */ a.jsx(
|
|
704
1131
|
"div",
|
|
705
1132
|
{
|
|
706
|
-
className:
|
|
1133
|
+
className: h(
|
|
707
1134
|
"bg-[var(--tab-bg)]",
|
|
708
1135
|
"h-12 w-[50px] z-20",
|
|
709
1136
|
"flex items-center pl-[6px] ",
|
|
710
1137
|
"rounded-l-[8px]",
|
|
711
1138
|
"tabswitch-element relative",
|
|
712
|
-
|
|
1139
|
+
u && "active"
|
|
713
1140
|
),
|
|
714
1141
|
onClick: p,
|
|
715
1142
|
ref: r,
|
|
716
|
-
children: /* @__PURE__ */ a.jsx("div", { className:
|
|
1143
|
+
children: /* @__PURE__ */ a.jsx("div", { className: h(
|
|
717
1144
|
"size-8 rounded-[4px]",
|
|
718
1145
|
"grid place-items-center",
|
|
719
1146
|
"tab-thumbnail-icon",
|
|
720
1147
|
"bg-transparent text-neutral-default-default",
|
|
721
|
-
|
|
1148
|
+
m?.className
|
|
722
1149
|
), children: x })
|
|
723
1150
|
},
|
|
724
1151
|
f
|
|
@@ -727,18 +1154,18 @@ const We = (t) => {
|
|
|
727
1154
|
)
|
|
728
1155
|
}
|
|
729
1156
|
);
|
|
730
|
-
},
|
|
731
|
-
({ children: t, isCollapsed: e = !1, className: o = "", tabs: r = [], currentTabName: n },
|
|
732
|
-
const
|
|
733
|
-
|
|
734
|
-
}, [
|
|
735
|
-
return
|
|
736
|
-
|
|
737
|
-
}, [
|
|
1157
|
+
}, Oe = Y(
|
|
1158
|
+
({ children: t, isCollapsed: e = !1, className: o = "", tabs: r = [], currentTabName: n }, s) => {
|
|
1159
|
+
const l = I(null), { registerPrimarySidebar: c } = Q(), m = b((f) => {
|
|
1160
|
+
l.current = f, typeof s == "function" ? s(f) : s && (s.current = f);
|
|
1161
|
+
}, [s]);
|
|
1162
|
+
return E(() => {
|
|
1163
|
+
l.current && c(l);
|
|
1164
|
+
}, [c]), Re(l, e, !1), /* @__PURE__ */ a.jsxs("div", { className: h(
|
|
738
1165
|
"flex"
|
|
739
1166
|
), children: [
|
|
740
1167
|
r.length > 0 && /* @__PURE__ */ a.jsx(
|
|
741
|
-
|
|
1168
|
+
Ae,
|
|
742
1169
|
{
|
|
743
1170
|
tabs: r,
|
|
744
1171
|
activeColor: "var(--neutral-900)",
|
|
@@ -748,7 +1175,7 @@ const We = (t) => {
|
|
|
748
1175
|
/* @__PURE__ */ a.jsx(
|
|
749
1176
|
"div",
|
|
750
1177
|
{
|
|
751
|
-
ref:
|
|
1178
|
+
ref: m,
|
|
752
1179
|
className: `bg-neutral-default-default hidden overflow-hidden h-screen md:flex flex-col border-r border-neutral-strong-default transition-all duration-300 relative z-50 flex-shrink-0
|
|
753
1180
|
${e ? "w-16" : "w-64"} ${o}`,
|
|
754
1181
|
children: t
|
|
@@ -756,20 +1183,20 @@ const We = (t) => {
|
|
|
756
1183
|
)
|
|
757
1184
|
] });
|
|
758
1185
|
}
|
|
759
|
-
),
|
|
760
|
-
(t, e) => /* @__PURE__ */ a.jsx(
|
|
1186
|
+
), G = Y(
|
|
1187
|
+
(t, e) => /* @__PURE__ */ a.jsx(De, { children: /* @__PURE__ */ a.jsx(Oe, { ...t, ref: e }) })
|
|
761
1188
|
);
|
|
762
|
-
|
|
763
|
-
const
|
|
1189
|
+
G.displayName = "SidebarRoot";
|
|
1190
|
+
const Be = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("div", { className: h("flex mt-5 mb-4 justify-end mr-5 container-icon-collapsade", t && ""), children: /* @__PURE__ */ a.jsx(
|
|
764
1191
|
"button",
|
|
765
1192
|
{
|
|
766
1193
|
onClick: e,
|
|
767
1194
|
title: t ? "Expandir Navbar" : "Contraer Navbar",
|
|
768
1195
|
"aria-label": t ? "Expandir Navbar" : "Contraer Navbar",
|
|
769
1196
|
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
770
|
-
children: t ? /* @__PURE__ */ a.jsx(
|
|
1197
|
+
children: t ? /* @__PURE__ */ a.jsx(B.CloseNavBarDesktop, { size: 24, className: "rotate-180 transition-transform duration-300" }) : /* @__PURE__ */ a.jsx(B.CloseNavBarDesktop, { size: 24, className: "rotate-0 transition-transform duration-300" })
|
|
771
1198
|
}
|
|
772
|
-
) }),
|
|
1199
|
+
) }), Ee = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: `${e} sidebar-header`, children: t }), We = ({ className: t }) => /* @__PURE__ */ a.jsx("div", { className: h("px-3 flex justify-center items-center w-full mb-4", t), children: /* @__PURE__ */ a.jsx("div", { className: "border-b border-neutral-strong-default border-1 w-full" }) }), Me = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: e, children: t }), Xe = ({ className: t, size: e = "auto" }) => {
|
|
773
1200
|
const o = () => {
|
|
774
1201
|
switch (e) {
|
|
775
1202
|
case "auto":
|
|
@@ -782,37 +1209,37 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
782
1209
|
return "h-8 w-8";
|
|
783
1210
|
}
|
|
784
1211
|
};
|
|
785
|
-
return /* @__PURE__ */ a.jsx("div", { className:
|
|
786
|
-
},
|
|
787
|
-
Root:
|
|
788
|
-
CollapseButton:
|
|
789
|
-
Header:
|
|
790
|
-
Divider:
|
|
791
|
-
Content:
|
|
792
|
-
Spacer:
|
|
793
|
-
Footer:
|
|
794
|
-
}),
|
|
1212
|
+
return /* @__PURE__ */ a.jsx("div", { className: h(o(), t) });
|
|
1213
|
+
}, qe = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: e, children: t }), rt = Object.assign(G, {
|
|
1214
|
+
Root: G,
|
|
1215
|
+
CollapseButton: Be,
|
|
1216
|
+
Header: Ee,
|
|
1217
|
+
Divider: We,
|
|
1218
|
+
Content: Me,
|
|
1219
|
+
Spacer: Xe,
|
|
1220
|
+
Footer: qe
|
|
1221
|
+
}), nt = ({
|
|
795
1222
|
children: t,
|
|
796
1223
|
icon: e,
|
|
797
1224
|
label: o,
|
|
798
1225
|
href: r,
|
|
799
1226
|
onClick: n,
|
|
800
|
-
isActive:
|
|
801
|
-
className:
|
|
1227
|
+
isActive: s = !1,
|
|
1228
|
+
className: l
|
|
802
1229
|
}) => {
|
|
803
|
-
const
|
|
1230
|
+
const c = r ? "a" : "button";
|
|
804
1231
|
return /* @__PURE__ */ a.jsxs(
|
|
805
|
-
|
|
1232
|
+
c,
|
|
806
1233
|
{
|
|
807
1234
|
href: r,
|
|
808
1235
|
onClick: n,
|
|
809
|
-
className:
|
|
1236
|
+
className: h(
|
|
810
1237
|
"nav-link-item",
|
|
811
1238
|
"flex items-center w-full px-3 py-2 text-left",
|
|
812
1239
|
"hover:bg-neutral-medium-default transition-colors rounded-lg",
|
|
813
1240
|
"focus:outline-none focus:ring-2 focus:ring-primary-default-default",
|
|
814
|
-
|
|
815
|
-
|
|
1241
|
+
s && "bg-neutral-medium-default",
|
|
1242
|
+
l
|
|
816
1243
|
),
|
|
817
1244
|
children: [
|
|
818
1245
|
e && /* @__PURE__ */ a.jsx("div", { className: "nav-icon-wrapper mr-3 flex-shrink-0", children: /* @__PURE__ */ a.jsx("div", { className: "nav-icon flex items-center justify-center w-5 h-5", children: e }) }),
|
|
@@ -821,17 +1248,17 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
821
1248
|
]
|
|
822
1249
|
}
|
|
823
1250
|
);
|
|
824
|
-
},
|
|
1251
|
+
}, oe = ({
|
|
825
1252
|
count: t,
|
|
826
1253
|
maxCount: e = 9,
|
|
827
1254
|
className: o = "",
|
|
828
1255
|
size: r = "medium",
|
|
829
1256
|
variant: n = "primary",
|
|
830
|
-
showZero:
|
|
1257
|
+
showZero: s = !1
|
|
831
1258
|
}) => {
|
|
832
|
-
const
|
|
833
|
-
if (
|
|
834
|
-
const
|
|
1259
|
+
const l = t, c = l > e ? `+${e}` : l;
|
|
1260
|
+
if (l === 0 && !s) return null;
|
|
1261
|
+
const m = {
|
|
835
1262
|
small: "w-4.5 h-4.5 text-xs ",
|
|
836
1263
|
medium: "w-5 h-5 text-xs",
|
|
837
1264
|
large: "w-6 h-6 text-sm"
|
|
@@ -842,20 +1269,20 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
842
1269
|
warning: "bg-yellow-500 text-black",
|
|
843
1270
|
danger: "bg-red-500 text-white"
|
|
844
1271
|
};
|
|
845
|
-
return /* @__PURE__ */ a.jsx("div", { className:
|
|
1272
|
+
return /* @__PURE__ */ a.jsx("div", { className: h(
|
|
846
1273
|
"rounded-full flex items-center justify-center font-medium ",
|
|
847
|
-
|
|
1274
|
+
m[r],
|
|
848
1275
|
f[n],
|
|
849
1276
|
o
|
|
850
|
-
), children: /* @__PURE__ */ a.jsx("span", { children:
|
|
851
|
-
},
|
|
1277
|
+
), children: /* @__PURE__ */ a.jsx("span", { children: c }) });
|
|
1278
|
+
}, ot = ({
|
|
852
1279
|
linkActions: t,
|
|
853
1280
|
onClick: e,
|
|
854
1281
|
activeAction: o
|
|
855
1282
|
}) => /* @__PURE__ */ a.jsx("nav", { className: "flex flex-col gap-1", children: t?.map((r, n) => {
|
|
856
|
-
const { isView:
|
|
1283
|
+
const { isView: s = !1, actionName: l, title: c, icon: m, count: f, viewAccess: u } = r || {}, x = (typeof s == "function" ? s() : s !== !1) && (!u || u()), p = o === l;
|
|
857
1284
|
return x && /* @__PURE__ */ a.jsx(
|
|
858
|
-
|
|
1285
|
+
z.div,
|
|
859
1286
|
{
|
|
860
1287
|
initial: { opacity: 0 },
|
|
861
1288
|
animate: { opacity: 1 },
|
|
@@ -869,17 +1296,17 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
869
1296
|
"button",
|
|
870
1297
|
{
|
|
871
1298
|
onClick: () => {
|
|
872
|
-
e?.(
|
|
1299
|
+
e?.(l);
|
|
873
1300
|
},
|
|
874
|
-
className:
|
|
1301
|
+
className: h(
|
|
875
1302
|
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
876
1303
|
"transition-all duration-300 ease-out w-full",
|
|
877
1304
|
"group hover:bg-neutral-medium-selected",
|
|
878
1305
|
p ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
879
1306
|
),
|
|
880
1307
|
children: [
|
|
881
|
-
/* @__PURE__ */ a.jsx(
|
|
882
|
-
|
|
1308
|
+
/* @__PURE__ */ a.jsx(J, { mode: "wait", children: p && /* @__PURE__ */ a.jsx(
|
|
1309
|
+
z.div,
|
|
883
1310
|
{
|
|
884
1311
|
layoutId: "nav-active-bg",
|
|
885
1312
|
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
@@ -894,7 +1321,7 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
894
1321
|
}
|
|
895
1322
|
) }),
|
|
896
1323
|
/* @__PURE__ */ a.jsxs(
|
|
897
|
-
|
|
1324
|
+
z.div,
|
|
898
1325
|
{
|
|
899
1326
|
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
900
1327
|
animate: {
|
|
@@ -907,7 +1334,7 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
907
1334
|
children: [
|
|
908
1335
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
909
1336
|
/* @__PURE__ */ a.jsx(
|
|
910
|
-
|
|
1337
|
+
z.div,
|
|
911
1338
|
{
|
|
912
1339
|
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
913
1340
|
animate: {
|
|
@@ -917,18 +1344,18 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
917
1344
|
duration: 0.25,
|
|
918
1345
|
ease: "easeOut"
|
|
919
1346
|
},
|
|
920
|
-
children: typeof
|
|
1347
|
+
children: typeof m == "function" ? m({
|
|
921
1348
|
size: 24,
|
|
922
|
-
className:
|
|
1349
|
+
className: h(
|
|
923
1350
|
"nav-icon transition-colors duration-250 ease-out",
|
|
924
1351
|
p ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
925
1352
|
)
|
|
926
1353
|
}) : null
|
|
927
1354
|
}
|
|
928
1355
|
),
|
|
929
|
-
/* @__PURE__ */ a.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children:
|
|
1356
|
+
/* @__PURE__ */ a.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: c })
|
|
930
1357
|
] }),
|
|
931
|
-
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: f && f >= 1 ? /* @__PURE__ */ a.jsx(
|
|
1358
|
+
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: f && f >= 1 ? /* @__PURE__ */ a.jsx(oe, { count: f, maxCount: 9, className: "" }) : "" })
|
|
932
1359
|
]
|
|
933
1360
|
}
|
|
934
1361
|
)
|
|
@@ -938,16 +1365,16 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
938
1365
|
},
|
|
939
1366
|
n
|
|
940
1367
|
);
|
|
941
|
-
}) }),
|
|
1368
|
+
}) }), st = ({
|
|
942
1369
|
links: t,
|
|
943
1370
|
isLinkActive: e,
|
|
944
1371
|
onLinkClick: o
|
|
945
1372
|
}) => /* @__PURE__ */ a.jsx("nav", { className: "flex flex-col gap-1", children: t?.map((r, n) => {
|
|
946
|
-
const { isView:
|
|
947
|
-
(
|
|
1373
|
+
const { isView: s = !1, viewAccess: l, path: c, title: m, icon: f, count: u, relatedPaths: x } = r, p = (typeof s == "function" ? s() : s !== !1) && (!l || l()), i = e(c) || (x?.some(
|
|
1374
|
+
(g) => e(g)
|
|
948
1375
|
) ?? !1);
|
|
949
1376
|
return p && /* @__PURE__ */ a.jsx(
|
|
950
|
-
|
|
1377
|
+
z.div,
|
|
951
1378
|
{
|
|
952
1379
|
initial: { opacity: 0 },
|
|
953
1380
|
animate: { opacity: 1 },
|
|
@@ -961,17 +1388,17 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
961
1388
|
"button",
|
|
962
1389
|
{
|
|
963
1390
|
onClick: () => {
|
|
964
|
-
o?.(
|
|
1391
|
+
o?.(c);
|
|
965
1392
|
},
|
|
966
|
-
className:
|
|
1393
|
+
className: h(
|
|
967
1394
|
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
968
1395
|
"transition-all duration-300 ease-out w-full",
|
|
969
1396
|
"group hover:bg-neutral-medium-selected",
|
|
970
|
-
|
|
1397
|
+
i ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
971
1398
|
),
|
|
972
1399
|
children: [
|
|
973
|
-
/* @__PURE__ */ a.jsx(
|
|
974
|
-
|
|
1400
|
+
/* @__PURE__ */ a.jsx(J, { mode: "wait", children: i && /* @__PURE__ */ a.jsx(
|
|
1401
|
+
z.div,
|
|
975
1402
|
{
|
|
976
1403
|
layoutId: "nav-active-bg",
|
|
977
1404
|
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
@@ -986,7 +1413,7 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
986
1413
|
}
|
|
987
1414
|
) }),
|
|
988
1415
|
/* @__PURE__ */ a.jsxs(
|
|
989
|
-
|
|
1416
|
+
z.div,
|
|
990
1417
|
{
|
|
991
1418
|
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
992
1419
|
animate: {
|
|
@@ -999,11 +1426,11 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
999
1426
|
children: [
|
|
1000
1427
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1001
1428
|
/* @__PURE__ */ a.jsx(
|
|
1002
|
-
|
|
1429
|
+
z.div,
|
|
1003
1430
|
{
|
|
1004
1431
|
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
1005
1432
|
animate: {
|
|
1006
|
-
scale:
|
|
1433
|
+
scale: i ? 1.05 : 1
|
|
1007
1434
|
},
|
|
1008
1435
|
transition: {
|
|
1009
1436
|
duration: 0.25,
|
|
@@ -1011,16 +1438,16 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
1011
1438
|
},
|
|
1012
1439
|
children: typeof f == "function" ? f({
|
|
1013
1440
|
size: 24,
|
|
1014
|
-
className:
|
|
1441
|
+
className: h(
|
|
1015
1442
|
"nav-icon transition-colors duration-250 ease-out",
|
|
1016
|
-
|
|
1443
|
+
i ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
1017
1444
|
)
|
|
1018
1445
|
}) : null
|
|
1019
1446
|
}
|
|
1020
1447
|
),
|
|
1021
|
-
/* @__PURE__ */ a.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children:
|
|
1448
|
+
/* @__PURE__ */ a.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: m })
|
|
1022
1449
|
] }),
|
|
1023
|
-
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children:
|
|
1450
|
+
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: u && u ? /* @__PURE__ */ a.jsx(oe, { count: u, maxCount: 9, className: "" }) : "" })
|
|
1024
1451
|
]
|
|
1025
1452
|
}
|
|
1026
1453
|
)
|
|
@@ -1030,18 +1457,18 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
1030
1457
|
},
|
|
1031
1458
|
n
|
|
1032
1459
|
);
|
|
1033
|
-
}) }),
|
|
1460
|
+
}) }), lt = ({
|
|
1034
1461
|
isActiveModalNotification: t,
|
|
1035
1462
|
setIsActiveModalNotification: e
|
|
1036
1463
|
}) => ({ handleNotificationClick: () => {
|
|
1037
1464
|
e(!0);
|
|
1038
|
-
}, isActiveModalNotification: t }),
|
|
1039
|
-
const e =
|
|
1465
|
+
}, isActiveModalNotification: t }), it = (t) => {
|
|
1466
|
+
const e = I(null);
|
|
1040
1467
|
return {
|
|
1041
1468
|
isCollapsed: t,
|
|
1042
1469
|
navbarRef: e
|
|
1043
1470
|
};
|
|
1044
|
-
},
|
|
1471
|
+
}, ct = ({
|
|
1045
1472
|
isCollapsed: t,
|
|
1046
1473
|
onToggle: e
|
|
1047
1474
|
}) => /* @__PURE__ */ a.jsx("div", { className: "", children: /* @__PURE__ */ a.jsx(
|
|
@@ -1051,9 +1478,9 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
1051
1478
|
title: t ? "Expandir Navbar" : "Contraer Navbar",
|
|
1052
1479
|
"aria-label": t ? "Expandir Navbar" : "Contraer Navbar",
|
|
1053
1480
|
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
1054
|
-
children: t ? /* @__PURE__ */ a.jsx(
|
|
1481
|
+
children: t ? /* @__PURE__ */ a.jsx(B.CloseNavBarDesktop, { size: 34, className: "rotate-180 transition-transform duration-300" }) : /* @__PURE__ */ a.jsx(B.CloseNavBarDesktop, { size: 34, className: "rotate-0 transition-transform duration-300" })
|
|
1055
1482
|
}
|
|
1056
|
-
) }),
|
|
1483
|
+
) }), ut = ({ logoUrl: t, companyName: e }) => /* @__PURE__ */ a.jsx("div", { className: "w-full flex justify-center items-center p-2 h-20", children: /* @__PURE__ */ a.jsx(
|
|
1057
1484
|
"img",
|
|
1058
1485
|
{
|
|
1059
1486
|
src: t,
|
|
@@ -1061,17 +1488,17 @@ const he = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("d
|
|
|
1061
1488
|
alt: e ?? ""
|
|
1062
1489
|
}
|
|
1063
1490
|
) });
|
|
1064
|
-
function
|
|
1491
|
+
function dt({
|
|
1065
1492
|
onFilesAccepted: t,
|
|
1066
1493
|
onFilesRejected: e,
|
|
1067
1494
|
...o
|
|
1068
1495
|
}) {
|
|
1069
|
-
const r =
|
|
1070
|
-
(
|
|
1071
|
-
|
|
1496
|
+
const r = V.useCallback(
|
|
1497
|
+
(s, l) => {
|
|
1498
|
+
s.length > 0 && t?.(s), l.length > 0 && e?.(l);
|
|
1072
1499
|
},
|
|
1073
1500
|
[t, e]
|
|
1074
|
-
), n =
|
|
1501
|
+
), n = ye({
|
|
1075
1502
|
onDrop: r,
|
|
1076
1503
|
...o
|
|
1077
1504
|
});
|
|
@@ -1080,9 +1507,9 @@ function Me({
|
|
|
1080
1507
|
hasErrors: n.fileRejections.length > 0
|
|
1081
1508
|
};
|
|
1082
1509
|
}
|
|
1083
|
-
const
|
|
1084
|
-
const o =
|
|
1085
|
-
return
|
|
1510
|
+
const ft = (t, e = !0) => {
|
|
1511
|
+
const o = I(null);
|
|
1512
|
+
return E(() => {
|
|
1086
1513
|
if (!e) return;
|
|
1087
1514
|
const r = (n) => {
|
|
1088
1515
|
o.current && !o.current.contains(n.target) && t();
|
|
@@ -1101,66 +1528,68 @@ const $e = (t, e = !0) => {
|
|
|
1101
1528
|
}, [t, e]), o;
|
|
1102
1529
|
};
|
|
1103
1530
|
export {
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1531
|
+
ht as Avatar,
|
|
1532
|
+
oe as Badge,
|
|
1533
|
+
$ as Button,
|
|
1534
|
+
gt as CardProfile,
|
|
1535
|
+
bt as ChangueAccount,
|
|
1536
|
+
vt as CheckBox,
|
|
1537
|
+
jt as CheckboxFormik,
|
|
1538
|
+
ut as CompanyLogo,
|
|
1539
|
+
la as DatePicker,
|
|
1540
|
+
Ct as DialogModal,
|
|
1541
|
+
It as DrawerDesktop,
|
|
1542
|
+
Rt as DrawerMobile,
|
|
1543
|
+
Ta as DropZone,
|
|
1544
|
+
Pt as Header,
|
|
1545
|
+
B as Icons,
|
|
1546
|
+
Ne as Image,
|
|
1547
|
+
we as ImageGallery,
|
|
1548
|
+
Ot as Input,
|
|
1549
|
+
Et as InputFormik,
|
|
1550
|
+
Mt as InputMultiple,
|
|
1551
|
+
Ca as LayoutGeneric,
|
|
1552
|
+
qt as Logo,
|
|
1553
|
+
Ht as Menu,
|
|
1554
|
+
ot as NavBarActions,
|
|
1555
|
+
ct as NavbarCollapseButton,
|
|
1556
|
+
st as NavbarLinks,
|
|
1557
|
+
nt as NavigationLink,
|
|
1558
|
+
Ia as OtpInput,
|
|
1559
|
+
Ft as Pagination,
|
|
1560
|
+
Gt as ProfilePictureUpload,
|
|
1561
|
+
Kt as ProgressBar,
|
|
1562
|
+
tt as SecondaryBar,
|
|
1563
|
+
et as SegmentedButton,
|
|
1564
|
+
Zt as Select,
|
|
1565
|
+
Qt as SelectFormik,
|
|
1566
|
+
rt as Sidebar,
|
|
1567
|
+
De as SidebarProvider,
|
|
1568
|
+
ka as SidebarRefProvider,
|
|
1569
|
+
pe as Skeleton,
|
|
1570
|
+
me as Spinner,
|
|
1571
|
+
ta as Steps,
|
|
1572
|
+
ra as SwipeContainer,
|
|
1573
|
+
oa as Switch,
|
|
1574
|
+
ba as TabLinks,
|
|
1575
|
+
ca as Table,
|
|
1576
|
+
ua as TableBody,
|
|
1577
|
+
da as TableCaption,
|
|
1578
|
+
fa as TableCell,
|
|
1579
|
+
ma as TableFooter,
|
|
1580
|
+
pa as TableHead,
|
|
1581
|
+
ha as TableHeader,
|
|
1582
|
+
xa as TableRow,
|
|
1583
|
+
va as TextArea,
|
|
1584
|
+
ja as Tooltip,
|
|
1585
|
+
lt as useActionsNavbar,
|
|
1586
|
+
ft as useClickOutside,
|
|
1587
|
+
kt as useDialogControl,
|
|
1588
|
+
Lt as useDrawerDesktop,
|
|
1589
|
+
Tt as useDrawerMobile,
|
|
1590
|
+
dt as useFileDropzone,
|
|
1591
|
+
Da as useIsMobile,
|
|
1592
|
+
it as useNavbarCollapse,
|
|
1593
|
+
at as useSidebar,
|
|
1594
|
+
Q as useSidebarContext
|
|
1166
1595
|
};
|