@pismo/marola 0.0.1-alpha.14 → 0.0.1-alpha.16

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,8 +1,8 @@
1
1
  import { jsx as h, jsxs as Oe } from "react/jsx-runtime";
2
- import { c as Se } from "../../clsx-DB4S2d7J.js";
2
+ import { c as Ve } from "../../clsx-DB4S2d7J.js";
3
3
  import { Typography as Ke } from "../Typography/Typography.js";
4
- import { s as I, B as ze } from "../../SelectButton-DWtqAiwt.js";
5
- import { a as g, _ as Ve } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
4
+ import { s as H, S as ze } from "../../SelectButton-DWZ2BRaX.js";
5
+ import { a as g, _ as _e } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
6
6
  import * as s from "react";
7
7
  import { g as we, a as ke, u as X, e as ne, P as l, b as le, c as Ie, d as Me } from "../../index-CqjC7P5Y.js";
8
8
  import { u as Je, c as se, a as ye, L as Q } from "../../combineHooksSlotProps-BHqhiBfc.js";
@@ -29,7 +29,7 @@ ke(Ae, ["root", "disabled", "selected", "highlighted"]);
29
29
  function lt(n) {
30
30
  const {
31
31
  value: o,
32
- label: i,
32
+ label: u,
33
33
  disabled: a,
34
34
  rootRef: r,
35
35
  id: c
@@ -41,27 +41,27 @@ function lt(n) {
41
41
  item: o
42
42
  }), {
43
43
  getRootProps: v,
44
- rootRef: M
44
+ rootRef: I
45
45
  } = Ne({
46
46
  disabled: a,
47
47
  focusableWhenDisabled: !0
48
48
  }), x = Te(c), y = s.useRef(null), R = s.useMemo(() => ({
49
49
  disabled: a,
50
- label: i,
50
+ label: u,
51
51
  value: o,
52
52
  ref: y,
53
53
  id: x
54
- }), [a, i, o, x]), {
55
- index: N
56
- } = We(o, R), O = X(r, y, M), T = (b) => (C) => {
54
+ }), [a, u, o, x]), {
55
+ index: M
56
+ } = We(o, R), O = X(r, y, I), N = (b) => (C) => {
57
57
  var P;
58
58
  (P = b.onKeyDown) == null || P.call(b, C), !C.defaultMuiPrevented && [" ", "Enter"].includes(C.key) && (C.defaultMuiPrevented = !0);
59
- }, B = (b = {}) => ({
60
- onKeyDown: T(b)
59
+ }, L = (b = {}) => ({
60
+ onKeyDown: N(b)
61
61
  });
62
62
  return {
63
63
  getRootProps: (b = {}) => {
64
- const C = ne(b), P = se(p, se(v, B));
64
+ const C = ne(b), P = se(p, se(v, L));
65
65
  return g({}, b, C, P(C), {
66
66
  id: x,
67
67
  ref: O,
@@ -70,7 +70,7 @@ function lt(n) {
70
70
  });
71
71
  },
72
72
  highlighted: f,
73
- index: N,
73
+ index: M,
74
74
  selected: d,
75
75
  rootRef: O
76
76
  };
@@ -80,13 +80,13 @@ function st(n) {
80
80
  if (!o)
81
81
  throw new Error("Option: ListContext was not found.");
82
82
  const {
83
- getItemState: i,
83
+ getItemState: u,
84
84
  dispatch: a
85
85
  } = o, {
86
86
  highlighted: r,
87
87
  selected: c,
88
88
  focusable: p
89
- } = i(n), f = s.useCallback((v) => {
89
+ } = u(n), f = s.useCallback((v) => {
90
90
  if (v !== n)
91
91
  throw new Error(["Base UI Option: Tried to access the state of another Option.", "This is unsupported when the Option uses the OptionContextStabilizer as a performance optimization."].join("/n"));
92
92
  return {
@@ -106,14 +106,14 @@ const rt = ["children", "disabled", "label", "slotProps", "slots", "value"];
106
106
  function it(n) {
107
107
  const {
108
108
  disabled: o,
109
- highlighted: i,
109
+ highlighted: u,
110
110
  selected: a
111
111
  } = n;
112
112
  return Ie({
113
- root: ["root", o && "disabled", i && "highlighted", a && "selected"]
113
+ root: ["root", o && "disabled", u && "highlighted", a && "selected"]
114
114
  }, Me(nt));
115
115
  }
116
- const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, i) {
116
+ const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, u) {
117
117
  var a, r;
118
118
  const {
119
119
  children: c,
@@ -121,34 +121,34 @@ const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, i) {
121
121
  label: f,
122
122
  slotProps: d = {},
123
123
  slots: v = {},
124
- value: M
125
- } = o, x = Ve(o, rt), y = (a = v.root) != null ? a : "li", R = s.useRef(null), N = X(R, i), O = f ?? (typeof c == "string" ? c : (r = R.current) == null || (r = r.textContent) == null ? void 0 : r.trim()), {
126
- getRootProps: T,
127
- selected: B,
124
+ value: I
125
+ } = o, x = _e(o, rt), y = (a = v.root) != null ? a : "li", R = s.useRef(null), M = X(R, u), O = f ?? (typeof c == "string" ? c : (r = R.current) == null || (r = r.textContent) == null ? void 0 : r.trim()), {
126
+ getRootProps: N,
127
+ selected: L,
128
128
  highlighted: b,
129
129
  index: C
130
130
  } = lt({
131
131
  disabled: p,
132
132
  label: O,
133
- rootRef: N,
134
- value: M
133
+ rootRef: M,
134
+ value: I
135
135
  }), P = g({}, o, {
136
136
  disabled: p,
137
137
  highlighted: b,
138
138
  index: C,
139
- selected: B
140
- }), j = it(P), S = le({
141
- getSlotProps: T,
139
+ selected: L
140
+ }), j = it(P), V = le({
141
+ getSlotProps: N,
142
142
  elementType: y,
143
143
  externalSlotProps: d.root,
144
144
  externalForwardedProps: x,
145
145
  className: j.root,
146
146
  ownerState: P
147
147
  });
148
- return /* @__PURE__ */ h(y, g({}, S, {
148
+ return /* @__PURE__ */ h(y, g({}, V, {
149
149
  children: c
150
150
  }));
151
- })), Le = /* @__PURE__ */ s.forwardRef(function(o, i) {
151
+ })), Le = /* @__PURE__ */ s.forwardRef(function(o, u) {
152
152
  const {
153
153
  value: a
154
154
  } = o, {
@@ -157,7 +157,7 @@ const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, i) {
157
157
  return /* @__PURE__ */ h(ye.Provider, {
158
158
  value: r,
159
159
  children: /* @__PURE__ */ h(ut, g({}, o, {
160
- ref: i
160
+ ref: u
161
161
  }))
162
162
  });
163
163
  });
@@ -210,13 +210,13 @@ const re = {
210
210
  }, Be = (n) => {
211
211
  const {
212
212
  label: o,
213
- value: i
213
+ value: u
214
214
  } = n;
215
- return typeof o == "string" ? o : typeof i == "string" ? i : String(n);
215
+ return typeof o == "string" ? o : typeof u == "string" ? u : String(n);
216
216
  };
217
217
  function at(n, o) {
218
218
  const {
219
- open: i
219
+ open: u
220
220
  } = n, {
221
221
  context: {
222
222
  selectionMode: a
@@ -226,8 +226,8 @@ function at(n, o) {
226
226
  var r;
227
227
  const d = (r = n.selectedValues[0]) != null ? r : ve(null, "start", o.context);
228
228
  return g({}, n, {
229
- open: !i,
230
- highlightedValue: i ? null : d
229
+ open: !u,
230
+ highlightedValue: u ? null : d
231
231
  });
232
232
  }
233
233
  if (o.type === re.browserAutoFill)
@@ -278,7 +278,7 @@ function ct(n) {
278
278
  function dt(n) {
279
279
  const {
280
280
  areOptionsEqual: o,
281
- buttonRef: i,
281
+ buttonRef: u,
282
282
  defaultOpen: a = !1,
283
283
  defaultValue: r,
284
284
  disabled: c = !1,
@@ -286,32 +286,32 @@ function dt(n) {
286
286
  listboxRef: f,
287
287
  multiple: d = !1,
288
288
  name: v,
289
- required: M,
289
+ required: I,
290
290
  onChange: x,
291
291
  onHighlightChange: y,
292
292
  onOpenChange: R,
293
- open: N,
293
+ open: M,
294
294
  options: O,
295
- getOptionAsString: T = Be,
296
- getSerializedValue: B = ct,
295
+ getOptionAsString: N = Be,
296
+ getSerializedValue: L = ct,
297
297
  value: b,
298
298
  componentName: C = "useSelect"
299
- } = n, P = s.useRef(null), j = X(i, P), S = s.useRef(null), $ = Te(p);
300
- let E;
301
- b === void 0 && r === void 0 ? E = [] : r !== void 0 && (d ? E = r : E = r == null ? [] : [r]);
299
+ } = n, P = s.useRef(null), j = X(u, P), V = s.useRef(null), $ = Te(p);
300
+ let B;
301
+ b === void 0 && r === void 0 ? B = [] : r !== void 0 && (d ? B = r : B = r == null ? [] : [r]);
302
302
  const Y = s.useMemo(() => {
303
303
  if (b !== void 0)
304
304
  return d ? b : b == null ? [] : [b];
305
305
  }, [b, d]), {
306
- subitems: A,
306
+ subitems: T,
307
307
  contextValue: F
308
- } = Ge(), V = s.useMemo(() => O != null ? new Map(O.map((e, t) => [e.value, {
308
+ } = Ge(), _ = s.useMemo(() => O != null ? new Map(O.map((e, t) => [e.value, {
309
309
  value: e.value,
310
310
  label: e.label,
311
311
  disabled: e.disabled,
312
312
  ref: /* @__PURE__ */ s.createRef(),
313
313
  id: `${$}_${t}`
314
- }])) : A, [O, A, $]), ie = X(f, S), {
314
+ }])) : T, [O, T, $]), ie = X(f, V), {
315
315
  getRootProps: Z,
316
316
  active: ue,
317
317
  focusVisible: ae,
@@ -319,48 +319,48 @@ function dt(n) {
319
319
  } = Ne({
320
320
  disabled: c,
321
321
  rootRef: j
322
- }), q = s.useMemo(() => Array.from(V.keys()), [V]), _ = s.useCallback((e) => {
322
+ }), q = s.useMemo(() => Array.from(_.keys()), [_]), S = s.useCallback((e) => {
323
323
  if (o !== void 0) {
324
- const t = q.find((u) => o(u, e));
325
- return V.get(t);
324
+ const t = q.find((i) => o(i, e));
325
+ return _.get(t);
326
326
  }
327
- return V.get(e);
328
- }, [V, o, q]), ee = s.useCallback((e) => {
327
+ return _.get(e);
328
+ }, [_, o, q]), ee = s.useCallback((e) => {
329
329
  var t;
330
- const u = _(e);
331
- return (t = u == null ? void 0 : u.disabled) != null ? t : !1;
332
- }, [_]), te = s.useCallback((e) => {
333
- const t = _(e);
334
- return t ? T(t) : "";
335
- }, [_, T]), ce = s.useMemo(() => ({
330
+ const i = S(e);
331
+ return (t = i == null ? void 0 : i.disabled) != null ? t : !1;
332
+ }, [S]), te = s.useCallback((e) => {
333
+ const t = S(e);
334
+ return t ? N(t) : "";
335
+ }, [S, N]), ce = s.useMemo(() => ({
336
336
  selectedValues: Y,
337
- open: N
338
- }), [Y, N]), de = s.useCallback((e) => {
337
+ open: M
338
+ }), [Y, M]), de = s.useCallback((e) => {
339
339
  var t;
340
- return (t = V.get(e)) == null ? void 0 : t.id;
341
- }, [V]), pe = s.useCallback((e, t) => {
340
+ return (t = _.get(e)) == null ? void 0 : t.id;
341
+ }, [_]), pe = s.useCallback((e, t) => {
342
342
  if (d)
343
343
  x == null || x(e, t);
344
344
  else {
345
- var u;
346
- x == null || x(e, (u = t[0]) != null ? u : null);
345
+ var i;
346
+ x == null || x(e, (i = t[0]) != null ? i : null);
347
347
  }
348
348
  }, [d, x]), fe = s.useCallback((e, t) => {
349
349
  y == null || y(e, t ?? null);
350
- }, [y]), be = s.useCallback((e, t, u) => {
351
- if (t === "open" && (R == null || R(u), u === !1 && (e == null ? void 0 : e.type) !== "blur")) {
350
+ }, [y]), be = s.useCallback((e, t, i) => {
351
+ if (t === "open" && (R == null || R(i), i === !1 && (e == null ? void 0 : e.type) !== "blur")) {
352
352
  var m;
353
353
  (m = P.current) == null || m.focus();
354
354
  }
355
355
  }, [R]), ge = s.useCallback((e) => {
356
- var t, u;
357
- return e == null ? null : (t = (u = A.get(e)) == null ? void 0 : u.ref.current) != null ? t : null;
358
- }, [A]), me = {
356
+ var t, i;
357
+ return e == null ? null : (t = (i = T.get(e)) == null ? void 0 : i.ref.current) != null ? t : null;
358
+ }, [T]), me = {
359
359
  getInitialState: () => {
360
360
  var e;
361
361
  return {
362
362
  highlightedValue: null,
363
- selectedValues: (e = E) != null ? e : [],
363
+ selectedValues: (e = B) != null ? e : [],
364
364
  open: a
365
365
  };
366
366
  },
@@ -383,41 +383,41 @@ function dt(n) {
383
383
  stateReducer: at,
384
384
  componentName: C
385
385
  }, {
386
- dispatch: D,
386
+ dispatch: E,
387
387
  getRootProps: he,
388
388
  contextValue: K,
389
389
  state: {
390
390
  open: w,
391
- highlightedValue: L,
391
+ highlightedValue: A,
392
392
  selectedValues: k
393
393
  },
394
394
  rootRef: z
395
395
  } = et(me), xe = s.useRef(w);
396
396
  tt(() => {
397
- if (w && L !== null) {
397
+ if (w && A !== null) {
398
398
  var e;
399
- const t = (e = _(L)) == null ? void 0 : e.ref;
400
- if (!S.current || !(t != null && t.current))
399
+ const t = (e = S(A)) == null ? void 0 : e.ref;
400
+ if (!V.current || !(t != null && t.current))
401
401
  return;
402
402
  xe.current || t.current.focus({
403
403
  preventScroll: !0
404
404
  });
405
- const u = S.current.getBoundingClientRect(), m = t.current.getBoundingClientRect();
406
- m.top < u.top ? S.current.scrollTop -= u.top - m.top : m.bottom > u.bottom && (S.current.scrollTop += m.bottom - u.bottom);
405
+ const i = V.current.getBoundingClientRect(), m = t.current.getBoundingClientRect();
406
+ m.top < i.top ? V.current.scrollTop -= i.top - m.top : m.bottom > i.bottom && (V.current.scrollTop += m.bottom - i.bottom);
407
407
  }
408
- }, [w, L, _]);
409
- const J = s.useCallback((e) => _(e), [_]), Ce = (e) => (t) => {
410
- var u;
411
- if (e == null || (u = e.onClick) == null || u.call(e, t), !t.defaultMuiPrevented) {
408
+ }, [w, A, S]);
409
+ const J = s.useCallback((e) => S(e), [S]), Ce = (e) => (t) => {
410
+ var i;
411
+ if (e == null || (i = e.onClick) == null || i.call(e, t), !t.defaultMuiPrevented) {
412
412
  const m = {
413
413
  type: re.buttonClick,
414
414
  event: t
415
415
  };
416
- D(m);
416
+ E(m);
417
417
  }
418
418
  }, W = (e) => (t) => {
419
- var u;
420
- (u = e.onKeyDown) == null || u.call(e, t), !t.defaultMuiPrevented && (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), D({
419
+ var i;
420
+ (i = e.onKeyDown) == null || i.call(e, t), !t.defaultMuiPrevented && (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), E({
421
421
  type: Q.keyDown,
422
422
  key: t.key,
423
423
  event: t
@@ -425,29 +425,29 @@ function dt(n) {
425
425
  }, oe = (e = {}) => ({
426
426
  onClick: Ce(e),
427
427
  onKeyDown: W(e)
428
- }), H = (e = {}) => g({}, e, oe(e), {
428
+ }), D = (e = {}) => g({}, e, oe(e), {
429
429
  role: "combobox",
430
430
  "aria-expanded": w,
431
431
  "aria-controls": $
432
432
  }), He = (e = {}) => {
433
- const t = ne(e), u = se(H, Z);
434
- return g({}, e, u(t));
433
+ const t = ne(e), i = se(D, Z);
434
+ return g({}, e, i(t));
435
435
  }, $e = (e) => (t) => {
436
- var u, m;
437
- (u = e.onBlur) == null || u.call(e, t), !t.defaultMuiPrevented && ((m = S.current) != null && m.contains(t.relatedTarget) || t.relatedTarget === P.current) && (t.defaultMuiPrevented = !0);
436
+ var i, m;
437
+ (i = e.onBlur) == null || i.call(e, t), !t.defaultMuiPrevented && ((m = V.current) != null && m.contains(t.relatedTarget) || t.relatedTarget === P.current) && (t.defaultMuiPrevented = !0);
438
438
  }, Fe = (e = {}) => ({
439
439
  onBlur: $e(e)
440
440
  }), qe = (e = {}) => {
441
- const t = ne(e), u = se(Fe, he);
441
+ const t = ne(e), i = se(Fe, he);
442
442
  return g({
443
443
  id: $,
444
444
  role: "listbox",
445
445
  "aria-multiselectable": d ? "true" : void 0
446
- }, e, u(t));
446
+ }, e, i(t));
447
447
  };
448
448
  s.useDebugValue({
449
449
  selectedOptions: k,
450
- highlightedOption: L,
450
+ highlightedOption: A,
451
451
  open: w
452
452
  });
453
453
  const je = s.useMemo(() => g({}, K, F), [K, F]);
@@ -461,13 +461,13 @@ function dt(n) {
461
461
  Pe = (Re = J(G)) != null ? Re : null;
462
462
  }
463
463
  const Ue = (e) => (t) => {
464
- var u;
465
- if (e == null || (u = e.onChange) == null || u.call(e, t), t.defaultMuiPrevented)
464
+ var i;
465
+ if (e == null || (i = e.onChange) == null || i.call(e, t), t.defaultMuiPrevented)
466
466
  return;
467
- const m = V.get(t.target.value);
468
- t.target.value === "" ? D({
467
+ const m = _.get(t.target.value);
468
+ t.target.value === "" ? E({
469
469
  type: Q.clearSelection
470
- }) : m !== void 0 && D({
470
+ }) : m !== void 0 && E({
471
471
  type: re.browserAutoFill,
472
472
  item: m.value,
473
473
  event: t
@@ -479,7 +479,7 @@ function dt(n) {
479
479
  buttonRef: U,
480
480
  contextValue: je,
481
481
  disabled: c,
482
- dispatch: D,
482
+ dispatch: E,
483
483
  getButtonProps: He,
484
484
  getHiddenInputProps: (e = {}) => {
485
485
  const t = ne(e);
@@ -487,8 +487,8 @@ function dt(n) {
487
487
  name: v,
488
488
  tabIndex: -1,
489
489
  "aria-hidden": !0,
490
- required: M ? !0 : void 0,
491
- value: B(Pe),
490
+ required: I ? !0 : void 0,
491
+ value: L(Pe),
492
492
  style: ot
493
493
  }, e, {
494
494
  onChange: Ue(t)
@@ -500,13 +500,13 @@ function dt(n) {
500
500
  open: w,
501
501
  options: q,
502
502
  value: G,
503
- highlightedOption: L
503
+ highlightedOption: A
504
504
  };
505
505
  }
506
506
  function pt(n) {
507
507
  const {
508
508
  value: o,
509
- children: i
509
+ children: u
510
510
  } = n, {
511
511
  dispatch: a,
512
512
  getItemIndex: r,
@@ -526,7 +526,7 @@ function pt(n) {
526
526
  value: v,
527
527
  children: /* @__PURE__ */ h(ye.Provider, {
528
528
  value: d,
529
- children: i
529
+ children: u
530
530
  })
531
531
  });
532
532
  }
@@ -535,68 +535,68 @@ function ft(n) {
535
535
  return we(Ee, n);
536
536
  }
537
537
  ke(Ee, ["root", "button", "listbox", "popup", "active", "expanded", "disabled", "focusVisible"]);
538
- var _e;
538
+ var Se;
539
539
  const bt = ["areOptionsEqual", "autoComplete", "autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "required", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "placeholder", "slotProps", "slots", "value"];
540
540
  function gt(n) {
541
541
  var o;
542
542
  return Array.isArray(n) ? /* @__PURE__ */ h(s.Fragment, {
543
- children: n.map((i) => i.label).join(", ")
543
+ children: n.map((u) => u.label).join(", ")
544
544
  }) : (o = n == null ? void 0 : n.label) != null ? o : null;
545
545
  }
546
546
  function mt(n) {
547
547
  const {
548
548
  active: o,
549
- disabled: i,
549
+ disabled: u,
550
550
  open: a,
551
551
  focusVisible: r
552
552
  } = n;
553
553
  return Ie({
554
- root: ["root", i && "disabled", r && "focusVisible", o && "active", a && "expanded"],
555
- listbox: ["listbox", i && "disabled"],
554
+ root: ["root", u && "disabled", r && "focusVisible", o && "active", a && "expanded"],
555
+ listbox: ["listbox", u && "disabled"],
556
556
  popup: ["popup"]
557
557
  }, Me(ft));
558
558
  }
559
- const De = /* @__PURE__ */ s.forwardRef(function(o, i) {
559
+ const De = /* @__PURE__ */ s.forwardRef(function(o, u) {
560
560
  var a, r, c, p, f;
561
561
  const {
562
562
  areOptionsEqual: d,
563
563
  autoComplete: v,
564
- autoFocus: M,
564
+ autoFocus: I,
565
565
  children: x,
566
566
  defaultValue: y,
567
567
  defaultListboxOpen: R = !1,
568
- disabled: N,
568
+ disabled: M,
569
569
  getSerializedValue: O,
570
- listboxId: T,
571
- listboxOpen: B,
570
+ listboxId: N,
571
+ listboxOpen: L,
572
572
  multiple: b = !1,
573
573
  name: C,
574
574
  required: P = !1,
575
575
  onChange: j,
576
- onListboxOpenChange: S,
576
+ onListboxOpenChange: V,
577
577
  getOptionAsString: $ = Be,
578
- renderValue: E,
578
+ renderValue: B,
579
579
  placeholder: Y,
580
- slotProps: A = {},
580
+ slotProps: T = {},
581
581
  slots: F = {},
582
- value: V
583
- } = o, ie = Ve(o, bt), Z = E ?? gt, [ue, ae] = s.useState(!1), U = s.useRef(null), q = s.useRef(null), _ = (a = F.root) != null ? a : "button", ee = (r = F.listbox) != null ? r : "ul", te = (c = F.popup) != null ? c : "div", ce = s.useCallback((H) => {
584
- ae(H != null);
585
- }, []), de = X(i, U, ce);
582
+ value: _
583
+ } = o, ie = _e(o, bt), Z = B ?? gt, [ue, ae] = s.useState(!1), U = s.useRef(null), q = s.useRef(null), S = (a = F.root) != null ? a : "button", ee = (r = F.listbox) != null ? r : "ul", te = (c = F.popup) != null ? c : "div", ce = s.useCallback((D) => {
584
+ ae(D != null);
585
+ }, []), de = X(u, U, ce);
586
586
  s.useEffect(() => {
587
- M && U.current.focus();
588
- }, [M]);
587
+ I && U.current.focus();
588
+ }, [I]);
589
589
  const {
590
590
  buttonActive: pe,
591
591
  buttonFocusVisible: fe,
592
592
  contextValue: be,
593
593
  disabled: ge,
594
594
  getButtonProps: me,
595
- getListboxProps: D,
595
+ getListboxProps: E,
596
596
  getHiddenInputProps: he,
597
597
  getOptionMetadata: K,
598
598
  value: w,
599
- open: L
599
+ open: A
600
600
  } = dt({
601
601
  name: C,
602
602
  required: P,
@@ -605,35 +605,35 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, i) {
605
605
  buttonRef: de,
606
606
  defaultOpen: R,
607
607
  defaultValue: y,
608
- disabled: N,
609
- listboxId: T,
608
+ disabled: M,
609
+ listboxId: N,
610
610
  multiple: b,
611
- open: B,
611
+ open: L,
612
612
  onChange: j,
613
- onOpenChange: S,
613
+ onOpenChange: V,
614
614
  getOptionAsString: $,
615
- value: V,
615
+ value: _,
616
616
  componentName: "Select"
617
617
  }), k = g({}, o, {
618
618
  active: pe,
619
619
  defaultListboxOpen: R,
620
620
  disabled: ge,
621
621
  focusVisible: fe,
622
- open: L,
622
+ open: A,
623
623
  multiple: b,
624
624
  renderValue: Z,
625
625
  value: w
626
626
  }), z = mt(k), xe = le({
627
- elementType: _,
627
+ elementType: S,
628
628
  getSlotProps: me,
629
- externalSlotProps: A.root,
629
+ externalSlotProps: T.root,
630
630
  externalForwardedProps: ie,
631
631
  ownerState: k,
632
632
  className: z.root
633
633
  }), J = le({
634
634
  elementType: ee,
635
- getSlotProps: D,
636
- externalSlotProps: A.listbox,
635
+ getSlotProps: E,
636
+ externalSlotProps: T.listbox,
637
637
  additionalProps: {
638
638
  ref: q
639
639
  },
@@ -641,11 +641,11 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, i) {
641
641
  className: z.listbox
642
642
  }), Ce = le({
643
643
  elementType: te,
644
- externalSlotProps: A.popup,
644
+ externalSlotProps: T.popup,
645
645
  additionalProps: {
646
646
  anchor: U.current,
647
647
  keepMounted: !0,
648
- open: L,
648
+ open: A,
649
649
  placement: "bottom-start",
650
650
  role: void 0
651
651
  },
@@ -654,17 +654,17 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, i) {
654
654
  });
655
655
  let W;
656
656
  if (b)
657
- W = w.map((H) => K(H)).filter((H) => H !== void 0);
657
+ W = w.map((D) => K(D)).filter((D) => D !== void 0);
658
658
  else {
659
659
  var oe;
660
660
  W = (oe = K(w)) != null ? oe : null;
661
661
  }
662
662
  return /* @__PURE__ */ Oe(s.Fragment, {
663
- children: [/* @__PURE__ */ h(_, g({}, xe, {
663
+ children: [/* @__PURE__ */ h(S, g({}, xe, {
664
664
  children: (p = (f = Z(W)) != null ? f : Y) != null ? p : (
665
665
  // fall back to a zero-width space to prevent layout shift
666
666
  // from https://github.com/mui/material-ui/pull/24563
667
- _e || (_e = /* @__PURE__ */ h("span", {
667
+ Se || (Se = /* @__PURE__ */ h("span", {
668
668
  className: "notranslate",
669
669
  children: "​"
670
670
  }))
@@ -813,48 +813,46 @@ process.env.NODE_ENV !== "production" && (De.propTypes = {
813
813
  value: l.any
814
814
  });
815
815
  const ht = (n) => {
816
- const { children: o, icon: i, ...a } = n;
816
+ const { children: o, icon: u, className: a, ...r } = n;
817
817
  return /* @__PURE__ */ Oe(
818
818
  Le,
819
819
  {
820
- ...a,
820
+ ...r,
821
821
  slotProps: {
822
- root: (r) => ({
823
- className: Se(I.select__listbox__option, {
824
- [I["select__listbox__option--disabled"]]: r.disabled,
825
- [I["select__listbox__option--selected"]]: r.selected,
826
- [I["select__listbox__option--highlighted"]]: r.highlighted
822
+ root: (c) => ({
823
+ className: Ve(H.select__listbox__option, a, {
824
+ [H["select__listbox__option--disabled"]]: c.disabled,
825
+ [H["select__listbox__option--selected"]]: c.selected
827
826
  })
828
827
  })
829
828
  },
830
829
  children: [
831
- i ? /* @__PURE__ */ h("span", { className: I.select__listbox__option__icon, children: i }) : "",
832
- /* @__PURE__ */ h(Ke, { element: "span", variant: "body-small", className: I.select__listbox__option__text, children: o })
830
+ u ? /* @__PURE__ */ h("span", { className: H.select__listbox__option__icon, children: u }) : "",
831
+ /* @__PURE__ */ h(Ke, { element: "span", variant: "body-small", className: H.select__listbox__option__text, children: o })
833
832
  ]
834
833
  }
835
834
  );
836
835
  }, xt = (n) => {
837
- const { children: o, onChange: i, ariaLabelledby: a, ...r } = n;
836
+ const { children: o, className: u, onChange: a, ...r } = n;
838
837
  return /* @__PURE__ */ h(
839
838
  De,
840
839
  {
841
840
  ...r,
842
841
  onChange: (p, f) => {
843
- i == null || i(f, p);
842
+ a == null || a(f, p);
844
843
  },
845
- className: Se(I.select),
844
+ className: Ve(H.select, u),
846
845
  slots: { root: ze },
847
846
  slotProps: {
848
- listbox: { className: I.select__listbox },
849
- popup: { className: I.select__popup }
847
+ listbox: { className: H.select__listbox },
848
+ popup: { disablePortal: !0 }
850
849
  },
851
- "aria-labelledby": a,
852
850
  children: o
853
851
  }
854
852
  );
855
853
  };
856
854
  xt.Option = ht;
857
855
  export {
858
- ht as Option,
859
- xt as Select
856
+ xt as Select,
857
+ ht as SelectOption
860
858
  };