@pismo/marola 1.0.0-beta.9 → 1.0.0

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