@clearstory/drywall-react 3.6.0 → 3.7.1
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/{AdapterDayjs-DmNdmnYn.js → AdapterDayjs-DCXcQl7P.js} +1 -1
- package/dist/{Autocomplete-6OyJ32ew.js → Autocomplete-CRQVPnGm.js} +1 -1
- package/dist/{Button-Dwe5-ka7.js → Button-BbJu-90x.js} +3 -1
- package/dist/{Chip-CSmhOdUA.js → Chip-DRuBzMk-.js} +3 -1
- package/dist/{Datepicker-CXAX8MHh.js → Datepicker-D43mv2t3.js} +2 -2
- package/dist/KeyboardArrowRight-ywXLVR_a.js +12 -0
- package/dist/{SelectControl-BVkg3axE.js → SelectControl-DoTezauO.js} +2 -4
- package/dist/TablePagination-BWugB9nc.js +665 -0
- package/dist/{Tabs-DzfngSGu.js → Tabs-C9SJL9Or.js} +186 -191
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/AutocompleteControl/AutocompleteControl.js +4 -6
- package/dist/components/AutocompleteControl/index.js +1 -1
- package/dist/components/Button/index.d.ts +7 -4
- package/dist/components/Button/index.js +4 -3
- package/dist/components/Chip/index.d.ts +7 -4
- package/dist/components/Chip/index.js +4 -3
- package/dist/components/Datepicker/Datepicker.js +1 -1
- package/dist/components/Datepicker/index.js +2 -2
- package/dist/components/DatepickerControl/DatepickerControl.js +4 -6
- package/dist/components/DatepickerControl/index.js +1 -1
- package/dist/components/DialogClose/DialogClose.js +5 -7
- package/dist/components/FormSublabel/FormSublabel.js +4 -6
- package/dist/components/FormSublabel/index.js +1 -1
- package/dist/components/InputControl/InputControl.js +4 -6
- package/dist/components/InputControl/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +5 -7
- package/dist/components/NumberInput/index.js +1 -1
- package/dist/components/NumberInputControl/NumberInputControl.js +4 -6
- package/dist/components/NumberInputControl/index.js +1 -1
- package/dist/components/SelectControl/SelectControl.js +4 -6
- package/dist/components/SelectControl/index.js +1 -1
- package/dist/components/TablePagination/index.d.ts +2 -0
- package/dist/components/TablePagination/index.js +6 -0
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/ToastContainer/useToast.js +12 -11
- package/dist/main.d.ts +1 -0
- package/dist/main.js +400 -392
- package/package.json +2 -1
- package/dist/components/Button/Button.d.ts +0 -7
- package/dist/components/Button/Button.js +0 -11
- package/dist/components/Button/Button.types.d.ts +0 -6
- package/dist/components/Button/Button.types.js +0 -1
- package/dist/components/Chip/Chip.d.ts +0 -7
- package/dist/components/Chip/Chip.js +0 -11
- package/dist/components/Chip/Chip.types.d.ts +0 -6
- package/dist/components/Chip/Chip.types.js +0 -1
|
@@ -1,53 +1,48 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import { c as Rt, r as
|
|
2
|
+
import { c as Rt, r as fe } from "./createTheme-B1FDFl52.js";
|
|
3
3
|
import { P as t } from "./index-CyAhC1RZ.js";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as L } from "./clsx-OuTLNxxd.js";
|
|
5
5
|
import { u as Nt } from "./index-D2IRntbh.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { s as
|
|
6
|
+
import { u as pe } from "./useTheme-DAG00iEG.js";
|
|
7
|
+
import { jsx as w, jsxs as Ct } from "react/jsx-runtime";
|
|
8
|
+
import { s as A } from "./styled-D8CtiDxW.js";
|
|
9
9
|
import { m as zt } from "./memoTheme-CCudmmpb.js";
|
|
10
|
-
import { u as
|
|
10
|
+
import { u as be } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
11
11
|
import { d as jt } from "./debounce-46wSf_lW.js";
|
|
12
|
-
import { o as
|
|
13
|
-
import { g as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
12
|
+
import { o as kt } from "./ownerWindow-niciwP7I.js";
|
|
13
|
+
import { g as Dt } from "./generateUtilityClasses-CIjBDg4V.js";
|
|
14
|
+
import { u as D } from "./useSlot-BVGwJA4b.js";
|
|
15
|
+
import { u as Lt } from "./DefaultPropsProvider-Hks9kyHW.js";
|
|
16
16
|
import { u as J } from "./useSlotProps-D0I_wOtk.js";
|
|
17
17
|
import { u as lt } from "./useEventCallback-BAQJJ3ye.js";
|
|
18
|
-
import {
|
|
19
|
-
import { c as
|
|
20
|
-
import { B as
|
|
21
|
-
import { o as
|
|
22
|
-
import { r as
|
|
23
|
-
|
|
24
|
-
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
25
|
-
}), "KeyboardArrowLeft"), Te = Dt(/* @__PURE__ */ v("path", {
|
|
26
|
-
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
27
|
-
}), "KeyboardArrowRight");
|
|
28
|
-
function Be(o) {
|
|
18
|
+
import { K as me, a as he } from "./KeyboardArrowRight-ywXLVR_a.js";
|
|
19
|
+
import { c as At } from "./composeClasses-2Ou-RZJr.js";
|
|
20
|
+
import { B as Se } from "./ButtonBase-D2KI3JHl.js";
|
|
21
|
+
import { o as ve } from "./ownerDocument-CUrv0DIK.js";
|
|
22
|
+
import { r as ye } from "./refType-CedFpkve.js";
|
|
23
|
+
function Te(o) {
|
|
29
24
|
return (1 + Math.sin(Math.PI * o - Math.PI / 2)) / 2;
|
|
30
25
|
}
|
|
31
|
-
function
|
|
26
|
+
function Be(o, r, c, u = {}, a = () => {
|
|
32
27
|
}) {
|
|
33
28
|
const {
|
|
34
|
-
ease: f =
|
|
29
|
+
ease: f = Te,
|
|
35
30
|
duration: p = 300
|
|
36
31
|
// standard
|
|
37
32
|
} = u;
|
|
38
33
|
let b = null;
|
|
39
|
-
const
|
|
34
|
+
const m = r[o];
|
|
40
35
|
let C = !1;
|
|
41
36
|
const I = () => {
|
|
42
37
|
C = !0;
|
|
43
|
-
}, O = (
|
|
38
|
+
}, O = (v) => {
|
|
44
39
|
if (C) {
|
|
45
40
|
a(new Error("Animation cancelled"));
|
|
46
41
|
return;
|
|
47
42
|
}
|
|
48
|
-
b === null && (b =
|
|
49
|
-
const x = Math.min(1, (
|
|
50
|
-
if (r[o] = f(x) * (c -
|
|
43
|
+
b === null && (b = v);
|
|
44
|
+
const x = Math.min(1, (v - b) / p);
|
|
45
|
+
if (r[o] = f(x) * (c - m) + m, x >= 1) {
|
|
51
46
|
requestAnimationFrame(() => {
|
|
52
47
|
a(null);
|
|
53
48
|
});
|
|
@@ -55,54 +50,54 @@ function ge(o, r, c, u = {}, a = () => {
|
|
|
55
50
|
}
|
|
56
51
|
requestAnimationFrame(O);
|
|
57
52
|
};
|
|
58
|
-
return
|
|
53
|
+
return m === c ? (a(new Error("Element already at target position")), I) : (requestAnimationFrame(O), I);
|
|
59
54
|
}
|
|
60
|
-
const
|
|
55
|
+
const ge = {
|
|
61
56
|
width: 99,
|
|
62
57
|
height: 99,
|
|
63
58
|
position: "absolute",
|
|
64
59
|
top: -9999,
|
|
65
60
|
overflow: "scroll"
|
|
66
61
|
};
|
|
67
|
-
function
|
|
62
|
+
function Ft(o) {
|
|
68
63
|
const {
|
|
69
64
|
onChange: r,
|
|
70
65
|
...c
|
|
71
66
|
} = o, u = i.useRef(), a = i.useRef(null), f = () => {
|
|
72
67
|
u.current = a.current.offsetHeight - a.current.clientHeight;
|
|
73
68
|
};
|
|
74
|
-
return
|
|
69
|
+
return be(() => {
|
|
75
70
|
const p = jt(() => {
|
|
76
|
-
const
|
|
77
|
-
f(),
|
|
78
|
-
}), b =
|
|
71
|
+
const m = u.current;
|
|
72
|
+
f(), m !== u.current && r(u.current);
|
|
73
|
+
}), b = kt(a.current);
|
|
79
74
|
return b.addEventListener("resize", p), () => {
|
|
80
75
|
p.clear(), b.removeEventListener("resize", p);
|
|
81
76
|
};
|
|
82
77
|
}, [r]), i.useEffect(() => {
|
|
83
78
|
f(), r(u.current);
|
|
84
|
-
}, [r]), /* @__PURE__ */
|
|
85
|
-
style:
|
|
79
|
+
}, [r]), /* @__PURE__ */ w("div", {
|
|
80
|
+
style: ge,
|
|
86
81
|
...c,
|
|
87
82
|
ref: a
|
|
88
83
|
});
|
|
89
84
|
}
|
|
90
|
-
process.env.NODE_ENV !== "production" && (
|
|
85
|
+
process.env.NODE_ENV !== "production" && (Ft.propTypes = {
|
|
91
86
|
onChange: t.func.isRequired
|
|
92
87
|
});
|
|
93
|
-
function
|
|
88
|
+
function we(o) {
|
|
94
89
|
return Rt("MuiTabScrollButton", o);
|
|
95
90
|
}
|
|
96
|
-
const
|
|
91
|
+
const Ie = Dt("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), Ee = (o) => {
|
|
97
92
|
const {
|
|
98
93
|
classes: r,
|
|
99
94
|
orientation: c,
|
|
100
95
|
disabled: u
|
|
101
96
|
} = o;
|
|
102
|
-
return
|
|
97
|
+
return At({
|
|
103
98
|
root: ["root", c, u && "disabled"]
|
|
104
|
-
},
|
|
105
|
-
},
|
|
99
|
+
}, we, r);
|
|
100
|
+
}, Ce = A(Se, {
|
|
106
101
|
name: "MuiTabScrollButton",
|
|
107
102
|
slot: "Root",
|
|
108
103
|
overridesResolver: (o, r) => {
|
|
@@ -115,7 +110,7 @@ const Ee = kt("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
115
110
|
width: 40,
|
|
116
111
|
flexShrink: 0,
|
|
117
112
|
opacity: 0.8,
|
|
118
|
-
[`&.${
|
|
113
|
+
[`&.${Ie.disabled}`]: {
|
|
119
114
|
opacity: 0
|
|
120
115
|
},
|
|
121
116
|
variants: [{
|
|
@@ -130,8 +125,8 @@ const Ee = kt("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
130
125
|
}
|
|
131
126
|
}
|
|
132
127
|
}]
|
|
133
|
-
}),
|
|
134
|
-
const u =
|
|
128
|
+
}), Ht = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
129
|
+
const u = Lt({
|
|
135
130
|
props: r,
|
|
136
131
|
name: "MuiTabScrollButton"
|
|
137
132
|
}), {
|
|
@@ -139,49 +134,49 @@ const Ee = kt("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
139
134
|
slots: f = {},
|
|
140
135
|
slotProps: p = {},
|
|
141
136
|
direction: b,
|
|
142
|
-
orientation:
|
|
137
|
+
orientation: m,
|
|
143
138
|
disabled: C,
|
|
144
139
|
...I
|
|
145
|
-
} = u, O = Nt(),
|
|
140
|
+
} = u, O = Nt(), v = {
|
|
146
141
|
isRtl: O,
|
|
147
142
|
...u
|
|
148
|
-
}, x =
|
|
143
|
+
}, x = Ee(v), X = f.StartScrollButtonIcon ?? me, K = f.EndScrollButtonIcon ?? he, T = J({
|
|
149
144
|
elementType: X,
|
|
150
145
|
externalSlotProps: p.startScrollButtonIcon,
|
|
151
146
|
additionalProps: {
|
|
152
147
|
fontSize: "small"
|
|
153
148
|
},
|
|
154
|
-
ownerState:
|
|
149
|
+
ownerState: v
|
|
155
150
|
}), ct = J({
|
|
156
151
|
elementType: K,
|
|
157
152
|
externalSlotProps: p.endScrollButtonIcon,
|
|
158
153
|
additionalProps: {
|
|
159
154
|
fontSize: "small"
|
|
160
155
|
},
|
|
161
|
-
ownerState:
|
|
156
|
+
ownerState: v
|
|
162
157
|
});
|
|
163
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ w(Ce, {
|
|
164
159
|
component: "div",
|
|
165
|
-
className:
|
|
160
|
+
className: L(x.root, a),
|
|
166
161
|
ref: c,
|
|
167
162
|
role: null,
|
|
168
|
-
ownerState:
|
|
163
|
+
ownerState: v,
|
|
169
164
|
tabIndex: null,
|
|
170
165
|
...I,
|
|
171
166
|
style: {
|
|
172
167
|
...I.style,
|
|
173
|
-
...
|
|
168
|
+
...m === "vertical" && {
|
|
174
169
|
"--TabScrollButton-svgRotate": `rotate(${O ? -90 : 90}deg)`
|
|
175
170
|
}
|
|
176
171
|
},
|
|
177
|
-
children: b === "left" ? /* @__PURE__ */
|
|
178
|
-
...
|
|
179
|
-
}) : /* @__PURE__ */
|
|
172
|
+
children: b === "left" ? /* @__PURE__ */ w(X, {
|
|
173
|
+
...T
|
|
174
|
+
}) : /* @__PURE__ */ w(K, {
|
|
180
175
|
...ct
|
|
181
176
|
})
|
|
182
177
|
});
|
|
183
178
|
});
|
|
184
|
-
process.env.NODE_ENV !== "production" && (
|
|
179
|
+
process.env.NODE_ENV !== "production" && (Ht.propTypes = {
|
|
185
180
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
186
181
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
187
182
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -237,10 +232,10 @@ process.env.NODE_ENV !== "production" && (Vt.propTypes = {
|
|
|
237
232
|
*/
|
|
238
233
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
239
234
|
});
|
|
240
|
-
function
|
|
235
|
+
function Oe(o) {
|
|
241
236
|
return Rt("MuiTabs", o);
|
|
242
237
|
}
|
|
243
|
-
const st =
|
|
238
|
+
const st = Dt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), Ot = (o, r) => o === r ? o.firstChild : r && r.nextElementSibling ? r.nextElementSibling : o.firstChild, xt = (o, r) => o === r ? o.lastChild : r && r.previousElementSibling ? r.previousElementSibling : o.lastChild, G = (o, r, c) => {
|
|
244
239
|
let u = !1, a = c(o, r);
|
|
245
240
|
for (; a; ) {
|
|
246
241
|
if (a === o.firstChild) {
|
|
@@ -256,7 +251,7 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
256
251
|
return;
|
|
257
252
|
}
|
|
258
253
|
}
|
|
259
|
-
},
|
|
254
|
+
}, xe = (o) => {
|
|
260
255
|
const {
|
|
261
256
|
vertical: r,
|
|
262
257
|
fixed: c,
|
|
@@ -265,9 +260,9 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
265
260
|
scrollableY: f,
|
|
266
261
|
centered: p,
|
|
267
262
|
scrollButtonsHideMobile: b,
|
|
268
|
-
classes:
|
|
263
|
+
classes: m
|
|
269
264
|
} = o;
|
|
270
|
-
return
|
|
265
|
+
return At({
|
|
271
266
|
root: ["root", r && "vertical"],
|
|
272
267
|
scroller: ["scroller", c && "fixed", u && "hideScrollbar", a && "scrollableX", f && "scrollableY"],
|
|
273
268
|
list: ["list", "flexContainer", r && "flexContainerVertical", r && "vertical", p && "centered"],
|
|
@@ -275,8 +270,8 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
275
270
|
scrollButtons: ["scrollButtons", b && "scrollButtonsHideMobile"],
|
|
276
271
|
scrollableX: [a && "scrollableX"],
|
|
277
272
|
hideScrollbar: [u && "hideScrollbar"]
|
|
278
|
-
},
|
|
279
|
-
},
|
|
273
|
+
}, Oe, m);
|
|
274
|
+
}, Me = A("div", {
|
|
280
275
|
name: "MuiTabs",
|
|
281
276
|
slot: "Root",
|
|
282
277
|
overridesResolver: (o, r) => {
|
|
@@ -316,7 +311,7 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
316
311
|
}
|
|
317
312
|
}
|
|
318
313
|
}]
|
|
319
|
-
}))),
|
|
314
|
+
}))), Pe = A("div", {
|
|
320
315
|
name: "MuiTabs",
|
|
321
316
|
slot: "Scroller",
|
|
322
317
|
overridesResolver: (o, r) => {
|
|
@@ -368,7 +363,7 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
368
363
|
overflowX: "hidden"
|
|
369
364
|
}
|
|
370
365
|
}]
|
|
371
|
-
}),
|
|
366
|
+
}), Re = A("div", {
|
|
372
367
|
name: "MuiTabs",
|
|
373
368
|
slot: "List",
|
|
374
369
|
overridesResolver: (o, r) => {
|
|
@@ -394,7 +389,7 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
394
389
|
justifyContent: "center"
|
|
395
390
|
}
|
|
396
391
|
}]
|
|
397
|
-
}),
|
|
392
|
+
}), Ne = A("span", {
|
|
398
393
|
name: "MuiTabs",
|
|
399
394
|
slot: "Indicator"
|
|
400
395
|
})(zt(({
|
|
@@ -429,7 +424,7 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
429
424
|
right: 0
|
|
430
425
|
}
|
|
431
426
|
}]
|
|
432
|
-
}))),
|
|
427
|
+
}))), ze = A(Ft)({
|
|
433
428
|
overflowX: "auto",
|
|
434
429
|
overflowY: "hidden",
|
|
435
430
|
// Hide dimensionless scrollbar on macOS
|
|
@@ -441,26 +436,26 @@ const st = kt("MuiTabs", ["root", "vertical", "list", "flexContainer", "flexCont
|
|
|
441
436
|
}
|
|
442
437
|
}), Mt = {};
|
|
443
438
|
let Pt = !1;
|
|
444
|
-
const
|
|
445
|
-
const u =
|
|
439
|
+
const je = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
440
|
+
const u = Lt({
|
|
446
441
|
props: r,
|
|
447
442
|
name: "MuiTabs"
|
|
448
|
-
}), a =
|
|
443
|
+
}), a = pe(), f = Nt(), {
|
|
449
444
|
"aria-label": p,
|
|
450
445
|
"aria-labelledby": b,
|
|
451
|
-
action:
|
|
446
|
+
action: m,
|
|
452
447
|
centered: C = !1,
|
|
453
448
|
children: I,
|
|
454
449
|
className: O,
|
|
455
|
-
component:
|
|
450
|
+
component: v = "div",
|
|
456
451
|
allowScrollButtonsMobile: x = !1,
|
|
457
452
|
indicatorColor: X = "primary",
|
|
458
453
|
onChange: K,
|
|
459
|
-
orientation:
|
|
454
|
+
orientation: T = "horizontal",
|
|
460
455
|
ScrollButtonComponent: ct,
|
|
461
456
|
// TODO: remove in v7 (deprecated in v6)
|
|
462
457
|
scrollButtons: z = "auto",
|
|
463
|
-
selectionFollowsFocus:
|
|
458
|
+
selectionFollowsFocus: Vt,
|
|
464
459
|
slots: M = {},
|
|
465
460
|
slotProps: Q = {},
|
|
466
461
|
TabIndicatorProps: at = {},
|
|
@@ -471,38 +466,38 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
471
466
|
value: j,
|
|
472
467
|
variant: Z = "standard",
|
|
473
468
|
visibleScrollbar: tt = !1,
|
|
474
|
-
...
|
|
475
|
-
} = u,
|
|
469
|
+
...Wt
|
|
470
|
+
} = u, h = Z === "scrollable", S = T === "vertical", F = S ? "scrollTop" : "scrollLeft", U = S ? "top" : "left", Y = S ? "bottom" : "right", et = S ? "clientHeight" : "clientWidth", H = S ? "height" : "width", B = {
|
|
476
471
|
...u,
|
|
477
|
-
component:
|
|
472
|
+
component: v,
|
|
478
473
|
allowScrollButtonsMobile: x,
|
|
479
474
|
indicatorColor: X,
|
|
480
|
-
orientation:
|
|
475
|
+
orientation: T,
|
|
481
476
|
vertical: S,
|
|
482
477
|
scrollButtons: z,
|
|
483
478
|
textColor: ut,
|
|
484
479
|
variant: Z,
|
|
485
480
|
visibleScrollbar: tt,
|
|
486
|
-
fixed: !
|
|
487
|
-
hideScrollbar:
|
|
488
|
-
scrollableX:
|
|
489
|
-
scrollableY:
|
|
490
|
-
centered: C && !
|
|
481
|
+
fixed: !h,
|
|
482
|
+
hideScrollbar: h && !tt,
|
|
483
|
+
scrollableX: h && !S,
|
|
484
|
+
scrollableY: h && S,
|
|
485
|
+
centered: C && !h,
|
|
491
486
|
scrollButtonsHideMobile: !x
|
|
492
|
-
}, E =
|
|
487
|
+
}, E = xe(B), Xt = J({
|
|
493
488
|
elementType: M.StartScrollButtonIcon,
|
|
494
489
|
externalSlotProps: Q.startScrollButtonIcon,
|
|
495
|
-
ownerState:
|
|
496
|
-
}),
|
|
490
|
+
ownerState: B
|
|
491
|
+
}), Kt = J({
|
|
497
492
|
elementType: M.EndScrollButtonIcon,
|
|
498
493
|
externalSlotProps: Q.endScrollButtonIcon,
|
|
499
|
-
ownerState:
|
|
494
|
+
ownerState: B
|
|
500
495
|
});
|
|
501
|
-
process.env.NODE_ENV !== "production" && C &&
|
|
502
|
-
const [dt,
|
|
496
|
+
process.env.NODE_ENV !== "production" && C && h && console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');
|
|
497
|
+
const [dt, Ut] = i.useState(!1), [P, ft] = i.useState(Mt), [pt, Yt] = i.useState(!1), [bt, $t] = i.useState(!1), [mt, _t] = i.useState(!1), [ht, qt] = i.useState({
|
|
503
498
|
overflow: "hidden",
|
|
504
499
|
scrollbarWidth: 0
|
|
505
|
-
}), $ = /* @__PURE__ */ new Map(),
|
|
500
|
+
}), $ = /* @__PURE__ */ new Map(), g = i.useRef(null), R = i.useRef(null), k = {
|
|
506
501
|
slots: M,
|
|
507
502
|
slotProps: {
|
|
508
503
|
indicator: at,
|
|
@@ -510,7 +505,7 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
510
505
|
...Q
|
|
511
506
|
}
|
|
512
507
|
}, St = () => {
|
|
513
|
-
const e =
|
|
508
|
+
const e = g.current;
|
|
514
509
|
let n;
|
|
515
510
|
if (e) {
|
|
516
511
|
const s = e.getBoundingClientRect();
|
|
@@ -555,20 +550,20 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
555
550
|
if (typeof P[s] != "number" || typeof P[H] != "number")
|
|
556
551
|
ft(d);
|
|
557
552
|
else {
|
|
558
|
-
const
|
|
559
|
-
(
|
|
553
|
+
const y = Math.abs(P[s] - d[s]), N = Math.abs(P[H] - d[H]);
|
|
554
|
+
(y >= 1 || N >= 1) && ft(d);
|
|
560
555
|
}
|
|
561
556
|
}), ot = (e, {
|
|
562
557
|
animation: n = !0
|
|
563
558
|
} = {}) => {
|
|
564
|
-
n ?
|
|
559
|
+
n ? Be(F, g.current, e, {
|
|
565
560
|
duration: a.transitions.duration.standard
|
|
566
|
-
}) :
|
|
561
|
+
}) : g.current[F] = e;
|
|
567
562
|
}, vt = (e) => {
|
|
568
|
-
let n =
|
|
563
|
+
let n = g.current[F];
|
|
569
564
|
S ? n += e : n += e * (f ? -1 : 1), ot(n);
|
|
570
565
|
}, yt = () => {
|
|
571
|
-
const e =
|
|
566
|
+
const e = g.current[et];
|
|
572
567
|
let n = 0;
|
|
573
568
|
const l = Array.from(R.current.children);
|
|
574
569
|
for (let s = 0; s < l.length; s += 1) {
|
|
@@ -580,55 +575,55 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
580
575
|
n += d[et];
|
|
581
576
|
}
|
|
582
577
|
return n;
|
|
583
|
-
},
|
|
578
|
+
}, Gt = () => {
|
|
584
579
|
vt(-1 * yt());
|
|
585
|
-
},
|
|
580
|
+
}, Jt = () => {
|
|
586
581
|
vt(yt());
|
|
587
|
-
}, [
|
|
582
|
+
}, [Qt, {
|
|
588
583
|
onChange: Tt,
|
|
589
|
-
...
|
|
590
|
-
}] =
|
|
591
|
-
className:
|
|
592
|
-
elementType:
|
|
584
|
+
...Zt
|
|
585
|
+
}] = D("scrollbar", {
|
|
586
|
+
className: L(E.scrollableX, E.hideScrollbar),
|
|
587
|
+
elementType: ze,
|
|
593
588
|
shouldForwardComponentProp: !0,
|
|
594
|
-
externalForwardedProps:
|
|
595
|
-
ownerState:
|
|
596
|
-
}),
|
|
597
|
-
Tt?.(e),
|
|
589
|
+
externalForwardedProps: k,
|
|
590
|
+
ownerState: B
|
|
591
|
+
}), te = i.useCallback((e) => {
|
|
592
|
+
Tt?.(e), qt({
|
|
598
593
|
overflow: null,
|
|
599
594
|
scrollbarWidth: e
|
|
600
595
|
});
|
|
601
|
-
}, [Tt]), [Bt, gt] =
|
|
602
|
-
className:
|
|
603
|
-
elementType:
|
|
604
|
-
externalForwardedProps:
|
|
605
|
-
ownerState:
|
|
596
|
+
}, [Tt]), [Bt, gt] = D("scrollButtons", {
|
|
597
|
+
className: L(E.scrollButtons, it.className),
|
|
598
|
+
elementType: Ht,
|
|
599
|
+
externalForwardedProps: k,
|
|
600
|
+
ownerState: B,
|
|
606
601
|
additionalProps: {
|
|
607
|
-
orientation:
|
|
602
|
+
orientation: T,
|
|
608
603
|
slots: {
|
|
609
604
|
StartScrollButtonIcon: M.startScrollButtonIcon || M.StartScrollButtonIcon,
|
|
610
605
|
EndScrollButtonIcon: M.endScrollButtonIcon || M.EndScrollButtonIcon
|
|
611
606
|
},
|
|
612
607
|
slotProps: {
|
|
613
|
-
startScrollButtonIcon:
|
|
614
|
-
endScrollButtonIcon:
|
|
608
|
+
startScrollButtonIcon: Xt,
|
|
609
|
+
endScrollButtonIcon: Kt
|
|
615
610
|
}
|
|
616
611
|
}
|
|
617
|
-
}),
|
|
612
|
+
}), ee = () => {
|
|
618
613
|
const e = {};
|
|
619
|
-
e.scrollbarSizeListener =
|
|
620
|
-
...
|
|
621
|
-
onChange:
|
|
614
|
+
e.scrollbarSizeListener = h ? /* @__PURE__ */ w(Qt, {
|
|
615
|
+
...Zt,
|
|
616
|
+
onChange: te
|
|
622
617
|
}) : null;
|
|
623
|
-
const l =
|
|
624
|
-
return e.scrollButtonStart = l ? /* @__PURE__ */
|
|
618
|
+
const l = h && (z === "auto" && (pt || bt) || z === !0);
|
|
619
|
+
return e.scrollButtonStart = l ? /* @__PURE__ */ w(Bt, {
|
|
625
620
|
direction: f ? "right" : "left",
|
|
626
|
-
onClick:
|
|
621
|
+
onClick: Gt,
|
|
627
622
|
disabled: !pt,
|
|
628
623
|
...gt
|
|
629
|
-
}) : null, e.scrollButtonEnd = l ? /* @__PURE__ */
|
|
624
|
+
}) : null, e.scrollButtonEnd = l ? /* @__PURE__ */ w(Bt, {
|
|
630
625
|
direction: f ? "left" : "right",
|
|
631
|
-
onClick:
|
|
626
|
+
onClick: Jt,
|
|
632
627
|
disabled: !bt,
|
|
633
628
|
...gt
|
|
634
629
|
}) : null, e;
|
|
@@ -651,26 +646,26 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
651
646
|
}
|
|
652
647
|
}
|
|
653
648
|
}), _ = lt(() => {
|
|
654
|
-
|
|
649
|
+
h && z !== !1 && _t(!mt);
|
|
655
650
|
});
|
|
656
651
|
i.useEffect(() => {
|
|
657
652
|
const e = jt(() => {
|
|
658
|
-
|
|
653
|
+
g.current && V();
|
|
659
654
|
});
|
|
660
655
|
let n;
|
|
661
|
-
const l = (
|
|
662
|
-
|
|
656
|
+
const l = (y) => {
|
|
657
|
+
y.forEach((N) => {
|
|
663
658
|
N.removedNodes.forEach((W) => {
|
|
664
659
|
n?.unobserve(W);
|
|
665
660
|
}), N.addedNodes.forEach((W) => {
|
|
666
661
|
n?.observe(W);
|
|
667
662
|
});
|
|
668
663
|
}), e(), _();
|
|
669
|
-
}, s =
|
|
664
|
+
}, s = kt(g.current);
|
|
670
665
|
s.addEventListener("resize", e);
|
|
671
666
|
let d;
|
|
672
|
-
return typeof ResizeObserver < "u" && (n = new ResizeObserver(e), Array.from(R.current.children).forEach((
|
|
673
|
-
n.observe(
|
|
667
|
+
return typeof ResizeObserver < "u" && (n = new ResizeObserver(e), Array.from(R.current.children).forEach((y) => {
|
|
668
|
+
n.observe(y);
|
|
674
669
|
})), typeof MutationObserver < "u" && (d = new MutationObserver(l), d.observe(R.current, {
|
|
675
670
|
childList: !0
|
|
676
671
|
})), () => {
|
|
@@ -678,47 +673,47 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
678
673
|
};
|
|
679
674
|
}, [V, _]), i.useEffect(() => {
|
|
680
675
|
const e = Array.from(R.current.children), n = e.length;
|
|
681
|
-
if (typeof IntersectionObserver < "u" && n > 0 &&
|
|
676
|
+
if (typeof IntersectionObserver < "u" && n > 0 && h && z !== !1) {
|
|
682
677
|
const l = e[0], s = e[n - 1], d = {
|
|
683
|
-
root:
|
|
678
|
+
root: g.current,
|
|
684
679
|
threshold: 0.99
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
}, N = new IntersectionObserver(
|
|
680
|
+
}, y = (nt) => {
|
|
681
|
+
Yt(!nt[0].isIntersecting);
|
|
682
|
+
}, N = new IntersectionObserver(y, d);
|
|
688
683
|
N.observe(l);
|
|
689
684
|
const W = (nt) => {
|
|
690
|
-
|
|
685
|
+
$t(!nt[0].isIntersecting);
|
|
691
686
|
}, Et = new IntersectionObserver(W, d);
|
|
692
687
|
return Et.observe(s), () => {
|
|
693
688
|
N.disconnect(), Et.disconnect();
|
|
694
689
|
};
|
|
695
690
|
}
|
|
696
|
-
}, [
|
|
697
|
-
|
|
691
|
+
}, [h, z, mt, I?.length]), i.useEffect(() => {
|
|
692
|
+
Ut(!0);
|
|
698
693
|
}, []), i.useEffect(() => {
|
|
699
694
|
V();
|
|
700
695
|
}), i.useEffect(() => {
|
|
701
696
|
wt(Mt !== P);
|
|
702
|
-
}, [wt, P]), i.useImperativeHandle(
|
|
697
|
+
}, [wt, P]), i.useImperativeHandle(m, () => ({
|
|
703
698
|
updateIndicator: V,
|
|
704
699
|
updateScrollButtons: _
|
|
705
700
|
}), [V, _]);
|
|
706
|
-
const [
|
|
707
|
-
className:
|
|
708
|
-
elementType:
|
|
709
|
-
externalForwardedProps:
|
|
710
|
-
ownerState:
|
|
701
|
+
const [oe, re] = D("indicator", {
|
|
702
|
+
className: L(E.indicator, at.className),
|
|
703
|
+
elementType: Ne,
|
|
704
|
+
externalForwardedProps: k,
|
|
705
|
+
ownerState: B,
|
|
711
706
|
additionalProps: {
|
|
712
707
|
style: P
|
|
713
708
|
}
|
|
714
|
-
}), It = /* @__PURE__ */
|
|
715
|
-
...
|
|
709
|
+
}), It = /* @__PURE__ */ w(oe, {
|
|
710
|
+
...re
|
|
716
711
|
});
|
|
717
712
|
let q = 0;
|
|
718
|
-
const
|
|
713
|
+
const ne = i.Children.map(I, (e) => {
|
|
719
714
|
if (!/* @__PURE__ */ i.isValidElement(e))
|
|
720
715
|
return null;
|
|
721
|
-
process.env.NODE_ENV !== "production" &&
|
|
716
|
+
process.env.NODE_ENV !== "production" && fe.isFragment(e) && console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
|
|
722
717
|
`));
|
|
723
718
|
const n = e.props.value === void 0 ? q : e.props.value;
|
|
724
719
|
$.set(n, q);
|
|
@@ -727,7 +722,7 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
727
722
|
fullWidth: Z === "fullWidth",
|
|
728
723
|
indicator: l && !dt && It,
|
|
729
724
|
selected: l,
|
|
730
|
-
selectionFollowsFocus:
|
|
725
|
+
selectionFollowsFocus: Vt,
|
|
731
726
|
onChange: K,
|
|
732
727
|
textColor: ut,
|
|
733
728
|
value: n,
|
|
@@ -735,18 +730,18 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
735
730
|
tabIndex: 0
|
|
736
731
|
} : {}
|
|
737
732
|
});
|
|
738
|
-
}),
|
|
733
|
+
}), le = (e) => {
|
|
739
734
|
if (e.altKey || e.shiftKey || e.ctrlKey || e.metaKey)
|
|
740
735
|
return;
|
|
741
|
-
const n = R.current, l =
|
|
736
|
+
const n = R.current, l = ve(n).activeElement;
|
|
742
737
|
if (l.getAttribute("role") !== "tab")
|
|
743
738
|
return;
|
|
744
|
-
let d =
|
|
745
|
-
switch (
|
|
739
|
+
let d = T === "horizontal" ? "ArrowLeft" : "ArrowUp", y = T === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
740
|
+
switch (T === "horizontal" && f && (d = "ArrowRight", y = "ArrowLeft"), e.key) {
|
|
746
741
|
case d:
|
|
747
742
|
e.preventDefault(), G(n, l, xt);
|
|
748
743
|
break;
|
|
749
|
-
case
|
|
744
|
+
case y:
|
|
750
745
|
e.preventDefault(), G(n, l, Ot);
|
|
751
746
|
break;
|
|
752
747
|
case "Home":
|
|
@@ -756,57 +751,57 @@ const Le = /* @__PURE__ */ i.forwardRef(function(r, c) {
|
|
|
756
751
|
e.preventDefault(), G(n, null, xt);
|
|
757
752
|
break;
|
|
758
753
|
}
|
|
759
|
-
}, rt =
|
|
754
|
+
}, rt = ee(), [se, ce] = D("root", {
|
|
760
755
|
ref: c,
|
|
761
|
-
className:
|
|
762
|
-
elementType:
|
|
756
|
+
className: L(E.root, O),
|
|
757
|
+
elementType: Me,
|
|
763
758
|
externalForwardedProps: {
|
|
764
|
-
...
|
|
765
|
-
...
|
|
766
|
-
component:
|
|
759
|
+
...k,
|
|
760
|
+
...Wt,
|
|
761
|
+
component: v
|
|
767
762
|
},
|
|
768
|
-
ownerState:
|
|
769
|
-
}), [
|
|
770
|
-
ref:
|
|
763
|
+
ownerState: B
|
|
764
|
+
}), [ae, ie] = D("scroller", {
|
|
765
|
+
ref: g,
|
|
771
766
|
className: E.scroller,
|
|
772
|
-
elementType:
|
|
773
|
-
externalForwardedProps:
|
|
774
|
-
ownerState:
|
|
767
|
+
elementType: Pe,
|
|
768
|
+
externalForwardedProps: k,
|
|
769
|
+
ownerState: B,
|
|
775
770
|
additionalProps: {
|
|
776
771
|
style: {
|
|
777
|
-
overflow:
|
|
778
|
-
[S ? `margin${f ? "Left" : "Right"}` : "marginBottom"]: tt ? void 0 : -
|
|
772
|
+
overflow: ht.overflow,
|
|
773
|
+
[S ? `margin${f ? "Left" : "Right"}` : "marginBottom"]: tt ? void 0 : -ht.scrollbarWidth
|
|
779
774
|
}
|
|
780
775
|
}
|
|
781
|
-
}), [
|
|
776
|
+
}), [ue, de] = D("list", {
|
|
782
777
|
ref: R,
|
|
783
|
-
className:
|
|
784
|
-
elementType:
|
|
785
|
-
externalForwardedProps:
|
|
786
|
-
ownerState:
|
|
778
|
+
className: L(E.list, E.flexContainer),
|
|
779
|
+
elementType: Re,
|
|
780
|
+
externalForwardedProps: k,
|
|
781
|
+
ownerState: B,
|
|
787
782
|
getSlotProps: (e) => ({
|
|
788
783
|
...e,
|
|
789
784
|
onKeyDown: (n) => {
|
|
790
|
-
|
|
785
|
+
le(n), e.onKeyDown?.(n);
|
|
791
786
|
}
|
|
792
787
|
})
|
|
793
788
|
});
|
|
794
|
-
return /* @__PURE__ */ Ct(
|
|
795
|
-
...
|
|
796
|
-
children: [rt.scrollButtonStart, rt.scrollbarSizeListener, /* @__PURE__ */ Ct(
|
|
797
|
-
...
|
|
798
|
-
children: [/* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ Ct(se, {
|
|
790
|
+
...ce,
|
|
791
|
+
children: [rt.scrollButtonStart, rt.scrollbarSizeListener, /* @__PURE__ */ Ct(ae, {
|
|
792
|
+
...ie,
|
|
793
|
+
children: [/* @__PURE__ */ w(ue, {
|
|
799
794
|
"aria-label": p,
|
|
800
795
|
"aria-labelledby": b,
|
|
801
|
-
"aria-orientation":
|
|
796
|
+
"aria-orientation": T === "vertical" ? "vertical" : null,
|
|
802
797
|
role: "tablist",
|
|
803
|
-
...
|
|
804
|
-
children:
|
|
798
|
+
...de,
|
|
799
|
+
children: ne
|
|
805
800
|
}), dt && It]
|
|
806
801
|
}), rt.scrollButtonEnd]
|
|
807
802
|
});
|
|
808
803
|
});
|
|
809
|
-
process.env.NODE_ENV !== "production" && (
|
|
804
|
+
process.env.NODE_ENV !== "production" && (je.propTypes = {
|
|
810
805
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
811
806
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
812
807
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -819,7 +814,7 @@ process.env.NODE_ENV !== "production" && (Le.propTypes = {
|
|
|
819
814
|
* @param {object} actions This object contains all possible actions
|
|
820
815
|
* that can be triggered programmatically.
|
|
821
816
|
*/
|
|
822
|
-
action:
|
|
817
|
+
action: ye,
|
|
823
818
|
/**
|
|
824
819
|
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
825
820
|
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
@@ -972,7 +967,7 @@ process.env.NODE_ENV !== "production" && (Le.propTypes = {
|
|
|
972
967
|
visibleScrollbar: t.bool
|
|
973
968
|
});
|
|
974
969
|
export {
|
|
975
|
-
|
|
976
|
-
|
|
970
|
+
je as T,
|
|
971
|
+
Oe as g,
|
|
977
972
|
st as t
|
|
978
973
|
};
|