@pismo/marola 1.0.0-beta.69 → 1.0.0-beta.8

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