@sito/dashboard 0.0.71 → 0.0.73

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.
@@ -1,67 +1,67 @@
1
1
  import "./SelectInput.css";
2
- import { jsxs as T, jsx as a, Fragment as Y } from "react/jsx-runtime";
3
- import { forwardRef as K, useState as F, useEffect as O, useMemo as j, useRef as W, useCallback as $, useLayoutEffect as Z } from "react";
2
+ import { jsxs as L, jsx as a, Fragment as Y } from "react/jsx-runtime";
3
+ import { forwardRef as U, useState as F, useEffect as R, useMemo as j, useRef as K, useCallback as A, useLayoutEffect as Z } from "react";
4
4
  import { C as M } from "./Chip-C5ogKbFn.js";
5
5
  import { I as ee } from "./IconButton-BpsTEj0z.js";
6
6
  import { C as te } from "./Close-rKC9AcNX.js";
7
- const ie = K(function(l, h) {
7
+ const ie = U(function(l, h) {
8
8
  const {
9
9
  state: p,
10
10
  value: t,
11
11
  onChange: r,
12
- options: b = [],
13
- name: A = "",
14
- id: k = "",
15
- label: v = "",
16
- containerClassName: S = "",
17
- inputContainerClassName: x = "",
18
- helperText: D = "",
19
- placeholder: L = "",
12
+ options: k = [],
13
+ name: S = "",
14
+ id: $ = "",
15
+ label: x = "",
16
+ containerClassName: D = "",
17
+ inputContainerClassName: w = "",
18
+ helperText: I = "",
19
+ placeholder: B = "",
20
20
  multiple: d = !1,
21
- ...I
22
- } = l, [u, m] = F("");
23
- O(() => {
21
+ ...E
22
+ } = l, [i, m] = F("");
23
+ R(() => {
24
24
  if (!d && t && !Array.isArray(t)) {
25
25
  m(String(t.value ?? t.name ?? ""));
26
26
  return;
27
27
  }
28
28
  m("");
29
29
  }, [d, t]);
30
- const [f, g] = F(!1), [C, y] = F(-1), o = j(
31
- () => b.filter((e) => {
32
- const n = String(e.value ?? e.name).toLowerCase().includes(u?.toLowerCase());
33
- return Array.isArray(t) && t.length ? n && !t.some((c) => c.id === e.id) : t && !Array.isArray(t) ? n && t.id !== e.id : n;
30
+ const [f, g] = F(!1), [C, y] = F(-1), s = j(
31
+ () => k.filter((e) => {
32
+ const n = String(e.value ?? e.name).toLowerCase().includes(i?.toLowerCase());
33
+ return Array.isArray(t) && t.length ? n && !t.some((u) => u.id === e.id) : t && !Array.isArray(t) ? n && t.id !== e.id : n;
34
34
  }),
35
- [b, t, u]
35
+ [k, t, i]
36
36
  );
37
- O(() => {
38
- if (!f || !o.length) {
37
+ R(() => {
38
+ if (!f || !s.length) {
39
39
  y(-1);
40
40
  return;
41
41
  }
42
42
  y(0);
43
- }, [f, o]);
44
- const i = W(null), N = W(null), [E, w] = F(!1), s = W(null);
45
- O(() => {
46
- const e = (c) => {
47
- i.current && !i.current.contains(c.target) && g(!1);
48
- }, n = (c) => {
49
- c.key === "Escape" && g(!1);
43
+ }, [f, s]);
44
+ const c = K(null), N = K(null), [T, b] = F(!1), o = K(null);
45
+ R(() => {
46
+ const e = (u) => {
47
+ c.current && !c.current.contains(u.target) && g(!1);
48
+ }, n = (u) => {
49
+ u.key === "Escape" && g(!1);
50
50
  };
51
51
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", n), () => {
52
52
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", n);
53
53
  };
54
54
  }, []);
55
- const R = $((e) => {
55
+ const v = A((e) => {
56
56
  m(e.target.value);
57
- }, []), B = $(
57
+ }, []), H = A(
58
58
  (e) => {
59
59
  e ? d ? (m(""), Array.isArray(t) && t.length ? r([...t, e]) : r([e])) : (m(String(e.name ?? e.value ?? "")), r(e)) : r(null), g(!1);
60
60
  },
61
61
  [d, r, t]
62
- ), P = $(
62
+ ), P = A(
63
63
  (e) => {
64
- if (!o.length) {
64
+ if (!s.length) {
65
65
  e.key === "Escape" && g(!1);
66
66
  return;
67
67
  }
@@ -71,83 +71,83 @@ const ie = K(function(l, h) {
71
71
  return;
72
72
  }
73
73
  y((n) => {
74
- const c = n >= 0 ? n : 0;
75
- return e.key === "ArrowDown" ? (c + 1 + o.length) % o.length : (c - 1 + o.length) % o.length;
74
+ const u = n >= 0 ? n : 0;
75
+ return e.key === "ArrowDown" ? (u + 1 + s.length) % s.length : (u - 1 + s.length) % s.length;
76
76
  });
77
77
  return;
78
78
  }
79
79
  if (e.key === "Enter" && f) {
80
80
  e.preventDefault();
81
81
  const n = C >= 0 ? C : 0;
82
- B(o[n]);
82
+ H(s[n]);
83
83
  return;
84
84
  }
85
85
  e.key === "Escape" && f && (e.preventDefault(), g(!1));
86
86
  },
87
87
  [
88
- B,
88
+ H,
89
89
  C,
90
90
  f,
91
- o
91
+ s
92
92
  ]
93
- ), H = $(
93
+ ), O = A(
94
94
  (e) => {
95
95
  if (!Array.isArray(t)) {
96
96
  r(null);
97
97
  return;
98
98
  }
99
- const n = t.filter((c, z) => z !== e);
99
+ const n = t.filter((u, z) => z !== e);
100
100
  n.length ? r(n) : r(null);
101
101
  },
102
102
  [r, t]
103
- ), V = $(() => {
103
+ ), V = A(() => {
104
104
  Array.isArray(t) && r([t[0]]);
105
105
  }, [r, t]);
106
106
  return Z(() => {
107
- const e = s.current?.offsetWidth ?? 0, n = i.current?.offsetWidth ?? 0;
108
- w(e > n * 0.4);
109
- }, [t]), /* @__PURE__ */ T(
107
+ const e = o.current?.offsetWidth ?? 0, n = c.current?.offsetWidth ?? 0;
108
+ b(e > n * 0.4);
109
+ }, [t]), /* @__PURE__ */ L(
110
110
  "div",
111
111
  {
112
- className: `autocomplete-input-container ${S}`,
113
- ref: i,
112
+ className: `autocomplete-input-container ${D}`,
113
+ ref: c,
114
114
  children: [
115
- /* @__PURE__ */ T("div", { className: "autocomplete-value-input-container", children: [
115
+ /* @__PURE__ */ L("div", { className: "autocomplete-value-input-container", children: [
116
116
  /* @__PURE__ */ a(
117
117
  Q,
118
118
  {
119
119
  state: p,
120
- name: A,
121
- id: k,
122
- value: u,
123
- onChange: R,
124
- placeholder: L,
125
- helperText: D,
120
+ name: S,
121
+ id: $,
122
+ value: i,
123
+ onChange: v,
124
+ placeholder: B,
125
+ helperText: I,
126
126
  onFocus: () => g(!0),
127
127
  onKeyDown: P,
128
- label: v,
129
- containerClassName: `autocomplete-text-input ${x}`,
128
+ label: x,
129
+ containerClassName: `autocomplete-text-input ${w}`,
130
130
  ref: h ?? N,
131
- ...I,
131
+ ...E,
132
132
  children: !d && t && !Array.isArray(t) && (t.value || t.name) && /* @__PURE__ */ a(
133
133
  ee,
134
134
  {
135
135
  icon: /* @__PURE__ */ a(te, {}),
136
136
  className: "autocomplete-delete-button",
137
137
  onClick: (e) => {
138
- B(), e.stopPropagation();
138
+ H(), e.stopPropagation();
139
139
  }
140
140
  }
141
141
  )
142
142
  }
143
143
  ),
144
- d && Array.isArray(t) && t.length ? /* @__PURE__ */ a("ul", { ref: s, className: "autocomplete-value-container", children: E ? /* @__PURE__ */ T(Y, { children: [
144
+ d && Array.isArray(t) && t.length ? /* @__PURE__ */ a("ul", { ref: o, className: "autocomplete-value-container", children: T ? /* @__PURE__ */ L(Y, { children: [
145
145
  /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
146
146
  M,
147
147
  {
148
148
  text: t[0]?.value ?? t[0]?.name,
149
149
  onDelete: (e) => {
150
- H(0), e.stopPropagation();
150
+ O(0), e.stopPropagation();
151
151
  }
152
152
  }
153
153
  ) }),
@@ -164,8 +164,8 @@ const ie = K(function(l, h) {
164
164
  M,
165
165
  {
166
166
  text: String(e.value ?? e.name),
167
- onDelete: (c) => {
168
- H(n), c.stopPropagation();
167
+ onDelete: (u) => {
168
+ O(n), u.stopPropagation();
169
169
  }
170
170
  }
171
171
  ) }, e.id ?? e.value ?? e.name)) }) : null
@@ -174,16 +174,16 @@ const ie = K(function(l, h) {
174
174
  "ul",
175
175
  {
176
176
  className: "autocomplete-suggestions-container",
177
- style: { width: i.current?.offsetWidth },
178
- children: o.map((e) => /* @__PURE__ */ a(
177
+ style: { width: c.current?.offsetWidth },
178
+ children: s.map((e) => /* @__PURE__ */ a(
179
179
  "li",
180
180
  {
181
- className: `autocomplete-suggestion-item ${e.id === o[C]?.id ? "highlighted" : ""}`,
181
+ className: `autocomplete-suggestion-item ${e.id === s[C]?.id ? "highlighted" : ""}`,
182
182
  onMouseEnter: () => y(
183
- o.findIndex((n) => n.id === e.id)
183
+ s.findIndex((n) => n.id === e.id)
184
184
  ),
185
185
  onClick: (n) => {
186
- B(e), n.stopPropagation();
186
+ H(e), n.stopPropagation();
187
187
  },
188
188
  children: e.value ?? e.name
189
189
  },
@@ -195,7 +195,7 @@ const ie = K(function(l, h) {
195
195
  }
196
196
  );
197
197
  });
198
- var U = /* @__PURE__ */ ((l) => (l.error = "error", l.good = "good", l.default = "default", l))(U || {});
198
+ var W = /* @__PURE__ */ ((l) => (l.error = "error", l.good = "good", l.default = "default", l))(W || {});
199
199
  const q = (l) => {
200
200
  switch (l) {
201
201
  case "error":
@@ -223,153 +223,153 @@ const q = (l) => {
223
223
  default:
224
224
  return "input-helper-text-normal";
225
225
  }
226
- }, ce = K(function(l, h) {
226
+ }, ce = U(function(l, h) {
227
227
  const {
228
228
  checked: p,
229
229
  onChange: t,
230
230
  name: r = "",
231
- id: b = "",
232
- label: A = "",
233
- state: k = U.default,
234
- containerClassName: v = "",
235
- inputClassName: S = "",
236
- labelClassName: x = "",
237
- ...D
231
+ id: k = "",
232
+ label: S = "",
233
+ state: $ = W.default,
234
+ containerClassName: x = "",
235
+ inputClassName: D = "",
236
+ labelClassName: w = "",
237
+ ...I
238
238
  } = l;
239
- return /* @__PURE__ */ T("label", { className: `input-check-container ${v}`, children: [
239
+ return /* @__PURE__ */ L("label", { className: `input-check-container ${x}`, children: [
240
240
  /* @__PURE__ */ a(
241
241
  "input",
242
242
  {
243
- id: b,
243
+ id: k,
244
244
  ref: h,
245
245
  name: r,
246
246
  type: "checkbox",
247
247
  checked: p,
248
248
  onChange: t,
249
- className: `input-check ${q(k)} ${S}`,
250
- ...D
249
+ className: `input-check ${q($)} ${D}`,
250
+ ...I
251
251
  }
252
252
  ),
253
253
  /* @__PURE__ */ a(
254
254
  "span",
255
255
  {
256
- className: `input-check-label ${_(k)} ${x}`,
257
- children: A
256
+ className: `input-check-label ${_($)} ${w}`,
257
+ children: S
258
258
  }
259
259
  )
260
260
  ] });
261
- }), G = (l) => l == null ? !1 : Array.isArray(l) ? l.length > 0 : `${l}`.length > 0, Q = K(function(l, h) {
261
+ }), G = (l) => l == null ? !1 : Array.isArray(l) ? l.length > 0 : `${l}`.length > 0, Q = U(function(l, h) {
262
262
  const {
263
263
  children: p,
264
- state: t = U.default,
264
+ state: t = W.default,
265
265
  label: r = "",
266
- containerClassName: b = "",
267
- inputClassName: A = "",
268
- labelClassName: k = "",
269
- helperText: v = "",
270
- helperTextClassName: S = "",
271
- value: x,
272
- defaultValue: D,
273
- onChange: L,
266
+ containerClassName: k = "",
267
+ inputClassName: S = "",
268
+ labelClassName: $ = "",
269
+ helperText: x = "",
270
+ helperTextClassName: D = "",
271
+ value: w,
272
+ defaultValue: I,
273
+ onChange: B,
274
274
  onFocus: d,
275
- onBlur: I,
276
- ...u
277
- } = l, m = x !== void 0, [f, g] = F(
278
- () => G(D)
279
- ), [C, y] = F(!1), o = m ? G(x) : f, i = !!u.placeholder || C, N = (s) => {
280
- m || g(s.currentTarget.value.length > 0), L?.(s);
281
- }, E = (s) => {
282
- C || y(!0), d?.(s);
283
- }, w = (s) => {
284
- C || y(!0), I?.(s);
275
+ onBlur: E,
276
+ ...i
277
+ } = l, m = w !== void 0, [f, g] = F(
278
+ () => G(I)
279
+ ), [C, y] = F(!1), s = m ? G(w) : f, c = i.type === "date", N = !!i.placeholder || C || c, T = (v) => {
280
+ m || g(v.currentTarget.value.length > 0), B?.(v);
281
+ }, b = (v) => {
282
+ C || y(!0), d?.(v);
283
+ }, o = (v) => {
284
+ C || y(!0), E?.(v);
285
285
  };
286
- return /* @__PURE__ */ T("div", { className: `text-input-container ${b}`, children: [
286
+ return /* @__PURE__ */ L("div", { className: `text-input-container ${k}`, children: [
287
287
  /* @__PURE__ */ a(
288
288
  "input",
289
289
  {
290
290
  ref: h,
291
- defaultValue: D,
292
- onChange: N,
293
- onFocus: E,
294
- onBlur: w,
295
- ...m ? { value: x } : {},
296
- className: `text-input ${q(t)} ${A} ${o ? "has-value" : ""} ${u.placeholder ? "has-placeholder" : ""} ${i ? "keep-label-up" : ""}`,
297
- ...u
291
+ defaultValue: I,
292
+ onChange: T,
293
+ onFocus: b,
294
+ onBlur: o,
295
+ ...m ? { value: w } : {},
296
+ className: `text-input ${q(t)} ${S} ${s ? "has-value" : ""} ${i.placeholder ? "has-placeholder" : ""} ${N ? "keep-label-up" : ""}`,
297
+ ...i
298
298
  }
299
299
  ),
300
- !!r && /* @__PURE__ */ T(
300
+ !!r && /* @__PURE__ */ L(
301
301
  "label",
302
302
  {
303
- htmlFor: u.id,
304
- className: `text-input-label ${_(t)} ${k}`,
303
+ htmlFor: i.id,
304
+ className: `text-input-label ${_(t)} ${$}`,
305
305
  children: [
306
306
  r,
307
- u.required ? " *" : ""
307
+ i.required ? " *" : ""
308
308
  ]
309
309
  }
310
310
  ),
311
311
  p,
312
- !!v && /* @__PURE__ */ a(
312
+ !!x && /* @__PURE__ */ a(
313
313
  "p",
314
314
  {
315
- className: `text-input-helper-text ${J(t)} ${S}`,
316
- children: v
315
+ className: `text-input-helper-text ${J(t)} ${D}`,
316
+ children: x
317
317
  }
318
318
  )
319
319
  ] });
320
- }), ue = K(function(l, h) {
320
+ }), ue = U(function(l, h) {
321
321
  const {
322
322
  value: p,
323
323
  onChange: t,
324
324
  options: r,
325
- containerClassName: b = "",
326
- inputClassName: A = "",
327
- labelClassName: k = "",
328
- helperText: v = "",
329
- helperTextClassName: S = "",
330
- label: x = "",
331
- placeholder: D = "",
332
- name: L = "",
325
+ containerClassName: k = "",
326
+ inputClassName: S = "",
327
+ labelClassName: $ = "",
328
+ helperText: x = "",
329
+ helperTextClassName: D = "",
330
+ label: w = "",
331
+ placeholder: I = "",
332
+ name: B = "",
333
333
  id: d = "",
334
- state: I = U.default,
335
- native: u = !0,
334
+ state: E = W.default,
335
+ native: i = !0,
336
336
  disabled: m,
337
337
  required: f,
338
338
  autoFocus: g,
339
339
  children: C,
340
340
  ...y
341
- } = l, o = W(null), [i, N] = F(!1), [E, w] = F(-1), s = j(
341
+ } = l, s = K(null), [c, N] = F(!1), [T, b] = F(-1), o = j(
342
342
  () => r.findIndex(
343
343
  (e) => String(e.id) === String(p ?? r[0]?.id ?? "")
344
344
  ),
345
345
  [r, p]
346
- ), R = j(
347
- () => s >= 0 ? r[s] : void 0,
348
- [r, s]
346
+ ), v = j(
347
+ () => o >= 0 ? r[o] : void 0,
348
+ [r, o]
349
349
  );
350
- O(() => {
351
- if (!(u || !i)) {
350
+ R(() => {
351
+ if (!(i || !c)) {
352
352
  if (!r.length) {
353
- w(-1);
353
+ b(-1);
354
354
  return;
355
355
  }
356
- w(s >= 0 ? s : 0);
356
+ b(o >= 0 ? o : 0);
357
357
  }
358
- }, [u, r.length, s, i]), O(() => {
359
- if (u) return;
358
+ }, [i, r.length, o, c]), R(() => {
359
+ if (i) return;
360
360
  const e = (n) => {
361
- o.current && !o.current.contains(n.target) && N(!1);
361
+ s.current && !s.current.contains(n.target) && N(!1);
362
362
  };
363
363
  return document.addEventListener("mousedown", e), () => {
364
364
  document.removeEventListener("mousedown", e);
365
365
  };
366
- }, [u]);
367
- const B = $(
366
+ }, [i]);
367
+ const H = A(
368
368
  (e) => {
369
369
  h && (typeof h == "function" ? h(e) : h.current = e);
370
370
  },
371
371
  [h]
372
- ), P = $(
372
+ ), P = A(
373
373
  (e) => {
374
374
  if (!t) return;
375
375
  const n = {
@@ -379,52 +379,52 @@ const q = (l) => {
379
379
  t(n);
380
380
  },
381
381
  [t]
382
- ), H = $(
382
+ ), O = A(
383
383
  (e) => {
384
384
  const n = r[e];
385
385
  n && (P(n.id), N(!1));
386
386
  },
387
387
  [P, r]
388
- ), V = $(
388
+ ), V = A(
389
389
  (e) => {
390
390
  if (r.length) {
391
391
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
392
- if (e.preventDefault(), !i) {
392
+ if (e.preventDefault(), !c) {
393
393
  N(!0);
394
- const n = s >= 0 ? s : 0;
395
- w(n);
394
+ const n = o >= 0 ? o : 0;
395
+ b(n);
396
396
  return;
397
397
  }
398
- w((n) => {
399
- const c = n >= 0 ? n : s;
400
- return e.key === "ArrowDown" ? (c + 1 + r.length) % r.length : (c - 1 + r.length) % r.length;
398
+ b((n) => {
399
+ const u = n >= 0 ? n : o;
400
+ return e.key === "ArrowDown" ? (u + 1 + r.length) % r.length : (u - 1 + r.length) % r.length;
401
401
  });
402
402
  return;
403
403
  }
404
404
  if (e.key === "Enter") {
405
- if (!i) {
406
- e.preventDefault(), N(!0), w(s >= 0 ? s : 0);
405
+ if (!c) {
406
+ e.preventDefault(), N(!0), b(o >= 0 ? o : 0);
407
407
  return;
408
408
  }
409
- e.preventDefault(), H(E >= 0 ? E : 0);
409
+ e.preventDefault(), O(T >= 0 ? T : 0);
410
410
  return;
411
411
  }
412
- e.key === "Escape" && i && (e.preventDefault(), N(!1));
412
+ e.key === "Escape" && c && (e.preventDefault(), N(!1));
413
413
  }
414
414
  },
415
- [E, r, H, s, i]
415
+ [T, r, O, o, c]
416
416
  );
417
- return u ? /* @__PURE__ */ T("div", { className: `select-input-container ${b}`, children: [
417
+ return i ? /* @__PURE__ */ L("div", { className: `select-input-container ${k}`, children: [
418
418
  /* @__PURE__ */ a(
419
419
  "select",
420
420
  {
421
421
  ...y,
422
422
  id: d,
423
- ref: B,
424
- name: L,
423
+ ref: H,
424
+ name: B,
425
425
  value: p,
426
426
  onChange: t,
427
- className: `select-input ${q(I)} peer ${A}`,
427
+ className: `select-input ${q(E)} peer ${S}`,
428
428
  children: r?.map((e) => /* @__PURE__ */ a("option", { value: e.id, children: e.value ?? e.name ?? e.id }, e.id))
429
429
  }
430
430
  ),
@@ -432,30 +432,30 @@ const q = (l) => {
432
432
  "label",
433
433
  {
434
434
  htmlFor: d,
435
- className: `select-input-label ${_(I)} ${k}`,
436
- children: x
435
+ className: `select-input-label ${_(E)} ${$}`,
436
+ children: w
437
437
  }
438
438
  ),
439
439
  C,
440
- v && /* @__PURE__ */ a(
440
+ x && /* @__PURE__ */ a(
441
441
  "p",
442
442
  {
443
- className: `select-input-helper-text ${J(I)} ${S}`,
444
- children: v
443
+ className: `select-input-helper-text ${J(E)} ${D}`,
444
+ children: x
445
445
  }
446
446
  )
447
- ] }) : /* @__PURE__ */ T(
447
+ ] }) : /* @__PURE__ */ L(
448
448
  "div",
449
449
  {
450
- ref: o,
451
- className: `select-input-container ${b}`,
450
+ ref: s,
451
+ className: `select-input-container ${k}`,
452
452
  children: [
453
453
  /* @__PURE__ */ a(
454
454
  "select",
455
455
  {
456
456
  ...y,
457
- ref: B,
458
- name: L,
457
+ ref: H,
458
+ name: B,
459
459
  id: d,
460
460
  value: p,
461
461
  onChange: t,
@@ -469,17 +469,17 @@ const q = (l) => {
469
469
  Q,
470
470
  {
471
471
  id: d,
472
- name: L,
473
- state: I,
474
- value: String(R?.value ?? R?.name ?? ""),
472
+ name: B,
473
+ state: E,
474
+ value: String(v?.value ?? v?.name ?? ""),
475
475
  readOnly: !0,
476
- label: x,
477
- helperText: v,
476
+ label: w,
477
+ helperText: x,
478
478
  containerClassName: "select-input-text-container",
479
- inputClassName: `select-input-text ${A}`,
480
- labelClassName: k,
481
- helperTextClassName: S,
482
- placeholder: D,
479
+ inputClassName: `select-input-text ${S}`,
480
+ labelClassName: $,
481
+ helperTextClassName: D,
482
+ placeholder: I,
483
483
  disabled: m,
484
484
  required: f,
485
485
  autoFocus: g,
@@ -487,22 +487,22 @@ const q = (l) => {
487
487
  onKeyDown: V,
488
488
  onFocus: () => N(!0),
489
489
  role: "combobox",
490
- "aria-expanded": i,
490
+ "aria-expanded": c,
491
491
  "aria-haspopup": "listbox",
492
492
  children: C
493
493
  }
494
494
  ),
495
- i && /* @__PURE__ */ a("ul", { className: "select-input-options-container", role: "listbox", children: r.map((e, n) => {
496
- const c = String(e.id) === String(p);
495
+ c && /* @__PURE__ */ a("ul", { className: "select-input-options-container", role: "listbox", children: r.map((e, n) => {
496
+ const u = String(e.id) === String(p);
497
497
  return /* @__PURE__ */ a(
498
498
  "li",
499
499
  {
500
500
  role: "option",
501
- "aria-selected": c,
502
- className: `select-input-option-item ${n === E ? "highlighted" : ""}`,
503
- onMouseEnter: () => w(n),
501
+ "aria-selected": u,
502
+ className: `select-input-option-item ${n === T ? "highlighted" : ""}`,
503
+ onMouseEnter: () => b(n),
504
504
  onClick: (X) => {
505
- H(n), X.stopPropagation();
505
+ O(n), X.stopPropagation();
506
506
  },
507
507
  children: e.value ?? e.name ?? e.id
508
508
  },
@@ -518,7 +518,7 @@ export {
518
518
  ce as C,
519
519
  ue as S,
520
520
  Q as T,
521
- U as a,
521
+ W as a,
522
522
  J as h,
523
523
  q as i,
524
524
  _ as l