prometeo-design-system 2.5.4 → 2.5.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.
- package/dist/DrawerMobile.es.js +44 -46
- package/dist/InputFormik.es.js +121 -86
- package/dist/LayoutGeneric-CbaoatQB.js +26 -0
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Select-CrTtTmXZ.js +813 -0
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +55 -29
- package/dist/SelectSearch.es.js +167 -132
- package/dist/components/Autocomplete/useAutocomplete.d.ts +14 -6
- package/dist/components/InputFormik/InputFormik.d.ts +2 -1
- package/dist/components/Select/Select.d.ts +19 -7
- package/dist/components/SelectFormik/SelectFormik.d.ts +5 -3
- package/dist/components/SelectSearch/SelectSearch.d.ts +12 -4
- package/dist/components/Sidebar/context/SidebarContext.d.ts +2 -0
- package/dist/components/TabSwitch/TabSwitch.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/prometeo-design-system.es.js +136 -129
- package/package.json +1 -1
- package/dist/LayoutGeneric-p4Pll4Cm.js +0 -24
- package/dist/Select-C-aLaiJu.js +0 -804
package/dist/DrawerMobile.es.js
CHANGED
|
@@ -2,19 +2,19 @@ import { j as g } from "./jsx-runtime-DKDX3adD.js";
|
|
|
2
2
|
import { c as W } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { forwardRef as K, useState as B, useRef as v, useEffect as F, useCallback as c, useMemo as J, useImperativeHandle as Q } from "react";
|
|
4
4
|
import { createPortal as U } from "react-dom";
|
|
5
|
-
const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u,
|
|
6
|
-
const { children: y, defaultOpen:
|
|
7
|
-
Y.current =
|
|
8
|
-
|
|
9
|
-
}, [
|
|
10
|
-
|
|
5
|
+
const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, o) => {
|
|
6
|
+
const { children: y, defaultOpen: s = !1, onClose: f, snapPoints: d = ["60%"], setSnap: w, snap: p, attachToParent: O = !1 } = u, [E, x] = B(p || "0%"), [r, C] = B(null), Y = v(f), a = v(w), m = v(r);
|
|
7
|
+
Y.current = f, m.current = r, F(() => {
|
|
8
|
+
s && b();
|
|
9
|
+
}, [s]), F(() => {
|
|
10
|
+
a.current = w;
|
|
11
11
|
}, [w]);
|
|
12
12
|
const M = c(() => {
|
|
13
13
|
x("0%"), Y.current?.(m.current), setTimeout(() => C(null), 300);
|
|
14
14
|
}, []), b = c((H, N) => {
|
|
15
15
|
console.log(H || d[0] || "60%"), x(H || d[0] || "60%"), C(N ?? null);
|
|
16
16
|
}, [d]), S = J(() => E !== "0%", [E]);
|
|
17
|
-
Q(
|
|
17
|
+
Q(o, () => ({
|
|
18
18
|
open: b,
|
|
19
19
|
close: M,
|
|
20
20
|
isOpen: S,
|
|
@@ -22,13 +22,12 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
22
22
|
}), [b, M, S]);
|
|
23
23
|
const L = p || E;
|
|
24
24
|
return O ? /* @__PURE__ */ g.jsx(q, { ...u, snap: L, setSnap: x, context: r, children: y }) : U(/* @__PURE__ */ g.jsx(q, { ...u, snap: L, setSnap: x, context: r, children: y }), document.body);
|
|
25
|
-
}), q = ({ children: u, attachToParent:
|
|
26
|
-
const r = v(null), C = v(null), Y = v(null),
|
|
25
|
+
}), q = ({ children: u, attachToParent: o = !1, className: y, snap: s, snapPoints: f = ["60%"], setSnap: d, hideOnClose: w = !1, header: p, modal: O = !1, closeOnOverlayClick: E = !1, context: x }) => {
|
|
26
|
+
const r = v(null), C = v(null), Y = v(null), a = v(null), m = v(null), M = c(() => {
|
|
27
27
|
if (!r.current) return [];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, [a, s]), b = c((e, t) => {
|
|
28
|
+
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
29
|
+
return f?.map((t) => typeof t == "string" && t.endsWith("%") ? parseFloat(t) > 100 ? e : parseFloat(t) / 100 * e : typeof t == "string" && t.endsWith("px") ? parseFloat(t) : typeof t == "number" && t >= 0 && t <= 1 ? t * e : typeof t == "number" ? t : 0) || [];
|
|
30
|
+
}, [f, o]), b = c((e, t) => {
|
|
32
31
|
const n = M();
|
|
33
32
|
if (n.length === 0) return e;
|
|
34
33
|
if (Math.abs(t) > 0.05)
|
|
@@ -42,31 +41,30 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
42
41
|
}
|
|
43
42
|
return n.reduce((l, i) => Math.abs(i - e) < Math.abs(l - e) ? i : l);
|
|
44
43
|
}, [M]), S = c((e) => {
|
|
45
|
-
if (d &&
|
|
46
|
-
const t =
|
|
44
|
+
if (d && f) {
|
|
45
|
+
const t = o && r.current?.parentElement?.offsetHeight || window.innerHeight, n = e <= A ? "0%" : `${Math.round(e / t * 100)}%`;
|
|
47
46
|
d(n);
|
|
48
47
|
}
|
|
49
|
-
}, [d,
|
|
48
|
+
}, [d, f, o]), L = c((e) => {
|
|
50
49
|
r.current && (r.current.style.transition = V, r.current.style.height = `${e}px`);
|
|
51
|
-
}, [d,
|
|
52
|
-
if (m.current &&
|
|
50
|
+
}, [d, f, o]), R = c(() => {
|
|
51
|
+
if (m.current && o) {
|
|
53
52
|
const { scrollY: e } = m.current;
|
|
54
53
|
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, e), m.current = null;
|
|
55
54
|
}
|
|
56
|
-
}, [
|
|
55
|
+
}, [o]);
|
|
57
56
|
F(() => () => {
|
|
58
57
|
R();
|
|
59
58
|
}, [R]), F(() => {
|
|
60
|
-
if (!r.current || !
|
|
61
|
-
|
|
62
|
-
const e = s && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
59
|
+
if (!r.current || !s) return;
|
|
60
|
+
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
63
61
|
let t = 0;
|
|
64
|
-
typeof
|
|
65
|
-
}, [
|
|
62
|
+
typeof s == "string" && s.endsWith("%") ? parseFloat(s) <= 0 ? t = w ? 0 : A : t = parseFloat(s) / 100 * e : typeof s == "string" && s.endsWith("px") ? t = parseFloat(s) : typeof s == "number" && (s >= 0 && s <= 1 ? t = s * e : t = s), L(t);
|
|
63
|
+
}, [s, o]);
|
|
66
64
|
const H = c((e) => {
|
|
67
65
|
if (!r.current) return;
|
|
68
66
|
const t = e.touches[0], n = r.current.offsetHeight;
|
|
69
|
-
|
|
67
|
+
a.current = {
|
|
70
68
|
isDragging: !1,
|
|
71
69
|
startY: t.clientY,
|
|
72
70
|
startHeight: n,
|
|
@@ -77,7 +75,7 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
77
75
|
}, []), N = c((e) => {
|
|
78
76
|
if (!r.current) return;
|
|
79
77
|
const t = e, n = r.current.offsetHeight;
|
|
80
|
-
|
|
78
|
+
a.current = {
|
|
81
79
|
isDragging: !1,
|
|
82
80
|
startY: t.clientY,
|
|
83
81
|
startHeight: n,
|
|
@@ -86,9 +84,9 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
86
84
|
velocity: 0
|
|
87
85
|
};
|
|
88
86
|
}, []), I = c((e) => {
|
|
89
|
-
if (!
|
|
90
|
-
const t = e.touches[0], n =
|
|
91
|
-
if (!n.isDragging && l && (n.isDragging = !0,
|
|
87
|
+
if (!a.current || !r.current) return;
|
|
88
|
+
const t = e.touches[0], n = a.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
|
|
89
|
+
if (!n.isDragging && l && (n.isDragging = !0, o)) {
|
|
92
90
|
const i = window.scrollY;
|
|
93
91
|
m.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
94
92
|
}
|
|
@@ -100,13 +98,13 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
100
98
|
n.velocity = n.velocity * 0.8 + G * 0.2;
|
|
101
99
|
}
|
|
102
100
|
n.lastY = t.clientY, n.lastTime = i;
|
|
103
|
-
const T = n.startHeight + D, $ =
|
|
101
|
+
const T = n.startHeight + D, $ = o && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
|
|
104
102
|
r.current.style.transition = "none", r.current.style.height = `${z}px`;
|
|
105
103
|
}
|
|
106
|
-
}, [
|
|
107
|
-
if (!
|
|
108
|
-
const t = e, n =
|
|
109
|
-
if (!n.isDragging && l && (n.isDragging = !0,
|
|
104
|
+
}, [o]), _ = c((e) => {
|
|
105
|
+
if (!a.current || !r.current) return;
|
|
106
|
+
const t = e, n = a.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
|
|
107
|
+
if (!n.isDragging && l && (n.isDragging = !0, o)) {
|
|
110
108
|
const i = window.scrollY;
|
|
111
109
|
m.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
112
110
|
}
|
|
@@ -118,18 +116,18 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
118
116
|
n.velocity = n.velocity * 0.8 + G * 0.2;
|
|
119
117
|
}
|
|
120
118
|
n.lastY = t.clientY, n.lastTime = i;
|
|
121
|
-
const T = n.startHeight + D, $ =
|
|
119
|
+
const T = n.startHeight + D, $ = o && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
|
|
122
120
|
r.current.style.transition = "none", r.current.style.height = `${z}px`;
|
|
123
121
|
}
|
|
124
|
-
}, [
|
|
125
|
-
if (!
|
|
126
|
-
const e =
|
|
122
|
+
}, [o]), h = c(() => {
|
|
123
|
+
if (!a.current || !r.current) return;
|
|
124
|
+
const e = a.current;
|
|
127
125
|
if (e.isDragging) {
|
|
128
126
|
R();
|
|
129
127
|
const t = r.current.offsetHeight, n = b(t, e.velocity);
|
|
130
128
|
S(n);
|
|
131
129
|
}
|
|
132
|
-
|
|
130
|
+
a.current = null;
|
|
133
131
|
}, [b, L, R]);
|
|
134
132
|
F(() => {
|
|
135
133
|
const e = Y.current;
|
|
@@ -138,7 +136,7 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
138
136
|
e.removeEventListener("touchstart", H), e.removeEventListener("touchmove", I), e.removeEventListener("touchend", h), e.removeEventListener("touchcancel", h), e.removeEventListener("mousedown", N), e.removeEventListener("mousemove", _), e.removeEventListener("mouseup", h), e.removeEventListener("mouseleave", h);
|
|
139
137
|
};
|
|
140
138
|
}, [H, I, h]);
|
|
141
|
-
const k = J(() =>
|
|
139
|
+
const k = J(() => s !== "0%", [s]);
|
|
142
140
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
143
141
|
O && /* @__PURE__ */ g.jsx(
|
|
144
142
|
"div",
|
|
@@ -155,7 +153,7 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
155
153
|
{
|
|
156
154
|
ref: r,
|
|
157
155
|
className: W(
|
|
158
|
-
|
|
156
|
+
o ? "absolute" : "fixed",
|
|
159
157
|
"z-60 bottom-0 w-full overflow-hidden",
|
|
160
158
|
"bg-neutral-default-default",
|
|
161
159
|
"border-t border-neutral-strong-default rounded-t-[12px]",
|
|
@@ -194,17 +192,17 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
|
|
|
194
192
|
)
|
|
195
193
|
] });
|
|
196
194
|
}, ne = () => {
|
|
197
|
-
const u = v(null),
|
|
195
|
+
const u = v(null), o = c((d, w) => {
|
|
198
196
|
u.current?.open(d, w);
|
|
199
197
|
}, []), y = c(() => {
|
|
200
198
|
u.current?.close();
|
|
201
|
-
}, []),
|
|
199
|
+
}, []), s = c(() => u.current?.isOpen ?? !1, []), f = c(() => u.current?.getContext() ?? null, []);
|
|
202
200
|
return {
|
|
203
|
-
isOpen:
|
|
204
|
-
open:
|
|
201
|
+
isOpen: s,
|
|
202
|
+
open: o,
|
|
205
203
|
close: y,
|
|
206
204
|
drawerRef: u,
|
|
207
|
-
getContext:
|
|
205
|
+
getContext: f
|
|
208
206
|
};
|
|
209
207
|
};
|
|
210
208
|
export {
|
package/dist/InputFormik.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { c as u } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { FastField as
|
|
4
|
-
import { memo as
|
|
3
|
+
import { FastField as q, ErrorMessage as G } from "formik";
|
|
4
|
+
import { memo as H, useState as I, useRef as J, useCallback as y, useLayoutEffect as Q } from "react";
|
|
5
5
|
import { Icons as N } from "./Icons.es.js";
|
|
6
|
-
const
|
|
6
|
+
const W = ({
|
|
7
7
|
icon: l,
|
|
8
8
|
iconPosition: r = "left",
|
|
9
9
|
label: d,
|
|
@@ -15,20 +15,24 @@ const Q = ({
|
|
|
15
15
|
placeholder: p,
|
|
16
16
|
disabled: b = !1,
|
|
17
17
|
field: t,
|
|
18
|
-
|
|
18
|
+
innerRef: z,
|
|
19
|
+
form: K,
|
|
19
20
|
...a
|
|
20
21
|
}) => {
|
|
21
|
-
const [o, v] = I(!1), [C,
|
|
22
|
+
const [o, v] = I(!1), [C, M] = I(!1), c = J(null), F = K.getFieldMeta(t.name), k = F.touched && F.error, E = t.value && t.value.toString().length > 0, x = j === "password", P = x ? C ? "text" : "password" : j, R = () => n === "static" ? p || d : p || "", A = () => x ? l ? r === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : l ? r === "left" ? "pl-10" : "pr-10" : "", D = y(() => {
|
|
22
23
|
v(!0), a.onFocus?.();
|
|
23
|
-
}, [a]),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
}, [a]), T = y(
|
|
25
|
+
(i) => {
|
|
26
|
+
v(!1), a.onBlur?.(), t.onBlur(i);
|
|
27
|
+
},
|
|
28
|
+
[t, a]
|
|
29
|
+
), U = y(() => {
|
|
30
|
+
M((i) => !i);
|
|
27
31
|
}, []);
|
|
28
|
-
|
|
32
|
+
Q(() => {
|
|
29
33
|
if (c.current) {
|
|
30
|
-
const
|
|
31
|
-
let s =
|
|
34
|
+
const L = ((O) => {
|
|
35
|
+
let s = O;
|
|
32
36
|
for (; s && s !== document.body; ) {
|
|
33
37
|
const f = window.getComputedStyle(s).backgroundColor;
|
|
34
38
|
if (f && f !== "transparent" && f !== "rgba(0, 0, 0, 0)")
|
|
@@ -37,8 +41,10 @@ const Q = ({
|
|
|
37
41
|
}
|
|
38
42
|
const m = window.getComputedStyle(document.body).backgroundColor;
|
|
39
43
|
return m && m !== "transparent" && m !== "rgba(0, 0, 0, 0)" ? m : "rgb(255, 255, 255)";
|
|
40
|
-
})(
|
|
41
|
-
|
|
44
|
+
})(
|
|
45
|
+
c.current.parentElement
|
|
46
|
+
);
|
|
47
|
+
c.current.style.backgroundColor = L;
|
|
42
48
|
}
|
|
43
49
|
}, []);
|
|
44
50
|
const g = {
|
|
@@ -72,7 +78,7 @@ const Q = ({
|
|
|
72
78
|
icon: {},
|
|
73
79
|
placeholder: {}
|
|
74
80
|
}
|
|
75
|
-
},
|
|
81
|
+
}, V = {
|
|
76
82
|
none: {
|
|
77
83
|
label: "left-2 "
|
|
78
84
|
},
|
|
@@ -92,79 +98,108 @@ const Q = ({
|
|
|
92
98
|
label: `top-1/2 -translate-y-1/2 scale-100 peer-focus:text-sm peer-placeholder-shown:text-base ${(o || E) && "top-0 scale-90"}`
|
|
93
99
|
}
|
|
94
100
|
}, h = b ? "disabled" : k ? "error" : "default";
|
|
95
|
-
return /* @__PURE__ */ e.jsxs(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
type: M,
|
|
103
|
-
name: t.name,
|
|
104
|
-
value: t.value || "",
|
|
105
|
-
placeholder: P(),
|
|
106
|
-
onChange: t.onChange,
|
|
107
|
-
onFocus: A,
|
|
108
|
-
onEmptied: a.onEmptied,
|
|
109
|
-
onKeyDown: a.onKeyDown,
|
|
110
|
-
onKeyUp: a.onKeyUp,
|
|
111
|
-
onBlur: D,
|
|
112
|
-
className: u(
|
|
113
|
-
"w-full px-3 h-12 text-left border-[1px] rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
|
|
114
|
-
"bg-transparent focus:outline-none",
|
|
115
|
-
S[n].input,
|
|
116
|
-
g[h].input,
|
|
117
|
-
R(),
|
|
118
|
-
B
|
|
119
|
-
)
|
|
120
|
-
}
|
|
101
|
+
return /* @__PURE__ */ e.jsxs(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: u(
|
|
105
|
+
"relative w-full bg-inherit",
|
|
106
|
+
n === "static" && "mt-5",
|
|
107
|
+
$
|
|
121
108
|
),
|
|
122
|
-
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative bg-inherit", children: [
|
|
111
|
+
/* @__PURE__ */ e.jsx(
|
|
112
|
+
"input",
|
|
113
|
+
{
|
|
114
|
+
disabled: b,
|
|
115
|
+
id: w || t.name,
|
|
116
|
+
type: P,
|
|
117
|
+
name: t.name,
|
|
118
|
+
value: t.value || "",
|
|
119
|
+
placeholder: R(),
|
|
120
|
+
onChange: t.onChange,
|
|
121
|
+
onFocus: D,
|
|
122
|
+
onEmptied: a.onEmptied,
|
|
123
|
+
onKeyDown: a.onKeyDown,
|
|
124
|
+
onKeyUp: a.onKeyUp,
|
|
125
|
+
onBlur: T,
|
|
126
|
+
className: u(
|
|
127
|
+
"w-full px-3 h-12 text-left border-[1px] rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
|
|
128
|
+
"bg-transparent focus:outline-none",
|
|
129
|
+
S[n].input,
|
|
130
|
+
g[h].input,
|
|
131
|
+
A(),
|
|
132
|
+
B
|
|
133
|
+
),
|
|
134
|
+
ref: z
|
|
135
|
+
}
|
|
133
136
|
),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
|
|
149
|
-
"transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
|
|
150
|
-
l && r === "right" ? "right-8" : "right-3"
|
|
137
|
+
/* @__PURE__ */ e.jsx(
|
|
138
|
+
"label",
|
|
139
|
+
{
|
|
140
|
+
ref: c,
|
|
141
|
+
htmlFor: w || a.name,
|
|
142
|
+
className: u(
|
|
143
|
+
"absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
|
|
144
|
+
"prometeo-fonts-label-large text-sm",
|
|
145
|
+
V[l ? r : "none"].label,
|
|
146
|
+
S[n].label,
|
|
147
|
+
g[h].label
|
|
148
|
+
),
|
|
149
|
+
children: d
|
|
150
|
+
}
|
|
151
151
|
),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
152
|
+
l && /* @__PURE__ */ e.jsx(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
className: u(
|
|
156
|
+
"absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
|
|
157
|
+
g[h].icon,
|
|
158
|
+
r === "left" ? "left-3" : "right-3"
|
|
159
|
+
),
|
|
160
|
+
children: l
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
x && /* @__PURE__ */ e.jsx(
|
|
164
|
+
"button",
|
|
165
|
+
{
|
|
166
|
+
type: "button",
|
|
167
|
+
onClick: U,
|
|
168
|
+
className: u(
|
|
169
|
+
"absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
|
|
170
|
+
"transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
|
|
171
|
+
l && r === "right" ? "right-8" : "right-3"
|
|
172
|
+
),
|
|
173
|
+
tabIndex: -1,
|
|
174
|
+
disabled: b,
|
|
175
|
+
children: C ? /* @__PURE__ */ e.jsx(
|
|
176
|
+
N.EyeVisibility,
|
|
177
|
+
{
|
|
178
|
+
size: 24,
|
|
179
|
+
className: "text-neutral-default-default"
|
|
180
|
+
}
|
|
181
|
+
) : /* @__PURE__ */ e.jsx(
|
|
182
|
+
N.EyeVisibilityOff,
|
|
183
|
+
{
|
|
184
|
+
size: 24,
|
|
185
|
+
className: "text-neutral-default-default"
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
] }),
|
|
191
|
+
k && /* @__PURE__ */ e.jsx(
|
|
192
|
+
G,
|
|
193
|
+
{
|
|
194
|
+
name: t.name,
|
|
195
|
+
component: "span",
|
|
196
|
+
className: "block text-error-default-default text-xs mt-1"
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
}, X = H(W), ae = (l) => /* @__PURE__ */ e.jsx(q, { name: l.name, children: ({ field: r, form: d }) => /* @__PURE__ */ e.jsx(X, { ...l, field: r, form: d }) });
|
|
168
203
|
export {
|
|
169
|
-
|
|
204
|
+
ae as default
|
|
170
205
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as n } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { useRef as o, createContext as c, useContext as l, memo as d } from "react";
|
|
3
|
+
const a = c(null), x = ({ children: e }) => {
|
|
4
|
+
const r = o(null), s = o(null), u = (t) => {
|
|
5
|
+
t.current && r && (r.current = t.current);
|
|
6
|
+
}, i = (t) => {
|
|
7
|
+
t.current && s && (s.current = t.current);
|
|
8
|
+
};
|
|
9
|
+
return /* @__PURE__ */ n.jsx(a.Provider, { value: { primarySidebarRef: r, registerPrimarySidebar: u, tabBarRef: s, registerTabBar: i }, children: e });
|
|
10
|
+
}, S = () => {
|
|
11
|
+
const e = l(a);
|
|
12
|
+
if (!e)
|
|
13
|
+
throw new Error("useSidebarContext must be used within a SidebarProvider");
|
|
14
|
+
return e;
|
|
15
|
+
}, f = ({
|
|
16
|
+
children: e,
|
|
17
|
+
sidebar: r
|
|
18
|
+
}) => /* @__PURE__ */ n.jsxs("div", { className: "flex h-screen w-full bg-neutral-default-default", children: [
|
|
19
|
+
/* @__PURE__ */ n.jsx(x, { children: r }),
|
|
20
|
+
/* @__PURE__ */ n.jsx("main", { className: "w-full h-full overflow-y-auto", children: e })
|
|
21
|
+
] }), h = d(f);
|
|
22
|
+
export {
|
|
23
|
+
h as L,
|
|
24
|
+
x as S,
|
|
25
|
+
S as u
|
|
26
|
+
};
|
package/dist/LayoutGeneric.es.js
CHANGED