prometeo-design-system 1.6.5 → 1.6.6
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface ProfilePictureUploadProps {
|
|
1
|
+
export interface ProfilePictureUploadProps {
|
|
2
2
|
imageUrl?: string;
|
|
3
3
|
fallbackText?: string;
|
|
4
4
|
onFileSelect?: (file: File) => void;
|
|
@@ -13,4 +13,3 @@ interface ProfilePictureUploadProps {
|
|
|
13
13
|
onError?: (error: string) => void;
|
|
14
14
|
}
|
|
15
15
|
export declare function ProfilePictureUpload({ imageUrl, fallbackText, onFileSelect, onEditClick, onRemoveClick, size, className, disabled, showRemoveButton, acceptedTypes, maxFileSize, onError, }: ProfilePictureUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { default as InputFormik } from './components/InputFormik/InputFormik';
|
|
|
12
12
|
export { default as Logo } from './components/Logo/Logo';
|
|
13
13
|
export { Menu } from './components/Menu/MenuComposable';
|
|
14
14
|
export { default as Pagination } from './components/Pagination/Pagination';
|
|
15
|
+
export { ProfilePictureUpload } from './components/ProfilePictureUpload/ProfilePictureUpload';
|
|
15
16
|
export { default as ProgressBar } from './components/ProgressBar/ProgressBar';
|
|
16
17
|
export { default as Select } from './components/Select/Select';
|
|
17
18
|
export { default as SelectFormik } from './components/SelectFormik/SelectFormik';
|
|
@@ -57,6 +58,7 @@ export type { INavAction, INavLink, Role, RoleLevels, } from './components/Sideb
|
|
|
57
58
|
export type { SidebarContextValue } from './components/Sidebar/hooks/useSidebarHook';
|
|
58
59
|
export type { SpinnerProps, SpinnerSize, SpinnerVariant, } from './components/Spinner/Spinner';
|
|
59
60
|
export type { PaginationProps } from './components/Pagination/Pagination';
|
|
61
|
+
export type { ProfilePictureUploadProps } from './components/ProfilePictureUpload/ProfilePictureUpload';
|
|
60
62
|
export type { Step, StepsProps } from './components/Steps/Steps';
|
|
61
63
|
export type { SelectOptionRendererProps, SelectProps, SelectionDisplayProps, } from './components/Select/Select';
|
|
62
64
|
export type { ISelectFormik, ISelectFormikOption, } from './components/SelectFormik/SelectFormik';
|
|
@@ -1,52 +1,252 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { default 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 { default as
|
|
13
|
-
import { Menu as
|
|
14
|
-
import { default as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { default as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { default as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { default as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { useGSAP as
|
|
1
|
+
import M from "./Avatar.es.js";
|
|
2
|
+
import { default as De } from "./Button.es.js";
|
|
3
|
+
import { C as Fe, a as Me } from "./CardProfile-BZajBGbO.js";
|
|
4
|
+
import { default as ze } from "./CheckBox.es.js";
|
|
5
|
+
import { default as Ye } from "./CheckboxFormik.es.js";
|
|
6
|
+
import { default as Ue, useDialogControl as Ve } from "./DialogModal.es.js";
|
|
7
|
+
import { default as Ze, useDrawerDesktop as Je } from "./DrawerDesktop.es.js";
|
|
8
|
+
import { default as Qe, useDrawerMobile as _e } from "./DrawerMobile.es.js";
|
|
9
|
+
import { default as tt } from "./Header.es.js";
|
|
10
|
+
import { default as rt } from "./Input.es.js";
|
|
11
|
+
import { default as nt } from "./InputFormik.es.js";
|
|
12
|
+
import { default as st } from "./Logo.es.js";
|
|
13
|
+
import { Menu as ct } from "./Menu.es.js";
|
|
14
|
+
import { default as dt } from "./Pagination.es.js";
|
|
15
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
16
|
+
import { motion as c, AnimatePresence as $ } from "framer-motion";
|
|
17
|
+
import { useRef as C, useState as k, useLayoutEffect as W, createContext as z, useContext as X, forwardRef as T, useCallback as Y, useEffect as A } from "react";
|
|
18
|
+
import { default as mt } from "./ProgressBar.es.js";
|
|
19
|
+
import { default as xt } from "./Select.es.js";
|
|
20
|
+
import { default as gt } from "./SelectFormik.es.js";
|
|
21
|
+
import { default as bt } from "./Spinner.es.js";
|
|
22
|
+
import { c as f } from "./cn-B6yFEsav.js";
|
|
23
|
+
import { Icons as N } from "./Icons.es.js";
|
|
24
|
+
import { default as wt } from "./SwipeContainer.es.js";
|
|
25
|
+
import { default as Nt } from "./TabLinks.es.js";
|
|
26
|
+
import { Table as St, TableBody as kt, TableCaption as It, TableCell as Bt, TableFooter as Lt, TableHead as $t, TableHeader as Rt, TableRow as Pt } from "./Table.es.js";
|
|
27
|
+
import { default as Tt } from "./TextArea.es.js";
|
|
28
|
+
import { default as Ot } from "./Tooltip.es.js";
|
|
29
|
+
import { u as O } from "./LayoutGeneric-jDE96L2N.js";
|
|
30
|
+
import { L as Et, S as Ft } from "./LayoutGeneric-jDE96L2N.js";
|
|
31
|
+
import { useGSAP as D } from "@gsap/react";
|
|
32
32
|
import p from "gsap";
|
|
33
|
-
import { default as
|
|
34
|
-
import { DropZone as
|
|
35
|
-
const
|
|
36
|
-
|
|
33
|
+
import { default as Wt } from "./OtpInput.es.js";
|
|
34
|
+
import { DropZone as Xt } from "./DropZone.es.js";
|
|
35
|
+
const H = {
|
|
36
|
+
sm: "w-16 h-16",
|
|
37
|
+
md: "w-24 h-24",
|
|
38
|
+
lg: "w-32 h-32",
|
|
39
|
+
xl: "w-40 h-40"
|
|
40
|
+
}, U = {
|
|
41
|
+
sm: "w-4 h-4",
|
|
42
|
+
md: "w-5 h-5",
|
|
43
|
+
lg: "w-6 h-6",
|
|
44
|
+
xl: "w-8 h-8"
|
|
45
|
+
}, V = {
|
|
46
|
+
sm: "w-6 h-6",
|
|
47
|
+
md: "w-7 h-7",
|
|
48
|
+
lg: "w-8 h-8",
|
|
49
|
+
xl: "w-10 h-10"
|
|
50
|
+
}, G = {
|
|
51
|
+
sm: "-bottom-1 -right-0.5",
|
|
52
|
+
md: "-bottom-0.5 -right-0.5",
|
|
53
|
+
lg: "bottom-1 right-1",
|
|
54
|
+
xl: "bottom-3 right-2"
|
|
55
|
+
}, R = {
|
|
56
|
+
sm: "w-4 h-4",
|
|
57
|
+
md: "w-5 h-5",
|
|
58
|
+
lg: "w-6 h-6",
|
|
59
|
+
xl: "w-7 h-7"
|
|
60
|
+
}, Z = {
|
|
61
|
+
sm: "-top-0.5 -right-0.5",
|
|
62
|
+
md: "-top-1 -right-1",
|
|
63
|
+
lg: "-top-1 -right-0",
|
|
64
|
+
xl: "top-1 right-1"
|
|
65
|
+
};
|
|
66
|
+
function je({
|
|
67
|
+
imageUrl: a,
|
|
68
|
+
fallbackText: e = "S L",
|
|
69
|
+
onFileSelect: o,
|
|
70
|
+
onEditClick: r,
|
|
71
|
+
onRemoveClick: n,
|
|
72
|
+
size: i = "lg",
|
|
73
|
+
className: u,
|
|
74
|
+
disabled: s = !1,
|
|
75
|
+
showRemoveButton: m = !0,
|
|
76
|
+
acceptedTypes: h = "image/*",
|
|
77
|
+
maxFileSize: x = 5 * 1024 * 1024,
|
|
78
|
+
onError: g
|
|
79
|
+
}) {
|
|
80
|
+
const v = C(null), [y, S] = k(!1), l = (w) => w.type.startsWith("image/") ? w.size > x ? (g?.(`La imagen debe ser menor a ${Math.round(x / 1024 / 1024)}MB`), !1) : !0 : (g?.("Por favor selecciona un archivo de imagen válido"), !1), d = (w) => {
|
|
81
|
+
const B = w.target.files?.[0];
|
|
82
|
+
B && (l(B) && o?.(B), w.target.value = "");
|
|
83
|
+
}, b = () => {
|
|
84
|
+
s || (r ? r() : v.current?.click());
|
|
85
|
+
}, j = (w) => {
|
|
86
|
+
w.stopPropagation(), !s && n?.();
|
|
87
|
+
};
|
|
88
|
+
return /* @__PURE__ */ t.jsxs(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
onMouseEnter: () => S(!0),
|
|
92
|
+
onMouseLeave: () => S(!1),
|
|
93
|
+
className: `relative inline-block border-inherit ${u || ""}`,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ t.jsx(
|
|
96
|
+
"input",
|
|
97
|
+
{
|
|
98
|
+
ref: v,
|
|
99
|
+
type: "file",
|
|
100
|
+
accept: h,
|
|
101
|
+
onChange: d,
|
|
102
|
+
className: "hidden",
|
|
103
|
+
disabled: s
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ t.jsx(
|
|
107
|
+
c.div,
|
|
108
|
+
{
|
|
109
|
+
className: `
|
|
110
|
+
${H[i]}
|
|
111
|
+
rounded-full
|
|
112
|
+
overflow-hidden
|
|
113
|
+
flex items-center justify-center
|
|
114
|
+
relative
|
|
115
|
+
${s ? "opacity-50 cursor-not-allowed" : ""}
|
|
116
|
+
`,
|
|
117
|
+
children: /* @__PURE__ */ t.jsx(
|
|
118
|
+
M,
|
|
119
|
+
{
|
|
120
|
+
urlImage: a,
|
|
121
|
+
fallbackText: e,
|
|
122
|
+
sizeImage: i,
|
|
123
|
+
sizeFallback: i
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ t.jsx(
|
|
129
|
+
c.button,
|
|
130
|
+
{
|
|
131
|
+
className: `
|
|
132
|
+
absolute
|
|
133
|
+
${G[i]}
|
|
134
|
+
border-3
|
|
135
|
+
border-inherit
|
|
136
|
+
${V[i]}
|
|
137
|
+
rounded-lg
|
|
138
|
+
bg-primary-default-default
|
|
139
|
+
hover:bg-primary-default-hover
|
|
140
|
+
transition-all duration-300
|
|
141
|
+
flex
|
|
142
|
+
items-center
|
|
143
|
+
justify-center
|
|
144
|
+
cursor-pointer
|
|
145
|
+
${s ? "opacity-50 cursor-not-allowed" : ""}
|
|
146
|
+
`,
|
|
147
|
+
onClick: b,
|
|
148
|
+
disabled: s,
|
|
149
|
+
whileTap: s ? {} : { scale: 0.95, transition: { duration: 0.2, ease: "easeInOut" } },
|
|
150
|
+
initial: { scale: 0, rotate: -180 },
|
|
151
|
+
animate: { scale: 1, rotate: 0 },
|
|
152
|
+
children: /* @__PURE__ */ t.jsx(
|
|
153
|
+
c.svg,
|
|
154
|
+
{
|
|
155
|
+
className: `${U[i]} text-white`,
|
|
156
|
+
fill: "none",
|
|
157
|
+
stroke: "currentColor",
|
|
158
|
+
viewBox: "0 0 24 24",
|
|
159
|
+
animate: y && !s ? {
|
|
160
|
+
x: [0, -1, 0, 1, -1, 0, 1],
|
|
161
|
+
y: [0, 1, 0, 1, 0, 1, 1],
|
|
162
|
+
rotate: [0, 5, -3, 8, -5, 3, 1],
|
|
163
|
+
transition: {
|
|
164
|
+
duration: 2,
|
|
165
|
+
ease: "easeInOut"
|
|
166
|
+
}
|
|
167
|
+
} : { x: 0, y: 0, rotate: 0 },
|
|
168
|
+
transition: {
|
|
169
|
+
duration: 1.2,
|
|
170
|
+
repeat: 0,
|
|
171
|
+
ease: "easeInOut"
|
|
172
|
+
},
|
|
173
|
+
children: /* @__PURE__ */ t.jsx(
|
|
174
|
+
"path",
|
|
175
|
+
{
|
|
176
|
+
strokeLinecap: "round",
|
|
177
|
+
strokeLinejoin: "round",
|
|
178
|
+
strokeWidth: 2,
|
|
179
|
+
d: "M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
/* @__PURE__ */ t.jsx($, { children: a && m && !s && /* @__PURE__ */ t.jsx(
|
|
187
|
+
c.button,
|
|
188
|
+
{
|
|
189
|
+
className: `
|
|
190
|
+
absolute
|
|
191
|
+
${Z[i]}
|
|
192
|
+
${R[i]}
|
|
193
|
+
rounded-full
|
|
194
|
+
shadow-lg
|
|
195
|
+
bg-error-light
|
|
196
|
+
flex
|
|
197
|
+
cursor-pointer
|
|
198
|
+
items-center
|
|
199
|
+
justify-center
|
|
200
|
+
${s ? "opacity-50 cursor-not-allowed" : ""}
|
|
201
|
+
`,
|
|
202
|
+
disabled: s,
|
|
203
|
+
onClick: j,
|
|
204
|
+
initial: { scale: 0, opacity: 0, rotate: -90 },
|
|
205
|
+
animate: {
|
|
206
|
+
scale: y ? 1 : 0.8,
|
|
207
|
+
opacity: y ? 1 : 0,
|
|
208
|
+
rotate: 0
|
|
209
|
+
},
|
|
210
|
+
exit: { scale: 0, opacity: 0, rotate: 90 },
|
|
211
|
+
whileTap: { scale: 0.9 },
|
|
212
|
+
transition: {
|
|
213
|
+
type: "spring",
|
|
214
|
+
stiffness: 300,
|
|
215
|
+
damping: 25
|
|
216
|
+
},
|
|
217
|
+
children: /* @__PURE__ */ t.jsx(
|
|
218
|
+
c.svg,
|
|
219
|
+
{
|
|
220
|
+
className: `${R[i]} text-white p-1`,
|
|
221
|
+
fill: "none",
|
|
222
|
+
stroke: "currentColor",
|
|
223
|
+
viewBox: "0 0 24 24",
|
|
224
|
+
whileHover: { rotate: 90 },
|
|
225
|
+
transition: { duration: 0.2 },
|
|
226
|
+
children: /* @__PURE__ */ t.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
) })
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
const P = ({
|
|
236
|
+
index: a,
|
|
37
237
|
isHorizontal: e,
|
|
38
238
|
currentStep: o
|
|
39
239
|
}) => {
|
|
40
|
-
const r =
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
240
|
+
const r = a < o, n = a === o - 1;
|
|
241
|
+
return /* @__PURE__ */ t.jsxs("div", { className: `relative ${e ? "w-20 h-1" : "w-0.5 h-8"}`, children: [
|
|
242
|
+
/* @__PURE__ */ t.jsx(
|
|
43
243
|
"div",
|
|
44
244
|
{
|
|
45
245
|
className: "absolute inset-0 rounded-full bg-neutral-medium-default"
|
|
46
246
|
}
|
|
47
247
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
248
|
+
/* @__PURE__ */ t.jsx(
|
|
249
|
+
c.div,
|
|
50
250
|
{
|
|
51
251
|
className: "absolute inset-0 rounded-full bg-primary-default-default",
|
|
52
252
|
initial: {
|
|
@@ -62,7 +262,7 @@ const I = ({
|
|
|
62
262
|
transition: {
|
|
63
263
|
duration: 0.2,
|
|
64
264
|
ease: "easeInOut",
|
|
65
|
-
delay:
|
|
265
|
+
delay: a * 0.1
|
|
66
266
|
},
|
|
67
267
|
style: {
|
|
68
268
|
originX: e ? 0 : 0.5,
|
|
@@ -70,8 +270,8 @@ const I = ({
|
|
|
70
270
|
}
|
|
71
271
|
}
|
|
72
272
|
),
|
|
73
|
-
n && /* @__PURE__ */
|
|
74
|
-
|
|
273
|
+
n && /* @__PURE__ */ t.jsx(
|
|
274
|
+
c.div,
|
|
75
275
|
{
|
|
76
276
|
className: "absolute inset-0 rounded-full bg-primary-default-default",
|
|
77
277
|
initial: {
|
|
@@ -97,21 +297,21 @@ const I = ({
|
|
|
97
297
|
}
|
|
98
298
|
)
|
|
99
299
|
] });
|
|
100
|
-
},
|
|
101
|
-
steps:
|
|
300
|
+
}, Ne = ({
|
|
301
|
+
steps: a,
|
|
102
302
|
currentStep: e,
|
|
103
303
|
orientation: o = "horizontal",
|
|
104
304
|
variant: r = "default",
|
|
105
305
|
size: n = "md",
|
|
106
|
-
className:
|
|
107
|
-
onStepClick:
|
|
108
|
-
allowClickableSteps:
|
|
306
|
+
className: i = "",
|
|
307
|
+
onStepClick: u,
|
|
308
|
+
allowClickableSteps: s = !1
|
|
109
309
|
}) => {
|
|
110
|
-
const m = o === "horizontal",
|
|
310
|
+
const m = o === "horizontal", h = (l) => ({
|
|
111
311
|
sm: { right: "-40px", top: "16px" },
|
|
112
312
|
md: { right: "-40px", top: "20px" },
|
|
113
313
|
lg: { right: "-40px", top: "24px" }
|
|
114
|
-
})[
|
|
314
|
+
})[l], x = {
|
|
115
315
|
sm: {
|
|
116
316
|
circle: "w-8 h-8 text-xs",
|
|
117
317
|
title: "text-sm",
|
|
@@ -130,94 +330,94 @@ const I = ({
|
|
|
130
330
|
description: "text-base",
|
|
131
331
|
spacing: m ? "gap-4" : "gap-3"
|
|
132
332
|
}
|
|
133
|
-
},
|
|
134
|
-
const
|
|
135
|
-
switch (
|
|
333
|
+
}, g = (l) => l < e ? "completed" : l === e ? "current" : "upcoming", v = (l) => {
|
|
334
|
+
const d = `${x[n].circle} rounded-full flex items-center justify-center font-medium`;
|
|
335
|
+
switch (l) {
|
|
136
336
|
case "completed":
|
|
137
|
-
return `${
|
|
337
|
+
return `${d} bg-primary-default-default text-neutral-strong-default shadow-lg`;
|
|
138
338
|
case "current":
|
|
139
|
-
return `${
|
|
339
|
+
return `${d} border-3 border-primary text-neutral-strong-default shadow-lg duration-900`;
|
|
140
340
|
default:
|
|
141
|
-
return `${
|
|
341
|
+
return `${d} bg-neutral-medium-default text-neutral-medium-default`;
|
|
142
342
|
}
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
-
const
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
343
|
+
}, y = (l) => {
|
|
344
|
+
s && u && u(l);
|
|
345
|
+
}, S = m ? `flex items-center ${i}` : `space-y-0 ${i}`;
|
|
346
|
+
return /* @__PURE__ */ t.jsx("div", { className: S, children: a.map((l, d) => {
|
|
347
|
+
const b = g(d), j = s && u;
|
|
348
|
+
return /* @__PURE__ */ t.jsx("div", { className: "flex items-center", children: m ? /* @__PURE__ */ t.jsx("div", { className: "flex", children: /* @__PURE__ */ t.jsxs("div", { className: "w-40 flex flex-col items-center relative", children: [
|
|
349
|
+
/* @__PURE__ */ t.jsx(
|
|
350
|
+
c.div,
|
|
151
351
|
{
|
|
152
|
-
className: `${
|
|
352
|
+
className: `${v(b)} ${j ? "cursor-pointer" : ""} relative z-10`,
|
|
153
353
|
initial: { scale: 0.8, opacity: 0 },
|
|
154
354
|
animate: { scale: 1, opacity: 1 },
|
|
155
|
-
transition: { duration: 0.3, delay:
|
|
156
|
-
whileTap:
|
|
157
|
-
onClick: () =>
|
|
158
|
-
children: r === "numbered" || !
|
|
355
|
+
transition: { duration: 0.3, delay: d * 0.1 },
|
|
356
|
+
whileTap: j ? { scale: 0.95 } : {},
|
|
357
|
+
onClick: () => y(d),
|
|
358
|
+
children: r === "numbered" || !l.icon ? b === "completed" ? /* @__PURE__ */ t.jsx(c.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ t.jsx(N.Check, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ t.jsx("span", { children: d + 1 }) : l.icon
|
|
159
359
|
}
|
|
160
360
|
),
|
|
161
|
-
|
|
361
|
+
d < a.length - 1 && /* @__PURE__ */ t.jsx(
|
|
162
362
|
"div",
|
|
163
363
|
{
|
|
164
364
|
className: "absolute",
|
|
165
|
-
style:
|
|
166
|
-
children: /* @__PURE__ */
|
|
167
|
-
|
|
365
|
+
style: h(n),
|
|
366
|
+
children: /* @__PURE__ */ t.jsx(
|
|
367
|
+
P,
|
|
168
368
|
{
|
|
169
|
-
index:
|
|
369
|
+
index: d,
|
|
170
370
|
isHorizontal: m,
|
|
171
371
|
currentStep: e
|
|
172
372
|
}
|
|
173
373
|
)
|
|
174
374
|
}
|
|
175
375
|
),
|
|
176
|
-
r !== "minimal" &&
|
|
376
|
+
r !== "minimal" && l.description && /* @__PURE__ */ t.jsx("p", { className: f(
|
|
177
377
|
x[n].description,
|
|
178
378
|
"text-gray-400 mt-2 text-center max-w-full",
|
|
179
|
-
|
|
180
|
-
), children:
|
|
181
|
-
] }) }) : /* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
|
|
379
|
+
b === "current" ? "text-neutral-strong-default font-semibold text-sm" : "text-neutral-medium-default"
|
|
380
|
+
), children: l.description })
|
|
381
|
+
] }) }) : /* @__PURE__ */ t.jsxs("div", { className: "relative flex w-36", children: [
|
|
382
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center w-full", children: [
|
|
383
|
+
/* @__PURE__ */ t.jsx(
|
|
384
|
+
c.div,
|
|
185
385
|
{
|
|
186
|
-
className: `${
|
|
386
|
+
className: `${v(b)} ${j ? "cursor-pointer" : ""}`,
|
|
187
387
|
initial: { scale: 0.8, opacity: 0 },
|
|
188
388
|
animate: { scale: 1, opacity: 1 },
|
|
189
|
-
transition: { duration: 0.3, delay:
|
|
190
|
-
whileTap:
|
|
191
|
-
onClick: () =>
|
|
192
|
-
children: r === "numbered" || !
|
|
389
|
+
transition: { duration: 0.3, delay: d * 0.1 },
|
|
390
|
+
whileTap: j ? { scale: 0.95 } : {},
|
|
391
|
+
onClick: () => y(d),
|
|
392
|
+
children: r === "numbered" || !l.icon ? b === "completed" ? /* @__PURE__ */ t.jsx(c.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ t.jsx(N.Check, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ t.jsx("span", { children: d + 1 }) : l.icon
|
|
193
393
|
}
|
|
194
394
|
),
|
|
195
|
-
|
|
196
|
-
|
|
395
|
+
d < a.length - 1 && /* @__PURE__ */ t.jsx(
|
|
396
|
+
P,
|
|
197
397
|
{
|
|
198
|
-
index:
|
|
398
|
+
index: d,
|
|
199
399
|
isHorizontal: m,
|
|
200
400
|
currentStep: e
|
|
201
401
|
}
|
|
202
402
|
)
|
|
203
403
|
] }),
|
|
204
|
-
r !== "minimal" && /* @__PURE__ */
|
|
205
|
-
|
|
404
|
+
r !== "minimal" && /* @__PURE__ */ t.jsx(
|
|
405
|
+
c.div,
|
|
206
406
|
{
|
|
207
407
|
className: `absolute -right-30 ml-4 top-3 gap-3 flex flex-col w-full ${x[n].spacing} flex h-full`,
|
|
208
408
|
initial: { opacity: 0, x: -10 },
|
|
209
409
|
animate: { opacity: 1, x: 0 },
|
|
210
|
-
transition: { duration: 0.3, delay:
|
|
211
|
-
children:
|
|
410
|
+
transition: { duration: 0.3, delay: d * 0.1 + 0.1 },
|
|
411
|
+
children: l.description && /* @__PURE__ */ t.jsx("p", { className: f(x[n].description, "text-gray-400", b === "current" ? "text-neutral-strong-default font-semibold text-sm" : "text-neutral-medium-default"), children: l.description })
|
|
212
412
|
}
|
|
213
413
|
)
|
|
214
|
-
] }) },
|
|
414
|
+
] }) }, l.id);
|
|
215
415
|
}) });
|
|
216
|
-
},
|
|
217
|
-
|
|
416
|
+
}, J = (a, e) => {
|
|
417
|
+
D(
|
|
218
418
|
() => {
|
|
219
|
-
if (!
|
|
220
|
-
const o =
|
|
419
|
+
if (!a.current) return;
|
|
420
|
+
const o = a.current, r = document.querySelector('[data-main-content="true"]');
|
|
221
421
|
if (e) {
|
|
222
422
|
p.fromTo(
|
|
223
423
|
o,
|
|
@@ -264,42 +464,42 @@ const I = ({
|
|
|
264
464
|
ease: "power2.in"
|
|
265
465
|
});
|
|
266
466
|
},
|
|
267
|
-
{ scope:
|
|
467
|
+
{ scope: a, dependencies: [e] }
|
|
268
468
|
);
|
|
269
|
-
},
|
|
270
|
-
children:
|
|
469
|
+
}, q = ({
|
|
470
|
+
children: a,
|
|
271
471
|
isOpen: e = !1,
|
|
272
472
|
className: o = "",
|
|
273
473
|
width: r = "w-96",
|
|
274
474
|
action: n,
|
|
275
|
-
primarySidebarCollapsed:
|
|
276
|
-
onClose:
|
|
475
|
+
primarySidebarCollapsed: i,
|
|
476
|
+
onClose: u
|
|
277
477
|
}) => {
|
|
278
|
-
const
|
|
279
|
-
return
|
|
478
|
+
const s = C(null), [m, h] = k({ left: 0, width: 0 }), { primarySidebarRef: x } = O();
|
|
479
|
+
return W(() => {
|
|
280
480
|
if (x?.current) {
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
left:
|
|
284
|
-
width:
|
|
481
|
+
const g = x.current.getBoundingClientRect();
|
|
482
|
+
h({
|
|
483
|
+
left: g.width,
|
|
484
|
+
width: g.width
|
|
285
485
|
});
|
|
286
486
|
}
|
|
287
|
-
}, [x, e,
|
|
288
|
-
/* @__PURE__ */
|
|
487
|
+
}, [x, e, i]), J(s, e), /* @__PURE__ */ t.jsx(t.Fragment, { children: e && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
488
|
+
/* @__PURE__ */ t.jsx(
|
|
289
489
|
"div",
|
|
290
490
|
{
|
|
291
491
|
className: "fixed inset-0 bg-black/95 z-20",
|
|
292
492
|
style: {
|
|
293
493
|
left: m.left
|
|
294
494
|
},
|
|
295
|
-
onClick:
|
|
495
|
+
onClick: u
|
|
296
496
|
}
|
|
297
497
|
),
|
|
298
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ t.jsx(
|
|
299
499
|
"div",
|
|
300
500
|
{
|
|
301
|
-
ref:
|
|
302
|
-
className:
|
|
501
|
+
ref: s,
|
|
502
|
+
className: f(
|
|
303
503
|
"h-screen bg-neutral-default-default border-r-1 border-neutral-strong-default flex flex-col secondary-bar flex-shrink-0",
|
|
304
504
|
"absolute top-0 z-30",
|
|
305
505
|
r,
|
|
@@ -309,36 +509,36 @@ const I = ({
|
|
|
309
509
|
left: m.left
|
|
310
510
|
},
|
|
311
511
|
"data-action": n,
|
|
312
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "secondary-bar-content", children: a })
|
|
313
513
|
}
|
|
314
514
|
)
|
|
315
515
|
] }) });
|
|
316
|
-
},
|
|
317
|
-
Root:
|
|
318
|
-
Header:
|
|
319
|
-
Content:
|
|
320
|
-
Footer:
|
|
321
|
-
Spacer:
|
|
322
|
-
}),
|
|
516
|
+
}, K = ({ children: a, className: e }) => /* @__PURE__ */ t.jsx("div", { className: f("h-16 ", e), children: a }), Q = ({ children: a, className: e }) => /* @__PURE__ */ t.jsx("div", { className: f("flex-1 overflow-y-auto p-4", e), children: a }), _ = ({ children: a, className: e }) => /* @__PURE__ */ t.jsx("div", { className: f("p-4 border-t border-neutral-strong-default", e), children: a }), ee = ({ className: a }) => /* @__PURE__ */ t.jsx("div", { className: f("flex-1", a) }), Ce = Object.assign(q, {
|
|
517
|
+
Root: q,
|
|
518
|
+
Header: K,
|
|
519
|
+
Content: Q,
|
|
520
|
+
Footer: _,
|
|
521
|
+
Spacer: ee
|
|
522
|
+
}), E = z(
|
|
323
523
|
void 0
|
|
324
|
-
),
|
|
325
|
-
const
|
|
326
|
-
if (!
|
|
524
|
+
), Se = () => {
|
|
525
|
+
const a = X(E);
|
|
526
|
+
if (!a)
|
|
327
527
|
throw new Error("useSidebar must be used within a Sidebar.Root");
|
|
328
|
-
return
|
|
329
|
-
},
|
|
330
|
-
children:
|
|
528
|
+
return a;
|
|
529
|
+
}, te = ({
|
|
530
|
+
children: a
|
|
331
531
|
}) => {
|
|
332
|
-
const [e, o] =
|
|
532
|
+
const [e, o] = k(!1), [r, n] = k(!1), i = C(null), u = () => {
|
|
333
533
|
o(!1), n(!1);
|
|
334
|
-
},
|
|
534
|
+
}, s = () => {
|
|
335
535
|
o(!0), n(!1);
|
|
336
|
-
},
|
|
536
|
+
}, v = {
|
|
337
537
|
isCollapsed: e,
|
|
338
538
|
setIsCollapsed: o,
|
|
339
|
-
navbarRef:
|
|
539
|
+
navbarRef: i,
|
|
340
540
|
toggleCollapse: () => {
|
|
341
|
-
e ?
|
|
541
|
+
e ? u() : s();
|
|
342
542
|
},
|
|
343
543
|
activeSecondaryBar: r ? "notifications" : null,
|
|
344
544
|
openSecondaryBar: () => {
|
|
@@ -348,18 +548,18 @@ const I = ({
|
|
|
348
548
|
n(!1);
|
|
349
549
|
},
|
|
350
550
|
toggleSecondaryBar: () => {
|
|
351
|
-
n((
|
|
551
|
+
n((y) => !y);
|
|
352
552
|
}
|
|
353
553
|
};
|
|
354
|
-
return /* @__PURE__ */
|
|
355
|
-
},
|
|
356
|
-
|
|
554
|
+
return /* @__PURE__ */ t.jsx(E.Provider, { value: v, children: a });
|
|
555
|
+
}, I = (a, e, o, r) => e && (Array.isArray(e) ? e.length > 0 : e) ? a.to(e, o, r) : a, ae = (a, e, o) => {
|
|
556
|
+
D(
|
|
357
557
|
() => {
|
|
358
|
-
if (!
|
|
558
|
+
if (!a.current) return;
|
|
359
559
|
const r = p.timeline({
|
|
360
560
|
defaults: { duration: 0.7, ease: "power1.out" }
|
|
361
561
|
}), n = {
|
|
362
|
-
navbar:
|
|
562
|
+
navbar: a.current,
|
|
363
563
|
navLabels: p.utils.toArray(".nav-label"),
|
|
364
564
|
navIconWrappers: p.utils.toArray(".nav-icon-wrapper"),
|
|
365
565
|
navIcons: p.utils.toArray(".nav-icon"),
|
|
@@ -394,12 +594,12 @@ const I = ({
|
|
|
394
594
|
secondaryBarContent: p.utils.toArray(".secondary-bar *"),
|
|
395
595
|
badgeInLink: p.utils.toArray(".badge-in-link")
|
|
396
596
|
};
|
|
397
|
-
e ?
|
|
597
|
+
e ? re(r, n) : oe(r, n), n.secondaryBar && ne(n.secondaryBar);
|
|
398
598
|
},
|
|
399
|
-
{ scope:
|
|
599
|
+
{ scope: a, dependencies: [e, o] }
|
|
400
600
|
);
|
|
401
|
-
},
|
|
402
|
-
|
|
601
|
+
}, re = (a, e) => {
|
|
602
|
+
a.to(e.navbar, {
|
|
403
603
|
width: "5rem",
|
|
404
604
|
duration: 0.2,
|
|
405
605
|
ease: "bounce.out"
|
|
@@ -457,8 +657,8 @@ const I = ({
|
|
|
457
657
|
marginLeft: 0
|
|
458
658
|
},
|
|
459
659
|
0
|
|
460
|
-
).to(e.navIcons, { scale: 0.95, ease: "elastic.out(1, 0.3)" }, 0),
|
|
461
|
-
|
|
660
|
+
).to(e.navIcons, { scale: 0.95, ease: "elastic.out(1, 0.3)" }, 0), I(
|
|
661
|
+
a,
|
|
462
662
|
e.buttonCrevron,
|
|
463
663
|
{
|
|
464
664
|
width: 0,
|
|
@@ -470,8 +670,8 @@ const I = ({
|
|
|
470
670
|
}
|
|
471
671
|
},
|
|
472
672
|
0
|
|
473
|
-
),
|
|
474
|
-
|
|
673
|
+
), I(
|
|
674
|
+
a,
|
|
475
675
|
e.buttonContentChevron,
|
|
476
676
|
{
|
|
477
677
|
display: "none"
|
|
@@ -537,8 +737,8 @@ const I = ({
|
|
|
537
737
|
},
|
|
538
738
|
-1
|
|
539
739
|
);
|
|
540
|
-
},
|
|
541
|
-
|
|
740
|
+
}, oe = (a, e) => {
|
|
741
|
+
a.to(e.navbar, { width: "20rem" }, -1).to(
|
|
542
742
|
e.navLinkItems,
|
|
543
743
|
{
|
|
544
744
|
borderRadius: "10px",
|
|
@@ -547,8 +747,8 @@ const I = ({
|
|
|
547
747
|
justifyContent: "flex-start"
|
|
548
748
|
},
|
|
549
749
|
-1
|
|
550
|
-
),
|
|
551
|
-
|
|
750
|
+
), I(
|
|
751
|
+
a,
|
|
552
752
|
e.buttonCrevron,
|
|
553
753
|
{
|
|
554
754
|
width: "auto",
|
|
@@ -560,8 +760,8 @@ const I = ({
|
|
|
560
760
|
}
|
|
561
761
|
},
|
|
562
762
|
0
|
|
563
|
-
),
|
|
564
|
-
|
|
763
|
+
), I(
|
|
764
|
+
a,
|
|
565
765
|
e.buttonContentChevron,
|
|
566
766
|
{
|
|
567
767
|
display: "flex"
|
|
@@ -665,44 +865,44 @@ const I = ({
|
|
|
665
865
|
},
|
|
666
866
|
0
|
|
667
867
|
).to(e.navIcons, { scale: 1 }, 0.3);
|
|
668
|
-
},
|
|
669
|
-
p.to(
|
|
868
|
+
}, ne = (a, e) => {
|
|
869
|
+
p.to(a, {
|
|
670
870
|
x: "-100%",
|
|
671
871
|
opacity: 0,
|
|
672
872
|
duration: 0.3,
|
|
673
873
|
ease: "power2.in"
|
|
674
874
|
});
|
|
675
|
-
},
|
|
676
|
-
({ children:
|
|
677
|
-
const n =
|
|
678
|
-
n.current =
|
|
875
|
+
}, ie = T(
|
|
876
|
+
({ children: a, isCollapsed: e = !1, className: o = "" }, r) => {
|
|
877
|
+
const n = C(null), { registerPrimarySidebar: i } = O(), u = Y((s) => {
|
|
878
|
+
n.current = s, typeof r == "function" ? r(s) : r && (r.current = s);
|
|
679
879
|
}, [r]);
|
|
680
|
-
return
|
|
681
|
-
n.current &&
|
|
682
|
-
}, [
|
|
880
|
+
return A(() => {
|
|
881
|
+
n.current && i(n);
|
|
882
|
+
}, [i]), ae(n, e, !1), /* @__PURE__ */ t.jsx(
|
|
683
883
|
"div",
|
|
684
884
|
{
|
|
685
|
-
ref:
|
|
885
|
+
ref: u,
|
|
686
886
|
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
|
|
687
887
|
${e ? "w-16" : "w-64"} ${o}`,
|
|
688
|
-
children:
|
|
888
|
+
children: a
|
|
689
889
|
}
|
|
690
890
|
);
|
|
691
891
|
}
|
|
692
|
-
),
|
|
693
|
-
(
|
|
892
|
+
), L = T(
|
|
893
|
+
(a, e) => /* @__PURE__ */ t.jsx(te, { children: /* @__PURE__ */ t.jsx(ie, { ...a, ref: e }) })
|
|
694
894
|
);
|
|
695
|
-
|
|
696
|
-
const
|
|
895
|
+
L.displayName = "SidebarRoot";
|
|
896
|
+
const se = ({ isCollapsed: a, onToggleCollapse: e }) => /* @__PURE__ */ t.jsx("div", { className: f("flex mt-5 mb-4 justify-end mr-5 container-icon-collapsade", a && ""), children: /* @__PURE__ */ t.jsx(
|
|
697
897
|
"button",
|
|
698
898
|
{
|
|
699
899
|
onClick: e,
|
|
700
|
-
title:
|
|
701
|
-
"aria-label":
|
|
900
|
+
title: a ? "Expandir Navbar" : "Contraer Navbar",
|
|
901
|
+
"aria-label": a ? "Expandir Navbar" : "Contraer Navbar",
|
|
702
902
|
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
703
|
-
children:
|
|
903
|
+
children: a ? /* @__PURE__ */ t.jsx(N.CloseNavBarDesktop, { size: 24, className: "rotate-180 transition-transform duration-300" }) : /* @__PURE__ */ t.jsx(N.CloseNavBarDesktop, { size: 24, className: "rotate-0 transition-transform duration-300" })
|
|
704
904
|
}
|
|
705
|
-
) }),
|
|
905
|
+
) }), le = ({ children: a, className: e }) => /* @__PURE__ */ t.jsx("div", { className: `${e} sidebar-header`, children: a }), ce = ({ className: a }) => /* @__PURE__ */ t.jsx("div", { className: f("px-3 flex justify-center items-center w-full mb-4", a), children: /* @__PURE__ */ t.jsx("div", { className: "border-b border-neutral-strong-default border-1 w-full" }) }), ue = ({ children: a, className: e }) => /* @__PURE__ */ t.jsx("div", { className: e, children: a }), de = ({ className: a, size: e = "auto" }) => {
|
|
706
906
|
const o = () => {
|
|
707
907
|
switch (e) {
|
|
708
908
|
case "auto":
|
|
@@ -715,78 +915,78 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
715
915
|
return "h-8 w-8";
|
|
716
916
|
}
|
|
717
917
|
};
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
},
|
|
720
|
-
Root:
|
|
721
|
-
CollapseButton:
|
|
722
|
-
Header:
|
|
723
|
-
Divider:
|
|
724
|
-
Content:
|
|
725
|
-
Spacer:
|
|
726
|
-
Footer:
|
|
727
|
-
}),
|
|
728
|
-
children:
|
|
918
|
+
return /* @__PURE__ */ t.jsx("div", { className: f(o(), a) });
|
|
919
|
+
}, fe = ({ children: a, className: e }) => /* @__PURE__ */ t.jsx("div", { className: e, children: a }), ke = Object.assign(L, {
|
|
920
|
+
Root: L,
|
|
921
|
+
CollapseButton: se,
|
|
922
|
+
Header: le,
|
|
923
|
+
Divider: ce,
|
|
924
|
+
Content: ue,
|
|
925
|
+
Spacer: de,
|
|
926
|
+
Footer: fe
|
|
927
|
+
}), Ie = ({
|
|
928
|
+
children: a,
|
|
729
929
|
icon: e,
|
|
730
930
|
label: o,
|
|
731
931
|
href: r,
|
|
732
932
|
onClick: n,
|
|
733
|
-
isActive:
|
|
734
|
-
className:
|
|
933
|
+
isActive: i = !1,
|
|
934
|
+
className: u
|
|
735
935
|
}) => {
|
|
736
|
-
const
|
|
737
|
-
return /* @__PURE__ */
|
|
738
|
-
|
|
936
|
+
const s = r ? "a" : "button";
|
|
937
|
+
return /* @__PURE__ */ t.jsxs(
|
|
938
|
+
s,
|
|
739
939
|
{
|
|
740
940
|
href: r,
|
|
741
941
|
onClick: n,
|
|
742
|
-
className:
|
|
942
|
+
className: f(
|
|
743
943
|
"nav-link-item",
|
|
744
944
|
"flex items-center w-full px-3 py-2 text-left",
|
|
745
945
|
"hover:bg-neutral-medium-default transition-colors rounded-lg",
|
|
746
946
|
"focus:outline-none focus:ring-2 focus:ring-primary-default-default",
|
|
747
|
-
|
|
748
|
-
|
|
947
|
+
i && "bg-neutral-medium-default",
|
|
948
|
+
u
|
|
749
949
|
),
|
|
750
950
|
children: [
|
|
751
|
-
e && /* @__PURE__ */
|
|
752
|
-
o && /* @__PURE__ */
|
|
753
|
-
|
|
951
|
+
e && /* @__PURE__ */ t.jsx("div", { className: "nav-icon-wrapper mr-3 flex-shrink-0", children: /* @__PURE__ */ t.jsx("div", { className: "nav-icon flex items-center justify-center w-5 h-5", children: e }) }),
|
|
952
|
+
o && /* @__PURE__ */ t.jsx("span", { className: "nav-label text-sm text-neutral-strong-default", children: o }),
|
|
953
|
+
a
|
|
754
954
|
]
|
|
755
955
|
}
|
|
756
956
|
);
|
|
757
|
-
},
|
|
758
|
-
count:
|
|
957
|
+
}, F = ({
|
|
958
|
+
count: a,
|
|
759
959
|
maxCount: e = 9,
|
|
760
960
|
className: o = "",
|
|
761
961
|
size: r = "medium",
|
|
762
962
|
variant: n = "primary",
|
|
763
|
-
showZero:
|
|
963
|
+
showZero: i = !1
|
|
764
964
|
}) => {
|
|
765
|
-
const
|
|
766
|
-
if (
|
|
965
|
+
const u = a, s = u > e ? `+${e}` : u;
|
|
966
|
+
if (u === 0 && !i) return null;
|
|
767
967
|
const m = {
|
|
768
968
|
small: "w-4.5 h-4.5 text-xs ",
|
|
769
969
|
medium: "w-5 h-5 text-xs",
|
|
770
970
|
large: "w-6 h-6 text-sm"
|
|
771
|
-
},
|
|
971
|
+
}, h = {
|
|
772
972
|
primary: "bg-primary-default-default text-neutral-strong-default",
|
|
773
973
|
secondary: "bg-neutral-medium-default text-neutral-strong-default",
|
|
774
974
|
success: "bg-green-500 text-white",
|
|
775
975
|
warning: "bg-yellow-500 text-black",
|
|
776
976
|
danger: "bg-red-500 text-white"
|
|
777
977
|
};
|
|
778
|
-
return /* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ t.jsx("div", { className: f(
|
|
779
979
|
"rounded-full flex items-center justify-center font-medium ",
|
|
780
980
|
m[r],
|
|
781
|
-
|
|
981
|
+
h[n],
|
|
782
982
|
o
|
|
783
|
-
), children: /* @__PURE__ */
|
|
784
|
-
},
|
|
785
|
-
linkActions:
|
|
983
|
+
), children: /* @__PURE__ */ t.jsx("span", { children: s }) });
|
|
984
|
+
}, Be = ({
|
|
985
|
+
linkActions: a,
|
|
786
986
|
onClick: e,
|
|
787
987
|
activeAction: o
|
|
788
|
-
}) => /* @__PURE__ */
|
|
789
|
-
|
|
988
|
+
}) => /* @__PURE__ */ t.jsx("nav", { className: "flex flex-col gap-1", children: a?.map((r, n) => r.isView && r.viewAccess() && /* @__PURE__ */ t.jsx(
|
|
989
|
+
c.div,
|
|
790
990
|
{
|
|
791
991
|
initial: { opacity: 0 },
|
|
792
992
|
animate: { opacity: 1 },
|
|
@@ -796,21 +996,21 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
796
996
|
ease: "easeOut"
|
|
797
997
|
},
|
|
798
998
|
className: "relative flex justify-center w-full items-center px-3",
|
|
799
|
-
children: /* @__PURE__ */
|
|
999
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
800
1000
|
"button",
|
|
801
1001
|
{
|
|
802
1002
|
onClick: () => {
|
|
803
1003
|
e?.(r.action);
|
|
804
1004
|
},
|
|
805
|
-
className:
|
|
1005
|
+
className: f(
|
|
806
1006
|
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
807
1007
|
"transition-all duration-300 ease-out w-full",
|
|
808
1008
|
"group hover:bg-neutral-medium-selected",
|
|
809
1009
|
o === r.action ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
810
1010
|
),
|
|
811
1011
|
children: [
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
|
|
1012
|
+
/* @__PURE__ */ t.jsx($, { mode: "wait", children: o === r.action && /* @__PURE__ */ t.jsx(
|
|
1013
|
+
c.div,
|
|
814
1014
|
{
|
|
815
1015
|
layoutId: "nav-active-bg",
|
|
816
1016
|
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
@@ -824,8 +1024,8 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
824
1024
|
}
|
|
825
1025
|
}
|
|
826
1026
|
) }),
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
|
|
1027
|
+
/* @__PURE__ */ t.jsxs(
|
|
1028
|
+
c.div,
|
|
829
1029
|
{
|
|
830
1030
|
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
831
1031
|
animate: {
|
|
@@ -836,9 +1036,9 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
836
1036
|
ease: "easeOut"
|
|
837
1037
|
},
|
|
838
1038
|
children: [
|
|
839
|
-
/* @__PURE__ */
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
|
|
1039
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1040
|
+
/* @__PURE__ */ t.jsx(
|
|
1041
|
+
c.div,
|
|
842
1042
|
{
|
|
843
1043
|
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
844
1044
|
animate: {
|
|
@@ -850,16 +1050,16 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
850
1050
|
},
|
|
851
1051
|
children: typeof r.icon == "function" ? r.icon({
|
|
852
1052
|
size: 24,
|
|
853
|
-
className:
|
|
1053
|
+
className: f(
|
|
854
1054
|
"nav-icon transition-colors duration-250 ease-out",
|
|
855
1055
|
o === r.action ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
856
1056
|
)
|
|
857
1057
|
}) : null
|
|
858
1058
|
}
|
|
859
1059
|
),
|
|
860
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ t.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: r.title })
|
|
861
1061
|
] }),
|
|
862
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ t.jsx("div", { className: "badge-in-link", children: r.count && r?.count >= 1 ? /* @__PURE__ */ t.jsx(F, { count: r.count, maxCount: 9, className: "" }) : "" })
|
|
863
1063
|
]
|
|
864
1064
|
}
|
|
865
1065
|
)
|
|
@@ -868,16 +1068,16 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
868
1068
|
)
|
|
869
1069
|
},
|
|
870
1070
|
n
|
|
871
|
-
)) }),
|
|
872
|
-
links:
|
|
1071
|
+
)) }), Le = ({
|
|
1072
|
+
links: a,
|
|
873
1073
|
isLinkActive: e,
|
|
874
1074
|
onLinkClick: o
|
|
875
|
-
}) => /* @__PURE__ */
|
|
876
|
-
const
|
|
877
|
-
(
|
|
1075
|
+
}) => /* @__PURE__ */ t.jsx("nav", { className: "flex flex-col gap-1", children: a?.map((r, n) => {
|
|
1076
|
+
const i = e(r.path) || (r.relatedPaths?.some(
|
|
1077
|
+
(u) => e(u)
|
|
878
1078
|
) ?? !1);
|
|
879
|
-
return r.isView && r.viewAccess() && /* @__PURE__ */
|
|
880
|
-
|
|
1079
|
+
return r.isView && r.viewAccess() && /* @__PURE__ */ t.jsx(
|
|
1080
|
+
c.div,
|
|
881
1081
|
{
|
|
882
1082
|
initial: { opacity: 0 },
|
|
883
1083
|
animate: { opacity: 1 },
|
|
@@ -887,21 +1087,21 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
887
1087
|
ease: "easeOut"
|
|
888
1088
|
},
|
|
889
1089
|
className: "relative flex justify-center w-full items-center px-3",
|
|
890
|
-
children: /* @__PURE__ */
|
|
1090
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
891
1091
|
"button",
|
|
892
1092
|
{
|
|
893
1093
|
onClick: () => {
|
|
894
1094
|
o?.(r.path);
|
|
895
1095
|
},
|
|
896
|
-
className:
|
|
1096
|
+
className: f(
|
|
897
1097
|
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
898
1098
|
"transition-all duration-300 ease-out w-full",
|
|
899
1099
|
"group hover:bg-neutral-medium-selected",
|
|
900
|
-
|
|
1100
|
+
i ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
901
1101
|
),
|
|
902
1102
|
children: [
|
|
903
|
-
/* @__PURE__ */
|
|
904
|
-
|
|
1103
|
+
/* @__PURE__ */ t.jsx($, { mode: "wait", children: i && /* @__PURE__ */ t.jsx(
|
|
1104
|
+
c.div,
|
|
905
1105
|
{
|
|
906
1106
|
layoutId: "nav-active-bg",
|
|
907
1107
|
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
@@ -915,8 +1115,8 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
915
1115
|
}
|
|
916
1116
|
}
|
|
917
1117
|
) }),
|
|
918
|
-
/* @__PURE__ */
|
|
919
|
-
|
|
1118
|
+
/* @__PURE__ */ t.jsxs(
|
|
1119
|
+
c.div,
|
|
920
1120
|
{
|
|
921
1121
|
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
922
1122
|
animate: {
|
|
@@ -927,13 +1127,13 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
927
1127
|
ease: "easeOut"
|
|
928
1128
|
},
|
|
929
1129
|
children: [
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
-
|
|
1130
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1131
|
+
/* @__PURE__ */ t.jsx(
|
|
1132
|
+
c.div,
|
|
933
1133
|
{
|
|
934
1134
|
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
935
1135
|
animate: {
|
|
936
|
-
scale:
|
|
1136
|
+
scale: i ? 1.05 : 1
|
|
937
1137
|
},
|
|
938
1138
|
transition: {
|
|
939
1139
|
duration: 0.25,
|
|
@@ -941,16 +1141,16 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
941
1141
|
},
|
|
942
1142
|
children: typeof r.icon == "function" ? r.icon({
|
|
943
1143
|
size: 24,
|
|
944
|
-
className:
|
|
1144
|
+
className: f(
|
|
945
1145
|
"nav-icon transition-colors duration-250 ease-out",
|
|
946
|
-
|
|
1146
|
+
i ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
947
1147
|
)
|
|
948
1148
|
}) : null
|
|
949
1149
|
}
|
|
950
1150
|
),
|
|
951
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ t.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: r.title })
|
|
952
1152
|
] }),
|
|
953
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ t.jsx("div", { className: "badge-in-link", children: r.count && r.count ? /* @__PURE__ */ t.jsx(F, { count: r.count, maxCount: 9, className: "" }) : "" })
|
|
954
1154
|
]
|
|
955
1155
|
}
|
|
956
1156
|
)
|
|
@@ -960,42 +1160,42 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
960
1160
|
},
|
|
961
1161
|
n
|
|
962
1162
|
);
|
|
963
|
-
}) }),
|
|
964
|
-
isActiveModalNotification:
|
|
1163
|
+
}) }), $e = ({
|
|
1164
|
+
isActiveModalNotification: a,
|
|
965
1165
|
setIsActiveModalNotification: e
|
|
966
1166
|
}) => ({ handleNotificationClick: () => {
|
|
967
1167
|
e(!0);
|
|
968
|
-
}, isActiveModalNotification:
|
|
969
|
-
const e =
|
|
1168
|
+
}, isActiveModalNotification: a }), Re = (a) => {
|
|
1169
|
+
const e = C(null);
|
|
970
1170
|
return {
|
|
971
|
-
isCollapsed:
|
|
1171
|
+
isCollapsed: a,
|
|
972
1172
|
navbarRef: e
|
|
973
1173
|
};
|
|
974
|
-
},
|
|
975
|
-
isCollapsed:
|
|
1174
|
+
}, Pe = ({
|
|
1175
|
+
isCollapsed: a,
|
|
976
1176
|
onToggle: e
|
|
977
|
-
}) => /* @__PURE__ */
|
|
1177
|
+
}) => /* @__PURE__ */ t.jsx("div", { className: "", children: /* @__PURE__ */ t.jsx(
|
|
978
1178
|
"button",
|
|
979
1179
|
{
|
|
980
1180
|
onClick: e,
|
|
981
|
-
title:
|
|
982
|
-
"aria-label":
|
|
1181
|
+
title: a ? "Expandir Navbar" : "Contraer Navbar",
|
|
1182
|
+
"aria-label": a ? "Expandir Navbar" : "Contraer Navbar",
|
|
983
1183
|
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
984
|
-
children:
|
|
1184
|
+
children: a ? /* @__PURE__ */ t.jsx(N.CloseNavBarDesktop, { size: 34, className: "rotate-180 transition-transform duration-300" }) : /* @__PURE__ */ t.jsx(N.CloseNavBarDesktop, { size: 34, className: "rotate-0 transition-transform duration-300" })
|
|
985
1185
|
}
|
|
986
|
-
) }),
|
|
1186
|
+
) }), qe = ({ logoUrl: a, companyName: e }) => /* @__PURE__ */ t.jsx("div", { className: "w-full flex justify-center items-center p-2 h-20", children: /* @__PURE__ */ t.jsx(
|
|
987
1187
|
"img",
|
|
988
1188
|
{
|
|
989
|
-
src:
|
|
1189
|
+
src: a,
|
|
990
1190
|
className: "h-2/3 rounded-full",
|
|
991
1191
|
alt: e ?? ""
|
|
992
1192
|
}
|
|
993
|
-
) }),
|
|
994
|
-
const o =
|
|
995
|
-
return
|
|
1193
|
+
) }), Te = (a, e = !0) => {
|
|
1194
|
+
const o = C(null);
|
|
1195
|
+
return A(() => {
|
|
996
1196
|
if (!e) return;
|
|
997
1197
|
const r = (n) => {
|
|
998
|
-
o.current && !o.current.contains(n.target) &&
|
|
1198
|
+
o.current && !o.current.contains(n.target) && a();
|
|
999
1199
|
};
|
|
1000
1200
|
return document.addEventListener("mousedown", r, {
|
|
1001
1201
|
capture: !0
|
|
@@ -1008,61 +1208,62 @@ const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
1008
1208
|
capture: !0
|
|
1009
1209
|
});
|
|
1010
1210
|
};
|
|
1011
|
-
}, [
|
|
1211
|
+
}, [a, e]), o;
|
|
1012
1212
|
};
|
|
1013
1213
|
export {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1214
|
+
M as Avatar,
|
|
1215
|
+
F as Badge,
|
|
1216
|
+
De as Button,
|
|
1217
|
+
Fe as CardProfile,
|
|
1218
|
+
Me as ChangueAccount,
|
|
1219
|
+
ze as CheckBox,
|
|
1220
|
+
Ye as CheckboxFormik,
|
|
1221
|
+
qe as CompanyLogo,
|
|
1222
|
+
Ue as DialogModal,
|
|
1223
|
+
Ze as DrawerDesktop,
|
|
1224
|
+
Qe as DrawerMobile,
|
|
1225
|
+
Xt as DropZone,
|
|
1226
|
+
tt as Header,
|
|
1227
|
+
N as Icons,
|
|
1228
|
+
rt as Input,
|
|
1229
|
+
nt as InputFormik,
|
|
1230
|
+
Et as LayoutGeneric,
|
|
1231
|
+
st as Logo,
|
|
1232
|
+
ct as Menu,
|
|
1233
|
+
Be as NavBarActions,
|
|
1234
|
+
Pe as NavbarCollapseButton,
|
|
1235
|
+
Le as NavbarLinks,
|
|
1236
|
+
Ie as NavigationLink,
|
|
1237
|
+
Wt as OtpInput,
|
|
1238
|
+
dt as Pagination,
|
|
1239
|
+
je as ProfilePictureUpload,
|
|
1240
|
+
mt as ProgressBar,
|
|
1241
|
+
Ce as SecondaryBar,
|
|
1242
|
+
xt as Select,
|
|
1243
|
+
gt as SelectFormik,
|
|
1244
|
+
ke as Sidebar,
|
|
1245
|
+
te as SidebarProvider,
|
|
1246
|
+
Ft as SidebarRefProvider,
|
|
1247
|
+
bt as Spinner,
|
|
1248
|
+
Ne as Steps,
|
|
1249
|
+
wt as SwipeContainer,
|
|
1250
|
+
Nt as TabLinks,
|
|
1251
|
+
St as Table,
|
|
1252
|
+
kt as TableBody,
|
|
1253
|
+
It as TableCaption,
|
|
1254
|
+
Bt as TableCell,
|
|
1255
|
+
Lt as TableFooter,
|
|
1256
|
+
$t as TableHead,
|
|
1257
|
+
Rt as TableHeader,
|
|
1258
|
+
Pt as TableRow,
|
|
1259
|
+
Tt as TextArea,
|
|
1260
|
+
Ot as Tooltip,
|
|
1261
|
+
$e as useActionsNavbar,
|
|
1262
|
+
Te as useClickOutside,
|
|
1263
|
+
Ve as useDialogControl,
|
|
1264
|
+
Je as useDrawerDesktop,
|
|
1265
|
+
_e as useDrawerMobile,
|
|
1266
|
+
Re as useNavbarCollapse,
|
|
1267
|
+
Se as useSidebar,
|
|
1268
|
+
O as useSidebarContext
|
|
1068
1269
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prometeo-design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "design kit system",
|
|
7
7
|
"main": "dist/prometeo-design-system.umd.js",
|
|
@@ -77,6 +77,10 @@
|
|
|
77
77
|
"types": "./dist/ProgressBar.d.ts",
|
|
78
78
|
"import": "./dist/ProgressBar.es.js"
|
|
79
79
|
},
|
|
80
|
+
"./ProfilePictureUpload": {
|
|
81
|
+
"types": "./dist/ProfilePictureUpload.d.ts",
|
|
82
|
+
"import": "./dist/ProfilePictureUpload.es.js"
|
|
83
|
+
},
|
|
80
84
|
"./Select": {
|
|
81
85
|
"types": "./dist/Select.d.ts",
|
|
82
86
|
"import": "./dist/Select.es.js"
|