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

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