@konstructio/ui 0.1.2-alpha.22 → 0.1.2-alpha.24
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/components/Dropdown/Dropdown.js +37 -31
- package/dist/components/Dropdown/components/List/List.js +128 -66
- package/dist/components/Dropdown/components/Wrapper.js +136 -135
- package/dist/components/Dropdown/constants/index.js +4 -0
- package/dist/components/Dropdown/constants/pagination.js +4 -0
- package/dist/components/Dropdown/contexts/dropdown.context.js +16 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.js +43 -20
- package/dist/components/Dropdown/hooks/useDropdown.js +72 -31
- package/dist/components/Dropdown/hooks/useNavigationList.js +28 -40
- package/dist/components/VirtualizedTable/VirtualizedTable.js +20 -19
- package/dist/components/VirtualizedTable/components/Body/Body.js +33 -25
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +20 -19
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +46 -31
- package/dist/index.d.ts +18 -2
- package/dist/package.json +17 -17
- package/dist/styles.css +1 -1
- package/dist/utils/index.js +534 -501
- package/package.json +17 -17
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as s, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h } from "react";
|
|
3
|
+
import { cn as o } from "../../utils/index.js";
|
|
4
|
+
import { DropdownProvider as v } from "./contexts/dropdown.provider.js";
|
|
5
|
+
import { Wrapper as N } from "./components/Wrapper.js";
|
|
6
|
+
const W = h(
|
|
6
7
|
({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
c,
|
|
8
|
+
error: t,
|
|
9
|
+
errorClassName: i,
|
|
10
|
+
helperText: r,
|
|
11
|
+
helperTextClassName: m,
|
|
12
|
+
highlightSearch: a,
|
|
13
|
+
mainWrapperClassName: p,
|
|
14
|
+
name: l,
|
|
15
|
+
value: d,
|
|
16
|
+
options: n,
|
|
17
|
+
onChange: c,
|
|
18
|
+
onBlur: e,
|
|
19
|
+
...f
|
|
20
|
+
}, x) => /* @__PURE__ */ s(
|
|
21
|
+
v,
|
|
17
22
|
{
|
|
18
|
-
highlightSearch:
|
|
19
|
-
name:
|
|
20
|
-
value:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
highlightSearch: a,
|
|
24
|
+
name: l,
|
|
25
|
+
value: d,
|
|
26
|
+
options: n,
|
|
27
|
+
onBlur: e,
|
|
28
|
+
onChange: c,
|
|
29
|
+
children: /* @__PURE__ */ w("div", { className: o("relative w-full", p), children: [
|
|
30
|
+
/* @__PURE__ */ s(
|
|
31
|
+
N,
|
|
26
32
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
ref:
|
|
30
|
-
onBlur:
|
|
31
|
-
...
|
|
33
|
+
error: t,
|
|
34
|
+
name: l,
|
|
35
|
+
ref: x,
|
|
36
|
+
onBlur: e,
|
|
37
|
+
...f
|
|
32
38
|
}
|
|
33
39
|
),
|
|
34
|
-
|
|
35
|
-
!
|
|
40
|
+
t ? /* @__PURE__ */ s("span", { className: o("text-xs text-red-700", i), children: t }) : null,
|
|
41
|
+
!t && r ? /* @__PURE__ */ s("span", { className: o("text-xs text-slate-600", m), children: r }) : null
|
|
36
42
|
] })
|
|
37
43
|
}
|
|
38
44
|
)
|
|
39
45
|
);
|
|
40
46
|
export {
|
|
41
|
-
|
|
47
|
+
W as Dropdown
|
|
42
48
|
};
|
|
@@ -1,83 +1,145 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { jsxs as z, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { S as A } from "../../../../index-BtQfgaSF.js";
|
|
3
|
+
import { d as H } from "../../../../debounce-BFejQm9P.js";
|
|
4
|
+
import { forwardRef as V, useRef as y, useState as Z, useImperativeHandle as B, useCallback as G, useEffect as J } from "react";
|
|
5
|
+
import { Loading as K } from "../../../Loading/Loading.js";
|
|
6
|
+
import { cn as i } from "../../../../utils/index.js";
|
|
7
|
+
import { useNavigationUlList as Q } from "../../hooks/useNavigationList.js";
|
|
8
|
+
import { ListItem as L } from "../ListItem/ListItem.js";
|
|
9
|
+
import { listVariants as R } from "./List.variants.js";
|
|
10
|
+
import { DEFAULT_LIST_SIZE as W } from "../../constants/pagination.js";
|
|
11
|
+
import { useDropdownContext as X } from "../../contexts/dropdown.hook.js";
|
|
12
|
+
const ie = V(
|
|
10
13
|
({
|
|
11
|
-
additionalOptions:
|
|
12
|
-
className:
|
|
13
|
-
inputRef:
|
|
14
|
-
isLoading:
|
|
15
|
-
itemClassName:
|
|
16
|
-
name:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
additionalOptions: k,
|
|
15
|
+
className: C,
|
|
16
|
+
inputRef: c,
|
|
17
|
+
isLoading: N,
|
|
18
|
+
itemClassName: f,
|
|
19
|
+
name: F,
|
|
20
|
+
searchable: x = !1,
|
|
21
|
+
listItemSecondRowClassName: u,
|
|
22
|
+
wrapperInputRef: I,
|
|
23
|
+
isInfiniteScrollEnabled: m,
|
|
24
|
+
onFetchMoreOptions: n
|
|
25
|
+
}, j) => {
|
|
26
|
+
const a = y(null), p = y(null), [g, w] = Z(!1), {
|
|
27
|
+
isOpen: E,
|
|
28
|
+
searchTerm: l,
|
|
29
|
+
canFilter: O,
|
|
30
|
+
canContinueFetching: o,
|
|
31
|
+
page: d,
|
|
32
|
+
options: h,
|
|
33
|
+
setOptions: P,
|
|
34
|
+
setPage: S,
|
|
35
|
+
setCanContinueFetching: T
|
|
36
|
+
} = X();
|
|
37
|
+
B(j, () => a.current, [a]);
|
|
38
|
+
const b = x && O ? h.filter((e) => {
|
|
39
|
+
const t = l.toLowerCase();
|
|
40
|
+
return (typeof e.label == "string" ? e.label.toLowerCase() : "").includes(t);
|
|
41
|
+
}) : h;
|
|
42
|
+
Q({
|
|
43
|
+
ulRef: a,
|
|
44
|
+
wrapperInputRef: I,
|
|
45
|
+
searchable: x,
|
|
46
|
+
filteredOptions: b
|
|
30
47
|
});
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
const D = b.filter(
|
|
49
|
+
(e, t, s) => t === s.findIndex((v) => v.value === e.value)
|
|
50
|
+
), U = b.length === 0, _ = G(
|
|
51
|
+
H(async (e) => {
|
|
52
|
+
const [t] = e;
|
|
53
|
+
if (t.isIntersecting)
|
|
54
|
+
try {
|
|
55
|
+
if (n && !g && o) {
|
|
56
|
+
w(!0);
|
|
57
|
+
const s = d + 1, { data: v, hasMore: q } = await n({
|
|
58
|
+
page: s,
|
|
59
|
+
pageSize: W,
|
|
60
|
+
termOfSearch: l
|
|
61
|
+
});
|
|
62
|
+
S(s), T(q), P([...h, ...v]);
|
|
63
|
+
}
|
|
64
|
+
} catch {
|
|
65
|
+
console.error("Error fetching more options");
|
|
66
|
+
} finally {
|
|
67
|
+
w(!1);
|
|
68
|
+
}
|
|
69
|
+
}, 100),
|
|
70
|
+
[d, n, l, o, g]
|
|
71
|
+
);
|
|
72
|
+
return J(() => {
|
|
73
|
+
if (m && o && p.current) {
|
|
74
|
+
const e = new IntersectionObserver(_, {
|
|
75
|
+
threshold: 0.1
|
|
76
|
+
});
|
|
77
|
+
return e.observe(p.current), () => e.disconnect();
|
|
78
|
+
}
|
|
79
|
+
}, [
|
|
80
|
+
d,
|
|
81
|
+
l,
|
|
82
|
+
m,
|
|
83
|
+
n,
|
|
84
|
+
o,
|
|
85
|
+
g
|
|
86
|
+
]), /* @__PURE__ */ z(
|
|
36
87
|
"ul",
|
|
37
88
|
{
|
|
38
|
-
ref:
|
|
39
|
-
title:
|
|
89
|
+
ref: a,
|
|
90
|
+
title: F,
|
|
40
91
|
role: "listbox",
|
|
41
|
-
className:
|
|
42
|
-
"data-state":
|
|
43
|
-
children:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
className: t("select-none", s),
|
|
57
|
-
isClickable: !1,
|
|
58
|
-
inputRef: r,
|
|
59
|
-
value: "No options",
|
|
60
|
-
label: "No options",
|
|
61
|
-
listItemSecondRowClassName: a
|
|
62
|
-
}
|
|
63
|
-
) : /* @__PURE__ */ w(N, { children: [
|
|
64
|
-
f.map((e) => /* @__PURE__ */ l(
|
|
65
|
-
i,
|
|
92
|
+
className: i(R({ className: C })),
|
|
93
|
+
"data-state": E ? "open" : "closed",
|
|
94
|
+
children: [
|
|
95
|
+
N ? /* @__PURE__ */ r(
|
|
96
|
+
L,
|
|
97
|
+
{
|
|
98
|
+
className: i("select-none", f),
|
|
99
|
+
isClickable: !1,
|
|
100
|
+
inputRef: c,
|
|
101
|
+
value: "Loading...",
|
|
102
|
+
label: "Loading...",
|
|
103
|
+
listItemSecondRowClassName: u
|
|
104
|
+
}
|
|
105
|
+
) : U ? /* @__PURE__ */ r(
|
|
106
|
+
L,
|
|
66
107
|
{
|
|
67
|
-
className:
|
|
108
|
+
className: i("select-none", f),
|
|
109
|
+
isClickable: !1,
|
|
110
|
+
inputRef: c,
|
|
111
|
+
value: "No options",
|
|
112
|
+
label: "No options",
|
|
113
|
+
listItemSecondRowClassName: u
|
|
114
|
+
}
|
|
115
|
+
) : D.map((e) => /* @__PURE__ */ r(
|
|
116
|
+
L,
|
|
117
|
+
{
|
|
118
|
+
className: i("select-none", f),
|
|
68
119
|
isClickable: !0,
|
|
69
|
-
inputRef:
|
|
70
|
-
listItemSecondRowClassName:
|
|
120
|
+
inputRef: c,
|
|
121
|
+
listItemSecondRowClassName: u,
|
|
71
122
|
...e
|
|
72
123
|
},
|
|
73
124
|
e.value
|
|
74
125
|
)),
|
|
75
|
-
|
|
76
|
-
|
|
126
|
+
m && o && /* @__PURE__ */ r(
|
|
127
|
+
"li",
|
|
128
|
+
{
|
|
129
|
+
ref: p,
|
|
130
|
+
role: "option",
|
|
131
|
+
"data-action": "true",
|
|
132
|
+
className: "flex items-center justify-center py-3",
|
|
133
|
+
onClick: (e) => e.stopPropagation(),
|
|
134
|
+
children: /* @__PURE__ */ r(K, { className: "w-4 h-4 text-aurora-500 select-none" })
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
k?.map((e, t) => /* @__PURE__ */ r("li", { role: "option", "data-action": "true", children: /* @__PURE__ */ r(A, { className: "flex p-2 w-full h-full gap-1 items-center text-sm [&>svg]:w-3.5 [&>svg]:h-3.5 [&>svg]:shrink-0 cursor-pointer select-none hover:bg-gray-50 hover:dark:bg-slate-700 focus:outline-0", children: e }) }, t))
|
|
138
|
+
]
|
|
77
139
|
}
|
|
78
140
|
);
|
|
79
141
|
}
|
|
80
142
|
);
|
|
81
143
|
export {
|
|
82
|
-
|
|
144
|
+
ie as List
|
|
83
145
|
};
|
|
@@ -1,162 +1,161 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Loading as
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { labelVariants as
|
|
7
|
-
import { useDropdown as
|
|
8
|
-
import { List as
|
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Y, useId as Z, useRef as C, useMemo as ee, useImperativeHandle as te, useEffect as ae } from "react";
|
|
3
|
+
import { Loading as re } from "../../Loading/Loading.js";
|
|
4
|
+
import { Typography as ne } from "../../Typography/Typography.js";
|
|
5
|
+
import { cn as s } from "../../../utils/index.js";
|
|
6
|
+
import { labelVariants as oe, inputVariants as se, dropdownVariants as le } from "../Dropdown.variants.js";
|
|
7
|
+
import { useDropdown as ce } from "../hooks/useDropdown.js";
|
|
8
|
+
import { List as ie } from "./List/List.js";
|
|
9
9
|
import { c as V } from "../../../createLucideIcon-D4r5Phnh.js";
|
|
10
|
-
import { useDropdownContext as
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
import { useDropdownContext as pe } from "../contexts/dropdown.hook.js";
|
|
11
|
+
const ue = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], de = V("chevron-up", ue);
|
|
12
|
+
const fe = [
|
|
13
13
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
14
14
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
15
|
-
],
|
|
15
|
+
], me = V("search", fe), ze = Y(
|
|
16
16
|
({
|
|
17
|
-
additionalOptions:
|
|
18
|
-
className:
|
|
19
|
-
defaultValue:
|
|
20
|
-
disabled:
|
|
21
|
-
error:
|
|
22
|
-
iconClassName:
|
|
23
|
-
inputClassName:
|
|
24
|
-
isLoading:
|
|
25
|
-
isRequired:
|
|
26
|
-
label:
|
|
27
|
-
labelClassName:
|
|
28
|
-
listClassName:
|
|
29
|
-
listItemClassName:
|
|
30
|
-
listItemSecondRowClassName:
|
|
31
|
-
name:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onBlur:
|
|
17
|
+
additionalOptions: R,
|
|
18
|
+
className: _,
|
|
19
|
+
defaultValue: x,
|
|
20
|
+
disabled: a = !1,
|
|
21
|
+
error: u,
|
|
22
|
+
iconClassName: F,
|
|
23
|
+
inputClassName: O,
|
|
24
|
+
isLoading: y,
|
|
25
|
+
isRequired: h,
|
|
26
|
+
label: v,
|
|
27
|
+
labelClassName: T,
|
|
28
|
+
listClassName: $,
|
|
29
|
+
listItemClassName: D,
|
|
30
|
+
listItemSecondRowClassName: E,
|
|
31
|
+
name: d,
|
|
32
|
+
placeholder: N,
|
|
33
|
+
searchable: g = !1,
|
|
34
|
+
showSearchIcon: w,
|
|
35
|
+
theme: M,
|
|
36
|
+
wrapperClassName: W,
|
|
37
|
+
isInfiniteScrollEnabled: H = !1,
|
|
38
|
+
onFetchMoreOptions: P,
|
|
39
|
+
onBlur: U,
|
|
40
|
+
onSearchChange: q,
|
|
40
41
|
...I
|
|
41
|
-
},
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, [n,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
}, A) => {
|
|
43
|
+
const z = Z(), l = C(null), L = C(null), B = C(0), {
|
|
44
|
+
isOpen: f,
|
|
45
|
+
searchTerm: G,
|
|
46
|
+
value: o,
|
|
47
|
+
// canFilter,
|
|
48
|
+
options: n,
|
|
49
|
+
setValue: c,
|
|
50
|
+
setSearchTerm: J,
|
|
51
|
+
setCanFilter: K
|
|
52
|
+
} = pe(), e = ee(() => n.find(({ value: r }) => r === o), [n, o]), { wrapperRef: Q, wrapperInputRef: j, handleOpen: k } = ce({
|
|
53
|
+
ulRef: L,
|
|
54
|
+
inputRef: l,
|
|
55
|
+
disabled: a,
|
|
56
|
+
internalValue: e,
|
|
57
|
+
onBlur: U
|
|
58
|
+
}), i = d ? `${z}-${d}` : z;
|
|
59
|
+
te(A, () => l.current, [l]), ae(() => {
|
|
60
|
+
if (x && !o) {
|
|
61
|
+
const r = n && n.find((p) => p.value === x);
|
|
62
|
+
r && c(r.value);
|
|
55
63
|
}
|
|
56
|
-
}, [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
e.abort();
|
|
63
|
-
};
|
|
64
|
-
}, [K, u, R, j, l]);
|
|
65
|
-
const Q = (e) => {
|
|
66
|
-
const s = e.target.value;
|
|
67
|
-
U?.(s), x(""), R(s || "");
|
|
68
|
-
const d = o.find(
|
|
69
|
-
(S) => S.value.toLocaleLowerCase() === s.toLocaleLowerCase()
|
|
64
|
+
}, [x, n, c, o]);
|
|
65
|
+
const S = (r) => {
|
|
66
|
+
const p = r.target.value;
|
|
67
|
+
K(!0), q?.(p), c(""), J(p || "");
|
|
68
|
+
const b = n.find(
|
|
69
|
+
(X) => X.value.toLocaleLowerCase() === p.toLocaleLowerCase()
|
|
70
70
|
);
|
|
71
|
-
|
|
71
|
+
c(b ? b.value : e?.value ?? "");
|
|
72
72
|
};
|
|
73
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ m(
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
|
-
ref:
|
|
77
|
-
className:
|
|
78
|
-
"data-theme":
|
|
76
|
+
ref: Q,
|
|
77
|
+
className: s("flex flex-col w-full relative", W),
|
|
78
|
+
"data-theme": M,
|
|
79
79
|
children: [
|
|
80
|
-
|
|
80
|
+
v ? /* @__PURE__ */ m(
|
|
81
81
|
"label",
|
|
82
82
|
{
|
|
83
|
-
id:
|
|
84
|
-
className:
|
|
85
|
-
htmlFor:
|
|
86
|
-
onClick: () => !
|
|
83
|
+
id: i,
|
|
84
|
+
className: s(oe({ className: T })),
|
|
85
|
+
htmlFor: i,
|
|
86
|
+
onClick: () => !a && k(),
|
|
87
87
|
children: [
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
v,
|
|
89
|
+
h && /* @__PURE__ */ t("span", { className: "text-red-600 ml-1", children: "*" })
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
) : null,
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ m(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
|
-
ref:
|
|
97
|
-
id:
|
|
98
|
-
className:
|
|
99
|
-
|
|
96
|
+
ref: j,
|
|
97
|
+
id: i,
|
|
98
|
+
className: s(
|
|
99
|
+
le({ className: _, hasError: !!u, disabled: a })
|
|
100
100
|
),
|
|
101
101
|
role: "combobox",
|
|
102
|
-
onClick: () => !
|
|
103
|
-
"aria-expanded":
|
|
104
|
-
tabIndex:
|
|
105
|
-
"aria-labelledby":
|
|
102
|
+
onClick: () => !a && k(),
|
|
103
|
+
"aria-expanded": f,
|
|
104
|
+
tabIndex: B.current,
|
|
105
|
+
"aria-labelledby": i,
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
/* @__PURE__ */ m("div", { className: "flex gap-2.5 items-center flex-1", children: [
|
|
108
|
+
e?.leftIcon && !w && /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center dark:text-slate-50", children: e.leftIcon }),
|
|
109
|
+
w && /* @__PURE__ */ t(me, { className: "w-4 h-4 text-zinc-500 select-none dark:text-slate-300 dark:group-focus-within:text-slate-50 transition-colors duration-300" }),
|
|
110
|
+
g ? /* @__PURE__ */ t(
|
|
111
111
|
"input",
|
|
112
112
|
{
|
|
113
|
-
ref: t,
|
|
114
113
|
type: "text",
|
|
115
|
-
value:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"text-red-700 placeholder:text-red-700": !!m
|
|
114
|
+
value: f ? G : e?.label ?? o ?? "",
|
|
115
|
+
onChange: S,
|
|
116
|
+
placeholder: N,
|
|
117
|
+
className: s(se({ className: O }), {
|
|
118
|
+
"text-red-700 placeholder:text-red-700": !!u
|
|
121
119
|
}),
|
|
122
|
-
onClick: (
|
|
123
|
-
|
|
120
|
+
onClick: (r) => {
|
|
121
|
+
r.stopPropagation(), a || k();
|
|
124
122
|
},
|
|
125
|
-
"aria-label":
|
|
126
|
-
"aria-labelledby":
|
|
127
|
-
required:
|
|
123
|
+
"aria-label": v || N,
|
|
124
|
+
"aria-labelledby": i,
|
|
125
|
+
required: h,
|
|
128
126
|
autoComplete: "off",
|
|
129
127
|
autoCapitalize: "words",
|
|
130
|
-
disabled:
|
|
128
|
+
disabled: a,
|
|
129
|
+
tabIndex: -1,
|
|
131
130
|
...I
|
|
132
131
|
}
|
|
133
|
-
) : /* @__PURE__ */
|
|
134
|
-
|
|
132
|
+
) : /* @__PURE__ */ t(
|
|
133
|
+
ne,
|
|
135
134
|
{
|
|
136
135
|
variant: "body2",
|
|
137
|
-
className:
|
|
136
|
+
className: s(
|
|
138
137
|
"flex-1 text-zinc-400 text-sm dark:text-slate-400",
|
|
139
138
|
{
|
|
140
|
-
"text-red-700": !!
|
|
141
|
-
"select-none": !
|
|
142
|
-
"text-slate-800 dark:text-slate-50":
|
|
143
|
-
"text-slate-400/50 dark:text-slate-50/50":
|
|
139
|
+
"text-red-700": !!u,
|
|
140
|
+
"select-none": !e,
|
|
141
|
+
"text-slate-800 dark:text-slate-50": e,
|
|
142
|
+
"text-slate-400/50 dark:text-slate-50/50": a
|
|
144
143
|
}
|
|
145
144
|
),
|
|
146
|
-
children:
|
|
145
|
+
children: e?.label || N
|
|
147
146
|
}
|
|
148
147
|
)
|
|
149
148
|
] }),
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
y ? /* @__PURE__ */ t(re, { className: "w-4 h-4 text-zinc-500 select-none" }) : !w && /* @__PURE__ */ t(
|
|
150
|
+
de,
|
|
152
151
|
{
|
|
153
|
-
"data-state":
|
|
154
|
-
className:
|
|
152
|
+
"data-state": f ? "open" : "closed",
|
|
153
|
+
className: s(
|
|
155
154
|
"w-4 h-4 text-zinc-500 transition-all duration-100 data-[state=open]:rotate-0 data-[state=closed]:rotate-180 select-none dark:group-focus-within:text-slate-50",
|
|
156
|
-
|
|
155
|
+
F,
|
|
157
156
|
{
|
|
158
|
-
"text-red-700": !!
|
|
159
|
-
"text-slate-400/50 dark:group-focus-within:text-zinc-500":
|
|
157
|
+
"text-red-700": !!u,
|
|
158
|
+
"text-slate-400/50 dark:group-focus-within:text-zinc-500": a
|
|
160
159
|
}
|
|
161
160
|
)
|
|
162
161
|
}
|
|
@@ -164,34 +163,36 @@ const ue = [
|
|
|
164
163
|
]
|
|
165
164
|
}
|
|
166
165
|
),
|
|
167
|
-
|
|
166
|
+
/* @__PURE__ */ t(
|
|
168
167
|
"input",
|
|
169
168
|
{
|
|
170
|
-
ref:
|
|
169
|
+
ref: l,
|
|
171
170
|
type: "text",
|
|
172
|
-
name:
|
|
171
|
+
name: d,
|
|
173
172
|
className: "hidden",
|
|
174
173
|
"aria-hidden": "true",
|
|
175
|
-
required:
|
|
174
|
+
required: h,
|
|
176
175
|
inert: !0,
|
|
176
|
+
defaultValue: e?.value ?? o ?? void 0,
|
|
177
177
|
...I
|
|
178
178
|
}
|
|
179
179
|
),
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
f && /* @__PURE__ */ t(
|
|
181
|
+
ie,
|
|
182
182
|
{
|
|
183
|
-
ref:
|
|
184
|
-
additionalOptions:
|
|
185
|
-
className:
|
|
186
|
-
itemClassName:
|
|
187
|
-
name:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
183
|
+
ref: L,
|
|
184
|
+
additionalOptions: R,
|
|
185
|
+
className: $,
|
|
186
|
+
itemClassName: D,
|
|
187
|
+
name: d,
|
|
188
|
+
wrapperInputRef: j,
|
|
189
|
+
inputRef: l,
|
|
190
|
+
options: n,
|
|
191
|
+
isLoading: !!y,
|
|
192
|
+
searchable: g,
|
|
193
|
+
listItemSecondRowClassName: E,
|
|
194
|
+
isInfiniteScrollEnabled: H,
|
|
195
|
+
onFetchMoreOptions: P
|
|
195
196
|
}
|
|
196
197
|
)
|
|
197
198
|
]
|
|
@@ -200,5 +201,5 @@ const ue = [
|
|
|
200
201
|
}
|
|
201
202
|
);
|
|
202
203
|
export {
|
|
203
|
-
|
|
204
|
+
ze as Wrapper
|
|
204
205
|
};
|