@pismo/marola 2.0.1 → 2.1.0

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