@pismo/marola 2.1.64 → 2.1.66

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 (114) hide show
  1. package/dist/Button-CJaBSdv1.js +135 -0
  2. package/dist/ClassNameConfigurator-CVRWfyIa.js +847 -0
  3. package/dist/{ClickAwayListener-Z08peX_P.js → ClickAwayListener-BnYMO5Ki.js} +26 -33
  4. package/dist/Popup-D267EI4e.js +1338 -0
  5. package/dist/{Portal-DJapUCn6.js → Portal-BrGvxB96.js} +32 -36
  6. package/dist/RadioOption-DyRY8xlF.js +1094 -0
  7. package/dist/{Toggle-DcZTfLrC.js → Toggle-nnDfpqI1.js} +31 -31
  8. package/dist/assets/Checkbox.css +1 -1
  9. package/dist/assets/DropdownMenu.css +1 -1
  10. package/dist/assets/ToastCard.css +1 -1
  11. package/dist/assets/Toggle2.css +1 -1
  12. package/dist/combineHooksSlotProps-j-8UVeYo.js +86 -0
  13. package/dist/components/Alert/Alert.stories.d.ts +6 -6
  14. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.js +311 -320
  16. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
  17. package/dist/components/Avatar/Avatar.stories.d.ts +4 -4
  18. package/dist/components/BankingCard/BankingCard.d.ts +0 -1
  19. package/dist/components/Button/Button.js +1 -1
  20. package/dist/components/Checkbox/Checkbox.js +56 -56
  21. package/dist/components/Checkbox/Checkbox.stories.d.ts +8 -8
  22. package/dist/components/Chip/Chip.js +3 -3
  23. package/dist/components/DatePicker/DatePicker.js +742 -639
  24. package/dist/components/DatePicker/DatePicker.stories.d.ts +8 -8
  25. package/dist/components/DatePicker/dateUtils.d.ts +2 -2
  26. package/dist/components/DatePicker/dateUtils.js +1 -1
  27. package/dist/components/DatePicker/keyboardNavigation.d.ts +1 -1
  28. package/dist/components/DatePicker/renderCalendarDays.js +1 -1
  29. package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
  30. package/dist/components/Dialog/CloseIconButton.js +1 -1
  31. package/dist/components/Dialog/Dialog.js +372 -352
  32. package/dist/components/Dialog/Dialog.stories.d.ts +96 -135
  33. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.d.ts +1 -1
  34. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.js +2 -2
  35. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.stories.d.ts +1 -1
  36. package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -1
  37. package/dist/components/Draggable/Draggable.d.ts +0 -1
  38. package/dist/components/Draggable/Draggable.js +1 -1
  39. package/dist/components/Draggable/Draggable.stories.d.ts +2 -3
  40. package/dist/components/Draggable/useDraggable.js +1 -1
  41. package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -1
  42. package/dist/components/DropdownMenu/DropdownMenu.js +39 -34
  43. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -4
  44. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +4 -4
  45. package/dist/components/Icon/types.d.ts +1 -1
  46. package/dist/components/IconButton/IconButton.js +1 -1
  47. package/dist/components/Input/Input.js +335 -320
  48. package/dist/components/InputSearch/InputSearch.d.ts +31 -31
  49. package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -31
  50. package/dist/components/Popover/Popover.d.ts +3 -3
  51. package/dist/components/Popover/Popover.js +2 -2
  52. package/dist/components/Popover/Popover.stories.d.ts +3 -3
  53. package/dist/components/Popover/PopoverBody.d.ts +0 -1
  54. package/dist/components/Popover/PopoverFooter.d.ts +0 -1
  55. package/dist/components/Popover/PopoverHeader.d.ts +0 -1
  56. package/dist/components/RadioButton/RadioButton.d.ts +0 -1
  57. package/dist/components/RadioButton/RadioButton.js +684 -769
  58. package/dist/components/RadioButton/RadioOption.d.ts +0 -1
  59. package/dist/components/RadioButton/RadioOption.js +3 -3
  60. package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
  61. package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
  62. package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
  63. package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
  64. package/dist/components/RowItem/RowItem.js +2 -2
  65. package/dist/components/Select/Select.js +625 -591
  66. package/dist/components/Skeleton/Skeleton.d.ts +0 -1
  67. package/dist/components/Snackbar/Snackbar.js +295 -239
  68. package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
  69. package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
  70. package/dist/components/Table/Table.stories.d.ts +5 -5
  71. package/dist/components/Tabs/Tab.js +107 -98
  72. package/dist/components/Tabs/TabPanel.js +58 -55
  73. package/dist/components/Tabs/Tabs.js +246 -231
  74. package/dist/components/ToastCard/ToastCard.js +31 -31
  75. package/dist/components/Toggle/Toggle.js +147 -137
  76. package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
  77. package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
  78. package/dist/components/ToggleGroup/Toggle.js +2 -2
  79. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  80. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  81. package/dist/components/Tooltip/Tooltip.js +266 -325
  82. package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
  83. package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
  84. package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
  85. package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
  86. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
  87. package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
  88. package/dist/getReactElementRef-iorwYm2A.js +19 -0
  89. package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
  90. package/dist/isFocusVisible-CPZqtjv2.js +12 -0
  91. package/dist/main.js +2 -2
  92. package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
  93. package/dist/react-BTbo_5A3.js +526 -0
  94. package/dist/setRef-Bo0HEdBB.js +6 -0
  95. package/dist/useButton-C2E_LFJp.js +90 -0
  96. package/dist/useControlled-BYdyS7Pn.js +31 -0
  97. package/dist/useId-CK6Kn3Tn.js +21 -0
  98. package/dist/useList-BLW78Lq7.js +446 -0
  99. package/dist/utils/draggable.d.ts +2 -2
  100. package/dist/utils/iconsList.js +118 -112
  101. package/package.json +1 -1
  102. package/dist/Button-BrEDdtHO.js +0 -130
  103. package/dist/Popup-Dffqo7wT.js +0 -1246
  104. package/dist/RadioOption-DYovqiwF.js +0 -720
  105. package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
  106. package/dist/exactProp-SYjL19cU.js +0 -13
  107. package/dist/react-BvI-Sw9b.js +0 -509
  108. package/dist/useButton-CezPDte8.js +0 -105
  109. package/dist/useControlled-CCMYYdCM.js +0 -31
  110. package/dist/useId-BW-oWmul.js +0 -19
  111. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  112. package/dist/useList-nqLfZem8.js +0 -435
  113. package/dist/useSlotProps-CYHDC4TN.js +0 -834
  114. package/dist/useTimeout-DxF9kiZL.js +0 -36
@@ -0,0 +1,21 @@
1
+ import * as u from "react";
2
+ let n = 0;
3
+ function o(t) {
4
+ const [e, a] = u.useState(t), c = t || e;
5
+ return u.useEffect(() => {
6
+ e == null && (n += 1, a(`mui-${n}`));
7
+ }, [e]), c;
8
+ }
9
+ const f = {
10
+ ...u
11
+ }, s = f.useId;
12
+ function l(t) {
13
+ if (s !== void 0) {
14
+ const e = s();
15
+ return t ?? e;
16
+ }
17
+ return o(t);
18
+ }
19
+ export {
20
+ l as u
21
+ };
@@ -0,0 +1,446 @@
1
+ import * as d from "react";
2
+ import { L as S } from "./combineHooksSlotProps-j-8UVeYo.js";
3
+ import { u as re, e as ie } from "./ClassNameConfigurator-CVRWfyIa.js";
4
+ function K(t, e, i = (n, r) => n === r) {
5
+ return t.length === e.length && t.every((n, r) => i(n, e[r]));
6
+ }
7
+ function le(t, e) {
8
+ return t === e;
9
+ }
10
+ const A = {}, U = () => {
11
+ };
12
+ function y(t, e) {
13
+ const i = {
14
+ ...t
15
+ };
16
+ return Object.keys(e).forEach((n) => {
17
+ e[n] !== void 0 && (i[n] = e[n]);
18
+ }), i;
19
+ }
20
+ function se(t) {
21
+ const {
22
+ nextState: e,
23
+ initialState: i,
24
+ stateComparers: n,
25
+ onStateChange: r,
26
+ controlledProps: c,
27
+ lastActionRef: l
28
+ } = t, f = d.useRef(i);
29
+ d.useEffect(() => {
30
+ if (l.current === null)
31
+ return;
32
+ const u = y(f.current, c);
33
+ Object.keys(e).forEach((g) => {
34
+ const b = n[g] ?? le, m = e[g], o = u[g];
35
+ (o == null && m != null || o != null && m == null || o != null && m != null && !b(m, o)) && (r == null || r(l.current.event ?? null, g, m, l.current.type ?? "", e));
36
+ }), f.current = e, l.current = null;
37
+ }, [f, e, l, r, n, c]);
38
+ }
39
+ function ue(t) {
40
+ const e = d.useRef(null), {
41
+ reducer: i,
42
+ initialState: n,
43
+ controlledProps: r = A,
44
+ stateComparers: c = A,
45
+ onStateChange: l = U,
46
+ actionContext: f,
47
+ componentName: u = ""
48
+ } = t, g = d.useRef(r);
49
+ process.env.NODE_ENV !== "production" && d.useEffect(() => {
50
+ Object.keys(r).forEach((h) => {
51
+ g.current[h] !== void 0 && r[h] === void 0 && console.error(`useControllableReducer: ${u ? `The ${u} component` : "A component"} is changing a controlled prop to be uncontrolled: ${h}`), g.current[h] === void 0 && r[h] !== void 0 && console.error(`useControllableReducer: ${u ? `The ${u} component` : "A component"} is changing an uncontrolled prop to be controlled: ${h}`);
52
+ });
53
+ }, [r, u]);
54
+ const b = d.useCallback((h, D) => {
55
+ e.current = D;
56
+ const w = y(h, r);
57
+ return i(w, D);
58
+ }, [r, i]), [m, o] = d.useReducer(b, n), C = d.useCallback((h) => {
59
+ o({
60
+ ...h,
61
+ context: f
62
+ });
63
+ }, [f]);
64
+ return se({
65
+ nextState: m,
66
+ initialState: n,
67
+ stateComparers: c ?? A,
68
+ onStateChange: l ?? U,
69
+ controlledProps: r,
70
+ lastActionRef: e
71
+ }), [y(m, r), C];
72
+ }
73
+ function oe(t, e, i, n, r, c) {
74
+ if (i.length === 0 || !n && i.every((f, u) => r(f, u)))
75
+ return -1;
76
+ let l = t;
77
+ for (; ; ) {
78
+ if (!c && e === "next" && l === i.length || !c && e === "previous" && l === -1)
79
+ return -1;
80
+ if (n ? !1 : r(i[l], l))
81
+ l += e === "next" ? 1 : -1, c && (l = (l + i.length) % i.length);
82
+ else
83
+ return l;
84
+ }
85
+ }
86
+ function I(t, e, i) {
87
+ const {
88
+ items: n,
89
+ isItemDisabled: r,
90
+ disableListWrap: c,
91
+ disabledItemsFocusable: l,
92
+ itemComparer: f,
93
+ focusManagement: u
94
+ } = i, g = u === "DOM" ? 0 : -1, b = n.length - 1, m = t == null ? -1 : n.findIndex((w) => f(w, t));
95
+ let o, C, h = !c;
96
+ switch (e) {
97
+ case "reset":
98
+ if (g === -1)
99
+ return null;
100
+ o = 0, C = "next", h = !1;
101
+ break;
102
+ case "start":
103
+ o = 0, C = "next", h = !1;
104
+ break;
105
+ case "end":
106
+ o = b, C = "previous", h = !1;
107
+ break;
108
+ default: {
109
+ const w = m + e;
110
+ w < 0 ? !h && m !== -1 || Math.abs(e) > 1 ? (o = 0, C = "next") : (o = b, C = "previous") : w > b ? !h || Math.abs(e) > 1 ? (o = b, C = "previous") : (o = 0, C = "next") : (o = w, C = e >= 0 ? "next" : "previous");
111
+ }
112
+ }
113
+ const D = oe(o, C, n, l, r, h);
114
+ return D === -1 && t !== null && !r(t, m) ? t : n[D] ?? null;
115
+ }
116
+ function ce(t, e, i, n) {
117
+ return i === "none" ? [] : i === "single" ? n(e[0], t) ? e : [t] : e.some((r) => n(r, t)) ? e.filter((r) => !n(r, t)) : [...e, t];
118
+ }
119
+ function z(t, e, i) {
120
+ const {
121
+ itemComparer: n,
122
+ isItemDisabled: r,
123
+ selectionMode: c,
124
+ items: l
125
+ } = i, {
126
+ selectedValues: f
127
+ } = e, u = l.findIndex((b) => n(t, b));
128
+ if (r(t, u))
129
+ return e;
130
+ const g = ce(t, f, c, n);
131
+ return {
132
+ ...e,
133
+ selectedValues: g,
134
+ highlightedValue: t
135
+ };
136
+ }
137
+ function ae(t, e, i) {
138
+ const n = e.highlightedValue, {
139
+ orientation: r,
140
+ pageSize: c
141
+ } = i;
142
+ switch (t) {
143
+ case "Home":
144
+ return {
145
+ ...e,
146
+ highlightedValue: I(n, "start", i)
147
+ };
148
+ case "End":
149
+ return {
150
+ ...e,
151
+ highlightedValue: I(n, "end", i)
152
+ };
153
+ case "PageUp":
154
+ return {
155
+ ...e,
156
+ highlightedValue: I(n, -c, i)
157
+ };
158
+ case "PageDown":
159
+ return {
160
+ ...e,
161
+ highlightedValue: I(n, c, i)
162
+ };
163
+ case "ArrowUp":
164
+ if (r !== "vertical")
165
+ break;
166
+ return {
167
+ ...e,
168
+ highlightedValue: I(n, -1, i)
169
+ };
170
+ case "ArrowDown":
171
+ if (r !== "vertical")
172
+ break;
173
+ return {
174
+ ...e,
175
+ highlightedValue: I(n, 1, i)
176
+ };
177
+ case "ArrowLeft": {
178
+ if (r === "vertical")
179
+ break;
180
+ return {
181
+ ...e,
182
+ highlightedValue: I(n, r === "horizontal-ltr" ? -1 : 1, i)
183
+ };
184
+ }
185
+ case "ArrowRight": {
186
+ if (r === "vertical")
187
+ break;
188
+ return {
189
+ ...e,
190
+ highlightedValue: I(n, r === "horizontal-ltr" ? 1 : -1, i)
191
+ };
192
+ }
193
+ case "Enter":
194
+ case " ":
195
+ return e.highlightedValue === null ? e : z(e.highlightedValue, e, i);
196
+ }
197
+ return e;
198
+ }
199
+ function he(t, e) {
200
+ return e.focusManagement === "DOM" ? t : {
201
+ ...t,
202
+ highlightedValue: null
203
+ };
204
+ }
205
+ function de(t, e, i) {
206
+ var r;
207
+ const n = (r = i(t)) == null ? void 0 : r.trim().toLowerCase();
208
+ return !n || n.length === 0 ? !1 : n.startsWith(e);
209
+ }
210
+ function fe(t, e, i) {
211
+ const {
212
+ items: n,
213
+ isItemDisabled: r,
214
+ disabledItemsFocusable: c,
215
+ getItemAsString: l
216
+ } = i, f = e.length > 1;
217
+ let u = f ? t.highlightedValue : I(t.highlightedValue, 1, i);
218
+ for (let g = 0; g < n.length; g += 1) {
219
+ if (!u || !f && t.highlightedValue === u)
220
+ return t;
221
+ if (de(u, e, l) && (!r(u, n.indexOf(u)) || c))
222
+ return {
223
+ ...t,
224
+ highlightedValue: u
225
+ };
226
+ u = I(u, 1, i);
227
+ }
228
+ return t;
229
+ }
230
+ function ge(t, e, i, n) {
231
+ const {
232
+ itemComparer: r,
233
+ focusManagement: c
234
+ } = n;
235
+ let l = null;
236
+ i.highlightedValue != null ? l = t.find((g) => r(g, i.highlightedValue)) ?? null : c === "DOM" && e.length === 0 && (l = I(null, "reset", n));
237
+ const u = (i.selectedValues ?? []).filter((g) => t.some((b) => r(b, g)));
238
+ return {
239
+ ...i,
240
+ highlightedValue: l,
241
+ selectedValues: u
242
+ };
243
+ }
244
+ function me(t, e) {
245
+ return {
246
+ ...t,
247
+ highlightedValue: I(null, "reset", e)
248
+ };
249
+ }
250
+ function pe(t, e) {
251
+ return {
252
+ ...t,
253
+ highlightedValue: I(null, "end", e)
254
+ };
255
+ }
256
+ function be(t, e) {
257
+ return {
258
+ ...t,
259
+ selectedValues: [],
260
+ highlightedValue: I(null, "reset", e)
261
+ };
262
+ }
263
+ function Se(t, e) {
264
+ const {
265
+ type: i,
266
+ context: n
267
+ } = e;
268
+ switch (i) {
269
+ case S.keyDown:
270
+ return ae(e.key, t, n);
271
+ case S.itemClick:
272
+ return z(e.item, t, n);
273
+ case S.blur:
274
+ return he(t, n);
275
+ case S.textNavigation:
276
+ return fe(t, e.searchString, n);
277
+ case S.itemsChange:
278
+ return ge(e.items, e.previousItems, t, n);
279
+ case S.resetHighlight:
280
+ return me(t, n);
281
+ case S.highlightLast:
282
+ return pe(t, n);
283
+ case S.clearSelection:
284
+ return be(t, n);
285
+ default:
286
+ return t;
287
+ }
288
+ }
289
+ const Ce = 500;
290
+ function Ie(t) {
291
+ const e = d.useRef({
292
+ searchString: "",
293
+ lastTime: null
294
+ });
295
+ return d.useCallback((i) => {
296
+ if (i.key.length === 1 && i.key !== " ") {
297
+ const n = e.current, r = i.key.toLowerCase(), c = performance.now();
298
+ n.searchString.length > 0 && n.lastTime && c - n.lastTime > Ce ? n.searchString = r : (n.searchString.length !== 1 || r !== n.searchString) && (n.searchString += r), n.lastTime = c, t(n.searchString, i);
299
+ }
300
+ }, [t]);
301
+ }
302
+ const q = {}, Ve = () => {
303
+ }, we = (t, e) => t === e, De = () => !1, xe = (t) => typeof t == "string" ? t : String(t), Re = () => ({
304
+ highlightedValue: null,
305
+ selectedValues: []
306
+ });
307
+ function Me(t) {
308
+ const {
309
+ controlledProps: e = q,
310
+ disabledItemsFocusable: i = !1,
311
+ disableListWrap: n = !1,
312
+ focusManagement: r = "activeDescendant",
313
+ getInitialState: c = Re,
314
+ getItemDomElement: l,
315
+ getItemId: f,
316
+ isItemDisabled: u = De,
317
+ rootRef: g,
318
+ onStateChange: b = Ve,
319
+ items: m,
320
+ itemComparer: o = we,
321
+ getItemAsString: C = xe,
322
+ onChange: h,
323
+ onHighlightChange: D,
324
+ onItemsChange: w,
325
+ orientation: E = "vertical",
326
+ pageSize: N = 5,
327
+ reducerActionContext: L = q,
328
+ selectionMode: P = "single",
329
+ stateReducer: j,
330
+ componentName: H = "useList"
331
+ } = t;
332
+ if (process.env.NODE_ENV !== "production") {
333
+ if (r === "DOM" && l == null)
334
+ throw new Error("useList: The `getItemDomElement` prop is required when using the `DOM` focus management.");
335
+ if (r === "activeDescendant" && f == null)
336
+ throw new Error("useList: The `getItemId` prop is required when using the `activeDescendant` focus management.");
337
+ }
338
+ const $ = d.useRef(null), F = re(g, $), T = d.useCallback((a, s, p) => {
339
+ var V;
340
+ D == null || D(a, s, p), r === "DOM" && s != null && (p === S.itemClick || p === S.keyDown || p === S.textNavigation) && ((V = l == null ? void 0 : l(s)) == null || V.focus());
341
+ }, [l, D, r]), O = d.useMemo(() => ({
342
+ highlightedValue: o,
343
+ selectedValues: (a, s) => K(a, s, o)
344
+ }), [o]), G = d.useCallback((a, s, p, V, M) => {
345
+ switch (b == null || b(a, s, p, V, M), s) {
346
+ case "highlightedValue":
347
+ T(a, p, V);
348
+ break;
349
+ case "selectedValues":
350
+ h == null || h(a, p, V);
351
+ break;
352
+ }
353
+ }, [T, h, b]), _ = d.useMemo(() => ({
354
+ disabledItemsFocusable: i,
355
+ disableListWrap: n,
356
+ focusManagement: r,
357
+ isItemDisabled: u,
358
+ itemComparer: o,
359
+ items: m,
360
+ getItemAsString: C,
361
+ onHighlightChange: T,
362
+ orientation: E,
363
+ pageSize: N,
364
+ selectionMode: P,
365
+ stateComparers: O
366
+ }), [i, n, r, u, o, m, C, T, E, N, P, O]), J = c(), Y = j ?? Se, X = d.useMemo(() => ({
367
+ ...L,
368
+ ..._
369
+ }), [L, _]), [v, x] = ue({
370
+ reducer: Y,
371
+ actionContext: X,
372
+ initialState: J,
373
+ controlledProps: e,
374
+ stateComparers: O,
375
+ onStateChange: G,
376
+ componentName: H
377
+ }), {
378
+ highlightedValue: R,
379
+ selectedValues: B
380
+ } = v, Q = Ie((a, s) => x({
381
+ type: S.textNavigation,
382
+ event: s,
383
+ searchString: a
384
+ })), k = d.useRef([]);
385
+ d.useEffect(() => {
386
+ K(k.current, m, o) || (x({
387
+ type: S.itemsChange,
388
+ event: null,
389
+ items: m,
390
+ previousItems: k.current
391
+ }), k.current = m, w == null || w(m));
392
+ }, [m, o, x, w]);
393
+ const Z = (a) => (s) => {
394
+ var V;
395
+ if ((V = a.onKeyDown) == null || V.call(a, s), s.defaultMuiPrevented)
396
+ return;
397
+ const p = ["Home", "End", "PageUp", "PageDown"];
398
+ E === "vertical" ? p.push("ArrowUp", "ArrowDown") : p.push("ArrowLeft", "ArrowRight"), r === "activeDescendant" && p.push(" ", "Enter"), p.includes(s.key) && s.preventDefault(), x({
399
+ type: S.keyDown,
400
+ key: s.key,
401
+ event: s
402
+ }), Q(s);
403
+ }, ee = (a) => (s) => {
404
+ var p, V;
405
+ (p = a.onBlur) == null || p.call(a, s), !s.defaultMuiPrevented && ((V = $.current) != null && V.contains(s.relatedTarget) || x({
406
+ type: S.blur,
407
+ event: s
408
+ }));
409
+ }, te = (a = {}) => {
410
+ const s = ie(a);
411
+ return {
412
+ ...a,
413
+ "aria-activedescendant": r === "activeDescendant" && R != null ? f(R) : void 0,
414
+ tabIndex: r === "DOM" ? -1 : 0,
415
+ ref: F,
416
+ ...s,
417
+ onBlur: ee(s),
418
+ onKeyDown: Z(s)
419
+ };
420
+ }, W = d.useCallback((a) => {
421
+ const s = (B ?? []).some((M) => M != null && o(a, M)), p = R != null && o(a, R);
422
+ return {
423
+ focusable: r === "DOM",
424
+ highlighted: p,
425
+ selected: s
426
+ };
427
+ }, [o, B, R, r]), ne = d.useMemo(() => ({
428
+ dispatch: x,
429
+ getItemState: W
430
+ }), [x, W]);
431
+ return d.useDebugValue({
432
+ state: v
433
+ }), {
434
+ contextValue: ne,
435
+ dispatch: x,
436
+ getRootProps: te,
437
+ rootRef: F,
438
+ state: v
439
+ };
440
+ }
441
+ export {
442
+ z as h,
443
+ Se as l,
444
+ I as m,
445
+ Me as u
446
+ };
@@ -2,7 +2,7 @@ type DeepKeys<T> = {
2
2
  [K in keyof T]: T[K] extends object ? `${K & string}` | `${K & string}.${DeepKeys<T[K]>}` : `${K & string}`;
3
3
  }[keyof T];
4
4
  export declare const replaceItemsByIndex: <T>(items: T[], from: number, to: number) => T[];
5
- export declare const sortItemsByIndex: <T>(items: T[], from: number, to: number, direction: 'up' | 'down') => T[];
6
- export declare const sortItemsByKey: <T>(items: T[], key: DeepKeys<T>, from: number, to: number, direction: 'up' | 'down') => T[];
5
+ export declare const sortItemsByIndex: <T>(items: T[], from: number, to: number, direction: "up" | "down") => T[];
6
+ export declare const sortItemsByKey: <T>(items: T[], key: DeepKeys<T>, from: number, to: number, direction: "up" | "down") => T[];
7
7
  export declare const replaceItemsByKey: <T>(items: T[], key: DeepKeys<T>, from: number, to: number) => T[];
8
8
  export {};