@pismo/marola 1.0.0-beta.7 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-2b1peDFT.js → Button-DiLqcAJG.js} +2 -2
- package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-BaJ-OV_7.js} +4 -3
- package/dist/Input.module-iOYlI_1w.js +405 -0
- package/dist/{Popup-B6ZSGIEI.js → Popup-lLWZt2wk.js} +3 -3
- package/dist/{Portal-DIeBsWdL.js → Portal-B_Es6eUL.js} +2 -2
- package/dist/{Toggle-BWF0-SPB.js → Toggle-BSvvbKBp.js} +2 -2
- package/dist/assets/Autocomplete.css +1 -0
- package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-BtBYUV_B.js} +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +50 -0
- package/dist/components/Autocomplete/Autocomplete.js +689 -0
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +45 -0
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Chip/Chip.js +3 -3
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +12 -11
- package/dist/components/Dialog/Dialog.stories.d.ts +42 -42
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +74 -471
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/Select/Select.js +7 -6
- package/dist/components/Snackbar/Snackbar.js +4 -4
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- package/dist/components/Tabs/Tab.js +18 -17
- package/dist/components/Tabs/TabPanel.js +27 -26
- package/dist/components/Tabs/Tabs.js +25 -25
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/{index-CjW42-M-.js → index-D3Wj0eid.js} +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +77 -75
- package/dist/ownerDocument-B61GUaFs.js +33 -0
- package/dist/{useButton-DNk3wrQp.js → useButton-Bn3MNH8I.js} +1 -1
- package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
- package/dist/useEventCallback-BAQJJ3ye.js +14 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/{useList-B0hog_3-.js → useList-BpJT77u3.js} +2 -2
- package/dist/{index-CH45lKw7.js → useSlotProps-kRhf7Gil.js} +93 -94
- package/package.json +1 -1
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useEventCallback-xTG9piMa.js +0 -45
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { u as I } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
3
|
+
const p = /* @__PURE__ */ o.createContext(null);
|
|
4
|
+
process.env.NODE_ENV !== "production" && (p.displayName = "CompoundComponentContext");
|
|
5
|
+
function b(t) {
|
|
6
|
+
const c = Array.from(t.keys()).map((e) => {
|
|
7
|
+
const r = t.get(e);
|
|
8
|
+
return {
|
|
9
|
+
key: e,
|
|
10
|
+
subitem: r
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
return c.sort((e, r) => {
|
|
14
|
+
const n = e.subitem.ref.current, s = r.subitem.ref.current;
|
|
15
|
+
return n === null || s === null || n === s ? 0 : n.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
|
|
16
|
+
}), new Map(c.map((e) => [e.key, e.subitem]));
|
|
17
|
+
}
|
|
18
|
+
function x() {
|
|
19
|
+
const [t, c] = o.useState(/* @__PURE__ */ new Map()), e = o.useRef(/* @__PURE__ */ new Set()), r = o.useCallback(function(i) {
|
|
20
|
+
e.current.delete(i), c((a) => {
|
|
21
|
+
const u = new Map(a);
|
|
22
|
+
return u.delete(i), u;
|
|
23
|
+
});
|
|
24
|
+
}, []), n = o.useCallback(function(i, a) {
|
|
25
|
+
let u;
|
|
26
|
+
return typeof i == "function" ? u = i(e.current) : u = i, e.current.add(u), c((C) => {
|
|
27
|
+
const l = new Map(C);
|
|
28
|
+
return l.set(u, a), l;
|
|
29
|
+
}), {
|
|
30
|
+
id: u,
|
|
31
|
+
deregister: () => r(u)
|
|
32
|
+
};
|
|
33
|
+
}, [r]), s = o.useMemo(() => b(t), [t]), m = o.useCallback(function(i) {
|
|
34
|
+
return Array.from(s.keys()).indexOf(i);
|
|
35
|
+
}, [s]);
|
|
36
|
+
return {
|
|
37
|
+
contextValue: o.useMemo(() => ({
|
|
38
|
+
getItemIndex: m,
|
|
39
|
+
registerItem: n,
|
|
40
|
+
totalSubitemCount: t.size
|
|
41
|
+
}), [m, n, t.size]),
|
|
42
|
+
subitems: s
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function S(t, c) {
|
|
46
|
+
const e = o.useContext(p);
|
|
47
|
+
if (e === null)
|
|
48
|
+
throw new Error("useCompoundItem must be used within a useCompoundParent");
|
|
49
|
+
const {
|
|
50
|
+
registerItem: r
|
|
51
|
+
} = e, [n, s] = o.useState(typeof t == "function" ? void 0 : t);
|
|
52
|
+
return I(() => {
|
|
53
|
+
const {
|
|
54
|
+
id: m,
|
|
55
|
+
deregister: d
|
|
56
|
+
} = r(t, c);
|
|
57
|
+
return s(m), d;
|
|
58
|
+
}, [r, c, t]), {
|
|
59
|
+
id: n,
|
|
60
|
+
index: n !== void 0 ? e.getItemIndex(n) : -1,
|
|
61
|
+
totalItemCount: e.totalSubitemCount
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
p as C,
|
|
66
|
+
x as a,
|
|
67
|
+
S as u
|
|
68
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import { u as c } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
3
|
+
function s(e) {
|
|
4
|
+
const r = t.useRef(e);
|
|
5
|
+
return c(() => {
|
|
6
|
+
r.current = e;
|
|
7
|
+
}), t.useRef((...u) => (
|
|
8
|
+
// @ts-expect-error hide `this`
|
|
9
|
+
(0, r.current)(...u)
|
|
10
|
+
)).current;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
s as u
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
let n = 0;
|
|
3
|
+
function l(t) {
|
|
4
|
+
const [u, o] = e.useState(t), a = t || u;
|
|
5
|
+
return e.useEffect(() => {
|
|
6
|
+
u == null && (n += 1, o(`mui-${n}`));
|
|
7
|
+
}, [u]), a;
|
|
8
|
+
}
|
|
9
|
+
const s = e.useId;
|
|
10
|
+
function c(t) {
|
|
11
|
+
if (s !== void 0) {
|
|
12
|
+
const u = s();
|
|
13
|
+
return t ?? u;
|
|
14
|
+
}
|
|
15
|
+
return l(t);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
c as u
|
|
19
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as p, u as re, f as ie } from "./
|
|
1
|
+
import { b as p, u as re, f as ie } from "./useSlotProps-kRhf7Gil.js";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import { L as x } from "./combineHooksSlotProps-
|
|
3
|
+
import { L as x } from "./combineHooksSlotProps-BtBYUV_B.js";
|
|
4
4
|
function W(t, e, r = (n, l) => n === l) {
|
|
5
5
|
return t.length === e.length && t.every((n, l) => r(n, e[l]));
|
|
6
6
|
}
|
|
@@ -11,36 +11,7 @@ function Y() {
|
|
|
11
11
|
return e;
|
|
12
12
|
}, Y.apply(this, arguments);
|
|
13
13
|
}
|
|
14
|
-
function _e(e) {
|
|
15
|
-
return typeof e == "string";
|
|
16
|
-
}
|
|
17
|
-
function Re(e, s, t) {
|
|
18
|
-
return e === void 0 || _e(e) ? s : Y({}, s, {
|
|
19
|
-
ownerState: Y({}, s.ownerState, t)
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
const xe = {
|
|
23
|
-
disableDefaultClasses: !1
|
|
24
|
-
}, Se = /* @__PURE__ */ ue.createContext(xe);
|
|
25
|
-
process.env.NODE_ENV !== "production" && (Se.displayName = "ClassNameConfiguratorContext");
|
|
26
|
-
function Ke(e) {
|
|
27
|
-
const {
|
|
28
|
-
disableDefaultClasses: s
|
|
29
|
-
} = ue.useContext(Se);
|
|
30
|
-
return (t) => s ? "" : e(t);
|
|
31
|
-
}
|
|
32
|
-
function we(e, s = []) {
|
|
33
|
-
if (e === void 0)
|
|
34
|
-
return {};
|
|
35
|
-
const t = {};
|
|
36
|
-
return Object.keys(e).filter((n) => n.match(/^on[A-Z]/) && typeof e[n] == "function" && !s.includes(n)).forEach((n) => {
|
|
37
|
-
t[n] = e[n];
|
|
38
|
-
}), t;
|
|
39
|
-
}
|
|
40
|
-
function Ae(e, s, t) {
|
|
41
|
-
return typeof e == "function" ? e(s, t) : e;
|
|
42
|
-
}
|
|
43
|
-
function je(e, s) {
|
|
14
|
+
function _e(e, s) {
|
|
44
15
|
if (e == null)
|
|
45
16
|
return {};
|
|
46
17
|
var t = {};
|
|
@@ -52,7 +23,7 @@ function je(e, s) {
|
|
|
52
23
|
}
|
|
53
24
|
return t;
|
|
54
25
|
}
|
|
55
|
-
function
|
|
26
|
+
function Re(e) {
|
|
56
27
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
57
28
|
}
|
|
58
29
|
var se = { exports: {} }, V = { exports: {} }, P = {};
|
|
@@ -65,7 +36,7 @@ var se = { exports: {} }, V = { exports: {} }, P = {};
|
|
|
65
36
|
* LICENSE file in the root directory of this source tree.
|
|
66
37
|
*/
|
|
67
38
|
var de;
|
|
68
|
-
function
|
|
39
|
+
function xe() {
|
|
69
40
|
if (de)
|
|
70
41
|
return P;
|
|
71
42
|
de = 1;
|
|
@@ -141,7 +112,7 @@ var O = {};
|
|
|
141
112
|
* LICENSE file in the root directory of this source tree.
|
|
142
113
|
*/
|
|
143
114
|
var pe;
|
|
144
|
-
function
|
|
115
|
+
function we() {
|
|
145
116
|
return pe || (pe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
146
117
|
var e = typeof Symbol == "function" && Symbol.for, s = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, c = e ? Symbol.for("react.strict_mode") : 60108, u = e ? Symbol.for("react.profiler") : 60114, h = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, _ = e ? Symbol.for("react.async_mode") : 60111, v = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, S = e ? Symbol.for("react.suspense") : 60113, x = e ? Symbol.for("react.suspense_list") : 60120, w = e ? Symbol.for("react.memo") : 60115, $ = e ? Symbol.for("react.lazy") : 60116, R = e ? Symbol.for("react.block") : 60121, I = e ? Symbol.for("react.fundamental") : 60117, q = e ? Symbol.for("react.responder") : 60118, F = e ? Symbol.for("react.scope") : 60119;
|
|
147
118
|
function j(o) {
|
|
@@ -224,8 +195,8 @@ function Me() {
|
|
|
224
195
|
}()), O;
|
|
225
196
|
}
|
|
226
197
|
var ye;
|
|
227
|
-
function
|
|
228
|
-
return ye || (ye = 1, process.env.NODE_ENV === "production" ? V.exports =
|
|
198
|
+
function Se() {
|
|
199
|
+
return ye || (ye = 1, process.env.NODE_ENV === "production" ? V.exports = xe() : V.exports = we()), V.exports;
|
|
229
200
|
}
|
|
230
201
|
/*
|
|
231
202
|
object-assign
|
|
@@ -233,7 +204,7 @@ object-assign
|
|
|
233
204
|
@license MIT
|
|
234
205
|
*/
|
|
235
206
|
var re, ve;
|
|
236
|
-
function
|
|
207
|
+
function Ae() {
|
|
237
208
|
if (ve)
|
|
238
209
|
return re;
|
|
239
210
|
ve = 1;
|
|
@@ -288,18 +259,18 @@ function ce() {
|
|
|
288
259
|
return te = e, te;
|
|
289
260
|
}
|
|
290
261
|
var ne, be;
|
|
291
|
-
function
|
|
262
|
+
function Pe() {
|
|
292
263
|
return be || (be = 1, ne = Function.call.bind(Object.prototype.hasOwnProperty)), ne;
|
|
293
264
|
}
|
|
294
265
|
var oe, he;
|
|
295
|
-
function
|
|
266
|
+
function je() {
|
|
296
267
|
if (he)
|
|
297
268
|
return oe;
|
|
298
269
|
he = 1;
|
|
299
270
|
var e = function() {
|
|
300
271
|
};
|
|
301
272
|
if (process.env.NODE_ENV !== "production") {
|
|
302
|
-
var s = ce(), t = {}, n =
|
|
273
|
+
var s = ce(), t = {}, n = Pe();
|
|
303
274
|
e = function(u) {
|
|
304
275
|
var h = "Warning: " + u;
|
|
305
276
|
typeof console < "u" && console.error(h);
|
|
@@ -342,11 +313,11 @@ function Ye() {
|
|
|
342
313
|
}, oe = c, oe;
|
|
343
314
|
}
|
|
344
315
|
var ie, Ee;
|
|
345
|
-
function
|
|
316
|
+
function $e() {
|
|
346
317
|
if (Ee)
|
|
347
318
|
return ie;
|
|
348
319
|
Ee = 1;
|
|
349
|
-
var e =
|
|
320
|
+
var e = Se(), s = Ae(), t = ce(), n = Pe(), c = je(), u = function() {
|
|
350
321
|
};
|
|
351
322
|
process.env.NODE_ENV !== "production" && (u = function(f) {
|
|
352
323
|
var _ = "Warning: " + f;
|
|
@@ -664,7 +635,7 @@ Valid keys: ` + JSON.stringify(Object.keys(r), null, " ")
|
|
|
664
635
|
}, ie;
|
|
665
636
|
}
|
|
666
637
|
var ae, ge;
|
|
667
|
-
function
|
|
638
|
+
function Ie() {
|
|
668
639
|
if (ge)
|
|
669
640
|
return ae;
|
|
670
641
|
ge = 1;
|
|
@@ -713,12 +684,45 @@ function ke() {
|
|
|
713
684
|
}, ae;
|
|
714
685
|
}
|
|
715
686
|
if (process.env.NODE_ENV !== "production") {
|
|
716
|
-
var
|
|
717
|
-
se.exports =
|
|
687
|
+
var Me = Se(), qe = !0;
|
|
688
|
+
se.exports = $e()(Me.isElement, qe);
|
|
718
689
|
} else
|
|
719
|
-
se.exports =
|
|
720
|
-
var
|
|
721
|
-
const
|
|
690
|
+
se.exports = Ie()();
|
|
691
|
+
var Ye = se.exports;
|
|
692
|
+
const Ke = /* @__PURE__ */ Re(Ye);
|
|
693
|
+
function De(e) {
|
|
694
|
+
return typeof e == "string";
|
|
695
|
+
}
|
|
696
|
+
const ke = {
|
|
697
|
+
active: "active",
|
|
698
|
+
checked: "checked",
|
|
699
|
+
completed: "completed",
|
|
700
|
+
disabled: "disabled",
|
|
701
|
+
error: "error",
|
|
702
|
+
expanded: "expanded",
|
|
703
|
+
focused: "focused",
|
|
704
|
+
focusVisible: "focusVisible",
|
|
705
|
+
open: "open",
|
|
706
|
+
readOnly: "readOnly",
|
|
707
|
+
required: "required",
|
|
708
|
+
selected: "selected"
|
|
709
|
+
}, Oe = "base";
|
|
710
|
+
function We(e) {
|
|
711
|
+
return `${Oe}--${e}`;
|
|
712
|
+
}
|
|
713
|
+
function Le(e, s) {
|
|
714
|
+
return `${Oe}-${e}-${s}`;
|
|
715
|
+
}
|
|
716
|
+
function Ne(e, s) {
|
|
717
|
+
const t = ke[s];
|
|
718
|
+
return t ? We(t) : Le(e, s);
|
|
719
|
+
}
|
|
720
|
+
function Qe(e, s) {
|
|
721
|
+
const t = {};
|
|
722
|
+
return s.forEach((n) => {
|
|
723
|
+
t[n] = Ne(e, n);
|
|
724
|
+
}), t;
|
|
725
|
+
}
|
|
722
726
|
function Fe(e, s) {
|
|
723
727
|
typeof e == "function" ? e(s) : e && (e.current = s);
|
|
724
728
|
}
|
|
@@ -745,20 +749,32 @@ function er(e, s, t = void 0) {
|
|
|
745
749
|
}
|
|
746
750
|
), n;
|
|
747
751
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
752
|
+
function ze(e, s, t) {
|
|
753
|
+
return e === void 0 || De(e) ? s : Y({}, s, {
|
|
754
|
+
ownerState: Y({}, s.ownerState, t)
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
const He = {
|
|
758
|
+
disableDefaultClasses: !1
|
|
759
|
+
}, Ce = /* @__PURE__ */ ue.createContext(He);
|
|
760
|
+
process.env.NODE_ENV !== "production" && (Ce.displayName = "ClassNameConfiguratorContext");
|
|
761
|
+
function rr(e) {
|
|
762
|
+
const {
|
|
763
|
+
disableDefaultClasses: s
|
|
764
|
+
} = ue.useContext(Ce);
|
|
765
|
+
return (t) => s ? "" : e(t);
|
|
766
|
+
}
|
|
767
|
+
function Ve(e, s = []) {
|
|
768
|
+
if (e === void 0)
|
|
769
|
+
return {};
|
|
770
|
+
const t = {};
|
|
771
|
+
return Object.keys(e).filter((n) => n.match(/^on[A-Z]/) && typeof e[n] == "function" && !s.includes(n)).forEach((n) => {
|
|
772
|
+
t[n] = e[n];
|
|
773
|
+
}), t;
|
|
774
|
+
}
|
|
775
|
+
function Be(e, s, t) {
|
|
776
|
+
return typeof e == "function" ? e(s, t) : e;
|
|
777
|
+
}
|
|
762
778
|
function Te(e) {
|
|
763
779
|
if (e === void 0)
|
|
764
780
|
return {};
|
|
@@ -767,7 +783,7 @@ function Te(e) {
|
|
|
767
783
|
s[t] = e[t];
|
|
768
784
|
}), s;
|
|
769
785
|
}
|
|
770
|
-
function
|
|
786
|
+
function Je(e) {
|
|
771
787
|
const {
|
|
772
788
|
getSlotProps: s,
|
|
773
789
|
additionalProps: t,
|
|
@@ -782,59 +798,42 @@ function He(e) {
|
|
|
782
798
|
internalRef: void 0
|
|
783
799
|
};
|
|
784
800
|
}
|
|
785
|
-
const h =
|
|
801
|
+
const h = Ve(Y({}, c, n)), f = Te(n), _ = Te(c), v = s(h), m = le(v == null ? void 0 : v.className, t == null ? void 0 : t.className, u, c == null ? void 0 : c.className, n == null ? void 0 : n.className), S = Y({}, v == null ? void 0 : v.style, t == null ? void 0 : t.style, c == null ? void 0 : c.style, n == null ? void 0 : n.style), x = Y({}, v, t, _, f);
|
|
786
802
|
return m.length > 0 && (x.className = m), Object.keys(S).length > 0 && (x.style = S), {
|
|
787
803
|
props: x,
|
|
788
804
|
internalRef: v.ref
|
|
789
805
|
};
|
|
790
806
|
}
|
|
791
|
-
const
|
|
792
|
-
function
|
|
807
|
+
const Xe = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
|
|
808
|
+
function tr(e) {
|
|
793
809
|
var s;
|
|
794
810
|
const {
|
|
795
811
|
elementType: t,
|
|
796
812
|
externalSlotProps: n,
|
|
797
813
|
ownerState: c,
|
|
798
814
|
skipResolvingSlotProps: u = !1
|
|
799
|
-
} = e, h =
|
|
815
|
+
} = e, h = _e(e, Xe), f = u ? {} : Be(n, c), {
|
|
800
816
|
props: _,
|
|
801
817
|
internalRef: v
|
|
802
|
-
} =
|
|
818
|
+
} = Je(Y({}, h, {
|
|
803
819
|
externalSlotProps: f
|
|
804
820
|
})), m = Ue(v, f == null ? void 0 : f.ref, (s = e.additionalProps) == null ? void 0 : s.ref);
|
|
805
|
-
return
|
|
821
|
+
return ze(t, Y({}, _, {
|
|
806
822
|
ref: m
|
|
807
823
|
}), c);
|
|
808
824
|
}
|
|
809
|
-
const Ce = "base";
|
|
810
|
-
function Be(e) {
|
|
811
|
-
return `${Ce}--${e}`;
|
|
812
|
-
}
|
|
813
|
-
function Je(e, s) {
|
|
814
|
-
return `${Ce}-${e}-${s}`;
|
|
815
|
-
}
|
|
816
|
-
function Xe(e, s) {
|
|
817
|
-
const t = ze[s];
|
|
818
|
-
return t ? Be(t) : Je(e, s);
|
|
819
|
-
}
|
|
820
|
-
function tr(e, s) {
|
|
821
|
-
const t = {};
|
|
822
|
-
return s.forEach((n) => {
|
|
823
|
-
t[n] = Xe(e, n);
|
|
824
|
-
}), t;
|
|
825
|
-
}
|
|
826
825
|
export {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
826
|
+
Ke as P,
|
|
827
|
+
_e as _,
|
|
828
|
+
Qe as a,
|
|
830
829
|
Y as b,
|
|
831
|
-
|
|
830
|
+
tr as c,
|
|
832
831
|
er as d,
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
832
|
+
rr as e,
|
|
833
|
+
Ve as f,
|
|
834
|
+
Ne as g,
|
|
835
|
+
Re as h,
|
|
836
|
+
De as i,
|
|
838
837
|
Fe as s,
|
|
839
838
|
Ue as u
|
|
840
839
|
};
|
package/package.json
CHANGED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import { u as g } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
3
|
-
let I = 0;
|
|
4
|
-
function x(e) {
|
|
5
|
-
const [n, t] = o.useState(e), u = e || n;
|
|
6
|
-
return o.useEffect(() => {
|
|
7
|
-
n == null && (I += 1, t(`mui-${I}`));
|
|
8
|
-
}, [n]), u;
|
|
9
|
-
}
|
|
10
|
-
const p = o.useId;
|
|
11
|
-
function y(e) {
|
|
12
|
-
if (p !== void 0) {
|
|
13
|
-
const n = p();
|
|
14
|
-
return e ?? n;
|
|
15
|
-
}
|
|
16
|
-
return x(e);
|
|
17
|
-
}
|
|
18
|
-
const b = /* @__PURE__ */ o.createContext(null);
|
|
19
|
-
process.env.NODE_ENV !== "production" && (b.displayName = "CompoundComponentContext");
|
|
20
|
-
function S(e) {
|
|
21
|
-
const n = Array.from(e.keys()).map((t) => {
|
|
22
|
-
const u = e.get(t);
|
|
23
|
-
return {
|
|
24
|
-
key: t,
|
|
25
|
-
subitem: u
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
return n.sort((t, u) => {
|
|
29
|
-
const s = t.subitem.ref.current, r = u.subitem.ref.current;
|
|
30
|
-
return s === null || r === null || s === r ? 0 : s.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
|
|
31
|
-
}), new Map(n.map((t) => [t.key, t.subitem]));
|
|
32
|
-
}
|
|
33
|
-
function E() {
|
|
34
|
-
const [e, n] = o.useState(/* @__PURE__ */ new Map()), t = o.useRef(/* @__PURE__ */ new Set()), u = o.useCallback(function(a) {
|
|
35
|
-
t.current.delete(a), n((m) => {
|
|
36
|
-
const c = new Map(m);
|
|
37
|
-
return c.delete(a), c;
|
|
38
|
-
});
|
|
39
|
-
}, []), s = o.useCallback(function(a, m) {
|
|
40
|
-
let c;
|
|
41
|
-
return typeof a == "function" ? c = a(t.current) : c = a, t.current.add(c), n((C) => {
|
|
42
|
-
const l = new Map(C);
|
|
43
|
-
return l.set(c, m), l;
|
|
44
|
-
}), {
|
|
45
|
-
id: c,
|
|
46
|
-
deregister: () => u(c)
|
|
47
|
-
};
|
|
48
|
-
}, [u]), r = o.useMemo(() => S(e), [e]), i = o.useCallback(function(a) {
|
|
49
|
-
return Array.from(r.keys()).indexOf(a);
|
|
50
|
-
}, [r]);
|
|
51
|
-
return {
|
|
52
|
-
contextValue: o.useMemo(() => ({
|
|
53
|
-
getItemIndex: i,
|
|
54
|
-
registerItem: s,
|
|
55
|
-
totalSubitemCount: e.size
|
|
56
|
-
}), [i, s, e.size]),
|
|
57
|
-
subitems: r
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function N(e, n) {
|
|
61
|
-
const t = o.useContext(b);
|
|
62
|
-
if (t === null)
|
|
63
|
-
throw new Error("useCompoundItem must be used within a useCompoundParent");
|
|
64
|
-
const {
|
|
65
|
-
registerItem: u
|
|
66
|
-
} = t, [s, r] = o.useState(typeof e == "function" ? void 0 : e);
|
|
67
|
-
return g(() => {
|
|
68
|
-
const {
|
|
69
|
-
id: i,
|
|
70
|
-
deregister: d
|
|
71
|
-
} = u(e, n);
|
|
72
|
-
return r(i), d;
|
|
73
|
-
}, [u, n, e]), {
|
|
74
|
-
id: s,
|
|
75
|
-
index: s !== void 0 ? t.getItemIndex(s) : -1,
|
|
76
|
-
totalItemCount: t.totalSubitemCount
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
export {
|
|
80
|
-
b as C,
|
|
81
|
-
N as a,
|
|
82
|
-
E as b,
|
|
83
|
-
y as u
|
|
84
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { P as a } from "./index-CH45lKw7.js";
|
|
2
|
-
import * as c from "react";
|
|
3
|
-
import { u as m } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
4
|
-
function s(e, n) {
|
|
5
|
-
return process.env.NODE_ENV === "production" ? () => null : function(...o) {
|
|
6
|
-
return e(...o) || n(...o);
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
function d(e) {
|
|
10
|
-
const {
|
|
11
|
-
prototype: n = {}
|
|
12
|
-
} = e;
|
|
13
|
-
return !!n.isReactComponent;
|
|
14
|
-
}
|
|
15
|
-
function f(e, n, t, o, l) {
|
|
16
|
-
const u = e[n], p = l || n;
|
|
17
|
-
if (u == null || // When server-side rendering React doesn't warn either.
|
|
18
|
-
// This is not an accurate check for SSR.
|
|
19
|
-
// This is only in place for Emotion compat.
|
|
20
|
-
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
21
|
-
typeof window > "u")
|
|
22
|
-
return null;
|
|
23
|
-
let r;
|
|
24
|
-
const i = u.type;
|
|
25
|
-
return typeof i == "function" && !d(i) && (r = "Did you accidentally use a plain function component for an element instead?"), r !== void 0 ? new Error(`Invalid ${o} \`${p}\` supplied to \`${t}\`. Expected an element that can hold a ref. ${r} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
26
|
-
}
|
|
27
|
-
const y = s(a.element, f);
|
|
28
|
-
y.isRequired = s(a.element.isRequired, f);
|
|
29
|
-
function E(e) {
|
|
30
|
-
return e && e.ownerDocument || document;
|
|
31
|
-
}
|
|
32
|
-
function h(e) {
|
|
33
|
-
const n = c.useRef(e);
|
|
34
|
-
return m(() => {
|
|
35
|
-
n.current = e;
|
|
36
|
-
}), c.useRef((...t) => (
|
|
37
|
-
// @ts-expect-error hide `this`
|
|
38
|
-
(0, n.current)(...t)
|
|
39
|
-
)).current;
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
y as e,
|
|
43
|
-
E as o,
|
|
44
|
-
h as u
|
|
45
|
-
};
|