@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,12 @@
1
+ function s(o) {
2
+ try {
3
+ return o.matches(":focus-visible");
4
+ } catch {
5
+ process.env.NODE_ENV !== "production" && !/jsdom/.test(window.navigator.userAgent) && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
6
+ `));
7
+ }
8
+ return !1;
9
+ }
10
+ export {
11
+ s as i
12
+ };
package/dist/main.js CHANGED
@@ -10,7 +10,7 @@ import { Button as b } from "./components/Button/Button.js";
10
10
  import { Calendar as C } from "./components/Calendar/Calendar.js";
11
11
  import { Card as I } from "./components/Card/Card.js";
12
12
  import { Checkbox as D } from "./components/Checkbox/Checkbox.js";
13
- import { C as h, R, T as A } from "./Toggle-DcZTfLrC.js";
13
+ import { C as h, R, T as A } from "./Toggle-nnDfpqI1.js";
14
14
  import { ConfirmationDialog as v } from "./components/ConfirmationDialog/ConfirmationDialog.js";
15
15
  import { DatePicker as O } from "./components/DatePicker/DatePicker.js";
16
16
  import { Description as E } from "./components/Description/Description.js";
@@ -57,7 +57,7 @@ import { bemify as Pr, getBEMBase as vr, getBEMBlock as wr } from "./utils/style
57
57
  import { default as Mr } from "./components/Dialog/DialogTitle.js";
58
58
  import { default as Gr } from "./components/Dialog/Content.js";
59
59
  import { default as Hr } from "./components/Dialog/Actions.js";
60
- import { R as Lr } from "./RadioOption-DYovqiwF.js";
60
+ import { R as Lr } from "./RadioOption-DyRY8xlF.js";
61
61
  import { Tab as Vr } from "./components/Tabs/Tab.js";
62
62
  import { TabPanel as jr } from "./components/Tabs/TabPanel.js";
63
63
  export {
@@ -1,4 +1,4 @@
1
- import { P as c } from "./useSlotProps-CYHDC4TN.js";
1
+ import { P as c } from "./ClassNameConfigurator-CVRWfyIa.js";
2
2
  function a(e, n) {
3
3
  return process.env.NODE_ENV === "production" ? () => null : function(...t) {
4
4
  return e(...t) || n(...t);
@@ -0,0 +1,526 @@
1
+ import U, { useRef as et, createElement as x, createContext as ot, useReducer as st, useEffect as it, useDebugValue as ct, useCallback as ut, useContext as rt } from "react";
2
+ const _ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
3
+ function J(t) {
4
+ return "init" in t;
5
+ }
6
+ function T(t) {
7
+ return !!t.write;
8
+ }
9
+ function F(t) {
10
+ return "v" in t || "e" in t;
11
+ }
12
+ function I(t) {
13
+ if ("e" in t)
14
+ throw t.e;
15
+ if ((_ ? "production" : void 0) !== "production" && !("v" in t))
16
+ throw new Error("[Bug] atom state is not initialized");
17
+ return t.v;
18
+ }
19
+ const P = /* @__PURE__ */ new WeakMap();
20
+ function $(t) {
21
+ var n;
22
+ return R(t) && !!((n = P.get(t)) != null && n[0]);
23
+ }
24
+ function at(t) {
25
+ const n = P.get(t);
26
+ n != null && n[0] && (n[0] = !1, n[1].forEach((o) => o()));
27
+ }
28
+ function O(t, n) {
29
+ let o = P.get(t);
30
+ if (!o) {
31
+ o = [!0, /* @__PURE__ */ new Set()], P.set(t, o);
32
+ const e = () => {
33
+ o[0] = !1;
34
+ };
35
+ t.then(e, e);
36
+ }
37
+ o[1].add(n);
38
+ }
39
+ function R(t) {
40
+ return typeof (t == null ? void 0 : t.then) == "function";
41
+ }
42
+ function G(t, n, o) {
43
+ if (!o.p.has(t)) {
44
+ o.p.add(t);
45
+ const e = () => o.p.delete(t);
46
+ n.then(e, e);
47
+ }
48
+ }
49
+ function q(t, n, o) {
50
+ var e;
51
+ const s = /* @__PURE__ */ new Set();
52
+ for (const i of ((e = o.get(t)) == null ? void 0 : e.t) || [])
53
+ s.add(i);
54
+ for (const i of n.p)
55
+ s.add(i);
56
+ return s;
57
+ }
58
+ const lt = (t, n, ...o) => n.read(...o), dt = (t, n, ...o) => n.write(...o), ft = (t, n) => {
59
+ if (n.INTERNAL_onInit)
60
+ return n.INTERNAL_onInit(t);
61
+ if (n.unstable_onInit)
62
+ return console.warn(
63
+ "[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."
64
+ ), n.unstable_onInit(t);
65
+ }, vt = (t, n, o) => {
66
+ var e;
67
+ return (e = n.onMount) == null ? void 0 : e.call(n, o);
68
+ }, ht = (t, n) => {
69
+ var o;
70
+ const e = S(t), s = e[0], i = e[6], a = e[9];
71
+ if ((_ ? "production" : void 0) !== "production" && !n)
72
+ throw new Error("Atom is undefined or null");
73
+ let v = s.get(n);
74
+ return v || (v = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 }, s.set(n, v), (o = i.i) == null || o.call(i, n), a == null || a(t, n)), v;
75
+ }, pt = (t) => {
76
+ const n = S(t), o = n[1], e = n[3], s = n[4], i = n[5], a = n[6], v = n[13], f = [], c = (d) => {
77
+ try {
78
+ d();
79
+ } catch (u) {
80
+ f.push(u);
81
+ }
82
+ };
83
+ do {
84
+ a.f && c(a.f);
85
+ const d = /* @__PURE__ */ new Set(), u = d.add.bind(d);
86
+ e.forEach((h) => {
87
+ var l;
88
+ return (l = o.get(h)) == null ? void 0 : l.l.forEach(u);
89
+ }), e.clear(), i.forEach(u), i.clear(), s.forEach(u), s.clear(), d.forEach(c), e.size && v(t);
90
+ } while (e.size || i.size || s.size);
91
+ if (f.length)
92
+ throw new AggregateError(f);
93
+ }, gt = (t) => {
94
+ const n = S(t), o = n[1], e = n[2], s = n[3], i = n[11], a = n[14], v = n[17], f = [], c = /* @__PURE__ */ new WeakSet(), d = /* @__PURE__ */ new WeakSet(), u = Array.from(s);
95
+ for (; u.length; ) {
96
+ const h = u[u.length - 1], l = i(t, h);
97
+ if (d.has(h)) {
98
+ u.pop();
99
+ continue;
100
+ }
101
+ if (c.has(h)) {
102
+ if (e.get(h) === l.n)
103
+ f.push([h, l]);
104
+ else if ((_ ? "production" : void 0) !== "production" && e.has(h))
105
+ throw new Error("[Bug] invalidated atom exists");
106
+ d.add(h), u.pop();
107
+ continue;
108
+ }
109
+ c.add(h);
110
+ for (const p of q(h, l, o))
111
+ c.has(p) || u.push(p);
112
+ }
113
+ for (let h = f.length - 1; h >= 0; --h) {
114
+ const [l, p] = f[h];
115
+ let b = !1;
116
+ for (const r of p.d.keys())
117
+ if (r !== l && s.has(r)) {
118
+ b = !0;
119
+ break;
120
+ }
121
+ b && (a(t, l), v(t, l)), e.delete(l);
122
+ }
123
+ }, W = /* @__PURE__ */ new WeakSet(), St = (t, n) => {
124
+ var o, e;
125
+ const s = S(t), i = s[1], a = s[2], v = s[3], f = s[6], c = s[7], d = s[11], u = s[12], h = s[13], l = s[14], p = s[16], b = s[17], r = d(t, n);
126
+ if (F(r)) {
127
+ if (i.has(n) && a.get(n) !== r.n)
128
+ return r;
129
+ let g = !1;
130
+ for (const [D, y] of r.d)
131
+ if (l(t, D).n !== y) {
132
+ g = !0;
133
+ break;
134
+ }
135
+ if (!g)
136
+ return r;
137
+ }
138
+ r.d.clear();
139
+ let A = !0;
140
+ function m() {
141
+ i.has(n) && (b(t, n), h(t), u(t));
142
+ }
143
+ function M(g) {
144
+ var D;
145
+ if (g === n) {
146
+ const N = d(t, g);
147
+ if (!F(N))
148
+ if (J(g))
149
+ C(t, g, g.init);
150
+ else
151
+ throw new Error("no atom init");
152
+ return I(N);
153
+ }
154
+ const y = l(t, g);
155
+ try {
156
+ return I(y);
157
+ } finally {
158
+ r.d.set(g, y.n), $(r.v) && G(n, r.v, y), i.has(n) && ((D = i.get(g)) == null || D.t.add(n)), A || m();
159
+ }
160
+ }
161
+ let w, k;
162
+ const nt = {
163
+ get signal() {
164
+ return w || (w = new AbortController()), w.signal;
165
+ },
166
+ get setSelf() {
167
+ return (_ ? "production" : void 0) !== "production" && !T(n) && console.warn("setSelf function cannot be used with read-only atom"), !k && T(n) && (k = (...g) => {
168
+ if ((_ ? "production" : void 0) !== "production" && A && console.warn("setSelf function cannot be called in sync"), !A)
169
+ try {
170
+ return p(t, n, ...g);
171
+ } finally {
172
+ h(t), u(t);
173
+ }
174
+ }), k;
175
+ }
176
+ }, H = r.n;
177
+ try {
178
+ (_ ? "production" : void 0) !== "production" && W.delete(t);
179
+ const g = c(t, n, M, nt);
180
+ return (_ ? "production" : void 0) !== "production" && W.has(t) && console.warn(
181
+ "Detected store mutation during atom read. This is not supported."
182
+ ), C(t, n, g), R(g) && (O(g, () => w == null ? void 0 : w.abort()), g.then(m, m)), (o = f.r) == null || o.call(f, n), r;
183
+ } catch (g) {
184
+ return delete r.v, r.e = g, ++r.n, r;
185
+ } finally {
186
+ A = !1, H !== r.n && a.get(n) === H && (a.set(n, r.n), v.add(n), (e = f.c) == null || e.call(f, n));
187
+ }
188
+ }, bt = (t, n) => {
189
+ const o = S(t), e = o[1], s = o[2], i = o[11], a = [n];
190
+ for (; a.length; ) {
191
+ const v = a.pop(), f = i(t, v);
192
+ for (const c of q(v, f, e)) {
193
+ const d = i(t, c);
194
+ s.set(c, d.n), a.push(c);
195
+ }
196
+ }
197
+ }, K = (t, n, ...o) => {
198
+ const e = S(t), s = e[3], i = e[6], a = e[8], v = e[11], f = e[12], c = e[13], d = e[14], u = e[15], h = e[17];
199
+ let l = !0;
200
+ const p = (r) => I(d(t, r)), b = (r, ...A) => {
201
+ var m;
202
+ const M = v(t, r);
203
+ try {
204
+ if (r === n) {
205
+ if (!J(r))
206
+ throw new Error("atom not writable");
207
+ (_ ? "production" : void 0) !== "production" && W.add(t);
208
+ const w = M.n, k = A[0];
209
+ C(t, r, k), h(t, r), w !== M.n && (s.add(r), u(t, r), (m = i.c) == null || m.call(i, r));
210
+ return;
211
+ } else
212
+ return K(t, r, ...A);
213
+ } finally {
214
+ l || (c(t), f(t));
215
+ }
216
+ };
217
+ try {
218
+ return a(t, n, p, b, ...o);
219
+ } finally {
220
+ l = !1;
221
+ }
222
+ }, mt = (t, n) => {
223
+ var o;
224
+ const e = S(t), s = e[1], i = e[3], a = e[6], v = e[11], f = e[15], c = e[18], d = e[19], u = v(t, n), h = s.get(n);
225
+ if (h && !$(u.v)) {
226
+ for (const [l, p] of u.d)
227
+ if (!h.d.has(l)) {
228
+ const b = v(t, l);
229
+ c(t, l).t.add(n), h.d.add(l), p !== b.n && (i.add(l), f(t, l), (o = a.c) == null || o.call(a, l));
230
+ }
231
+ for (const l of h.d)
232
+ if (!u.d.has(l)) {
233
+ h.d.delete(l);
234
+ const p = d(t, l);
235
+ p == null || p.t.delete(n);
236
+ }
237
+ }
238
+ }, Q = (t, n) => {
239
+ var o;
240
+ const e = S(t), s = e[1], i = e[4], a = e[6], v = e[10], f = e[11], c = e[12], d = e[13], u = e[14], h = e[16], l = f(t, n);
241
+ let p = s.get(n);
242
+ if (!p) {
243
+ u(t, n);
244
+ for (const b of l.d.keys())
245
+ Q(t, b).t.add(n);
246
+ if (p = {
247
+ l: /* @__PURE__ */ new Set(),
248
+ d: new Set(l.d.keys()),
249
+ t: /* @__PURE__ */ new Set()
250
+ }, s.set(n, p), T(n)) {
251
+ const b = () => {
252
+ let r = !0;
253
+ const A = (...m) => {
254
+ try {
255
+ return h(t, n, ...m);
256
+ } finally {
257
+ r || (d(t), c(t));
258
+ }
259
+ };
260
+ try {
261
+ const m = v(t, n, A);
262
+ m && (p.u = () => {
263
+ r = !0;
264
+ try {
265
+ m();
266
+ } finally {
267
+ r = !1;
268
+ }
269
+ });
270
+ } finally {
271
+ r = !1;
272
+ }
273
+ };
274
+ i.add(b);
275
+ }
276
+ (o = a.m) == null || o.call(a, n);
277
+ }
278
+ return p;
279
+ }, At = (t, n) => {
280
+ var o, e;
281
+ const s = S(t), i = s[1], a = s[5], v = s[6], f = s[11], c = s[19], d = f(t, n);
282
+ let u = i.get(n);
283
+ if (!u || u.l.size)
284
+ return u;
285
+ let h = !1;
286
+ for (const l of u.t)
287
+ if ((o = i.get(l)) != null && o.d.has(n)) {
288
+ h = !0;
289
+ break;
290
+ }
291
+ if (!h) {
292
+ u.u && a.add(u.u), u = void 0, i.delete(n);
293
+ for (const l of d.d.keys()) {
294
+ const p = c(t, l);
295
+ p == null || p.t.delete(n);
296
+ }
297
+ (e = v.u) == null || e.call(v, n);
298
+ return;
299
+ }
300
+ return u;
301
+ }, C = (t, n, o) => {
302
+ const e = S(t)[11], s = e(t, n), i = "v" in s, a = s.v;
303
+ if (R(o))
304
+ for (const v of s.d.keys())
305
+ G(
306
+ n,
307
+ o,
308
+ e(t, v)
309
+ );
310
+ s.v = o, delete s.e, (!i || !Object.is(a, s.v)) && (++s.n, R(a) && at(a));
311
+ }, _t = (t, n) => {
312
+ const o = S(t)[14];
313
+ return I(o(t, n));
314
+ }, wt = (t, n, ...o) => {
315
+ const e = S(t), s = e[12], i = e[13], a = e[16];
316
+ try {
317
+ return a(t, n, ...o);
318
+ } finally {
319
+ i(t), s(t);
320
+ }
321
+ }, kt = (t, n, o) => {
322
+ const e = S(t), s = e[12], i = e[18], a = e[19], f = i(t, n).l;
323
+ return f.add(o), s(t), () => {
324
+ f.delete(o), a(t, n), s(t);
325
+ };
326
+ }, X = /* @__PURE__ */ new WeakMap(), S = (t) => {
327
+ const n = X.get(t);
328
+ if ((_ ? "production" : void 0) !== "production" && !n)
329
+ throw new Error(
330
+ "Store must be created by buildStore to read its building blocks"
331
+ );
332
+ return n;
333
+ };
334
+ function yt(...t) {
335
+ const n = {
336
+ get(e) {
337
+ const s = S(n)[21];
338
+ return s(n, e);
339
+ },
340
+ set(e, ...s) {
341
+ const i = S(n)[22];
342
+ return i(n, e, ...s);
343
+ },
344
+ sub(e, s) {
345
+ const i = S(n)[23];
346
+ return i(n, e, s);
347
+ }
348
+ }, o = [
349
+ // store state
350
+ /* @__PURE__ */ new WeakMap(),
351
+ // atomStateMap
352
+ /* @__PURE__ */ new WeakMap(),
353
+ // mountedMap
354
+ /* @__PURE__ */ new WeakMap(),
355
+ // invalidatedAtoms
356
+ /* @__PURE__ */ new Set(),
357
+ // changedAtoms
358
+ /* @__PURE__ */ new Set(),
359
+ // mountCallbacks
360
+ /* @__PURE__ */ new Set(),
361
+ // unmountCallbacks
362
+ {},
363
+ // storeHooks
364
+ // atom interceptors
365
+ lt,
366
+ dt,
367
+ ft,
368
+ vt,
369
+ // building-block functions
370
+ ht,
371
+ pt,
372
+ gt,
373
+ St,
374
+ bt,
375
+ K,
376
+ mt,
377
+ Q,
378
+ At,
379
+ C,
380
+ _t,
381
+ wt,
382
+ kt,
383
+ void 0
384
+ ].map((e, s) => t[s] || e);
385
+ return X.set(n, Object.freeze(o)), n;
386
+ }
387
+ const Y = {};
388
+ let Et = 0;
389
+ function Ot(t, n) {
390
+ const o = `atom${++Et}`, e = {
391
+ toString() {
392
+ return (Y ? "production" : void 0) !== "production" && this.debugLabel ? o + ":" + this.debugLabel : o;
393
+ }
394
+ };
395
+ return e.init = t, e.read = Mt, e.write = Dt, e;
396
+ }
397
+ function Mt(t) {
398
+ return t(this);
399
+ }
400
+ function Dt(t, n, o) {
401
+ return n(
402
+ this,
403
+ typeof o == "function" ? o(t(this)) : o
404
+ );
405
+ }
406
+ function Z() {
407
+ return yt();
408
+ }
409
+ let E;
410
+ function It() {
411
+ return E || (E = Z(), (Y ? "production" : void 0) !== "production" && (globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = E), globalThis.__JOTAI_DEFAULT_STORE__ !== E && console.warn(
412
+ "Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"
413
+ ))), E;
414
+ }
415
+ const Pt = {}, L = ot(
416
+ void 0
417
+ );
418
+ function tt(t) {
419
+ return rt(L) || It();
420
+ }
421
+ function Wt({
422
+ children: t,
423
+ store: n
424
+ }) {
425
+ const o = et(null);
426
+ return n ? x(L.Provider, { value: n }, t) : (o.current === null && (o.current = Z()), x(
427
+ L.Provider,
428
+ {
429
+ // TODO: If this is not a false positive, consider using useState instead of useRef like https://github.com/pmndrs/jotai/pull/2771
430
+ // eslint-disable-next-line react-hooks/refs
431
+ value: o.current
432
+ },
433
+ t
434
+ ));
435
+ }
436
+ const V = (t) => typeof (t == null ? void 0 : t.then) == "function", z = (t) => {
437
+ t.status || (t.status = "pending", t.then(
438
+ (n) => {
439
+ t.status = "fulfilled", t.value = n;
440
+ },
441
+ (n) => {
442
+ t.status = "rejected", t.reason = n;
443
+ }
444
+ ));
445
+ }, Rt = U.use || // A shim for older React versions
446
+ ((t) => {
447
+ if (t.status === "pending")
448
+ throw t;
449
+ if (t.status === "fulfilled")
450
+ return t.value;
451
+ throw t.status === "rejected" ? t.reason : (z(t), t);
452
+ }), B = /* @__PURE__ */ new WeakMap(), j = (t, n) => {
453
+ let o = B.get(t);
454
+ return o || (o = new Promise((e, s) => {
455
+ let i = t;
456
+ const a = (c) => (d) => {
457
+ i === c && e(d);
458
+ }, v = (c) => (d) => {
459
+ i === c && s(d);
460
+ }, f = () => {
461
+ try {
462
+ const c = n();
463
+ V(c) ? (B.set(c, o), i = c, c.then(a(c), v(c)), O(c, f)) : e(c);
464
+ } catch (c) {
465
+ s(c);
466
+ }
467
+ };
468
+ t.then(a(t), v(t)), O(t, f);
469
+ }), B.set(t, o)), o;
470
+ };
471
+ function Ct(t, n) {
472
+ const { delay: o, unstable_promiseStatus: e = !U.use } = {}, s = tt(), [[i, a, v], f] = st(
473
+ (d) => {
474
+ const u = s.get(t);
475
+ return Object.is(d[0], u) && d[1] === s && d[2] === t ? d : [u, s, t];
476
+ },
477
+ void 0,
478
+ () => [s.get(t), s, t]
479
+ );
480
+ let c = i;
481
+ if ((a !== s || v !== t) && (f(), c = s.get(t)), it(() => {
482
+ const d = s.sub(t, () => {
483
+ if (e)
484
+ try {
485
+ const u = s.get(t);
486
+ V(u) && z(
487
+ j(u, () => s.get(t))
488
+ );
489
+ } catch {
490
+ }
491
+ if (typeof o == "number") {
492
+ setTimeout(f, o);
493
+ return;
494
+ }
495
+ f();
496
+ });
497
+ return f(), d;
498
+ }, [s, t, o, e]), ct(c), V(c)) {
499
+ const d = j(c, () => s.get(t));
500
+ return e && z(d), Rt(d);
501
+ }
502
+ return c;
503
+ }
504
+ function Bt(t, n) {
505
+ const o = tt();
506
+ return ut(
507
+ (...s) => {
508
+ if ((Pt ? "production" : void 0) !== "production" && !("write" in t))
509
+ throw new Error("not writable atom");
510
+ return o.set(t, ...s);
511
+ },
512
+ [o, t]
513
+ );
514
+ }
515
+ function Lt(t, n) {
516
+ return [
517
+ Ct(t),
518
+ // We do wrong type assertion here, which results in throwing an error.
519
+ Bt(t)
520
+ ];
521
+ }
522
+ export {
523
+ Wt as P,
524
+ Ot as a,
525
+ Lt as u
526
+ };
@@ -0,0 +1,6 @@
1
+ function i(t, n) {
2
+ typeof t == "function" ? t(n) : t && (t.current = n);
3
+ }
4
+ export {
5
+ i as s
6
+ };
@@ -0,0 +1,90 @@
1
+ import * as p from "react";
2
+ import { u as K, e as k } from "./ClassNameConfigurator-CVRWfyIa.js";
3
+ import { i as x } from "./isFocusVisible-CPZqtjv2.js";
4
+ function V(l) {
5
+ const {
6
+ rootElementName: u = "",
7
+ componentName: c
8
+ } = l, [n, g] = p.useState(u.toUpperCase());
9
+ process.env.NODE_ENV !== "production" && p.useEffect(() => {
10
+ u && n !== u.toUpperCase() && console.error(`useRootElementName: the \`rootElementName\` prop of ${c ? `the ${c} component` : "a component"} expected the '${u}' element, but a '${n.toLowerCase()}' was rendered instead`, "This may cause hydration issues in an SSR context, for example in a Next.js app");
11
+ }, [u, n, c]);
12
+ const f = p.useCallback((s) => {
13
+ g((s == null ? void 0 : s.tagName) ?? "");
14
+ }, []);
15
+ return [n, f];
16
+ }
17
+ function O(l = {}) {
18
+ const {
19
+ disabled: u = !1,
20
+ focusableWhenDisabled: c,
21
+ href: n,
22
+ rootRef: g,
23
+ tabIndex: f,
24
+ to: s,
25
+ type: b,
26
+ rootElementName: D
27
+ } = l, N = p.useRef(null), [C, r] = p.useState(!1), [R, E] = p.useState(!1);
28
+ u && !c && R && E(!1);
29
+ const [m, U] = V({
30
+ rootElementName: D ?? (n || s ? "a" : void 0),
31
+ componentName: "Button"
32
+ }), w = (t) => (e) => {
33
+ var o;
34
+ R && e.preventDefault(), (o = t.onMouseLeave) == null || o.call(t, e);
35
+ }, B = (t) => (e) => {
36
+ var o;
37
+ x(e.target) || E(!1), (o = t.onBlur) == null || o.call(t, e);
38
+ }, F = (t) => (e) => {
39
+ var o, a;
40
+ N.current || (N.current = e.currentTarget), x(e.target) && (E(!0), (o = t.onFocusVisible) == null || o.call(t, e)), (a = t.onFocus) == null || a.call(t, e);
41
+ }, y = () => {
42
+ const t = N.current;
43
+ return m === "BUTTON" || m === "INPUT" && ["button", "submit", "reset"].includes(t == null ? void 0 : t.type) || m === "A" && (t == null ? void 0 : t.href);
44
+ }, M = (t) => (e) => {
45
+ var o;
46
+ u || (o = t.onClick) == null || o.call(t, e);
47
+ }, P = (t) => (e) => {
48
+ var o;
49
+ u || (r(!0), document.addEventListener("mouseup", () => {
50
+ r(!1);
51
+ }, {
52
+ once: !0
53
+ })), (o = t.onMouseDown) == null || o.call(t, e);
54
+ }, d = (t) => (e) => {
55
+ var o, a;
56
+ (o = t.onKeyDown) == null || o.call(t, e), !e.defaultMuiPrevented && (e.target === e.currentTarget && !y() && e.key === " " && e.preventDefault(), e.target === e.currentTarget && e.key === " " && !u && r(!0), e.target === e.currentTarget && !y() && e.key === "Enter" && !u && ((a = t.onClick) == null || a.call(t, e), e.preventDefault()));
57
+ }, I = (t) => (e) => {
58
+ var o, a;
59
+ e.target === e.currentTarget && r(!1), (o = t.onKeyUp) == null || o.call(t, e), e.target === e.currentTarget && !y() && !u && e.key === " " && !e.defaultMuiPrevented && ((a = t.onClick) == null || a.call(t, e));
60
+ }, T = K(U, g, N), i = {};
61
+ return f !== void 0 && (i.tabIndex = f), m === "BUTTON" ? (i.type = b ?? "button", c ? i["aria-disabled"] = u : i.disabled = u) : m === "INPUT" ? b && ["button", "submit", "reset"].includes(b) && (c ? i["aria-disabled"] = u : i.disabled = u) : m !== "" && (!n && !s && (i.role = "button", i.tabIndex = f ?? 0), u && (i["aria-disabled"] = u, i.tabIndex = c ? f ?? 0 : -1)), {
62
+ getRootProps: (t = {}) => {
63
+ const e = {
64
+ ...k(l),
65
+ ...k(t)
66
+ }, o = {
67
+ type: b,
68
+ ...e,
69
+ ...i,
70
+ ...t,
71
+ onBlur: B(e),
72
+ onClick: M(e),
73
+ onFocus: F(e),
74
+ onKeyDown: d(e),
75
+ onKeyUp: I(e),
76
+ onMouseDown: P(e),
77
+ onMouseLeave: w(e),
78
+ ref: T
79
+ };
80
+ return delete o.onFocusVisible, o;
81
+ },
82
+ focusVisible: R,
83
+ setFocusVisible: E,
84
+ active: C,
85
+ rootRef: T
86
+ };
87
+ }
88
+ export {
89
+ O as u
90
+ };
@@ -0,0 +1,31 @@
1
+ import * as t from "react";
2
+ function d({
3
+ controlled: o,
4
+ default: s,
5
+ name: n,
6
+ state: r = "value"
7
+ }) {
8
+ const {
9
+ current: e
10
+ } = t.useRef(o !== void 0), [c, l] = t.useState(s), u = e ? o : c;
11
+ if (process.env.NODE_ENV !== "production") {
12
+ t.useEffect(() => {
13
+ e !== (o !== void 0) && console.error([`MUI: A component is changing the ${e ? "" : "un"}controlled ${r} state of ${n} to be ${e ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} 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(`
14
+ `));
15
+ }, [r, n, o]);
16
+ const {
17
+ current: i
18
+ } = t.useRef(s);
19
+ t.useEffect(() => {
20
+ !e && !Object.is(i, s) && console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
21
+ `));
22
+ }, [JSON.stringify(s)]);
23
+ }
24
+ const f = t.useCallback((i) => {
25
+ e || l(i);
26
+ }, []);
27
+ return [u, f];
28
+ }
29
+ export {
30
+ d as u
31
+ };