prometeo-design-system 2.6.6 → 2.6.8
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/ButtonV2.d.ts +6 -0
- package/dist/ButtonV2.es.js +217 -0
- package/dist/DatePicker.es.js +1 -1
- package/dist/DrawerDesktop.es.js +93 -73
- package/dist/Header.es.js +11 -11
- package/dist/{Input-i6OzjjFo.js → Input-R52CsX56.js} +1 -1
- package/dist/Input.es.js +1 -1
- package/dist/InputFormikV2.es.js +1 -1
- package/dist/{Select-D3aU7dXF.js → Select-CMjYSSZB.js} +94 -94
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectSearch.es.js +1 -1
- package/dist/components/Button/ButtonV2.d.ts +23 -0
- package/dist/components/Drawer/DrawerDesktop.d.ts +2 -2
- package/dist/components/Header/Header.d.ts +2 -1
- package/dist/exports/ButtonV2.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/preview/ButtonPreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +19 -17
- package/package.json +5 -2
- package/src/styles/intellisense.css +2 -1
- package/dist/components/Drawer/DrawerDesktop_old.d.ts +0 -15
- package/dist/components/Drawer/DrawerMobile_old.d.ts +0 -18
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { memo as N, useMemo as V } from "react";
|
|
3
|
+
import B from "./Spinner.es.js";
|
|
4
|
+
const M = {
|
|
5
|
+
small: {
|
|
6
|
+
container: "h-10 px-4 py-2",
|
|
7
|
+
label: "",
|
|
8
|
+
icon: ""
|
|
9
|
+
},
|
|
10
|
+
medium: {
|
|
11
|
+
container: "h-12 px-6 py-2",
|
|
12
|
+
label: "",
|
|
13
|
+
icon: ""
|
|
14
|
+
},
|
|
15
|
+
large: {
|
|
16
|
+
container: "h-14 px-6 py-2",
|
|
17
|
+
label: "",
|
|
18
|
+
icon: ""
|
|
19
|
+
}
|
|
20
|
+
}, l = {
|
|
21
|
+
filled: {
|
|
22
|
+
primary: {
|
|
23
|
+
container: ` bg-primary-default-default border-primary-default-default
|
|
24
|
+
hover:bg-primary-default-hover
|
|
25
|
+
active:bg-primary-default-focused
|
|
26
|
+
`,
|
|
27
|
+
label: " text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!",
|
|
28
|
+
icon: " text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!"
|
|
29
|
+
},
|
|
30
|
+
secondary: {
|
|
31
|
+
container: `bg-neutral-medium-default border-neutral-medium-default
|
|
32
|
+
hover:bg-neutral-medium-hover
|
|
33
|
+
active:bg-neutral-medium-pressed`,
|
|
34
|
+
label: "text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!",
|
|
35
|
+
icon: "text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!"
|
|
36
|
+
},
|
|
37
|
+
success: {
|
|
38
|
+
container: "bg-success-default-default border-success-default-default hover:bg-success-default-hover active:bg-success-default-pressed",
|
|
39
|
+
label: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed",
|
|
40
|
+
icon: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed"
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
container: "bg-error-default-default hover:bg-error-default-hover active:bg-error-default-pressed",
|
|
44
|
+
label: "text-neutral-strong-default group-hover:text-neutral-strong-hover group-active:text-neutral-strong-pressed",
|
|
45
|
+
icon: "text-neutral-strong-default group-hover:text-neutral-strong-hover group-active:text-neutral-strong-pressed"
|
|
46
|
+
},
|
|
47
|
+
warning: {
|
|
48
|
+
container: "bg-warning-default-default hover:bg-warning-default-hover active:bg-warning-default-pressed",
|
|
49
|
+
label: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed",
|
|
50
|
+
icon: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed"
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
container: "bg-primary-medium-disabled border-transparent cursor-not-allowed!",
|
|
54
|
+
label: "text-neutral-strong-disabled group-hover:text-neutral-strong-disabled group-active:text-neutral-strong-disabled",
|
|
55
|
+
icon: "text-neutral-strong-disabled group-hover:text-neutral-strong-disabled group-active:text-neutral-strong-disabled"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
outlined: {
|
|
59
|
+
primary: {
|
|
60
|
+
container: `bg-transparent border-primary-default-default border
|
|
61
|
+
hover:bg-neutral-default-hover hover:border-primary-medium-hover
|
|
62
|
+
active:bg-neutral-default-pressed active:border-primary-medium-pressed
|
|
63
|
+
`,
|
|
64
|
+
label: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed",
|
|
65
|
+
icon: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed"
|
|
66
|
+
},
|
|
67
|
+
secondary: {
|
|
68
|
+
container: "bg-transparent border-neutral-medium-default border hover:bg-neutral-default-hover hover:border-neutral-medium-hover active:bg-neutral-default-pressed active:border-neutral-medium-pressed",
|
|
69
|
+
label: "text-neutral-strong-default group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed",
|
|
70
|
+
icon: "text-neutral-strong-default group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed"
|
|
71
|
+
},
|
|
72
|
+
success: {
|
|
73
|
+
container: "border border-success-default-default hover:border-success-default-hover hover:bg-neutral-default-hover active:border-success-default-pressed active:bg-neutral-default-pressed",
|
|
74
|
+
label: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed",
|
|
75
|
+
icon: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed"
|
|
76
|
+
},
|
|
77
|
+
error: {
|
|
78
|
+
container: "border border-error-default-default hover:border-error-default-hover hover:bg-neutral-default-hover active:border-error-default-pressed active:bg-neutral-default-pressed",
|
|
79
|
+
label: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed",
|
|
80
|
+
icon: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed"
|
|
81
|
+
},
|
|
82
|
+
warning: {
|
|
83
|
+
container: "border border-warning-default-default hover:border-warning-default-hover hover:bg-neutral-default-hover active:border-warning-default-pressed active:bg-neutral-default-pressed",
|
|
84
|
+
label: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed",
|
|
85
|
+
icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
|
|
86
|
+
},
|
|
87
|
+
disabled: {
|
|
88
|
+
container: "bg-neutral-default-disabled border-neutral-default-disabled border cursor-not-allowed!",
|
|
89
|
+
label: "text-neutral-default-disabled group-hover:text-neutral-default-disabled group-active:text-neutral-default-disabled",
|
|
90
|
+
icon: "text-neutral-default-disabled group-hover:text-neutral-default-disabled group-active:text-neutral-default-disabled"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
text: {
|
|
94
|
+
primary: {
|
|
95
|
+
container: " bg-transparent border-0 text-primary-default-default hover:bg-neutral-default-hover hover:border-primary-medium-hover active:bg-neutral-default-pressed",
|
|
96
|
+
label: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed",
|
|
97
|
+
icon: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed"
|
|
98
|
+
},
|
|
99
|
+
secondary: {
|
|
100
|
+
container: "bg-transparent border-0 hover:bg-neutral-default-hover hover:border-neutral-medium-hover active:bg-neutral-default-pressed",
|
|
101
|
+
label: "text-neutral-strong-hover group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed",
|
|
102
|
+
icon: "text-neutral-strong-hover group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed"
|
|
103
|
+
},
|
|
104
|
+
success: {
|
|
105
|
+
container: "border border-transparent hover:border-success-default-hover hover:bg-neutral-default-hover hover:border-success-default-hover active:border-success-default-pressed active:bg-neutral-default-pressed",
|
|
106
|
+
label: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed",
|
|
107
|
+
icon: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed"
|
|
108
|
+
},
|
|
109
|
+
error: {
|
|
110
|
+
container: "border border-transparent hover:border-error-default-hover hover:bg-neutral-default-hover hover:border-error-default-hover active:border-error-default-pressed active:bg-neutral-default-pressed",
|
|
111
|
+
label: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed",
|
|
112
|
+
icon: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed"
|
|
113
|
+
},
|
|
114
|
+
warning: {
|
|
115
|
+
container: "border border-transparent hover:border-warning-default-hover hover:bg-neutral-default-hover hover:border-warning-default-hover active:border-warning-default-pressed active:bg-neutral-default-pressed",
|
|
116
|
+
label: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed",
|
|
117
|
+
icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
|
|
118
|
+
},
|
|
119
|
+
disabled: {
|
|
120
|
+
container: "bg-transparent border-neutral-default-disabled border-none cursor-not-allowed!",
|
|
121
|
+
label: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused",
|
|
122
|
+
icon: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, n = {
|
|
126
|
+
small: {
|
|
127
|
+
container: "",
|
|
128
|
+
label: "prometeo-fonts-label-large",
|
|
129
|
+
icon: ""
|
|
130
|
+
},
|
|
131
|
+
medium: {
|
|
132
|
+
container: "",
|
|
133
|
+
label: "prometeo-fonts-label-xlarge",
|
|
134
|
+
icon: ""
|
|
135
|
+
},
|
|
136
|
+
large: {
|
|
137
|
+
container: "",
|
|
138
|
+
label: "prometeo-fonts-label-xlarge",
|
|
139
|
+
icon: ""
|
|
140
|
+
}
|
|
141
|
+
}, c = {
|
|
142
|
+
container: "flex items-center gap-1 w-max rounded-lg bg-transparent cursor-pointer transition-all ease-in-out duration-300",
|
|
143
|
+
label: "w-max transition-all ease-in-out duration-300",
|
|
144
|
+
icon: "w-max transition-all ease-in-out duration-300"
|
|
145
|
+
}, A = {
|
|
146
|
+
true: {
|
|
147
|
+
container: "hover:scale-105 active:scale-95 disabled:scale-100"
|
|
148
|
+
},
|
|
149
|
+
false: {
|
|
150
|
+
container: ""
|
|
151
|
+
}
|
|
152
|
+
}, C = {
|
|
153
|
+
true: {
|
|
154
|
+
icon: "group-hover:rotate-90 group-active:rotate-0 group-disabled:rotate-0"
|
|
155
|
+
},
|
|
156
|
+
false: {
|
|
157
|
+
icon: ""
|
|
158
|
+
}
|
|
159
|
+
}, E = ({
|
|
160
|
+
label: m,
|
|
161
|
+
onClick: g,
|
|
162
|
+
icon: d,
|
|
163
|
+
contentClassName: s,
|
|
164
|
+
loadingText: v = "Cargando...",
|
|
165
|
+
animate: b = !0,
|
|
166
|
+
animateIcon: f = !0,
|
|
167
|
+
isLoading: t = !1,
|
|
168
|
+
children: i,
|
|
169
|
+
hideSpinner: h = !1,
|
|
170
|
+
spinner: x = /* @__PURE__ */ e.jsx(B, { size: "small", variant: "clip", speedMultiplier: 0.5, className: "mt-1.5", color: "var(--neutral-600)" }),
|
|
171
|
+
type: w,
|
|
172
|
+
className: y,
|
|
173
|
+
disabled: o,
|
|
174
|
+
variant: a = "filled",
|
|
175
|
+
form: $,
|
|
176
|
+
size: r = "medium",
|
|
177
|
+
color: p = "primary"
|
|
178
|
+
}) => {
|
|
179
|
+
const k = f && !o && !t ? "true" : "false", j = b && !o && !t ? "true" : "false", u = o || t ? "disabled" : p, S = V(() => i || (t ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
180
|
+
!h && x,
|
|
181
|
+
/* @__PURE__ */ e.jsx("span", { className: ` ${n[r].label} ${l[a][u].label} ${r === "small" ? "prometeo-fonts-label-xsmall" : ""}`, children: v })
|
|
182
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: `flex items-center gap-1 ${s}`, children: [
|
|
183
|
+
d && /* @__PURE__ */ e.jsx("span", { className: `
|
|
184
|
+
${c.icon}
|
|
185
|
+
${l[a][u].icon}
|
|
186
|
+
${n[r].icon}
|
|
187
|
+
${C[k].icon}
|
|
188
|
+
`, children: d }),
|
|
189
|
+
/* @__PURE__ */ e.jsx("span", { className: `
|
|
190
|
+
${c.label}
|
|
191
|
+
${l[a][u].label}
|
|
192
|
+
${n[r].label}
|
|
193
|
+
`, children: m })
|
|
194
|
+
] })), [i, s, d, m, a, p, r]);
|
|
195
|
+
return /* @__PURE__ */ e.jsx(
|
|
196
|
+
"button",
|
|
197
|
+
{
|
|
198
|
+
type: w,
|
|
199
|
+
className: `
|
|
200
|
+
group
|
|
201
|
+
${c.container}
|
|
202
|
+
${n[r].container}
|
|
203
|
+
${M[r].container}
|
|
204
|
+
${l[a][u].container}
|
|
205
|
+
${A[j].container}
|
|
206
|
+
${y}
|
|
207
|
+
`,
|
|
208
|
+
disabled: o || t,
|
|
209
|
+
form: $,
|
|
210
|
+
onClick: g,
|
|
211
|
+
children: /* @__PURE__ */ e.jsx("div", { className: `flex items-center gap-1 ${s}`, children: S })
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
}, D = N(E);
|
|
215
|
+
export {
|
|
216
|
+
D as default
|
|
217
|
+
};
|
package/dist/DatePicker.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as q } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import m, { createContext as mn, useContext as hn, useCallback as R, useRef as Se, useLayoutEffect as yn, useState as he, useEffect as _e, useMemo as fe, memo as pn } from "react";
|
|
3
3
|
import { InputMultiple as gn } from "./InputMultiple.es.js";
|
|
4
|
-
import { I as wn } from "./Input-
|
|
4
|
+
import { I as wn } from "./Input-R52CsX56.js";
|
|
5
5
|
import { createPortal as bn } from "react-dom";
|
|
6
6
|
import { Icons as Mt } from "./Icons.es.js";
|
|
7
7
|
import { c as Be } from "./cn-B6yFEsav.js";
|
package/dist/DrawerDesktop.es.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as l } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { c as h } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { c as k, B as E } from "./Button-DsbEyjth.js";
|
|
4
4
|
import { createPortal as I } from "react-dom";
|
|
5
5
|
import { Icons as V } from "./Icons.es.js";
|
|
6
|
-
import { forwardRef as B, useRef as
|
|
7
|
-
const L = B((t,
|
|
8
|
-
const
|
|
9
|
-
modal:
|
|
10
|
-
children:
|
|
6
|
+
import { forwardRef as B, useRef as u, useState as N, useEffect as d, useCallback as f, useImperativeHandle as P } from "react";
|
|
7
|
+
const L = B((t, s) => {
|
|
8
|
+
const o = u(null), [e, a] = N(t.defaultOpen || !1), [r, y] = N(null), b = u(t.onClose), c = u(r), {
|
|
9
|
+
modal: i = !1,
|
|
10
|
+
children: m,
|
|
11
11
|
className: w,
|
|
12
12
|
direction: C = "left",
|
|
13
|
-
attachToParent:
|
|
14
|
-
closeOnOverlayClick:
|
|
13
|
+
attachToParent: x = !1,
|
|
14
|
+
closeOnOverlayClick: n = !1,
|
|
15
15
|
hideCloseButton: T = !1
|
|
16
|
-
} = t, g =
|
|
17
|
-
|
|
16
|
+
} = t, g = u(n), O = u(e);
|
|
17
|
+
c.current = r, d(() => {
|
|
18
18
|
O.current = e;
|
|
19
|
-
}, [e]),
|
|
20
|
-
|
|
21
|
-
}, [r]),
|
|
22
|
-
g.current =
|
|
23
|
-
}, [
|
|
19
|
+
}, [e]), d(() => {
|
|
20
|
+
c.current = r;
|
|
21
|
+
}, [r]), d(() => {
|
|
22
|
+
g.current = n;
|
|
23
|
+
}, [n]);
|
|
24
24
|
const R = (p) => {
|
|
25
|
-
if (!
|
|
25
|
+
if (!o.current)
|
|
26
26
|
return;
|
|
27
|
-
const z =
|
|
28
|
-
z && !z.contains(p.target) && g.current && O.current &&
|
|
27
|
+
const z = o.current;
|
|
28
|
+
z && !z.contains(p.target) && g.current && O.current && v();
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
if (!g.current ||
|
|
30
|
+
d(() => {
|
|
31
|
+
if (!g.current || i || !e)
|
|
32
32
|
return;
|
|
33
33
|
const p = setTimeout(() => {
|
|
34
34
|
document.addEventListener("click", R);
|
|
@@ -36,48 +36,65 @@ const L = B((t, f) => {
|
|
|
36
36
|
return () => {
|
|
37
37
|
clearTimeout(p), document.removeEventListener("click", R);
|
|
38
38
|
};
|
|
39
|
-
}, [
|
|
40
|
-
|
|
39
|
+
}, [n, e, i]), d(() => {
|
|
40
|
+
b.current = t.onClose;
|
|
41
41
|
}, [t.onClose]);
|
|
42
|
-
const j =
|
|
43
|
-
|
|
44
|
-
}, []),
|
|
45
|
-
|
|
42
|
+
const j = f((p) => {
|
|
43
|
+
y(p ?? null), a(!0);
|
|
44
|
+
}, []), v = f(() => {
|
|
45
|
+
a(!1), b.current?.(c.current), setTimeout(() => y(null), 300);
|
|
46
46
|
}, []);
|
|
47
|
-
P(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
P(
|
|
48
|
+
s,
|
|
49
|
+
() => ({
|
|
50
|
+
open: j,
|
|
51
|
+
close: v,
|
|
52
|
+
isOpen: e,
|
|
53
|
+
getContext: () => c.current
|
|
54
|
+
}),
|
|
55
|
+
[e, j, v]
|
|
56
|
+
);
|
|
57
|
+
const D = /* @__PURE__ */ l.jsx(
|
|
54
58
|
Y,
|
|
55
59
|
{
|
|
56
|
-
|
|
60
|
+
context: r,
|
|
61
|
+
ref: o,
|
|
57
62
|
isOpen: e,
|
|
58
|
-
close:
|
|
63
|
+
close: v,
|
|
59
64
|
direction: C,
|
|
60
|
-
modal:
|
|
65
|
+
modal: i,
|
|
61
66
|
className: w,
|
|
62
|
-
attachToParent:
|
|
63
|
-
closeOnOverlayClick:
|
|
67
|
+
attachToParent: x,
|
|
68
|
+
closeOnOverlayClick: n,
|
|
64
69
|
hideCloseButton: T,
|
|
65
|
-
children:
|
|
70
|
+
children: typeof m == "function" ? m(r) : m
|
|
66
71
|
}
|
|
67
72
|
);
|
|
68
|
-
return
|
|
73
|
+
return x ? D : I(D, document.body);
|
|
69
74
|
});
|
|
70
75
|
L.displayName = "DrawerDesktopV2";
|
|
71
|
-
const Y = ({
|
|
72
|
-
|
|
76
|
+
const Y = ({
|
|
77
|
+
ref: t,
|
|
78
|
+
children: s,
|
|
79
|
+
direction: o = "left",
|
|
80
|
+
isOpen: e,
|
|
81
|
+
close: a,
|
|
82
|
+
modal: r = !1,
|
|
83
|
+
className: y,
|
|
84
|
+
attachToParent: b = !1,
|
|
85
|
+
closeOnOverlayClick: c = !1,
|
|
86
|
+
hideCloseButton: i = !1,
|
|
87
|
+
context: m
|
|
88
|
+
}) => {
|
|
89
|
+
d(() => {
|
|
73
90
|
if (e && r) {
|
|
74
|
-
const
|
|
75
|
-
return document.body.style.position = "fixed", document.body.style.top = `-${
|
|
76
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0,
|
|
91
|
+
const n = window.scrollY;
|
|
92
|
+
return document.body.style.position = "fixed", document.body.style.top = `-${n}px`, document.body.style.width = "100%", () => {
|
|
93
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, n);
|
|
77
94
|
};
|
|
78
95
|
}
|
|
79
96
|
}, [e, r]);
|
|
80
|
-
const
|
|
97
|
+
const w = k("border-neutral-strong-default", {
|
|
81
98
|
variants: {
|
|
82
99
|
isOpen: {
|
|
83
100
|
true: "desktop-drawer-visible",
|
|
@@ -88,14 +105,17 @@ const Y = ({ ref: t, children: f, direction: n = "left", isOpen: e, close: s, mo
|
|
|
88
105
|
right: "right-0 border-l-[1px] border-r-0"
|
|
89
106
|
}
|
|
90
107
|
}
|
|
91
|
-
}),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
108
|
+
}), C = k(
|
|
109
|
+
"fixed inset-0 bg-black/60 z-[55] cursor-default",
|
|
110
|
+
{
|
|
111
|
+
variants: {
|
|
112
|
+
isOpen: {
|
|
113
|
+
true: "drawer-overlay-visible",
|
|
114
|
+
false: "drawer-overlay-hidden"
|
|
115
|
+
}
|
|
96
116
|
}
|
|
97
117
|
}
|
|
98
|
-
|
|
118
|
+
), x = k("", {
|
|
99
119
|
variants: {
|
|
100
120
|
direction: {
|
|
101
121
|
left: "right-0",
|
|
@@ -103,66 +123,66 @@ const Y = ({ ref: t, children: f, direction: n = "left", isOpen: e, close: s, mo
|
|
|
103
123
|
}
|
|
104
124
|
}
|
|
105
125
|
});
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
r && /* @__PURE__ */
|
|
126
|
+
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
127
|
+
r && /* @__PURE__ */ l.jsx(
|
|
108
128
|
"div",
|
|
109
129
|
{
|
|
110
|
-
className: h(
|
|
111
|
-
onClick: (
|
|
112
|
-
|
|
130
|
+
className: h(C({ isOpen: e })),
|
|
131
|
+
onClick: (n) => {
|
|
132
|
+
n.preventDefault(), n.stopPropagation(), c && a();
|
|
113
133
|
},
|
|
114
134
|
"aria-hidden": "true"
|
|
115
135
|
}
|
|
116
136
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ l.jsxs(
|
|
118
138
|
"div",
|
|
119
139
|
{
|
|
120
140
|
ref: t,
|
|
121
141
|
className: h(
|
|
122
142
|
"bg-neutral-strong-default h-full top-0 z-60 w-max overflow-y-auto",
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
!
|
|
126
|
-
|
|
143
|
+
b ? "absolute" : "fixed",
|
|
144
|
+
w({ isOpen: e, direction: o }),
|
|
145
|
+
!i && "p-4 pt-10",
|
|
146
|
+
y
|
|
127
147
|
),
|
|
128
148
|
role: "dialog",
|
|
129
149
|
"aria-modal": r,
|
|
130
150
|
children: [
|
|
131
|
-
!
|
|
151
|
+
!i && /* @__PURE__ */ l.jsx(
|
|
132
152
|
E,
|
|
133
153
|
{
|
|
134
|
-
icon: /* @__PURE__ */
|
|
154
|
+
icon: /* @__PURE__ */ l.jsx(V.Close, { size: 24 }),
|
|
135
155
|
animate: !1,
|
|
136
156
|
type: "button",
|
|
137
157
|
size: "small",
|
|
138
158
|
variant: "text",
|
|
139
|
-
onClick:
|
|
159
|
+
onClick: a,
|
|
140
160
|
label: "",
|
|
141
161
|
color: "secondary",
|
|
142
162
|
className: h(
|
|
143
163
|
"absolute top-0 z-50",
|
|
144
|
-
|
|
164
|
+
x({ direction: o })
|
|
145
165
|
),
|
|
146
166
|
"aria-label": "Close drawer"
|
|
147
167
|
}
|
|
148
168
|
),
|
|
149
|
-
|
|
169
|
+
typeof s == "function" ? s(m) : s
|
|
150
170
|
]
|
|
151
171
|
}
|
|
152
172
|
)
|
|
153
173
|
] });
|
|
154
174
|
}, G = () => {
|
|
155
|
-
const t =
|
|
175
|
+
const t = u(null), s = f((r) => {
|
|
156
176
|
t.current?.open(r);
|
|
157
|
-
}, []),
|
|
177
|
+
}, []), o = f(() => {
|
|
158
178
|
t.current?.close();
|
|
159
|
-
}, []), e =
|
|
179
|
+
}, []), e = f(() => t.current?.isOpen ?? !1, []), a = f(() => t.current?.getContext() ?? null, []);
|
|
160
180
|
return {
|
|
161
181
|
isOpen: e,
|
|
162
|
-
open:
|
|
163
|
-
close:
|
|
182
|
+
open: s,
|
|
183
|
+
close: o,
|
|
164
184
|
drawerRef: t,
|
|
165
|
-
getContext:
|
|
185
|
+
getContext: a
|
|
166
186
|
};
|
|
167
187
|
};
|
|
168
188
|
export {
|
package/dist/Header.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { c as
|
|
3
|
-
import { motion as
|
|
4
|
-
import { memo as
|
|
5
|
-
const x = ({ title: e, subtitle: t, children:
|
|
2
|
+
import { c as a } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { motion as r } from "framer-motion";
|
|
4
|
+
import { memo as d } from "react";
|
|
5
|
+
const x = ({ title: e, subtitle: t, children: i, className: s, subtitleClassName: m, titleClassName: n }) => /* @__PURE__ */ l.jsx(
|
|
6
6
|
"header",
|
|
7
7
|
{
|
|
8
|
-
className:
|
|
8
|
+
className: a(
|
|
9
9
|
"h-16 flex items-center px-4 sm:h-20 md:h-24 md:px-6 lg:h-28 xl:h-32 2xl:h-36",
|
|
10
10
|
s
|
|
11
11
|
),
|
|
12
12
|
children: /* @__PURE__ */ l.jsxs(
|
|
13
|
-
|
|
13
|
+
r.div,
|
|
14
14
|
{
|
|
15
15
|
initial: { opacity: 0, y: -10 },
|
|
16
16
|
animate: { opacity: 1, y: 0 },
|
|
@@ -18,15 +18,15 @@ const x = ({ title: e, subtitle: t, children: a, className: s, subtitleClassName
|
|
|
18
18
|
className: "flex justify-between items-center w-full",
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ l.jsxs("div", { className: "flex flex-col leading-6", children: [
|
|
21
|
-
t && /* @__PURE__ */ l.jsx("h3", { className:
|
|
22
|
-
e && /* @__PURE__ */ l.jsx("h1", { className: "text-xl font-bold text-neutral-strong-default sm:text-2xl md:text-3xl xl:text-[32px] 2xl:text-[34px]", children: e })
|
|
21
|
+
t && /* @__PURE__ */ l.jsx("h3", { className: a("font-semibold text-neutral-medium-default leading-1 sm:leading-2 prometeo-fonts-headline-large ", m), children: t }),
|
|
22
|
+
e && /* @__PURE__ */ l.jsx("h1", { className: a("text-xl font-bold text-neutral-strong-default sm:text-2xl md:text-3xl xl:text-[32px] 2xl:text-[34px]", n), children: e })
|
|
23
23
|
] }),
|
|
24
|
-
|
|
24
|
+
i && /* @__PURE__ */ l.jsx("div", { className: "flex gap-4", children: i })
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
|
-
),
|
|
29
|
+
), h = d(x, (e, t) => e.title !== t.title || e.subtitle !== t.subtitle || e.className !== t.className ? !1 : e.children !== t.children ? !e.children && !t.children : !0);
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
h as default
|
|
32
32
|
};
|
package/dist/Input.es.js
CHANGED
package/dist/InputFormikV2.es.js
CHANGED