@konstructio/ui 0.1.0-alpha.5 → 0.1.0-alpha.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/{Combination-Cvr3uETz.js → Combination-VYaRRJBZ.js} +104 -106
- package/dist/Modal-CrG0m703.js +98 -0
- package/dist/{chevron-up-DgLBQCKD.js → chevron-up-RLP4nX7V.js} +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Dropdown/components/List/List.js +40 -36
- package/dist/components/Dropdown/components/List/List.variants.js +3 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.js +18 -16
- package/dist/components/Dropdown/components/Wrapper.js +110 -94
- package/dist/components/Dropdown/contexts/dropdown.context.js +6 -2
- package/dist/components/Dropdown/contexts/dropdown.provider.js +18 -11
- package/dist/components/Input/Input.js +9 -9
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +4 -6
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{index-BuxebbOg.js → index-BNU3RH-3.js} +1 -1
- package/dist/{index-1RDo-S_f.js → index-DLYwlPRZ.js} +1 -1
- package/dist/{index-Cz09twLl.js → index-Dkt8F6CZ.js} +1 -1
- package/dist/{index-C5psggHV.js → index-h-Ul0anl.js} +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/package.json +21 -24
- package/dist/styles.css +1 -1
- package/dist/{x-DU-Zw-L_.js → x-BPcqkRZd.js} +1 -1
- package/package.json +20 -23
- package/dist/Modal-DXYBiafI.js +0 -926
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { _ as r } from "../../../index-
|
|
3
|
+
import { _ as r } from "../../../index-Dkt8F6CZ.js";
|
|
4
4
|
import { cn as t } from "../../../utils/index.js";
|
|
5
5
|
const s = p(({ className: o, ...a }, m) => /* @__PURE__ */ e(
|
|
6
6
|
r.Separator,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as i } from "react";
|
|
3
|
-
import { a as r, C as o, b as l } from "../../../index-
|
|
3
|
+
import { a as r, C as o, b as l } from "../../../index-DLYwlPRZ.js";
|
|
4
4
|
import { cn as m } from "../../../utils/index.js";
|
|
5
5
|
import { DialogOverlay as p } from "./DialogOverlay.js";
|
|
6
|
-
import { X as c } from "../../../x-
|
|
6
|
+
import { X as c } from "../../../x-BPcqkRZd.js";
|
|
7
7
|
const f = i(({ className: e, children: s, ...n }, d) => /* @__PURE__ */ t(r, { children: [
|
|
8
8
|
/* @__PURE__ */ a(p, {}),
|
|
9
9
|
/* @__PURE__ */ t(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as d } from "react";
|
|
3
|
-
import { O as a } from "../../../index-
|
|
3
|
+
import { O as a } from "../../../index-DLYwlPRZ.js";
|
|
4
4
|
import { cn as i } from "../../../utils/index.js";
|
|
5
5
|
const m = d(({ className: t, ...e }, o) => /* @__PURE__ */ s(
|
|
6
6
|
a,
|
|
@@ -1,60 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { useNavigationUlList as
|
|
5
|
-
import { ListItem as
|
|
6
|
-
import { listVariants as
|
|
7
|
-
import { useDropdownContext as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v, useRef as w, useImperativeHandle as N } from "react";
|
|
3
|
+
import { cn as h } from "../../../../utils/index.js";
|
|
4
|
+
import { useNavigationUlList as x } from "../../hooks/useNavigationList.js";
|
|
5
|
+
import { ListItem as s } from "../ListItem/ListItem.js";
|
|
6
|
+
import { listVariants as C } from "./List.variants.js";
|
|
7
|
+
import { useDropdownContext as k } from "../../contexts/dropdown.hook.js";
|
|
8
|
+
const T = v(
|
|
9
9
|
({
|
|
10
|
-
className:
|
|
11
|
-
isLoading:
|
|
12
|
-
itemClassName:
|
|
13
|
-
name:
|
|
14
|
-
options:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
className: i,
|
|
11
|
+
isLoading: n,
|
|
12
|
+
itemClassName: o,
|
|
13
|
+
name: c,
|
|
14
|
+
options: r,
|
|
15
|
+
searchable: m = !1,
|
|
16
|
+
wrapperInputRef: f,
|
|
17
|
+
wrapperRef: p
|
|
18
|
+
}, u) => {
|
|
19
|
+
const l = w(null), { isOpen: b, searchTerm: d } = k();
|
|
20
|
+
N(u, () => l.current, [l]), x({ ulRef: l, wrapperRef: p, wrapperInputRef: f });
|
|
21
|
+
const a = m ? r.filter((e) => {
|
|
22
|
+
const g = d.toLowerCase();
|
|
23
|
+
return (typeof e.label == "string" ? e.label.toLowerCase() : "").includes(g);
|
|
24
|
+
}) : r, L = a.length === 0;
|
|
25
|
+
return /* @__PURE__ */ t(
|
|
22
26
|
"ul",
|
|
23
27
|
{
|
|
24
|
-
ref:
|
|
25
|
-
title:
|
|
28
|
+
ref: l,
|
|
29
|
+
title: c,
|
|
26
30
|
role: "listbox",
|
|
27
|
-
className:
|
|
28
|
-
"data-state":
|
|
29
|
-
children:
|
|
30
|
-
|
|
31
|
+
className: h(C({ className: i })),
|
|
32
|
+
"data-state": b ? "open" : "closed",
|
|
33
|
+
children: n ? /* @__PURE__ */ t(
|
|
34
|
+
s,
|
|
31
35
|
{
|
|
32
|
-
className:
|
|
36
|
+
className: o,
|
|
33
37
|
isClickable: !1,
|
|
34
38
|
value: "Loading...",
|
|
35
39
|
label: "Loading..."
|
|
36
40
|
}
|
|
37
|
-
) :
|
|
38
|
-
|
|
41
|
+
) : L ? /* @__PURE__ */ t(
|
|
42
|
+
s,
|
|
39
43
|
{
|
|
40
|
-
className:
|
|
44
|
+
className: o,
|
|
41
45
|
isClickable: !1,
|
|
42
46
|
value: "No options",
|
|
43
47
|
label: "No options"
|
|
44
48
|
}
|
|
45
|
-
) :
|
|
46
|
-
|
|
49
|
+
) : a.map((e) => /* @__PURE__ */ t(
|
|
50
|
+
s,
|
|
47
51
|
{
|
|
48
|
-
className:
|
|
52
|
+
className: o,
|
|
49
53
|
isClickable: !0,
|
|
50
|
-
...
|
|
54
|
+
...e
|
|
51
55
|
},
|
|
52
|
-
|
|
56
|
+
e.value
|
|
53
57
|
))
|
|
54
58
|
}
|
|
55
59
|
);
|
|
56
60
|
}
|
|
57
61
|
);
|
|
58
62
|
export {
|
|
59
|
-
|
|
63
|
+
T as List
|
|
60
64
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const a =
|
|
1
|
+
import { c as o } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const a = o([
|
|
3
3
|
"absolute",
|
|
4
4
|
"bg-white",
|
|
5
5
|
"border",
|
|
@@ -18,7 +18,7 @@ const a = t([
|
|
|
18
18
|
"overflow-y-auto",
|
|
19
19
|
"border-gray-200",
|
|
20
20
|
"text-zinc-700",
|
|
21
|
-
"data-[state=open]:
|
|
21
|
+
"data-[state=open]:block",
|
|
22
22
|
"data-[state=closed]:hidden"
|
|
23
23
|
]);
|
|
24
24
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as p, jsx as
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as u, useCallback as s } from "react";
|
|
3
3
|
import { Typography as d } from "../../../Typography/Typography.js";
|
|
4
4
|
import { cn as h } from "../../../../utils/index.js";
|
|
@@ -6,32 +6,34 @@ import { listItemVariants as x } from "./ListItem.variants.js";
|
|
|
6
6
|
import { useDropdownContext as y } from "../../contexts/dropdown.hook.js";
|
|
7
7
|
const j = ({
|
|
8
8
|
isClickable: a,
|
|
9
|
-
className:
|
|
10
|
-
...
|
|
9
|
+
className: i,
|
|
10
|
+
...t
|
|
11
11
|
}) => {
|
|
12
|
-
const { setValue:
|
|
13
|
-
(
|
|
14
|
-
|
|
12
|
+
const { setValue: l, toggleOpen: n } = y(), c = u(null), o = s(
|
|
13
|
+
(e) => {
|
|
14
|
+
l(e.value), n(!1);
|
|
15
15
|
},
|
|
16
|
-
[
|
|
16
|
+
[l, n]
|
|
17
17
|
), m = s(
|
|
18
|
-
(
|
|
19
|
-
|
|
18
|
+
(e, f) => {
|
|
19
|
+
e.key === "Enter" && (e.stopPropagation(), o(f));
|
|
20
20
|
},
|
|
21
|
-
[
|
|
21
|
+
[o]
|
|
22
22
|
);
|
|
23
23
|
return /* @__PURE__ */ p(
|
|
24
24
|
"li",
|
|
25
25
|
{
|
|
26
|
-
ref:
|
|
26
|
+
ref: c,
|
|
27
27
|
role: "option",
|
|
28
|
-
className: h(x({ className:
|
|
28
|
+
className: h(x({ className: i })),
|
|
29
29
|
tabIndex: 0,
|
|
30
|
-
onClick: () =>
|
|
31
|
-
|
|
30
|
+
onClick: (e) => {
|
|
31
|
+
a && (o(t), e.stopPropagation());
|
|
32
|
+
},
|
|
33
|
+
onKeyDown: (e) => m(e, t),
|
|
32
34
|
children: [
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
+
t.leftIcon ? /* @__PURE__ */ r("span", { className: "w-4 h-4 flex justify-center items-center", children: t.leftIcon }) : null,
|
|
36
|
+
/* @__PURE__ */ r(d, { variant: "body2", className: "text-zinc-700", children: t.label })
|
|
35
37
|
]
|
|
36
38
|
}
|
|
37
39
|
);
|
|
@@ -1,137 +1,153 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as W, useId as B, useRef as
|
|
1
|
+
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as W, useId as B, useRef as j, useImperativeHandle as G, useMemo as J, useEffect as N } from "react";
|
|
3
3
|
import { Loading as K } from "../../Loading/Loading.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { C as
|
|
10
|
-
import { useDropdownContext as
|
|
11
|
-
const
|
|
4
|
+
import { cn as p } from "../../../utils/index.js";
|
|
5
|
+
import { labelVariants as Q, dropdownVariants as X } from "../Dropdown.variants.js";
|
|
6
|
+
import { useDropdown as Y } from "../hooks/useDropdown.js";
|
|
7
|
+
import { List as Z } from "./List/List.js";
|
|
8
|
+
import { Typography as _ } from "../../Typography/Typography.js";
|
|
9
|
+
import { C as q } from "../../../chevron-up-RLP4nX7V.js";
|
|
10
|
+
import { useDropdownContext as V } from "../contexts/dropdown.hook.js";
|
|
11
|
+
const de = W(
|
|
12
12
|
({
|
|
13
|
-
className:
|
|
14
|
-
defaultValue:
|
|
15
|
-
iconClassName:
|
|
16
|
-
isLoading:
|
|
13
|
+
className: k,
|
|
14
|
+
defaultValue: u,
|
|
15
|
+
iconClassName: E,
|
|
16
|
+
isLoading: C,
|
|
17
17
|
label: x,
|
|
18
|
-
labelClassName:
|
|
19
|
-
listClassName:
|
|
20
|
-
listItemClassName:
|
|
21
|
-
name:
|
|
22
|
-
options:
|
|
23
|
-
placeholder:
|
|
24
|
-
required:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
18
|
+
labelClassName: D,
|
|
19
|
+
listClassName: F,
|
|
20
|
+
listItemClassName: M,
|
|
21
|
+
name: i,
|
|
22
|
+
options: r,
|
|
23
|
+
placeholder: h,
|
|
24
|
+
required: g,
|
|
25
|
+
searchable: y = !1,
|
|
26
|
+
theme: $,
|
|
27
|
+
wrapperClassName: A
|
|
28
|
+
}, H) => {
|
|
29
|
+
const I = B(), s = j(null), R = j(null), { wrapperRef: l, wrapperInputRef: L, handleOpen: O, handleOpenIfClosed: P } = Y({ ulRef: R }), { isOpen: v, toggleOpen: z, value: o, setValue: b, setSearchTerm: w, searchTerm: S } = V(), c = i ? `${I}-${i}` : I;
|
|
30
|
+
G(H, () => s.current, [s]);
|
|
31
|
+
const e = J(() => r.find(({ value: t }) => t === o), [r, o]);
|
|
32
|
+
N(() => {
|
|
33
|
+
s.current && (s.current.value = o ? e == null ? void 0 : e.value : "");
|
|
34
|
+
}, [e, o]), N(() => {
|
|
35
|
+
if (u && !o) {
|
|
36
|
+
const t = r && r.find((n) => n.value === u);
|
|
37
|
+
t && b(t.value);
|
|
37
38
|
}
|
|
38
|
-
}, [
|
|
39
|
-
var
|
|
40
|
-
const
|
|
41
|
-
return (
|
|
42
|
-
var
|
|
43
|
-
const
|
|
44
|
-
(!
|
|
39
|
+
}, [u, r, b, o]), N(() => {
|
|
40
|
+
var n;
|
|
41
|
+
const t = new AbortController();
|
|
42
|
+
return (n = l.current) == null || n.addEventListener("focusout", (d) => {
|
|
43
|
+
var T;
|
|
44
|
+
const f = d.relatedTarget;
|
|
45
|
+
(!f || !((T = l.current) != null && T.contains(f))) && (z(!1), w(""));
|
|
45
46
|
}), () => {
|
|
46
|
-
|
|
47
|
+
t.abort();
|
|
47
48
|
};
|
|
48
|
-
}, [
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
}, [z, l, w]);
|
|
50
|
+
const U = (t) => {
|
|
51
|
+
const n = t.target.value;
|
|
52
|
+
w(n);
|
|
53
|
+
const d = r.find(
|
|
54
|
+
(f) => f.value.toLowerCase() === n.toLowerCase()
|
|
55
|
+
);
|
|
56
|
+
d && b(d.value);
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ m(
|
|
51
59
|
"div",
|
|
52
60
|
{
|
|
53
|
-
ref:
|
|
54
|
-
className:
|
|
55
|
-
"data-theme":
|
|
61
|
+
ref: l,
|
|
62
|
+
className: p("flex flex-col w-full relative", A),
|
|
63
|
+
"data-theme": $,
|
|
56
64
|
children: [
|
|
57
|
-
x ? /* @__PURE__ */
|
|
65
|
+
x ? /* @__PURE__ */ m(
|
|
58
66
|
"label",
|
|
59
67
|
{
|
|
60
68
|
id: c,
|
|
61
|
-
className:
|
|
69
|
+
className: p(Q({ className: D })),
|
|
62
70
|
htmlFor: c,
|
|
63
|
-
onClick:
|
|
71
|
+
onClick: P,
|
|
64
72
|
children: [
|
|
65
73
|
x,
|
|
66
|
-
|
|
74
|
+
g ? /* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" }) : null
|
|
67
75
|
]
|
|
68
76
|
}
|
|
69
77
|
) : null,
|
|
70
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ m(
|
|
71
79
|
"div",
|
|
72
80
|
{
|
|
73
|
-
ref:
|
|
81
|
+
ref: L,
|
|
74
82
|
id: c,
|
|
75
|
-
className:
|
|
83
|
+
className: p(X({ className: k })),
|
|
76
84
|
role: "combobox",
|
|
77
|
-
onClick:
|
|
78
|
-
"aria-expanded":
|
|
85
|
+
onClick: O,
|
|
86
|
+
"aria-expanded": v,
|
|
79
87
|
tabIndex: 0,
|
|
80
88
|
"aria-labelledby": c,
|
|
81
89
|
children: [
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
/* @__PURE__ */ m("div", { className: "flex gap-3 items-center flex-1", children: [
|
|
91
|
+
(e == null ? void 0 : e.leftIcon) && /* @__PURE__ */ a("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }),
|
|
92
|
+
y ? /* @__PURE__ */ a(
|
|
93
|
+
"input",
|
|
94
|
+
{
|
|
95
|
+
type: "text",
|
|
96
|
+
value: v ? S : (e == null ? void 0 : e.label) || "",
|
|
97
|
+
onChange: U,
|
|
98
|
+
placeholder: h,
|
|
99
|
+
className: "flex-1 bg-transparent border-none outline-none text-zinc-700 text-base",
|
|
100
|
+
onClick: (t) => {
|
|
101
|
+
t.stopPropagation(), O();
|
|
102
|
+
},
|
|
103
|
+
"aria-label": x || h,
|
|
104
|
+
"aria-labelledby": c
|
|
105
|
+
}
|
|
106
|
+
) : /* @__PURE__ */ a(
|
|
107
|
+
_,
|
|
108
|
+
{
|
|
109
|
+
variant: "body2",
|
|
110
|
+
className: "flex-1 text-zinc-700 text-base",
|
|
111
|
+
children: (e == null ? void 0 : e.label) || h
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
] }),
|
|
115
|
+
C ? /* @__PURE__ */ a(K, { className: "w-4 h-4 text-zinc-500" }) : /* @__PURE__ */ a(
|
|
116
|
+
q,
|
|
84
117
|
{
|
|
85
|
-
|
|
86
|
-
className:
|
|
87
|
-
children: [
|
|
88
|
-
M(),
|
|
89
|
-
e == null ? void 0 : e.label
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
) : /* @__PURE__ */ r(
|
|
93
|
-
O,
|
|
94
|
-
{
|
|
95
|
-
variant: "body2",
|
|
96
|
-
className: "flex gap-3 items-center text-zinc-700 text-base",
|
|
97
|
-
children: D
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
u ? /* @__PURE__ */ r(K, { className: "w-4 h-4 text-zinc-500" }) : /* @__PURE__ */ r(
|
|
101
|
-
Y,
|
|
102
|
-
{
|
|
103
|
-
"data-state": w ? "open" : "closed",
|
|
104
|
-
className: f(
|
|
118
|
+
"data-state": v ? "open" : "closed",
|
|
119
|
+
className: p(
|
|
105
120
|
"w-4 h-4 text-zinc-500 transition-all duration-50 data-[state=open]:rotate-0 data-[state=closed]:rotate-180",
|
|
106
|
-
|
|
121
|
+
E
|
|
107
122
|
)
|
|
108
123
|
}
|
|
109
124
|
)
|
|
110
125
|
]
|
|
111
126
|
}
|
|
112
127
|
),
|
|
113
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ a(
|
|
114
129
|
"input",
|
|
115
130
|
{
|
|
116
|
-
ref:
|
|
131
|
+
ref: s,
|
|
117
132
|
type: "text",
|
|
118
|
-
name:
|
|
133
|
+
name: i,
|
|
119
134
|
className: "hidden",
|
|
120
135
|
"aria-hidden": "true",
|
|
121
|
-
required:
|
|
136
|
+
required: g
|
|
122
137
|
}
|
|
123
138
|
),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
139
|
+
/* @__PURE__ */ a(
|
|
140
|
+
Z,
|
|
126
141
|
{
|
|
127
|
-
ref:
|
|
128
|
-
className:
|
|
129
|
-
itemClassName:
|
|
130
|
-
name:
|
|
131
|
-
wrapperRef:
|
|
132
|
-
wrapperInputRef:
|
|
133
|
-
options:
|
|
134
|
-
isLoading: !!
|
|
142
|
+
ref: R,
|
|
143
|
+
className: F,
|
|
144
|
+
itemClassName: M,
|
|
145
|
+
name: i,
|
|
146
|
+
wrapperRef: l,
|
|
147
|
+
wrapperInputRef: L,
|
|
148
|
+
options: r,
|
|
149
|
+
isLoading: !!C,
|
|
150
|
+
searchable: y
|
|
135
151
|
}
|
|
136
152
|
)
|
|
137
153
|
]
|
|
@@ -140,5 +156,5 @@ const le = W(
|
|
|
140
156
|
}
|
|
141
157
|
);
|
|
142
158
|
export {
|
|
143
|
-
|
|
159
|
+
de as Wrapper
|
|
144
160
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext as e } from "react";
|
|
2
|
-
const
|
|
2
|
+
const o = e({
|
|
3
3
|
isOpen: !1,
|
|
4
4
|
toggleOpen() {
|
|
5
5
|
throw new Error("toggleOpen function must be overridden");
|
|
@@ -7,8 +7,12 @@ const t = e({
|
|
|
7
7
|
value: void 0,
|
|
8
8
|
setValue() {
|
|
9
9
|
throw new Error("setValue function must be overridden");
|
|
10
|
+
},
|
|
11
|
+
searchTerm: "",
|
|
12
|
+
setSearchTerm() {
|
|
13
|
+
throw new Error("setSearchTerm function must be overridden");
|
|
10
14
|
}
|
|
11
15
|
});
|
|
12
16
|
export {
|
|
13
|
-
|
|
17
|
+
o as DropdownContext
|
|
14
18
|
};
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { DropdownContext as
|
|
4
|
-
import { useToggle as
|
|
5
|
-
const
|
|
6
|
-
const [
|
|
7
|
-
(
|
|
8
|
-
r == null || r({ target: { value:
|
|
2
|
+
import { useState as u, useCallback as d } from "react";
|
|
3
|
+
import { DropdownContext as f } from "./dropdown.context.js";
|
|
4
|
+
import { useToggle as v } from "../../../hooks/useToggle.js";
|
|
5
|
+
const D = ({ children: t, onChange: r, value: o, name: e }) => {
|
|
6
|
+
const [s, m] = v(!1), [l, p] = u(""), a = d(
|
|
7
|
+
(c) => {
|
|
8
|
+
r == null || r({ target: { value: c, name: e ?? "" } });
|
|
9
9
|
},
|
|
10
|
-
[r,
|
|
10
|
+
[r, e]
|
|
11
11
|
);
|
|
12
12
|
return /* @__PURE__ */ i(
|
|
13
|
-
|
|
13
|
+
f.Provider,
|
|
14
14
|
{
|
|
15
|
-
value: {
|
|
15
|
+
value: {
|
|
16
|
+
value: o,
|
|
17
|
+
isOpen: s,
|
|
18
|
+
setValue: a,
|
|
19
|
+
toggleOpen: m,
|
|
20
|
+
searchTerm: l,
|
|
21
|
+
setSearchTerm: p
|
|
22
|
+
},
|
|
16
23
|
children: t
|
|
17
24
|
}
|
|
18
25
|
);
|
|
19
26
|
};
|
|
20
27
|
export {
|
|
21
|
-
|
|
28
|
+
D as DropdownProvider
|
|
22
29
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as h, jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import s, { forwardRef as v, useId as E, useState as _ } from "react";
|
|
3
3
|
import { cn as d } from "../../utils/index.js";
|
|
4
4
|
import { inputVariants as k } from "./Input.variants.js";
|
|
5
|
-
import { P as a } from "../../index-
|
|
5
|
+
import { P as a } from "../../index-h-Ul0anl.js";
|
|
6
6
|
function m() {
|
|
7
7
|
return m = Object.assign || function(e) {
|
|
8
8
|
for (var r = 1; r < arguments.length; r++) {
|
|
@@ -120,11 +120,11 @@ const V = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200
|
|
|
120
120
|
labelClassName: i,
|
|
121
121
|
name: c,
|
|
122
122
|
theme: b,
|
|
123
|
-
type:
|
|
123
|
+
type: p = "text",
|
|
124
124
|
helperText: y,
|
|
125
125
|
...C
|
|
126
126
|
}, j) => {
|
|
127
|
-
const O = E(), [u, N] = _(() =>
|
|
127
|
+
const O = E(), [u, N] = _(() => p !== "password"), f = typeof r == "string" && r.length >= 0, P = u ? x : w;
|
|
128
128
|
return /* @__PURE__ */ h("div", { className: "flex flex-col gap-2 w-full relative", "data-theme": b, children: [
|
|
129
129
|
n ? /* @__PURE__ */ h(
|
|
130
130
|
"label",
|
|
@@ -147,7 +147,7 @@ const V = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200
|
|
|
147
147
|
{
|
|
148
148
|
className: d(
|
|
149
149
|
"absolute left-2.5 top-1/2 -translate-y-[50%] text-slate-400",
|
|
150
|
-
|
|
150
|
+
f && "text-red-600"
|
|
151
151
|
),
|
|
152
152
|
children: /* @__PURE__ */ l(V, { className: "w-5 h-5" })
|
|
153
153
|
}
|
|
@@ -158,20 +158,20 @@ const V = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200
|
|
|
158
158
|
id: O,
|
|
159
159
|
ref: j,
|
|
160
160
|
name: c,
|
|
161
|
-
type: u ?
|
|
161
|
+
type: u ? p : "password",
|
|
162
162
|
className: d(
|
|
163
163
|
k({
|
|
164
164
|
className: e,
|
|
165
|
-
variant:
|
|
165
|
+
variant: f ? "error" : "default"
|
|
166
166
|
}),
|
|
167
|
-
(
|
|
167
|
+
(p === "password" || f) && "pr-10",
|
|
168
168
|
t && "pl-8"
|
|
169
169
|
),
|
|
170
170
|
...C
|
|
171
171
|
}
|
|
172
172
|
),
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
f ? /* @__PURE__ */ l("i", { className: "absolute right-3 text-red-600 top-1/2 -translate-y-[50%]", children: /* @__PURE__ */ l(W, { className: "w-5 h-5" }) }) : null,
|
|
174
|
+
p === "password" && !r ? /* @__PURE__ */ l("i", { className: "absolute right-3 text-slate-400 top-1/2 -translate-y-[50%]", children: /* @__PURE__ */ l(
|
|
175
175
|
P,
|
|
176
176
|
{
|
|
177
177
|
className: "w-5 h-5 cursor-pointer",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../index-BCGvACM9.js";
|
|
4
|
-
import { M as d } from "../../Modal-
|
|
4
|
+
import { M as d } from "../../Modal-CrG0m703.js";
|
|
5
5
|
import "./components/Header/Header.js";
|
|
6
6
|
import "./components/Body/Body.js";
|
|
7
7
|
import "./components/Footer/Footer.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../../../index--EmNlyHx.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import
|
|
5
|
-
import "../../../../
|
|
4
|
+
import "../../../../Combination-VYaRRJBZ.js";
|
|
5
|
+
import { W as f } from "../../../../Modal-CrG0m703.js";
|
|
6
6
|
import "../../../../utils/index.js";
|
|
7
7
|
import "./Wrapper.variants.js";
|
|
8
|
-
import "../../../../x-
|
|
8
|
+
import "../../../../x-BPcqkRZd.js";
|
|
9
9
|
export {
|
|
10
10
|
f as Wrapper
|
|
11
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
1
|
+
import { c as t } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const o = t([
|
|
3
3
|
"bg-metal-1000",
|
|
4
4
|
"bg-white",
|
|
5
5
|
"border-none",
|
|
@@ -8,18 +8,16 @@ const t = o([
|
|
|
8
8
|
"justify-between",
|
|
9
9
|
"min-h-[450px]",
|
|
10
10
|
"min-w-[500px]",
|
|
11
|
-
"overflow-auto",
|
|
12
11
|
"relative",
|
|
13
12
|
"rounded-md",
|
|
14
13
|
"shadow-xs",
|
|
15
|
-
"lg:overflow-hidden",
|
|
16
14
|
"animate-in",
|
|
17
15
|
"fade-in-0",
|
|
18
16
|
"zoom-in-95",
|
|
19
17
|
"duration-150",
|
|
20
18
|
"shadow-kubefirst-primary",
|
|
21
19
|
"colony:shadow-red-400"
|
|
22
|
-
]), r =
|
|
20
|
+
]), r = t([
|
|
23
21
|
"absolute",
|
|
24
22
|
"right-1.5",
|
|
25
23
|
"top-1.5",
|
|
@@ -30,5 +28,5 @@ const t = o([
|
|
|
30
28
|
]);
|
|
31
29
|
export {
|
|
32
30
|
r as buttonCloseVariants,
|
|
33
|
-
|
|
31
|
+
o as modalVariants
|
|
34
32
|
};
|