@pismo/marola 1.0.0-beta.48 → 1.0.0-beta.5

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 (150) hide show
  1. package/dist/{Button-BAljjMv3.js → Button-2b1peDFT.js} +2 -2
  2. package/dist/{ClickAwayListener-DbEYZpyh.js → ClickAwayListener-BSW-Nd-y.js} +3 -4
  3. package/dist/Dialog.module-DFEmFdYT.js +30 -0
  4. package/dist/Group-B3p31ftp.js +26 -0
  5. package/dist/{Popup-Ck3XlWMq.js → Popup-B6ZSGIEI.js} +3 -3
  6. package/dist/{Portal-oY3enyAm.js → Portal-DIeBsWdL.js} +2 -2
  7. package/dist/SelectButton-K3OIfR5m.js +61 -0
  8. package/dist/{Tabs.module-BGGTkDc5.js → Tabs.module-jkH1Qjn7.js} +7 -7
  9. package/dist/Toggle-BCgIItCc.js +142 -0
  10. package/dist/assets/Advice.css +1 -1
  11. package/dist/assets/Button.css +1 -1
  12. package/dist/assets/Checkbox.css +1 -1
  13. package/dist/assets/Dialog.css +1 -1
  14. package/dist/assets/EllipsisTooltip.css +1 -1
  15. package/dist/assets/Group.css +1 -1
  16. package/dist/assets/IconButton.css +1 -1
  17. package/dist/assets/Input.css +1 -1
  18. package/dist/assets/PageHeader.css +1 -1
  19. package/dist/assets/Pagination.css +1 -1
  20. package/dist/assets/SelectButton.css +1 -1
  21. package/dist/assets/Skeleton.css +1 -1
  22. package/dist/assets/Snackbar.css +1 -1
  23. package/dist/assets/SortTooltip.css +1 -1
  24. package/dist/assets/Stepper.css +1 -1
  25. package/dist/assets/Table.css +1 -1
  26. package/dist/assets/Tabs.css +1 -1
  27. package/dist/assets/TextDisplay.css +1 -1
  28. package/dist/assets/Toggle.css +1 -1
  29. package/dist/assets/Toggle2.css +1 -1
  30. package/dist/assets/Typography.css +1 -1
  31. package/dist/{combineHooksSlotProps-C-zYvfnF.js → combineHooksSlotProps-DVjg9PRh.js} +1 -1
  32. package/dist/components/Advice/Advice.d.ts +17 -32
  33. package/dist/components/Advice/Advice.js +40 -39
  34. package/dist/components/Advice/Advice.stories.d.ts +3 -4
  35. package/dist/components/Button/Button.d.ts +0 -2
  36. package/dist/components/Button/Button.js +49 -51
  37. package/dist/components/Checkbox/Checkbox.js +52 -52
  38. package/dist/components/Chip/Chip.d.ts +12 -6
  39. package/dist/components/Chip/Chip.js +6 -9
  40. package/dist/components/Chip/Chip.stories.d.ts +15 -6
  41. package/dist/components/Dialog/Actions.js +1 -1
  42. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  43. package/dist/components/Dialog/Backdrop.js +7 -8
  44. package/dist/components/Dialog/CloseIconButton.d.ts +2 -1
  45. package/dist/components/Dialog/CloseIconButton.js +18 -15
  46. package/dist/components/Dialog/Dialog.d.ts +6 -9
  47. package/dist/components/Dialog/Dialog.js +139 -139
  48. package/dist/components/Dialog/Dialog.stories.d.ts +47 -51
  49. package/dist/components/Dialog/DialogTitle.js +1 -1
  50. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +17 -30
  51. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +2 -3
  52. package/dist/components/Icon/Icon.js +52 -146
  53. package/dist/components/Icon/types.d.ts +1 -1
  54. package/dist/components/IconButton/IconButton.js +42 -42
  55. package/dist/components/Input/Input.d.ts +5 -24
  56. package/dist/components/Input/Input.js +292 -301
  57. package/dist/components/Input/Input.stories.d.ts +21 -2
  58. package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -1
  59. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
  60. package/dist/components/PageHeader/PageHeader.js +57 -57
  61. package/dist/components/Pagination/Pagination.d.ts +1 -5
  62. package/dist/components/Pagination/Pagination.js +185 -87
  63. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  64. package/dist/components/Select/Select.d.ts +0 -21
  65. package/dist/components/Select/Select.js +413 -476
  66. package/dist/components/Select/SelectButton.d.ts +0 -2
  67. package/dist/components/Select/SelectButton.js +2 -3
  68. package/dist/components/Skeleton/Skeleton.d.ts +1 -3
  69. package/dist/components/Skeleton/Skeleton.js +14 -20
  70. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  71. package/dist/components/Snackbar/Snackbar.js +94 -94
  72. package/dist/components/Snackbar/Snackbar.stories.d.ts +4 -4
  73. package/dist/components/SortTooltip/SortTooltip.js +46 -46
  74. package/dist/components/Stepper/Stepper.js +35 -35
  75. package/dist/components/Table/Table.d.ts +1 -3
  76. package/dist/components/Table/Table.js +99 -87
  77. package/dist/components/Table/Table.stories.d.ts +1 -1
  78. package/dist/components/Tabs/Tab.d.ts +3 -5
  79. package/dist/components/Tabs/Tab.js +36 -38
  80. package/dist/components/Tabs/TabPanel.d.ts +2 -4
  81. package/dist/components/Tabs/TabPanel.js +40 -51
  82. package/dist/components/Tabs/Tabs.d.ts +4 -6
  83. package/dist/components/Tabs/Tabs.js +128 -131
  84. package/dist/components/TextDisplay/TextDisplay.d.ts +3 -9
  85. package/dist/components/TextDisplay/TextDisplay.js +31 -45
  86. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -2
  87. package/dist/components/Toggle/Toggle.js +56 -56
  88. package/dist/components/ToggleGroup/Group.d.ts +0 -2
  89. package/dist/components/ToggleGroup/Group.js +2 -4
  90. package/dist/components/ToggleGroup/Toggle.d.ts +0 -2
  91. package/dist/components/ToggleGroup/Toggle.js +5 -7
  92. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  93. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -3
  94. package/dist/components/Tooltip/Tooltip.d.ts +1 -3
  95. package/dist/components/Tooltip/Tooltip.js +4 -4
  96. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -2
  97. package/dist/components/Typography/Typography.js +47 -47
  98. package/dist/components/Typography/Typography.stories.d.ts +1 -1
  99. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  100. package/dist/{useSlotProps-C_I1kEHr.js → index-CH45lKw7.js} +99 -99
  101. package/dist/{index-bQFToy-I.js → index-CjW42-M-.js} +1 -1
  102. package/dist/main.d.ts +0 -6
  103. package/dist/main.js +76 -87
  104. package/dist/{useButton-DcihopJG.js → useButton-DNk3wrQp.js} +1 -1
  105. package/dist/useCompoundItem-D1iRfg8D.js +84 -0
  106. package/dist/useEventCallback-xTG9piMa.js +45 -0
  107. package/dist/{useList-B9C55YB7.js → useList-B0hog_3-.js} +2 -2
  108. package/package.json +12 -21
  109. package/dist/Dialog.module-D9e4RsKo.js +0 -30
  110. package/dist/Group-DspH8hyO.js +0 -30
  111. package/dist/Popover.module-B4boCutS.js +0 -10
  112. package/dist/SelectButton-B38avP9u.js +0 -75
  113. package/dist/Toggle-BbmXeuJd.js +0 -188
  114. package/dist/assets/Adornment.css +0 -1
  115. package/dist/assets/Autocomplete.css +0 -1
  116. package/dist/assets/Popover.css +0 -1
  117. package/dist/assets/ResultWithChips.css +0 -1
  118. package/dist/assets/StepperNavigator.css +0 -1
  119. package/dist/components/Adornment/Adornment.d.ts +0 -20
  120. package/dist/components/Adornment/Adornment.js +0 -13
  121. package/dist/components/Adornment/Adornment.stories.d.ts +0 -14
  122. package/dist/components/Adornment/adornment.test.d.ts +0 -1
  123. package/dist/components/Autocomplete/Autocomplete.d.ts +0 -20
  124. package/dist/components/Autocomplete/Autocomplete.js +0 -679
  125. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +0 -23
  126. package/dist/components/Pagination/usePagination.d.ts +0 -90
  127. package/dist/components/Pagination/usePagination.js +0 -79
  128. package/dist/components/Popover/Popover.d.ts +0 -32
  129. package/dist/components/Popover/Popover.js +0 -24
  130. package/dist/components/Popover/Popover.stories.d.ts +0 -34
  131. package/dist/components/Popover/PopoverBody.d.ts +0 -6
  132. package/dist/components/Popover/PopoverBody.js +0 -6
  133. package/dist/components/Popover/PopoverFooter.d.ts +0 -6
  134. package/dist/components/Popover/PopoverFooter.js +0 -6
  135. package/dist/components/Popover/PopoverHeader.d.ts +0 -6
  136. package/dist/components/Popover/PopoverHeader.js +0 -6
  137. package/dist/components/ResultWithChips/ResultWithChips.d.ts +0 -12
  138. package/dist/components/ResultWithChips/ResultWithChips.js +0 -33
  139. package/dist/components/RowItem/RowItem.d.ts +0 -25
  140. package/dist/components/RowItem/RowItem.js +0 -21
  141. package/dist/components/RowItem/RowItem.stories.d.ts +0 -17
  142. package/dist/components/RowItem/rowItem.test.d.ts +0 -1
  143. package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -58
  144. package/dist/components/StepperNavigator/StepperNavigator.js +0 -115
  145. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -18
  146. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +0 -1
  147. package/dist/ownerDocument-YGhwAnr1.js +0 -33
  148. package/dist/useCompoundItem-B7Eo_qZk.js +0 -68
  149. package/dist/useEventCallback-BAQJJ3ye.js +0 -14
  150. package/dist/useId-BW-oWmul.js +0 -19
@@ -1,19 +1,16 @@
1
- import { jsx as h, jsxs as re } from "react/jsx-runtime";
1
+ import { jsx as h, jsxs as Oe } from "react/jsx-runtime";
2
+ import { c as _e } from "../../clsx-DB4S2d7J.js";
3
+ import { Typography as Ke } from "../Typography/Typography.js";
4
+ import { s as L, S as ze } from "../../SelectButton-K3OIfR5m.js";
5
+ import { g as Ve, a as we, u as X, f as ne, b as g, P as l, _ as ke, c as le, d as Ie, e as Ne } from "../../index-CH45lKw7.js";
2
6
  import * as s from "react";
3
- import { useId as ze } from "react";
4
- import { c as U } from "../../clsx-DB4S2d7J.js";
5
- import { Icon as We } from "../Icon/Icon.js";
6
- import { Typography as _e } from "../Typography/Typography.js";
7
- import { s as y, S as Je } from "../../SelectButton-B38avP9u.js";
8
- import { g as we, a as Ie, u as Y, f as le, b as m, P as l, _ as Ne, c as se, d as Me, e as ke } from "../../useSlotProps-C_I1kEHr.js";
9
- import { u as Ge, c as ae, a as Se, L as X } from "../../combineHooksSlotProps-C-zYvfnF.js";
10
- import { u as Te } from "../../useButton-DcihopJG.js";
11
- import { u as Le } from "../../useId-BW-oWmul.js";
12
- import { u as Qe, a as Xe, C as Ye } from "../../useCompoundItem-B7Eo_qZk.js";
13
- import { P as Ze } from "../../Popup-Ck3XlWMq.js";
14
- import { m as Re, h as et, l as tt, u as ot } from "../../useList-B9C55YB7.js";
15
- import { u as nt } from "../../useEnhancedEffect-CJGo-L3B.js";
16
- const lt = {
7
+ import { u as Je, c as se, a as ye, L as Q } from "../../combineHooksSlotProps-DVjg9PRh.js";
8
+ import { u as Me } from "../../useButton-DNk3wrQp.js";
9
+ import { u as Te, a as We, b as Ge, C as Qe } from "../../useCompoundItem-D1iRfg8D.js";
10
+ import { P as Xe } from "../../Popup-B6ZSGIEI.js";
11
+ import { m as ve, h as Ye, l as Ze, u as et } from "../../useList-B0hog_3-.js";
12
+ import { u as tt } from "../../useEnhancedEffect-CJGo-L3B.js";
13
+ const ot = {
17
14
  border: 0,
18
15
  clip: "rect(0 0 0 0)",
19
16
  height: "1px",
@@ -24,146 +21,146 @@ const lt = {
24
21
  whiteSpace: "nowrap",
25
22
  width: "1px"
26
23
  }, Ae = "Option";
27
- function st(n) {
28
- return we(Ae, n);
24
+ function nt(n) {
25
+ return Ve(Ae, n);
29
26
  }
30
- Ie(Ae, ["root", "disabled", "selected", "highlighted"]);
31
- function rt(n) {
27
+ we(Ae, ["root", "disabled", "selected", "highlighted"]);
28
+ function lt(n) {
32
29
  const {
33
30
  value: o,
34
31
  label: i,
35
- disabled: c,
32
+ disabled: a,
36
33
  rootRef: r,
37
- id: u
34
+ id: c
38
35
  } = n, {
39
- getRootProps: f,
40
- highlighted: b,
36
+ getRootProps: p,
37
+ highlighted: f,
41
38
  selected: d
42
- } = Ge({
39
+ } = Je({
43
40
  item: o
44
41
  }), {
45
- getRootProps: R,
46
- rootRef: V
47
- } = Te({
48
- disabled: c,
42
+ getRootProps: v,
43
+ rootRef: I
44
+ } = Me({
45
+ disabled: a,
49
46
  focusableWhenDisabled: !0
50
- }), x = Le(u), _ = s.useRef(null), g = s.useMemo(() => ({
51
- disabled: c,
47
+ }), x = Te(c), y = s.useRef(null), R = s.useMemo(() => ({
48
+ disabled: a,
52
49
  label: i,
53
50
  value: o,
54
- ref: _,
51
+ ref: y,
55
52
  id: x
56
- }), [c, i, o, x]), {
57
- index: I
58
- } = Qe(o, g), O = Y(r, _, V), N = (p) => (C) => {
53
+ }), [a, i, o, x]), {
54
+ index: N
55
+ } = We(o, R), O = X(r, y, I), M = (b) => (C) => {
59
56
  var P;
60
- (P = p.onKeyDown) == null || P.call(p, C), !C.defaultMuiPrevented && [" ", "Enter"].includes(C.key) && (C.defaultMuiPrevented = !0);
61
- }, L = (p = {}) => ({
62
- onKeyDown: N(p)
57
+ (P = b.onKeyDown) == null || P.call(b, C), !C.defaultMuiPrevented && [" ", "Enter"].includes(C.key) && (C.defaultMuiPrevented = !0);
58
+ }, B = (b = {}) => ({
59
+ onKeyDown: M(b)
63
60
  });
64
61
  return {
65
- getRootProps: (p = {}) => {
66
- const C = le(p), P = ae(f, ae(R, L));
67
- return m({}, p, C, P(C), {
62
+ getRootProps: (b = {}) => {
63
+ const C = ne(b), P = se(p, se(v, B));
64
+ return g({}, b, C, P(C), {
68
65
  id: x,
69
66
  ref: O,
70
67
  role: "option",
71
68
  "aria-selected": d
72
69
  });
73
70
  },
74
- highlighted: b,
75
- index: I,
71
+ highlighted: f,
72
+ index: N,
76
73
  selected: d,
77
74
  rootRef: O
78
75
  };
79
76
  }
80
- function at(n) {
81
- const o = s.useContext(Se);
77
+ function st(n) {
78
+ const o = s.useContext(ye);
82
79
  if (!o)
83
80
  throw new Error("Option: ListContext was not found.");
84
81
  const {
85
82
  getItemState: i,
86
- dispatch: c
83
+ dispatch: a
87
84
  } = o, {
88
85
  highlighted: r,
89
- selected: u,
90
- focusable: f
91
- } = i(n), b = s.useCallback((R) => {
92
- if (R !== n)
86
+ selected: c,
87
+ focusable: p
88
+ } = i(n), f = s.useCallback((v) => {
89
+ if (v !== n)
93
90
  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"));
94
91
  return {
95
92
  highlighted: r,
96
- selected: u,
97
- focusable: f
93
+ selected: c,
94
+ focusable: p
98
95
  };
99
- }, [r, u, f, n]);
96
+ }, [r, c, p, n]);
100
97
  return {
101
98
  contextValue: s.useMemo(() => ({
102
- dispatch: c,
103
- getItemState: b
104
- }), [c, b])
99
+ dispatch: a,
100
+ getItemState: f
101
+ }), [a, f])
105
102
  };
106
103
  }
107
- const it = ["children", "disabled", "label", "slotProps", "slots", "value"];
104
+ const rt = ["children", "disabled", "label", "slotProps", "slots", "value"];
108
105
  function ut(n) {
109
106
  const {
110
107
  disabled: o,
111
108
  highlighted: i,
112
- selected: c
109
+ selected: a
113
110
  } = n;
114
- return Me({
115
- root: ["root", o && "disabled", i && "highlighted", c && "selected"]
116
- }, ke(st));
111
+ return Ie({
112
+ root: ["root", o && "disabled", i && "highlighted", a && "selected"]
113
+ }, Ne(nt));
117
114
  }
118
- const ct = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, i) {
119
- var c, r;
115
+ const it = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, i) {
116
+ var a, r;
120
117
  const {
121
- children: u,
122
- disabled: f = !1,
123
- label: b,
118
+ children: c,
119
+ disabled: p = !1,
120
+ label: f,
124
121
  slotProps: d = {},
125
- slots: R = {},
126
- value: V
127
- } = o, x = Ne(o, it), _ = (c = R.root) != null ? c : "li", g = s.useRef(null), I = Y(g, i), O = b ?? (typeof u == "string" ? u : (r = g.current) == null || (r = r.textContent) == null ? void 0 : r.trim()), {
128
- getRootProps: N,
129
- selected: L,
130
- highlighted: p,
122
+ slots: v = {},
123
+ value: I
124
+ } = o, x = ke(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()), {
125
+ getRootProps: M,
126
+ selected: B,
127
+ highlighted: b,
131
128
  index: C
132
- } = rt({
133
- disabled: f,
129
+ } = lt({
130
+ disabled: p,
134
131
  label: O,
135
- rootRef: I,
136
- value: V
137
- }), P = m({}, o, {
138
- disabled: f,
139
- highlighted: p,
132
+ rootRef: N,
133
+ value: I
134
+ }), P = g({}, o, {
135
+ disabled: p,
136
+ highlighted: b,
140
137
  index: C,
141
- selected: L
142
- }), M = ut(P), S = se({
143
- getSlotProps: N,
144
- elementType: _,
138
+ selected: B
139
+ }), j = ut(P), _ = le({
140
+ getSlotProps: M,
141
+ elementType: y,
145
142
  externalSlotProps: d.root,
146
143
  externalForwardedProps: x,
147
- className: M.root,
144
+ className: j.root,
148
145
  ownerState: P
149
146
  });
150
- return /* @__PURE__ */ h(_, m({}, S, {
151
- children: u
147
+ return /* @__PURE__ */ h(y, g({}, _, {
148
+ children: c
152
149
  }));
153
- })), Ee = /* @__PURE__ */ s.forwardRef(function(o, i) {
150
+ })), Le = /* @__PURE__ */ s.forwardRef(function(o, i) {
154
151
  const {
155
- value: c
152
+ value: a
156
153
  } = o, {
157
154
  contextValue: r
158
- } = at(c);
159
- return /* @__PURE__ */ h(Se.Provider, {
155
+ } = st(a);
156
+ return /* @__PURE__ */ h(ye.Provider, {
160
157
  value: r,
161
- children: /* @__PURE__ */ h(ct, m({}, o, {
158
+ children: /* @__PURE__ */ h(it, g({}, o, {
162
159
  ref: i
163
160
  }))
164
161
  });
165
162
  });
166
- process.env.NODE_ENV !== "production" && (Ee.propTypes = {
163
+ process.env.NODE_ENV !== "production" && (Le.propTypes = {
167
164
  // ┌────────────────────────────── Warning ──────────────────────────────┐
168
165
  // │ These PropTypes are generated from the TypeScript type definitions. │
169
166
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -206,7 +203,7 @@ process.env.NODE_ENV !== "production" && (Ee.propTypes = {
206
203
  */
207
204
  value: l.any.isRequired
208
205
  });
209
- const ie = {
206
+ const re = {
210
207
  buttonClick: "buttonClick",
211
208
  browserAutoFill: "browserAutoFill"
212
209
  }, Be = (n) => {
@@ -216,478 +213,478 @@ const ie = {
216
213
  } = n;
217
214
  return typeof o == "string" ? o : typeof i == "string" ? i : String(n);
218
215
  };
219
- function dt(n, o) {
216
+ function at(n, o) {
220
217
  const {
221
218
  open: i
222
219
  } = n, {
223
220
  context: {
224
- selectionMode: c
221
+ selectionMode: a
225
222
  }
226
223
  } = o;
227
- if (o.type === ie.buttonClick) {
224
+ if (o.type === re.buttonClick) {
228
225
  var r;
229
- const d = (r = n.selectedValues[0]) != null ? r : Re(null, "start", o.context);
230
- return m({}, n, {
226
+ const d = (r = n.selectedValues[0]) != null ? r : ve(null, "start", o.context);
227
+ return g({}, n, {
231
228
  open: !i,
232
229
  highlightedValue: i ? null : d
233
230
  });
234
231
  }
235
- if (o.type === ie.browserAutoFill)
236
- return et(o.item, n, o.context);
237
- const u = tt(n, o);
232
+ if (o.type === re.browserAutoFill)
233
+ return Ye(o.item, n, o.context);
234
+ const c = Ze(n, o);
238
235
  switch (o.type) {
239
- case X.keyDown:
236
+ case Q.keyDown:
240
237
  if (n.open) {
241
238
  if (o.event.key === "Escape")
242
- return m({}, u, {
239
+ return g({}, c, {
243
240
  open: !1
244
241
  });
245
242
  } else {
246
243
  if (o.event.key === "ArrowDown") {
247
- var f;
248
- return m({}, n, {
244
+ var p;
245
+ return g({}, n, {
249
246
  open: !0,
250
- highlightedValue: (f = n.selectedValues[0]) != null ? f : Re(null, "start", o.context)
247
+ highlightedValue: (p = n.selectedValues[0]) != null ? p : ve(null, "start", o.context)
251
248
  });
252
249
  }
253
250
  if (o.event.key === "ArrowUp") {
254
- var b;
255
- return m({}, n, {
251
+ var f;
252
+ return g({}, n, {
256
253
  open: !0,
257
- highlightedValue: (b = n.selectedValues[0]) != null ? b : Re(null, "end", o.context)
254
+ highlightedValue: (f = n.selectedValues[0]) != null ? f : ve(null, "end", o.context)
258
255
  });
259
256
  }
260
257
  }
261
258
  break;
262
- case X.itemClick:
263
- if (c === "single")
264
- return m({}, u, {
259
+ case Q.itemClick:
260
+ if (a === "single")
261
+ return g({}, c, {
265
262
  open: !1
266
263
  });
267
264
  break;
268
- case X.blur:
269
- return m({}, u, {
265
+ case Q.blur:
266
+ return g({}, c, {
270
267
  open: !1
271
268
  });
272
269
  default:
273
- return u;
270
+ return c;
274
271
  }
275
- return u;
272
+ return c;
276
273
  }
277
- function pt(n) {
274
+ function ct(n) {
278
275
  return Array.isArray(n) ? n.length === 0 ? "" : JSON.stringify(n.map((o) => o.value)) : (n == null ? void 0 : n.value) == null ? "" : typeof n.value == "string" || typeof n.value == "number" ? n.value : JSON.stringify(n.value);
279
276
  }
280
- function ft(n) {
277
+ function dt(n) {
281
278
  const {
282
279
  areOptionsEqual: o,
283
280
  buttonRef: i,
284
- defaultOpen: c = !1,
281
+ defaultOpen: a = !1,
285
282
  defaultValue: r,
286
- disabled: u = !1,
287
- listboxId: f,
288
- listboxRef: b,
283
+ disabled: c = !1,
284
+ listboxId: p,
285
+ listboxRef: f,
289
286
  multiple: d = !1,
290
- name: R,
291
- required: V,
287
+ name: v,
288
+ required: I,
292
289
  onChange: x,
293
- onHighlightChange: _,
294
- onOpenChange: g,
295
- open: I,
290
+ onHighlightChange: y,
291
+ onOpenChange: R,
292
+ open: N,
296
293
  options: O,
297
- getOptionAsString: N = Be,
298
- getSerializedValue: L = pt,
299
- value: p,
294
+ getOptionAsString: M = Be,
295
+ getSerializedValue: B = ct,
296
+ value: b,
300
297
  componentName: C = "useSelect"
301
- } = n, P = s.useRef(null), M = Y(i, P), S = s.useRef(null), E = Le(f);
302
- let $;
303
- p === void 0 && r === void 0 ? $ = [] : r !== void 0 && (d ? $ = r : $ = r == null ? [] : [r]);
304
- const Z = s.useMemo(() => {
305
- if (p !== void 0)
306
- return d ? p : p == null ? [] : [p];
307
- }, [p, d]), {
308
- subitems: B,
309
- contextValue: q
310
- } = Xe(), k = s.useMemo(() => O != null ? new Map(O.map((e, t) => [e.value, {
298
+ } = n, P = s.useRef(null), j = X(i, P), _ = s.useRef(null), $ = Te(p);
299
+ let E;
300
+ b === void 0 && r === void 0 ? E = [] : r !== void 0 && (d ? E = r : E = r == null ? [] : [r]);
301
+ const Y = s.useMemo(() => {
302
+ if (b !== void 0)
303
+ return d ? b : b == null ? [] : [b];
304
+ }, [b, d]), {
305
+ subitems: T,
306
+ contextValue: F
307
+ } = Ge(), V = s.useMemo(() => O != null ? new Map(O.map((e, t) => [e.value, {
311
308
  value: e.value,
312
309
  label: e.label,
313
310
  disabled: e.disabled,
314
311
  ref: /* @__PURE__ */ s.createRef(),
315
- id: `${E}_${t}`
316
- }])) : B, [O, B, E]), ue = Y(b, S), {
317
- getRootProps: ee,
318
- active: ce,
319
- focusVisible: de,
320
- rootRef: K
321
- } = Te({
322
- disabled: u,
323
- rootRef: M
324
- }), j = s.useMemo(() => Array.from(k.keys()), [k]), w = s.useCallback((e) => {
312
+ id: `${$}_${t}`
313
+ }])) : T, [O, T, $]), ue = X(f, _), {
314
+ getRootProps: Z,
315
+ active: ie,
316
+ focusVisible: ae,
317
+ rootRef: U
318
+ } = Me({
319
+ disabled: c,
320
+ rootRef: j
321
+ }), q = s.useMemo(() => Array.from(V.keys()), [V]), S = s.useCallback((e) => {
325
322
  if (o !== void 0) {
326
- const t = j.find((a) => o(a, e));
327
- return k.get(t);
323
+ const t = q.find((u) => o(u, e));
324
+ return V.get(t);
328
325
  }
329
- return k.get(e);
330
- }, [k, o, j]), te = s.useCallback((e) => {
326
+ return V.get(e);
327
+ }, [V, o, q]), ee = s.useCallback((e) => {
331
328
  var t;
332
- const a = w(e);
333
- return (t = a == null ? void 0 : a.disabled) != null ? t : !1;
334
- }, [w]), oe = s.useCallback((e) => {
335
- const t = w(e);
336
- return t ? N(t) : "";
337
- }, [w, N]), pe = s.useMemo(() => ({
338
- selectedValues: Z,
339
- open: I
340
- }), [Z, I]), fe = s.useCallback((e) => {
329
+ const u = S(e);
330
+ return (t = u == null ? void 0 : u.disabled) != null ? t : !1;
331
+ }, [S]), te = s.useCallback((e) => {
332
+ const t = S(e);
333
+ return t ? M(t) : "";
334
+ }, [S, M]), ce = s.useMemo(() => ({
335
+ selectedValues: Y,
336
+ open: N
337
+ }), [Y, N]), de = s.useCallback((e) => {
341
338
  var t;
342
- return (t = k.get(e)) == null ? void 0 : t.id;
343
- }, [k]), be = s.useCallback((e, t) => {
339
+ return (t = V.get(e)) == null ? void 0 : t.id;
340
+ }, [V]), pe = s.useCallback((e, t) => {
344
341
  if (d)
345
342
  x == null || x(e, t);
346
343
  else {
347
- var a;
348
- x == null || x(e, (a = t[0]) != null ? a : null);
344
+ var u;
345
+ x == null || x(e, (u = t[0]) != null ? u : null);
349
346
  }
350
- }, [d, x]), me = s.useCallback((e, t) => {
351
- _ == null || _(e, t ?? null);
352
- }, [_]), ge = s.useCallback((e, t, a) => {
353
- if (t === "open" && (g == null || g(a), a === !1 && (e == null ? void 0 : e.type) !== "blur")) {
354
- var v;
355
- (v = P.current) == null || v.focus();
347
+ }, [d, x]), fe = s.useCallback((e, t) => {
348
+ y == null || y(e, t ?? null);
349
+ }, [y]), be = s.useCallback((e, t, u) => {
350
+ if (t === "open" && (R == null || R(u), u === !1 && (e == null ? void 0 : e.type) !== "blur")) {
351
+ var m;
352
+ (m = P.current) == null || m.focus();
356
353
  }
357
- }, [g]), he = s.useCallback((e) => {
358
- var t, a;
359
- return e == null ? null : (t = (a = B.get(e)) == null ? void 0 : a.ref.current) != null ? t : null;
360
- }, [B]), xe = {
354
+ }, [R]), ge = s.useCallback((e) => {
355
+ var t, u;
356
+ return e == null ? null : (t = (u = T.get(e)) == null ? void 0 : u.ref.current) != null ? t : null;
357
+ }, [T]), me = {
361
358
  getInitialState: () => {
362
359
  var e;
363
360
  return {
364
361
  highlightedValue: null,
365
- selectedValues: (e = $) != null ? e : [],
366
- open: c
362
+ selectedValues: (e = E) != null ? e : [],
363
+ open: a
367
364
  };
368
365
  },
369
- getItemId: fe,
370
- controlledProps: pe,
366
+ getItemId: de,
367
+ controlledProps: ce,
371
368
  focusManagement: "DOM",
372
- getItemDomElement: he,
369
+ getItemDomElement: ge,
373
370
  itemComparer: o,
374
- isItemDisabled: te,
371
+ isItemDisabled: ee,
375
372
  rootRef: ue,
376
- onChange: be,
377
- onHighlightChange: me,
378
- onStateChange: ge,
373
+ onChange: pe,
374
+ onHighlightChange: fe,
375
+ onStateChange: be,
379
376
  reducerActionContext: s.useMemo(() => ({
380
377
  multiple: d
381
378
  }), [d]),
382
- items: j,
383
- getItemAsString: oe,
379
+ items: q,
380
+ getItemAsString: te,
384
381
  selectionMode: d ? "multiple" : "single",
385
- stateReducer: dt,
382
+ stateReducer: at,
386
383
  componentName: C
387
384
  }, {
388
- dispatch: H,
389
- getRootProps: Ce,
390
- contextValue: z,
385
+ dispatch: D,
386
+ getRootProps: he,
387
+ contextValue: K,
391
388
  state: {
392
- open: T,
393
- highlightedValue: D,
394
- selectedValues: A
389
+ open: w,
390
+ highlightedValue: A,
391
+ selectedValues: k
395
392
  },
396
- rootRef: W
397
- } = ot(xe), Pe = s.useRef(T);
398
- nt(() => {
399
- if (T && D !== null) {
393
+ rootRef: z
394
+ } = et(me), xe = s.useRef(w);
395
+ tt(() => {
396
+ if (w && A !== null) {
400
397
  var e;
401
- const t = (e = w(D)) == null ? void 0 : e.ref;
402
- if (!S.current || !(t != null && t.current))
398
+ const t = (e = S(A)) == null ? void 0 : e.ref;
399
+ if (!_.current || !(t != null && t.current))
403
400
  return;
404
- Pe.current || t.current.focus({
401
+ xe.current || t.current.focus({
405
402
  preventScroll: !0
406
403
  });
407
- const a = S.current.getBoundingClientRect(), v = t.current.getBoundingClientRect();
408
- v.top < a.top ? S.current.scrollTop -= a.top - v.top : v.bottom > a.bottom && (S.current.scrollTop += v.bottom - a.bottom);
404
+ const u = _.current.getBoundingClientRect(), m = t.current.getBoundingClientRect();
405
+ m.top < u.top ? _.current.scrollTop -= u.top - m.top : m.bottom > u.bottom && (_.current.scrollTop += m.bottom - u.bottom);
409
406
  }
410
- }, [T, D, w]);
411
- const J = s.useCallback((e) => w(e), [w]), ve = (e) => (t) => {
412
- var a;
413
- if (e == null || (a = e.onClick) == null || a.call(e, t), !t.defaultMuiPrevented) {
414
- const v = {
415
- type: ie.buttonClick,
407
+ }, [w, A, S]);
408
+ const J = s.useCallback((e) => S(e), [S]), Ce = (e) => (t) => {
409
+ var u;
410
+ if (e == null || (u = e.onClick) == null || u.call(e, t), !t.defaultMuiPrevented) {
411
+ const m = {
412
+ type: re.buttonClick,
416
413
  event: t
417
414
  };
418
- H(v);
415
+ D(m);
419
416
  }
420
- }, G = (e) => (t) => {
421
- var a;
422
- (a = e.onKeyDown) == null || a.call(e, t), !t.defaultMuiPrevented && (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), H({
423
- type: X.keyDown,
417
+ }, W = (e) => (t) => {
418
+ var u;
419
+ (u = e.onKeyDown) == null || u.call(e, t), !t.defaultMuiPrevented && (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), D({
420
+ type: Q.keyDown,
424
421
  key: t.key,
425
422
  event: t
426
423
  }));
427
- }, ne = (e = {}) => ({
428
- onClick: ve(e),
429
- onKeyDown: G(e)
430
- }), F = (e = {}) => m({}, e, ne(e), {
424
+ }, oe = (e = {}) => ({
425
+ onClick: Ce(e),
426
+ onKeyDown: W(e)
427
+ }), H = (e = {}) => g({}, e, oe(e), {
431
428
  role: "combobox",
432
- "aria-expanded": T,
433
- "aria-controls": E
429
+ "aria-expanded": w,
430
+ "aria-controls": $
434
431
  }), He = (e = {}) => {
435
- const t = le(e), a = ae(F, ee);
436
- return m({}, e, a(t));
437
- }, Fe = (e) => (t) => {
438
- var a, v;
439
- (a = e.onBlur) == null || a.call(e, t), !t.defaultMuiPrevented && ((v = S.current) != null && v.contains(t.relatedTarget) || t.relatedTarget === P.current) && (t.defaultMuiPrevented = !0);
440
- }, qe = (e = {}) => ({
441
- onBlur: Fe(e)
442
- }), je = (e = {}) => {
443
- const t = le(e), a = ae(qe, Ce);
444
- return m({
445
- id: E,
432
+ const t = ne(e), u = se(H, Z);
433
+ return g({}, e, u(t));
434
+ }, $e = (e) => (t) => {
435
+ var u, m;
436
+ (u = e.onBlur) == null || u.call(e, t), !t.defaultMuiPrevented && ((m = _.current) != null && m.contains(t.relatedTarget) || t.relatedTarget === P.current) && (t.defaultMuiPrevented = !0);
437
+ }, Fe = (e = {}) => ({
438
+ onBlur: $e(e)
439
+ }), qe = (e = {}) => {
440
+ const t = ne(e), u = se(Fe, he);
441
+ return g({
442
+ id: $,
446
443
  role: "listbox",
447
444
  "aria-multiselectable": d ? "true" : void 0
448
- }, e, a(t));
445
+ }, e, u(t));
449
446
  };
450
447
  s.useDebugValue({
451
- selectedOptions: A,
452
- highlightedOption: D,
453
- open: T
448
+ selectedOptions: k,
449
+ highlightedOption: A,
450
+ open: w
454
451
  });
455
- const Ue = s.useMemo(() => m({}, z, q), [z, q]);
456
- let Q;
457
- n.multiple ? Q = A : Q = A.length > 0 ? A[0] : null;
458
- let ye;
452
+ const je = s.useMemo(() => g({}, K, F), [K, F]);
453
+ let G;
454
+ n.multiple ? G = k : G = k.length > 0 ? k[0] : null;
455
+ let Pe;
459
456
  if (d)
460
- ye = Q.map((e) => J(e)).filter((e) => e !== void 0);
457
+ Pe = G.map((e) => J(e)).filter((e) => e !== void 0);
461
458
  else {
462
- var Oe;
463
- ye = (Oe = J(Q)) != null ? Oe : null;
459
+ var Re;
460
+ Pe = (Re = J(G)) != null ? Re : null;
464
461
  }
465
- const Ke = (e) => (t) => {
466
- var a;
467
- if (e == null || (a = e.onChange) == null || a.call(e, t), t.defaultMuiPrevented)
462
+ const Ue = (e) => (t) => {
463
+ var u;
464
+ if (e == null || (u = e.onChange) == null || u.call(e, t), t.defaultMuiPrevented)
468
465
  return;
469
- const v = k.get(t.target.value);
470
- t.target.value === "" ? H({
471
- type: X.clearSelection
472
- }) : v !== void 0 && H({
473
- type: ie.browserAutoFill,
474
- item: v.value,
466
+ const m = V.get(t.target.value);
467
+ t.target.value === "" ? D({
468
+ type: Q.clearSelection
469
+ }) : m !== void 0 && D({
470
+ type: re.browserAutoFill,
471
+ item: m.value,
475
472
  event: t
476
473
  });
477
474
  };
478
475
  return {
479
- buttonActive: ce,
480
- buttonFocusVisible: de,
481
- buttonRef: K,
482
- contextValue: Ue,
483
- disabled: u,
484
- dispatch: H,
476
+ buttonActive: ie,
477
+ buttonFocusVisible: ae,
478
+ buttonRef: U,
479
+ contextValue: je,
480
+ disabled: c,
481
+ dispatch: D,
485
482
  getButtonProps: He,
486
483
  getHiddenInputProps: (e = {}) => {
487
- const t = le(e);
488
- return m({
489
- name: R,
484
+ const t = ne(e);
485
+ return g({
486
+ name: v,
490
487
  tabIndex: -1,
491
488
  "aria-hidden": !0,
492
- required: V ? !0 : void 0,
493
- value: L(ye),
494
- style: lt
489
+ required: I ? !0 : void 0,
490
+ value: B(Pe),
491
+ style: ot
495
492
  }, e, {
496
- onChange: Ke(t)
493
+ onChange: Ue(t)
497
494
  });
498
495
  },
499
- getListboxProps: je,
496
+ getListboxProps: qe,
500
497
  getOptionMetadata: J,
501
- listboxRef: W,
502
- open: T,
503
- options: j,
504
- value: Q,
505
- highlightedOption: D
498
+ listboxRef: z,
499
+ open: w,
500
+ options: q,
501
+ value: G,
502
+ highlightedOption: A
506
503
  };
507
504
  }
508
- function bt(n) {
505
+ function pt(n) {
509
506
  const {
510
507
  value: o,
511
508
  children: i
512
509
  } = n, {
513
- dispatch: c,
510
+ dispatch: a,
514
511
  getItemIndex: r,
515
- getItemState: u,
516
- registerItem: f,
517
- totalSubitemCount: b
512
+ getItemState: c,
513
+ registerItem: p,
514
+ totalSubitemCount: f
518
515
  } = o, d = s.useMemo(() => ({
519
- dispatch: c,
520
- getItemState: u,
516
+ dispatch: a,
517
+ getItemState: c,
521
518
  getItemIndex: r
522
- }), [c, r, u]), R = s.useMemo(() => ({
519
+ }), [a, r, c]), v = s.useMemo(() => ({
523
520
  getItemIndex: r,
524
- registerItem: f,
525
- totalSubitemCount: b
526
- }), [f, r, b]);
527
- return /* @__PURE__ */ h(Ye.Provider, {
528
- value: R,
529
- children: /* @__PURE__ */ h(Se.Provider, {
521
+ registerItem: p,
522
+ totalSubitemCount: f
523
+ }), [p, r, f]);
524
+ return /* @__PURE__ */ h(Qe.Provider, {
525
+ value: v,
526
+ children: /* @__PURE__ */ h(ye.Provider, {
530
527
  value: d,
531
528
  children: i
532
529
  })
533
530
  });
534
531
  }
535
- const De = "Select";
536
- function mt(n) {
537
- return we(De, n);
532
+ const Ee = "Select";
533
+ function ft(n) {
534
+ return Ve(Ee, n);
538
535
  }
539
- Ie(De, ["root", "button", "listbox", "popup", "active", "expanded", "disabled", "focusVisible"]);
540
- var Ve;
541
- const gt = ["areOptionsEqual", "autoComplete", "autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "required", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "placeholder", "slotProps", "slots", "value"];
542
- function ht(n) {
536
+ we(Ee, ["root", "button", "listbox", "popup", "active", "expanded", "disabled", "focusVisible"]);
537
+ var Se;
538
+ const bt = ["areOptionsEqual", "autoComplete", "autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "required", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "placeholder", "slotProps", "slots", "value"];
539
+ function gt(n) {
543
540
  var o;
544
541
  return Array.isArray(n) ? /* @__PURE__ */ h(s.Fragment, {
545
542
  children: n.map((i) => i.label).join(", ")
546
543
  }) : (o = n == null ? void 0 : n.label) != null ? o : null;
547
544
  }
548
- function xt(n) {
545
+ function mt(n) {
549
546
  const {
550
547
  active: o,
551
548
  disabled: i,
552
- open: c,
549
+ open: a,
553
550
  focusVisible: r
554
551
  } = n;
555
- return Me({
556
- root: ["root", i && "disabled", r && "focusVisible", o && "active", c && "expanded"],
552
+ return Ie({
553
+ root: ["root", i && "disabled", r && "focusVisible", o && "active", a && "expanded"],
557
554
  listbox: ["listbox", i && "disabled"],
558
555
  popup: ["popup"]
559
- }, ke(mt));
556
+ }, Ne(ft));
560
557
  }
561
- const $e = /* @__PURE__ */ s.forwardRef(function(o, i) {
562
- var c, r, u, f, b;
558
+ const De = /* @__PURE__ */ s.forwardRef(function(o, i) {
559
+ var a, r, c, p, f;
563
560
  const {
564
561
  areOptionsEqual: d,
565
- autoComplete: R,
566
- autoFocus: V,
562
+ autoComplete: v,
563
+ autoFocus: I,
567
564
  children: x,
568
- defaultValue: _,
569
- defaultListboxOpen: g = !1,
570
- disabled: I,
565
+ defaultValue: y,
566
+ defaultListboxOpen: R = !1,
567
+ disabled: N,
571
568
  getSerializedValue: O,
572
- listboxId: N,
573
- listboxOpen: L,
574
- multiple: p = !1,
569
+ listboxId: M,
570
+ listboxOpen: B,
571
+ multiple: b = !1,
575
572
  name: C,
576
573
  required: P = !1,
577
- onChange: M,
578
- onListboxOpenChange: S,
579
- getOptionAsString: E = Be,
580
- renderValue: $,
581
- placeholder: Z,
582
- slotProps: B = {},
583
- slots: q = {},
584
- value: k
585
- } = o, ue = Ne(o, gt), ee = $ ?? ht, [ce, de] = s.useState(!1), K = s.useRef(null), j = s.useRef(null), w = (c = q.root) != null ? c : "button", te = (r = q.listbox) != null ? r : "ul", oe = (u = q.popup) != null ? u : "div", pe = s.useCallback((F) => {
586
- de(F != null);
587
- }, []), fe = Y(i, K, pe);
574
+ onChange: j,
575
+ onListboxOpenChange: _,
576
+ getOptionAsString: $ = Be,
577
+ renderValue: E,
578
+ placeholder: Y,
579
+ slotProps: T = {},
580
+ slots: F = {},
581
+ value: V
582
+ } = o, ue = ke(o, bt), Z = E ?? gt, [ie, 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((H) => {
583
+ ae(H != null);
584
+ }, []), de = X(i, U, ce);
588
585
  s.useEffect(() => {
589
- V && K.current.focus();
590
- }, [V]);
586
+ I && U.current.focus();
587
+ }, [I]);
591
588
  const {
592
- buttonActive: be,
593
- buttonFocusVisible: me,
594
- contextValue: ge,
595
- disabled: he,
596
- getButtonProps: xe,
597
- getListboxProps: H,
598
- getHiddenInputProps: Ce,
599
- getOptionMetadata: z,
600
- value: T,
601
- open: D
602
- } = ft({
589
+ buttonActive: pe,
590
+ buttonFocusVisible: fe,
591
+ contextValue: be,
592
+ disabled: ge,
593
+ getButtonProps: me,
594
+ getListboxProps: D,
595
+ getHiddenInputProps: he,
596
+ getOptionMetadata: K,
597
+ value: w,
598
+ open: A
599
+ } = dt({
603
600
  name: C,
604
601
  required: P,
605
602
  getSerializedValue: O,
606
603
  areOptionsEqual: d,
607
- buttonRef: fe,
608
- defaultOpen: g,
609
- defaultValue: _,
610
- disabled: I,
611
- listboxId: N,
612
- multiple: p,
613
- open: L,
614
- onChange: M,
615
- onOpenChange: S,
616
- getOptionAsString: E,
617
- value: k,
604
+ buttonRef: de,
605
+ defaultOpen: R,
606
+ defaultValue: y,
607
+ disabled: N,
608
+ listboxId: M,
609
+ multiple: b,
610
+ open: B,
611
+ onChange: j,
612
+ onOpenChange: _,
613
+ getOptionAsString: $,
614
+ value: V,
618
615
  componentName: "Select"
619
- }), A = m({}, o, {
620
- active: be,
621
- defaultListboxOpen: g,
622
- disabled: he,
623
- focusVisible: me,
624
- open: D,
625
- multiple: p,
626
- renderValue: ee,
627
- value: T
628
- }), W = xt(A), Pe = se({
629
- elementType: w,
630
- getSlotProps: xe,
631
- externalSlotProps: B.root,
616
+ }), k = g({}, o, {
617
+ active: pe,
618
+ defaultListboxOpen: R,
619
+ disabled: ge,
620
+ focusVisible: fe,
621
+ open: A,
622
+ multiple: b,
623
+ renderValue: Z,
624
+ value: w
625
+ }), z = mt(k), xe = le({
626
+ elementType: S,
627
+ getSlotProps: me,
628
+ externalSlotProps: T.root,
632
629
  externalForwardedProps: ue,
633
- ownerState: A,
634
- className: W.root
635
- }), J = se({
636
- elementType: te,
637
- getSlotProps: H,
638
- externalSlotProps: B.listbox,
630
+ ownerState: k,
631
+ className: z.root
632
+ }), J = le({
633
+ elementType: ee,
634
+ getSlotProps: D,
635
+ externalSlotProps: T.listbox,
639
636
  additionalProps: {
640
- ref: j
637
+ ref: q
641
638
  },
642
- ownerState: A,
643
- className: W.listbox
644
- }), ve = se({
645
- elementType: oe,
646
- externalSlotProps: B.popup,
639
+ ownerState: k,
640
+ className: z.listbox
641
+ }), Ce = le({
642
+ elementType: te,
643
+ externalSlotProps: T.popup,
647
644
  additionalProps: {
648
- anchor: K.current,
645
+ anchor: U.current,
649
646
  keepMounted: !0,
650
- open: D,
647
+ open: A,
651
648
  placement: "bottom-start",
652
649
  role: void 0
653
650
  },
654
- ownerState: A,
655
- className: W.popup
651
+ ownerState: k,
652
+ className: z.popup
656
653
  });
657
- let G;
658
- if (p)
659
- G = T.map((F) => z(F)).filter((F) => F !== void 0);
654
+ let W;
655
+ if (b)
656
+ W = w.map((H) => K(H)).filter((H) => H !== void 0);
660
657
  else {
661
- var ne;
662
- G = (ne = z(T)) != null ? ne : null;
658
+ var oe;
659
+ W = (oe = K(w)) != null ? oe : null;
663
660
  }
664
- return /* @__PURE__ */ re(s.Fragment, {
665
- children: [/* @__PURE__ */ h(w, m({}, Pe, {
666
- children: (f = (b = ee(G)) != null ? b : Z) != null ? f : (
661
+ return /* @__PURE__ */ Oe(s.Fragment, {
662
+ children: [/* @__PURE__ */ h(S, g({}, xe, {
663
+ children: (p = (f = Z(W)) != null ? f : Y) != null ? p : (
667
664
  // fall back to a zero-width space to prevent layout shift
668
665
  // from https://github.com/mui/material-ui/pull/24563
669
- Ve || (Ve = /* @__PURE__ */ h("span", {
666
+ Se || (Se = /* @__PURE__ */ h("span", {
670
667
  className: "notranslate",
671
668
  children: "​"
672
669
  }))
673
670
  )
674
- })), ce && /* @__PURE__ */ h(Ze, m({
671
+ })), ie && /* @__PURE__ */ h(Xe, g({
675
672
  slots: {
676
- root: oe
673
+ root: te
677
674
  }
678
- }, ve, {
679
- children: /* @__PURE__ */ h(te, m({}, J, {
680
- children: /* @__PURE__ */ h(bt, {
681
- value: ge,
675
+ }, Ce, {
676
+ children: /* @__PURE__ */ h(ee, g({}, J, {
677
+ children: /* @__PURE__ */ h(pt, {
678
+ value: be,
682
679
  children: x
683
680
  })
684
681
  }))
685
- })), /* @__PURE__ */ h("input", m({}, Ce(), {
686
- autoComplete: R
682
+ })), /* @__PURE__ */ h("input", g({}, he(), {
683
+ autoComplete: v
687
684
  }))]
688
685
  });
689
686
  });
690
- process.env.NODE_ENV !== "production" && ($e.propTypes = {
687
+ process.env.NODE_ENV !== "production" && (De.propTypes = {
691
688
  // ┌────────────────────────────── Warning ──────────────────────────────┐
692
689
  // │ These PropTypes are generated from the TypeScript type definitions. │
693
690
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -814,107 +811,47 @@ process.env.NODE_ENV !== "production" && ($e.propTypes = {
814
811
  */
815
812
  value: l.any
816
813
  });
817
- const Ct = (n) => {
818
- const { children: o, icon: i, className: c, ...r } = n;
819
- return /* @__PURE__ */ re(
820
- Ee,
814
+ const ht = (n) => {
815
+ const { children: o, icon: i, className: a, ...r } = n;
816
+ return /* @__PURE__ */ Oe(
817
+ Le,
821
818
  {
822
819
  ...r,
823
820
  slotProps: {
824
- root: (u) => ({
825
- className: U(y.select__listbox__option, c, {
826
- [y["select__listbox__option--disabled"]]: u.disabled,
827
- [y["select__listbox__option--selected"]]: u.selected
821
+ root: (c) => ({
822
+ className: _e(L.select__listbox__option, a, {
823
+ [L["select__listbox__option--disabled"]]: c.disabled,
824
+ [L["select__listbox__option--selected"]]: c.selected
828
825
  })
829
826
  })
830
827
  },
831
828
  children: [
832
- i ? /* @__PURE__ */ h("span", { className: y.select__listbox__option__icon, children: i }) : "",
833
- /* @__PURE__ */ h(_e, { className: y.select__listbox__option__text, children: o })
829
+ i ? /* @__PURE__ */ h("span", { className: L.select__listbox__option__icon, children: i }) : "",
830
+ /* @__PURE__ */ h(Ke, { className: L.select__listbox__option__text, children: o })
834
831
  ]
835
832
  }
836
833
  );
837
- }, Pt = (n) => {
838
- const {
839
- children: o,
840
- className: i,
841
- id: c,
842
- onChange: r,
843
- label: u,
844
- classNameWrapper: f,
845
- classNameLabel: b,
846
- testIdLabel: d,
847
- testIdWrapper: R,
848
- fullWidth: V = !0,
849
- infoMessage: x,
850
- error: _,
851
- errorMessage: g,
852
- classNameInfoMessage: I,
853
- classNameErrorMessage: O,
854
- "data-testid-infoMessage": N,
855
- "data-testid-errorMessage": L,
856
- ...p
857
- } = n, C = (S, E) => {
858
- S && (r == null || r(E, S));
859
- }, P = ze(), M = c || `select_${P}`;
860
- return /* @__PURE__ */ re(
861
- "div",
834
+ }, xt = (n) => {
835
+ const { children: o, className: i, onChange: a, ...r } = n;
836
+ return /* @__PURE__ */ h(
837
+ De,
862
838
  {
863
- className: U(
864
- y.select__wrapper,
865
- !V && y["select__wrapper--fit-content-width"],
866
- f
867
- ),
868
- "data-testid": R,
869
- id: `${M}_wrapper`,
870
- children: [
871
- u && /* @__PURE__ */ h(
872
- _e,
873
- {
874
- element: "label",
875
- elementProps: { htmlFor: M, id: `${M}_label` },
876
- className: U(y.select__label, b),
877
- "data-testid": d,
878
- children: u
879
- }
880
- ),
881
- /* @__PURE__ */ h(
882
- $e,
883
- {
884
- ...p,
885
- id: M,
886
- onChange: C,
887
- className: U(y.select, i, (_ || g) && y["select-button--error"]),
888
- slots: { root: Je },
889
- slotProps: {
890
- root: { fullWidth: V, placeholder: p.placeholder },
891
- listbox: { className: y.select__listbox },
892
- popup: {
893
- className: y.select__popup,
894
- disablePortal: !0,
895
- strategy: "absolute"
896
- }
897
- },
898
- children: o
899
- }
900
- ),
901
- /* @__PURE__ */ h("div", { className: y["messages-wrapper"], children: (g || x) && /* @__PURE__ */ re(
902
- _e,
903
- {
904
- className: g ? U(y["error-message"], O) : U(y["info-message"], I),
905
- "data-testid": g ? L : N,
906
- children: [
907
- /* @__PURE__ */ h(We, { icon: g ? "circle-exclamation" : "circle-info" }),
908
- g || x
909
- ]
910
- }
911
- ) })
912
- ]
839
+ ...r,
840
+ onChange: (p, f) => {
841
+ p && (a == null || a(f, p));
842
+ },
843
+ className: _e(L.select, i),
844
+ slots: { root: ze },
845
+ slotProps: {
846
+ listbox: { className: L.select__listbox },
847
+ popup: { className: L.select__popup, strategy: "fixed" }
848
+ },
849
+ children: o
913
850
  }
914
851
  );
915
852
  };
916
- Pt.Option = Ct;
853
+ xt.Option = ht;
917
854
  export {
918
- Pt as Select,
919
- Ct as SelectOption
855
+ xt as Select,
856
+ ht as SelectOption
920
857
  };