@pismo/marola 1.0.0-beta.22 → 1.0.0-beta.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/SelectButton-oWzluvmj.js +63 -0
- package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +277 -277
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
- package/dist/components/Pagination/Pagination.js +26 -33
- package/dist/components/Select/Select.d.ts +6 -0
- package/dist/components/Select/Select.js +391 -358
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Tabs/Tab.d.ts +5 -3
- package/dist/components/Tabs/Tab.js +34 -33
- package/dist/components/Tabs/TabPanel.d.ts +4 -2
- package/dist/components/Tabs/TabPanel.js +48 -38
- package/dist/components/Tabs/Tabs.d.ts +6 -4
- package/dist/components/Tabs/Tabs.js +113 -110
- package/package.json +1 -1
- package/dist/SelectButton-CoOT2txy.js +0 -61
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import '../../assets/Autocomplete.css';
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as le, jsxs as lt } from "react/jsx-runtime";
|
|
3
3
|
import * as h from "react";
|
|
4
|
-
import { useId as
|
|
4
|
+
import { useId as at, useState as ut, createElement as ct } from "react";
|
|
5
5
|
import { Icon as ft } from "../Icon/Icon.js";
|
|
6
6
|
import { Input as dt } from "../Input/Input.js";
|
|
7
|
-
import { b as
|
|
7
|
+
import { b as Ve, s as pt } from "../../useSlotProps-C_I1kEHr.js";
|
|
8
8
|
import { u as gt } from "../../useId-BW-oWmul.js";
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
9
|
+
import { u as Oe } from "../../useControlled-CCMYYdCM.js";
|
|
10
|
+
import { u as ae } from "../../useEventCallback-BAQJJ3ye.js";
|
|
11
11
|
const ht = (c) => {
|
|
12
12
|
const b = h.useRef({});
|
|
13
13
|
return h.useEffect(() => {
|
|
14
14
|
b.current = c;
|
|
15
15
|
}), b.current;
|
|
16
16
|
};
|
|
17
|
-
function
|
|
17
|
+
function Me(c) {
|
|
18
18
|
return typeof c.normalize < "u" ? c.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : c;
|
|
19
19
|
}
|
|
20
20
|
function mt(c = {}) {
|
|
21
21
|
const {
|
|
22
22
|
ignoreAccents: b = !0,
|
|
23
23
|
ignoreCase: g = !0,
|
|
24
|
-
limit:
|
|
25
|
-
matchFrom:
|
|
26
|
-
stringify:
|
|
27
|
-
trim:
|
|
24
|
+
limit: P,
|
|
25
|
+
matchFrom: U = "any",
|
|
26
|
+
stringify: N,
|
|
27
|
+
trim: C = !1
|
|
28
28
|
} = c;
|
|
29
|
-
return (
|
|
30
|
-
inputValue:
|
|
29
|
+
return (v, {
|
|
30
|
+
inputValue: L,
|
|
31
31
|
getOptionLabel: x
|
|
32
32
|
}) => {
|
|
33
|
-
let k =
|
|
34
|
-
g && (k = k.toLowerCase()), b && (k =
|
|
35
|
-
const
|
|
36
|
-
let
|
|
37
|
-
return g && (
|
|
38
|
-
}) :
|
|
39
|
-
return typeof
|
|
33
|
+
let k = C ? L.trim() : L;
|
|
34
|
+
g && (k = k.toLowerCase()), b && (k = Me(k));
|
|
35
|
+
const F = k ? v.filter((j) => {
|
|
36
|
+
let w = (N || x)(j);
|
|
37
|
+
return g && (w = w.toLowerCase()), b && (w = Me(w)), U === "start" ? w.indexOf(k) === 0 : w.indexOf(k) > -1;
|
|
38
|
+
}) : v;
|
|
39
|
+
return typeof P == "number" ? F.slice(0, P) : F;
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ue(c, b) {
|
|
43
43
|
for (let g = 0; g < c.length; g += 1)
|
|
44
44
|
if (b(c[g]))
|
|
45
45
|
return g;
|
|
46
46
|
return -1;
|
|
47
47
|
}
|
|
48
|
-
const bt = mt(),
|
|
48
|
+
const bt = mt(), Re = 5, xt = (c) => {
|
|
49
49
|
var b;
|
|
50
50
|
return c.current !== null && ((b = c.current.parentElement) == null ? void 0 : b.contains(document.activeElement));
|
|
51
51
|
};
|
|
@@ -55,50 +55,50 @@ function yt(c) {
|
|
|
55
55
|
unstable_isActiveElementInListbox: b = xt,
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
57
57
|
unstable_classNamePrefix: g = "Mui",
|
|
58
|
-
autoComplete:
|
|
59
|
-
autoHighlight:
|
|
60
|
-
autoSelect:
|
|
61
|
-
blurOnSelect:
|
|
62
|
-
clearOnBlur:
|
|
63
|
-
clearOnEscape:
|
|
58
|
+
autoComplete: P = !1,
|
|
59
|
+
autoHighlight: U = !1,
|
|
60
|
+
autoSelect: N = !1,
|
|
61
|
+
blurOnSelect: C = !1,
|
|
62
|
+
clearOnBlur: v = !c.freeSolo,
|
|
63
|
+
clearOnEscape: L = !1,
|
|
64
64
|
componentName: x = "useAutocomplete",
|
|
65
65
|
defaultValue: k = c.multiple ? [] : null,
|
|
66
|
-
disableClearable:
|
|
67
|
-
disableCloseOnSelect:
|
|
68
|
-
disabled:
|
|
69
|
-
disabledItemsFocusable:
|
|
70
|
-
disableListWrap:
|
|
71
|
-
filterOptions:
|
|
72
|
-
filterSelectedOptions:
|
|
73
|
-
freeSolo:
|
|
74
|
-
getOptionDisabled:
|
|
75
|
-
getOptionKey:
|
|
76
|
-
getOptionLabel:
|
|
66
|
+
disableClearable: F = !1,
|
|
67
|
+
disableCloseOnSelect: j = !1,
|
|
68
|
+
disabled: w,
|
|
69
|
+
disabledItemsFocusable: ce = !1,
|
|
70
|
+
disableListWrap: K = !1,
|
|
71
|
+
filterOptions: fe = bt,
|
|
72
|
+
filterSelectedOptions: G = !1,
|
|
73
|
+
freeSolo: i = !1,
|
|
74
|
+
getOptionDisabled: m,
|
|
75
|
+
getOptionKey: Q,
|
|
76
|
+
getOptionLabel: z = (t) => {
|
|
77
77
|
var e;
|
|
78
78
|
return (e = t.label) != null ? e : t;
|
|
79
79
|
},
|
|
80
|
-
groupBy:
|
|
81
|
-
handleHomeEndKeys:
|
|
82
|
-
id:
|
|
83
|
-
includeInputInList:
|
|
84
|
-
inputValue:
|
|
85
|
-
isOptionEqualToValue:
|
|
80
|
+
groupBy: E,
|
|
81
|
+
handleHomeEndKeys: Z = !c.freeSolo,
|
|
82
|
+
id: de,
|
|
83
|
+
includeInputInList: Ie = !1,
|
|
84
|
+
inputValue: He,
|
|
85
|
+
isOptionEqualToValue: V = (t, e) => t === e,
|
|
86
86
|
multiple: u = !1,
|
|
87
87
|
onChange: we,
|
|
88
|
-
onClose:
|
|
89
|
-
onHighlightChange:
|
|
90
|
-
onInputChange:
|
|
91
|
-
onOpen:
|
|
92
|
-
open:
|
|
93
|
-
openOnFocus:
|
|
94
|
-
options:
|
|
95
|
-
readOnly:
|
|
96
|
-
selectOnFocus:
|
|
88
|
+
onClose: Se,
|
|
89
|
+
onHighlightChange: ke,
|
|
90
|
+
onInputChange: M,
|
|
91
|
+
onOpen: Ee,
|
|
92
|
+
open: Fe,
|
|
93
|
+
openOnFocus: qe = !1,
|
|
94
|
+
options: pe,
|
|
95
|
+
readOnly: J = !1,
|
|
96
|
+
selectOnFocus: Be = !c.freeSolo,
|
|
97
97
|
value: Ue
|
|
98
|
-
} = c,
|
|
99
|
-
let O =
|
|
98
|
+
} = c, T = gt(de);
|
|
99
|
+
let O = z;
|
|
100
100
|
O = (t) => {
|
|
101
|
-
const e =
|
|
101
|
+
const e = z(t);
|
|
102
102
|
if (typeof e != "string") {
|
|
103
103
|
if (process.env.NODE_ENV !== "production") {
|
|
104
104
|
const n = e === void 0 ? "undefined" : `${typeof e} (${e})`;
|
|
@@ -108,17 +108,17 @@ function yt(c) {
|
|
|
108
108
|
}
|
|
109
109
|
return e;
|
|
110
110
|
};
|
|
111
|
-
const
|
|
111
|
+
const ge = h.useRef(!1), he = h.useRef(!0), d = h.useRef(null), _ = h.useRef(null), [ee, je] = h.useState(null), [$, me] = h.useState(-1), Te = U ? 0 : -1, y = h.useRef(Te), [o, Ke] = Oe({
|
|
112
112
|
controlled: Ue,
|
|
113
113
|
default: k,
|
|
114
114
|
name: x
|
|
115
|
-
}), [a,
|
|
116
|
-
controlled:
|
|
115
|
+
}), [a, te] = Oe({
|
|
116
|
+
controlled: He,
|
|
117
117
|
default: "",
|
|
118
118
|
name: x,
|
|
119
119
|
state: "inputValue"
|
|
120
|
-
}), [
|
|
121
|
-
if (!(u ? o.length < e.length : e !== null) && !
|
|
120
|
+
}), [ne, _e] = h.useState(!1), oe = h.useCallback((t, e) => {
|
|
121
|
+
if (!(u ? o.length < e.length : e !== null) && !v)
|
|
122
122
|
return;
|
|
123
123
|
let r;
|
|
124
124
|
if (u)
|
|
@@ -129,150 +129,150 @@ function yt(c) {
|
|
|
129
129
|
const s = O(e);
|
|
130
130
|
r = typeof s == "string" ? s : "";
|
|
131
131
|
}
|
|
132
|
-
a !== r && (
|
|
133
|
-
}, [O, a, u,
|
|
134
|
-
controlled:
|
|
132
|
+
a !== r && (te(r), M && M(t, r, "reset"));
|
|
133
|
+
}, [O, a, u, M, te, v, o]), [q, $e] = Oe({
|
|
134
|
+
controlled: Fe,
|
|
135
135
|
default: !1,
|
|
136
136
|
name: x,
|
|
137
137
|
state: "open"
|
|
138
|
-
}), [
|
|
139
|
-
|
|
138
|
+
}), [ze, Ae] = h.useState(!0), De = !u && o != null && a === O(o), S = q && !J, f = S ? fe(
|
|
139
|
+
pe.filter((t) => !(G && (u ? o : [o]).some((e) => e !== null && V(t, e)))),
|
|
140
140
|
// we use the empty string to manipulate `filterOptions` to not filter any options
|
|
141
141
|
// i.e. the filter predicate always returns true
|
|
142
142
|
{
|
|
143
|
-
inputValue: De &&
|
|
143
|
+
inputValue: De && ze ? "" : a,
|
|
144
144
|
getOptionLabel: O
|
|
145
145
|
}
|
|
146
|
-
) : [],
|
|
146
|
+
) : [], A = ht({
|
|
147
147
|
filteredOptions: f,
|
|
148
148
|
value: o,
|
|
149
149
|
inputValue: a
|
|
150
150
|
});
|
|
151
151
|
h.useEffect(() => {
|
|
152
|
-
const t = o !==
|
|
153
|
-
|
|
154
|
-
}, [o,
|
|
155
|
-
const
|
|
156
|
-
if (process.env.NODE_ENV !== "production" && o !== null && !
|
|
157
|
-
const t = (u ? o : [o]).filter((e) => !
|
|
152
|
+
const t = o !== A.value;
|
|
153
|
+
ne && !t || i && !t || oe(null, o);
|
|
154
|
+
}, [o, oe, ne, A.value, i]);
|
|
155
|
+
const be = q && f.length > 0 && !J;
|
|
156
|
+
if (process.env.NODE_ENV !== "production" && o !== null && !i && pe.length > 0) {
|
|
157
|
+
const t = (u ? o : [o]).filter((e) => !pe.some((n) => V(n, e)));
|
|
158
158
|
t.length > 0 && console.warn([`MUI: The value provided to ${x} is invalid.`, `None of the options match with \`${t.length > 1 ? JSON.stringify(t) : JSON.stringify(t[0])}\`.`, "You can use the `isOptionEqualToValue` prop to customize the equality test."].join(`
|
|
159
159
|
`));
|
|
160
160
|
}
|
|
161
|
-
const
|
|
162
|
-
t === -1 ? d.current.focus() :
|
|
161
|
+
const re = ae((t) => {
|
|
162
|
+
t === -1 ? d.current.focus() : ee.querySelector(`[data-tag-index="${t}"]`).focus();
|
|
163
163
|
});
|
|
164
164
|
h.useEffect(() => {
|
|
165
|
-
u &&
|
|
166
|
-
}, [o, u,
|
|
167
|
-
function
|
|
168
|
-
if (!
|
|
165
|
+
u && $ > o.length - 1 && (me(-1), re(-1));
|
|
166
|
+
}, [o, u, $, re]);
|
|
167
|
+
function Je(t, e) {
|
|
168
|
+
if (!_.current || t < 0 || t >= f.length)
|
|
169
169
|
return -1;
|
|
170
170
|
let n = t;
|
|
171
171
|
for (; ; ) {
|
|
172
|
-
const r =
|
|
172
|
+
const r = _.current.querySelector(`[data-option-index="${n}"]`), s = ce ? !1 : !r || r.disabled || r.getAttribute("aria-disabled") === "true";
|
|
173
173
|
if (r && r.hasAttribute("tabindex") && !s)
|
|
174
174
|
return n;
|
|
175
175
|
if (e === "next" ? n = (n + 1) % f.length : n = (n - 1 + f.length) % f.length, n === t)
|
|
176
176
|
return -1;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const R = ae(({
|
|
180
180
|
event: t,
|
|
181
181
|
index: e,
|
|
182
182
|
reason: n = "auto"
|
|
183
183
|
}) => {
|
|
184
|
-
if (y.current = e, e === -1 ? d.current.removeAttribute("aria-activedescendant") : d.current.setAttribute("aria-activedescendant", `${
|
|
184
|
+
if (y.current = e, e === -1 ? d.current.removeAttribute("aria-activedescendant") : d.current.setAttribute("aria-activedescendant", `${T}-option-${e}`), ke && ke(t, e === -1 ? null : f[e], n), !_.current)
|
|
185
185
|
return;
|
|
186
|
-
const r =
|
|
186
|
+
const r = _.current.querySelector(`[role="option"].${g}-focused`);
|
|
187
187
|
r && (r.classList.remove(`${g}-focused`), r.classList.remove(`${g}-focusVisible`));
|
|
188
|
-
let s =
|
|
189
|
-
if (
|
|
188
|
+
let s = _.current;
|
|
189
|
+
if (_.current.getAttribute("role") !== "listbox" && (s = _.current.parentElement.querySelector('[role="listbox"]')), !s)
|
|
190
190
|
return;
|
|
191
191
|
if (e === -1) {
|
|
192
192
|
s.scrollTop = 0;
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
const p =
|
|
198
|
-
|
|
195
|
+
const l = _.current.querySelector(`[data-option-index="${e}"]`);
|
|
196
|
+
if (l && (l.classList.add(`${g}-focused`), n === "keyboard" && l.classList.add(`${g}-focusVisible`), s.scrollHeight > s.clientHeight && n !== "mouse" && n !== "touch")) {
|
|
197
|
+
const p = l, I = s.clientHeight + s.scrollTop, ie = p.offsetTop + p.offsetHeight;
|
|
198
|
+
ie > I ? s.scrollTop = ie - s.clientHeight : p.offsetTop - p.offsetHeight * (E ? 1.3 : 0) < s.scrollTop && (s.scrollTop = p.offsetTop - p.offsetHeight * (E ? 1.3 : 0));
|
|
199
199
|
}
|
|
200
|
-
}),
|
|
200
|
+
}), D = ae(({
|
|
201
201
|
event: t,
|
|
202
202
|
diff: e,
|
|
203
203
|
direction: n = "next",
|
|
204
204
|
reason: r = "auto"
|
|
205
205
|
}) => {
|
|
206
|
-
if (!
|
|
206
|
+
if (!S)
|
|
207
207
|
return;
|
|
208
|
-
const
|
|
208
|
+
const l = Je((() => {
|
|
209
209
|
const p = f.length - 1;
|
|
210
210
|
if (e === "reset")
|
|
211
|
-
return
|
|
211
|
+
return Te;
|
|
212
212
|
if (e === "start")
|
|
213
213
|
return 0;
|
|
214
214
|
if (e === "end")
|
|
215
215
|
return p;
|
|
216
216
|
const I = y.current + e;
|
|
217
|
-
return I < 0 ? I === -1 &&
|
|
217
|
+
return I < 0 ? I === -1 && Ie ? -1 : K && y.current !== -1 || Math.abs(e) > 1 ? 0 : p : I > p ? I === p + 1 && Ie ? -1 : K || Math.abs(e) > 1 ? p : 0 : I;
|
|
218
218
|
})(), n);
|
|
219
|
-
if (
|
|
220
|
-
index:
|
|
219
|
+
if (R({
|
|
220
|
+
index: l,
|
|
221
221
|
reason: r,
|
|
222
222
|
event: t
|
|
223
|
-
}),
|
|
224
|
-
if (
|
|
223
|
+
}), P && e !== "reset")
|
|
224
|
+
if (l === -1)
|
|
225
225
|
d.current.value = a;
|
|
226
226
|
else {
|
|
227
|
-
const p = O(f[
|
|
227
|
+
const p = O(f[l]);
|
|
228
228
|
d.current.value = p, p.toLowerCase().indexOf(a.toLowerCase()) === 0 && a.length > 0 && d.current.setSelectionRange(a.length, p.length);
|
|
229
229
|
}
|
|
230
|
-
}),
|
|
230
|
+
}), We = () => {
|
|
231
231
|
const t = (e, n) => {
|
|
232
232
|
const r = e ? O(e) : "", s = n ? O(n) : "";
|
|
233
233
|
return r === s;
|
|
234
234
|
};
|
|
235
|
-
if (y.current !== -1 &&
|
|
236
|
-
const e =
|
|
235
|
+
if (y.current !== -1 && A.filteredOptions && A.filteredOptions.length !== f.length && A.inputValue === a && (u ? o.length === A.value.length && A.value.every((e, n) => O(o[n]) === O(e)) : t(A.value, o))) {
|
|
236
|
+
const e = A.filteredOptions[y.current];
|
|
237
237
|
if (e)
|
|
238
|
-
return
|
|
238
|
+
return ue(f, (n) => O(n) === O(e));
|
|
239
239
|
}
|
|
240
240
|
return -1;
|
|
241
|
-
},
|
|
242
|
-
if (!
|
|
241
|
+
}, xe = h.useCallback(() => {
|
|
242
|
+
if (!S)
|
|
243
243
|
return;
|
|
244
|
-
const t =
|
|
244
|
+
const t = We();
|
|
245
245
|
if (t !== -1) {
|
|
246
246
|
y.current = t;
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
const e = u ? o[0] : o;
|
|
250
250
|
if (f.length === 0 || e == null) {
|
|
251
|
-
|
|
251
|
+
D({
|
|
252
252
|
diff: "reset"
|
|
253
253
|
});
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
|
-
if (
|
|
256
|
+
if (_.current) {
|
|
257
257
|
if (e != null) {
|
|
258
258
|
const n = f[y.current];
|
|
259
|
-
if (u && n &&
|
|
259
|
+
if (u && n && ue(o, (s) => V(n, s)) !== -1)
|
|
260
260
|
return;
|
|
261
|
-
const r =
|
|
262
|
-
r === -1 ?
|
|
261
|
+
const r = ue(f, (s) => V(s, e));
|
|
262
|
+
r === -1 ? D({
|
|
263
263
|
diff: "reset"
|
|
264
|
-
}) :
|
|
264
|
+
}) : R({
|
|
265
265
|
index: r
|
|
266
266
|
});
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
269
|
if (y.current >= f.length - 1) {
|
|
270
|
-
|
|
270
|
+
R({
|
|
271
271
|
index: f.length - 1
|
|
272
272
|
});
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
R({
|
|
276
276
|
index: y.current
|
|
277
277
|
});
|
|
278
278
|
}
|
|
@@ -282,56 +282,56 @@ function yt(c) {
|
|
|
282
282
|
// Don't sync the highlighted index with the value when multiple
|
|
283
283
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
284
284
|
u ? !1 : o,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
285
|
+
G,
|
|
286
|
+
D,
|
|
287
|
+
R,
|
|
288
|
+
S,
|
|
289
289
|
a,
|
|
290
290
|
u
|
|
291
|
-
]),
|
|
292
|
-
pt(
|
|
291
|
+
]), Ye = ae((t) => {
|
|
292
|
+
pt(_, t), t && xe();
|
|
293
293
|
});
|
|
294
294
|
process.env.NODE_ENV !== "production" && h.useEffect(() => {
|
|
295
295
|
(!d.current || d.current.nodeName !== "INPUT") && (d.current && d.current.nodeName === "TEXTAREA" ? console.warn([`A textarea element was provided to ${x} where input was expected.`, "This is not a supported scenario but it may work under certain conditions.", "A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).", "Make sure to test keyboard navigation and add custom event handlers if necessary."].join(`
|
|
296
296
|
`)) : console.error([`MUI: Unable to find the input element. It was resolved to ${d.current} while an HTMLInputElement was expected.`, `Instead, ${x} expects an input element.`, "", x === "useAutocomplete" ? "Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed." : "Make sure you have customized the input component correctly."].join(`
|
|
297
297
|
`)));
|
|
298
298
|
}, [x]), h.useEffect(() => {
|
|
299
|
-
|
|
300
|
-
}, [
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
},
|
|
299
|
+
xe();
|
|
300
|
+
}, [xe]);
|
|
301
|
+
const H = (t) => {
|
|
302
|
+
q || ($e(!0), Ae(!0), Ee && Ee(t));
|
|
303
|
+
}, W = (t, e) => {
|
|
304
|
+
q && ($e(!1), Se && Se(t, e));
|
|
305
|
+
}, B = (t, e, n, r) => {
|
|
306
306
|
if (u) {
|
|
307
|
-
if (o.length === e.length && o.every((s,
|
|
307
|
+
if (o.length === e.length && o.every((s, l) => s === e[l]))
|
|
308
308
|
return;
|
|
309
309
|
} else if (o === e)
|
|
310
310
|
return;
|
|
311
|
-
we && we(t, e, n, r),
|
|
312
|
-
},
|
|
313
|
-
let s = n,
|
|
311
|
+
we && we(t, e, n, r), Ke(e);
|
|
312
|
+
}, se = h.useRef(!1), Y = (t, e, n = "selectOption", r = "options") => {
|
|
313
|
+
let s = n, l = e;
|
|
314
314
|
if (u) {
|
|
315
|
-
if (
|
|
316
|
-
const I =
|
|
315
|
+
if (l = Array.isArray(o) ? o.slice() : [], process.env.NODE_ENV !== "production") {
|
|
316
|
+
const I = l.filter((ie) => V(e, ie));
|
|
317
317
|
I.length > 1 && console.error([`MUI: The \`isOptionEqualToValue\` method of ${x} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${I.length} matches.`].join(`
|
|
318
318
|
`));
|
|
319
319
|
}
|
|
320
|
-
const p =
|
|
321
|
-
p === -1 ?
|
|
320
|
+
const p = ue(l, (I) => V(e, I));
|
|
321
|
+
p === -1 ? l.push(e) : r !== "freeSolo" && (l.splice(p, 1), s = "removeOption");
|
|
322
322
|
}
|
|
323
|
-
|
|
323
|
+
oe(t, l), B(t, l, s, {
|
|
324
324
|
option: e
|
|
325
|
-
}), !
|
|
325
|
+
}), !j && (!t || !t.ctrlKey && !t.metaKey) && W(t, s), (C === !0 || C === "touch" && se.current || C === "mouse" && !se.current) && d.current.blur();
|
|
326
326
|
};
|
|
327
|
-
function
|
|
327
|
+
function Xe(t, e) {
|
|
328
328
|
if (t === -1)
|
|
329
329
|
return -1;
|
|
330
330
|
let n = t;
|
|
331
331
|
for (; ; ) {
|
|
332
332
|
if (e === "next" && n === o.length || e === "previous" && n === -1)
|
|
333
333
|
return -1;
|
|
334
|
-
const r =
|
|
334
|
+
const r = ee.querySelector(`[data-tag-index="${n}"]`);
|
|
335
335
|
if (!r || !r.hasAttribute("tabindex") || r.disabled || r.getAttribute("aria-disabled") === "true")
|
|
336
336
|
n += e === "next" ? 1 : -1;
|
|
337
337
|
else
|
|
@@ -341,16 +341,16 @@ function yt(c) {
|
|
|
341
341
|
const Pe = (t, e) => {
|
|
342
342
|
if (!u)
|
|
343
343
|
return;
|
|
344
|
-
a === "" &&
|
|
345
|
-
let n =
|
|
346
|
-
|
|
344
|
+
a === "" && W(t, "toggleInput");
|
|
345
|
+
let n = $;
|
|
346
|
+
$ === -1 ? a === "" && e === "previous" && (n = o.length - 1) : (n += e === "next" ? 1 : -1, n < 0 && (n = 0), n === o.length && (n = -1)), n = Xe(n, e), me(n), re(n);
|
|
347
347
|
}, Ce = (t) => {
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
-
if (t.onKeyDown && t.onKeyDown(e), !e.defaultMuiPrevented && (
|
|
348
|
+
ge.current = !0, te(""), M && M(t, "", "clear"), B(t, u ? [] : null, "clear");
|
|
349
|
+
}, Ge = (t) => (e) => {
|
|
350
|
+
if (t.onKeyDown && t.onKeyDown(e), !e.defaultMuiPrevented && ($ !== -1 && ["ArrowLeft", "ArrowRight"].indexOf(e.key) === -1 && (me(-1), re(-1)), e.which !== 229))
|
|
351
351
|
switch (e.key) {
|
|
352
352
|
case "Home":
|
|
353
|
-
|
|
353
|
+
S && Z && (e.preventDefault(), D({
|
|
354
354
|
diff: "start",
|
|
355
355
|
direction: "next",
|
|
356
356
|
reason: "keyboard",
|
|
@@ -358,7 +358,7 @@ function yt(c) {
|
|
|
358
358
|
}));
|
|
359
359
|
break;
|
|
360
360
|
case "End":
|
|
361
|
-
|
|
361
|
+
S && Z && (e.preventDefault(), D({
|
|
362
362
|
diff: "end",
|
|
363
363
|
direction: "previous",
|
|
364
364
|
reason: "keyboard",
|
|
@@ -366,36 +366,36 @@ function yt(c) {
|
|
|
366
366
|
}));
|
|
367
367
|
break;
|
|
368
368
|
case "PageUp":
|
|
369
|
-
e.preventDefault(),
|
|
370
|
-
diff: -
|
|
369
|
+
e.preventDefault(), D({
|
|
370
|
+
diff: -Re,
|
|
371
371
|
direction: "previous",
|
|
372
372
|
reason: "keyboard",
|
|
373
373
|
event: e
|
|
374
|
-
}),
|
|
374
|
+
}), H(e);
|
|
375
375
|
break;
|
|
376
376
|
case "PageDown":
|
|
377
|
-
e.preventDefault(),
|
|
378
|
-
diff:
|
|
377
|
+
e.preventDefault(), D({
|
|
378
|
+
diff: Re,
|
|
379
379
|
direction: "next",
|
|
380
380
|
reason: "keyboard",
|
|
381
381
|
event: e
|
|
382
|
-
}),
|
|
382
|
+
}), H(e);
|
|
383
383
|
break;
|
|
384
384
|
case "ArrowDown":
|
|
385
|
-
e.preventDefault(),
|
|
385
|
+
e.preventDefault(), D({
|
|
386
386
|
diff: 1,
|
|
387
387
|
direction: "next",
|
|
388
388
|
reason: "keyboard",
|
|
389
389
|
event: e
|
|
390
|
-
}),
|
|
390
|
+
}), H(e);
|
|
391
391
|
break;
|
|
392
392
|
case "ArrowUp":
|
|
393
|
-
e.preventDefault(),
|
|
393
|
+
e.preventDefault(), D({
|
|
394
394
|
diff: -1,
|
|
395
395
|
direction: "previous",
|
|
396
396
|
reason: "keyboard",
|
|
397
397
|
event: e
|
|
398
|
-
}),
|
|
398
|
+
}), H(e);
|
|
399
399
|
break;
|
|
400
400
|
case "ArrowLeft":
|
|
401
401
|
Pe(e, "previous");
|
|
@@ -404,116 +404,116 @@ function yt(c) {
|
|
|
404
404
|
Pe(e, "next");
|
|
405
405
|
break;
|
|
406
406
|
case "Enter":
|
|
407
|
-
if (y.current !== -1 &&
|
|
408
|
-
const n = f[y.current], r =
|
|
407
|
+
if (y.current !== -1 && S) {
|
|
408
|
+
const n = f[y.current], r = m ? m(n) : !1;
|
|
409
409
|
if (e.preventDefault(), r)
|
|
410
410
|
return;
|
|
411
|
-
|
|
411
|
+
Y(e, n, "selectOption"), P && d.current.setSelectionRange(d.current.value.length, d.current.value.length);
|
|
412
412
|
} else
|
|
413
|
-
|
|
413
|
+
i && a !== "" && De === !1 && (u && e.preventDefault(), Y(e, a, "createOption", "freeSolo"));
|
|
414
414
|
break;
|
|
415
415
|
case "Escape":
|
|
416
|
-
|
|
416
|
+
S ? (e.preventDefault(), e.stopPropagation(), W(e, "escape")) : L && (a !== "" || u && o.length > 0) && (e.preventDefault(), e.stopPropagation(), Ce(e));
|
|
417
417
|
break;
|
|
418
418
|
case "Backspace":
|
|
419
|
-
if (u && !
|
|
420
|
-
const n =
|
|
421
|
-
r.splice(n, 1),
|
|
419
|
+
if (u && !J && a === "" && o.length > 0) {
|
|
420
|
+
const n = $ === -1 ? o.length - 1 : $, r = o.slice();
|
|
421
|
+
r.splice(n, 1), B(e, r, "removeOption", {
|
|
422
422
|
option: o[n]
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
break;
|
|
426
426
|
case "Delete":
|
|
427
|
-
if (u && !
|
|
428
|
-
const n =
|
|
429
|
-
r.splice(n, 1),
|
|
427
|
+
if (u && !J && a === "" && o.length > 0 && $ !== -1) {
|
|
428
|
+
const n = $, r = o.slice();
|
|
429
|
+
r.splice(n, 1), B(e, r, "removeOption", {
|
|
430
430
|
option: o[n]
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
433
|
break;
|
|
434
434
|
}
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
if (b(
|
|
435
|
+
}, Qe = (t) => {
|
|
436
|
+
_e(!0), qe && !ge.current && H(t);
|
|
437
|
+
}, ve = (t) => {
|
|
438
|
+
if (b(_)) {
|
|
439
439
|
d.current.focus();
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
},
|
|
442
|
+
_e(!1), he.current = !0, ge.current = !1, N && y.current !== -1 && S ? Y(t, f[y.current], "blur") : N && i && a !== "" ? Y(t, a, "blur", "freeSolo") : v && oe(t, o), W(t, "blur");
|
|
443
|
+
}, Ze = (t) => {
|
|
444
444
|
const e = t.target.value;
|
|
445
|
-
a !== e && (
|
|
446
|
-
},
|
|
445
|
+
a !== e && (te(e), Ae(!1), M && M(t, e, "input")), e === "" ? !F && !u && B(t, null, "clear") : H(t);
|
|
446
|
+
}, et = (t) => {
|
|
447
447
|
const e = Number(t.currentTarget.getAttribute("data-option-index"));
|
|
448
|
-
y.current !== e &&
|
|
448
|
+
y.current !== e && R({
|
|
449
449
|
event: t,
|
|
450
450
|
index: e,
|
|
451
451
|
reason: "mouse"
|
|
452
452
|
});
|
|
453
|
-
},
|
|
454
|
-
|
|
453
|
+
}, tt = (t) => {
|
|
454
|
+
R({
|
|
455
455
|
event: t,
|
|
456
456
|
index: Number(t.currentTarget.getAttribute("data-option-index")),
|
|
457
457
|
reason: "touch"
|
|
458
|
-
}),
|
|
459
|
-
},
|
|
458
|
+
}), se.current = !0;
|
|
459
|
+
}, nt = (t) => {
|
|
460
460
|
const e = Number(t.currentTarget.getAttribute("data-option-index"));
|
|
461
|
-
|
|
462
|
-
},
|
|
461
|
+
Y(t, f[e], "selectOption"), se.current = !1;
|
|
462
|
+
}, ot = (t) => (e) => {
|
|
463
463
|
const n = o.slice();
|
|
464
|
-
n.splice(t, 1),
|
|
464
|
+
n.splice(t, 1), B(e, n, "removeOption", {
|
|
465
465
|
option: o[t]
|
|
466
466
|
});
|
|
467
|
-
},
|
|
468
|
-
|
|
467
|
+
}, Ne = (t) => {
|
|
468
|
+
q ? W(t, "toggleInput") : H(t);
|
|
469
|
+
}, rt = (t) => {
|
|
470
|
+
t.currentTarget.contains(t.target) && t.target.getAttribute("id") !== T && t.preventDefault();
|
|
469
471
|
}, st = (t) => {
|
|
470
|
-
t.currentTarget.contains(t.target) &&
|
|
472
|
+
t.currentTarget.contains(t.target) && (d.current.focus(), Be && he.current && d.current.selectionEnd - d.current.selectionStart === 0 && d.current.select(), he.current = !1);
|
|
471
473
|
}, it = (t) => {
|
|
472
|
-
|
|
473
|
-
}, lt = (t) => {
|
|
474
|
-
!S && (a === "" || !U) && Le(t);
|
|
474
|
+
!w && (a === "" || !q) && Ne(t);
|
|
475
475
|
};
|
|
476
|
-
let
|
|
477
|
-
|
|
478
|
-
let
|
|
479
|
-
if (
|
|
476
|
+
let ye = i && a.length > 0;
|
|
477
|
+
ye = ye || (u ? o.length > 0 : o !== null);
|
|
478
|
+
let Le = f;
|
|
479
|
+
if (E) {
|
|
480
480
|
const t = /* @__PURE__ */ new Map();
|
|
481
481
|
let e = !1;
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
return n.length > 0 && n[n.length - 1].group ===
|
|
482
|
+
Le = f.reduce((n, r, s) => {
|
|
483
|
+
const l = E(r);
|
|
484
|
+
return n.length > 0 && n[n.length - 1].group === l ? n[n.length - 1].options.push(r) : (process.env.NODE_ENV !== "production" && (t.get(l) && !e && (console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${x} returns duplicated headers.`, "You can solve the issue by sorting the options with the output of `groupBy`."), e = !0), t.set(l, !0)), n.push({
|
|
485
485
|
key: s,
|
|
486
486
|
index: s,
|
|
487
|
-
group:
|
|
487
|
+
group: l,
|
|
488
488
|
options: [r]
|
|
489
489
|
})), n;
|
|
490
490
|
}, []);
|
|
491
491
|
}
|
|
492
|
-
return
|
|
493
|
-
getRootProps: (t = {}) =>
|
|
494
|
-
"aria-owns":
|
|
492
|
+
return w && ne && ve(), {
|
|
493
|
+
getRootProps: (t = {}) => Ve({
|
|
494
|
+
"aria-owns": be ? `${T}-listbox` : null
|
|
495
495
|
}, t, {
|
|
496
|
-
onKeyDown:
|
|
497
|
-
onMouseDown:
|
|
498
|
-
onClick:
|
|
496
|
+
onKeyDown: Ge(t),
|
|
497
|
+
onMouseDown: rt,
|
|
498
|
+
onClick: st
|
|
499
499
|
}),
|
|
500
500
|
getInputLabelProps: () => ({
|
|
501
|
-
id: `${
|
|
502
|
-
htmlFor:
|
|
501
|
+
id: `${T}-label`,
|
|
502
|
+
htmlFor: T
|
|
503
503
|
}),
|
|
504
504
|
getInputProps: () => ({
|
|
505
|
-
id:
|
|
505
|
+
id: T,
|
|
506
506
|
value: a,
|
|
507
|
-
onBlur:
|
|
508
|
-
onFocus:
|
|
509
|
-
onChange:
|
|
510
|
-
onMouseDown:
|
|
507
|
+
onBlur: ve,
|
|
508
|
+
onFocus: Qe,
|
|
509
|
+
onChange: Ze,
|
|
510
|
+
onMouseDown: it,
|
|
511
511
|
// if open then this is handled imperatively so don't let react override
|
|
512
512
|
// only have an opinion about this when closed
|
|
513
|
-
"aria-activedescendant":
|
|
514
|
-
"aria-autocomplete":
|
|
515
|
-
"aria-controls":
|
|
516
|
-
"aria-expanded":
|
|
513
|
+
"aria-activedescendant": S ? "" : null,
|
|
514
|
+
"aria-autocomplete": P ? "both" : "list",
|
|
515
|
+
"aria-controls": be ? `${T}-listbox` : void 0,
|
|
516
|
+
"aria-expanded": be,
|
|
517
517
|
// Disable browser's suggestion that might overlap with the popup.
|
|
518
518
|
// Handle autocomplete but not autofill.
|
|
519
519
|
autoComplete: "off",
|
|
@@ -521,7 +521,7 @@ function yt(c) {
|
|
|
521
521
|
autoCapitalize: "none",
|
|
522
522
|
spellCheck: "false",
|
|
523
523
|
role: "combobox",
|
|
524
|
-
disabled:
|
|
524
|
+
disabled: w
|
|
525
525
|
}),
|
|
526
526
|
getClearProps: () => ({
|
|
527
527
|
tabIndex: -1,
|
|
@@ -531,22 +531,22 @@ function yt(c) {
|
|
|
531
531
|
getPopupIndicatorProps: () => ({
|
|
532
532
|
tabIndex: -1,
|
|
533
533
|
type: "button",
|
|
534
|
-
onClick:
|
|
534
|
+
onClick: Ne
|
|
535
535
|
}),
|
|
536
536
|
getTagProps: ({
|
|
537
537
|
index: t
|
|
538
|
-
}) =>
|
|
538
|
+
}) => Ve({
|
|
539
539
|
key: t,
|
|
540
540
|
"data-tag-index": t,
|
|
541
541
|
tabIndex: -1
|
|
542
|
-
}, !
|
|
543
|
-
onDelete:
|
|
542
|
+
}, !J && {
|
|
543
|
+
onDelete: ot(t)
|
|
544
544
|
}),
|
|
545
545
|
getListboxProps: () => ({
|
|
546
546
|
role: "listbox",
|
|
547
|
-
id: `${
|
|
548
|
-
"aria-labelledby": `${
|
|
549
|
-
ref:
|
|
547
|
+
id: `${T}-listbox`,
|
|
548
|
+
"aria-labelledby": `${T}-label`,
|
|
549
|
+
ref: Ye,
|
|
550
550
|
onMouseDown: (t) => {
|
|
551
551
|
t.preventDefault();
|
|
552
552
|
}
|
|
@@ -556,105 +556,105 @@ function yt(c) {
|
|
|
556
556
|
option: e
|
|
557
557
|
}) => {
|
|
558
558
|
var n;
|
|
559
|
-
const r = (u ? o : [o]).some((
|
|
559
|
+
const r = (u ? o : [o]).some((l) => l != null && V(e, l)), s = m ? m(e) : !1;
|
|
560
560
|
return {
|
|
561
|
-
key: (n =
|
|
561
|
+
key: (n = Q == null ? void 0 : Q(e)) != null ? n : O(e),
|
|
562
562
|
tabIndex: -1,
|
|
563
563
|
role: "option",
|
|
564
|
-
id: `${
|
|
565
|
-
onMouseMove:
|
|
566
|
-
onClick:
|
|
567
|
-
onTouchStart:
|
|
564
|
+
id: `${T}-option-${t}`,
|
|
565
|
+
onMouseMove: et,
|
|
566
|
+
onClick: nt,
|
|
567
|
+
onTouchStart: tt,
|
|
568
568
|
"data-option-index": t,
|
|
569
569
|
"aria-disabled": s,
|
|
570
570
|
"aria-selected": r
|
|
571
571
|
};
|
|
572
572
|
},
|
|
573
|
-
id:
|
|
573
|
+
id: T,
|
|
574
574
|
inputValue: a,
|
|
575
575
|
value: o,
|
|
576
|
-
dirty:
|
|
577
|
-
expanded:
|
|
578
|
-
popupOpen:
|
|
579
|
-
focused:
|
|
580
|
-
anchorEl:
|
|
576
|
+
dirty: ye,
|
|
577
|
+
expanded: S && ee,
|
|
578
|
+
popupOpen: S,
|
|
579
|
+
focused: ne || $ !== -1,
|
|
580
|
+
anchorEl: ee,
|
|
581
581
|
setAnchorEl: je,
|
|
582
|
-
focusedTag:
|
|
583
|
-
groupedOptions:
|
|
582
|
+
focusedTag: $,
|
|
583
|
+
groupedOptions: Le
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
const Ot = "_autocomplete_pfc9v_1",
|
|
586
|
+
const Ot = "_autocomplete_pfc9v_1", X = {
|
|
587
587
|
autocomplete: Ot,
|
|
588
588
|
"autocomplete__dropdown-list": "_autocomplete__dropdown-list_pfc9v_5",
|
|
589
589
|
"autocomplete__dropdown-item": "_autocomplete__dropdown-item_pfc9v_17",
|
|
590
590
|
"option-focused": "_option-focused_pfc9v_26"
|
|
591
|
-
},
|
|
591
|
+
}, At = ({
|
|
592
592
|
labelKey: c,
|
|
593
593
|
valueKey: b,
|
|
594
594
|
options: g,
|
|
595
|
-
type:
|
|
596
|
-
value:
|
|
597
|
-
onChange:
|
|
598
|
-
onInputChange:
|
|
599
|
-
"data-testid-wrapper":
|
|
600
|
-
...
|
|
595
|
+
type: P,
|
|
596
|
+
value: U,
|
|
597
|
+
onChange: N,
|
|
598
|
+
onInputChange: C,
|
|
599
|
+
"data-testid-wrapper": v,
|
|
600
|
+
...L
|
|
601
601
|
}) => {
|
|
602
|
-
const x =
|
|
603
|
-
g != null && g.some((
|
|
602
|
+
const x = at(), [k, F] = ut("");
|
|
603
|
+
g != null && g.some((i) => typeof i != "string") && (!c || !b) && console.error(
|
|
604
604
|
'[autocomplete] When options is a list of objects, you must provide the "labelKey" and "valueKey" parameters.'
|
|
605
605
|
);
|
|
606
|
-
const { getRootProps:
|
|
606
|
+
const { getRootProps: j, getInputProps: w, getOptionProps: ce, groupedOptions: K, getListboxProps: fe } = yt({
|
|
607
607
|
id: `autocomplete_${x}`,
|
|
608
608
|
options: g,
|
|
609
|
-
getOptionLabel: (
|
|
610
|
-
value:
|
|
611
|
-
inputValue:
|
|
612
|
-
isOptionEqualToValue: (
|
|
613
|
-
onChange: (
|
|
614
|
-
|
|
609
|
+
getOptionLabel: (i) => typeof i == "string" ? i : String(i[c || "label"]),
|
|
610
|
+
value: U,
|
|
611
|
+
inputValue: k,
|
|
612
|
+
isOptionEqualToValue: (i, m) => typeof i == "string" ? String(i) === String(m) : String(i[b || "id"]) === String(m[b || "id"]),
|
|
613
|
+
onChange: (i, m) => {
|
|
614
|
+
N && N(i, m);
|
|
615
615
|
},
|
|
616
|
-
onInputChange: (
|
|
617
|
-
|
|
616
|
+
onInputChange: (i, m) => {
|
|
617
|
+
C && C(i, m), F(m);
|
|
618
618
|
},
|
|
619
|
-
onHighlightChange: (
|
|
620
|
-
var
|
|
621
|
-
if (
|
|
622
|
-
const
|
|
623
|
-
|
|
619
|
+
onHighlightChange: (i, m, Q) => {
|
|
620
|
+
var z;
|
|
621
|
+
if (Q === "keyboard") {
|
|
622
|
+
const E = document.querySelector("#autocomplete-list"), Z = (i == null ? void 0 : i.target).getAttribute("aria-activedescendant");
|
|
623
|
+
E == null || E.querySelectorAll("li").forEach((de) => de.classList.remove(X["option-focused"])), (z = E == null ? void 0 : E.querySelector(`[id="${Z}"]`)) == null || z.classList.add(X["option-focused"]);
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
}),
|
|
627
|
-
...
|
|
628
|
-
...
|
|
626
|
+
}), G = {
|
|
627
|
+
...w(),
|
|
628
|
+
...L
|
|
629
629
|
};
|
|
630
|
-
return /* @__PURE__ */
|
|
631
|
-
/* @__PURE__ */
|
|
630
|
+
return /* @__PURE__ */ le("div", { className: X.autocomplete, "data-testid": v, children: /* @__PURE__ */ lt("div", { ...j(), children: [
|
|
631
|
+
/* @__PURE__ */ le(
|
|
632
632
|
dt,
|
|
633
633
|
{
|
|
634
|
-
rightIcon:
|
|
635
|
-
...
|
|
634
|
+
rightIcon: P === "search" && /* @__PURE__ */ le(ft, { color: "var(--accent)", icon: "magnifying-glass" }),
|
|
635
|
+
...G
|
|
636
636
|
}
|
|
637
637
|
),
|
|
638
|
-
|
|
638
|
+
K.length > 0 && !L.disabled && /* @__PURE__ */ le(
|
|
639
639
|
"ul",
|
|
640
640
|
{
|
|
641
|
-
...
|
|
641
|
+
...fe(),
|
|
642
642
|
id: "autocomplete-list",
|
|
643
|
-
className:
|
|
644
|
-
children:
|
|
643
|
+
className: X["autocomplete__dropdown-list"],
|
|
644
|
+
children: K.map((i, m) => /* @__PURE__ */ ct(
|
|
645
645
|
"li",
|
|
646
646
|
{
|
|
647
647
|
tabIndex: m,
|
|
648
|
-
className:
|
|
649
|
-
...
|
|
648
|
+
className: X["autocomplete__dropdown-item"],
|
|
649
|
+
...ce({ option: i, index: m }),
|
|
650
650
|
key: String(m)
|
|
651
651
|
},
|
|
652
|
-
typeof
|
|
652
|
+
typeof i == "string" ? i : String(i[c || "label"])
|
|
653
653
|
))
|
|
654
654
|
}
|
|
655
655
|
)
|
|
656
656
|
] }) });
|
|
657
657
|
};
|
|
658
658
|
export {
|
|
659
|
-
|
|
659
|
+
At as Autocomplete
|
|
660
660
|
};
|