@pismo/marola 0.0.1-alpha.32 → 0.0.1-alpha.4

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 (176) hide show
  1. package/README.md +5 -17
  2. package/dist/{Button-2b1peDFT.js → Button-C3Qm852g.js} +23 -23
  3. package/dist/Dialog.module-BO0mdB7d.js +15 -0
  4. package/dist/ListContext-D6-YwtZn.js +18 -0
  5. package/dist/Tabs.module-_kSbSyth.js +66 -0
  6. package/dist/assets/CallToActionButton.css +1 -0
  7. package/dist/assets/Dialog.css +1 -1
  8. package/dist/assets/LoadingSpinner.css +1 -1
  9. package/dist/assets/Tabs.css +1 -1
  10. package/dist/assets/Typography.css +1 -1
  11. package/dist/assets/main.css +1 -0
  12. package/dist/components/CallToActionButton/CallToActionButton.d.ts +21 -0
  13. package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
  14. package/dist/components/Dialog/Actions.js +1 -1
  15. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  16. package/dist/components/Dialog/Backdrop.js +9 -2
  17. package/dist/components/Dialog/CloseIconButton.js +124 -12
  18. package/dist/components/Dialog/Dialog.d.ts +5 -6
  19. package/dist/components/Dialog/Dialog.js +20103 -445
  20. package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
  21. package/dist/components/Dialog/Title.js +14 -0
  22. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
  23. package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
  24. package/dist/components/Tabs/Tab.d.ts +1 -6
  25. package/dist/components/Tabs/Tab.js +173 -118
  26. package/dist/components/Tabs/TabPanel.d.ts +1 -5
  27. package/dist/components/Tabs/TabPanel.js +10 -8
  28. package/dist/components/Tabs/Tabs.d.ts +2 -8
  29. package/dist/components/Tabs/Tabs.js +701 -250
  30. package/dist/components/Typography/Typography.d.ts +6 -17
  31. package/dist/components/Typography/Typography.js +64 -55
  32. package/dist/{index-CH45lKw7.js → index-BZ1lkM_M.js} +159 -162
  33. package/dist/main.d.ts +5 -27
  34. package/dist/main.js +21 -75
  35. package/dist/types/helpers.d.ts +7 -14
  36. package/dist/useButton-CbmjmH5z.js +186 -0
  37. package/dist/useCompoundItem-B7wfGDHQ.js +41 -0
  38. package/package.json +9 -50
  39. package/src/playground/Playground.tsx +20 -0
  40. package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
  41. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  42. package/dist/Group-B3p31ftp.js +0 -26
  43. package/dist/Popup-B6ZSGIEI.js +0 -1248
  44. package/dist/Portal-DIeBsWdL.js +0 -73
  45. package/dist/SelectButton-C8JQKaf4.js +0 -61
  46. package/dist/Tabs.module-jkH1Qjn7.js +0 -22
  47. package/dist/Toggle-BCgIItCc.js +0 -142
  48. package/dist/assets/Advice.css +0 -1
  49. package/dist/assets/Button.css +0 -1
  50. package/dist/assets/Checkbox.css +0 -1
  51. package/dist/assets/EllipsisTooltip.css +0 -1
  52. package/dist/assets/Group.css +0 -1
  53. package/dist/assets/IconButton.css +0 -1
  54. package/dist/assets/Input.css +0 -1
  55. package/dist/assets/InputSearch.css +0 -1
  56. package/dist/assets/PageHeader.css +0 -1
  57. package/dist/assets/Pagination.css +0 -1
  58. package/dist/assets/SelectButton.css +0 -1
  59. package/dist/assets/Skeleton.css +0 -1
  60. package/dist/assets/Snackbar.css +0 -1
  61. package/dist/assets/SortTooltip.css +0 -1
  62. package/dist/assets/Stepper.css +0 -1
  63. package/dist/assets/Table.css +0 -1
  64. package/dist/assets/TextDisplay.css +0 -1
  65. package/dist/assets/Toggle.css +0 -1
  66. package/dist/assets/Toggle2.css +0 -1
  67. package/dist/assets/Tooltip.css +0 -1
  68. package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
  69. package/dist/components/Advice/Advice.d.ts +0 -30
  70. package/dist/components/Advice/Advice.js +0 -47
  71. package/dist/components/Advice/Advice.stories.d.ts +0 -18
  72. package/dist/components/Button/Button.d.ts +0 -32
  73. package/dist/components/Button/Button.js +0 -65
  74. package/dist/components/Button/Button.stories.d.ts +0 -62
  75. package/dist/components/Checkbox/Checkbox.d.ts +0 -34
  76. package/dist/components/Checkbox/Checkbox.js +0 -71
  77. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
  78. package/dist/components/Chip/Chip.d.ts +0 -39
  79. package/dist/components/Chip/Chip.js +0 -19
  80. package/dist/components/Chip/Chip.stories.d.ts +0 -42
  81. package/dist/components/Chip/chip.test.d.ts +0 -1
  82. package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
  83. package/dist/components/Dialog/DialogTitle.js +0 -29
  84. package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +0 -7
  85. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +0 -23
  86. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +0 -31
  87. package/dist/components/Icon/Icon.d.ts +0 -11
  88. package/dist/components/Icon/Icon.js +0 -127
  89. package/dist/components/Icon/Icon.stories.d.ts +0 -15
  90. package/dist/components/Icon/types.d.ts +0 -5
  91. package/dist/components/Icon/types.js +0 -1
  92. package/dist/components/IconButton/Icon.stories.d.ts +0 -15
  93. package/dist/components/IconButton/IconButton.d.ts +0 -38
  94. package/dist/components/IconButton/IconButton.js +0 -63
  95. package/dist/components/Input/Input.d.ts +0 -44
  96. package/dist/components/Input/Input.js +0 -508
  97. package/dist/components/Input/Input.stories.d.ts +0 -43
  98. package/dist/components/InputSearch/InputSearch.d.ts +0 -9
  99. package/dist/components/InputSearch/InputSearch.js +0 -34
  100. package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
  101. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
  102. package/dist/components/PageHeader/PageHeader.d.ts +0 -66
  103. package/dist/components/PageHeader/PageHeader.js +0 -87
  104. package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
  105. package/dist/components/Pagination/Pagination.d.ts +0 -55
  106. package/dist/components/Pagination/Pagination.js +0 -237
  107. package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
  108. package/dist/components/Select/Select.d.ts +0 -26
  109. package/dist/components/Select/Select.js +0 -857
  110. package/dist/components/Select/Select.stories.d.ts +0 -22
  111. package/dist/components/Select/SelectButton.d.ts +0 -12
  112. package/dist/components/Select/SelectButton.js +0 -8
  113. package/dist/components/Skeleton/Skeleton.d.ts +0 -25
  114. package/dist/components/Skeleton/Skeleton.js +0 -23
  115. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
  116. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
  117. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
  118. package/dist/components/Snackbar/Snackbar.d.ts +0 -27
  119. package/dist/components/Snackbar/Snackbar.js +0 -639
  120. package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -319
  121. package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
  122. package/dist/components/SortTooltip/SortTooltip.js +0 -93
  123. package/dist/components/Stepper/Stepper.d.ts +0 -26
  124. package/dist/components/Stepper/Stepper.js +0 -48
  125. package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
  126. package/dist/components/Table/Table.d.ts +0 -56
  127. package/dist/components/Table/Table.js +0 -137
  128. package/dist/components/Table/Table.stories.d.ts +0 -29
  129. package/dist/components/Table/TableContext.d.ts +0 -19
  130. package/dist/components/Table/TableContext.js +0 -21
  131. package/dist/components/Table/_Table.TBody.stories.d.ts +0 -14
  132. package/dist/components/Table/_Table.THead.stories.d.ts +0 -14
  133. package/dist/components/Table/_Table.Td.stories.d.ts +0 -16
  134. package/dist/components/Table/_Table.Th.stories.d.ts +0 -15
  135. package/dist/components/Table/_Table.Tr.stories.d.ts +0 -15
  136. package/dist/components/Tabs/Tab.stories.d.ts +0 -15
  137. package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
  138. package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
  139. package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
  140. package/dist/components/TextDisplay/TextDisplay.js +0 -37
  141. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
  142. package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
  143. package/dist/components/Toggle/Toggle.d.ts +0 -11
  144. package/dist/components/Toggle/Toggle.js +0 -266
  145. package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
  146. package/dist/components/ToggleGroup/Group.d.ts +0 -18
  147. package/dist/components/ToggleGroup/Group.js +0 -7
  148. package/dist/components/ToggleGroup/Group.test.d.ts +0 -1
  149. package/dist/components/ToggleGroup/Toggle.d.ts +0 -15
  150. package/dist/components/ToggleGroup/Toggle.js +0 -17
  151. package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
  152. package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -2
  153. package/dist/components/ToggleGroup/ToggleGroup.js +0 -6
  154. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -25
  155. package/dist/components/Tooltip/Tooltip.d.ts +0 -33
  156. package/dist/components/Tooltip/Tooltip.js +0 -141
  157. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
  158. package/dist/components/Typography/Typography.stories.d.ts +0 -32
  159. package/dist/components/Typography/typography.test.d.ts +0 -1
  160. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +0 -11
  161. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +0 -50
  162. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +0 -21
  163. package/dist/index-CjW42-M-.js +0 -19584
  164. package/dist/marola.css +0 -1
  165. package/dist/test-utils/assertStyles.d.ts +0 -1
  166. package/dist/test-utils/assertStyles.js +0 -11
  167. package/dist/useButton-DNk3wrQp.js +0 -105
  168. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  169. package/dist/useControlled-CCMYYdCM.js +0 -31
  170. package/dist/useEventCallback-xTG9piMa.js +0 -45
  171. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  172. package/dist/useList-B0hog_3-.js +0 -436
  173. package/dist/useTimeout-DxF9kiZL.js +0 -36
  174. package/dist/utils/styleStrings.d.ts +0 -6
  175. package/dist/utils/styleStrings.js +0 -10
  176. package/dist/utils/styleStrings.test.d.ts +0 -1
@@ -1,133 +1,582 @@
1
- import { jsx as T } from "react/jsx-runtime";
2
- import * as r from "react";
3
- import { forwardRef as q, useState as B } from "react";
4
- import { T as G, u as J, s as Q } from "../../Tabs.module-jkH1Qjn7.js";
5
- import { Tab as Le } from "./Tab.js";
6
- import { TabPanel as _e } from "./TabPanel.js";
7
- import { g as I, a as _, b as C, _ as F, c as $, P as t, d as N, e as M } from "../../index-CH45lKw7.js";
8
- import { b as O, C as S } from "../../useCompoundItem-D1iRfg8D.js";
9
- import { u as X } from "../../useControlled-CCMYYdCM.js";
10
- import { L as Y, a as Z } from "../../combineHooksSlotProps-DVjg9PRh.js";
11
- import { l as ee, m as te, u as oe } from "../../useList-B0hog_3-.js";
12
- const k = "Tabs";
13
- function se(s) {
14
- return I(k, s);
1
+ import { jsx as M } from "react/jsx-runtime";
2
+ import { u as Q, C as Z, T as Ve, a as xe, s as Te } from "../../Tabs.module-_kSbSyth.js";
3
+ import * as i from "react";
4
+ import { forwardRef as Ie, useState as Se } from "react";
5
+ import { _ as b, u as Re, e as we, g as ee, a as te, b as ne, c as oe, P as v, d as le, f as se } from "../../index-BZ1lkM_M.js";
6
+ import { L as S, a as Pe } from "../../ListContext-D6-YwtZn.js";
7
+ function G(t, e, l = (n, o) => n === o) {
8
+ return t.length === e.length && t.every((n, o) => l(n, e[o]));
15
9
  }
16
- _(k, ["root", "horizontal", "vertical"]);
17
- function ne(s) {
10
+ function Ee({
11
+ controlled: t,
12
+ default: e,
13
+ name: l,
14
+ state: n = "value"
15
+ }) {
16
+ const {
17
+ current: o
18
+ } = i.useRef(t !== void 0), [a, s] = i.useState(e), u = o ? t : a;
19
+ if (process.env.NODE_ENV !== "production") {
20
+ i.useEffect(() => {
21
+ o !== (t !== void 0) && console.error([`MUI: A component is changing the ${o ? "" : "un"}controlled ${n} state of ${l} to be ${o ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${l} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
22
+ `));
23
+ }, [n, l, t]);
24
+ const {
25
+ current: c
26
+ } = i.useRef(e);
27
+ i.useEffect(() => {
28
+ !o && c !== e && console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${l} after being initialized. To suppress this warning opt to use a controlled ${l}.`].join(`
29
+ `));
30
+ }, [JSON.stringify(e)]);
31
+ }
32
+ const r = i.useCallback((c) => {
33
+ o || s(c);
34
+ }, []);
35
+ return [u, r];
36
+ }
37
+ function ye(t, e) {
38
+ return t === e;
39
+ }
40
+ const W = {}, Y = () => {
41
+ };
42
+ function q(t, e) {
43
+ const l = b({}, t);
44
+ return Object.keys(e).forEach((n) => {
45
+ e[n] !== void 0 && (l[n] = e[n]);
46
+ }), l;
47
+ }
48
+ function Me(t) {
49
+ const {
50
+ nextState: e,
51
+ initialState: l,
52
+ stateComparers: n,
53
+ onStateChange: o,
54
+ controlledProps: a,
55
+ lastActionRef: s
56
+ } = t, u = i.useRef(l);
57
+ i.useEffect(() => {
58
+ if (s.current === null)
59
+ return;
60
+ const r = q(u.current, a);
61
+ Object.keys(e).forEach((c) => {
62
+ var m;
63
+ const f = (m = n[c]) != null ? m : ye, h = e[c], g = r[c];
64
+ if (g == null && h != null || g != null && h == null || g != null && h != null && !f(h, g)) {
65
+ var d, C;
66
+ o == null || o((d = s.current.event) != null ? d : null, c, h, (C = s.current.type) != null ? C : "", e);
67
+ }
68
+ }), u.current = e, s.current = null;
69
+ }, [u, e, s, o, n, a]);
70
+ }
71
+ function De(t) {
72
+ const e = i.useRef(null), {
73
+ reducer: l,
74
+ initialState: n,
75
+ controlledProps: o = W,
76
+ stateComparers: a = W,
77
+ onStateChange: s = Y,
78
+ actionContext: u,
79
+ componentName: r = ""
80
+ } = t, c = i.useRef(o);
81
+ process.env.NODE_ENV !== "production" && i.useEffect(() => {
82
+ Object.keys(o).forEach((d) => {
83
+ c.current[d] !== void 0 && o[d] === void 0 && console.error(`useControllableReducer: ${r ? `The ${r} component` : "A component"} is changing a controlled prop to be uncontrolled: ${d}`), c.current[d] === void 0 && o[d] !== void 0 && console.error(`useControllableReducer: ${r ? `The ${r} component` : "A component"} is changing an uncontrolled prop to be controlled: ${d}`);
84
+ });
85
+ }, [o, r]);
86
+ const m = i.useCallback((d, C) => {
87
+ e.current = C;
88
+ const x = q(d, o);
89
+ return l(x, C);
90
+ }, [o, l]), [f, h] = i.useReducer(m, n), g = i.useCallback((d) => {
91
+ h(b({}, d, {
92
+ context: u
93
+ }));
94
+ }, [u]);
95
+ return Me({
96
+ nextState: f,
97
+ initialState: n,
98
+ stateComparers: a ?? W,
99
+ onStateChange: s ?? Y,
100
+ controlledProps: o,
101
+ lastActionRef: e
102
+ }), [q(f, o), g];
103
+ }
104
+ function Oe(t, e, l, n, o, a) {
105
+ if (l.length === 0 || !n && l.every((u, r) => o(u, r)))
106
+ return -1;
107
+ let s = t;
108
+ for (; ; ) {
109
+ if (!a && e === "next" && s === l.length || !a && e === "previous" && s === -1)
110
+ return -1;
111
+ if (n ? !1 : o(l[s], s))
112
+ s += e === "next" ? 1 : -1, a && (s = (s + l.length) % l.length);
113
+ else
114
+ return s;
115
+ }
116
+ }
117
+ function w(t, e, l) {
118
+ var n;
119
+ const {
120
+ items: o,
121
+ isItemDisabled: a,
122
+ disableListWrap: s,
123
+ disabledItemsFocusable: u,
124
+ itemComparer: r,
125
+ focusManagement: c
126
+ } = l, m = c === "DOM" ? 0 : -1, f = o.length - 1, h = t == null ? -1 : o.findIndex((T) => r(T, t));
127
+ let g, d, C = !s;
128
+ switch (e) {
129
+ case "reset":
130
+ if (m === -1)
131
+ return null;
132
+ g = 0, d = "next", C = !1;
133
+ break;
134
+ case "start":
135
+ g = 0, d = "next", C = !1;
136
+ break;
137
+ case "end":
138
+ g = f, d = "previous", C = !1;
139
+ break;
140
+ default: {
141
+ const T = h + e;
142
+ T < 0 ? !C && h !== -1 || Math.abs(e) > 1 ? (g = 0, d = "next") : (g = f, d = "previous") : T > f ? !C || Math.abs(e) > 1 ? (g = f, d = "previous") : (g = 0, d = "next") : (g = T, d = e >= 0 ? "next" : "previous");
143
+ }
144
+ }
145
+ const x = Oe(g, d, o, u, a, C);
146
+ return x === -1 && t !== null && !a(t, h) ? t : (n = o[x]) != null ? n : null;
147
+ }
148
+ function $e(t, e, l, n) {
149
+ return l === "none" ? [] : l === "single" ? n(e[0], t) ? e : [t] : e.some((o) => n(o, t)) ? e.filter((o) => !n(o, t)) : [...e, t];
150
+ }
151
+ function re(t, e, l) {
152
+ const {
153
+ itemComparer: n,
154
+ isItemDisabled: o,
155
+ selectionMode: a,
156
+ items: s
157
+ } = l, {
158
+ selectedValues: u
159
+ } = e, r = s.findIndex((m) => n(t, m));
160
+ if (o(t, r))
161
+ return e;
162
+ const c = $e(t, u, a, n);
163
+ return b({}, e, {
164
+ selectedValues: c,
165
+ highlightedValue: t
166
+ });
167
+ }
168
+ function ke(t, e, l) {
169
+ const n = e.highlightedValue, {
170
+ orientation: o,
171
+ pageSize: a
172
+ } = l;
173
+ switch (t) {
174
+ case "Home":
175
+ return b({}, e, {
176
+ highlightedValue: w(n, "start", l)
177
+ });
178
+ case "End":
179
+ return b({}, e, {
180
+ highlightedValue: w(n, "end", l)
181
+ });
182
+ case "PageUp":
183
+ return b({}, e, {
184
+ highlightedValue: w(n, -a, l)
185
+ });
186
+ case "PageDown":
187
+ return b({}, e, {
188
+ highlightedValue: w(n, a, l)
189
+ });
190
+ case "ArrowUp":
191
+ if (o !== "vertical")
192
+ break;
193
+ return b({}, e, {
194
+ highlightedValue: w(n, -1, l)
195
+ });
196
+ case "ArrowDown":
197
+ if (o !== "vertical")
198
+ break;
199
+ return b({}, e, {
200
+ highlightedValue: w(n, 1, l)
201
+ });
202
+ case "ArrowLeft": {
203
+ if (o === "vertical")
204
+ break;
205
+ return b({}, e, {
206
+ highlightedValue: w(n, o === "horizontal-ltr" ? -1 : 1, l)
207
+ });
208
+ }
209
+ case "ArrowRight": {
210
+ if (o === "vertical")
211
+ break;
212
+ return b({}, e, {
213
+ highlightedValue: w(n, o === "horizontal-ltr" ? 1 : -1, l)
214
+ });
215
+ }
216
+ case "Enter":
217
+ case " ":
218
+ return e.highlightedValue === null ? e : re(e.highlightedValue, e, l);
219
+ }
220
+ return e;
221
+ }
222
+ function Ne(t, e) {
223
+ return e.focusManagement === "DOM" ? t : b({}, t, {
224
+ highlightedValue: null
225
+ });
226
+ }
227
+ function Le(t, e, l) {
228
+ var n;
229
+ const o = (n = l(t)) == null ? void 0 : n.trim().toLowerCase();
230
+ return !o || o.length === 0 ? !1 : o.indexOf(e) === 0;
231
+ }
232
+ function _e(t, e, l) {
233
+ const {
234
+ items: n,
235
+ isItemDisabled: o,
236
+ disabledItemsFocusable: a,
237
+ getItemAsString: s
238
+ } = l, u = e.length > 1;
239
+ let r = u ? t.highlightedValue : w(t.highlightedValue, 1, l);
240
+ for (let c = 0; c < n.length; c += 1) {
241
+ if (!r || !u && t.highlightedValue === r)
242
+ return t;
243
+ if (Le(r, e, s) && (!o(r, n.indexOf(r)) || a))
244
+ return b({}, t, {
245
+ highlightedValue: r
246
+ });
247
+ r = w(r, 1, l);
248
+ }
249
+ return t;
250
+ }
251
+ function Ae(t, e, l, n) {
252
+ var o;
253
+ const {
254
+ itemComparer: a,
255
+ focusManagement: s
256
+ } = n;
257
+ let u = null;
258
+ if (l.highlightedValue != null) {
259
+ var r;
260
+ u = (r = t.find((f) => a(f, l.highlightedValue))) != null ? r : null;
261
+ } else
262
+ s === "DOM" && e.length === 0 && (u = w(null, "reset", n));
263
+ const m = ((o = l.selectedValues) != null ? o : []).filter((f) => t.some((h) => a(h, f)));
264
+ return b({}, l, {
265
+ highlightedValue: u,
266
+ selectedValues: m
267
+ });
268
+ }
269
+ function Fe(t, e) {
270
+ return b({}, t, {
271
+ highlightedValue: w(null, "reset", e)
272
+ });
273
+ }
274
+ function Ue(t, e) {
275
+ return b({}, t, {
276
+ highlightedValue: w(null, "end", e)
277
+ });
278
+ }
279
+ function ze(t, e) {
280
+ return b({}, t, {
281
+ selectedValues: [],
282
+ highlightedValue: w(null, "reset", e)
283
+ });
284
+ }
285
+ function ae(t, e) {
286
+ const {
287
+ type: l,
288
+ context: n
289
+ } = e;
290
+ switch (l) {
291
+ case S.keyDown:
292
+ return ke(e.key, t, n);
293
+ case S.itemClick:
294
+ return re(e.item, t, n);
295
+ case S.blur:
296
+ return Ne(t, n);
297
+ case S.textNavigation:
298
+ return _e(t, e.searchString, n);
299
+ case S.itemsChange:
300
+ return Ae(e.items, e.previousItems, t, n);
301
+ case S.resetHighlight:
302
+ return Fe(t, n);
303
+ case S.highlightLast:
304
+ return Ue(t, n);
305
+ case S.clearSelection:
306
+ return ze(t, n);
307
+ default:
308
+ return t;
309
+ }
310
+ }
311
+ const He = 500;
312
+ function je(t) {
313
+ const e = i.useRef({
314
+ searchString: "",
315
+ lastTime: null
316
+ });
317
+ return i.useCallback((l) => {
318
+ if (l.key.length === 1 && l.key !== " ") {
319
+ const n = e.current, o = l.key.toLowerCase(), a = performance.now();
320
+ n.searchString.length > 0 && n.lastTime && a - n.lastTime > He ? n.searchString = o : (n.searchString.length !== 1 || o !== n.searchString) && (n.searchString += o), n.lastTime = a, t(n.searchString, l);
321
+ }
322
+ }, [t]);
323
+ }
324
+ const X = {}, Be = () => {
325
+ }, Ke = (t, e) => t === e, We = () => !1, qe = (t) => typeof t == "string" ? t : String(t), Je = () => ({
326
+ highlightedValue: null,
327
+ selectedValues: []
328
+ });
329
+ function Ge(t) {
330
+ const {
331
+ controlledProps: e = X,
332
+ disabledItemsFocusable: l = !1,
333
+ disableListWrap: n = !1,
334
+ focusManagement: o = "activeDescendant",
335
+ getInitialState: a = Je,
336
+ getItemDomElement: s,
337
+ getItemId: u,
338
+ isItemDisabled: r = We,
339
+ rootRef: c,
340
+ onStateChange: m = Be,
341
+ items: f,
342
+ itemComparer: h = Ke,
343
+ getItemAsString: g = qe,
344
+ onChange: d,
345
+ onHighlightChange: C,
346
+ onItemsChange: x,
347
+ orientation: T = "vertical",
348
+ pageSize: L = 5,
349
+ reducerActionContext: k = X,
350
+ selectionMode: O = "single",
351
+ stateReducer: _,
352
+ componentName: H = "useList"
353
+ } = t;
354
+ if (process.env.NODE_ENV !== "production") {
355
+ if (o === "DOM" && s == null)
356
+ throw new Error("useList: The `getItemDomElement` prop is required when using the `DOM` focus management.");
357
+ if (o === "activeDescendant" && u == null)
358
+ throw new Error("useList: The `getItemId` prop is required when using the `activeDescendant` focus management.");
359
+ }
360
+ const A = i.useRef(null), F = Re(c, A), $ = i.useCallback((V, p, I) => {
361
+ if (C == null || C(V, p, I), o === "DOM" && p != null && (I === S.itemClick || I === S.keyDown || I === S.textNavigation)) {
362
+ var R;
363
+ s == null || (R = s(p)) == null || R.focus();
364
+ }
365
+ }, [s, C, o]), U = i.useMemo(() => ({
366
+ highlightedValue: h,
367
+ selectedValues: (V, p) => G(V, p, h)
368
+ }), [h]), P = i.useCallback((V, p, I, R, z) => {
369
+ switch (m == null || m(V, p, I, R, z), p) {
370
+ case "highlightedValue":
371
+ $(V, I, R);
372
+ break;
373
+ case "selectedValues":
374
+ d == null || d(V, I, R);
375
+ break;
376
+ }
377
+ }, [$, d, m]), E = i.useMemo(() => ({
378
+ disabledItemsFocusable: l,
379
+ disableListWrap: n,
380
+ focusManagement: o,
381
+ isItemDisabled: r,
382
+ itemComparer: h,
383
+ items: f,
384
+ getItemAsString: g,
385
+ onHighlightChange: $,
386
+ orientation: T,
387
+ pageSize: L,
388
+ selectionMode: O,
389
+ stateComparers: U
390
+ }), [l, n, o, r, h, f, g, $, T, L, O, U]), y = a(), fe = _ ?? ae, ge = i.useMemo(() => b({}, k, E), [k, E]), [j, D] = De({
391
+ reducer: fe,
392
+ actionContext: ge,
393
+ initialState: y,
394
+ controlledProps: e,
395
+ stateComparers: U,
396
+ onStateChange: P,
397
+ componentName: H
398
+ }), {
399
+ highlightedValue: N,
400
+ selectedValues: B
401
+ } = j, me = je((V, p) => D({
402
+ type: S.textNavigation,
403
+ event: p,
404
+ searchString: V
405
+ })), K = i.useRef([]);
406
+ i.useEffect(() => {
407
+ G(K.current, f, h) || (D({
408
+ type: S.itemsChange,
409
+ event: null,
410
+ items: f,
411
+ previousItems: K.current
412
+ }), K.current = f, x == null || x(f));
413
+ }, [f, h, D, x]);
414
+ const pe = (V) => (p) => {
415
+ var I;
416
+ if ((I = V.onKeyDown) == null || I.call(V, p), p.defaultMuiPrevented)
417
+ return;
418
+ const R = ["Home", "End", "PageUp", "PageDown"];
419
+ T === "vertical" ? R.push("ArrowUp", "ArrowDown") : R.push("ArrowLeft", "ArrowRight"), o === "activeDescendant" && R.push(" ", "Enter"), R.includes(p.key) && p.preventDefault(), D({
420
+ type: S.keyDown,
421
+ key: p.key,
422
+ event: p
423
+ }), me(p);
424
+ }, be = (V) => (p) => {
425
+ var I, R;
426
+ (I = V.onBlur) == null || I.call(V, p), !p.defaultMuiPrevented && ((R = A.current) != null && R.contains(p.relatedTarget) || D({
427
+ type: S.blur,
428
+ event: p
429
+ }));
430
+ }, Ce = (V = {}) => {
431
+ const p = we(V);
432
+ return b({}, V, {
433
+ "aria-activedescendant": o === "activeDescendant" && N != null ? u(N) : void 0,
434
+ tabIndex: o === "DOM" ? -1 : 0,
435
+ ref: F
436
+ }, p, {
437
+ onBlur: be(p),
438
+ onKeyDown: pe(p)
439
+ });
440
+ }, J = i.useCallback((V) => {
441
+ const p = (B ?? []).some((z) => z != null && h(V, z)), I = N != null && h(V, N);
442
+ return {
443
+ focusable: o === "DOM",
444
+ highlighted: I,
445
+ selected: p
446
+ };
447
+ }, [h, B, N, o]), ve = i.useMemo(() => ({
448
+ dispatch: D,
449
+ getItemState: J
450
+ }), [D, J]);
451
+ return i.useDebugValue({
452
+ state: j
453
+ }), {
454
+ contextValue: ve,
455
+ dispatch: D,
456
+ getRootProps: Ce,
457
+ rootRef: F,
458
+ state: j
459
+ };
460
+ }
461
+ const ie = "Tabs";
462
+ function Ye(t) {
463
+ return ee(ie, t);
464
+ }
465
+ te(ie, ["root", "horizontal", "vertical"]);
466
+ function Xe(t) {
18
467
  const {
19
468
  value: e,
20
- defaultValue: o,
469
+ defaultValue: l,
21
470
  onChange: n,
22
- orientation: i = "horizontal",
23
- direction: c = "ltr",
24
- selectionFollowsFocus: l = !1
25
- } = s, [d, u] = X({
471
+ orientation: o = "horizontal",
472
+ direction: a = "ltr",
473
+ selectionFollowsFocus: s = !1
474
+ } = t, [u, r] = Ee({
26
475
  controlled: e,
27
- default: o,
476
+ default: l,
28
477
  name: "Tabs",
29
478
  state: "value"
30
- }), a = r.useCallback((x, y) => {
31
- u(y), n == null || n(x, y);
32
- }, [n, u]), {
479
+ }), c = i.useCallback((x, T) => {
480
+ r(T), n == null || n(x, T);
481
+ }, [n, r]), {
33
482
  subitems: m,
34
- contextValue: g
35
- } = O(), p = r.useRef(() => {
36
- }), b = r.useCallback((x) => {
37
- var y;
38
- return (y = m.get(x)) == null ? void 0 : y.id;
39
- }, [m]), f = r.useCallback((x) => p.current(x), []), P = r.useCallback((x) => {
40
- p.current = x;
483
+ contextValue: f
484
+ } = Q(), h = i.useRef(() => {
485
+ }), g = i.useCallback((x) => {
486
+ var T;
487
+ return (T = m.get(x)) == null ? void 0 : T.id;
488
+ }, [m]), d = i.useCallback((x) => h.current(x), []), C = i.useCallback((x) => {
489
+ h.current = x;
41
490
  }, []);
42
491
  return {
43
- contextValue: C({
44
- direction: c,
45
- getTabId: f,
46
- getTabPanelId: b,
47
- onSelected: a,
48
- orientation: i,
49
- registerTabIdLookup: P,
50
- selectionFollowsFocus: l,
51
- value: d
52
- }, g)
492
+ contextValue: b({
493
+ direction: a,
494
+ getTabId: d,
495
+ getTabPanelId: g,
496
+ onSelected: c,
497
+ orientation: o,
498
+ registerTabIdLookup: C,
499
+ selectionFollowsFocus: s,
500
+ value: u
501
+ }, f)
53
502
  };
54
503
  }
55
- function le(s) {
504
+ function Qe(t) {
56
505
  const {
57
506
  value: e,
58
- children: o
59
- } = s, {
507
+ children: l
508
+ } = t, {
60
509
  direction: n,
61
- getItemIndex: i,
62
- onSelected: c,
63
- orientation: l,
64
- registerItem: d,
65
- registerTabIdLookup: u,
66
- selectionFollowsFocus: a,
510
+ getItemIndex: o,
511
+ onSelected: a,
512
+ orientation: s,
513
+ registerItem: u,
514
+ registerTabIdLookup: r,
515
+ selectionFollowsFocus: c,
67
516
  totalSubitemCount: m,
68
- value: g,
69
- getTabId: p,
70
- getTabPanelId: b
71
- } = e, f = r.useMemo(() => ({
72
- getItemIndex: i,
73
- registerItem: d,
517
+ value: f,
518
+ getTabId: h,
519
+ getTabPanelId: g
520
+ } = e, d = i.useMemo(() => ({
521
+ getItemIndex: o,
522
+ registerItem: u,
74
523
  totalSubitemCount: m
75
- }), [d, i, m]), P = r.useMemo(() => ({
524
+ }), [u, o, m]), C = i.useMemo(() => ({
76
525
  direction: n,
77
- getTabId: p,
78
- getTabPanelId: b,
79
- onSelected: c,
80
- orientation: l,
81
- registerTabIdLookup: u,
82
- selectionFollowsFocus: a,
83
- value: g
84
- }), [n, p, b, c, l, u, a, g]);
85
- return /* @__PURE__ */ T(S.Provider, {
86
- value: f,
87
- children: /* @__PURE__ */ T(G.Provider, {
88
- value: P,
89
- children: o
526
+ getTabId: h,
527
+ getTabPanelId: g,
528
+ onSelected: a,
529
+ orientation: s,
530
+ registerTabIdLookup: r,
531
+ selectionFollowsFocus: c,
532
+ value: f
533
+ }), [n, h, g, a, s, r, c, f]);
534
+ return /* @__PURE__ */ M(Z.Provider, {
535
+ value: d,
536
+ children: /* @__PURE__ */ M(Ve.Provider, {
537
+ value: C,
538
+ children: l
90
539
  })
91
540
  });
92
541
  }
93
- const re = ["children", "value", "defaultValue", "orientation", "direction", "onChange", "selectionFollowsFocus", "slotProps", "slots"], ae = (s) => {
542
+ const Ze = ["children", "value", "defaultValue", "orientation", "direction", "onChange", "selectionFollowsFocus", "slotProps", "slots"], et = (t) => {
94
543
  const {
95
544
  orientation: e
96
- } = s;
97
- return N({
545
+ } = t;
546
+ return le({
98
547
  root: ["root", e]
99
- }, M(se));
100
- }, w = /* @__PURE__ */ r.forwardRef(function(e, o) {
548
+ }, se(Ye));
549
+ }, ue = /* @__PURE__ */ i.forwardRef(function(e, l) {
101
550
  var n;
102
551
  const {
103
- children: i,
104
- orientation: c = "horizontal",
105
- direction: l = "ltr",
106
- slotProps: d = {},
107
- slots: u = {}
108
- } = e, a = F(e, re), m = C({}, e, {
109
- orientation: c,
110
- direction: l
552
+ children: o,
553
+ orientation: a = "horizontal",
554
+ direction: s = "ltr",
555
+ slotProps: u = {},
556
+ slots: r = {}
557
+ } = e, c = ne(e, Ze), m = b({}, e, {
558
+ orientation: a,
559
+ direction: s
111
560
  }), {
112
- contextValue: g
113
- } = ne(m), p = ae(m), b = (n = u.root) != null ? n : "div", f = $({
114
- elementType: b,
115
- externalSlotProps: d.root,
116
- externalForwardedProps: a,
561
+ contextValue: f
562
+ } = Xe(m), h = et(m), g = (n = r.root) != null ? n : "div", d = oe({
563
+ elementType: g,
564
+ externalSlotProps: u.root,
565
+ externalForwardedProps: c,
117
566
  additionalProps: {
118
- ref: o
567
+ ref: l
119
568
  },
120
569
  ownerState: m,
121
- className: p.root
570
+ className: h.root
122
571
  });
123
- return /* @__PURE__ */ T(b, C({}, f, {
124
- children: /* @__PURE__ */ T(le, {
125
- value: g,
126
- children: i
572
+ return /* @__PURE__ */ M(g, b({}, d, {
573
+ children: /* @__PURE__ */ M(Qe, {
574
+ value: f,
575
+ children: o
127
576
  })
128
577
  }));
129
578
  });
130
- process.env.NODE_ENV !== "production" && (w.propTypes = {
579
+ process.env.NODE_ENV !== "production" && (ue.propTypes = {
131
580
  // ┌────────────────────────────── Warning ──────────────────────────────┐
132
581
  // │ These PropTypes are generated from the TypeScript type definitions. │
133
582
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -135,231 +584,231 @@ process.env.NODE_ENV !== "production" && (w.propTypes = {
135
584
  /**
136
585
  * The content of the component.
137
586
  */
138
- children: t.node,
587
+ children: v.node,
139
588
  /**
140
589
  * @ignore
141
590
  */
142
- className: t.string,
591
+ className: v.string,
143
592
  /**
144
593
  * The default value. Use when the component is not controlled.
145
594
  */
146
- defaultValue: t.oneOfType([t.number, t.string]),
595
+ defaultValue: v.oneOfType([v.number, v.string]),
147
596
  /**
148
597
  * The direction of the text.
149
598
  * @default 'ltr'
150
599
  */
151
- direction: t.oneOf(["ltr", "rtl"]),
600
+ direction: v.oneOf(["ltr", "rtl"]),
152
601
  /**
153
602
  * Callback invoked when new value is being set.
154
603
  */
155
- onChange: t.func,
604
+ onChange: v.func,
156
605
  /**
157
606
  * The component orientation (layout flow direction).
158
607
  * @default 'horizontal'
159
608
  */
160
- orientation: t.oneOf(["horizontal", "vertical"]),
609
+ orientation: v.oneOf(["horizontal", "vertical"]),
161
610
  /**
162
611
  * If `true` the selected tab changes on focus. Otherwise it only
163
612
  * changes on activation.
164
613
  */
165
- selectionFollowsFocus: t.bool,
614
+ selectionFollowsFocus: v.bool,
166
615
  /**
167
616
  * The props used for each slot inside the Tabs.
168
617
  * @default {}
169
618
  */
170
- slotProps: t.shape({
171
- root: t.oneOfType([t.func, t.object])
619
+ slotProps: v.shape({
620
+ root: v.oneOfType([v.func, v.object])
172
621
  }),
173
622
  /**
174
623
  * The components used for each slot inside the Tabs.
175
624
  * Either a string to use a HTML element or a component.
176
625
  * @default {}
177
626
  */
178
- slots: t.shape({
179
- root: t.elementType
627
+ slots: v.shape({
628
+ root: v.elementType
180
629
  }),
181
630
  /**
182
631
  * The value of the currently selected `Tab`.
183
632
  * If you don't want any selected `Tab`, you can set this prop to `null`.
184
633
  */
185
- value: t.oneOfType([t.number, t.string])
634
+ value: v.oneOfType([v.number, v.string])
186
635
  });
187
- const E = "TabsList";
188
- function ie(s) {
189
- return I(E, s);
636
+ const ce = "TabsList";
637
+ function tt(t) {
638
+ return ee(ce, t);
190
639
  }
191
- _(E, ["root", "horizontal", "vertical"]);
192
- const z = {
640
+ te(ce, ["root", "horizontal", "vertical"]);
641
+ const de = {
193
642
  valueChange: "valueChange"
194
643
  };
195
- function ue(s, e) {
196
- if (e.type === z.valueChange)
197
- return C({}, s, {
644
+ function nt(t, e) {
645
+ if (e.type === de.valueChange)
646
+ return b({}, t, {
198
647
  highlightedValue: e.value
199
648
  });
200
- const o = ee(s, e), {
649
+ const l = ae(t, e), {
201
650
  context: {
202
651
  selectionFollowsFocus: n
203
652
  }
204
653
  } = e;
205
- if (e.type === Y.itemsChange) {
206
- if (o.selectedValues.length > 0)
207
- return C({}, o, {
208
- highlightedValue: o.selectedValues[0]
654
+ if (e.type === S.itemsChange) {
655
+ if (l.selectedValues.length > 0)
656
+ return b({}, l, {
657
+ highlightedValue: l.selectedValues[0]
209
658
  });
210
- te(null, "reset", e.context);
659
+ w(null, "reset", e.context);
211
660
  }
212
- return n && o.highlightedValue != null ? C({}, o, {
213
- selectedValues: [o.highlightedValue]
214
- }) : o;
661
+ return n && l.highlightedValue != null ? b({}, l, {
662
+ selectedValues: [l.highlightedValue]
663
+ }) : l;
215
664
  }
216
- function ce(s) {
665
+ function ot(t) {
217
666
  var e;
218
667
  const {
219
- rootRef: o
220
- } = s, {
668
+ rootRef: l
669
+ } = t, {
221
670
  direction: n = "ltr",
222
- onSelected: i,
223
- orientation: c = "horizontal",
224
- value: l,
225
- registerTabIdLookup: d,
226
- selectionFollowsFocus: u
227
- } = J(), {
228
- subitems: a,
671
+ onSelected: o,
672
+ orientation: a = "horizontal",
673
+ value: s,
674
+ registerTabIdLookup: u,
675
+ selectionFollowsFocus: r
676
+ } = xe(), {
677
+ subitems: c,
229
678
  contextValue: m
230
- } = O(), g = r.useCallback((h) => {
231
- var v;
232
- return (v = a.get(h)) == null ? void 0 : v.id;
233
- }, [a]);
234
- d(g);
235
- const p = r.useMemo(() => Array.from(a.keys()), [a]), b = r.useCallback((h) => {
236
- var v, V;
237
- return h == null ? null : (v = (V = a.get(h)) == null ? void 0 : V.ref.current) != null ? v : null;
238
- }, [a]), f = n === "rtl";
239
- let P;
240
- c === "vertical" ? P = "vertical" : P = f ? "horizontal-rtl" : "horizontal-ltr";
241
- const x = r.useCallback((h, v) => {
242
- var V;
243
- i(h, (V = v[0]) != null ? V : null);
244
- }, [i]), y = r.useMemo(() => l === void 0 ? {} : l != null ? {
245
- selectedValues: [l]
679
+ } = Q(), f = i.useCallback((P) => {
680
+ var E;
681
+ return (E = c.get(P)) == null ? void 0 : E.id;
682
+ }, [c]);
683
+ u(f);
684
+ const h = i.useMemo(() => Array.from(c.keys()), [c]), g = i.useCallback((P) => {
685
+ var E, y;
686
+ return P == null ? null : (E = (y = c.get(P)) == null ? void 0 : y.ref.current) != null ? E : null;
687
+ }, [c]), d = n === "rtl";
688
+ let C;
689
+ a === "vertical" ? C = "vertical" : C = d ? "horizontal-rtl" : "horizontal-ltr";
690
+ const x = i.useCallback((P, E) => {
691
+ var y;
692
+ o(P, (y = E[0]) != null ? y : null);
693
+ }, [o]), T = i.useMemo(() => s === void 0 ? {} : s != null ? {
694
+ selectedValues: [s]
246
695
  } : {
247
696
  selectedValues: []
248
- }, [l]), U = r.useCallback((h) => {
249
- var v, V;
250
- return (v = (V = a.get(h)) == null ? void 0 : V.disabled) != null ? v : !1;
251
- }, [a]), {
252
- contextValue: L,
253
- dispatch: R,
254
- getRootProps: D,
697
+ }, [s]), L = i.useCallback((P) => {
698
+ var E, y;
699
+ return (E = (y = c.get(P)) == null ? void 0 : y.disabled) != null ? E : !1;
700
+ }, [c]), {
701
+ contextValue: k,
702
+ dispatch: O,
703
+ getRootProps: _,
255
704
  state: {
256
- highlightedValue: j,
257
- selectedValues: H
705
+ highlightedValue: H,
706
+ selectedValues: A
258
707
  },
259
- rootRef: K
260
- } = oe({
261
- controlledProps: y,
262
- disabledItemsFocusable: !u,
708
+ rootRef: F
709
+ } = Ge({
710
+ controlledProps: T,
711
+ disabledItemsFocusable: !r,
263
712
  focusManagement: "DOM",
264
- getItemDomElement: b,
265
- isItemDisabled: U,
266
- items: p,
267
- rootRef: o,
713
+ getItemDomElement: g,
714
+ isItemDisabled: L,
715
+ items: h,
716
+ rootRef: l,
268
717
  onChange: x,
269
- orientation: P,
270
- reducerActionContext: r.useMemo(() => ({
271
- selectionFollowsFocus: u || !1
272
- }), [u]),
718
+ orientation: C,
719
+ reducerActionContext: i.useMemo(() => ({
720
+ selectionFollowsFocus: r || !1
721
+ }), [r]),
273
722
  selectionMode: "single",
274
- stateReducer: ue
723
+ stateReducer: nt
275
724
  });
276
- r.useEffect(() => {
277
- l !== void 0 && l != null && R({
278
- type: z.valueChange,
279
- value: l
725
+ i.useEffect(() => {
726
+ s !== void 0 && s != null && O({
727
+ type: de.valueChange,
728
+ value: s
280
729
  });
281
- }, [R, l]);
282
- const W = (h = {}) => C({}, h, D(h), {
283
- "aria-orientation": c === "vertical" ? "vertical" : void 0,
730
+ }, [O, s]);
731
+ const $ = (P = {}) => b({}, P, _(P), {
732
+ "aria-orientation": a === "vertical" ? "vertical" : void 0,
284
733
  role: "tablist"
285
734
  });
286
735
  return {
287
- contextValue: r.useMemo(() => C({}, m, L), [m, L]),
288
- dispatch: R,
289
- getRootProps: W,
290
- highlightedValue: j,
291
- isRtl: f,
292
- orientation: c,
293
- rootRef: K,
294
- selectedValue: (e = H[0]) != null ? e : null
736
+ contextValue: i.useMemo(() => b({}, m, k), [m, k]),
737
+ dispatch: O,
738
+ getRootProps: $,
739
+ highlightedValue: H,
740
+ isRtl: d,
741
+ orientation: a,
742
+ rootRef: F,
743
+ selectedValue: (e = A[0]) != null ? e : null
295
744
  };
296
745
  }
297
- function de(s) {
746
+ function lt(t) {
298
747
  const {
299
748
  value: e,
300
- children: o
301
- } = s, {
749
+ children: l
750
+ } = t, {
302
751
  dispatch: n,
303
- getItemIndex: i,
304
- getItemState: c,
305
- registerItem: l,
306
- totalSubitemCount: d
307
- } = e, u = r.useMemo(() => ({
752
+ getItemIndex: o,
753
+ getItemState: a,
754
+ registerItem: s,
755
+ totalSubitemCount: u
756
+ } = e, r = i.useMemo(() => ({
308
757
  dispatch: n,
309
- getItemState: c,
310
- getItemIndex: i
311
- }), [n, i, c]), a = r.useMemo(() => ({
312
- getItemIndex: i,
313
- registerItem: l,
314
- totalSubitemCount: d
315
- }), [l, i, d]);
316
- return /* @__PURE__ */ T(S.Provider, {
317
- value: a,
318
- children: /* @__PURE__ */ T(Z.Provider, {
319
- value: u,
320
- children: o
758
+ getItemState: a,
759
+ getItemIndex: o
760
+ }), [n, o, a]), c = i.useMemo(() => ({
761
+ getItemIndex: o,
762
+ registerItem: s,
763
+ totalSubitemCount: u
764
+ }), [s, o, u]);
765
+ return /* @__PURE__ */ M(Z.Provider, {
766
+ value: c,
767
+ children: /* @__PURE__ */ M(Pe.Provider, {
768
+ value: r,
769
+ children: l
321
770
  })
322
771
  });
323
772
  }
324
- const me = ["children", "slotProps", "slots"], pe = (s) => {
773
+ const st = ["children", "slotProps", "slots"], rt = (t) => {
325
774
  const {
326
775
  orientation: e
327
- } = s;
328
- return N({
776
+ } = t;
777
+ return le({
329
778
  root: ["root", e]
330
- }, M(ie));
331
- }, A = /* @__PURE__ */ r.forwardRef(function(e, o) {
779
+ }, se(tt));
780
+ }, he = /* @__PURE__ */ i.forwardRef(function(e, l) {
332
781
  var n;
333
782
  const {
334
- children: i,
335
- slotProps: c = {},
336
- slots: l = {}
337
- } = e, d = F(e, me), {
338
- isRtl: u,
339
- orientation: a,
783
+ children: o,
784
+ slotProps: a = {},
785
+ slots: s = {}
786
+ } = e, u = ne(e, st), {
787
+ isRtl: r,
788
+ orientation: c,
340
789
  getRootProps: m,
341
- contextValue: g
342
- } = ce({
343
- rootRef: o
344
- }), p = C({}, e, {
345
- isRtl: u,
346
- orientation: a
347
- }), b = pe(p), f = (n = l.root) != null ? n : "div", P = $({
348
- elementType: f,
790
+ contextValue: f
791
+ } = ot({
792
+ rootRef: l
793
+ }), h = b({}, e, {
794
+ isRtl: r,
795
+ orientation: c
796
+ }), g = rt(h), d = (n = s.root) != null ? n : "div", C = oe({
797
+ elementType: d,
349
798
  getSlotProps: m,
350
- externalSlotProps: c.root,
351
- externalForwardedProps: d,
352
- ownerState: p,
353
- className: b.root
799
+ externalSlotProps: a.root,
800
+ externalForwardedProps: u,
801
+ ownerState: h,
802
+ className: g.root
354
803
  });
355
- return /* @__PURE__ */ T(de, {
356
- value: g,
357
- children: /* @__PURE__ */ T(f, C({}, P, {
358
- children: i
804
+ return /* @__PURE__ */ M(lt, {
805
+ value: f,
806
+ children: /* @__PURE__ */ M(d, b({}, C, {
807
+ children: o
359
808
  }))
360
809
  });
361
810
  });
362
- process.env.NODE_ENV !== "production" && (A.propTypes = {
811
+ process.env.NODE_ENV !== "production" && (he.propTypes = {
363
812
  // ┌────────────────────────────── Warning ──────────────────────────────┐
364
813
  // │ These PropTypes are generated from the TypeScript type definitions. │
365
814
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -367,35 +816,37 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
367
816
  /**
368
817
  * The content of the component.
369
818
  */
370
- children: t.node,
819
+ children: v.node,
371
820
  /**
372
821
  * @ignore
373
822
  */
374
- className: t.string,
823
+ className: v.string,
375
824
  /**
376
825
  * The props used for each slot inside the TabsList.
377
826
  * @default {}
378
827
  */
379
- slotProps: t.shape({
380
- root: t.oneOfType([t.func, t.object])
828
+ slotProps: v.shape({
829
+ root: v.oneOfType([v.func, v.object])
381
830
  }),
382
831
  /**
383
832
  * The components used for each slot inside the TabsList.
384
833
  * Either a string to use a HTML element or a component.
385
834
  * @default {}
386
835
  */
387
- slots: t.shape({
388
- root: t.elementType
836
+ slots: v.shape({
837
+ root: v.elementType
389
838
  })
390
839
  });
391
- const Ve = q(({ children: s, onChange: e, dataTestId: o }, n) => {
392
- const [i, c] = B("1");
393
- return /* @__PURE__ */ T(w, { "data-testid": o, value: i, onChange: (d, u) => {
394
- c(u), e && e(u, d);
395
- }, ref: n, children: /* @__PURE__ */ T(A, { className: Q.tabs, children: s }) });
840
+ const ht = Ie(({
841
+ children: t,
842
+ onChange: e,
843
+ dataTestId: l
844
+ }, n) => {
845
+ const [o, a] = Se("1");
846
+ return /* @__PURE__ */ M(ue, { "data-testid": l, value: o, onChange: (u, r) => {
847
+ a(r), e && e(r, u);
848
+ }, ref: n, children: /* @__PURE__ */ M(he, { className: Te.tabs, children: t }) });
396
849
  });
397
850
  export {
398
- Le as Tab,
399
- _e as TabPanel,
400
- Ve as Tabs
851
+ ht as Tabs
401
852
  };