@cgi-learning-hub/ui 0.0.1-dev.1709558390 → 0.0.1-dev.1709568003
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-CjHm9A9L.cjs +1 -0
- package/dist/{Box-C0qXdJzV.js → Box-erN4AuKs.js} +8 -8
- package/dist/ButtonBase-BybMkBUd.cjs +75 -0
- package/dist/ButtonBase-CGcs8Gbj.cjs +75 -0
- package/dist/ButtonBase-V1pwsMMs.js +649 -0
- package/dist/ButtonBase-aujiNoUb.js +649 -0
- package/dist/DefaultButton-Cg4tPCgf.cjs +28 -0
- package/dist/{DefaultButton-B-2UppUm.js → DefaultButton-DbpZOb47.js} +355 -146
- package/dist/FileListItem-ChKTjDnV.js +254 -0
- package/dist/FileListItem-CjFIZgYg.cjs +28 -0
- package/dist/IconButton-CHXclgOn.cjs +2 -0
- package/dist/{IconButton-1URziYlU.js → IconButton-DE5JOshS.js} +8 -8
- package/dist/{InputBase-Dc0v-Ihf.js → InputBase-C8AzQJJ9.js} +161 -174
- package/dist/InputBase-D6eXzDaz.cjs +4 -0
- package/dist/LocalizationProvider-42pD7VmS.cjs +5 -0
- package/dist/{LocalizationProvider-BD64DNxF.js → LocalizationProvider-Cov62Xe0.js} +4 -3
- package/dist/Tabs-DiWeNGD4.js +1167 -0
- package/dist/Tabs-DoxP7EMA.cjs +4 -0
- package/dist/TextInput-BbSyyuvO.cjs +12 -0
- package/dist/{TextInput-DsSFDlNR.js → TextInput-DmMk4i-V.js} +1892 -1650
- package/dist/TimePicker-B5MjZCK0.cjs +89 -0
- package/dist/TimePicker-BmxG3a2D.js +28354 -0
- package/dist/TransitionGroup-COuDopJ-.js +188 -0
- package/dist/TransitionGroup-X90dkobW.cjs +1 -0
- package/dist/Typography-B90UzlQW.js +179 -0
- package/dist/Typography-KFjBz5Hm.cjs +1 -0
- package/dist/clamp-0LjYbpE_.cjs +23 -0
- package/dist/clamp-BGJvJ0FN.js +1641 -0
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.es.js +12 -11
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +1 -1
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- 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.es.js +3 -3
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +6 -6
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- 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.es.js +10 -9
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +2 -2
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +90 -91
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +174 -6
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -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.es.js +1 -1
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.es.js +4 -4
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +2 -2
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +7 -39
- package/dist/components/lists/FileList/index.cjs.js +1 -1
- package/dist/components/lists/FileList/index.es.js +4 -4
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.es.js +18 -16
- package/dist/components/lists/index.cjs.js +1 -1
- package/dist/components/lists/index.es.js +4 -4
- package/dist/createSvgIcon-BSYat4nx.js +74 -0
- package/dist/createSvgIcon-BqRWmIPG.cjs +1 -0
- package/dist/{createSvgIcon-Dspfpz-l.js → createSvgIcon-DeRU4e-L.js} +20 -18
- package/dist/createSvgIcon-doNQ5emq.cjs +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +93 -94
- package/dist/refType-Bt58K9Sk.cjs +1 -0
- package/dist/{refType-BBFUe6fu.js → refType-CoCfCK--.js} +1 -1
- package/dist/styled-BU8dAebc.js +1751 -0
- package/dist/styled-DGjsLYEN.cjs +45 -0
- package/dist/styled-DP6LeBLQ.js +261 -0
- package/dist/styled-Dkd1VGM-.cjs +1 -0
- package/dist/useTheme-C132tQV-.js +10 -0
- package/dist/useTheme-CliHZTkE.cjs +1 -0
- package/dist/useThemeProps-63SNG58r.js +753 -0
- package/dist/useThemeProps-CVatCXfo.cjs +20 -0
- package/package.json +6 -7
- package/dist/Box-DjRIKMD0.cjs +0 -1
- package/dist/ButtonBase-BvllyU4w.cjs +0 -75
- package/dist/ButtonBase-C14ZYs6z.js +0 -833
- package/dist/CircularProgress-Bf46-VRs.js +0 -217
- package/dist/CircularProgress-DjSMBYnK.cjs +0 -28
- package/dist/DefaultButton-DPZOltN5.cjs +0 -1
- package/dist/IconButton-X6l-U-im.cjs +0 -2
- package/dist/InputBase-CzupOzjh.cjs +0 -4
- package/dist/LocalizationProvider-DqwEOZOd.cjs +0 -5
- package/dist/SearchInput-Bb3sCx3k.cjs +0 -1
- package/dist/SearchInput-DRjmNW6W.js +0 -177
- package/dist/Tabs-B9BPJaDx.js +0 -1090
- package/dist/Tabs-Dx8YJT4c.cjs +0 -4
- package/dist/TextInput-BFguMDSu.cjs +0 -12
- package/dist/TimePicker-B0HOzxHh.cjs +0 -69
- package/dist/TimePicker-OBZs04Z8.js +0 -19694
- package/dist/Typography-CRt6WSxo.js +0 -204
- package/dist/Typography-DsPQABF2.cjs +0 -1
- package/dist/createSvgIcon-BOQCM03y.cjs +0 -2
- package/dist/createSvgIcon-C2VxBqzG.cjs +0 -1
- package/dist/createSvgIcon-xJp3_zwo.js +0 -84
- package/dist/isHostComponent-PydJW4A4.cjs +0 -1
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/refType-5EEBZL5_.cjs +0 -1
- package/dist/styled-D8lXwcQy.js +0 -423
- package/dist/styled-DFoJwRxe.cjs +0 -24
- package/dist/useSlotProps-BoMYRJkF.js +0 -72
- package/dist/useSlotProps-EKKRQjEn.cjs +0 -1
- package/dist/useTheme-BkW5nNsn.cjs +0 -1
- package/dist/useTheme-Bo1inEHN.js +0 -9
- package/dist/useThemeProps-BRWSvuZw.cjs +0 -42
- package/dist/useThemeProps-CZzcR_pm.js +0 -2288
package/dist/Tabs-B9BPJaDx.js
DELETED
|
@@ -1,1090 +0,0 @@
|
|
|
1
|
-
import { g as me, c as Le, _ as b, b as ve, e as ae, P as t } from "./useThemeProps-CZzcR_pm.js";
|
|
2
|
-
import * as d from "react";
|
|
3
|
-
import { g as Se, s as D, c as L, a as ye, d as st } from "./styled-D8lXwcQy.js";
|
|
4
|
-
import { jsxs as Q, jsx as w } from "react/jsx-runtime";
|
|
5
|
-
import { B as $e } from "./ButtonBase-C14ZYs6z.js";
|
|
6
|
-
import { u as at } from "./unsupportedProp-BuVD30Gh.js";
|
|
7
|
-
import { u as ke } from "./useTheme-Bo1inEHN.js";
|
|
8
|
-
import { u as it } from "./useForkRef-CQ5u1_mH.js";
|
|
9
|
-
import { a as Fe, d as Ae, o as ct } from "./ownerWindow-C7EH1lr6.js";
|
|
10
|
-
import { a as be } from "./useTimeout-C7IkLqZ9.js";
|
|
11
|
-
import { r as dt } from "./refType-BBFUe6fu.js";
|
|
12
|
-
import { c as je } from "./createSvgIcon-Dspfpz-l.js";
|
|
13
|
-
import { u as se } from "./useSlotProps-BoMYRJkF.js";
|
|
14
|
-
let X;
|
|
15
|
-
function De() {
|
|
16
|
-
if (X)
|
|
17
|
-
return X;
|
|
18
|
-
const e = document.createElement("div"), o = document.createElement("div");
|
|
19
|
-
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;
|
|
20
|
-
}
|
|
21
|
-
function ut(e, o) {
|
|
22
|
-
const n = e.scrollLeft;
|
|
23
|
-
if (o !== "rtl")
|
|
24
|
-
return n;
|
|
25
|
-
switch (De()) {
|
|
26
|
-
case "negative":
|
|
27
|
-
return e.scrollWidth - e.clientWidth + n;
|
|
28
|
-
case "reverse":
|
|
29
|
-
return e.scrollWidth - e.clientWidth - n;
|
|
30
|
-
default:
|
|
31
|
-
return n;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function pt(e) {
|
|
35
|
-
return me("MuiTab", e);
|
|
36
|
-
}
|
|
37
|
-
const ft = Se("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]), j = ft, bt = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"], ht = (e) => {
|
|
38
|
-
const {
|
|
39
|
-
classes: o,
|
|
40
|
-
textColor: n,
|
|
41
|
-
fullWidth: c,
|
|
42
|
-
wrapped: s,
|
|
43
|
-
icon: u,
|
|
44
|
-
label: m,
|
|
45
|
-
selected: h,
|
|
46
|
-
disabled: p
|
|
47
|
-
} = e, S = {
|
|
48
|
-
root: ["root", u && m && "labelIcon", `textColor${Le(n)}`, c && "fullWidth", s && "wrapped", h && "selected", p && "disabled"],
|
|
49
|
-
iconWrapper: ["iconWrapper"]
|
|
50
|
-
};
|
|
51
|
-
return ye(S, pt, o);
|
|
52
|
-
}, mt = D($e, {
|
|
53
|
-
name: "MuiTab",
|
|
54
|
-
slot: "Root",
|
|
55
|
-
overridesResolver: (e, o) => {
|
|
56
|
-
const {
|
|
57
|
-
ownerState: n
|
|
58
|
-
} = e;
|
|
59
|
-
return [o.root, n.label && n.icon && o.labelIcon, o[`textColor${Le(n.textColor)}`], n.fullWidth && o.fullWidth, n.wrapped && o.wrapped];
|
|
60
|
-
}
|
|
61
|
-
})(({
|
|
62
|
-
theme: e,
|
|
63
|
-
ownerState: o
|
|
64
|
-
}) => b({}, e.typography.button, {
|
|
65
|
-
maxWidth: 360,
|
|
66
|
-
minWidth: 90,
|
|
67
|
-
position: "relative",
|
|
68
|
-
minHeight: 48,
|
|
69
|
-
flexShrink: 0,
|
|
70
|
-
padding: "12px 16px",
|
|
71
|
-
overflow: "hidden",
|
|
72
|
-
whiteSpace: "normal",
|
|
73
|
-
textAlign: "center"
|
|
74
|
-
}, o.label && {
|
|
75
|
-
flexDirection: o.iconPosition === "top" || o.iconPosition === "bottom" ? "column" : "row"
|
|
76
|
-
}, {
|
|
77
|
-
lineHeight: 1.25
|
|
78
|
-
}, o.icon && o.label && {
|
|
79
|
-
minHeight: 72,
|
|
80
|
-
paddingTop: 9,
|
|
81
|
-
paddingBottom: 9,
|
|
82
|
-
[`& > .${j.iconWrapper}`]: b({}, o.iconPosition === "top" && {
|
|
83
|
-
marginBottom: 6
|
|
84
|
-
}, o.iconPosition === "bottom" && {
|
|
85
|
-
marginTop: 6
|
|
86
|
-
}, o.iconPosition === "start" && {
|
|
87
|
-
marginRight: e.spacing(1)
|
|
88
|
-
}, o.iconPosition === "end" && {
|
|
89
|
-
marginLeft: e.spacing(1)
|
|
90
|
-
})
|
|
91
|
-
}, o.textColor === "inherit" && {
|
|
92
|
-
color: "inherit",
|
|
93
|
-
opacity: 0.6,
|
|
94
|
-
// same opacity as theme.palette.text.secondary
|
|
95
|
-
[`&.${j.selected}`]: {
|
|
96
|
-
opacity: 1
|
|
97
|
-
},
|
|
98
|
-
[`&.${j.disabled}`]: {
|
|
99
|
-
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
100
|
-
}
|
|
101
|
-
}, o.textColor === "primary" && {
|
|
102
|
-
color: (e.vars || e).palette.text.secondary,
|
|
103
|
-
[`&.${j.selected}`]: {
|
|
104
|
-
color: (e.vars || e).palette.primary.main
|
|
105
|
-
},
|
|
106
|
-
[`&.${j.disabled}`]: {
|
|
107
|
-
color: (e.vars || e).palette.text.disabled
|
|
108
|
-
}
|
|
109
|
-
}, o.textColor === "secondary" && {
|
|
110
|
-
color: (e.vars || e).palette.text.secondary,
|
|
111
|
-
[`&.${j.selected}`]: {
|
|
112
|
-
color: (e.vars || e).palette.secondary.main
|
|
113
|
-
},
|
|
114
|
-
[`&.${j.disabled}`]: {
|
|
115
|
-
color: (e.vars || e).palette.text.disabled
|
|
116
|
-
}
|
|
117
|
-
}, o.fullWidth && {
|
|
118
|
-
flexShrink: 1,
|
|
119
|
-
flexGrow: 1,
|
|
120
|
-
flexBasis: 0,
|
|
121
|
-
maxWidth: "none"
|
|
122
|
-
}, o.wrapped && {
|
|
123
|
-
fontSize: e.typography.pxToRem(12)
|
|
124
|
-
})), _e = /* @__PURE__ */ d.forwardRef(function(o, n) {
|
|
125
|
-
const c = ve({
|
|
126
|
-
props: o,
|
|
127
|
-
name: "MuiTab"
|
|
128
|
-
}), {
|
|
129
|
-
className: s,
|
|
130
|
-
disabled: u = !1,
|
|
131
|
-
disableFocusRipple: m = !1,
|
|
132
|
-
// eslint-disable-next-line react/prop-types
|
|
133
|
-
fullWidth: h,
|
|
134
|
-
icon: p,
|
|
135
|
-
iconPosition: S = "top",
|
|
136
|
-
// eslint-disable-next-line react/prop-types
|
|
137
|
-
indicator: I,
|
|
138
|
-
label: E,
|
|
139
|
-
onChange: T,
|
|
140
|
-
onClick: y,
|
|
141
|
-
onFocus: _,
|
|
142
|
-
// eslint-disable-next-line react/prop-types
|
|
143
|
-
selected: O,
|
|
144
|
-
// eslint-disable-next-line react/prop-types
|
|
145
|
-
selectionFollowsFocus: g,
|
|
146
|
-
// eslint-disable-next-line react/prop-types
|
|
147
|
-
textColor: H = "inherit",
|
|
148
|
-
value: x,
|
|
149
|
-
wrapped: ie = !1
|
|
150
|
-
} = c, V = ae(c, bt), Y = b({}, c, {
|
|
151
|
-
disabled: u,
|
|
152
|
-
disableFocusRipple: m,
|
|
153
|
-
selected: O,
|
|
154
|
-
icon: !!p,
|
|
155
|
-
iconPosition: S,
|
|
156
|
-
label: !!E,
|
|
157
|
-
fullWidth: h,
|
|
158
|
-
textColor: H,
|
|
159
|
-
wrapped: ie
|
|
160
|
-
}), U = ht(Y), $ = p && E && /* @__PURE__ */ d.isValidElement(p) ? /* @__PURE__ */ d.cloneElement(p, {
|
|
161
|
-
className: L(U.iconWrapper, p.props.className)
|
|
162
|
-
}) : p, Z = (M) => {
|
|
163
|
-
!O && T && T(M, x), y && y(M);
|
|
164
|
-
}, P = (M) => {
|
|
165
|
-
g && !O && T && T(M, x), _ && _(M);
|
|
166
|
-
};
|
|
167
|
-
return /* @__PURE__ */ Q(mt, b({
|
|
168
|
-
focusRipple: !m,
|
|
169
|
-
className: L(U.root, s),
|
|
170
|
-
ref: n,
|
|
171
|
-
role: "tab",
|
|
172
|
-
"aria-selected": O,
|
|
173
|
-
disabled: u,
|
|
174
|
-
onClick: Z,
|
|
175
|
-
onFocus: P,
|
|
176
|
-
ownerState: Y,
|
|
177
|
-
tabIndex: O ? 0 : -1
|
|
178
|
-
}, V, {
|
|
179
|
-
children: [S === "top" || S === "start" ? /* @__PURE__ */ Q(d.Fragment, {
|
|
180
|
-
children: [$, E]
|
|
181
|
-
}) : /* @__PURE__ */ Q(d.Fragment, {
|
|
182
|
-
children: [E, $]
|
|
183
|
-
}), I]
|
|
184
|
-
}));
|
|
185
|
-
});
|
|
186
|
-
process.env.NODE_ENV !== "production" && (_e.propTypes = {
|
|
187
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
188
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
189
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
190
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
191
|
-
/**
|
|
192
|
-
* This prop isn't supported.
|
|
193
|
-
* Use the `component` prop if you need to change the children structure.
|
|
194
|
-
*/
|
|
195
|
-
children: at,
|
|
196
|
-
/**
|
|
197
|
-
* Override or extend the styles applied to the component.
|
|
198
|
-
*/
|
|
199
|
-
classes: t.object,
|
|
200
|
-
/**
|
|
201
|
-
* @ignore
|
|
202
|
-
*/
|
|
203
|
-
className: t.string,
|
|
204
|
-
/**
|
|
205
|
-
* If `true`, the component is disabled.
|
|
206
|
-
* @default false
|
|
207
|
-
*/
|
|
208
|
-
disabled: t.bool,
|
|
209
|
-
/**
|
|
210
|
-
* If `true`, the keyboard focus ripple is disabled.
|
|
211
|
-
* @default false
|
|
212
|
-
*/
|
|
213
|
-
disableFocusRipple: t.bool,
|
|
214
|
-
/**
|
|
215
|
-
* If `true`, the ripple effect is disabled.
|
|
216
|
-
*
|
|
217
|
-
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
218
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
219
|
-
* @default false
|
|
220
|
-
*/
|
|
221
|
-
disableRipple: t.bool,
|
|
222
|
-
/**
|
|
223
|
-
* The icon to display.
|
|
224
|
-
*/
|
|
225
|
-
icon: t.oneOfType([t.element, t.string]),
|
|
226
|
-
/**
|
|
227
|
-
* The position of the icon relative to the label.
|
|
228
|
-
* @default 'top'
|
|
229
|
-
*/
|
|
230
|
-
iconPosition: t.oneOf(["bottom", "end", "start", "top"]),
|
|
231
|
-
/**
|
|
232
|
-
* The label element.
|
|
233
|
-
*/
|
|
234
|
-
label: t.node,
|
|
235
|
-
/**
|
|
236
|
-
* @ignore
|
|
237
|
-
*/
|
|
238
|
-
onChange: t.func,
|
|
239
|
-
/**
|
|
240
|
-
* @ignore
|
|
241
|
-
*/
|
|
242
|
-
onClick: t.func,
|
|
243
|
-
/**
|
|
244
|
-
* @ignore
|
|
245
|
-
*/
|
|
246
|
-
onFocus: t.func,
|
|
247
|
-
/**
|
|
248
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
249
|
-
*/
|
|
250
|
-
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
251
|
-
/**
|
|
252
|
-
* You can provide your own value. Otherwise, we fallback to the child position index.
|
|
253
|
-
*/
|
|
254
|
-
value: t.any,
|
|
255
|
-
/**
|
|
256
|
-
* Tab labels appear in a single row.
|
|
257
|
-
* They can use a second line if needed.
|
|
258
|
-
* @default false
|
|
259
|
-
*/
|
|
260
|
-
wrapped: t.bool
|
|
261
|
-
});
|
|
262
|
-
const Jt = _e;
|
|
263
|
-
function vt(e) {
|
|
264
|
-
return (1 + Math.sin(Math.PI * e - Math.PI / 2)) / 2;
|
|
265
|
-
}
|
|
266
|
-
function St(e, o, n, c = {}, s = () => {
|
|
267
|
-
}) {
|
|
268
|
-
const {
|
|
269
|
-
ease: u = vt,
|
|
270
|
-
duration: m = 300
|
|
271
|
-
// standard
|
|
272
|
-
} = c;
|
|
273
|
-
let h = null;
|
|
274
|
-
const p = o[e];
|
|
275
|
-
let S = !1;
|
|
276
|
-
const I = () => {
|
|
277
|
-
S = !0;
|
|
278
|
-
}, E = (T) => {
|
|
279
|
-
if (S) {
|
|
280
|
-
s(new Error("Animation cancelled"));
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
h === null && (h = T);
|
|
284
|
-
const y = Math.min(1, (T - h) / m);
|
|
285
|
-
if (o[e] = u(y) * (n - p) + p, y >= 1) {
|
|
286
|
-
requestAnimationFrame(() => {
|
|
287
|
-
s(null);
|
|
288
|
-
});
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
requestAnimationFrame(E);
|
|
292
|
-
};
|
|
293
|
-
return p === n ? (s(new Error("Element already at target position")), I) : (requestAnimationFrame(E), I);
|
|
294
|
-
}
|
|
295
|
-
const yt = ["onChange"], gt = {
|
|
296
|
-
width: 99,
|
|
297
|
-
height: 99,
|
|
298
|
-
position: "absolute",
|
|
299
|
-
top: -9999,
|
|
300
|
-
overflow: "scroll"
|
|
301
|
-
};
|
|
302
|
-
function He(e) {
|
|
303
|
-
const {
|
|
304
|
-
onChange: o
|
|
305
|
-
} = e, n = ae(e, yt), c = d.useRef(), s = d.useRef(null), u = () => {
|
|
306
|
-
c.current = s.current.offsetHeight - s.current.clientHeight;
|
|
307
|
-
};
|
|
308
|
-
return it(() => {
|
|
309
|
-
const m = Ae(() => {
|
|
310
|
-
const p = c.current;
|
|
311
|
-
u(), p !== c.current && o(c.current);
|
|
312
|
-
}), h = Fe(s.current);
|
|
313
|
-
return h.addEventListener("resize", m), () => {
|
|
314
|
-
m.clear(), h.removeEventListener("resize", m);
|
|
315
|
-
};
|
|
316
|
-
}, [o]), d.useEffect(() => {
|
|
317
|
-
u(), o(c.current);
|
|
318
|
-
}, [o]), /* @__PURE__ */ w("div", b({
|
|
319
|
-
style: gt,
|
|
320
|
-
ref: s
|
|
321
|
-
}, n));
|
|
322
|
-
}
|
|
323
|
-
process.env.NODE_ENV !== "production" && (He.propTypes = {
|
|
324
|
-
onChange: t.func.isRequired
|
|
325
|
-
});
|
|
326
|
-
const Tt = je(/* @__PURE__ */ w("path", {
|
|
327
|
-
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
328
|
-
}), "KeyboardArrowLeft"), xt = je(/* @__PURE__ */ w("path", {
|
|
329
|
-
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
330
|
-
}), "KeyboardArrowRight");
|
|
331
|
-
function Bt(e) {
|
|
332
|
-
return me("MuiTabScrollButton", e);
|
|
333
|
-
}
|
|
334
|
-
const Ct = Se("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), wt = Ct, It = ["className", "slots", "slotProps", "direction", "orientation", "disabled"], Et = (e) => {
|
|
335
|
-
const {
|
|
336
|
-
classes: o,
|
|
337
|
-
orientation: n,
|
|
338
|
-
disabled: c
|
|
339
|
-
} = e;
|
|
340
|
-
return ye({
|
|
341
|
-
root: ["root", n, c && "disabled"]
|
|
342
|
-
}, Bt, o);
|
|
343
|
-
}, Ot = D($e, {
|
|
344
|
-
name: "MuiTabScrollButton",
|
|
345
|
-
slot: "Root",
|
|
346
|
-
overridesResolver: (e, o) => {
|
|
347
|
-
const {
|
|
348
|
-
ownerState: n
|
|
349
|
-
} = e;
|
|
350
|
-
return [o.root, n.orientation && o[n.orientation]];
|
|
351
|
-
}
|
|
352
|
-
})(({
|
|
353
|
-
ownerState: e
|
|
354
|
-
}) => b({
|
|
355
|
-
width: 40,
|
|
356
|
-
flexShrink: 0,
|
|
357
|
-
opacity: 0.8,
|
|
358
|
-
[`&.${wt.disabled}`]: {
|
|
359
|
-
opacity: 0
|
|
360
|
-
}
|
|
361
|
-
}, e.orientation === "vertical" && {
|
|
362
|
-
width: "100%",
|
|
363
|
-
height: 40,
|
|
364
|
-
"& svg": {
|
|
365
|
-
transform: `rotate(${e.isRtl ? -90 : 90}deg)`
|
|
366
|
-
}
|
|
367
|
-
})), Ve = /* @__PURE__ */ d.forwardRef(function(o, n) {
|
|
368
|
-
var c, s;
|
|
369
|
-
const u = ve({
|
|
370
|
-
props: o,
|
|
371
|
-
name: "MuiTabScrollButton"
|
|
372
|
-
}), {
|
|
373
|
-
className: m,
|
|
374
|
-
slots: h = {},
|
|
375
|
-
slotProps: p = {},
|
|
376
|
-
direction: S
|
|
377
|
-
} = u, I = ae(u, It), T = ke().direction === "rtl", y = b({
|
|
378
|
-
isRtl: T
|
|
379
|
-
}, u), _ = Et(y), O = (c = h.StartScrollButtonIcon) != null ? c : Tt, g = (s = h.EndScrollButtonIcon) != null ? s : xt, H = se({
|
|
380
|
-
elementType: O,
|
|
381
|
-
externalSlotProps: p.startScrollButtonIcon,
|
|
382
|
-
additionalProps: {
|
|
383
|
-
fontSize: "small"
|
|
384
|
-
},
|
|
385
|
-
ownerState: y
|
|
386
|
-
}), x = se({
|
|
387
|
-
elementType: g,
|
|
388
|
-
externalSlotProps: p.endScrollButtonIcon,
|
|
389
|
-
additionalProps: {
|
|
390
|
-
fontSize: "small"
|
|
391
|
-
},
|
|
392
|
-
ownerState: y
|
|
393
|
-
});
|
|
394
|
-
return /* @__PURE__ */ w(Ot, b({
|
|
395
|
-
component: "div",
|
|
396
|
-
className: L(_.root, m),
|
|
397
|
-
ref: n,
|
|
398
|
-
role: null,
|
|
399
|
-
ownerState: y,
|
|
400
|
-
tabIndex: null
|
|
401
|
-
}, I, {
|
|
402
|
-
children: S === "left" ? /* @__PURE__ */ w(O, b({}, H)) : /* @__PURE__ */ w(g, b({}, x))
|
|
403
|
-
}));
|
|
404
|
-
});
|
|
405
|
-
process.env.NODE_ENV !== "production" && (Ve.propTypes = {
|
|
406
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
407
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
408
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
409
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
410
|
-
/**
|
|
411
|
-
* The content of the component.
|
|
412
|
-
*/
|
|
413
|
-
children: t.node,
|
|
414
|
-
/**
|
|
415
|
-
* Override or extend the styles applied to the component.
|
|
416
|
-
*/
|
|
417
|
-
classes: t.object,
|
|
418
|
-
/**
|
|
419
|
-
* @ignore
|
|
420
|
-
*/
|
|
421
|
-
className: t.string,
|
|
422
|
-
/**
|
|
423
|
-
* The direction the button should indicate.
|
|
424
|
-
*/
|
|
425
|
-
direction: t.oneOf(["left", "right"]).isRequired,
|
|
426
|
-
/**
|
|
427
|
-
* If `true`, the component is disabled.
|
|
428
|
-
* @default false
|
|
429
|
-
*/
|
|
430
|
-
disabled: t.bool,
|
|
431
|
-
/**
|
|
432
|
-
* The component orientation (layout flow direction).
|
|
433
|
-
*/
|
|
434
|
-
orientation: t.oneOf(["horizontal", "vertical"]).isRequired,
|
|
435
|
-
/**
|
|
436
|
-
* The extra props for the slot components.
|
|
437
|
-
* You can override the existing props or add new ones.
|
|
438
|
-
* @default {}
|
|
439
|
-
*/
|
|
440
|
-
slotProps: t.shape({
|
|
441
|
-
endScrollButtonIcon: t.oneOfType([t.func, t.object]),
|
|
442
|
-
startScrollButtonIcon: t.oneOfType([t.func, t.object])
|
|
443
|
-
}),
|
|
444
|
-
/**
|
|
445
|
-
* The components used for each slot inside.
|
|
446
|
-
* @default {}
|
|
447
|
-
*/
|
|
448
|
-
slots: t.shape({
|
|
449
|
-
EndScrollButtonIcon: t.elementType,
|
|
450
|
-
StartScrollButtonIcon: t.elementType
|
|
451
|
-
}),
|
|
452
|
-
/**
|
|
453
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
454
|
-
*/
|
|
455
|
-
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
456
|
-
});
|
|
457
|
-
const Nt = Ve;
|
|
458
|
-
function Mt(e) {
|
|
459
|
-
return me("MuiTabs", e);
|
|
460
|
-
}
|
|
461
|
-
const Rt = Se("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), he = Rt, Pt = ["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) => {
|
|
462
|
-
let c = !1, s = n(e, o);
|
|
463
|
-
for (; s; ) {
|
|
464
|
-
if (s === e.firstChild) {
|
|
465
|
-
if (c)
|
|
466
|
-
return;
|
|
467
|
-
c = !0;
|
|
468
|
-
}
|
|
469
|
-
const u = s.disabled || s.getAttribute("aria-disabled") === "true";
|
|
470
|
-
if (!s.hasAttribute("tabindex") || u)
|
|
471
|
-
s = n(e, s);
|
|
472
|
-
else {
|
|
473
|
-
s.focus();
|
|
474
|
-
return;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
}, zt = (e) => {
|
|
478
|
-
const {
|
|
479
|
-
vertical: o,
|
|
480
|
-
fixed: n,
|
|
481
|
-
hideScrollbar: c,
|
|
482
|
-
scrollableX: s,
|
|
483
|
-
scrollableY: u,
|
|
484
|
-
centered: m,
|
|
485
|
-
scrollButtonsHideMobile: h,
|
|
486
|
-
classes: p
|
|
487
|
-
} = e;
|
|
488
|
-
return ye({
|
|
489
|
-
root: ["root", o && "vertical"],
|
|
490
|
-
scroller: ["scroller", n && "fixed", c && "hideScrollbar", s && "scrollableX", u && "scrollableY"],
|
|
491
|
-
flexContainer: ["flexContainer", o && "flexContainerVertical", m && "centered"],
|
|
492
|
-
indicator: ["indicator"],
|
|
493
|
-
scrollButtons: ["scrollButtons", h && "scrollButtonsHideMobile"],
|
|
494
|
-
scrollableX: [s && "scrollableX"],
|
|
495
|
-
hideScrollbar: [c && "hideScrollbar"]
|
|
496
|
-
}, Mt, p);
|
|
497
|
-
}, Wt = D("div", {
|
|
498
|
-
name: "MuiTabs",
|
|
499
|
-
slot: "Root",
|
|
500
|
-
overridesResolver: (e, o) => {
|
|
501
|
-
const {
|
|
502
|
-
ownerState: n
|
|
503
|
-
} = e;
|
|
504
|
-
return [{
|
|
505
|
-
[`& .${he.scrollButtons}`]: o.scrollButtons
|
|
506
|
-
}, {
|
|
507
|
-
[`& .${he.scrollButtons}`]: n.scrollButtonsHideMobile && o.scrollButtonsHideMobile
|
|
508
|
-
}, o.root, n.vertical && o.vertical];
|
|
509
|
-
}
|
|
510
|
-
})(({
|
|
511
|
-
ownerState: e,
|
|
512
|
-
theme: o
|
|
513
|
-
}) => b({
|
|
514
|
-
overflow: "hidden",
|
|
515
|
-
minHeight: 48,
|
|
516
|
-
// Add iOS momentum scrolling for iOS < 13.0
|
|
517
|
-
WebkitOverflowScrolling: "touch",
|
|
518
|
-
display: "flex"
|
|
519
|
-
}, e.vertical && {
|
|
520
|
-
flexDirection: "column"
|
|
521
|
-
}, e.scrollButtonsHideMobile && {
|
|
522
|
-
[`& .${he.scrollButtons}`]: {
|
|
523
|
-
[o.breakpoints.down("sm")]: {
|
|
524
|
-
display: "none"
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
})), Lt = D("div", {
|
|
528
|
-
name: "MuiTabs",
|
|
529
|
-
slot: "Scroller",
|
|
530
|
-
overridesResolver: (e, o) => {
|
|
531
|
-
const {
|
|
532
|
-
ownerState: n
|
|
533
|
-
} = e;
|
|
534
|
-
return [o.scroller, n.fixed && o.fixed, n.hideScrollbar && o.hideScrollbar, n.scrollableX && o.scrollableX, n.scrollableY && o.scrollableY];
|
|
535
|
-
}
|
|
536
|
-
})(({
|
|
537
|
-
ownerState: e
|
|
538
|
-
}) => b({
|
|
539
|
-
position: "relative",
|
|
540
|
-
display: "inline-block",
|
|
541
|
-
flex: "1 1 auto",
|
|
542
|
-
whiteSpace: "nowrap"
|
|
543
|
-
}, e.fixed && {
|
|
544
|
-
overflowX: "hidden",
|
|
545
|
-
width: "100%"
|
|
546
|
-
}, e.hideScrollbar && {
|
|
547
|
-
// Hide dimensionless scrollbar on macOS
|
|
548
|
-
scrollbarWidth: "none",
|
|
549
|
-
// Firefox
|
|
550
|
-
"&::-webkit-scrollbar": {
|
|
551
|
-
display: "none"
|
|
552
|
-
// Safari + Chrome
|
|
553
|
-
}
|
|
554
|
-
}, e.scrollableX && {
|
|
555
|
-
overflowX: "auto",
|
|
556
|
-
overflowY: "hidden"
|
|
557
|
-
}, e.scrollableY && {
|
|
558
|
-
overflowY: "auto",
|
|
559
|
-
overflowX: "hidden"
|
|
560
|
-
})), $t = D("div", {
|
|
561
|
-
name: "MuiTabs",
|
|
562
|
-
slot: "FlexContainer",
|
|
563
|
-
overridesResolver: (e, o) => {
|
|
564
|
-
const {
|
|
565
|
-
ownerState: n
|
|
566
|
-
} = e;
|
|
567
|
-
return [o.flexContainer, n.vertical && o.flexContainerVertical, n.centered && o.centered];
|
|
568
|
-
}
|
|
569
|
-
})(({
|
|
570
|
-
ownerState: e
|
|
571
|
-
}) => b({
|
|
572
|
-
display: "flex"
|
|
573
|
-
}, e.vertical && {
|
|
574
|
-
flexDirection: "column"
|
|
575
|
-
}, e.centered && {
|
|
576
|
-
justifyContent: "center"
|
|
577
|
-
})), kt = D("span", {
|
|
578
|
-
name: "MuiTabs",
|
|
579
|
-
slot: "Indicator",
|
|
580
|
-
overridesResolver: (e, o) => o.indicator
|
|
581
|
-
})(({
|
|
582
|
-
ownerState: e,
|
|
583
|
-
theme: o
|
|
584
|
-
}) => b({
|
|
585
|
-
position: "absolute",
|
|
586
|
-
height: 2,
|
|
587
|
-
bottom: 0,
|
|
588
|
-
width: "100%",
|
|
589
|
-
transition: o.transitions.create()
|
|
590
|
-
}, e.indicatorColor === "primary" && {
|
|
591
|
-
backgroundColor: (o.vars || o).palette.primary.main
|
|
592
|
-
}, e.indicatorColor === "secondary" && {
|
|
593
|
-
backgroundColor: (o.vars || o).palette.secondary.main
|
|
594
|
-
}, e.vertical && {
|
|
595
|
-
height: "100%",
|
|
596
|
-
width: 2,
|
|
597
|
-
right: 0
|
|
598
|
-
})), Ft = D(He)({
|
|
599
|
-
overflowX: "auto",
|
|
600
|
-
overflowY: "hidden",
|
|
601
|
-
// Hide dimensionless scrollbar on macOS
|
|
602
|
-
scrollbarWidth: "none",
|
|
603
|
-
// Firefox
|
|
604
|
-
"&::-webkit-scrollbar": {
|
|
605
|
-
display: "none"
|
|
606
|
-
// Safari + Chrome
|
|
607
|
-
}
|
|
608
|
-
}), ze = {};
|
|
609
|
-
let We = !1;
|
|
610
|
-
const Ue = /* @__PURE__ */ d.forwardRef(function(o, n) {
|
|
611
|
-
const c = ve({
|
|
612
|
-
props: o,
|
|
613
|
-
name: "MuiTabs"
|
|
614
|
-
}), s = ke(), u = s.direction === "rtl", {
|
|
615
|
-
"aria-label": m,
|
|
616
|
-
"aria-labelledby": h,
|
|
617
|
-
action: p,
|
|
618
|
-
centered: S = !1,
|
|
619
|
-
children: I,
|
|
620
|
-
className: E,
|
|
621
|
-
component: T = "div",
|
|
622
|
-
allowScrollButtonsMobile: y = !1,
|
|
623
|
-
indicatorColor: _ = "primary",
|
|
624
|
-
onChange: O,
|
|
625
|
-
orientation: g = "horizontal",
|
|
626
|
-
ScrollButtonComponent: H = Nt,
|
|
627
|
-
scrollButtons: x = "auto",
|
|
628
|
-
selectionFollowsFocus: ie,
|
|
629
|
-
slots: V = {},
|
|
630
|
-
slotProps: Y = {},
|
|
631
|
-
TabIndicatorProps: U = {},
|
|
632
|
-
TabScrollButtonProps: $ = {},
|
|
633
|
-
textColor: Z = "primary",
|
|
634
|
-
value: P,
|
|
635
|
-
variant: M = "standard",
|
|
636
|
-
visibleScrollbar: ce = !1
|
|
637
|
-
} = c, Xe = ae(c, Pt), B = M === "scrollable", C = g === "vertical", K = C ? "scrollTop" : "scrollLeft", ee = C ? "top" : "left", te = C ? "bottom" : "right", de = C ? "clientHeight" : "clientWidth", q = C ? "height" : "width", k = b({}, c, {
|
|
638
|
-
component: T,
|
|
639
|
-
allowScrollButtonsMobile: y,
|
|
640
|
-
indicatorColor: _,
|
|
641
|
-
orientation: g,
|
|
642
|
-
vertical: C,
|
|
643
|
-
scrollButtons: x,
|
|
644
|
-
textColor: Z,
|
|
645
|
-
variant: M,
|
|
646
|
-
visibleScrollbar: ce,
|
|
647
|
-
fixed: !B,
|
|
648
|
-
hideScrollbar: B && !ce,
|
|
649
|
-
scrollableX: B && !C,
|
|
650
|
-
scrollableY: B && C,
|
|
651
|
-
centered: S && !B,
|
|
652
|
-
scrollButtonsHideMobile: !y
|
|
653
|
-
}), z = zt(k), Ye = se({
|
|
654
|
-
elementType: V.StartScrollButtonIcon,
|
|
655
|
-
externalSlotProps: Y.startScrollButtonIcon,
|
|
656
|
-
ownerState: k
|
|
657
|
-
}), Ke = se({
|
|
658
|
-
elementType: V.EndScrollButtonIcon,
|
|
659
|
-
externalSlotProps: Y.endScrollButtonIcon,
|
|
660
|
-
ownerState: k
|
|
661
|
-
});
|
|
662
|
-
process.env.NODE_ENV !== "production" && S && B && console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');
|
|
663
|
-
const [ge, qe] = d.useState(!1), [F, Te] = d.useState(ze), [xe, Ge] = d.useState(!1), [Be, Je] = d.useState(!1), [Ce, Qe] = d.useState(!1), [we, Ze] = d.useState({
|
|
664
|
-
overflow: "hidden",
|
|
665
|
-
scrollbarWidth: 0
|
|
666
|
-
}), oe = /* @__PURE__ */ new Map(), R = d.useRef(null), A = d.useRef(null), Ie = () => {
|
|
667
|
-
const r = R.current;
|
|
668
|
-
let l;
|
|
669
|
-
if (r) {
|
|
670
|
-
const i = r.getBoundingClientRect();
|
|
671
|
-
l = {
|
|
672
|
-
clientWidth: r.clientWidth,
|
|
673
|
-
scrollLeft: r.scrollLeft,
|
|
674
|
-
scrollTop: r.scrollTop,
|
|
675
|
-
scrollLeftNormalized: ut(r, s.direction),
|
|
676
|
-
scrollWidth: r.scrollWidth,
|
|
677
|
-
top: i.top,
|
|
678
|
-
bottom: i.bottom,
|
|
679
|
-
left: i.left,
|
|
680
|
-
right: i.right
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
let a;
|
|
684
|
-
if (r && P !== !1) {
|
|
685
|
-
const i = A.current.children;
|
|
686
|
-
if (i.length > 0) {
|
|
687
|
-
const f = i[oe.get(P)];
|
|
688
|
-
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(`
|
|
689
|
-
`))), a = f ? f.getBoundingClientRect() : null, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && !We && a && a.width === 0 && a.height === 0 && // if the whole Tabs component is hidden, don't warn
|
|
690
|
-
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(`
|
|
691
|
-
`)), We = !0);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
return {
|
|
695
|
-
tabsMeta: l,
|
|
696
|
-
tabMeta: a
|
|
697
|
-
};
|
|
698
|
-
}, G = be(() => {
|
|
699
|
-
const {
|
|
700
|
-
tabsMeta: r,
|
|
701
|
-
tabMeta: l
|
|
702
|
-
} = Ie();
|
|
703
|
-
let a = 0, i;
|
|
704
|
-
if (C)
|
|
705
|
-
i = "top", l && r && (a = l.top - r.top + r.scrollTop);
|
|
706
|
-
else if (i = u ? "right" : "left", l && r) {
|
|
707
|
-
const v = u ? r.scrollLeftNormalized + r.clientWidth - r.scrollWidth : r.scrollLeft;
|
|
708
|
-
a = (u ? -1 : 1) * (l[i] - r[i] + v);
|
|
709
|
-
}
|
|
710
|
-
const f = {
|
|
711
|
-
[i]: a,
|
|
712
|
-
// May be wrong until the font is loaded.
|
|
713
|
-
[q]: l ? l[q] : 0
|
|
714
|
-
};
|
|
715
|
-
if (isNaN(F[i]) || isNaN(F[q]))
|
|
716
|
-
Te(f);
|
|
717
|
-
else {
|
|
718
|
-
const v = Math.abs(F[i] - f[i]), N = Math.abs(F[q] - f[q]);
|
|
719
|
-
(v >= 1 || N >= 1) && Te(f);
|
|
720
|
-
}
|
|
721
|
-
}), ue = (r, {
|
|
722
|
-
animation: l = !0
|
|
723
|
-
} = {}) => {
|
|
724
|
-
l ? St(K, R.current, r, {
|
|
725
|
-
duration: s.transitions.duration.standard
|
|
726
|
-
}) : R.current[K] = r;
|
|
727
|
-
}, Ee = (r) => {
|
|
728
|
-
let l = R.current[K];
|
|
729
|
-
C ? l += r : (l += r * (u ? -1 : 1), l *= u && De() === "reverse" ? -1 : 1), ue(l);
|
|
730
|
-
}, Oe = () => {
|
|
731
|
-
const r = R.current[de];
|
|
732
|
-
let l = 0;
|
|
733
|
-
const a = Array.from(A.current.children);
|
|
734
|
-
for (let i = 0; i < a.length; i += 1) {
|
|
735
|
-
const f = a[i];
|
|
736
|
-
if (l + f[de] > r) {
|
|
737
|
-
i === 0 && (l = r);
|
|
738
|
-
break;
|
|
739
|
-
}
|
|
740
|
-
l += f[de];
|
|
741
|
-
}
|
|
742
|
-
return l;
|
|
743
|
-
}, et = () => {
|
|
744
|
-
Ee(-1 * Oe());
|
|
745
|
-
}, tt = () => {
|
|
746
|
-
Ee(Oe());
|
|
747
|
-
}, ot = d.useCallback((r) => {
|
|
748
|
-
Ze({
|
|
749
|
-
overflow: null,
|
|
750
|
-
scrollbarWidth: r
|
|
751
|
-
});
|
|
752
|
-
}, []), rt = () => {
|
|
753
|
-
const r = {};
|
|
754
|
-
r.scrollbarSizeListener = B ? /* @__PURE__ */ w(Ft, {
|
|
755
|
-
onChange: ot,
|
|
756
|
-
className: L(z.scrollableX, z.hideScrollbar)
|
|
757
|
-
}) : null;
|
|
758
|
-
const a = B && (x === "auto" && (xe || Be) || x === !0);
|
|
759
|
-
return r.scrollButtonStart = a ? /* @__PURE__ */ w(H, b({
|
|
760
|
-
slots: {
|
|
761
|
-
StartScrollButtonIcon: V.StartScrollButtonIcon
|
|
762
|
-
},
|
|
763
|
-
slotProps: {
|
|
764
|
-
startScrollButtonIcon: Ye
|
|
765
|
-
},
|
|
766
|
-
orientation: g,
|
|
767
|
-
direction: u ? "right" : "left",
|
|
768
|
-
onClick: et,
|
|
769
|
-
disabled: !xe
|
|
770
|
-
}, $, {
|
|
771
|
-
className: L(z.scrollButtons, $.className)
|
|
772
|
-
})) : null, r.scrollButtonEnd = a ? /* @__PURE__ */ w(H, b({
|
|
773
|
-
slots: {
|
|
774
|
-
EndScrollButtonIcon: V.EndScrollButtonIcon
|
|
775
|
-
},
|
|
776
|
-
slotProps: {
|
|
777
|
-
endScrollButtonIcon: Ke
|
|
778
|
-
},
|
|
779
|
-
orientation: g,
|
|
780
|
-
direction: u ? "left" : "right",
|
|
781
|
-
onClick: tt,
|
|
782
|
-
disabled: !Be
|
|
783
|
-
}, $, {
|
|
784
|
-
className: L(z.scrollButtons, $.className)
|
|
785
|
-
})) : null, r;
|
|
786
|
-
}, Ne = be((r) => {
|
|
787
|
-
const {
|
|
788
|
-
tabsMeta: l,
|
|
789
|
-
tabMeta: a
|
|
790
|
-
} = Ie();
|
|
791
|
-
if (!(!a || !l)) {
|
|
792
|
-
if (a[ee] < l[ee]) {
|
|
793
|
-
const i = l[K] + (a[ee] - l[ee]);
|
|
794
|
-
ue(i, {
|
|
795
|
-
animation: r
|
|
796
|
-
});
|
|
797
|
-
} else if (a[te] > l[te]) {
|
|
798
|
-
const i = l[K] + (a[te] - l[te]);
|
|
799
|
-
ue(i, {
|
|
800
|
-
animation: r
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
}), re = be(() => {
|
|
805
|
-
B && x !== !1 && Qe(!Ce);
|
|
806
|
-
});
|
|
807
|
-
d.useEffect(() => {
|
|
808
|
-
const r = Ae(() => {
|
|
809
|
-
R.current && G();
|
|
810
|
-
});
|
|
811
|
-
let l;
|
|
812
|
-
const a = (v) => {
|
|
813
|
-
v.forEach((N) => {
|
|
814
|
-
N.removedNodes.forEach((J) => {
|
|
815
|
-
var W;
|
|
816
|
-
(W = l) == null || W.unobserve(J);
|
|
817
|
-
}), N.addedNodes.forEach((J) => {
|
|
818
|
-
var W;
|
|
819
|
-
(W = l) == null || W.observe(J);
|
|
820
|
-
});
|
|
821
|
-
}), r(), re();
|
|
822
|
-
}, i = Fe(R.current);
|
|
823
|
-
i.addEventListener("resize", r);
|
|
824
|
-
let f;
|
|
825
|
-
return typeof ResizeObserver < "u" && (l = new ResizeObserver(r), Array.from(A.current.children).forEach((v) => {
|
|
826
|
-
l.observe(v);
|
|
827
|
-
})), typeof MutationObserver < "u" && (f = new MutationObserver(a), f.observe(A.current, {
|
|
828
|
-
childList: !0
|
|
829
|
-
})), () => {
|
|
830
|
-
var v, N;
|
|
831
|
-
r.clear(), i.removeEventListener("resize", r), (v = f) == null || v.disconnect(), (N = l) == null || N.disconnect();
|
|
832
|
-
};
|
|
833
|
-
}, [G, re]), d.useEffect(() => {
|
|
834
|
-
const r = Array.from(A.current.children), l = r.length;
|
|
835
|
-
if (typeof IntersectionObserver < "u" && l > 0 && B && x !== !1) {
|
|
836
|
-
const a = r[0], i = r[l - 1], f = {
|
|
837
|
-
root: R.current,
|
|
838
|
-
threshold: 0.99
|
|
839
|
-
}, v = (fe) => {
|
|
840
|
-
Ge(!fe[0].isIntersecting);
|
|
841
|
-
}, N = new IntersectionObserver(v, f);
|
|
842
|
-
N.observe(a);
|
|
843
|
-
const J = (fe) => {
|
|
844
|
-
Je(!fe[0].isIntersecting);
|
|
845
|
-
}, W = new IntersectionObserver(J, f);
|
|
846
|
-
return W.observe(i), () => {
|
|
847
|
-
N.disconnect(), W.disconnect();
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
}, [B, x, Ce, I == null ? void 0 : I.length]), d.useEffect(() => {
|
|
851
|
-
qe(!0);
|
|
852
|
-
}, []), d.useEffect(() => {
|
|
853
|
-
G();
|
|
854
|
-
}), d.useEffect(() => {
|
|
855
|
-
Ne(ze !== F);
|
|
856
|
-
}, [Ne, F]), d.useImperativeHandle(p, () => ({
|
|
857
|
-
updateIndicator: G,
|
|
858
|
-
updateScrollButtons: re
|
|
859
|
-
}), [G, re]);
|
|
860
|
-
const Me = /* @__PURE__ */ w(kt, b({}, U, {
|
|
861
|
-
className: L(z.indicator, U.className),
|
|
862
|
-
ownerState: k,
|
|
863
|
-
style: b({}, F, U.style)
|
|
864
|
-
}));
|
|
865
|
-
let le = 0;
|
|
866
|
-
const lt = d.Children.map(I, (r) => {
|
|
867
|
-
if (!/* @__PURE__ */ d.isValidElement(r))
|
|
868
|
-
return null;
|
|
869
|
-
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(`
|
|
870
|
-
`));
|
|
871
|
-
const l = r.props.value === void 0 ? le : r.props.value;
|
|
872
|
-
oe.set(l, le);
|
|
873
|
-
const a = l === P;
|
|
874
|
-
return le += 1, /* @__PURE__ */ d.cloneElement(r, b({
|
|
875
|
-
fullWidth: M === "fullWidth",
|
|
876
|
-
indicator: a && !ge && Me,
|
|
877
|
-
selected: a,
|
|
878
|
-
selectionFollowsFocus: ie,
|
|
879
|
-
onChange: O,
|
|
880
|
-
textColor: Z,
|
|
881
|
-
value: l
|
|
882
|
-
}, le === 1 && P === !1 && !r.props.tabIndex ? {
|
|
883
|
-
tabIndex: 0
|
|
884
|
-
} : {}));
|
|
885
|
-
}), nt = (r) => {
|
|
886
|
-
const l = A.current, a = ct(l).activeElement;
|
|
887
|
-
if (a.getAttribute("role") !== "tab")
|
|
888
|
-
return;
|
|
889
|
-
let f = g === "horizontal" ? "ArrowLeft" : "ArrowUp", v = g === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
890
|
-
switch (g === "horizontal" && u && (f = "ArrowRight", v = "ArrowLeft"), r.key) {
|
|
891
|
-
case f:
|
|
892
|
-
r.preventDefault(), ne(l, a, Pe);
|
|
893
|
-
break;
|
|
894
|
-
case v:
|
|
895
|
-
r.preventDefault(), ne(l, a, Re);
|
|
896
|
-
break;
|
|
897
|
-
case "Home":
|
|
898
|
-
r.preventDefault(), ne(l, null, Re);
|
|
899
|
-
break;
|
|
900
|
-
case "End":
|
|
901
|
-
r.preventDefault(), ne(l, null, Pe);
|
|
902
|
-
break;
|
|
903
|
-
}
|
|
904
|
-
}, pe = rt();
|
|
905
|
-
return /* @__PURE__ */ Q(Wt, b({
|
|
906
|
-
className: L(z.root, E),
|
|
907
|
-
ownerState: k,
|
|
908
|
-
ref: n,
|
|
909
|
-
as: T
|
|
910
|
-
}, Xe, {
|
|
911
|
-
children: [pe.scrollButtonStart, pe.scrollbarSizeListener, /* @__PURE__ */ Q(Lt, {
|
|
912
|
-
className: z.scroller,
|
|
913
|
-
ownerState: k,
|
|
914
|
-
style: {
|
|
915
|
-
overflow: we.overflow,
|
|
916
|
-
[C ? `margin${u ? "Left" : "Right"}` : "marginBottom"]: ce ? void 0 : -we.scrollbarWidth
|
|
917
|
-
},
|
|
918
|
-
ref: R,
|
|
919
|
-
children: [/* @__PURE__ */ w($t, {
|
|
920
|
-
"aria-label": m,
|
|
921
|
-
"aria-labelledby": h,
|
|
922
|
-
"aria-orientation": g === "vertical" ? "vertical" : null,
|
|
923
|
-
className: z.flexContainer,
|
|
924
|
-
ownerState: k,
|
|
925
|
-
onKeyDown: nt,
|
|
926
|
-
ref: A,
|
|
927
|
-
role: "tablist",
|
|
928
|
-
children: lt
|
|
929
|
-
}), ge && Me]
|
|
930
|
-
}), pe.scrollButtonEnd]
|
|
931
|
-
}));
|
|
932
|
-
});
|
|
933
|
-
process.env.NODE_ENV !== "production" && (Ue.propTypes = {
|
|
934
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
935
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
936
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
937
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
938
|
-
/**
|
|
939
|
-
* Callback fired when the component mounts.
|
|
940
|
-
* This is useful when you want to trigger an action programmatically.
|
|
941
|
-
* It supports two actions: `updateIndicator()` and `updateScrollButtons()`
|
|
942
|
-
*
|
|
943
|
-
* @param {object} actions This object contains all possible actions
|
|
944
|
-
* that can be triggered programmatically.
|
|
945
|
-
*/
|
|
946
|
-
action: dt,
|
|
947
|
-
/**
|
|
948
|
-
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
949
|
-
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
950
|
-
* @default false
|
|
951
|
-
*/
|
|
952
|
-
allowScrollButtonsMobile: t.bool,
|
|
953
|
-
/**
|
|
954
|
-
* The label for the Tabs as a string.
|
|
955
|
-
*/
|
|
956
|
-
"aria-label": t.string,
|
|
957
|
-
/**
|
|
958
|
-
* An id or list of ids separated by a space that label the Tabs.
|
|
959
|
-
*/
|
|
960
|
-
"aria-labelledby": t.string,
|
|
961
|
-
/**
|
|
962
|
-
* If `true`, the tabs are centered.
|
|
963
|
-
* This prop is intended for large views.
|
|
964
|
-
* @default false
|
|
965
|
-
*/
|
|
966
|
-
centered: t.bool,
|
|
967
|
-
/**
|
|
968
|
-
* The content of the component.
|
|
969
|
-
*/
|
|
970
|
-
children: t.node,
|
|
971
|
-
/**
|
|
972
|
-
* Override or extend the styles applied to the component.
|
|
973
|
-
*/
|
|
974
|
-
classes: t.object,
|
|
975
|
-
/**
|
|
976
|
-
* @ignore
|
|
977
|
-
*/
|
|
978
|
-
className: t.string,
|
|
979
|
-
/**
|
|
980
|
-
* The component used for the root node.
|
|
981
|
-
* Either a string to use a HTML element or a component.
|
|
982
|
-
*/
|
|
983
|
-
component: t.elementType,
|
|
984
|
-
/**
|
|
985
|
-
* Determines the color of the indicator.
|
|
986
|
-
* @default 'primary'
|
|
987
|
-
*/
|
|
988
|
-
indicatorColor: t.oneOfType([t.oneOf(["primary", "secondary"]), t.string]),
|
|
989
|
-
/**
|
|
990
|
-
* Callback fired when the value changes.
|
|
991
|
-
*
|
|
992
|
-
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
993
|
-
* @param {any} value We default to the index of the child (number)
|
|
994
|
-
*/
|
|
995
|
-
onChange: t.func,
|
|
996
|
-
/**
|
|
997
|
-
* The component orientation (layout flow direction).
|
|
998
|
-
* @default 'horizontal'
|
|
999
|
-
*/
|
|
1000
|
-
orientation: t.oneOf(["horizontal", "vertical"]),
|
|
1001
|
-
/**
|
|
1002
|
-
* The component used to render the scroll buttons.
|
|
1003
|
-
* @default TabScrollButton
|
|
1004
|
-
*/
|
|
1005
|
-
ScrollButtonComponent: t.elementType,
|
|
1006
|
-
/**
|
|
1007
|
-
* Determine behavior of scroll buttons when tabs are set to scroll:
|
|
1008
|
-
*
|
|
1009
|
-
* - `auto` will only present them when not all the items are visible.
|
|
1010
|
-
* - `true` will always present them.
|
|
1011
|
-
* - `false` will never present them.
|
|
1012
|
-
*
|
|
1013
|
-
* By default the scroll buttons are hidden on mobile.
|
|
1014
|
-
* This behavior can be disabled with `allowScrollButtonsMobile`.
|
|
1015
|
-
* @default 'auto'
|
|
1016
|
-
*/
|
|
1017
|
-
scrollButtons: t.oneOf(["auto", !1, !0]),
|
|
1018
|
-
/**
|
|
1019
|
-
* If `true` the selected tab changes on focus. Otherwise it only
|
|
1020
|
-
* changes on activation.
|
|
1021
|
-
*/
|
|
1022
|
-
selectionFollowsFocus: t.bool,
|
|
1023
|
-
/**
|
|
1024
|
-
* The extra props for the slot components.
|
|
1025
|
-
* You can override the existing props or add new ones.
|
|
1026
|
-
* @default {}
|
|
1027
|
-
*/
|
|
1028
|
-
slotProps: t.shape({
|
|
1029
|
-
endScrollButtonIcon: t.oneOfType([t.func, t.object]),
|
|
1030
|
-
startScrollButtonIcon: t.oneOfType([t.func, t.object])
|
|
1031
|
-
}),
|
|
1032
|
-
/**
|
|
1033
|
-
* The components used for each slot inside.
|
|
1034
|
-
* @default {}
|
|
1035
|
-
*/
|
|
1036
|
-
slots: t.shape({
|
|
1037
|
-
EndScrollButtonIcon: t.elementType,
|
|
1038
|
-
StartScrollButtonIcon: t.elementType
|
|
1039
|
-
}),
|
|
1040
|
-
/**
|
|
1041
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1042
|
-
*/
|
|
1043
|
-
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
1044
|
-
/**
|
|
1045
|
-
* Props applied to the tab indicator element.
|
|
1046
|
-
* @default {}
|
|
1047
|
-
*/
|
|
1048
|
-
TabIndicatorProps: t.object,
|
|
1049
|
-
/**
|
|
1050
|
-
* Props applied to the [`TabScrollButton`](/material-ui/api/tab-scroll-button/) element.
|
|
1051
|
-
* @default {}
|
|
1052
|
-
*/
|
|
1053
|
-
TabScrollButtonProps: t.object,
|
|
1054
|
-
/**
|
|
1055
|
-
* Determines the color of the `Tab`.
|
|
1056
|
-
* @default 'primary'
|
|
1057
|
-
*/
|
|
1058
|
-
textColor: t.oneOf(["inherit", "primary", "secondary"]),
|
|
1059
|
-
/**
|
|
1060
|
-
* The value of the currently selected `Tab`.
|
|
1061
|
-
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
1062
|
-
*/
|
|
1063
|
-
value: t.any,
|
|
1064
|
-
/**
|
|
1065
|
-
* Determines additional display behavior of the tabs:
|
|
1066
|
-
*
|
|
1067
|
-
* - `scrollable` will invoke scrolling properties and allow for horizontally
|
|
1068
|
-
* scrolling (or swiping) of the tab bar.
|
|
1069
|
-
* - `fullWidth` will make the tabs grow to use all the available space,
|
|
1070
|
-
* which should be used for small views, like on mobile.
|
|
1071
|
-
* - `standard` will render the default state.
|
|
1072
|
-
* @default 'standard'
|
|
1073
|
-
*/
|
|
1074
|
-
variant: t.oneOf(["fullWidth", "scrollable", "standard"]),
|
|
1075
|
-
/**
|
|
1076
|
-
* If `true`, the scrollbar is visible. It can be useful when displaying
|
|
1077
|
-
* a long vertical list of tabs.
|
|
1078
|
-
* @default false
|
|
1079
|
-
*/
|
|
1080
|
-
visibleScrollbar: t.bool
|
|
1081
|
-
});
|
|
1082
|
-
const Qt = Ue;
|
|
1083
|
-
export {
|
|
1084
|
-
Jt as T,
|
|
1085
|
-
Qt as a,
|
|
1086
|
-
he as b,
|
|
1087
|
-
Mt as c,
|
|
1088
|
-
pt as g,
|
|
1089
|
-
j as t
|
|
1090
|
-
};
|