prometeo-design-system 1.5.5 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar.d.ts +4 -0
- package/dist/Avatar.es.js +52 -0
- package/dist/Button.d.ts +6 -0
- package/dist/Button.es.js +147 -0
- package/dist/CardProfile-BZajBGbO.js +253 -0
- package/dist/CardProfile.d.ts +2 -0
- package/dist/CardProfile.es.js +4 -0
- package/dist/CheckBox.d.ts +6 -0
- package/dist/CheckBox.es.js +105 -0
- package/dist/CheckboxFormik.d.ts +6 -0
- package/dist/CheckboxFormik.es.js +88 -0
- package/dist/DialogModal.d.ts +6 -0
- package/dist/DialogModal.es.js +52 -0
- package/dist/DrawerDesktop.d.ts +6 -0
- package/dist/DrawerDesktop.es.js +67 -0
- package/dist/DrawerMobile.d.ts +6 -0
- package/dist/DrawerMobile.es.js +43 -0
- package/dist/DropZone.d.ts +2 -0
- package/dist/DropZone.es.js +86 -0
- package/dist/Header.d.ts +6 -0
- package/dist/Header.es.js +23 -0
- package/dist/Icons.d.ts +2 -0
- package/dist/Icons.es.js +516 -0
- package/dist/Input.d.ts +6 -0
- package/dist/Input.es.js +200 -0
- package/dist/InputFormik.d.ts +6 -0
- package/dist/InputFormik.es.js +95 -0
- package/dist/LayoutGeneric-jDE96L2N.js +24 -0
- package/dist/LayoutGeneric.d.ts +6 -0
- package/dist/LayoutGeneric.es.js +4 -0
- package/dist/Logo.d.ts +4 -0
- package/dist/Logo.es.js +9 -0
- package/dist/Menu.d.ts +2 -0
- package/dist/Menu.es.js +76 -0
- package/dist/OtpInput.d.ts +6 -0
- package/dist/OtpInput.es.js +244 -0
- package/dist/Pagination.d.ts +6 -0
- package/dist/Pagination.es.js +97 -0
- package/dist/ProgressBar.d.ts +6 -0
- package/dist/ProgressBar.es.js +27 -0
- package/dist/Select.d.ts +6 -0
- package/dist/Select.es.js +203 -0
- package/dist/Spinner.d.ts +6 -0
- package/dist/Spinner.es.js +52 -0
- package/dist/SwipeContainer.d.ts +4 -0
- package/dist/SwipeContainer.es.js +185 -0
- package/dist/TabLinks.d.ts +4 -0
- package/dist/TabLinks.es.js +83 -0
- package/dist/Table.d.ts +2 -0
- package/dist/Table.es.js +121 -0
- package/dist/TextArea.d.ts +4 -0
- package/dist/TextArea.es.js +52 -0
- package/dist/Tooltip.d.ts +6 -0
- package/dist/Tooltip.es.js +62 -0
- package/dist/cn-B6yFEsav.js +8 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/exports/Avatar.d.ts +1 -0
- package/dist/exports/Button.d.ts +2 -0
- package/dist/exports/CardProfile.d.ts +2 -0
- package/dist/exports/CheckBox.d.ts +2 -0
- package/dist/exports/CheckboxFormik.d.ts +2 -0
- package/dist/exports/DialogModal.d.ts +2 -0
- package/dist/exports/DrawerDesktop.d.ts +2 -0
- package/dist/exports/DrawerMobile.d.ts +2 -0
- package/dist/exports/DropZone.d.ts +1 -0
- package/dist/exports/Header.d.ts +2 -0
- package/dist/exports/Icons.d.ts +1 -0
- package/dist/exports/Input.d.ts +2 -0
- package/dist/exports/InputFormik.d.ts +2 -0
- package/dist/exports/LayoutGeneric.d.ts +2 -0
- package/dist/exports/Logo.d.ts +1 -0
- package/dist/exports/Menu.d.ts +2 -0
- package/dist/exports/OtpInput.d.ts +2 -0
- package/dist/exports/Pagination.d.ts +2 -0
- package/dist/exports/ProgressBar.d.ts +2 -0
- package/dist/exports/Select.d.ts +2 -0
- package/dist/exports/Spinner.d.ts +2 -0
- package/dist/exports/SwipeContainer.d.ts +1 -0
- package/dist/exports/TabLinks.d.ts +1 -0
- package/dist/exports/Table.d.ts +1 -0
- package/dist/exports/TextArea.d.ts +1 -0
- package/dist/exports/Tooltip.d.ts +2 -0
- package/dist/index-BOQuZ0gG.js +34 -0
- package/dist/jsx-runtime-ByW6EXIE.js +283 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +289 -5353
- package/package.json +120 -2
- package/dist/prometeo-design-system.umd.js +0 -113
package/dist/Input.es.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { j as s } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as B } from "./Icons.es.js";
|
|
3
|
+
import { c as e } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { memo as q, useState as v, useCallback as M, useEffect as F } from "react";
|
|
5
|
+
import { useDebounce as ee } from "use-debounce";
|
|
6
|
+
import te from "./Spinner.es.js";
|
|
7
|
+
const x = {
|
|
8
|
+
default: {
|
|
9
|
+
container: "",
|
|
10
|
+
input: e(
|
|
11
|
+
"border-neutral-default-default text-neutral-default-default",
|
|
12
|
+
"focus:border-primary-default-default focus:border-2",
|
|
13
|
+
"hover:border-neutral-strong-default"
|
|
14
|
+
),
|
|
15
|
+
label: e(
|
|
16
|
+
"text-neutral-medium-default",
|
|
17
|
+
"peer-focus:text-primary-default-default"
|
|
18
|
+
),
|
|
19
|
+
icon: e(
|
|
20
|
+
"text-neutral-medium-default",
|
|
21
|
+
"peer-focus:text-primary-default-default"
|
|
22
|
+
)
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
container: "",
|
|
26
|
+
input: e(
|
|
27
|
+
"border-error-default-default text-neutral-default-default",
|
|
28
|
+
"focus:border-error-default focus:border-2",
|
|
29
|
+
"focus:ring-0 focus:ring-error-default/20"
|
|
30
|
+
),
|
|
31
|
+
label: e(
|
|
32
|
+
"text-error-light",
|
|
33
|
+
"peer-focus:text-error-light"
|
|
34
|
+
),
|
|
35
|
+
icon: e(
|
|
36
|
+
"text-error-light",
|
|
37
|
+
"peer-focus:text-error-light"
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
success: {
|
|
41
|
+
container: "",
|
|
42
|
+
input: e(
|
|
43
|
+
"border-success-default-default text-neutral-default-default",
|
|
44
|
+
"focus:border-success-default focus:border-2",
|
|
45
|
+
"focus:ring-0 focus:ring-success-default/20"
|
|
46
|
+
),
|
|
47
|
+
label: e(
|
|
48
|
+
"text-success",
|
|
49
|
+
"peer-focus:text-success-light"
|
|
50
|
+
),
|
|
51
|
+
icon: e(
|
|
52
|
+
"text-success-light",
|
|
53
|
+
"peer-focus:text-success-light"
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
}, f = {
|
|
57
|
+
small: {
|
|
58
|
+
container: "text-sm",
|
|
59
|
+
input: "h-10 px-3 text-sm",
|
|
60
|
+
label: "text-xs peer-focus:text-xs peer-placeholder-shown:text-sm",
|
|
61
|
+
icon: "w-4 h-4 right-3"
|
|
62
|
+
},
|
|
63
|
+
medium: {
|
|
64
|
+
container: "text-base",
|
|
65
|
+
input: "h-12 px-3 text-base",
|
|
66
|
+
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-base",
|
|
67
|
+
icon: "w-5 h-5 right-3"
|
|
68
|
+
},
|
|
69
|
+
large: {
|
|
70
|
+
container: "text-lg",
|
|
71
|
+
input: "h-14 px-3 text-lg",
|
|
72
|
+
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-lg",
|
|
73
|
+
icon: "w-6 h-6 right-3"
|
|
74
|
+
}
|
|
75
|
+
}, se = ({
|
|
76
|
+
label: I,
|
|
77
|
+
icon: m,
|
|
78
|
+
onChange: h,
|
|
79
|
+
value: l = "",
|
|
80
|
+
debounceMs: a = 0,
|
|
81
|
+
name: b,
|
|
82
|
+
width: d = "100%",
|
|
83
|
+
height: t,
|
|
84
|
+
variant: n = "default",
|
|
85
|
+
labelVariant: o = "default",
|
|
86
|
+
size: u = "medium",
|
|
87
|
+
disabled: N = !1,
|
|
88
|
+
type: r = "text",
|
|
89
|
+
isFetching: c,
|
|
90
|
+
errorComponent: P,
|
|
91
|
+
helperComponent: C,
|
|
92
|
+
required: E = !1,
|
|
93
|
+
onFocus: H,
|
|
94
|
+
onBlur: L,
|
|
95
|
+
onEmptied: S,
|
|
96
|
+
onKeyDown: O,
|
|
97
|
+
onKeyUp: $
|
|
98
|
+
}) => {
|
|
99
|
+
const [p, k] = v(l), [g] = ee(p, a), [R, D] = v(!1), [w, W] = v(!1), V = M(h, [h]);
|
|
100
|
+
F(() => {
|
|
101
|
+
a > 0 && g !== l && V(g);
|
|
102
|
+
}, [g, a, V, l]), F(() => {
|
|
103
|
+
k(l);
|
|
104
|
+
}, [l]);
|
|
105
|
+
const A = () => {
|
|
106
|
+
D(!0), H?.();
|
|
107
|
+
}, G = () => {
|
|
108
|
+
D(!1), L?.();
|
|
109
|
+
}, J = (i) => {
|
|
110
|
+
const y = i.target.value, _ = p;
|
|
111
|
+
k(y), _.length > 0 && y.length === 0 && S?.(), (!a || a === 0) && h(y);
|
|
112
|
+
}, K = () => {
|
|
113
|
+
W(!w);
|
|
114
|
+
}, j = {};
|
|
115
|
+
d && d !== "100%" && (j.width = d), t && (j.height = t);
|
|
116
|
+
const Q = p.length > 0, z = n === "error" && P, T = !z && C, U = () => o === "static" || R || Q ? "-top-2 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", X = () => o === "static" ? t ? "text-sm" : "text-xs" : t ? "text-sm" : f[u].label, Y = () => t ? { height: t } : {}, Z = () => o === "static" ? I : "";
|
|
117
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
118
|
+
/* @__PURE__ */ s.jsxs(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: e(
|
|
122
|
+
"relative",
|
|
123
|
+
f[u].container,
|
|
124
|
+
!d && "w-full",
|
|
125
|
+
"bg-inherit",
|
|
126
|
+
o === "static" && "mt-2"
|
|
127
|
+
),
|
|
128
|
+
style: j,
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ s.jsx(
|
|
131
|
+
"input",
|
|
132
|
+
{
|
|
133
|
+
id: b,
|
|
134
|
+
name: b,
|
|
135
|
+
type: r === "password" && w ? "text" : r,
|
|
136
|
+
value: p,
|
|
137
|
+
placeholder: Z(),
|
|
138
|
+
className: e(
|
|
139
|
+
"peer w-full border-1 rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
140
|
+
"focus:outline-none px-3",
|
|
141
|
+
o === "default" && "placeholder:text-transparent",
|
|
142
|
+
o === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
|
|
143
|
+
!t && f[u].input,
|
|
144
|
+
t && `px-3 ${f[u].input.split(" ").filter((i) => i.startsWith("text-")).join(" ")}`,
|
|
145
|
+
x[n].input,
|
|
146
|
+
m && "pr-10",
|
|
147
|
+
N && "bg-neutral-weak-default cursor-not-allowed opacity-60",
|
|
148
|
+
x[n].container
|
|
149
|
+
),
|
|
150
|
+
style: Y(),
|
|
151
|
+
onChange: J,
|
|
152
|
+
onFocus: A,
|
|
153
|
+
onBlur: G,
|
|
154
|
+
disabled: N,
|
|
155
|
+
required: E,
|
|
156
|
+
onEmptied: S,
|
|
157
|
+
onKeyDown: O,
|
|
158
|
+
onKeyUp: $
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ s.jsx(
|
|
162
|
+
"label",
|
|
163
|
+
{
|
|
164
|
+
htmlFor: b,
|
|
165
|
+
className: e(
|
|
166
|
+
"absolute left-3 pointer-events-none bg-inherit px-1 z-10",
|
|
167
|
+
o === "default" && "transition-all duration-200 ease-in-out",
|
|
168
|
+
X(),
|
|
169
|
+
x[n].label,
|
|
170
|
+
U(),
|
|
171
|
+
E && "after:content-['*'] after:text-error-default after:ml-1"
|
|
172
|
+
),
|
|
173
|
+
children: I
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
(m || r === "password" || c) && /* @__PURE__ */ s.jsx(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: e(
|
|
180
|
+
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10",
|
|
181
|
+
!t && f[u].icon,
|
|
182
|
+
t && "w-5 h-5 right-3",
|
|
183
|
+
x[n].icon,
|
|
184
|
+
r === "password" && !c ? "cursor-pointer" : "pointer-events-none"
|
|
185
|
+
),
|
|
186
|
+
onClick: r === "password" && !c ? K : void 0,
|
|
187
|
+
onMouseDown: (i) => r === "password" && !c && i.preventDefault(),
|
|
188
|
+
children: /* @__PURE__ */ s.jsx("div", { children: c && r !== "password" ? /* @__PURE__ */ s.jsx("div", { children: /* @__PURE__ */ s.jsx(te, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : r === "password" ? w ? /* @__PURE__ */ s.jsx(B.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ s.jsx(B.EyeVisibilityOff, { size: 24, className: "" }) : m })
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
T && C,
|
|
195
|
+
z && P
|
|
196
|
+
] });
|
|
197
|
+
}, ce = q(se);
|
|
198
|
+
export {
|
|
199
|
+
ce as default
|
|
200
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as n } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { useField as V, ErrorMessage as k } from "formik";
|
|
4
|
+
import { useState as p } from "react";
|
|
5
|
+
import { Icons as b } from "./Icons.es.js";
|
|
6
|
+
const D = ({
|
|
7
|
+
icon: a,
|
|
8
|
+
iconPosition: l = "left",
|
|
9
|
+
label: g,
|
|
10
|
+
className: y,
|
|
11
|
+
containerClassName: v,
|
|
12
|
+
id: i,
|
|
13
|
+
type: f = "text",
|
|
14
|
+
disabled: m = !1,
|
|
15
|
+
...e
|
|
16
|
+
}) => {
|
|
17
|
+
const [r, c] = V(e), [s, x] = p(!1), [u, w] = p(!1), o = c.touched && c.error, h = r.value && r.value.toString().length > 0, d = f === "password", j = d ? u ? "text" : "password" : f, N = () => s || h ? "-top-3 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", E = () => d ? a ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? l === "left" ? "pl-10" : "pr-10" : "", F = () => a && l === "left" ? "left-10" : "left-3", I = () => {
|
|
18
|
+
w(!u);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ t.jsxs("div", { className: n("relative w-full bg-inherit", v), children: [
|
|
21
|
+
/* @__PURE__ */ t.jsxs("div", { className: "relative bg-inherit", children: [
|
|
22
|
+
/* @__PURE__ */ t.jsx(
|
|
23
|
+
"input",
|
|
24
|
+
{
|
|
25
|
+
disabled: m,
|
|
26
|
+
id: i || e.name,
|
|
27
|
+
type: j,
|
|
28
|
+
name: r.name,
|
|
29
|
+
value: r.value || "",
|
|
30
|
+
onChange: r.onChange,
|
|
31
|
+
onFocus: () => {
|
|
32
|
+
x(!0), e.onFocus?.();
|
|
33
|
+
},
|
|
34
|
+
onEmptied: e.onEmptied,
|
|
35
|
+
onKeyDown: e.onKeyDown,
|
|
36
|
+
onKeyUp: e.onKeyUp,
|
|
37
|
+
onBlur: (K) => {
|
|
38
|
+
x(!1), e.onBlur?.(), r.onBlur(K);
|
|
39
|
+
},
|
|
40
|
+
className: n(
|
|
41
|
+
"w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
|
|
42
|
+
"bg-transparent focus:outline-none",
|
|
43
|
+
s ? "border-primary-default-default border-2" : o ? "border-error-default-default" : "border-neutral-default-default hover:border-neutral-strong-default",
|
|
44
|
+
E(),
|
|
45
|
+
y
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ t.jsx(
|
|
50
|
+
"label",
|
|
51
|
+
{
|
|
52
|
+
htmlFor: i || e.name,
|
|
53
|
+
className: n(
|
|
54
|
+
"absolute transition-all duration-200 ease-in-out pointer-events-none bg-inherit px-1 z-10",
|
|
55
|
+
"text-md",
|
|
56
|
+
N(),
|
|
57
|
+
h || s ? "text-primary-default-default" : o ? "text-red-500" : "text-neutral-medium-default",
|
|
58
|
+
F()
|
|
59
|
+
),
|
|
60
|
+
children: g
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
a && /* @__PURE__ */ t.jsx("div", { className: n(
|
|
64
|
+
"absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
|
|
65
|
+
l === "left" ? "left-3" : "right-3"
|
|
66
|
+
), children: a }),
|
|
67
|
+
d && /* @__PURE__ */ t.jsx(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
type: "button",
|
|
71
|
+
onClick: I,
|
|
72
|
+
className: n(
|
|
73
|
+
"absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
|
|
74
|
+
"transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
|
|
75
|
+
a && l === "right" ? "right-8" : "right-3"
|
|
76
|
+
),
|
|
77
|
+
tabIndex: -1,
|
|
78
|
+
disabled: m,
|
|
79
|
+
children: u ? /* @__PURE__ */ t.jsx(b.EyeVisibilityOff, { size: 24, className: "text-neutral-default-default" }) : /* @__PURE__ */ t.jsx(b.EyeVisibility, { size: 24, className: "text-neutral-default-default" })
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] }),
|
|
83
|
+
o && /* @__PURE__ */ t.jsx(
|
|
84
|
+
k,
|
|
85
|
+
{
|
|
86
|
+
name: e.name,
|
|
87
|
+
component: "span",
|
|
88
|
+
className: "block text-error-default-default text-xs mt-1"
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] });
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
D as default
|
|
95
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { useRef as a, createContext as i, useContext as u, memo as c } from "react";
|
|
3
|
+
const o = i(null), l = ({ children: e }) => {
|
|
4
|
+
const r = a(null), s = (n) => {
|
|
5
|
+
n.current && r && (r.current = n.current);
|
|
6
|
+
};
|
|
7
|
+
return /* @__PURE__ */ t.jsx(o.Provider, { value: { primarySidebarRef: r, registerPrimarySidebar: s }, children: e });
|
|
8
|
+
}, f = () => {
|
|
9
|
+
const e = u(o);
|
|
10
|
+
if (!e)
|
|
11
|
+
throw new Error("useSidebarContext must be used within a SidebarProvider");
|
|
12
|
+
return e;
|
|
13
|
+
}, d = ({
|
|
14
|
+
children: e,
|
|
15
|
+
sidebar: r
|
|
16
|
+
}) => /* @__PURE__ */ t.jsxs("div", { className: "flex h-screen w-full bg-neutral-default-default", children: [
|
|
17
|
+
/* @__PURE__ */ t.jsx(l, { children: r }),
|
|
18
|
+
/* @__PURE__ */ t.jsx("main", { className: "w-full h-full overflow-y-auto", children: e })
|
|
19
|
+
] }), b = c(d);
|
|
20
|
+
export {
|
|
21
|
+
b as L,
|
|
22
|
+
l as S,
|
|
23
|
+
f as u
|
|
24
|
+
};
|
package/dist/Logo.d.ts
ADDED
package/dist/Logo.es.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as t } from "./Icons.es.js";
|
|
3
|
+
const s = () => /* @__PURE__ */ e.jsxs("div", { className: "container-logo flex items-center justify-center gap-1 bg-gradient-to-br from-[#312C85] to-[#1E1A4D] rounded-md min-w-[185px]", children: [
|
|
4
|
+
/* @__PURE__ */ e.jsx(t.TicketFilled, { size: 28, className: "rotate-140 text-primary-medium-pressed icon-logo" }),
|
|
5
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-bold text-[28px] text-primary-medium-pressed font-monserra -tracking-wide text-logo", children: "TICKETS" })
|
|
6
|
+
] });
|
|
7
|
+
export {
|
|
8
|
+
s as default
|
|
9
|
+
};
|
package/dist/Menu.d.ts
ADDED
package/dist/Menu.es.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as r } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { AnimatePresence as n, motion as o } from "framer-motion";
|
|
4
|
+
const s = ({ menuRef: t, children: a, className: i }) => /* @__PURE__ */ e.jsx("div", { ref: t, className: r("flex bg-neutral-default-default absolute bottom-10 left-24 border-1 border-neutral-strong-default h-auto w-60 rounded-md px-2", i), children: /* @__PURE__ */ e.jsx(n, { mode: "wait", children: /* @__PURE__ */ e.jsx(
|
|
5
|
+
o.div,
|
|
6
|
+
{
|
|
7
|
+
initial: { height: 0, opacity: 0 },
|
|
8
|
+
animate: {
|
|
9
|
+
height: "auto",
|
|
10
|
+
opacity: 1,
|
|
11
|
+
transition: {
|
|
12
|
+
height: { duration: 0.6, ease: "easeOut" },
|
|
13
|
+
opacity: { duration: 0.4, delay: 0.2 }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
exit: {
|
|
17
|
+
height: 0,
|
|
18
|
+
opacity: 0,
|
|
19
|
+
transition: {
|
|
20
|
+
height: {
|
|
21
|
+
duration: 0.8,
|
|
22
|
+
delay: 0.2,
|
|
23
|
+
ease: "easeIn"
|
|
24
|
+
},
|
|
25
|
+
opacity: { duration: 0.3, delay: 0.1 }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
className: "overflow-hidden flex flex-col justify-between items-center w-full",
|
|
29
|
+
children: a
|
|
30
|
+
}
|
|
31
|
+
) }) }), l = () => /* @__PURE__ */ e.jsx(
|
|
32
|
+
o.div,
|
|
33
|
+
{
|
|
34
|
+
className: "flex justify-center items-center w-full ",
|
|
35
|
+
exit: {
|
|
36
|
+
opacity: 0,
|
|
37
|
+
scaleX: 0,
|
|
38
|
+
height: 0,
|
|
39
|
+
transition: {
|
|
40
|
+
duration: 0.4,
|
|
41
|
+
delay: 0.15,
|
|
42
|
+
ease: "easeInOut"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "border-b border-neutral-strong-default border-1 w-full" })
|
|
46
|
+
}
|
|
47
|
+
), d = ({ onClick: t, children: a, className: i }) => /* @__PURE__ */ e.jsx(
|
|
48
|
+
o.button,
|
|
49
|
+
{
|
|
50
|
+
onClick: t,
|
|
51
|
+
className: r("flex py-2 w-full px-2 gap-1 rounded-md cursor-pointer mt-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile", i),
|
|
52
|
+
exit: {
|
|
53
|
+
opacity: 0,
|
|
54
|
+
y: -8,
|
|
55
|
+
scale: 0.96,
|
|
56
|
+
transition: {
|
|
57
|
+
duration: 0.5,
|
|
58
|
+
delay: 0,
|
|
59
|
+
ease: "easeInOut"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
whileHover: {
|
|
63
|
+
opacity: 1,
|
|
64
|
+
scale: [1, 1.02, 1],
|
|
65
|
+
transition: { duration: 0.2 }
|
|
66
|
+
},
|
|
67
|
+
whileTap: { scale: 0.98 },
|
|
68
|
+
children: a
|
|
69
|
+
}
|
|
70
|
+
), f = Object.assign(s, {
|
|
71
|
+
Divider: l,
|
|
72
|
+
Items: d
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
f as Menu
|
|
76
|
+
};
|