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