prometeo-design-system 1.6.3 → 1.6.5
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/Button.es.js +16 -14
- package/dist/InputFormik.es.js +1 -1
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/prometeo-design-system.es.js +387 -205
- package/package.json +5 -1
package/dist/Button.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as n } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { c as
|
|
4
|
-
import { useAnimationControls as
|
|
5
|
-
const
|
|
3
|
+
import { c as C } from "./index-BOQuZ0gG.js";
|
|
4
|
+
import { useAnimationControls as N, motion as m } from "framer-motion";
|
|
5
|
+
const z = C(
|
|
6
6
|
"flex items-center justify-center cursor-pointer focus:outline-none font-semibold rounded-md transition-colors",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
@@ -75,7 +75,7 @@ const N = S(
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
function
|
|
78
|
+
function R({
|
|
79
79
|
label: o = "Selene",
|
|
80
80
|
onClick: p,
|
|
81
81
|
icon: l,
|
|
@@ -92,14 +92,15 @@ function B({
|
|
|
92
92
|
children: u,
|
|
93
93
|
Spinner: g,
|
|
94
94
|
className: y,
|
|
95
|
-
|
|
95
|
+
form: h,
|
|
96
|
+
...w
|
|
96
97
|
}) {
|
|
97
|
-
const d =
|
|
98
|
+
const d = N(), j = () => {
|
|
98
99
|
!a || r || e || !s || d.start({ rotate: 90 });
|
|
99
|
-
},
|
|
100
|
+
}, H = () => {
|
|
100
101
|
!a || r || e || !s || d.start({ rotate: 0 });
|
|
101
|
-
},
|
|
102
|
-
|
|
102
|
+
}, S = n(
|
|
103
|
+
z({
|
|
103
104
|
variant: v,
|
|
104
105
|
color: x,
|
|
105
106
|
size: i,
|
|
@@ -111,16 +112,17 @@ function B({
|
|
|
111
112
|
return /* @__PURE__ */ t.jsx(
|
|
112
113
|
m.button,
|
|
113
114
|
{
|
|
115
|
+
form: h,
|
|
114
116
|
onClick: p,
|
|
115
|
-
className:
|
|
117
|
+
className: S,
|
|
116
118
|
whileHover: a && !r && !e ? { scale: 1.05 } : {},
|
|
117
119
|
whileTap: a && !r && !e ? { scale: 0.98 } : {},
|
|
118
120
|
transition: { type: "spring", stiffness: 400, damping: 17 },
|
|
119
|
-
onHoverStart:
|
|
120
|
-
onHoverEnd:
|
|
121
|
+
onHoverStart: j,
|
|
122
|
+
onHoverEnd: H,
|
|
121
123
|
disabled: r || e,
|
|
122
124
|
type: b,
|
|
123
|
-
...
|
|
125
|
+
...w,
|
|
124
126
|
children: e ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
125
127
|
g,
|
|
126
128
|
i !== "small" && /* @__PURE__ */ t.jsx("span", { children: f })
|
|
@@ -143,5 +145,5 @@ function B({
|
|
|
143
145
|
);
|
|
144
146
|
}
|
|
145
147
|
export {
|
|
146
|
-
|
|
148
|
+
R as default
|
|
147
149
|
};
|
package/dist/InputFormik.es.js
CHANGED
|
@@ -60,7 +60,7 @@ const U = ({
|
|
|
60
60
|
{
|
|
61
61
|
htmlFor: x || t.name,
|
|
62
62
|
className: u(
|
|
63
|
-
"absolute transition-all duration-200 ease-in-out pointer-events-none bg-inherit px-1 z-10",
|
|
63
|
+
"absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
|
|
64
64
|
z(),
|
|
65
65
|
I(),
|
|
66
66
|
b || d ? "text-primary-default-default" : f ? "text-red-500" : "text-neutral-medium-default"
|
|
@@ -22,6 +22,7 @@ export interface ButtonProps extends VariantProps<typeof buttonVariants> {
|
|
|
22
22
|
className?: string;
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
variant?: "filled" | "outline" | "text";
|
|
25
|
+
form?: string;
|
|
25
26
|
}
|
|
26
|
-
export default function Button({ label, onClick, icon, contentClassName, loadingText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default function Button({ label, onClick, icon, contentClassName, loadingText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner, className, form, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { default as Select } from './components/Select/Select';
|
|
|
17
17
|
export { default as SelectFormik } from './components/SelectFormik/SelectFormik';
|
|
18
18
|
export { default as ChangueAccount } from './components/Sidebar/components/changue-account';
|
|
19
19
|
export { default as Spinner } from './components/Spinner/Spinner';
|
|
20
|
+
export { default as Steps } from './components/Steps/Steps';
|
|
20
21
|
export { default as SwipeContainer } from './components/SwipeContainer/SwipeContainer';
|
|
21
22
|
export { default as TabLinks } from './components/TabLinks/TabLinks';
|
|
22
23
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from './components/Table/Table';
|
|
@@ -56,6 +57,7 @@ export type { INavAction, INavLink, Role, RoleLevels, } from './components/Sideb
|
|
|
56
57
|
export type { SidebarContextValue } from './components/Sidebar/hooks/useSidebarHook';
|
|
57
58
|
export type { SpinnerProps, SpinnerSize, SpinnerVariant, } from './components/Spinner/Spinner';
|
|
58
59
|
export type { PaginationProps } from './components/Pagination/Pagination';
|
|
60
|
+
export type { Step, StepsProps } from './components/Steps/Steps';
|
|
59
61
|
export type { SelectOptionRendererProps, SelectProps, SelectionDisplayProps, } from './components/Select/Select';
|
|
60
62
|
export type { ISelectFormik, ISelectFormikOption, } from './components/SelectFormik/SelectFormik';
|
|
61
63
|
export type { DialogHandle } from './components/Dialog/Dialog';
|
|
@@ -1,44 +1,225 @@
|
|
|
1
|
-
import { default as
|
|
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 { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as nt } from "./SwipeContainer.es.js";
|
|
20
|
-
import { default as st } from "./TabLinks.es.js";
|
|
21
|
-
import { Table as ct, TableBody as ut, TableCaption as dt, TableCell as ft, TableFooter as pt, TableHead as mt, TableHeader as xt, TableRow as bt } from "./Table.es.js";
|
|
22
|
-
import { default as gt } from "./TextArea.es.js";
|
|
23
|
-
import { default as ht } from "./Tooltip.es.js";
|
|
24
|
-
import { u as j } from "./LayoutGeneric-jDE96L2N.js";
|
|
25
|
-
import { L as jt, S as Nt } from "./LayoutGeneric-jDE96L2N.js";
|
|
1
|
+
import { default as ke } from "./Avatar.es.js";
|
|
2
|
+
import { default as Be } from "./Button.es.js";
|
|
3
|
+
import { C as Re, a as qe } from "./CardProfile-BZajBGbO.js";
|
|
4
|
+
import { default as $e } from "./CheckBox.es.js";
|
|
5
|
+
import { default as Te } from "./CheckboxFormik.es.js";
|
|
6
|
+
import { default as De, useDialogControl as Ee } from "./DialogModal.es.js";
|
|
7
|
+
import { default as ze, useDrawerDesktop as We } from "./DrawerDesktop.es.js";
|
|
8
|
+
import { default as Ye, useDrawerMobile as Me } from "./DrawerMobile.es.js";
|
|
9
|
+
import { default as Ve } from "./Header.es.js";
|
|
10
|
+
import { default as Ze } from "./Input.es.js";
|
|
11
|
+
import { default as Je } from "./InputFormik.es.js";
|
|
12
|
+
import { default as Qe } from "./Logo.es.js";
|
|
13
|
+
import { Menu as et } from "./Menu.es.js";
|
|
14
|
+
import { default as at } from "./Pagination.es.js";
|
|
15
|
+
import { default as ot } from "./ProgressBar.es.js";
|
|
16
|
+
import { default as st } from "./Select.es.js";
|
|
17
|
+
import { default as lt } from "./SelectFormik.es.js";
|
|
18
|
+
import { default as ut } from "./Spinner.es.js";
|
|
26
19
|
import { j as a } from "./jsx-runtime-ByW6EXIE.js";
|
|
27
|
-
import { c as
|
|
28
|
-
import {
|
|
29
|
-
import { useGSAP as S } from "@gsap/react";
|
|
30
|
-
import c from "gsap";
|
|
20
|
+
import { c as u } from "./cn-B6yFEsav.js";
|
|
21
|
+
import { motion as f, AnimatePresence as L } from "framer-motion";
|
|
31
22
|
import { Icons as b } from "./Icons.es.js";
|
|
32
|
-
import {
|
|
33
|
-
import { default as
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
import { default as ft } from "./SwipeContainer.es.js";
|
|
24
|
+
import { default as pt } from "./TabLinks.es.js";
|
|
25
|
+
import { Table as gt, TableBody as yt, TableCaption as bt, TableCell as ht, TableFooter as vt, TableHead as wt, TableHeader as jt, TableRow as Nt } from "./Table.es.js";
|
|
26
|
+
import { default as St } from "./TextArea.es.js";
|
|
27
|
+
import { default as It } from "./Tooltip.es.js";
|
|
28
|
+
import { u as R } from "./LayoutGeneric-jDE96L2N.js";
|
|
29
|
+
import { L as Lt, S as Rt } from "./LayoutGeneric-jDE96L2N.js";
|
|
30
|
+
import { useRef as v, useState as S, useLayoutEffect as D, createContext as E, useContext as F, forwardRef as q, useCallback as z, useEffect as P } from "react";
|
|
31
|
+
import { useGSAP as $ } from "@gsap/react";
|
|
32
|
+
import p from "gsap";
|
|
33
|
+
import { default as Pt } from "./OtpInput.es.js";
|
|
34
|
+
import { DropZone as At } from "./DropZone.es.js";
|
|
35
|
+
const I = ({
|
|
36
|
+
index: t,
|
|
37
|
+
isHorizontal: e,
|
|
38
|
+
currentStep: o
|
|
39
|
+
}) => {
|
|
40
|
+
const r = t < o, n = t === o - 1;
|
|
41
|
+
return /* @__PURE__ */ a.jsxs("div", { className: `relative ${e ? "w-20 h-1" : "w-0.5 h-8"}`, children: [
|
|
42
|
+
/* @__PURE__ */ a.jsx(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: "absolute inset-0 rounded-full bg-neutral-medium-default"
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ a.jsx(
|
|
49
|
+
f.div,
|
|
50
|
+
{
|
|
51
|
+
className: "absolute inset-0 rounded-full bg-primary-default-default",
|
|
52
|
+
initial: {
|
|
53
|
+
scaleX: e ? 0 : 1,
|
|
54
|
+
scaleY: e ? 1 : 0,
|
|
55
|
+
opacity: 0
|
|
56
|
+
},
|
|
57
|
+
animate: {
|
|
58
|
+
scaleX: r ? 1 : e ? 0 : 1,
|
|
59
|
+
scaleY: r || e ? 1 : 0,
|
|
60
|
+
opacity: r ? 1 : 0
|
|
61
|
+
},
|
|
62
|
+
transition: {
|
|
63
|
+
duration: 0.2,
|
|
64
|
+
ease: "easeInOut",
|
|
65
|
+
delay: t * 0.1
|
|
66
|
+
},
|
|
67
|
+
style: {
|
|
68
|
+
originX: e ? 0 : 0.5,
|
|
69
|
+
originY: e ? 0.5 : 0
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
n && /* @__PURE__ */ a.jsx(
|
|
74
|
+
f.div,
|
|
75
|
+
{
|
|
76
|
+
className: "absolute inset-0 rounded-full bg-primary-default-default",
|
|
77
|
+
initial: {
|
|
78
|
+
scaleX: e ? 0 : 1,
|
|
79
|
+
scaleY: e ? 1 : 0,
|
|
80
|
+
opacity: 0
|
|
81
|
+
},
|
|
82
|
+
animate: {
|
|
83
|
+
scaleX: 1,
|
|
84
|
+
scaleY: 1,
|
|
85
|
+
opacity: [0, 0.3, 0]
|
|
86
|
+
},
|
|
87
|
+
transition: {
|
|
88
|
+
duration: 1.5,
|
|
89
|
+
repeat: 1 / 0,
|
|
90
|
+
ease: "easeInOut"
|
|
91
|
+
},
|
|
92
|
+
style: {
|
|
93
|
+
originX: e ? 0 : 0.5,
|
|
94
|
+
originY: e ? 0.5 : 0,
|
|
95
|
+
filter: "blur(4px)"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] });
|
|
100
|
+
}, fe = ({
|
|
101
|
+
steps: t,
|
|
102
|
+
currentStep: e,
|
|
103
|
+
orientation: o = "horizontal",
|
|
104
|
+
variant: r = "default",
|
|
105
|
+
size: n = "md",
|
|
106
|
+
className: s = "",
|
|
107
|
+
onStepClick: l,
|
|
108
|
+
allowClickableSteps: d = !1
|
|
109
|
+
}) => {
|
|
110
|
+
const m = o === "horizontal", g = (i) => ({
|
|
111
|
+
sm: { right: "-40px", top: "16px" },
|
|
112
|
+
md: { right: "-40px", top: "20px" },
|
|
113
|
+
lg: { right: "-40px", top: "24px" }
|
|
114
|
+
})[i], x = {
|
|
115
|
+
sm: {
|
|
116
|
+
circle: "w-8 h-8 text-xs",
|
|
117
|
+
title: "text-sm",
|
|
118
|
+
description: "text-xs",
|
|
119
|
+
spacing: m ? "gap-4" : "gap-1"
|
|
120
|
+
},
|
|
121
|
+
md: {
|
|
122
|
+
circle: "w-10 h-10 text-sm",
|
|
123
|
+
title: "text-base",
|
|
124
|
+
description: "text-sm",
|
|
125
|
+
spacing: m ? "gap-3" : "gap-2"
|
|
126
|
+
},
|
|
127
|
+
lg: {
|
|
128
|
+
circle: "w-12 h-12 text-base",
|
|
129
|
+
title: "text-lg",
|
|
130
|
+
description: "text-base",
|
|
131
|
+
spacing: m ? "gap-4" : "gap-3"
|
|
132
|
+
}
|
|
133
|
+
}, h = (i) => i < e ? "completed" : i === e ? "current" : "upcoming", w = (i) => {
|
|
134
|
+
const c = `${x[n].circle} rounded-full flex items-center justify-center font-medium`;
|
|
135
|
+
switch (i) {
|
|
136
|
+
case "completed":
|
|
137
|
+
return `${c} bg-primary-default-default text-neutral-strong-default shadow-lg`;
|
|
138
|
+
case "current":
|
|
139
|
+
return `${c} border-3 border-primary text-neutral-strong-default shadow-lg duration-900`;
|
|
140
|
+
default:
|
|
141
|
+
return `${c} bg-neutral-medium-default text-neutral-medium-default`;
|
|
142
|
+
}
|
|
143
|
+
}, j = (i) => {
|
|
144
|
+
d && l && l(i);
|
|
145
|
+
}, O = m ? `flex items-center ${s}` : `space-y-0 ${s}`;
|
|
146
|
+
return /* @__PURE__ */ a.jsx("div", { className: O, children: t.map((i, c) => {
|
|
147
|
+
const y = h(c), N = d && l;
|
|
148
|
+
return /* @__PURE__ */ a.jsx("div", { className: "flex items-center", children: m ? /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsxs("div", { className: "w-40 flex flex-col items-center relative", children: [
|
|
149
|
+
/* @__PURE__ */ a.jsx(
|
|
150
|
+
f.div,
|
|
151
|
+
{
|
|
152
|
+
className: `${w(y)} ${N ? "cursor-pointer" : ""} relative z-10`,
|
|
153
|
+
initial: { scale: 0.8, opacity: 0 },
|
|
154
|
+
animate: { scale: 1, opacity: 1 },
|
|
155
|
+
transition: { duration: 0.3, delay: c * 0.1 },
|
|
156
|
+
whileTap: N ? { scale: 0.95 } : {},
|
|
157
|
+
onClick: () => j(c),
|
|
158
|
+
children: r === "numbered" || !i.icon ? y === "completed" ? /* @__PURE__ */ a.jsx(f.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ a.jsx(b.Check, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ a.jsx("span", { children: c + 1 }) : i.icon
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
c < t.length - 1 && /* @__PURE__ */ a.jsx(
|
|
162
|
+
"div",
|
|
163
|
+
{
|
|
164
|
+
className: "absolute",
|
|
165
|
+
style: g(n),
|
|
166
|
+
children: /* @__PURE__ */ a.jsx(
|
|
167
|
+
I,
|
|
168
|
+
{
|
|
169
|
+
index: c,
|
|
170
|
+
isHorizontal: m,
|
|
171
|
+
currentStep: e
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
r !== "minimal" && i.description && /* @__PURE__ */ a.jsx("p", { className: u(
|
|
177
|
+
x[n].description,
|
|
178
|
+
"text-gray-400 mt-2 text-center max-w-full",
|
|
179
|
+
y === "current" ? "text-neutral-strong-default font-semibold text-sm" : "text-neutral-medium-default"
|
|
180
|
+
), children: i.description })
|
|
181
|
+
] }) }) : /* @__PURE__ */ a.jsxs("div", { className: "relative flex w-36", children: [
|
|
182
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-col items-center w-full", children: [
|
|
183
|
+
/* @__PURE__ */ a.jsx(
|
|
184
|
+
f.div,
|
|
185
|
+
{
|
|
186
|
+
className: `${w(y)} ${N ? "cursor-pointer" : ""}`,
|
|
187
|
+
initial: { scale: 0.8, opacity: 0 },
|
|
188
|
+
animate: { scale: 1, opacity: 1 },
|
|
189
|
+
transition: { duration: 0.3, delay: c * 0.1 },
|
|
190
|
+
whileTap: N ? { scale: 0.95 } : {},
|
|
191
|
+
onClick: () => j(c),
|
|
192
|
+
children: r === "numbered" || !i.icon ? y === "completed" ? /* @__PURE__ */ a.jsx(f.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ a.jsx(b.Check, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ a.jsx("span", { children: c + 1 }) : i.icon
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
c < t.length - 1 && /* @__PURE__ */ a.jsx(
|
|
196
|
+
I,
|
|
197
|
+
{
|
|
198
|
+
index: c,
|
|
199
|
+
isHorizontal: m,
|
|
200
|
+
currentStep: e
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
] }),
|
|
204
|
+
r !== "minimal" && /* @__PURE__ */ a.jsx(
|
|
205
|
+
f.div,
|
|
206
|
+
{
|
|
207
|
+
className: `absolute -right-30 ml-4 top-3 gap-3 flex flex-col w-full ${x[n].spacing} flex h-full`,
|
|
208
|
+
initial: { opacity: 0, x: -10 },
|
|
209
|
+
animate: { opacity: 1, x: 0 },
|
|
210
|
+
transition: { duration: 0.3, delay: c * 0.1 + 0.1 },
|
|
211
|
+
children: i.description && /* @__PURE__ */ a.jsx("p", { className: u(x[n].description, "text-gray-400", y === "current" ? "text-neutral-strong-default font-semibold text-sm" : "text-neutral-medium-default"), children: i.description })
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
] }) }, i.id);
|
|
215
|
+
}) });
|
|
216
|
+
}, W = (t, e) => {
|
|
217
|
+
$(
|
|
37
218
|
() => {
|
|
38
219
|
if (!t.current) return;
|
|
39
220
|
const o = t.current, r = document.querySelector('[data-main-content="true"]');
|
|
40
221
|
if (e) {
|
|
41
|
-
|
|
222
|
+
p.fromTo(
|
|
42
223
|
o,
|
|
43
224
|
{
|
|
44
225
|
width: "0rem",
|
|
@@ -50,13 +231,13 @@ const D = (t, e) => {
|
|
|
50
231
|
duration: 0.4,
|
|
51
232
|
ease: "power2.out"
|
|
52
233
|
}
|
|
53
|
-
), r &&
|
|
234
|
+
), r && p.to(r, {
|
|
54
235
|
marginLeft: o.offsetWidth + "px",
|
|
55
236
|
duration: 0.4,
|
|
56
237
|
ease: "power2.out"
|
|
57
238
|
});
|
|
58
239
|
const n = o.querySelectorAll(".secondary-bar-content > *");
|
|
59
|
-
n.length > 0 &&
|
|
240
|
+
n.length > 0 && p.fromTo(
|
|
60
241
|
n,
|
|
61
242
|
{
|
|
62
243
|
y: 20,
|
|
@@ -72,12 +253,12 @@ const D = (t, e) => {
|
|
|
72
253
|
}
|
|
73
254
|
);
|
|
74
255
|
} else
|
|
75
|
-
|
|
256
|
+
p.to(o, {
|
|
76
257
|
width: "0rem",
|
|
77
258
|
opacity: 0,
|
|
78
259
|
duration: 0.3,
|
|
79
260
|
ease: "power2.in"
|
|
80
|
-
}), r &&
|
|
261
|
+
}), r && p.to(r, {
|
|
81
262
|
marginLeft: "0px",
|
|
82
263
|
duration: 0.3,
|
|
83
264
|
ease: "power2.in"
|
|
@@ -85,31 +266,31 @@ const D = (t, e) => {
|
|
|
85
266
|
},
|
|
86
267
|
{ scope: t, dependencies: [e] }
|
|
87
268
|
);
|
|
88
|
-
},
|
|
269
|
+
}, B = ({
|
|
89
270
|
children: t,
|
|
90
271
|
isOpen: e = !1,
|
|
91
272
|
className: o = "",
|
|
92
273
|
width: r = "w-96",
|
|
93
274
|
action: n,
|
|
94
|
-
primarySidebarCollapsed:
|
|
275
|
+
primarySidebarCollapsed: s,
|
|
95
276
|
onClose: l
|
|
96
277
|
}) => {
|
|
97
|
-
const
|
|
98
|
-
return
|
|
278
|
+
const d = v(null), [m, g] = S({ left: 0, width: 0 }), { primarySidebarRef: x } = R();
|
|
279
|
+
return D(() => {
|
|
99
280
|
if (x?.current) {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
left:
|
|
103
|
-
width:
|
|
281
|
+
const h = x.current.getBoundingClientRect();
|
|
282
|
+
g({
|
|
283
|
+
left: h.width,
|
|
284
|
+
width: h.width
|
|
104
285
|
});
|
|
105
286
|
}
|
|
106
|
-
}, [x, e,
|
|
287
|
+
}, [x, e, s]), W(d, e), /* @__PURE__ */ a.jsx(a.Fragment, { children: e && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
107
288
|
/* @__PURE__ */ a.jsx(
|
|
108
289
|
"div",
|
|
109
290
|
{
|
|
110
291
|
className: "fixed inset-0 bg-black/95 z-20",
|
|
111
292
|
style: {
|
|
112
|
-
left:
|
|
293
|
+
left: m.left
|
|
113
294
|
},
|
|
114
295
|
onClick: l
|
|
115
296
|
}
|
|
@@ -117,47 +298,47 @@ const D = (t, e) => {
|
|
|
117
298
|
/* @__PURE__ */ a.jsx(
|
|
118
299
|
"div",
|
|
119
300
|
{
|
|
120
|
-
ref:
|
|
121
|
-
className:
|
|
301
|
+
ref: d,
|
|
302
|
+
className: u(
|
|
122
303
|
"h-screen bg-neutral-default-default border-r-1 border-neutral-strong-default flex flex-col secondary-bar flex-shrink-0",
|
|
123
304
|
"absolute top-0 z-30",
|
|
124
305
|
r,
|
|
125
306
|
o
|
|
126
307
|
),
|
|
127
308
|
style: {
|
|
128
|
-
left:
|
|
309
|
+
left: m.left
|
|
129
310
|
},
|
|
130
311
|
"data-action": n,
|
|
131
312
|
children: /* @__PURE__ */ a.jsx("div", { className: "secondary-bar-content", children: t })
|
|
132
313
|
}
|
|
133
314
|
)
|
|
134
315
|
] }) });
|
|
135
|
-
},
|
|
136
|
-
Root:
|
|
137
|
-
Header:
|
|
138
|
-
Content:
|
|
139
|
-
Footer:
|
|
140
|
-
Spacer:
|
|
141
|
-
}),
|
|
316
|
+
}, X = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: u("h-16 ", e), children: t }), Y = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: u("flex-1 overflow-y-auto p-4", e), children: t }), M = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: u("p-4 border-t border-neutral-strong-default", e), children: t }), U = ({ className: t }) => /* @__PURE__ */ a.jsx("div", { className: u("flex-1", t) }), me = Object.assign(B, {
|
|
317
|
+
Root: B,
|
|
318
|
+
Header: X,
|
|
319
|
+
Content: Y,
|
|
320
|
+
Footer: M,
|
|
321
|
+
Spacer: U
|
|
322
|
+
}), A = E(
|
|
142
323
|
void 0
|
|
143
|
-
),
|
|
144
|
-
const t = A
|
|
324
|
+
), pe = () => {
|
|
325
|
+
const t = F(A);
|
|
145
326
|
if (!t)
|
|
146
327
|
throw new Error("useSidebar must be used within a Sidebar.Root");
|
|
147
328
|
return t;
|
|
148
|
-
},
|
|
329
|
+
}, V = ({
|
|
149
330
|
children: t
|
|
150
331
|
}) => {
|
|
151
|
-
const [e, o] =
|
|
332
|
+
const [e, o] = S(!1), [r, n] = S(!1), s = v(null), l = () => {
|
|
152
333
|
o(!1), n(!1);
|
|
153
|
-
},
|
|
334
|
+
}, d = () => {
|
|
154
335
|
o(!0), n(!1);
|
|
155
|
-
},
|
|
336
|
+
}, w = {
|
|
156
337
|
isCollapsed: e,
|
|
157
338
|
setIsCollapsed: o,
|
|
158
|
-
navbarRef:
|
|
339
|
+
navbarRef: s,
|
|
159
340
|
toggleCollapse: () => {
|
|
160
|
-
e ? l() :
|
|
341
|
+
e ? l() : d();
|
|
161
342
|
},
|
|
162
343
|
activeSecondaryBar: r ? "notifications" : null,
|
|
163
344
|
openSecondaryBar: () => {
|
|
@@ -167,22 +348,22 @@ const D = (t, e) => {
|
|
|
167
348
|
n(!1);
|
|
168
349
|
},
|
|
169
350
|
toggleSecondaryBar: () => {
|
|
170
|
-
n((
|
|
351
|
+
n((j) => !j);
|
|
171
352
|
}
|
|
172
353
|
};
|
|
173
|
-
return /* @__PURE__ */ a.jsx(
|
|
174
|
-
},
|
|
175
|
-
|
|
354
|
+
return /* @__PURE__ */ a.jsx(A.Provider, { value: w, children: t });
|
|
355
|
+
}, C = (t, e, o, r) => e && (Array.isArray(e) ? e.length > 0 : e) ? t.to(e, o, r) : t, G = (t, e, o) => {
|
|
356
|
+
$(
|
|
176
357
|
() => {
|
|
177
358
|
if (!t.current) return;
|
|
178
|
-
const r =
|
|
359
|
+
const r = p.timeline({
|
|
179
360
|
defaults: { duration: 0.7, ease: "power1.out" }
|
|
180
361
|
}), n = {
|
|
181
362
|
navbar: t.current,
|
|
182
|
-
navLabels:
|
|
183
|
-
navIconWrappers:
|
|
184
|
-
navIcons:
|
|
185
|
-
navLinkItems:
|
|
363
|
+
navLabels: p.utils.toArray(".nav-label"),
|
|
364
|
+
navIconWrappers: p.utils.toArray(".nav-icon-wrapper"),
|
|
365
|
+
navIcons: p.utils.toArray(".nav-icon"),
|
|
366
|
+
navLinkItems: p.utils.toArray(".nav-link-item"),
|
|
186
367
|
logoutButton: document.querySelector(".logout-button"),
|
|
187
368
|
logoutLabel: document.querySelector(".logout-label"),
|
|
188
369
|
logoutIcon: document.querySelector(".logout-icon"),
|
|
@@ -210,14 +391,14 @@ const D = (t, e) => {
|
|
|
210
391
|
),
|
|
211
392
|
// Secondary bar elements
|
|
212
393
|
secondaryBar: document.querySelector(".secondary-bar"),
|
|
213
|
-
secondaryBarContent:
|
|
214
|
-
badgeInLink:
|
|
394
|
+
secondaryBarContent: p.utils.toArray(".secondary-bar *"),
|
|
395
|
+
badgeInLink: p.utils.toArray(".badge-in-link")
|
|
215
396
|
};
|
|
216
|
-
e ?
|
|
397
|
+
e ? Z(r, n) : H(r, n), n.secondaryBar && J(n.secondaryBar);
|
|
217
398
|
},
|
|
218
399
|
{ scope: t, dependencies: [e, o] }
|
|
219
400
|
);
|
|
220
|
-
},
|
|
401
|
+
}, Z = (t, e) => {
|
|
221
402
|
t.to(e.navbar, {
|
|
222
403
|
width: "5rem",
|
|
223
404
|
duration: 0.2,
|
|
@@ -276,7 +457,7 @@ const D = (t, e) => {
|
|
|
276
457
|
marginLeft: 0
|
|
277
458
|
},
|
|
278
459
|
0
|
|
279
|
-
).to(e.navIcons, { scale: 0.95, ease: "elastic.out(1, 0.3)" }, 0),
|
|
460
|
+
).to(e.navIcons, { scale: 0.95, ease: "elastic.out(1, 0.3)" }, 0), C(
|
|
280
461
|
t,
|
|
281
462
|
e.buttonCrevron,
|
|
282
463
|
{
|
|
@@ -289,7 +470,7 @@ const D = (t, e) => {
|
|
|
289
470
|
}
|
|
290
471
|
},
|
|
291
472
|
0
|
|
292
|
-
),
|
|
473
|
+
), C(
|
|
293
474
|
t,
|
|
294
475
|
e.buttonContentChevron,
|
|
295
476
|
{
|
|
@@ -356,7 +537,7 @@ const D = (t, e) => {
|
|
|
356
537
|
},
|
|
357
538
|
-1
|
|
358
539
|
);
|
|
359
|
-
},
|
|
540
|
+
}, H = (t, e) => {
|
|
360
541
|
t.to(e.navbar, { width: "20rem" }, -1).to(
|
|
361
542
|
e.navLinkItems,
|
|
362
543
|
{
|
|
@@ -366,7 +547,7 @@ const D = (t, e) => {
|
|
|
366
547
|
justifyContent: "flex-start"
|
|
367
548
|
},
|
|
368
549
|
-1
|
|
369
|
-
),
|
|
550
|
+
), C(
|
|
370
551
|
t,
|
|
371
552
|
e.buttonCrevron,
|
|
372
553
|
{
|
|
@@ -379,7 +560,7 @@ const D = (t, e) => {
|
|
|
379
560
|
}
|
|
380
561
|
},
|
|
381
562
|
0
|
|
382
|
-
),
|
|
563
|
+
), C(
|
|
383
564
|
t,
|
|
384
565
|
e.buttonContentChevron,
|
|
385
566
|
{
|
|
@@ -484,21 +665,21 @@ const D = (t, e) => {
|
|
|
484
665
|
},
|
|
485
666
|
0
|
|
486
667
|
).to(e.navIcons, { scale: 1 }, 0.3);
|
|
487
|
-
},
|
|
488
|
-
|
|
668
|
+
}, J = (t, e) => {
|
|
669
|
+
p.to(t, {
|
|
489
670
|
x: "-100%",
|
|
490
671
|
opacity: 0,
|
|
491
672
|
duration: 0.3,
|
|
492
673
|
ease: "power2.in"
|
|
493
674
|
});
|
|
494
|
-
},
|
|
675
|
+
}, K = q(
|
|
495
676
|
({ children: t, isCollapsed: e = !1, className: o = "" }, r) => {
|
|
496
|
-
const n =
|
|
497
|
-
n.current =
|
|
677
|
+
const n = v(null), { registerPrimarySidebar: s } = R(), l = z((d) => {
|
|
678
|
+
n.current = d, typeof r == "function" ? r(d) : r && (r.current = d);
|
|
498
679
|
}, [r]);
|
|
499
|
-
return
|
|
500
|
-
n.current &&
|
|
501
|
-
}, [
|
|
680
|
+
return P(() => {
|
|
681
|
+
n.current && s(n);
|
|
682
|
+
}, [s]), G(n, e, !1), /* @__PURE__ */ a.jsx(
|
|
502
683
|
"div",
|
|
503
684
|
{
|
|
504
685
|
ref: l,
|
|
@@ -508,11 +689,11 @@ const D = (t, e) => {
|
|
|
508
689
|
}
|
|
509
690
|
);
|
|
510
691
|
}
|
|
511
|
-
),
|
|
512
|
-
(t, e) => /* @__PURE__ */ a.jsx(
|
|
692
|
+
), k = q(
|
|
693
|
+
(t, e) => /* @__PURE__ */ a.jsx(V, { children: /* @__PURE__ */ a.jsx(K, { ...t, ref: e }) })
|
|
513
694
|
);
|
|
514
|
-
|
|
515
|
-
const
|
|
695
|
+
k.displayName = "SidebarRoot";
|
|
696
|
+
const Q = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("div", { className: u("flex mt-5 mb-4 justify-end mr-5 container-icon-collapsade", t && ""), children: /* @__PURE__ */ a.jsx(
|
|
516
697
|
"button",
|
|
517
698
|
{
|
|
518
699
|
onClick: e,
|
|
@@ -521,7 +702,7 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
521
702
|
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
522
703
|
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" })
|
|
523
704
|
}
|
|
524
|
-
) }),
|
|
705
|
+
) }), _ = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: `${e} sidebar-header`, children: t }), ee = ({ className: t }) => /* @__PURE__ */ a.jsx("div", { className: u("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" }) }), te = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: e, children: t }), ae = ({ className: t, size: e = "auto" }) => {
|
|
525
706
|
const o = () => {
|
|
526
707
|
switch (e) {
|
|
527
708
|
case "auto":
|
|
@@ -534,36 +715,36 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
534
715
|
return "h-8 w-8";
|
|
535
716
|
}
|
|
536
717
|
};
|
|
537
|
-
return /* @__PURE__ */ a.jsx("div", { className:
|
|
538
|
-
},
|
|
539
|
-
Root:
|
|
540
|
-
CollapseButton:
|
|
541
|
-
Header:
|
|
542
|
-
Divider:
|
|
543
|
-
Content:
|
|
544
|
-
Spacer:
|
|
545
|
-
Footer:
|
|
546
|
-
}),
|
|
718
|
+
return /* @__PURE__ */ a.jsx("div", { className: u(o(), t) });
|
|
719
|
+
}, re = ({ children: t, className: e }) => /* @__PURE__ */ a.jsx("div", { className: e, children: t }), xe = Object.assign(k, {
|
|
720
|
+
Root: k,
|
|
721
|
+
CollapseButton: Q,
|
|
722
|
+
Header: _,
|
|
723
|
+
Divider: ee,
|
|
724
|
+
Content: te,
|
|
725
|
+
Spacer: ae,
|
|
726
|
+
Footer: re
|
|
727
|
+
}), ge = ({
|
|
547
728
|
children: t,
|
|
548
729
|
icon: e,
|
|
549
730
|
label: o,
|
|
550
731
|
href: r,
|
|
551
732
|
onClick: n,
|
|
552
|
-
isActive:
|
|
733
|
+
isActive: s = !1,
|
|
553
734
|
className: l
|
|
554
735
|
}) => {
|
|
555
|
-
const
|
|
736
|
+
const d = r ? "a" : "button";
|
|
556
737
|
return /* @__PURE__ */ a.jsxs(
|
|
557
|
-
|
|
738
|
+
d,
|
|
558
739
|
{
|
|
559
740
|
href: r,
|
|
560
741
|
onClick: n,
|
|
561
|
-
className:
|
|
742
|
+
className: u(
|
|
562
743
|
"nav-link-item",
|
|
563
744
|
"flex items-center w-full px-3 py-2 text-left",
|
|
564
745
|
"hover:bg-neutral-medium-default transition-colors rounded-lg",
|
|
565
746
|
"focus:outline-none focus:ring-2 focus:ring-primary-default-default",
|
|
566
|
-
|
|
747
|
+
s && "bg-neutral-medium-default",
|
|
567
748
|
l
|
|
568
749
|
),
|
|
569
750
|
children: [
|
|
@@ -573,39 +754,39 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
573
754
|
]
|
|
574
755
|
}
|
|
575
756
|
);
|
|
576
|
-
},
|
|
757
|
+
}, T = ({
|
|
577
758
|
count: t,
|
|
578
759
|
maxCount: e = 9,
|
|
579
760
|
className: o = "",
|
|
580
761
|
size: r = "medium",
|
|
581
762
|
variant: n = "primary",
|
|
582
|
-
showZero:
|
|
763
|
+
showZero: s = !1
|
|
583
764
|
}) => {
|
|
584
|
-
const l = t,
|
|
585
|
-
if (l === 0 && !
|
|
586
|
-
const
|
|
765
|
+
const l = t, d = l > e ? `+${e}` : l;
|
|
766
|
+
if (l === 0 && !s) return null;
|
|
767
|
+
const m = {
|
|
587
768
|
small: "w-4.5 h-4.5 text-xs ",
|
|
588
769
|
medium: "w-5 h-5 text-xs",
|
|
589
770
|
large: "w-6 h-6 text-sm"
|
|
590
|
-
},
|
|
771
|
+
}, g = {
|
|
591
772
|
primary: "bg-primary-default-default text-neutral-strong-default",
|
|
592
773
|
secondary: "bg-neutral-medium-default text-neutral-strong-default",
|
|
593
774
|
success: "bg-green-500 text-white",
|
|
594
775
|
warning: "bg-yellow-500 text-black",
|
|
595
776
|
danger: "bg-red-500 text-white"
|
|
596
777
|
};
|
|
597
|
-
return /* @__PURE__ */ a.jsx("div", { className:
|
|
778
|
+
return /* @__PURE__ */ a.jsx("div", { className: u(
|
|
598
779
|
"rounded-full flex items-center justify-center font-medium ",
|
|
599
|
-
|
|
600
|
-
|
|
780
|
+
m[r],
|
|
781
|
+
g[n],
|
|
601
782
|
o
|
|
602
|
-
), children: /* @__PURE__ */ a.jsx("span", { children:
|
|
603
|
-
},
|
|
783
|
+
), children: /* @__PURE__ */ a.jsx("span", { children: d }) });
|
|
784
|
+
}, ye = ({
|
|
604
785
|
linkActions: t,
|
|
605
786
|
onClick: e,
|
|
606
787
|
activeAction: o
|
|
607
788
|
}) => /* @__PURE__ */ a.jsx("nav", { className: "flex flex-col gap-1", children: t?.map((r, n) => r.isView && r.viewAccess() && /* @__PURE__ */ a.jsx(
|
|
608
|
-
|
|
789
|
+
f.div,
|
|
609
790
|
{
|
|
610
791
|
initial: { opacity: 0 },
|
|
611
792
|
animate: { opacity: 1 },
|
|
@@ -621,15 +802,15 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
621
802
|
onClick: () => {
|
|
622
803
|
e?.(r.action);
|
|
623
804
|
},
|
|
624
|
-
className:
|
|
805
|
+
className: u(
|
|
625
806
|
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
626
807
|
"transition-all duration-300 ease-out w-full",
|
|
627
808
|
"group hover:bg-neutral-medium-selected",
|
|
628
809
|
o === r.action ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
629
810
|
),
|
|
630
811
|
children: [
|
|
631
|
-
/* @__PURE__ */ a.jsx(
|
|
632
|
-
|
|
812
|
+
/* @__PURE__ */ a.jsx(L, { mode: "wait", children: o === r.action && /* @__PURE__ */ a.jsx(
|
|
813
|
+
f.div,
|
|
633
814
|
{
|
|
634
815
|
layoutId: "nav-active-bg",
|
|
635
816
|
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
@@ -644,7 +825,7 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
644
825
|
}
|
|
645
826
|
) }),
|
|
646
827
|
/* @__PURE__ */ a.jsxs(
|
|
647
|
-
|
|
828
|
+
f.div,
|
|
648
829
|
{
|
|
649
830
|
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
650
831
|
animate: {
|
|
@@ -657,7 +838,7 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
657
838
|
children: [
|
|
658
839
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
659
840
|
/* @__PURE__ */ a.jsx(
|
|
660
|
-
|
|
841
|
+
f.div,
|
|
661
842
|
{
|
|
662
843
|
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
663
844
|
animate: {
|
|
@@ -669,7 +850,7 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
669
850
|
},
|
|
670
851
|
children: typeof r.icon == "function" ? r.icon({
|
|
671
852
|
size: 24,
|
|
672
|
-
className:
|
|
853
|
+
className: u(
|
|
673
854
|
"nav-icon transition-colors duration-250 ease-out",
|
|
674
855
|
o === r.action ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
675
856
|
)
|
|
@@ -678,7 +859,7 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
678
859
|
),
|
|
679
860
|
/* @__PURE__ */ a.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: r.title })
|
|
680
861
|
] }),
|
|
681
|
-
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: r.count && r?.count >= 1 ? /* @__PURE__ */ a.jsx(
|
|
862
|
+
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: r.count && r?.count >= 1 ? /* @__PURE__ */ a.jsx(T, { count: r.count, maxCount: 9, className: "" }) : "" })
|
|
682
863
|
]
|
|
683
864
|
}
|
|
684
865
|
)
|
|
@@ -687,16 +868,16 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
687
868
|
)
|
|
688
869
|
},
|
|
689
870
|
n
|
|
690
|
-
)) }),
|
|
871
|
+
)) }), be = ({
|
|
691
872
|
links: t,
|
|
692
873
|
isLinkActive: e,
|
|
693
874
|
onLinkClick: o
|
|
694
875
|
}) => /* @__PURE__ */ a.jsx("nav", { className: "flex flex-col gap-1", children: t?.map((r, n) => {
|
|
695
|
-
const
|
|
876
|
+
const s = e(r.path) || (r.relatedPaths?.some(
|
|
696
877
|
(l) => e(l)
|
|
697
878
|
) ?? !1);
|
|
698
879
|
return r.isView && r.viewAccess() && /* @__PURE__ */ a.jsx(
|
|
699
|
-
|
|
880
|
+
f.div,
|
|
700
881
|
{
|
|
701
882
|
initial: { opacity: 0 },
|
|
702
883
|
animate: { opacity: 1 },
|
|
@@ -712,15 +893,15 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
712
893
|
onClick: () => {
|
|
713
894
|
o?.(r.path);
|
|
714
895
|
},
|
|
715
|
-
className:
|
|
896
|
+
className: u(
|
|
716
897
|
"nav-link-item flex rounded-lg cursor-pointer relative overflow-hidden h-10 ",
|
|
717
898
|
"transition-all duration-300 ease-out w-full",
|
|
718
899
|
"group hover:bg-neutral-medium-selected",
|
|
719
|
-
|
|
900
|
+
s ? "text-primary-default-default bg-neutral-medium-selected" : "text-neutral-default-default"
|
|
720
901
|
),
|
|
721
902
|
children: [
|
|
722
|
-
/* @__PURE__ */ a.jsx(
|
|
723
|
-
|
|
903
|
+
/* @__PURE__ */ a.jsx(L, { mode: "wait", children: s && /* @__PURE__ */ a.jsx(
|
|
904
|
+
f.div,
|
|
724
905
|
{
|
|
725
906
|
layoutId: "nav-active-bg",
|
|
726
907
|
className: "absolute inset-0 bg-neutral-medium-selected rounded-lg",
|
|
@@ -735,7 +916,7 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
735
916
|
}
|
|
736
917
|
) }),
|
|
737
918
|
/* @__PURE__ */ a.jsxs(
|
|
738
|
-
|
|
919
|
+
f.div,
|
|
739
920
|
{
|
|
740
921
|
className: "nav-content-wrapper flex items-center justify-between gap-3 px-3 relative z-10 w-full",
|
|
741
922
|
animate: {
|
|
@@ -748,11 +929,11 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
748
929
|
children: [
|
|
749
930
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
750
931
|
/* @__PURE__ */ a.jsx(
|
|
751
|
-
|
|
932
|
+
f.div,
|
|
752
933
|
{
|
|
753
934
|
className: "nav-icon-wrapper flex items-center justify-center flex-shrink-0",
|
|
754
935
|
animate: {
|
|
755
|
-
scale:
|
|
936
|
+
scale: s ? 1.05 : 1
|
|
756
937
|
},
|
|
757
938
|
transition: {
|
|
758
939
|
duration: 0.25,
|
|
@@ -760,16 +941,16 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
760
941
|
},
|
|
761
942
|
children: typeof r.icon == "function" ? r.icon({
|
|
762
943
|
size: 24,
|
|
763
|
-
className:
|
|
944
|
+
className: u(
|
|
764
945
|
"nav-icon transition-colors duration-250 ease-out",
|
|
765
|
-
|
|
946
|
+
s ? "text-primary-default-default" : "text-neutral-default-default group-hover:text-white-prometeo"
|
|
766
947
|
)
|
|
767
948
|
}) : null
|
|
768
949
|
}
|
|
769
950
|
),
|
|
770
951
|
/* @__PURE__ */ a.jsx("span", { className: "nav-label whitespace-nowrap text-sm font-semibold ", children: r.title })
|
|
771
952
|
] }),
|
|
772
|
-
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: r.count && r.count ? /* @__PURE__ */ a.jsx(
|
|
953
|
+
/* @__PURE__ */ a.jsx("div", { className: "badge-in-link", children: r.count && r.count ? /* @__PURE__ */ a.jsx(T, { count: r.count, maxCount: 9, className: "" }) : "" })
|
|
773
954
|
]
|
|
774
955
|
}
|
|
775
956
|
)
|
|
@@ -779,18 +960,18 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
779
960
|
},
|
|
780
961
|
n
|
|
781
962
|
);
|
|
782
|
-
}) }),
|
|
963
|
+
}) }), he = ({
|
|
783
964
|
isActiveModalNotification: t,
|
|
784
965
|
setIsActiveModalNotification: e
|
|
785
966
|
}) => ({ handleNotificationClick: () => {
|
|
786
967
|
e(!0);
|
|
787
|
-
}, isActiveModalNotification: t }),
|
|
788
|
-
const e =
|
|
968
|
+
}, isActiveModalNotification: t }), ve = (t) => {
|
|
969
|
+
const e = v(null);
|
|
789
970
|
return {
|
|
790
971
|
isCollapsed: t,
|
|
791
972
|
navbarRef: e
|
|
792
973
|
};
|
|
793
|
-
},
|
|
974
|
+
}, we = ({
|
|
794
975
|
isCollapsed: t,
|
|
795
976
|
onToggle: e
|
|
796
977
|
}) => /* @__PURE__ */ a.jsx("div", { className: "", children: /* @__PURE__ */ a.jsx(
|
|
@@ -802,16 +983,16 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
802
983
|
className: "cursor-pointer text-neutral-default-default hover:text-primary-default transition-colors duration-300",
|
|
803
984
|
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" })
|
|
804
985
|
}
|
|
805
|
-
) }),
|
|
986
|
+
) }), je = ({ logoUrl: t, companyName: e }) => /* @__PURE__ */ a.jsx("div", { className: "w-full flex justify-center items-center p-2 h-20", children: /* @__PURE__ */ a.jsx(
|
|
806
987
|
"img",
|
|
807
988
|
{
|
|
808
989
|
src: t,
|
|
809
990
|
className: "h-2/3 rounded-full",
|
|
810
991
|
alt: e ?? ""
|
|
811
992
|
}
|
|
812
|
-
) }),
|
|
813
|
-
const o =
|
|
814
|
-
return
|
|
993
|
+
) }), Ne = (t, e = !0) => {
|
|
994
|
+
const o = v(null);
|
|
995
|
+
return P(() => {
|
|
815
996
|
if (!e) return;
|
|
816
997
|
const r = (n) => {
|
|
817
998
|
o.current && !o.current.contains(n.target) && t();
|
|
@@ -830,57 +1011,58 @@ const G = ({ isCollapsed: t, onToggleCollapse: e }) => /* @__PURE__ */ a.jsx("di
|
|
|
830
1011
|
}, [t, e]), o;
|
|
831
1012
|
};
|
|
832
1013
|
export {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
1014
|
+
ke as Avatar,
|
|
1015
|
+
T as Badge,
|
|
1016
|
+
Be as Button,
|
|
1017
|
+
Re as CardProfile,
|
|
1018
|
+
qe as ChangueAccount,
|
|
1019
|
+
$e as CheckBox,
|
|
1020
|
+
Te as CheckboxFormik,
|
|
1021
|
+
je as CompanyLogo,
|
|
1022
|
+
De as DialogModal,
|
|
1023
|
+
ze as DrawerDesktop,
|
|
1024
|
+
Ye as DrawerMobile,
|
|
1025
|
+
At as DropZone,
|
|
1026
|
+
Ve as Header,
|
|
846
1027
|
b as Icons,
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
1028
|
+
Ze as Input,
|
|
1029
|
+
Je as InputFormik,
|
|
1030
|
+
Lt as LayoutGeneric,
|
|
1031
|
+
Qe as Logo,
|
|
1032
|
+
et as Menu,
|
|
1033
|
+
ye as NavBarActions,
|
|
1034
|
+
we as NavbarCollapseButton,
|
|
1035
|
+
be as NavbarLinks,
|
|
1036
|
+
ge as NavigationLink,
|
|
1037
|
+
Pt as OtpInput,
|
|
1038
|
+
at as Pagination,
|
|
1039
|
+
ot as ProgressBar,
|
|
1040
|
+
me as SecondaryBar,
|
|
1041
|
+
st as Select,
|
|
1042
|
+
lt as SelectFormik,
|
|
1043
|
+
xe as Sidebar,
|
|
1044
|
+
V as SidebarProvider,
|
|
1045
|
+
Rt as SidebarRefProvider,
|
|
1046
|
+
ut as Spinner,
|
|
1047
|
+
fe as Steps,
|
|
1048
|
+
ft as SwipeContainer,
|
|
1049
|
+
pt as TabLinks,
|
|
1050
|
+
gt as Table,
|
|
1051
|
+
yt as TableBody,
|
|
1052
|
+
bt as TableCaption,
|
|
1053
|
+
ht as TableCell,
|
|
1054
|
+
vt as TableFooter,
|
|
1055
|
+
wt as TableHead,
|
|
1056
|
+
jt as TableHeader,
|
|
1057
|
+
Nt as TableRow,
|
|
1058
|
+
St as TextArea,
|
|
1059
|
+
It as Tooltip,
|
|
1060
|
+
he as useActionsNavbar,
|
|
1061
|
+
Ne as useClickOutside,
|
|
1062
|
+
Ee as useDialogControl,
|
|
1063
|
+
We as useDrawerDesktop,
|
|
1064
|
+
Me as useDrawerMobile,
|
|
1065
|
+
ve as useNavbarCollapse,
|
|
1066
|
+
pe as useSidebar,
|
|
1067
|
+
R as useSidebarContext
|
|
886
1068
|
};
|
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.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "design kit system",
|
|
7
7
|
"main": "dist/prometeo-design-system.umd.js",
|
|
@@ -89,6 +89,10 @@
|
|
|
89
89
|
"types": "./dist/Spinner.d.ts",
|
|
90
90
|
"import": "./dist/Spinner.es.js"
|
|
91
91
|
},
|
|
92
|
+
"./Steps": {
|
|
93
|
+
"types": "./dist/Steps.d.ts",
|
|
94
|
+
"import": "./dist/Steps.es.js"
|
|
95
|
+
},
|
|
92
96
|
"./SwipeContainer": {
|
|
93
97
|
"types": "./dist/SwipeContainer.d.ts",
|
|
94
98
|
"import": "./dist/SwipeContainer.es.js"
|