@cgi-learning-hub/ui 0.0.1-dev.1713358794 → 0.0.1-dev.1715078279
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/Box-DL1-mhd_.cjs +1 -0
- package/dist/{Box-CcD_sRqe.js → Box-Mup7NS_A.js} +24 -26
- package/dist/{ButtonBase-BBqNg9BC.js → ButtonBase-CjZVRZ1j.js} +102 -107
- package/dist/ButtonBase-h89TFQ74.cjs +75 -0
- package/dist/{CircularProgress-G9G_loET.js → CircularProgress-B5dLec9p.js} +4 -4
- package/dist/{CircularProgress-DVnd6kxt.cjs → CircularProgress-DvSP1TlK.cjs} +1 -1
- package/dist/{DefaultButton-DDeufcNs.js → DefaultButton-Bm_9J15r.js} +94 -95
- package/dist/DefaultButton-DpAQ3D3A.cjs +1 -0
- package/dist/{IconButton-B6XIqj_T.js → IconButton-BTwUbULL.js} +28 -29
- package/dist/IconButton-DwyJkFK6.cjs +2 -0
- package/dist/{InputBase-CdKFPwS3.js → InputBase-DQZzB50R.js} +280 -320
- package/dist/InputBase-pgeQJ7f1.cjs +3 -0
- package/dist/{LocalizationProvider-CNYbKILJ.cjs → LocalizationProvider-DESNnS1V.cjs} +1 -1
- package/dist/{LocalizationProvider-0zrjdh3x.js → LocalizationProvider-DFtKYTy5.js} +2 -2
- package/dist/SearchInput-CwKQj1FS.cjs +1 -0
- package/dist/{SearchInput-Q5BP0X0K.js → SearchInput-DFha51RP.js} +25 -25
- package/dist/Tabs-BnINEF7f.cjs +4 -0
- package/dist/{Tabs-CDBEadDu.js → Tabs-LRPQPGjl.js} +264 -265
- package/dist/TextInput-C6fc3CHh.cjs +12 -0
- package/dist/{TextInput-BNe_BIm9.js → TextInput-UE9eu-Sh.js} +1388 -1397
- package/dist/{TimePicker-CLYqSUwA.js → TimePicker-DgWZLyZU.js} +4848 -4664
- package/dist/TimePicker-DqFt1DP_.cjs +73 -0
- package/dist/Typography-BAJIrofJ.cjs +1 -0
- package/dist/{Typography-CkEznQ8f.js → Typography-BWCcreVc.js} +74 -100
- package/dist/assets/index.css +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.d.ts +3 -2
- package/dist/components/Dropzone/Dropzone.es.js +9 -9
- package/dist/components/Dropzone/Dropzone.stories.d.ts +2 -1
- package/dist/components/Dropzone/index.d.ts +2 -2
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +2 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -0
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.d.ts +2 -1
- package/dist/components/LoaderBackdrop/index.d.ts +2 -2
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.d.ts +2 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +2 -2
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- package/dist/components/LocalizationProvider/index.d.ts +2 -2
- package/dist/components/LocalizationProvider/index.es.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.d.ts +3 -2
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.d.ts +2 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +8 -8
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.d.ts +2 -2
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.d.ts +2 -1
- package/dist/components/buttons/IconButton.stories.es.js +10 -9
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.d.ts +2 -2
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +2 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/index.d.ts +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.d.ts +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +2 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/index.d.ts +2 -2
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.d.ts +3 -3
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/feedback/Alert/Alert.d.ts +2 -1
- package/dist/components/feedback/Alert/Alert.stories.d.ts +2 -1
- package/dist/components/feedback/Alert/index.d.ts +2 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +110 -110
- package/dist/components/index.es.js +11 -11
- package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.es.js +7 -6
- package/dist/components/inputs/PasswordInput/PasswordInput.stories.d.ts +2 -1
- package/dist/components/inputs/PasswordInput/index.d.ts +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.d.ts +2 -2
- package/dist/components/inputs/SearchInput/SearchInput.es.js +3 -3
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +2 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +1 -1
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.d.ts +2 -2
- package/dist/components/inputs/SearchInput/index.es.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/TextInput/TextInput.es.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.d.ts +2 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.d.ts +2 -2
- package/dist/components/inputs/TextInput/index.es.js +1 -1
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.d.ts +3 -3
- package/dist/components/inputs/index.es.js +2 -2
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.d.ts +2 -1
- package/dist/components/lists/FileList/FileList.es.js +1 -1
- package/dist/components/lists/FileList/FileList.stories.d.ts +2 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.d.ts +2 -1
- package/dist/components/lists/FileList/FileListItem.es.js +11 -10
- package/dist/components/lists/FileList/index.d.ts +4 -4
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.d.ts +2 -1
- package/dist/components/lists/TabList.stories.es.js +48 -49
- package/dist/components/lists/index.d.ts +1 -1
- package/dist/createSvgIcon-Bmh1dZN3.cjs +2 -0
- package/dist/createSvgIcon-BuZnNhW1.js +74 -0
- package/dist/{createSvgIcon-10LjrjuM.cjs → createSvgIcon-Ch5OwvT5.cjs} +1 -1
- package/dist/{createSvgIcon-DfXrmzRs.js → createSvgIcon-CwlWc9q-.js} +3 -3
- package/dist/{fr-HqFYdKZp.js → fr-1JMu1aWG.js} +1 -1
- package/dist/{fr-BNYi5x0Z.cjs → fr-BTDmq9ek.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +184 -184
- package/dist/{refType-BklAUjsY.js → refType-BatLLQAf.js} +7 -7
- package/dist/{refType-B-3PavG_.cjs → refType-BbhHflrD.cjs} +1 -1
- package/dist/styled-BBsrnZJ1.js +1218 -0
- package/dist/styled-CJ2HJ-9N.cjs +26 -0
- package/dist/useSlotProps-Ds0ykcZp.js +87 -0
- package/dist/useSlotProps-DykCCTRs.cjs +1 -0
- package/dist/{useThemeProps-DDcolYEZ.js → useThemeProps-C59ZmJTM.js} +1034 -926
- package/dist/useThemeProps-C5iFxIYI.cjs +42 -0
- package/package.json +16 -16
- package/dist/Box-C0uoTW0F.cjs +0 -1
- package/dist/ButtonBase-C_YtHw1h.cjs +0 -75
- package/dist/DefaultButton-DlTnxizc.cjs +0 -1
- package/dist/IconButton-Cz-zGz0v.cjs +0 -2
- package/dist/InputBase-DCjJT6Ht.cjs +0 -4
- package/dist/SearchInput-sybrE3fq.cjs +0 -1
- package/dist/Tabs-DX6Gm63O.cjs +0 -4
- package/dist/TextInput-Bla-t0jF.cjs +0 -12
- package/dist/TimePicker-EGYtgZTn.cjs +0 -71
- package/dist/Typography-B7jZzwxf.cjs +0 -1
- package/dist/createSvgIcon-Cy5_B3av.cjs +0 -2
- package/dist/createSvgIcon-MpAknZJY.js +0 -84
- package/dist/styled-CCfndrS2.js +0 -424
- package/dist/styled-jkrYOquU.cjs +0 -24
- package/dist/useSlotProps-Br7yUp1t.js +0 -78
- package/dist/useSlotProps-I3uiiCEn.cjs +0 -1
- package/dist/useThemeProps-BYFHMDRd.cjs +0 -42
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { g as me, c as Le, _ as b, u as ve, b as ae, P as t } from "./useThemeProps-
|
|
2
|
-
import * as
|
|
3
|
-
import { g as Se, s as
|
|
4
|
-
import { jsxs as Q, jsx as
|
|
5
|
-
import { B as
|
|
1
|
+
import { g as me, c as Le, _ as b, u as ve, b as ae, P as t } from "./useThemeProps-C59ZmJTM.js";
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import { g as Se, s as _, c as L, a as ye, d as st } from "./styled-BBsrnZJ1.js";
|
|
4
|
+
import { jsxs as Q, jsx as C } from "react/jsx-runtime";
|
|
5
|
+
import { B as ke } from "./ButtonBase-CjZVRZ1j.js";
|
|
6
6
|
import { u as at } from "./unsupportedProp-BuVD30Gh.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { a as
|
|
7
|
+
import { u as Fe, a as se, b as it } from "./useSlotProps-Ds0ykcZp.js";
|
|
8
|
+
import { u as ct } from "./useForkRef-CQ5u1_mH.js";
|
|
9
|
+
import { a as $e, d as Ae, o as dt } from "./ownerWindow-C7EH1lr6.js";
|
|
10
10
|
import { u as be } from "./useTimeout-Dokw0W_A.js";
|
|
11
|
-
import { r as
|
|
12
|
-
import { c as je } from "./createSvgIcon-
|
|
11
|
+
import { r as ut } from "./refType-BatLLQAf.js";
|
|
12
|
+
import { c as je } from "./createSvgIcon-CwlWc9q-.js";
|
|
13
13
|
let X;
|
|
14
14
|
function De() {
|
|
15
15
|
if (X)
|
|
@@ -17,7 +17,7 @@ function De() {
|
|
|
17
17
|
const e = document.createElement("div"), o = document.createElement("div");
|
|
18
18
|
return o.style.width = "10px", o.style.height = "1px", e.appendChild(o), e.dir = "rtl", e.style.fontSize = "14px", e.style.width = "4px", e.style.height = "1px", e.style.position = "absolute", e.style.top = "-1000px", e.style.overflow = "scroll", document.body.appendChild(e), X = "reverse", e.scrollLeft > 0 ? X = "default" : (e.scrollLeft = 1, e.scrollLeft === 0 && (X = "negative")), document.body.removeChild(e), X;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function pt(e, o) {
|
|
21
21
|
const n = e.scrollLeft;
|
|
22
22
|
if (o !== "rtl")
|
|
23
23
|
return n;
|
|
@@ -30,25 +30,25 @@ function ut(e, o) {
|
|
|
30
30
|
return n;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ft(e) {
|
|
34
34
|
return me("MuiTab", e);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const bt = Se("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]), D = bt, ht = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"], mt = (e) => {
|
|
37
37
|
const {
|
|
38
38
|
classes: o,
|
|
39
39
|
textColor: n,
|
|
40
40
|
fullWidth: c,
|
|
41
|
-
wrapped:
|
|
42
|
-
icon:
|
|
41
|
+
wrapped: i,
|
|
42
|
+
icon: d,
|
|
43
43
|
label: m,
|
|
44
44
|
selected: h,
|
|
45
45
|
disabled: p
|
|
46
|
-
} = e,
|
|
47
|
-
root: ["root",
|
|
46
|
+
} = e, y = {
|
|
47
|
+
root: ["root", d && m && "labelIcon", `textColor${Le(n)}`, c && "fullWidth", i && "wrapped", h && "selected", p && "disabled"],
|
|
48
48
|
iconWrapper: ["iconWrapper"]
|
|
49
49
|
};
|
|
50
|
-
return ye(
|
|
51
|
-
},
|
|
50
|
+
return ye(y, ft, o);
|
|
51
|
+
}, vt = _(ke, {
|
|
52
52
|
name: "MuiTab",
|
|
53
53
|
slot: "Root",
|
|
54
54
|
overridesResolver: (e, o) => {
|
|
@@ -78,7 +78,7 @@ const ft = Se("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrim
|
|
|
78
78
|
minHeight: 72,
|
|
79
79
|
paddingTop: 9,
|
|
80
80
|
paddingBottom: 9,
|
|
81
|
-
[`& > .${
|
|
81
|
+
[`& > .${D.iconWrapper}`]: b({}, o.iconPosition === "top" && {
|
|
82
82
|
marginBottom: 6
|
|
83
83
|
}, o.iconPosition === "bottom" && {
|
|
84
84
|
marginTop: 6
|
|
@@ -91,26 +91,26 @@ const ft = Se("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrim
|
|
|
91
91
|
color: "inherit",
|
|
92
92
|
opacity: 0.6,
|
|
93
93
|
// same opacity as theme.palette.text.secondary
|
|
94
|
-
[`&.${
|
|
94
|
+
[`&.${D.selected}`]: {
|
|
95
95
|
opacity: 1
|
|
96
96
|
},
|
|
97
|
-
[`&.${
|
|
97
|
+
[`&.${D.disabled}`]: {
|
|
98
98
|
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
99
99
|
}
|
|
100
100
|
}, o.textColor === "primary" && {
|
|
101
101
|
color: (e.vars || e).palette.text.secondary,
|
|
102
|
-
[`&.${
|
|
102
|
+
[`&.${D.selected}`]: {
|
|
103
103
|
color: (e.vars || e).palette.primary.main
|
|
104
104
|
},
|
|
105
|
-
[`&.${
|
|
105
|
+
[`&.${D.disabled}`]: {
|
|
106
106
|
color: (e.vars || e).palette.text.disabled
|
|
107
107
|
}
|
|
108
108
|
}, o.textColor === "secondary" && {
|
|
109
109
|
color: (e.vars || e).palette.text.secondary,
|
|
110
|
-
[`&.${
|
|
110
|
+
[`&.${D.selected}`]: {
|
|
111
111
|
color: (e.vars || e).palette.secondary.main
|
|
112
112
|
},
|
|
113
|
-
[`&.${
|
|
113
|
+
[`&.${D.disabled}`]: {
|
|
114
114
|
color: (e.vars || e).palette.text.disabled
|
|
115
115
|
}
|
|
116
116
|
}, o.fullWidth && {
|
|
@@ -120,66 +120,66 @@ const ft = Se("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrim
|
|
|
120
120
|
maxWidth: "none"
|
|
121
121
|
}, o.wrapped && {
|
|
122
122
|
fontSize: e.typography.pxToRem(12)
|
|
123
|
-
})), _e = /* @__PURE__ */
|
|
123
|
+
})), _e = /* @__PURE__ */ u.forwardRef(function(o, n) {
|
|
124
124
|
const c = ve({
|
|
125
125
|
props: o,
|
|
126
126
|
name: "MuiTab"
|
|
127
127
|
}), {
|
|
128
|
-
className:
|
|
129
|
-
disabled:
|
|
128
|
+
className: i,
|
|
129
|
+
disabled: d = !1,
|
|
130
130
|
disableFocusRipple: m = !1,
|
|
131
131
|
// eslint-disable-next-line react/prop-types
|
|
132
132
|
fullWidth: h,
|
|
133
133
|
icon: p,
|
|
134
|
-
iconPosition:
|
|
134
|
+
iconPosition: y = "top",
|
|
135
135
|
// eslint-disable-next-line react/prop-types
|
|
136
|
-
indicator:
|
|
137
|
-
label:
|
|
138
|
-
onChange:
|
|
139
|
-
onClick:
|
|
140
|
-
onFocus:
|
|
136
|
+
indicator: w,
|
|
137
|
+
label: T,
|
|
138
|
+
onChange: v,
|
|
139
|
+
onClick: I,
|
|
140
|
+
onFocus: k,
|
|
141
141
|
// eslint-disable-next-line react/prop-types
|
|
142
|
-
selected:
|
|
142
|
+
selected: E,
|
|
143
143
|
// eslint-disable-next-line react/prop-types
|
|
144
144
|
selectionFollowsFocus: g,
|
|
145
145
|
// eslint-disable-next-line react/prop-types
|
|
146
146
|
textColor: H = "inherit",
|
|
147
|
-
value:
|
|
147
|
+
value: N,
|
|
148
148
|
wrapped: ie = !1
|
|
149
|
-
} = c, V = ae(c,
|
|
150
|
-
disabled:
|
|
149
|
+
} = c, V = ae(c, ht), Y = b({}, c, {
|
|
150
|
+
disabled: d,
|
|
151
151
|
disableFocusRipple: m,
|
|
152
|
-
selected:
|
|
152
|
+
selected: E,
|
|
153
153
|
icon: !!p,
|
|
154
|
-
iconPosition:
|
|
155
|
-
label: !!
|
|
154
|
+
iconPosition: y,
|
|
155
|
+
label: !!T,
|
|
156
156
|
fullWidth: h,
|
|
157
157
|
textColor: H,
|
|
158
158
|
wrapped: ie
|
|
159
|
-
}), U =
|
|
159
|
+
}), U = mt(Y), F = p && T && /* @__PURE__ */ u.isValidElement(p) ? /* @__PURE__ */ u.cloneElement(p, {
|
|
160
160
|
className: L(U.iconWrapper, p.props.className)
|
|
161
161
|
}) : p, Z = (M) => {
|
|
162
|
-
!
|
|
162
|
+
!E && v && v(M, N), I && I(M);
|
|
163
163
|
}, P = (M) => {
|
|
164
|
-
g && !
|
|
164
|
+
g && !E && v && v(M, N), k && k(M);
|
|
165
165
|
};
|
|
166
|
-
return /* @__PURE__ */ Q(
|
|
166
|
+
return /* @__PURE__ */ Q(vt, b({
|
|
167
167
|
focusRipple: !m,
|
|
168
|
-
className: L(U.root,
|
|
168
|
+
className: L(U.root, i),
|
|
169
169
|
ref: n,
|
|
170
170
|
role: "tab",
|
|
171
|
-
"aria-selected":
|
|
172
|
-
disabled:
|
|
171
|
+
"aria-selected": E,
|
|
172
|
+
disabled: d,
|
|
173
173
|
onClick: Z,
|
|
174
174
|
onFocus: P,
|
|
175
175
|
ownerState: Y,
|
|
176
|
-
tabIndex:
|
|
176
|
+
tabIndex: E ? 0 : -1
|
|
177
177
|
}, V, {
|
|
178
|
-
children: [
|
|
179
|
-
children: [
|
|
180
|
-
}) : /* @__PURE__ */ Q(
|
|
181
|
-
children: [
|
|
182
|
-
}),
|
|
178
|
+
children: [y === "top" || y === "start" ? /* @__PURE__ */ Q(u.Fragment, {
|
|
179
|
+
children: [F, T]
|
|
180
|
+
}) : /* @__PURE__ */ Q(u.Fragment, {
|
|
181
|
+
children: [T, F]
|
|
182
|
+
}), w]
|
|
183
183
|
}));
|
|
184
184
|
});
|
|
185
185
|
process.env.NODE_ENV !== "production" && (_e.propTypes = {
|
|
@@ -258,44 +258,44 @@ process.env.NODE_ENV !== "production" && (_e.propTypes = {
|
|
|
258
258
|
*/
|
|
259
259
|
wrapped: t.bool
|
|
260
260
|
});
|
|
261
|
-
const
|
|
261
|
+
const qt = _e, St = je(/* @__PURE__ */ C("path", {
|
|
262
262
|
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
263
|
-
}), "KeyboardArrowLeft"),
|
|
263
|
+
}), "KeyboardArrowLeft"), yt = je(/* @__PURE__ */ C("path", {
|
|
264
264
|
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
265
265
|
}), "KeyboardArrowRight");
|
|
266
|
-
function
|
|
266
|
+
function gt(e) {
|
|
267
267
|
return (1 + Math.sin(Math.PI * e - Math.PI / 2)) / 2;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Tt(e, o, n, c = {}, i = () => {
|
|
270
270
|
}) {
|
|
271
271
|
const {
|
|
272
|
-
ease:
|
|
272
|
+
ease: d = gt,
|
|
273
273
|
duration: m = 300
|
|
274
274
|
// standard
|
|
275
275
|
} = c;
|
|
276
276
|
let h = null;
|
|
277
277
|
const p = o[e];
|
|
278
|
-
let
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
},
|
|
282
|
-
if (
|
|
283
|
-
|
|
278
|
+
let y = !1;
|
|
279
|
+
const w = () => {
|
|
280
|
+
y = !0;
|
|
281
|
+
}, T = (v) => {
|
|
282
|
+
if (y) {
|
|
283
|
+
i(new Error("Animation cancelled"));
|
|
284
284
|
return;
|
|
285
285
|
}
|
|
286
|
-
h === null && (h =
|
|
287
|
-
const
|
|
288
|
-
if (o[e] =
|
|
286
|
+
h === null && (h = v);
|
|
287
|
+
const I = Math.min(1, (v - h) / m);
|
|
288
|
+
if (o[e] = d(I) * (n - p) + p, I >= 1) {
|
|
289
289
|
requestAnimationFrame(() => {
|
|
290
|
-
|
|
290
|
+
i(null);
|
|
291
291
|
});
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
294
|
-
requestAnimationFrame(
|
|
294
|
+
requestAnimationFrame(T);
|
|
295
295
|
};
|
|
296
|
-
return p === n ? (
|
|
296
|
+
return p === n ? (i(new Error("Element already at target position")), w) : (requestAnimationFrame(T), w);
|
|
297
297
|
}
|
|
298
|
-
const
|
|
298
|
+
const xt = ["onChange"], Bt = {
|
|
299
299
|
width: 99,
|
|
300
300
|
height: 99,
|
|
301
301
|
position: "absolute",
|
|
@@ -305,31 +305,31 @@ const Tt = ["onChange"], xt = {
|
|
|
305
305
|
function He(e) {
|
|
306
306
|
const {
|
|
307
307
|
onChange: o
|
|
308
|
-
} = e, n = ae(e,
|
|
309
|
-
c.current =
|
|
308
|
+
} = e, n = ae(e, xt), c = u.useRef(), i = u.useRef(null), d = () => {
|
|
309
|
+
c.current = i.current.offsetHeight - i.current.clientHeight;
|
|
310
310
|
};
|
|
311
|
-
return
|
|
311
|
+
return ct(() => {
|
|
312
312
|
const m = Ae(() => {
|
|
313
313
|
const p = c.current;
|
|
314
|
-
|
|
315
|
-
}), h =
|
|
314
|
+
d(), p !== c.current && o(c.current);
|
|
315
|
+
}), h = $e(i.current);
|
|
316
316
|
return h.addEventListener("resize", m), () => {
|
|
317
317
|
m.clear(), h.removeEventListener("resize", m);
|
|
318
318
|
};
|
|
319
|
-
}, [o]),
|
|
320
|
-
|
|
321
|
-
}, [o]), /* @__PURE__ */
|
|
322
|
-
style:
|
|
323
|
-
ref:
|
|
319
|
+
}, [o]), u.useEffect(() => {
|
|
320
|
+
d(), o(c.current);
|
|
321
|
+
}, [o]), /* @__PURE__ */ C("div", b({
|
|
322
|
+
style: Bt,
|
|
323
|
+
ref: i
|
|
324
324
|
}, n));
|
|
325
325
|
}
|
|
326
326
|
process.env.NODE_ENV !== "production" && (He.propTypes = {
|
|
327
327
|
onChange: t.func.isRequired
|
|
328
328
|
});
|
|
329
|
-
function
|
|
329
|
+
function Ct(e) {
|
|
330
330
|
return me("MuiTabScrollButton", e);
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const wt = Se("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), It = ["className", "slots", "slotProps", "direction", "orientation", "disabled"], Et = (e) => {
|
|
333
333
|
const {
|
|
334
334
|
classes: o,
|
|
335
335
|
orientation: n,
|
|
@@ -337,8 +337,8 @@ const Ct = Se("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
337
337
|
} = e;
|
|
338
338
|
return ye({
|
|
339
339
|
root: ["root", n, c && "disabled"]
|
|
340
|
-
},
|
|
341
|
-
}, Ot =
|
|
340
|
+
}, Ct, o);
|
|
341
|
+
}, Ot = _(ke, {
|
|
342
342
|
name: "MuiTabScrollButton",
|
|
343
343
|
slot: "Root",
|
|
344
344
|
overridesResolver: (e, o) => {
|
|
@@ -362,42 +362,42 @@ const Ct = Se("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
362
362
|
"& svg": {
|
|
363
363
|
transform: `rotate(${e.isRtl ? -90 : 90}deg)`
|
|
364
364
|
}
|
|
365
|
-
})), Ve = /* @__PURE__ */
|
|
366
|
-
var c,
|
|
367
|
-
const
|
|
365
|
+
})), Ve = /* @__PURE__ */ u.forwardRef(function(o, n) {
|
|
366
|
+
var c, i;
|
|
367
|
+
const d = ve({
|
|
368
368
|
props: o,
|
|
369
369
|
name: "MuiTabScrollButton"
|
|
370
370
|
}), {
|
|
371
371
|
className: m,
|
|
372
372
|
slots: h = {},
|
|
373
373
|
slotProps: p = {},
|
|
374
|
-
direction:
|
|
375
|
-
} =
|
|
374
|
+
direction: y
|
|
375
|
+
} = d, w = ae(d, It), T = Fe(), v = b({
|
|
376
376
|
isRtl: T
|
|
377
|
-
},
|
|
378
|
-
elementType:
|
|
377
|
+
}, d), I = Et(v), k = (c = h.StartScrollButtonIcon) != null ? c : St, E = (i = h.EndScrollButtonIcon) != null ? i : yt, g = se({
|
|
378
|
+
elementType: k,
|
|
379
379
|
externalSlotProps: p.startScrollButtonIcon,
|
|
380
380
|
additionalProps: {
|
|
381
381
|
fontSize: "small"
|
|
382
382
|
},
|
|
383
|
-
ownerState:
|
|
384
|
-
}),
|
|
385
|
-
elementType:
|
|
383
|
+
ownerState: v
|
|
384
|
+
}), H = se({
|
|
385
|
+
elementType: E,
|
|
386
386
|
externalSlotProps: p.endScrollButtonIcon,
|
|
387
387
|
additionalProps: {
|
|
388
388
|
fontSize: "small"
|
|
389
389
|
},
|
|
390
|
-
ownerState:
|
|
390
|
+
ownerState: v
|
|
391
391
|
});
|
|
392
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ C(Ot, b({
|
|
393
393
|
component: "div",
|
|
394
|
-
className: L(
|
|
394
|
+
className: L(I.root, m),
|
|
395
395
|
ref: n,
|
|
396
396
|
role: null,
|
|
397
|
-
ownerState:
|
|
397
|
+
ownerState: v,
|
|
398
398
|
tabIndex: null
|
|
399
|
-
},
|
|
400
|
-
children:
|
|
399
|
+
}, w, {
|
|
400
|
+
children: y === "left" ? /* @__PURE__ */ C(k, b({}, g)) : /* @__PURE__ */ C(E, b({}, H))
|
|
401
401
|
}));
|
|
402
402
|
});
|
|
403
403
|
process.env.NODE_ENV !== "production" && (Ve.propTypes = {
|
|
@@ -452,47 +452,46 @@ process.env.NODE_ENV !== "production" && (Ve.propTypes = {
|
|
|
452
452
|
*/
|
|
453
453
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
454
454
|
});
|
|
455
|
-
|
|
456
|
-
function Mt(e) {
|
|
455
|
+
function Nt(e) {
|
|
457
456
|
return me("MuiTabs", e);
|
|
458
457
|
}
|
|
459
|
-
const
|
|
460
|
-
let c = !1,
|
|
461
|
-
for (;
|
|
462
|
-
if (
|
|
458
|
+
const Mt = Se("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), he = Mt, Rt = ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "slots", "slotProps", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"], Re = (e, o) => e === o ? e.firstChild : o && o.nextElementSibling ? o.nextElementSibling : e.firstChild, Pe = (e, o) => e === o ? e.lastChild : o && o.previousElementSibling ? o.previousElementSibling : e.lastChild, ne = (e, o, n) => {
|
|
459
|
+
let c = !1, i = n(e, o);
|
|
460
|
+
for (; i; ) {
|
|
461
|
+
if (i === e.firstChild) {
|
|
463
462
|
if (c)
|
|
464
463
|
return;
|
|
465
464
|
c = !0;
|
|
466
465
|
}
|
|
467
|
-
const
|
|
468
|
-
if (!
|
|
469
|
-
|
|
466
|
+
const d = i.disabled || i.getAttribute("aria-disabled") === "true";
|
|
467
|
+
if (!i.hasAttribute("tabindex") || d)
|
|
468
|
+
i = n(e, i);
|
|
470
469
|
else {
|
|
471
|
-
|
|
470
|
+
i.focus();
|
|
472
471
|
return;
|
|
473
472
|
}
|
|
474
473
|
}
|
|
475
|
-
},
|
|
474
|
+
}, Pt = (e) => {
|
|
476
475
|
const {
|
|
477
476
|
vertical: o,
|
|
478
477
|
fixed: n,
|
|
479
478
|
hideScrollbar: c,
|
|
480
|
-
scrollableX:
|
|
481
|
-
scrollableY:
|
|
479
|
+
scrollableX: i,
|
|
480
|
+
scrollableY: d,
|
|
482
481
|
centered: m,
|
|
483
482
|
scrollButtonsHideMobile: h,
|
|
484
483
|
classes: p
|
|
485
484
|
} = e;
|
|
486
485
|
return ye({
|
|
487
486
|
root: ["root", o && "vertical"],
|
|
488
|
-
scroller: ["scroller", n && "fixed", c && "hideScrollbar",
|
|
487
|
+
scroller: ["scroller", n && "fixed", c && "hideScrollbar", i && "scrollableX", d && "scrollableY"],
|
|
489
488
|
flexContainer: ["flexContainer", o && "flexContainerVertical", m && "centered"],
|
|
490
489
|
indicator: ["indicator"],
|
|
491
490
|
scrollButtons: ["scrollButtons", h && "scrollButtonsHideMobile"],
|
|
492
|
-
scrollableX: [
|
|
491
|
+
scrollableX: [i && "scrollableX"],
|
|
493
492
|
hideScrollbar: [c && "hideScrollbar"]
|
|
494
|
-
},
|
|
495
|
-
},
|
|
493
|
+
}, Nt, p);
|
|
494
|
+
}, zt = _("div", {
|
|
496
495
|
name: "MuiTabs",
|
|
497
496
|
slot: "Root",
|
|
498
497
|
overridesResolver: (e, o) => {
|
|
@@ -522,7 +521,7 @@ const Rt = Se("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
522
521
|
display: "none"
|
|
523
522
|
}
|
|
524
523
|
}
|
|
525
|
-
})),
|
|
524
|
+
})), Wt = _("div", {
|
|
526
525
|
name: "MuiTabs",
|
|
527
526
|
slot: "Scroller",
|
|
528
527
|
overridesResolver: (e, o) => {
|
|
@@ -555,7 +554,7 @@ const Rt = Se("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
555
554
|
}, e.scrollableY && {
|
|
556
555
|
overflowY: "auto",
|
|
557
556
|
overflowX: "hidden"
|
|
558
|
-
})),
|
|
557
|
+
})), Lt = _("div", {
|
|
559
558
|
name: "MuiTabs",
|
|
560
559
|
slot: "FlexContainer",
|
|
561
560
|
overridesResolver: (e, o) => {
|
|
@@ -572,7 +571,7 @@ const Rt = Se("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
572
571
|
flexDirection: "column"
|
|
573
572
|
}, e.centered && {
|
|
574
573
|
justifyContent: "center"
|
|
575
|
-
})), kt =
|
|
574
|
+
})), kt = _("span", {
|
|
576
575
|
name: "MuiTabs",
|
|
577
576
|
slot: "Indicator",
|
|
578
577
|
overridesResolver: (e, o) => o.indicator
|
|
@@ -593,7 +592,7 @@ const Rt = Se("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
593
592
|
height: "100%",
|
|
594
593
|
width: 2,
|
|
595
594
|
right: 0
|
|
596
|
-
})), Ft =
|
|
595
|
+
})), Ft = _(He)({
|
|
597
596
|
overflowX: "auto",
|
|
598
597
|
overflowY: "hidden",
|
|
599
598
|
// Hide dimensionless scrollbar on macOS
|
|
@@ -605,134 +604,134 @@ const Rt = Se("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
605
604
|
}
|
|
606
605
|
}), ze = {};
|
|
607
606
|
let We = !1;
|
|
608
|
-
const Ue = /* @__PURE__ */
|
|
607
|
+
const Ue = /* @__PURE__ */ u.forwardRef(function(o, n) {
|
|
609
608
|
const c = ve({
|
|
610
609
|
props: o,
|
|
611
610
|
name: "MuiTabs"
|
|
612
|
-
}),
|
|
611
|
+
}), i = it(), d = Fe(), {
|
|
613
612
|
"aria-label": m,
|
|
614
613
|
"aria-labelledby": h,
|
|
615
614
|
action: p,
|
|
616
|
-
centered:
|
|
617
|
-
children:
|
|
618
|
-
className:
|
|
619
|
-
component:
|
|
620
|
-
allowScrollButtonsMobile:
|
|
621
|
-
indicatorColor:
|
|
622
|
-
onChange:
|
|
615
|
+
centered: y = !1,
|
|
616
|
+
children: w,
|
|
617
|
+
className: T,
|
|
618
|
+
component: v = "div",
|
|
619
|
+
allowScrollButtonsMobile: I = !1,
|
|
620
|
+
indicatorColor: k = "primary",
|
|
621
|
+
onChange: E,
|
|
623
622
|
orientation: g = "horizontal",
|
|
624
|
-
ScrollButtonComponent: H =
|
|
625
|
-
scrollButtons:
|
|
623
|
+
ScrollButtonComponent: H = Ve,
|
|
624
|
+
scrollButtons: N = "auto",
|
|
626
625
|
selectionFollowsFocus: ie,
|
|
627
626
|
slots: V = {},
|
|
628
627
|
slotProps: Y = {},
|
|
629
628
|
TabIndicatorProps: U = {},
|
|
630
|
-
TabScrollButtonProps:
|
|
629
|
+
TabScrollButtonProps: F = {},
|
|
631
630
|
textColor: Z = "primary",
|
|
632
631
|
value: P,
|
|
633
632
|
variant: M = "standard",
|
|
634
633
|
visibleScrollbar: ce = !1
|
|
635
|
-
} = c, Xe = ae(c,
|
|
636
|
-
component:
|
|
637
|
-
allowScrollButtonsMobile:
|
|
638
|
-
indicatorColor:
|
|
634
|
+
} = c, Xe = ae(c, Rt), x = M === "scrollable", B = g === "vertical", K = B ? "scrollTop" : "scrollLeft", ee = B ? "top" : "left", te = B ? "bottom" : "right", de = B ? "clientHeight" : "clientWidth", q = B ? "height" : "width", $ = b({}, c, {
|
|
635
|
+
component: v,
|
|
636
|
+
allowScrollButtonsMobile: I,
|
|
637
|
+
indicatorColor: k,
|
|
639
638
|
orientation: g,
|
|
640
|
-
vertical:
|
|
641
|
-
scrollButtons:
|
|
639
|
+
vertical: B,
|
|
640
|
+
scrollButtons: N,
|
|
642
641
|
textColor: Z,
|
|
643
642
|
variant: M,
|
|
644
643
|
visibleScrollbar: ce,
|
|
645
|
-
fixed: !
|
|
646
|
-
hideScrollbar:
|
|
647
|
-
scrollableX:
|
|
648
|
-
scrollableY:
|
|
649
|
-
centered:
|
|
650
|
-
scrollButtonsHideMobile: !
|
|
651
|
-
}), z =
|
|
644
|
+
fixed: !x,
|
|
645
|
+
hideScrollbar: x && !ce,
|
|
646
|
+
scrollableX: x && !B,
|
|
647
|
+
scrollableY: x && B,
|
|
648
|
+
centered: y && !x,
|
|
649
|
+
scrollButtonsHideMobile: !I
|
|
650
|
+
}), z = Pt($), Ye = se({
|
|
652
651
|
elementType: V.StartScrollButtonIcon,
|
|
653
652
|
externalSlotProps: Y.startScrollButtonIcon,
|
|
654
|
-
ownerState:
|
|
653
|
+
ownerState: $
|
|
655
654
|
}), Ke = se({
|
|
656
655
|
elementType: V.EndScrollButtonIcon,
|
|
657
656
|
externalSlotProps: Y.endScrollButtonIcon,
|
|
658
|
-
ownerState:
|
|
657
|
+
ownerState: $
|
|
659
658
|
});
|
|
660
|
-
process.env.NODE_ENV !== "production" &&
|
|
661
|
-
const [ge, qe] =
|
|
659
|
+
process.env.NODE_ENV !== "production" && y && x && console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');
|
|
660
|
+
const [ge, qe] = u.useState(!1), [A, Te] = u.useState(ze), [xe, Ge] = u.useState(!1), [Be, Je] = u.useState(!1), [Ce, Qe] = u.useState(!1), [we, Ze] = u.useState({
|
|
662
661
|
overflow: "hidden",
|
|
663
662
|
scrollbarWidth: 0
|
|
664
|
-
}), oe = /* @__PURE__ */ new Map(), R =
|
|
663
|
+
}), oe = /* @__PURE__ */ new Map(), R = u.useRef(null), j = u.useRef(null), Ie = () => {
|
|
665
664
|
const r = R.current;
|
|
666
665
|
let l;
|
|
667
666
|
if (r) {
|
|
668
|
-
const
|
|
667
|
+
const a = r.getBoundingClientRect();
|
|
669
668
|
l = {
|
|
670
669
|
clientWidth: r.clientWidth,
|
|
671
670
|
scrollLeft: r.scrollLeft,
|
|
672
671
|
scrollTop: r.scrollTop,
|
|
673
|
-
scrollLeftNormalized:
|
|
672
|
+
scrollLeftNormalized: pt(r, d ? "rtl" : "ltr"),
|
|
674
673
|
scrollWidth: r.scrollWidth,
|
|
675
|
-
top:
|
|
676
|
-
bottom:
|
|
677
|
-
left:
|
|
678
|
-
right:
|
|
674
|
+
top: a.top,
|
|
675
|
+
bottom: a.bottom,
|
|
676
|
+
left: a.left,
|
|
677
|
+
right: a.right
|
|
679
678
|
};
|
|
680
679
|
}
|
|
681
|
-
let
|
|
680
|
+
let s;
|
|
682
681
|
if (r && P !== !1) {
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
const f =
|
|
682
|
+
const a = j.current.children;
|
|
683
|
+
if (a.length > 0) {
|
|
684
|
+
const f = a[oe.get(P)];
|
|
686
685
|
process.env.NODE_ENV !== "production" && (f || console.error(["MUI: The `value` provided to the Tabs component is invalid.", `None of the Tabs' children match with "${P}".`, oe.keys ? `You can provide one of the following values: ${Array.from(oe.keys()).join(", ")}.` : null].join(`
|
|
687
|
-
`))),
|
|
686
|
+
`))), s = f ? f.getBoundingClientRect() : null, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && !We && s && s.width === 0 && s.height === 0 && // if the whole Tabs component is hidden, don't warn
|
|
688
687
|
l.clientWidth !== 0 && (l = null, console.error(["MUI: The `value` provided to the Tabs component is invalid.", `The Tab with this \`value\` ("${P}") is not part of the document layout.`, "Make sure the tab item is present in the document or that it's not `display: none`."].join(`
|
|
689
688
|
`)), We = !0);
|
|
690
689
|
}
|
|
691
690
|
}
|
|
692
691
|
return {
|
|
693
692
|
tabsMeta: l,
|
|
694
|
-
tabMeta:
|
|
693
|
+
tabMeta: s
|
|
695
694
|
};
|
|
696
695
|
}, G = be(() => {
|
|
697
696
|
const {
|
|
698
697
|
tabsMeta: r,
|
|
699
698
|
tabMeta: l
|
|
700
699
|
} = Ie();
|
|
701
|
-
let
|
|
702
|
-
if (
|
|
703
|
-
|
|
704
|
-
else if (
|
|
705
|
-
const
|
|
706
|
-
|
|
700
|
+
let s = 0, a;
|
|
701
|
+
if (B)
|
|
702
|
+
a = "top", l && r && (s = l.top - r.top + r.scrollTop);
|
|
703
|
+
else if (a = d ? "right" : "left", l && r) {
|
|
704
|
+
const S = d ? r.scrollLeftNormalized + r.clientWidth - r.scrollWidth : r.scrollLeft;
|
|
705
|
+
s = (d ? -1 : 1) * (l[a] - r[a] + S);
|
|
707
706
|
}
|
|
708
707
|
const f = {
|
|
709
|
-
[
|
|
708
|
+
[a]: s,
|
|
710
709
|
// May be wrong until the font is loaded.
|
|
711
710
|
[q]: l ? l[q] : 0
|
|
712
711
|
};
|
|
713
|
-
if (isNaN(
|
|
712
|
+
if (isNaN(A[a]) || isNaN(A[q]))
|
|
714
713
|
Te(f);
|
|
715
714
|
else {
|
|
716
|
-
const
|
|
717
|
-
(
|
|
715
|
+
const S = Math.abs(A[a] - f[a]), O = Math.abs(A[q] - f[q]);
|
|
716
|
+
(S >= 1 || O >= 1) && Te(f);
|
|
718
717
|
}
|
|
719
718
|
}), ue = (r, {
|
|
720
719
|
animation: l = !0
|
|
721
720
|
} = {}) => {
|
|
722
|
-
l ?
|
|
723
|
-
duration:
|
|
721
|
+
l ? Tt(K, R.current, r, {
|
|
722
|
+
duration: i.transitions.duration.standard
|
|
724
723
|
}) : R.current[K] = r;
|
|
725
724
|
}, Ee = (r) => {
|
|
726
725
|
let l = R.current[K];
|
|
727
|
-
|
|
726
|
+
B ? l += r : (l += r * (d ? -1 : 1), l *= d && De() === "reverse" ? -1 : 1), ue(l);
|
|
728
727
|
}, Oe = () => {
|
|
729
728
|
const r = R.current[de];
|
|
730
729
|
let l = 0;
|
|
731
|
-
const
|
|
732
|
-
for (let
|
|
733
|
-
const f = a
|
|
730
|
+
const s = Array.from(j.current.children);
|
|
731
|
+
for (let a = 0; a < s.length; a += 1) {
|
|
732
|
+
const f = s[a];
|
|
734
733
|
if (l + f[de] > r) {
|
|
735
|
-
|
|
734
|
+
a === 0 && (l = r);
|
|
736
735
|
break;
|
|
737
736
|
}
|
|
738
737
|
l += f[de];
|
|
@@ -742,19 +741,19 @@ const Ue = /* @__PURE__ */ d.forwardRef(function(o, n) {
|
|
|
742
741
|
Ee(-1 * Oe());
|
|
743
742
|
}, tt = () => {
|
|
744
743
|
Ee(Oe());
|
|
745
|
-
}, ot =
|
|
744
|
+
}, ot = u.useCallback((r) => {
|
|
746
745
|
Ze({
|
|
747
746
|
overflow: null,
|
|
748
747
|
scrollbarWidth: r
|
|
749
748
|
});
|
|
750
749
|
}, []), rt = () => {
|
|
751
750
|
const r = {};
|
|
752
|
-
r.scrollbarSizeListener =
|
|
751
|
+
r.scrollbarSizeListener = x ? /* @__PURE__ */ C(Ft, {
|
|
753
752
|
onChange: ot,
|
|
754
753
|
className: L(z.scrollableX, z.hideScrollbar)
|
|
755
754
|
}) : null;
|
|
756
|
-
const
|
|
757
|
-
return r.scrollButtonStart =
|
|
755
|
+
const s = x && (N === "auto" && (xe || Be) || N === !0);
|
|
756
|
+
return r.scrollButtonStart = s ? /* @__PURE__ */ C(H, b({
|
|
758
757
|
slots: {
|
|
759
758
|
StartScrollButtonIcon: V.StartScrollButtonIcon
|
|
760
759
|
},
|
|
@@ -762,12 +761,12 @@ const Ue = /* @__PURE__ */ d.forwardRef(function(o, n) {
|
|
|
762
761
|
startScrollButtonIcon: Ye
|
|
763
762
|
},
|
|
764
763
|
orientation: g,
|
|
765
|
-
direction:
|
|
764
|
+
direction: d ? "right" : "left",
|
|
766
765
|
onClick: et,
|
|
767
766
|
disabled: !xe
|
|
768
|
-
},
|
|
769
|
-
className: L(z.scrollButtons,
|
|
770
|
-
})) : null, r.scrollButtonEnd =
|
|
767
|
+
}, F, {
|
|
768
|
+
className: L(z.scrollButtons, F.className)
|
|
769
|
+
})) : null, r.scrollButtonEnd = s ? /* @__PURE__ */ C(H, b({
|
|
771
770
|
slots: {
|
|
772
771
|
EndScrollButtonIcon: V.EndScrollButtonIcon
|
|
773
772
|
},
|
|
@@ -775,122 +774,122 @@ const Ue = /* @__PURE__ */ d.forwardRef(function(o, n) {
|
|
|
775
774
|
endScrollButtonIcon: Ke
|
|
776
775
|
},
|
|
777
776
|
orientation: g,
|
|
778
|
-
direction:
|
|
777
|
+
direction: d ? "left" : "right",
|
|
779
778
|
onClick: tt,
|
|
780
779
|
disabled: !Be
|
|
781
|
-
},
|
|
782
|
-
className: L(z.scrollButtons,
|
|
780
|
+
}, F, {
|
|
781
|
+
className: L(z.scrollButtons, F.className)
|
|
783
782
|
})) : null, r;
|
|
784
783
|
}, Ne = be((r) => {
|
|
785
784
|
const {
|
|
786
785
|
tabsMeta: l,
|
|
787
|
-
tabMeta:
|
|
786
|
+
tabMeta: s
|
|
788
787
|
} = Ie();
|
|
789
|
-
if (!(!
|
|
790
|
-
if (
|
|
791
|
-
const
|
|
792
|
-
ue(
|
|
788
|
+
if (!(!s || !l)) {
|
|
789
|
+
if (s[ee] < l[ee]) {
|
|
790
|
+
const a = l[K] + (s[ee] - l[ee]);
|
|
791
|
+
ue(a, {
|
|
793
792
|
animation: r
|
|
794
793
|
});
|
|
795
|
-
} else if (
|
|
796
|
-
const
|
|
797
|
-
ue(
|
|
794
|
+
} else if (s[te] > l[te]) {
|
|
795
|
+
const a = l[K] + (s[te] - l[te]);
|
|
796
|
+
ue(a, {
|
|
798
797
|
animation: r
|
|
799
798
|
});
|
|
800
799
|
}
|
|
801
800
|
}
|
|
802
801
|
}), re = be(() => {
|
|
803
|
-
|
|
802
|
+
x && N !== !1 && Qe(!Ce);
|
|
804
803
|
});
|
|
805
|
-
|
|
804
|
+
u.useEffect(() => {
|
|
806
805
|
const r = Ae(() => {
|
|
807
806
|
R.current && G();
|
|
808
807
|
});
|
|
809
808
|
let l;
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
|
|
809
|
+
const s = (S) => {
|
|
810
|
+
S.forEach((O) => {
|
|
811
|
+
O.removedNodes.forEach((J) => {
|
|
813
812
|
var W;
|
|
814
813
|
(W = l) == null || W.unobserve(J);
|
|
815
|
-
}),
|
|
814
|
+
}), O.addedNodes.forEach((J) => {
|
|
816
815
|
var W;
|
|
817
816
|
(W = l) == null || W.observe(J);
|
|
818
817
|
});
|
|
819
818
|
}), r(), re();
|
|
820
|
-
},
|
|
821
|
-
|
|
819
|
+
}, a = $e(R.current);
|
|
820
|
+
a.addEventListener("resize", r);
|
|
822
821
|
let f;
|
|
823
|
-
return typeof ResizeObserver < "u" && (l = new ResizeObserver(r), Array.from(
|
|
824
|
-
l.observe(
|
|
825
|
-
})), typeof MutationObserver < "u" && (f = new MutationObserver(
|
|
822
|
+
return typeof ResizeObserver < "u" && (l = new ResizeObserver(r), Array.from(j.current.children).forEach((S) => {
|
|
823
|
+
l.observe(S);
|
|
824
|
+
})), typeof MutationObserver < "u" && (f = new MutationObserver(s), f.observe(j.current, {
|
|
826
825
|
childList: !0
|
|
827
826
|
})), () => {
|
|
828
|
-
var
|
|
829
|
-
r.clear(),
|
|
827
|
+
var S, O;
|
|
828
|
+
r.clear(), a.removeEventListener("resize", r), (S = f) == null || S.disconnect(), (O = l) == null || O.disconnect();
|
|
830
829
|
};
|
|
831
|
-
}, [G, re]),
|
|
832
|
-
const r = Array.from(
|
|
833
|
-
if (typeof IntersectionObserver < "u" && l > 0 &&
|
|
834
|
-
const
|
|
830
|
+
}, [G, re]), u.useEffect(() => {
|
|
831
|
+
const r = Array.from(j.current.children), l = r.length;
|
|
832
|
+
if (typeof IntersectionObserver < "u" && l > 0 && x && N !== !1) {
|
|
833
|
+
const s = r[0], a = r[l - 1], f = {
|
|
835
834
|
root: R.current,
|
|
836
835
|
threshold: 0.99
|
|
837
|
-
},
|
|
836
|
+
}, S = (fe) => {
|
|
838
837
|
Ge(!fe[0].isIntersecting);
|
|
839
|
-
},
|
|
840
|
-
|
|
838
|
+
}, O = new IntersectionObserver(S, f);
|
|
839
|
+
O.observe(s);
|
|
841
840
|
const J = (fe) => {
|
|
842
841
|
Je(!fe[0].isIntersecting);
|
|
843
842
|
}, W = new IntersectionObserver(J, f);
|
|
844
|
-
return W.observe(
|
|
845
|
-
|
|
843
|
+
return W.observe(a), () => {
|
|
844
|
+
O.disconnect(), W.disconnect();
|
|
846
845
|
};
|
|
847
846
|
}
|
|
848
|
-
}, [
|
|
847
|
+
}, [x, N, Ce, w == null ? void 0 : w.length]), u.useEffect(() => {
|
|
849
848
|
qe(!0);
|
|
850
|
-
}, []),
|
|
849
|
+
}, []), u.useEffect(() => {
|
|
851
850
|
G();
|
|
852
|
-
}),
|
|
853
|
-
Ne(ze !==
|
|
854
|
-
}, [Ne,
|
|
851
|
+
}), u.useEffect(() => {
|
|
852
|
+
Ne(ze !== A);
|
|
853
|
+
}, [Ne, A]), u.useImperativeHandle(p, () => ({
|
|
855
854
|
updateIndicator: G,
|
|
856
855
|
updateScrollButtons: re
|
|
857
856
|
}), [G, re]);
|
|
858
|
-
const Me = /* @__PURE__ */
|
|
857
|
+
const Me = /* @__PURE__ */ C(kt, b({}, U, {
|
|
859
858
|
className: L(z.indicator, U.className),
|
|
860
|
-
ownerState:
|
|
861
|
-
style: b({},
|
|
859
|
+
ownerState: $,
|
|
860
|
+
style: b({}, A, U.style)
|
|
862
861
|
}));
|
|
863
862
|
let le = 0;
|
|
864
|
-
const lt =
|
|
865
|
-
if (!/* @__PURE__ */
|
|
863
|
+
const lt = u.Children.map(w, (r) => {
|
|
864
|
+
if (!/* @__PURE__ */ u.isValidElement(r))
|
|
866
865
|
return null;
|
|
867
866
|
process.env.NODE_ENV !== "production" && st.isFragment(r) && console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
|
|
868
867
|
`));
|
|
869
868
|
const l = r.props.value === void 0 ? le : r.props.value;
|
|
870
869
|
oe.set(l, le);
|
|
871
|
-
const
|
|
872
|
-
return le += 1, /* @__PURE__ */
|
|
870
|
+
const s = l === P;
|
|
871
|
+
return le += 1, /* @__PURE__ */ u.cloneElement(r, b({
|
|
873
872
|
fullWidth: M === "fullWidth",
|
|
874
|
-
indicator:
|
|
875
|
-
selected:
|
|
873
|
+
indicator: s && !ge && Me,
|
|
874
|
+
selected: s,
|
|
876
875
|
selectionFollowsFocus: ie,
|
|
877
|
-
onChange:
|
|
876
|
+
onChange: E,
|
|
878
877
|
textColor: Z,
|
|
879
878
|
value: l
|
|
880
879
|
}, le === 1 && P === !1 && !r.props.tabIndex ? {
|
|
881
880
|
tabIndex: 0
|
|
882
881
|
} : {}));
|
|
883
882
|
}), nt = (r) => {
|
|
884
|
-
const l =
|
|
885
|
-
if (
|
|
883
|
+
const l = j.current, s = dt(l).activeElement;
|
|
884
|
+
if (s.getAttribute("role") !== "tab")
|
|
886
885
|
return;
|
|
887
|
-
let f = g === "horizontal" ? "ArrowLeft" : "ArrowUp",
|
|
888
|
-
switch (g === "horizontal" &&
|
|
886
|
+
let f = g === "horizontal" ? "ArrowLeft" : "ArrowUp", S = g === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
887
|
+
switch (g === "horizontal" && d && (f = "ArrowRight", S = "ArrowLeft"), r.key) {
|
|
889
888
|
case f:
|
|
890
|
-
r.preventDefault(), ne(l,
|
|
889
|
+
r.preventDefault(), ne(l, s, Pe);
|
|
891
890
|
break;
|
|
892
|
-
case
|
|
893
|
-
r.preventDefault(), ne(l,
|
|
891
|
+
case S:
|
|
892
|
+
r.preventDefault(), ne(l, s, Re);
|
|
894
893
|
break;
|
|
895
894
|
case "Home":
|
|
896
895
|
r.preventDefault(), ne(l, null, Re);
|
|
@@ -900,28 +899,28 @@ const Ue = /* @__PURE__ */ d.forwardRef(function(o, n) {
|
|
|
900
899
|
break;
|
|
901
900
|
}
|
|
902
901
|
}, pe = rt();
|
|
903
|
-
return /* @__PURE__ */ Q(
|
|
904
|
-
className: L(z.root,
|
|
905
|
-
ownerState:
|
|
902
|
+
return /* @__PURE__ */ Q(zt, b({
|
|
903
|
+
className: L(z.root, T),
|
|
904
|
+
ownerState: $,
|
|
906
905
|
ref: n,
|
|
907
|
-
as:
|
|
906
|
+
as: v
|
|
908
907
|
}, Xe, {
|
|
909
|
-
children: [pe.scrollButtonStart, pe.scrollbarSizeListener, /* @__PURE__ */ Q(
|
|
908
|
+
children: [pe.scrollButtonStart, pe.scrollbarSizeListener, /* @__PURE__ */ Q(Wt, {
|
|
910
909
|
className: z.scroller,
|
|
911
|
-
ownerState:
|
|
910
|
+
ownerState: $,
|
|
912
911
|
style: {
|
|
913
912
|
overflow: we.overflow,
|
|
914
|
-
[
|
|
913
|
+
[B ? `margin${d ? "Left" : "Right"}` : "marginBottom"]: ce ? void 0 : -we.scrollbarWidth
|
|
915
914
|
},
|
|
916
915
|
ref: R,
|
|
917
|
-
children: [/* @__PURE__ */
|
|
916
|
+
children: [/* @__PURE__ */ C(Lt, {
|
|
918
917
|
"aria-label": m,
|
|
919
918
|
"aria-labelledby": h,
|
|
920
919
|
"aria-orientation": g === "vertical" ? "vertical" : null,
|
|
921
920
|
className: z.flexContainer,
|
|
922
|
-
ownerState:
|
|
921
|
+
ownerState: $,
|
|
923
922
|
onKeyDown: nt,
|
|
924
|
-
ref:
|
|
923
|
+
ref: j,
|
|
925
924
|
role: "tablist",
|
|
926
925
|
children: lt
|
|
927
926
|
}), ge && Me]
|
|
@@ -941,7 +940,7 @@ process.env.NODE_ENV !== "production" && (Ue.propTypes = {
|
|
|
941
940
|
* @param {object} actions This object contains all possible actions
|
|
942
941
|
* that can be triggered programmatically.
|
|
943
942
|
*/
|
|
944
|
-
action:
|
|
943
|
+
action: ut,
|
|
945
944
|
/**
|
|
946
945
|
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
947
946
|
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
@@ -1077,14 +1076,14 @@ process.env.NODE_ENV !== "production" && (Ue.propTypes = {
|
|
|
1077
1076
|
*/
|
|
1078
1077
|
visibleScrollbar: t.bool
|
|
1079
1078
|
});
|
|
1080
|
-
const
|
|
1079
|
+
const Gt = Ue;
|
|
1081
1080
|
export {
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1081
|
+
yt as K,
|
|
1082
|
+
qt as T,
|
|
1083
|
+
Gt as a,
|
|
1085
1084
|
he as b,
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1085
|
+
Nt as c,
|
|
1086
|
+
St as d,
|
|
1087
|
+
ft as g,
|
|
1088
|
+
D as t
|
|
1090
1089
|
};
|