docthub-core-components 3.1.0 → 3.2.2
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/overrides/ui/autocomplete-checkbox.js +377 -366
- package/dist/components/overrides/ui/pickers/date-range-picker-field.js +40 -39
- package/dist/src/components/overrides/ui/autocomplete-checkbox.d.ts +16 -1
- package/dist/src/components/overrides/ui/pickers/date-range-picker-field.d.ts +5 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,480 +1,491 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c as
|
|
4
|
-
import { ChevronDown as
|
|
5
|
-
import { useId as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { Chip as
|
|
8
|
-
import { SearchInput as
|
|
9
|
-
import { DoctButton as
|
|
10
|
-
import { Checkbox as
|
|
11
|
-
import { Input as
|
|
12
|
-
import { TooltipProvider as
|
|
13
|
-
import { useAutocompleteCheckbox as
|
|
14
|
-
import { cn as
|
|
15
|
-
const
|
|
2
|
+
import { jsx as n, jsxs as D } from "react/jsx-runtime";
|
|
3
|
+
import { c as ro } from "react-compiler-runtime";
|
|
4
|
+
import { ChevronDown as to, X as ao } from "lucide-react";
|
|
5
|
+
import { useId as so, useState as co, useEffect as yt, useRef as oo } from "react";
|
|
6
|
+
import { createPortal as bo } from "react-dom";
|
|
7
|
+
import { Chip as go } from "./chips/doct-chip.js";
|
|
8
|
+
import { SearchInput as xo } from "./search/search-input.js";
|
|
9
|
+
import { DoctButton as vo } from "../../ui/button.js";
|
|
10
|
+
import { Checkbox as wo } from "../../ui/checkbox.js";
|
|
11
|
+
import { Input as yo } from "../../ui/input.js";
|
|
12
|
+
import { TooltipProvider as ko, Tooltip as Co, TooltipTrigger as So, TooltipContent as No } from "../../ui/tooltip.js";
|
|
13
|
+
import { useAutocompleteCheckbox as To } from "../../../hooks/useAutocompleteCheckbox.js";
|
|
14
|
+
import { cn as C } from "../../../lib/utils.js";
|
|
15
|
+
const Oo = {
|
|
16
16
|
small: "h-8 text-xs px-2",
|
|
17
17
|
medium: "h-10 text-sm px-3",
|
|
18
18
|
large: "h-12 text-base px-4"
|
|
19
|
-
},
|
|
19
|
+
}, Po = {
|
|
20
20
|
outlined: "border border-input bg-background",
|
|
21
21
|
filled: "border-0 bg-accent",
|
|
22
22
|
standard: "border-0 border-b border-input rounded-none bg-transparent"
|
|
23
|
-
},
|
|
24
|
-
const e =
|
|
23
|
+
}, Io = (Qe) => {
|
|
24
|
+
const e = ro(68), {
|
|
25
25
|
option: r,
|
|
26
|
-
index:
|
|
26
|
+
index: g,
|
|
27
27
|
isSelected: d,
|
|
28
|
-
isHighlighted:
|
|
29
|
-
onSelect:
|
|
28
|
+
isHighlighted: b,
|
|
29
|
+
onSelect: a,
|
|
30
30
|
getOptionLabel: i,
|
|
31
|
-
renderOption:
|
|
32
|
-
freeSolo:
|
|
33
|
-
originalOptions:
|
|
34
|
-
checkboxPosition:
|
|
35
|
-
showChip:
|
|
31
|
+
renderOption: v,
|
|
32
|
+
freeSolo: x,
|
|
33
|
+
originalOptions: S,
|
|
34
|
+
checkboxPosition: N,
|
|
35
|
+
showChip: T,
|
|
36
36
|
checkboxProps: B,
|
|
37
|
-
chipProps:
|
|
38
|
-
checkboxColor:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
chipProps: F,
|
|
38
|
+
checkboxColor: et,
|
|
39
|
+
hideCheckbox: Ue
|
|
40
|
+
} = Qe, Ne = x === void 0 ? !1 : x;
|
|
41
|
+
let ae;
|
|
42
|
+
e[0] !== S ? (ae = S === void 0 ? [] : S, e[0] = S, e[1] = ae) : ae = e[1];
|
|
43
|
+
const Te = ae, Z = Ue === void 0 ? !1 : Ue, $ = oo(null), [Oe, kt] = co(!1);
|
|
44
|
+
let w;
|
|
45
|
+
e[2] !== a || e[3] !== r ? (w = () => {
|
|
46
|
+
a(r);
|
|
47
|
+
}, e[2] = a, e[3] = r, e[4] = w) : w = e[4];
|
|
48
|
+
const Pe = w;
|
|
49
|
+
let ce;
|
|
50
|
+
e[5] !== a || e[6] !== r ? (ce = (p) => {
|
|
51
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), a(r));
|
|
52
|
+
}, e[5] = a, e[6] = r, e[7] = ce) : ce = e[7];
|
|
53
|
+
const Ie = ce;
|
|
54
|
+
let G;
|
|
55
|
+
e[8] !== Ne || e[9] !== i || e[10] !== r || e[11] !== Te ? (G = Ne && typeof r == "string" && !Te.some((p) => i(p).toLowerCase() === r.toLowerCase()), e[8] = Ne, e[9] = i, e[10] = r, e[11] = Te, e[12] = G) : G = e[12];
|
|
56
|
+
const J = G;
|
|
57
|
+
let de;
|
|
58
|
+
e[13] !== i || e[14] !== J || e[15] !== r ? (de = J ? `Add "${i(r)}"` : i(r), e[13] = i, e[14] = J, e[15] = r, e[16] = de) : de = e[16];
|
|
59
|
+
const P = de;
|
|
60
|
+
let Q, ue;
|
|
61
|
+
e[17] === Symbol.for("react.memo_cache_sentinel") ? (Q = () => {
|
|
61
62
|
const p = () => {
|
|
62
63
|
if ($.current) {
|
|
63
|
-
const
|
|
64
|
-
|
|
64
|
+
const Ae = $.current.scrollWidth > $.current.clientWidth;
|
|
65
|
+
kt(Ae);
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
68
|
p();
|
|
68
|
-
const
|
|
69
|
+
const tt = new ResizeObserver(() => {
|
|
69
70
|
p();
|
|
70
71
|
});
|
|
71
|
-
$.current &&
|
|
72
|
-
const
|
|
72
|
+
$.current && tt.observe($.current);
|
|
73
|
+
const m = setTimeout(p, 0);
|
|
73
74
|
return () => {
|
|
74
|
-
|
|
75
|
+
tt.disconnect(), clearTimeout(m);
|
|
75
76
|
};
|
|
76
|
-
},
|
|
77
|
+
}, ue = [], e[17] = Q, e[18] = ue) : (Q = e[17], ue = e[18]), yt(Q, ue);
|
|
78
|
+
let q;
|
|
79
|
+
e[19] !== B ? (q = B ?? {}, e[19] = B, e[20] = q) : q = e[20];
|
|
80
|
+
let K, fe, O, De;
|
|
81
|
+
e[21] !== q ? ({
|
|
82
|
+
className: K,
|
|
83
|
+
tabIndex: De,
|
|
84
|
+
color: fe,
|
|
85
|
+
...O
|
|
86
|
+
} = q, e[21] = q, e[22] = K, e[23] = fe, e[24] = O, e[25] = De) : (K = e[22], fe = e[23], O = e[24], De = e[25]);
|
|
87
|
+
const Ye = fe ?? et, me = De ?? -1, pe = !d && "opacity-20";
|
|
88
|
+
let U;
|
|
89
|
+
e[26] !== K || e[27] !== pe ? (U = C("pointer-events-none border-2 opacity-100 flex items-center justify-center !rounded-sm", pe, K), e[26] = K, e[27] = pe, e[28] = U) : U = e[28];
|
|
90
|
+
let Y;
|
|
91
|
+
e[29] !== O || e[30] !== d || e[31] !== Ye || e[32] !== me || e[33] !== U ? (Y = /* @__PURE__ */ n(wo, { checked: d, tabIndex: me, className: U, color: Ye, ...O }), e[29] = O, e[30] = d, e[31] = Ye, e[32] = me, e[33] = U, e[34] = Y) : Y = e[34];
|
|
92
|
+
const he = Y, Fe = F == null ? void 0 : F.className;
|
|
77
93
|
let L;
|
|
78
|
-
e[
|
|
79
|
-
let
|
|
80
|
-
e[
|
|
81
|
-
className: q,
|
|
82
|
-
tabIndex: Pe,
|
|
83
|
-
color: F,
|
|
84
|
-
...Z
|
|
85
|
-
} = L, e[21] = L, e[22] = q, e[23] = F, e[24] = Z, e[25] = Pe) : (q = e[22], F = e[23], Z = e[24], Pe = e[25]);
|
|
86
|
-
const de = F ?? Qe, ue = Pe ?? -1, Ge = !d && "opacity-20";
|
|
87
|
-
let W;
|
|
88
|
-
e[26] !== q || e[27] !== Ge ? (W = y("pointer-events-none border-2 opacity-100 flex items-center justify-center !rounded-sm", Ge, q), e[26] = q, e[27] = Ge, e[28] = W) : W = e[28];
|
|
89
|
-
let fe;
|
|
90
|
-
e[29] !== Z || e[30] !== d || e[31] !== de || e[32] !== ue || e[33] !== W ? (fe = /* @__PURE__ */ l(po, { checked: d, tabIndex: ue, className: W, color: de, ...Z }), e[29] = Z, e[30] = d, e[31] = de, e[32] = ue, e[33] = W, e[34] = fe) : fe = e[34];
|
|
91
|
-
const me = fe, pe = I == null ? void 0 : I.className;
|
|
92
|
-
let a;
|
|
93
|
-
e[35] !== pe ? (a = y("flex-shrink-0", pe), e[35] = pe, e[36] = a) : a = e[36];
|
|
94
|
-
let G;
|
|
95
|
-
e[37] !== I || e[38] !== a ? (G = {
|
|
94
|
+
e[35] !== Fe ? (L = C("flex-shrink-0", Fe), e[35] = Fe, e[36] = L) : L = e[36];
|
|
95
|
+
let u;
|
|
96
|
+
e[37] !== F || e[38] !== L ? (u = {
|
|
96
97
|
size: "small",
|
|
97
98
|
variant: "soft",
|
|
98
|
-
...
|
|
99
|
-
className:
|
|
100
|
-
}, e[37] =
|
|
101
|
-
const
|
|
102
|
-
let
|
|
103
|
-
e[40] !==
|
|
104
|
-
const
|
|
105
|
-
let
|
|
106
|
-
e[42] !==
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
] }) :
|
|
110
|
-
const
|
|
111
|
-
let
|
|
112
|
-
e[46] !==
|
|
99
|
+
...F,
|
|
100
|
+
className: L
|
|
101
|
+
}, e[37] = F, e[38] = L, e[39] = u) : u = e[39];
|
|
102
|
+
const be = u, _ = N === "left";
|
|
103
|
+
let ee;
|
|
104
|
+
e[40] !== P ? (ee = /* @__PURE__ */ n("span", { ref: $, className: "flex-1 truncate", children: P }), e[40] = P, e[41] = ee) : ee = e[41];
|
|
105
|
+
const H = ee;
|
|
106
|
+
let f;
|
|
107
|
+
e[42] !== Oe || e[43] !== P || e[44] !== H ? (f = Oe ? /* @__PURE__ */ D(Co, { children: [
|
|
108
|
+
/* @__PURE__ */ n(So, { asChild: !0, children: H }),
|
|
109
|
+
/* @__PURE__ */ n(No, { children: /* @__PURE__ */ n("p", { children: P }) })
|
|
110
|
+
] }) : H, e[42] = Oe, e[43] = P, e[44] = H, e[45] = f) : f = e[45];
|
|
111
|
+
const ge = f, te = b ? "bg-accent text-accent-foreground" : "", xe = Z && d && "bg-[#F5F5F5]", oe = J && "italic";
|
|
112
|
+
let W;
|
|
113
|
+
e[46] !== te || e[47] !== xe || e[48] !== oe ? (W = C("px-3 py-2 cursor-pointer flex items-center", "text-sm transition-colors mx-2.5 rounded-md my-0.5 hover:bg-[#F5F5F5]", te, xe, oe), e[46] = te, e[47] = xe, e[48] = oe, e[49] = W) : W = e[49];
|
|
113
114
|
let A;
|
|
114
|
-
e[
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
!
|
|
119
|
-
] }), e[
|
|
115
|
+
e[50] !== he || e[51] !== be || e[52] !== Z || e[53] !== g || e[54] !== _ || e[55] !== r || e[56] !== P || e[57] !== v || e[58] !== T || e[59] !== ge ? (A = v ? v(r, g) : /* @__PURE__ */ D("div", { className: "flex items-center gap-2 w-full", children: [
|
|
116
|
+
!Z && _ && he,
|
|
117
|
+
ge,
|
|
118
|
+
T && /* @__PURE__ */ n(go, { label: P, ...be }),
|
|
119
|
+
!Z && !_ && he
|
|
120
|
+
] }), e[50] = he, e[51] = be, e[52] = Z, e[53] = g, e[54] = _, e[55] = r, e[56] = P, e[57] = v, e[58] = T, e[59] = ge, e[60] = A) : A = e[60];
|
|
120
121
|
let t;
|
|
121
|
-
return e[
|
|
122
|
-
},
|
|
123
|
-
const e =
|
|
122
|
+
return e[61] !== Pe || e[62] !== Ie || e[63] !== g || e[64] !== d || e[65] !== W || e[66] !== A ? (t = /* @__PURE__ */ n("div", { role: "option", "aria-selected": d, tabIndex: 0, onClick: Pe, onKeyDown: Ie, "data-option-index": g, className: W, children: A }), e[61] = Pe, e[62] = Ie, e[63] = g, e[64] = d, e[65] = W, e[66] = A, e[67] = t) : t = e[67], t;
|
|
123
|
+
}, Do = (Qe) => {
|
|
124
|
+
const e = ro(17), {
|
|
124
125
|
tag: r,
|
|
125
|
-
index:
|
|
126
|
+
index: g,
|
|
126
127
|
getOptionLabel: d,
|
|
127
|
-
onRemove:
|
|
128
|
-
} =
|
|
129
|
-
let
|
|
130
|
-
e[0] !==
|
|
131
|
-
|
|
132
|
-
}, e[0] =
|
|
133
|
-
const i =
|
|
128
|
+
onRemove: b
|
|
129
|
+
} = Qe;
|
|
130
|
+
let a;
|
|
131
|
+
e[0] !== b || e[1] !== r ? (a = (F) => {
|
|
132
|
+
F.stopPropagation(), b(r);
|
|
133
|
+
}, e[0] = b, e[1] = r, e[2] = a) : a = e[2];
|
|
134
|
+
const i = a;
|
|
135
|
+
let v;
|
|
136
|
+
e[3] !== d || e[4] !== r ? (v = d(r), e[3] = d, e[4] = r, e[5] = v) : v = e[5];
|
|
134
137
|
let x;
|
|
135
|
-
e[
|
|
136
|
-
|
|
137
|
-
e[6] !== d || e[7] !== r ? (g = d(r), e[6] = d, e[7] = r, e[8] = g) : g = e[8];
|
|
138
|
-
const k = `Remove ${g}`;
|
|
139
|
-
let C;
|
|
140
|
-
e[9] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ l(oo, { className: "h-3 w-3" }), e[9] = C) : C = e[9];
|
|
138
|
+
e[6] !== d || e[7] !== r ? (x = d(r), e[6] = d, e[7] = r, e[8] = x) : x = e[8];
|
|
139
|
+
const S = `Remove ${x}`;
|
|
141
140
|
let N;
|
|
142
|
-
e[
|
|
141
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ n(ao, { className: "h-3 w-3" }), e[9] = N) : N = e[9];
|
|
142
|
+
let T;
|
|
143
|
+
e[10] !== i || e[11] !== S ? (T = /* @__PURE__ */ n("button", { type: "button", onClick: i, className: "ml-1 hover:bg-secondary-foreground/20 rounded-full p-0.5", "aria-label": S, children: N }), e[10] = i, e[11] = S, e[12] = T) : T = e[12];
|
|
143
144
|
let B;
|
|
144
|
-
return e[13] !==
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
] },
|
|
145
|
+
return e[13] !== g || e[14] !== v || e[15] !== T ? (B = /* @__PURE__ */ D("div", { className: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-medium bg-secondary text-secondary-foreground rounded-full", children: [
|
|
146
|
+
v,
|
|
147
|
+
T
|
|
148
|
+
] }, g), e[13] = g, e[14] = v, e[15] = T, e[16] = B) : B = e[16], B;
|
|
148
149
|
};
|
|
149
|
-
function
|
|
150
|
-
const e =
|
|
150
|
+
function jo(Qe) {
|
|
151
|
+
const e = ro(197), {
|
|
151
152
|
options: r,
|
|
152
|
-
dataSource:
|
|
153
|
+
dataSource: g,
|
|
153
154
|
value: d,
|
|
154
|
-
onChange:
|
|
155
|
-
change:
|
|
155
|
+
onChange: b,
|
|
156
|
+
change: a,
|
|
156
157
|
onInputChange: i,
|
|
157
|
-
placeholder:
|
|
158
|
-
label:
|
|
159
|
-
helperText:
|
|
160
|
-
error:
|
|
161
|
-
noOptionsText:
|
|
158
|
+
placeholder: v,
|
|
159
|
+
label: x,
|
|
160
|
+
helperText: S,
|
|
161
|
+
error: N,
|
|
162
|
+
noOptionsText: T,
|
|
162
163
|
emptyMessage: B,
|
|
163
|
-
disabled:
|
|
164
|
-
loading:
|
|
165
|
-
required:
|
|
166
|
-
clearable:
|
|
167
|
-
disableCloseOnSelect:
|
|
168
|
-
freeSolo:
|
|
169
|
-
size:
|
|
170
|
-
variant:
|
|
171
|
-
fullWidth:
|
|
172
|
-
className:
|
|
173
|
-
inputClassName:
|
|
174
|
-
checkboxPosition:
|
|
175
|
-
showChip:
|
|
176
|
-
showTags:
|
|
177
|
-
checkboxProps:
|
|
178
|
-
chipProps:
|
|
179
|
-
checkboxColor:
|
|
180
|
-
showSearch:
|
|
181
|
-
searchPlaceholder:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
let
|
|
205
|
-
e[
|
|
206
|
-
const
|
|
164
|
+
disabled: F,
|
|
165
|
+
loading: et,
|
|
166
|
+
required: Ue,
|
|
167
|
+
clearable: Ne,
|
|
168
|
+
disableCloseOnSelect: ae,
|
|
169
|
+
freeSolo: Te,
|
|
170
|
+
size: Z,
|
|
171
|
+
variant: $,
|
|
172
|
+
fullWidth: Oe,
|
|
173
|
+
className: kt,
|
|
174
|
+
inputClassName: w,
|
|
175
|
+
checkboxPosition: Pe,
|
|
176
|
+
showChip: ce,
|
|
177
|
+
showTags: Ie,
|
|
178
|
+
checkboxProps: G,
|
|
179
|
+
chipProps: J,
|
|
180
|
+
checkboxColor: de,
|
|
181
|
+
showSearch: P,
|
|
182
|
+
searchPlaceholder: Q,
|
|
183
|
+
showScroller: ue,
|
|
184
|
+
multiple: q,
|
|
185
|
+
hideCheckbox: K,
|
|
186
|
+
triggerType: fe,
|
|
187
|
+
triggerButtonLabel: O,
|
|
188
|
+
triggerButtonVariant: De,
|
|
189
|
+
triggerButtonSize: Ye,
|
|
190
|
+
triggerButtonProps: me,
|
|
191
|
+
triggerButtonIcon: pe,
|
|
192
|
+
triggerButtonIconPosition: U,
|
|
193
|
+
portalContainer: Y,
|
|
194
|
+
disablePortal: he,
|
|
195
|
+
dropdownWidth: Fe,
|
|
196
|
+
getOptionLabel: L,
|
|
197
|
+
getOptionValue: u,
|
|
198
|
+
isOptionEqualToValue: be,
|
|
199
|
+
filterOptions: _,
|
|
200
|
+
renderOption: ee,
|
|
201
|
+
renderTags: H,
|
|
202
|
+
limitTags: f,
|
|
203
|
+
fields: ge
|
|
204
|
+
} = Qe;
|
|
205
|
+
let te;
|
|
206
|
+
e[0] !== r ? (te = r === void 0 ? [] : r, e[0] = r, e[1] = te) : te = e[1];
|
|
207
|
+
const xe = te;
|
|
208
|
+
let oe;
|
|
209
|
+
e[2] !== g ? (oe = g === void 0 ? [] : g, e[2] = g, e[3] = oe) : oe = e[3];
|
|
210
|
+
const W = oe;
|
|
207
211
|
let A;
|
|
208
212
|
e[4] !== d ? (A = d === void 0 ? [] : d, e[4] = d, e[5] = A) : A = e[5];
|
|
209
|
-
const t = A, p =
|
|
210
|
-
let _e;
|
|
211
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (_e = () => {
|
|
212
|
-
Tt(!1);
|
|
213
|
-
}, e[6] = _e) : _e = e[6];
|
|
214
|
-
let et;
|
|
215
|
-
e[7] !== t ? (et = [t], e[7] = t, e[8] = et) : et = e[8], xt(_e, et);
|
|
216
|
-
let tt;
|
|
217
|
-
e[9] !== z ? (tt = z ?? [], e[9] = z, e[10] = tt) : tt = e[10];
|
|
218
|
-
const _t = tt;
|
|
213
|
+
const t = A, p = v === void 0 ? "Search..." : v, tt = T === void 0 ? "No options" : T, m = F === void 0 ? !1 : F, Ae = et === void 0 ? !1 : et, Ct = Ue === void 0 ? !1 : Ue, uo = Ne === void 0 ? !0 : Ne, St = ae === void 0 ? !0 : ae, Re = Te === void 0 ? !1 : Te, fo = Z === void 0 ? "medium" : Z, mo = $ === void 0 ? "outlined" : $, lo = Oe === void 0 ? !0 : Oe, Nt = Pe === void 0 ? "right" : Pe, Tt = ce === void 0 ? !1 : ce, po = Ie === void 0 ? !0 : Ie, Ot = de === void 0 ? "#000000" : de, h = P === void 0 ? !1 : P, Pt = ue === void 0 ? !0 : ue, It = q === void 0 ? !0 : q, Dt = K === void 0 ? !1 : K, Ft = fe === void 0 ? "input" : fe, At = he === void 0 ? !1 : he, Be = Fe === void 0 ? "220px" : Fe, ve = so(), [we, Rt] = co(!1);
|
|
219
214
|
let ot;
|
|
220
|
-
e[
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
e[13] !== m || e[14] !== P ? (Re = (o, n) => {
|
|
224
|
-
P == null || P(o, n), m == null || m({
|
|
225
|
-
itemData: n
|
|
226
|
-
});
|
|
227
|
-
}, e[13] = m, e[14] = P, e[15] = Re) : Re = e[15];
|
|
215
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (ot = () => {
|
|
216
|
+
Rt(!1);
|
|
217
|
+
}, e[6] = ot) : ot = e[6];
|
|
228
218
|
let rt;
|
|
229
|
-
e[
|
|
230
|
-
|
|
219
|
+
e[7] !== t ? (rt = [t], e[7] = t, e[8] = rt) : rt = e[8], yt(ot, rt);
|
|
220
|
+
let lt;
|
|
221
|
+
e[9] !== W ? (lt = W ?? [], e[9] = W, e[10] = lt) : lt = e[10];
|
|
222
|
+
const no = lt;
|
|
223
|
+
let nt;
|
|
224
|
+
e[11] !== xe ? (nt = xe ?? [], e[11] = xe, e[12] = nt) : nt = e[12];
|
|
225
|
+
const ho = nt, Le = no.length > 0 ? no : ho;
|
|
226
|
+
let We;
|
|
227
|
+
e[13] !== a || e[14] !== b ? (We = (o, l) => {
|
|
228
|
+
b == null || b(o, l), a == null || a({
|
|
229
|
+
itemData: l
|
|
230
|
+
});
|
|
231
|
+
}, e[13] = a, e[14] = b, e[15] = We) : We = e[15];
|
|
232
|
+
let it;
|
|
233
|
+
e[16] !== St || e[17] !== m || e[18] !== Le || e[19] !== ge || e[20] !== _ || e[21] !== Re || e[22] !== L || e[23] !== u || e[24] !== be || e[25] !== i || e[26] !== We || e[27] !== t ? (it = {
|
|
234
|
+
options: Le,
|
|
231
235
|
value: t,
|
|
232
|
-
onChange:
|
|
236
|
+
onChange: We,
|
|
233
237
|
onInputChange: i,
|
|
234
|
-
disabled:
|
|
235
|
-
disableCloseOnSelect:
|
|
236
|
-
freeSolo:
|
|
237
|
-
getOptionLabel:
|
|
238
|
-
getOptionValue:
|
|
239
|
-
isOptionEqualToValue:
|
|
240
|
-
filterOptions:
|
|
241
|
-
fields:
|
|
242
|
-
}, e[16] =
|
|
238
|
+
disabled: m,
|
|
239
|
+
disableCloseOnSelect: St,
|
|
240
|
+
freeSolo: Re,
|
|
241
|
+
getOptionLabel: L,
|
|
242
|
+
getOptionValue: u,
|
|
243
|
+
isOptionEqualToValue: be,
|
|
244
|
+
filterOptions: _,
|
|
245
|
+
fields: ge
|
|
246
|
+
}, e[16] = St, e[17] = m, e[18] = Le, e[19] = ge, e[20] = _, e[21] = Re, e[22] = L, e[23] = u, e[24] = be, e[25] = i, e[26] = We, e[27] = t, e[28] = it) : it = e[28];
|
|
243
247
|
const {
|
|
244
248
|
open: s,
|
|
245
|
-
inputValue:
|
|
246
|
-
highlightedIndex:
|
|
249
|
+
inputValue: re,
|
|
250
|
+
highlightedIndex: V,
|
|
247
251
|
filteredOptions: j,
|
|
248
|
-
dropdownPosition:
|
|
249
|
-
inputRef:
|
|
250
|
-
listRef:
|
|
251
|
-
containerRef:
|
|
252
|
-
triggerRef:
|
|
253
|
-
setOpen:
|
|
254
|
-
setInputValue:
|
|
255
|
-
handleInputChange:
|
|
256
|
-
handleOptionSelect:
|
|
257
|
-
handleTagRemove:
|
|
258
|
-
handleClear:
|
|
259
|
-
handleKeyDown:
|
|
260
|
-
handleToggle:
|
|
261
|
-
handleFocus:
|
|
262
|
-
isOptionSelected:
|
|
263
|
-
getOptionLabelSafe:
|
|
264
|
-
} =
|
|
265
|
-
let
|
|
252
|
+
dropdownPosition: M,
|
|
253
|
+
inputRef: I,
|
|
254
|
+
listRef: X,
|
|
255
|
+
containerRef: Bt,
|
|
256
|
+
triggerRef: st,
|
|
257
|
+
setOpen: z,
|
|
258
|
+
setInputValue: ye,
|
|
259
|
+
handleInputChange: ke,
|
|
260
|
+
handleOptionSelect: Lt,
|
|
261
|
+
handleTagRemove: le,
|
|
262
|
+
handleClear: Wt,
|
|
263
|
+
handleKeyDown: Ce,
|
|
264
|
+
handleToggle: at,
|
|
265
|
+
handleFocus: ct,
|
|
266
|
+
isOptionSelected: ze,
|
|
267
|
+
getOptionLabelSafe: R
|
|
268
|
+
} = To(it), zt = uo && !m && re !== "" && !h && Ft !== "button";
|
|
269
|
+
let _e;
|
|
266
270
|
e: {
|
|
267
|
-
if (!
|
|
268
|
-
|
|
271
|
+
if (!po || Ft === "button") {
|
|
272
|
+
_e = null;
|
|
269
273
|
break e;
|
|
270
274
|
}
|
|
271
275
|
if (!Array.isArray(t) || t.length === 0) {
|
|
272
|
-
|
|
276
|
+
_e = null;
|
|
273
277
|
break e;
|
|
274
278
|
}
|
|
275
|
-
if (
|
|
279
|
+
if (H) {
|
|
276
280
|
let c;
|
|
277
|
-
e[29] !==
|
|
281
|
+
e[29] !== le || e[30] !== H || e[31] !== t ? (c = H(t, le), e[29] = le, e[30] = H, e[31] = t, e[32] = c) : c = e[32], _e = c;
|
|
278
282
|
break e;
|
|
279
283
|
}
|
|
280
284
|
let o = t;
|
|
281
|
-
if (
|
|
285
|
+
if (f && t.length > f && !we) {
|
|
282
286
|
let c;
|
|
283
|
-
e[33] !==
|
|
287
|
+
e[33] !== f || e[34] !== t ? (c = t.slice(0, f), e[33] = f, e[34] = t, e[35] = c) : c = e[35], o = c;
|
|
284
288
|
}
|
|
285
|
-
let
|
|
286
|
-
e[36] !==
|
|
289
|
+
let l;
|
|
290
|
+
e[36] !== I || e[37] !== i || e[38] !== ye || e[39] !== z ? (l = () => {
|
|
287
291
|
var c;
|
|
288
|
-
|
|
292
|
+
z(!1), ye(""), i == null || i({
|
|
289
293
|
target: {
|
|
290
294
|
value: ""
|
|
291
295
|
}
|
|
292
|
-
}, ""), (c =
|
|
293
|
-
}, e[36] =
|
|
294
|
-
let
|
|
295
|
-
if (e[41] !==
|
|
296
|
+
}, ""), (c = I.current) == null || c.focus();
|
|
297
|
+
}, e[36] = I, e[37] = i, e[38] = ye, e[39] = z, e[40] = l) : l = e[40];
|
|
298
|
+
let y;
|
|
299
|
+
if (e[41] !== R || e[42] !== u || e[43] !== le || e[44] !== o) {
|
|
296
300
|
let c;
|
|
297
|
-
e[46] !==
|
|
301
|
+
e[46] !== R || e[47] !== u || e[48] !== le ? (c = (wt, io) => /* @__PURE__ */ n(Do, { tag: wt, index: io, getOptionLabel: R, onRemove: le }, typeof wt == "string" ? wt : String((u == null ? void 0 : u(wt)) ?? io)), e[46] = R, e[47] = u, e[48] = le, e[49] = c) : c = e[49], y = o.map(c), e[41] = R, e[42] = u, e[43] = le, e[44] = o, e[45] = y;
|
|
298
302
|
} else
|
|
299
|
-
|
|
300
|
-
let
|
|
301
|
-
e[50] !==
|
|
302
|
-
c.stopPropagation(),
|
|
303
|
+
y = e[45];
|
|
304
|
+
let k;
|
|
305
|
+
e[50] !== f || e[51] !== we || e[52] !== t ? (k = f && t.length > f && !we && /* @__PURE__ */ D("button", { type: "button", onClick: (c) => {
|
|
306
|
+
c.stopPropagation(), Rt(!0);
|
|
303
307
|
}, className: "inline-flex items-center px-2.5 py-0.5 text-xs font-medium bg-muted text-muted-foreground rounded-full hover:bg-muted/80 transition-colors cursor-pointer", children: [
|
|
304
308
|
"+",
|
|
305
|
-
t.length -
|
|
309
|
+
t.length - f,
|
|
306
310
|
" more"
|
|
307
|
-
] }), e[50] =
|
|
311
|
+
] }), e[50] = f, e[51] = we, e[52] = t, e[53] = k) : k = e[53];
|
|
308
312
|
let E;
|
|
309
|
-
e[54] !==
|
|
310
|
-
c.stopPropagation(),
|
|
311
|
-
}, className: "inline-flex items-center px-2.5 py-0.5 text-xs font-medium bg-muted text-muted-foreground rounded-full hover:bg-muted/80 transition-colors cursor-pointer", children: "Show less" }), e[54] =
|
|
312
|
-
let
|
|
313
|
-
e[58] !==
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
e[54] !== f || e[55] !== we || e[56] !== t ? (E = f && t.length > f && we && /* @__PURE__ */ n("button", { type: "button", onClick: (c) => {
|
|
314
|
+
c.stopPropagation(), Rt(!1);
|
|
315
|
+
}, className: "inline-flex items-center px-2.5 py-0.5 text-xs font-medium bg-muted text-muted-foreground rounded-full hover:bg-muted/80 transition-colors cursor-pointer", children: "Show less" }), e[54] = f, e[55] = we, e[56] = t, e[57] = E) : E = e[57];
|
|
316
|
+
let Je;
|
|
317
|
+
e[58] !== l || e[59] !== y || e[60] !== k || e[61] !== E ? (Je = /* @__PURE__ */ D("div", { className: "flex flex-wrap gap-1 mb-1", onClick: l, children: [
|
|
318
|
+
y,
|
|
319
|
+
k,
|
|
316
320
|
E
|
|
317
|
-
] }), e[58] =
|
|
321
|
+
] }), e[58] = l, e[59] = y, e[60] = k, e[61] = E, e[62] = Je) : Je = e[62], _e = Je;
|
|
318
322
|
}
|
|
319
|
-
const
|
|
320
|
-
let
|
|
321
|
-
e[63] !==
|
|
322
|
-
const
|
|
323
|
-
let at;
|
|
324
|
-
e[68] !== v || e[69] !== zt ? (at = y("relative inline-flex items-center gap-2", zt, v), e[68] = v, e[69] = zt, e[70] = at) : at = e[70];
|
|
325
|
-
const Et = at, $t = B ?? Ye, Ce = to(), qt = Qt(null), oe = Qt(null);
|
|
326
|
-
let ct, dt;
|
|
327
|
-
e[71] !== s || e[72] !== h ? (ct = () => {
|
|
328
|
-
var o;
|
|
329
|
-
s && h && ((o = qt.current) == null || o.focus());
|
|
330
|
-
}, dt = [s, h], e[71] = s, e[72] = h, e[73] = ct, e[74] = dt) : (ct = e[73], dt = e[74]), xt(ct, dt);
|
|
323
|
+
const Et = _e, ne = Ft === "button", $t = N ? "border border-destructive" : Po[mo], qt = Oo[fo], Kt = m ? "opacity-50 cursor-not-allowed" : "cursor-text";
|
|
324
|
+
let dt;
|
|
325
|
+
e[63] !== w || e[64] !== $t || e[65] !== qt || e[66] !== Kt ? (dt = C("relative flex items-center rounded-md", $t, qt, Kt, "transition-colors", w), e[63] = w, e[64] = $t, e[65] = qt, e[66] = Kt, e[67] = dt) : dt = e[67];
|
|
326
|
+
const Ht = dt, Vt = m ? "opacity-50 cursor-not-allowed" : "cursor-pointer";
|
|
331
327
|
let ut;
|
|
332
|
-
e[
|
|
333
|
-
|
|
334
|
-
var n;
|
|
335
|
-
(n = qt.current) == null || n.focus();
|
|
336
|
-
}, 10);
|
|
337
|
-
}, e[75] = Pt, e[76] = s, e[77] = h, e[78] = ut) : ut = e[78];
|
|
338
|
-
const Kt = ut;
|
|
328
|
+
e[68] !== w || e[69] !== Vt ? (ut = C("relative inline-flex items-center gap-2", Vt, w), e[68] = w, e[69] = Vt, e[70] = ut) : ut = e[70];
|
|
329
|
+
const jt = ut, Mt = B ?? tt, Se = so(), Xt = oo(null), ie = oo(null);
|
|
339
330
|
let ft, mt;
|
|
340
|
-
e[
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
331
|
+
e[71] !== s || e[72] !== h ? (ft = () => {
|
|
332
|
+
var o;
|
|
333
|
+
s && h && ((o = Xt.current) == null || o.focus());
|
|
334
|
+
}, mt = [s, h], e[71] = s, e[72] = h, e[73] = ft, e[74] = mt) : (ft = e[73], mt = e[74]), yt(ft, mt);
|
|
335
|
+
let pt;
|
|
336
|
+
e[75] !== a || e[76] !== Lt || e[77] !== ze || e[78] !== It || e[79] !== b || e[80] !== s || e[81] !== z || e[82] !== h ? (pt = (o) => {
|
|
337
|
+
if (!It) {
|
|
338
|
+
const y = ze(o) ? [] : [o];
|
|
339
|
+
b == null || b(null, y), a == null || a({
|
|
340
|
+
itemData: y
|
|
341
|
+
}), z(!1);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
Lt(o), h && s && setTimeout(() => {
|
|
345
|
+
var l;
|
|
346
|
+
(l = Xt.current) == null || l.focus();
|
|
347
|
+
}, 10);
|
|
348
|
+
}, e[75] = a, e[76] = Lt, e[77] = ze, e[78] = It, e[79] = b, e[80] = s, e[81] = z, e[82] = h, e[83] = pt) : pt = e[83];
|
|
349
|
+
const Zt = pt;
|
|
350
|
+
let ht, bt;
|
|
351
|
+
e[84] !== j.length || e[85] !== V || e[86] !== X || e[87] !== s ? (ht = () => {
|
|
352
|
+
if (!(!s || V < 0 || !X.current) && j.length !== 0 && !(V >= j.length))
|
|
353
|
+
return ie.current !== null && (cancelAnimationFrame(ie.current), ie.current = null), ie.current = requestAnimationFrame(() => {
|
|
354
|
+
if (!X.current)
|
|
344
355
|
return;
|
|
345
|
-
const o =
|
|
356
|
+
const o = X.current.querySelector('div.max-h-60, div[class*="max-h-60"]');
|
|
346
357
|
if (!o)
|
|
347
358
|
return;
|
|
348
|
-
const
|
|
349
|
-
|
|
359
|
+
const l = o.querySelector(`[data-option-index="${V}"]`);
|
|
360
|
+
l && l.scrollIntoView({
|
|
350
361
|
behavior: "auto",
|
|
351
362
|
block: "nearest",
|
|
352
363
|
inline: "nearest"
|
|
353
|
-
}),
|
|
364
|
+
}), ie.current = null;
|
|
354
365
|
}), () => {
|
|
355
|
-
|
|
366
|
+
ie.current !== null && (cancelAnimationFrame(ie.current), ie.current = null);
|
|
356
367
|
};
|
|
357
|
-
},
|
|
358
|
-
let
|
|
368
|
+
}, bt = [V, s, j.length, X], e[84] = j.length, e[85] = V, e[86] = X, e[87] = s, e[88] = ht, e[89] = bt) : (ht = e[88], bt = e[89]), yt(ht, bt);
|
|
369
|
+
let Ee;
|
|
359
370
|
e: {
|
|
360
|
-
if (typeof
|
|
371
|
+
if (typeof O == "function") {
|
|
361
372
|
let o;
|
|
362
|
-
e[
|
|
363
|
-
let
|
|
364
|
-
e[
|
|
373
|
+
e[90] !== t ? (o = t ?? [], e[90] = t, e[91] = o) : o = e[91];
|
|
374
|
+
let l;
|
|
375
|
+
e[92] !== o || e[93] !== O ? (l = O(o), e[92] = o, e[93] = O, e[94] = l) : l = e[94], Ee = l;
|
|
365
376
|
break e;
|
|
366
377
|
}
|
|
367
|
-
if (
|
|
368
|
-
|
|
378
|
+
if (O !== void 0) {
|
|
379
|
+
Ee = O;
|
|
369
380
|
break e;
|
|
370
381
|
}
|
|
371
382
|
if (Array.isArray(t) && t.length > 0) {
|
|
372
383
|
if (t.length === 1) {
|
|
373
384
|
let o;
|
|
374
|
-
e[
|
|
385
|
+
e[95] !== R || e[96] !== t[0] ? (o = R(t[0]), e[95] = R, e[96] = t[0], e[97] = o) : o = e[97], Ee = o;
|
|
375
386
|
break e;
|
|
376
387
|
}
|
|
377
|
-
|
|
388
|
+
Ee = `${t.length} selected`;
|
|
378
389
|
break e;
|
|
379
390
|
}
|
|
380
|
-
|
|
391
|
+
Ee = p;
|
|
381
392
|
}
|
|
382
|
-
const
|
|
383
|
-
let Le;
|
|
384
|
-
e[93] !== de ? (Le = de ?? {}, e[93] = de, e[94] = Le) : Le = e[94];
|
|
385
|
-
let We, ze, pt, re;
|
|
386
|
-
e[95] !== Le ? ({
|
|
387
|
-
onClick: re,
|
|
388
|
-
fullWidth: pt,
|
|
389
|
-
className: ze,
|
|
390
|
-
...We
|
|
391
|
-
} = Le, e[95] = Le, e[96] = We, e[97] = ze, e[98] = pt, e[99] = re) : (We = e[96], ze = e[97], pt = e[98], re = e[99]);
|
|
392
|
-
const jt = Z ?? "outline", Vt = Pe ?? "small", Mt = pt ?? Yt ?? !1, Ee = Ge ?? "right";
|
|
393
|
-
let ht;
|
|
394
|
-
e[100] !== s || e[101] !== Ee || e[102] !== ue ? (ht = ue ?? (Ee === "left" ? /* @__PURE__ */ l(Jt, { className: y("h-4 w-4 transition-transform", s ? "-rotate-180" : "") }) : /* @__PURE__ */ l(Jt, { className: y("h-4 w-4 transition-transform", s ? "rotate-180" : "") })), e[100] = s, e[101] = Ee, e[102] = ue, e[103] = ht) : ht = e[103];
|
|
395
|
-
const Xt = ht, Zt = "w-auto", Gt = te ? "" : Ze;
|
|
393
|
+
const Gt = Ee;
|
|
396
394
|
let $e;
|
|
397
|
-
e[
|
|
398
|
-
let qe;
|
|
399
|
-
e[
|
|
400
|
-
|
|
401
|
-
|
|
395
|
+
e[98] !== me ? ($e = me ?? {}, e[98] = me, e[99] = $e) : $e = e[99];
|
|
396
|
+
let qe, Ke, gt, se;
|
|
397
|
+
e[100] !== $e ? ({
|
|
398
|
+
onClick: se,
|
|
399
|
+
fullWidth: gt,
|
|
400
|
+
className: Ke,
|
|
401
|
+
...qe
|
|
402
|
+
} = $e, e[100] = $e, e[101] = qe, e[102] = Ke, e[103] = gt, e[104] = se) : (qe = e[101], Ke = e[102], gt = e[103], se = e[104]);
|
|
403
|
+
const Jt = De ?? "outline", Qt = Ye ?? "small", Ut = gt ?? lo ?? !1, He = U ?? "right";
|
|
404
|
+
let xt;
|
|
405
|
+
e[105] !== s || e[106] !== He || e[107] !== pe ? (xt = pe ?? (He === "left" ? /* @__PURE__ */ n(to, { className: C("h-4 w-4 transition-transform", s ? "-rotate-180" : "") }) : /* @__PURE__ */ n(to, { className: C("h-4 w-4 transition-transform", s ? "rotate-180" : "") })), e[105] = s, e[106] = He, e[107] = pe, e[108] = xt) : xt = e[108];
|
|
406
|
+
const Yt = xt, _t = "w-auto", eo = ne ? "" : kt;
|
|
407
|
+
let Ve;
|
|
408
|
+
e[109] !== _t || e[110] !== eo ? (Ve = C("relative", _t, eo), e[109] = _t, e[110] = eo, e[111] = Ve) : Ve = e[111];
|
|
409
|
+
let je;
|
|
410
|
+
e[112] !== ve || e[113] !== I || e[114] !== x || e[115] !== i || e[116] !== Ct || e[117] !== ye || e[118] !== z ? (je = x && /* @__PURE__ */ D("label", { htmlFor: ve, className: "block text-sm font-medium mb-1", onClick: (o) => {
|
|
411
|
+
var l;
|
|
412
|
+
o.preventDefault(), z(!1), ye(""), i == null || i({
|
|
402
413
|
target: {
|
|
403
414
|
value: ""
|
|
404
415
|
}
|
|
405
|
-
}, ""), (
|
|
416
|
+
}, ""), (l = I.current) == null || l.focus();
|
|
406
417
|
}, onKeyDown: (o) => {
|
|
407
|
-
var
|
|
408
|
-
(o.key === "Enter" || o.key === " ") && (o.preventDefault(),
|
|
418
|
+
var l;
|
|
419
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), z(!1), ye(""), i == null || i({
|
|
409
420
|
target: {
|
|
410
421
|
value: ""
|
|
411
422
|
}
|
|
412
|
-
}, ""), (
|
|
423
|
+
}, ""), (l = I.current) == null || l.focus());
|
|
413
424
|
}, children: [
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
] }), e[
|
|
417
|
-
let
|
|
418
|
-
e[
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
if (
|
|
425
|
+
x,
|
|
426
|
+
Ct && /* @__PURE__ */ n("span", { className: "text-destructive ml-1", children: "*" })
|
|
427
|
+
] }), e[112] = ve, e[113] = I, e[114] = x, e[115] = i, e[116] = Ct, e[117] = ye, e[118] = z, e[119] = je) : je = e[119];
|
|
428
|
+
let Me;
|
|
429
|
+
e[120] !== jt || e[121] !== Gt || e[122] !== Ht || e[123] !== m || e[124] !== Wt || e[125] !== ct || e[126] !== ke || e[127] !== Ce || e[128] !== at || e[129] !== ve || e[130] !== I || e[131] !== re || e[132] !== ne || e[133] !== Se || e[134] !== Ae || e[135] !== s || e[136] !== p || e[137] !== Ut || e[138] !== Yt || e[139] !== He || e[140] !== Qt || e[141] !== Jt || e[142] !== qe || e[143] !== zt || e[144] !== h || e[145] !== Ke || e[146] !== se || e[147] !== st ? (Me = ne ? /* @__PURE__ */ D("div", { ref: st, className: jt, children: [
|
|
430
|
+
/* @__PURE__ */ n("input", { id: ve, ref: I, value: re, onChange: ke, onKeyDown: Ce, onFocus: ct, "aria-hidden": "true", tabIndex: -1, readOnly: !0, className: "sr-only" }),
|
|
431
|
+
/* @__PURE__ */ n(vo, { variant: Jt, size: Qt, icon: Yt, iconPosition: He, fullWidth: Ut, disabled: m, type: "button", "aria-haspopup": "listbox", "aria-expanded": s, "aria-controls": Se, className: C("hover:bg-transparent active:bg-transparent focus-visible:bg-transparent focus-visible:ring-0", Ke), ...qe, onClick: (o) => {
|
|
432
|
+
if (se == null || se(o), m)
|
|
422
433
|
return;
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
var
|
|
426
|
-
(
|
|
434
|
+
const l = !s;
|
|
435
|
+
at(), l && setTimeout(() => {
|
|
436
|
+
var y;
|
|
437
|
+
(y = I.current) == null || y.focus();
|
|
427
438
|
}, 0);
|
|
428
|
-
}, children:
|
|
429
|
-
|
|
430
|
-
] }) : /* @__PURE__ */
|
|
431
|
-
/* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
/* @__PURE__ */
|
|
439
|
+
}, children: Gt }),
|
|
440
|
+
Ae && /* @__PURE__ */ n("div", { className: "ml-2 animate-spin rounded-full h-4 w-4 border-2 border-muted-foreground border-t-transparent" })
|
|
441
|
+
] }) : /* @__PURE__ */ D("div", { ref: st, className: Ht, children: [
|
|
442
|
+
/* @__PURE__ */ n(yo, { id: ve, ref: I, value: h ? "" : re, onChange: h ? void 0 : ke, onKeyDown: Ce, onFocus: ct, placeholder: p, disabled: m, readOnly: h, className: "px-0 border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent rounded-md", role: "combobox", "aria-expanded": s, "aria-controls": Se, "aria-autocomplete": "list" }),
|
|
443
|
+
/* @__PURE__ */ D("div", { className: "flex items-center gap-1 ml-auto", children: [
|
|
444
|
+
Ae && /* @__PURE__ */ n("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-muted-foreground border-t-transparent" }),
|
|
445
|
+
zt && /* @__PURE__ */ n("button", { type: "button", onClick: Wt, className: "p-1 hover:bg-accent rounded-sm transition-colors", tabIndex: -1, children: /* @__PURE__ */ n(ao, { className: "h-4 w-4 text-muted-foreground" }) }),
|
|
446
|
+
/* @__PURE__ */ n("button", { type: "button", disabled: m, onClick: at, className: C("p-1 hover:bg-accent rounded-sm transition-colors", m ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), tabIndex: -1, "aria-label": s ? "Close options" : "Open options", children: /* @__PURE__ */ n(to, { className: C("h-4 w-4 text-muted-foreground transition-transform", s ? "rotate-180" : "") }) })
|
|
436
447
|
] })
|
|
437
|
-
] }), e[
|
|
438
|
-
let
|
|
439
|
-
e[
|
|
440
|
-
const o =
|
|
441
|
-
const
|
|
448
|
+
] }), e[120] = jt, e[121] = Gt, e[122] = Ht, e[123] = m, e[124] = Wt, e[125] = ct, e[126] = ke, e[127] = Ce, e[128] = at, e[129] = ve, e[130] = I, e[131] = re, e[132] = ne, e[133] = Se, e[134] = Ae, e[135] = s, e[136] = p, e[137] = Ut, e[138] = Yt, e[139] = He, e[140] = Qt, e[141] = Jt, e[142] = qe, e[143] = zt, e[144] = h, e[145] = Ke, e[146] = se, e[147] = st, e[148] = Me) : Me = e[148];
|
|
449
|
+
let Xe;
|
|
450
|
+
e[149] !== Ot || e[150] !== Nt || e[151] !== G || e[152] !== J || e[153] !== At || e[154] !== m || e[155] !== M || e[156] !== Be || e[157] !== Le || e[158] !== j || e[159] !== Re || e[160] !== R || e[161] !== u || e[162] !== ke || e[163] !== Ce || e[164] !== Zt || e[165] !== Dt || e[166] !== V || e[167] !== w || e[168] !== re || e[169] !== ne || e[170] !== ze || e[171] !== x || e[172] !== X || e[173] !== Se || e[174] !== Mt || e[175] !== s || e[176] !== p || e[177] !== Y || e[178] !== ee || e[179] !== Q || e[180] !== Tt || e[181] !== Pt || e[182] !== h ? (Xe = s && (() => {
|
|
451
|
+
const o = M.width > 0 && M.maxHeight > 0, l = /* @__PURE__ */ n(ko, { delayDuration: 0, children: /* @__PURE__ */ D("div", { id: Se, role: "listbox", "aria-label": x || "Options", "data-dialog-interactive-layer": "true", className: C("fixed z-[99999] pointer-events-auto bg-popover border border-border rounded-md shadow-lg", "flex flex-col overflow-hidden", !o && "invisible", w), style: (() => {
|
|
452
|
+
const k = () => ne ? typeof Be == "number" ? `${Be}px` : typeof Be == "string" ? Be : "220px" : M.width;
|
|
442
453
|
return {
|
|
443
|
-
top:
|
|
444
|
-
left:
|
|
445
|
-
minWidth:
|
|
446
|
-
width:
|
|
447
|
-
maxHeight:
|
|
454
|
+
top: M.top,
|
|
455
|
+
left: M.left,
|
|
456
|
+
minWidth: ne ? void 0 : M.width,
|
|
457
|
+
width: k(),
|
|
458
|
+
maxHeight: M.maxHeight,
|
|
448
459
|
zIndex: 99999,
|
|
449
460
|
pointerEvents: "auto"
|
|
450
461
|
};
|
|
451
|
-
})(), ref:
|
|
452
|
-
h && /* @__PURE__ */
|
|
453
|
-
/* @__PURE__ */
|
|
454
|
-
const
|
|
455
|
-
return /* @__PURE__ */
|
|
462
|
+
})(), ref: X, children: [
|
|
463
|
+
h && /* @__PURE__ */ n("div", { className: "p-2 bg-popover", children: /* @__PURE__ */ n(xo, { ref: Xt, query: re, onChange: ke, onKeyDown: Ce, placeholder: Q ?? p, className: "w-full", "aria-label": "Search options", disabled: m, size: "small" }) }),
|
|
464
|
+
/* @__PURE__ */ n("div", { className: C("min-h-0 flex-1 overflow-auto", !h && "py-2", Pt ? ["[scrollbar-gutter:stable]", "[&::-webkit-scrollbar]:w-2", "[&::-webkit-scrollbar-track]:bg-transparent", "[&::-webkit-scrollbar-thumb]:bg-gray-300", "[&::-webkit-scrollbar-thumb]:rounded-full", "[&::-webkit-scrollbar-thumb]:border-0", "[&::-webkit-scrollbar-thumb]:min-h-[30px]", "scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent"] : ["[&::-webkit-scrollbar]:hidden", "[-ms-overflow-style:none]", "[scrollbar-width:none]"]), children: j.length === 0 ? /* @__PURE__ */ n("div", { className: "p-3 text-sm text-muted-foreground text-center", children: Mt }) : j.map((k, E) => {
|
|
465
|
+
const Je = ze(k);
|
|
466
|
+
return /* @__PURE__ */ n(Io, { option: k, index: E, isSelected: Je, isHighlighted: E === V, onSelect: Zt, getOptionLabel: R, renderOption: ee, freeSolo: Re, originalOptions: Le, checkboxPosition: Nt, showChip: Tt, checkboxProps: G, chipProps: J, checkboxColor: Ot, hideCheckbox: Dt }, typeof k == "string" ? k : String((u == null ? void 0 : u(k)) ?? E));
|
|
456
467
|
}) })
|
|
457
468
|
] }) });
|
|
458
|
-
if (
|
|
459
|
-
return
|
|
460
|
-
const
|
|
461
|
-
return
|
|
462
|
-
})(), e[
|
|
463
|
-
let
|
|
464
|
-
e[
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
] }), e[
|
|
469
|
-
let
|
|
470
|
-
e[
|
|
471
|
-
let
|
|
472
|
-
return e[
|
|
473
|
-
qe,
|
|
469
|
+
if (At)
|
|
470
|
+
return l;
|
|
471
|
+
const y = Y ?? document.body;
|
|
472
|
+
return bo(l, y);
|
|
473
|
+
})(), e[149] = Ot, e[150] = Nt, e[151] = G, e[152] = J, e[153] = At, e[154] = m, e[155] = M, e[156] = Be, e[157] = Le, e[158] = j, e[159] = Re, e[160] = R, e[161] = u, e[162] = ke, e[163] = Ce, e[164] = Zt, e[165] = Dt, e[166] = V, e[167] = w, e[168] = re, e[169] = ne, e[170] = ze, e[171] = x, e[172] = X, e[173] = Se, e[174] = Mt, e[175] = s, e[176] = p, e[177] = Y, e[178] = ee, e[179] = Q, e[180] = Tt, e[181] = Pt, e[182] = h, e[183] = Xe) : Xe = e[183];
|
|
474
|
+
let Ze;
|
|
475
|
+
e[184] !== Et || e[185] !== Me || e[186] !== Xe ? (Ze = /* @__PURE__ */ D("div", { className: "relative overflow-visible", children: [
|
|
476
|
+
Et,
|
|
477
|
+
Me,
|
|
478
|
+
Xe
|
|
479
|
+
] }), e[184] = Et, e[185] = Me, e[186] = Xe, e[187] = Ze) : Ze = e[187];
|
|
480
|
+
let Ge;
|
|
481
|
+
e[188] !== N || e[189] !== S ? (Ge = (S || N) && /* @__PURE__ */ n("p", { className: C("mt-1 text-xs", N ? "text-destructive" : "text-muted-foreground"), children: N || S }), e[188] = N, e[189] = S, e[190] = Ge) : Ge = e[190];
|
|
482
|
+
let vt;
|
|
483
|
+
return e[191] !== Bt || e[192] !== Ve || e[193] !== je || e[194] !== Ze || e[195] !== Ge ? (vt = /* @__PURE__ */ D("div", { className: Ve, ref: Bt, children: [
|
|
474
484
|
je,
|
|
475
|
-
|
|
476
|
-
|
|
485
|
+
Ze,
|
|
486
|
+
Ge
|
|
487
|
+
] }), e[191] = Bt, e[192] = Ve, e[193] = je, e[194] = Ze, e[195] = Ge, e[196] = vt) : vt = e[196], vt;
|
|
477
488
|
}
|
|
478
489
|
export {
|
|
479
|
-
|
|
490
|
+
jo as AutocompleteCheckbox
|
|
480
491
|
};
|