@cgi-learning-hub/ui 1.3.3 → 1.3.4-dev.1733911143
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/Backdrop-DqUdx8FP.cjs +1 -0
- package/dist/Backdrop-ZqzrnV2E.js +360 -0
- package/dist/Box-Be6jhcmK.cjs +1 -0
- package/dist/{Box-UE-zctbJ.js → Box-DN_2fcm9.js} +9 -9
- package/dist/Button-C6UXybBV.cjs +1 -0
- package/dist/{Button-Bjy0iPNm.js → Button-CL9rFoOY.js} +152 -118
- package/dist/{ButtonBase-CFD7NVUc.js → ButtonBase-CYkLbJ0U.js} +232 -240
- package/dist/ButtonBase-DzK1n18b.cjs +74 -0
- package/dist/Card-DO4cAmNC.js +74 -0
- package/dist/Card-DsmqVSx1.cjs +1 -0
- package/dist/Checkbox-Btg05OjV.cjs +1 -0
- package/dist/{Checkbox-Ct5E_6h7.js → Checkbox-CLM5GjuC.js} +27 -26
- package/dist/CircularProgress-BfbGcmHT.cjs +28 -0
- package/dist/{CircularProgress-By02Sdoh.js → CircularProgress-C4xtwh4E.js} +28 -27
- package/dist/DatePicker-BXTOQETi.cjs +14 -0
- package/dist/DatePicker-D9suyaUZ.js +10846 -0
- package/dist/DefaultPropsProvider-DE-Tx_ov.cjs +17 -0
- package/dist/DefaultPropsProvider-DUWovK-8.js +454 -0
- package/dist/Delete-CpADFuIX.cjs +1 -0
- package/dist/Delete-DWXEW4-c.js +8 -0
- package/dist/DialogContent-D_JmqJt6.js +603 -0
- package/dist/DialogContent-gRISmOoj.cjs +1 -0
- package/dist/DialogTitle-CID6RFNo.js +134 -0
- package/dist/DialogTitle-Dhxh1DVb.cjs +1 -0
- package/dist/Divider-BjxxEFnr.cjs +1 -0
- package/dist/Divider-HhF8ckeh.js +296 -0
- package/dist/FormControlLabel-0-cflTuo.js +262 -0
- package/dist/FormControlLabel-C-eZV5Xc.cjs +1 -0
- package/dist/FormGroup-Ck7StJ6i.cjs +1 -0
- package/dist/FormGroup-DIP4u-gv.js +95 -0
- package/dist/FormLabel-Ch103TK-.cjs +2 -0
- package/dist/{FormLabel-B4QlkhhB.js → FormLabel-X7FN1eBV.js} +39 -44
- package/dist/Grow-BgMSa0P2.js +193 -0
- package/dist/Grow-D7OAahbU.cjs +1 -0
- package/dist/{IconButton-Av8eJ5IG.js → IconButton-CMwpC2Co.js} +10 -9
- package/dist/IconButton-DbWtCGLB.cjs +2 -0
- package/dist/{InputAdornment-COPtZlSD.js → InputAdornment-B4hI0-Jz.js} +9 -8
- package/dist/InputAdornment-Cl2OaKlw.cjs +1 -0
- package/dist/InputBase-BuVAuMNp.cjs +3 -0
- package/dist/{InputBase-Bbgoz8GV.js → InputBase-DrofJ7xL.js} +60 -59
- package/dist/Link-AXhb0uJT.cjs +1 -0
- package/dist/Link-Bdupo_fW.js +267 -0
- package/dist/Menu-DR-xtxpt.js +966 -0
- package/dist/Menu-_chQG-Za.cjs +7 -0
- package/dist/{MenuItem-D7HWYhF3.js → MenuItem-C_d0Sc_L.js} +69 -74
- package/dist/MenuItem-De6eStq9.cjs +1 -0
- package/dist/Modal-C4Jb6sd1.js +750 -0
- package/dist/Modal-GXSEk85U.cjs +2 -0
- package/dist/Paper-CH4BABUB.cjs +2 -0
- package/dist/Paper-nlWPEgQh.js +185 -0
- package/dist/Popper-CjTplNLW.cjs +4 -0
- package/dist/Popper-CkAj_qw_.js +1407 -0
- package/dist/Portal-BcFwfiTx.js +86 -0
- package/dist/Portal-BruYsISj.cjs +1 -0
- package/dist/Radio-B0v6nDvz.js +313 -0
- package/dist/Radio-BbZnB74m.cjs +1 -0
- package/dist/Select-BFGwwKap.cjs +3 -0
- package/dist/Select-D9fwtA9U.js +2604 -0
- package/dist/{Stack-y1PjTHKX.js → Stack-C1i6_V9e.js} +105 -60
- package/dist/Stack-DMNZvXss.cjs +1 -0
- package/dist/SwitchBase-BpMNk4XV.cjs +1 -0
- package/dist/{SwitchBase-yCuH0Tqk.js → SwitchBase-DfbwljzN.js} +25 -24
- package/dist/{Tooltip-DO9GIhWC.js → TableSortLabel-DwnLOHOy.js} +2645 -3965
- package/dist/TableSortLabel-lnTBXy-V.cjs +98 -0
- package/dist/{Tabs-DK4Bc5xo.js → Tabs-BoFP2RHv.js} +333 -329
- package/dist/Tabs-DEvwJheI.cjs +4 -0
- package/dist/{TextField-C-B529_r.js → TextField-kwhzNVAL.js} +35 -34
- package/dist/TextField-waKWSLD4.cjs +1 -0
- package/dist/Tooltip-CFyOA9CT.cjs +4 -0
- package/dist/Tooltip-tgkiC77d.js +721 -0
- package/dist/Typography-B6KFjCtE.cjs +1 -0
- package/dist/{Typography-C_ESP41L.js → Typography-DWXYj92v.js} +13 -12
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/capitalize-DASFtB-F.cjs +1 -0
- package/dist/capitalize-NmHVRYy8.js +9 -0
- package/dist/chainPropTypes-CEUi6Jb4.cjs +1 -0
- package/dist/chainPropTypes-D9lkm76m.js +8 -0
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.es.js +28 -27
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +2 -2
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -5
- package/dist/components/Dropzone/Dropzone.es.js +24 -2162
- package/dist/components/EmptyState/EmptyState.cjs.js +1 -1
- package/dist/components/EmptyState/EmptyState.es.js +2 -2
- package/dist/components/FileList/FileList.cjs.js +1 -1
- package/dist/components/FileList/FileList.es.js +1 -1
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +21 -22
- package/dist/components/Heading/Heading.cjs.js +1 -1
- package/dist/components/Heading/Heading.es.js +2 -2
- package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +12 -0
- package/dist/components/ImagePicker/ImagePicker.es.js +174 -0
- package/dist/components/ImagePicker/index.cjs.js +1 -0
- package/dist/components/ImagePicker/index.d.ts +2 -0
- package/dist/components/ImagePicker/index.es.js +4 -0
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.es.js +2 -2
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +3 -3
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +8 -7
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/SearchInput/SearchInput.es.js +4 -4
- package/dist/components/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/TextInput/TextInput.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.es.js +276 -262
- package/dist/components/stories/Button.stories.cjs.js +1 -1
- package/dist/components/stories/Button.stories.es.js +1 -1
- package/dist/components/stories/Card.stories.cjs.js +1 -0
- package/dist/components/stories/Card.stories.d.ts +7 -0
- package/dist/components/stories/Card.stories.es.js +193 -0
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -1
- package/dist/components/stories/Checkbox.stories.es.js +41 -12
- package/dist/components/stories/DatePicker.stories.cjs.js +1 -1
- package/dist/components/stories/DatePicker.stories.es.js +1 -1
- package/dist/components/stories/Dialog.stories.cjs.js +1 -0
- package/dist/components/stories/Dialog.stories.d.ts +7 -0
- package/dist/components/stories/Dialog.stories.es.js +53 -0
- package/dist/components/stories/Divider.stories.cjs.js +1 -0
- package/dist/components/stories/Divider.stories.d.ts +6 -0
- package/dist/components/stories/Divider.stories.es.js +41 -0
- package/dist/components/stories/FormControlLabel.stories.cjs.js +1 -0
- package/dist/components/stories/FormControlLabel.stories.d.ts +9 -0
- package/dist/components/stories/FormControlLabel.stories.es.js +379 -0
- package/dist/components/stories/Heading.stories.cjs.js +1 -1
- package/dist/components/stories/Heading.stories.es.js +2 -2
- package/dist/components/stories/IconButton.stories.cjs.js +1 -1
- package/dist/components/stories/IconButton.stories.es.js +47 -11
- package/dist/components/stories/ImagePicker.stories.cjs.js +1 -0
- package/dist/components/stories/ImagePicker.stories.d.ts +6 -0
- package/dist/components/stories/ImagePicker.stories.es.js +50 -0
- package/dist/components/stories/Link.stories.cjs.js +1 -0
- package/dist/components/stories/Link.stories.d.ts +7 -0
- package/dist/components/stories/Link.stories.es.js +43 -0
- package/dist/components/stories/Menu.stories.cjs.js +1 -0
- package/dist/components/stories/Menu.stories.d.ts +7 -0
- package/dist/components/stories/Menu.stories.es.js +51 -0
- package/dist/components/stories/Paper.stories.cjs.js +1 -0
- package/dist/components/stories/Paper.stories.d.ts +7 -0
- package/dist/components/stories/Paper.stories.es.js +28 -0
- package/dist/components/stories/RadioGroup.stories.cjs.js +1 -1
- package/dist/components/stories/RadioGroup.stories.es.js +70 -371
- package/dist/components/stories/Select.stories.cjs.js +1 -1
- package/dist/components/stories/Select.stories.es.js +3 -3
- package/dist/components/stories/TabList.stories.cjs.js +1 -1
- package/dist/components/stories/TabList.stories.es.js +140 -90
- package/dist/components/stories/TextField.stories.cjs.js +1 -1
- package/dist/components/stories/TextField.stories.es.js +1 -1
- package/dist/components/stories/Tooltip.stories.cjs.js +1 -0
- package/dist/components/stories/Tooltip.stories.d.ts +7 -0
- package/dist/components/stories/Tooltip.stories.es.js +46 -0
- package/dist/components/stories/Typography.stories.cjs.js +1 -0
- package/dist/components/stories/Typography.stories.d.ts +6 -0
- package/dist/components/stories/Typography.stories.es.js +65 -0
- package/dist/createChainedFunction-C0nujS3O.js +9 -0
- package/dist/createChainedFunction-CJmlQuW8.cjs +1 -0
- package/dist/{createSvgIcon-DxbvMQd7.js → createSvgIcon-CeuAoIMQ.js} +6 -5
- package/dist/createSvgIcon-eUfAcV0x.cjs +1 -0
- package/dist/debounce-46wSf_lW.js +15 -0
- package/dist/debounce-DpCj7ugL.cjs +1 -0
- package/dist/dividerClasses-CSD96RzX.cjs +1 -0
- package/dist/dividerClasses-DrJ5oIdP.js +9 -0
- package/dist/elementTypeAcceptingRef-Cz_FeG92.cjs +1 -0
- package/dist/elementTypeAcceptingRef-HBfwF2vD.js +23 -0
- package/dist/extendSxProp-Fr1MMO0I.cjs +1 -0
- package/dist/{extendSxProp-XQwkK0m7.js → extendSxProp-NjjUyYdB.js} +1 -1
- package/dist/formControlState-CuX6WjAX.cjs +1 -0
- package/dist/formControlState-vgaj2ksH.js +10 -0
- package/dist/fr-ChrHtTbj.cjs +1 -0
- package/dist/fr-rmVQsNbI.js +312 -0
- package/dist/{identifier-BqadgaK7.js → generateUtilityClasses--6MLb_cS.js} +990 -956
- package/dist/generateUtilityClasses-DEQ18TAF.cjs +59 -0
- package/dist/{index-BUxqDIr9.js → index-B4GmPutS.js} +6 -5
- package/dist/index-BGCIdIru.js +2152 -0
- package/dist/index-BoQHt8iN.cjs +1 -0
- package/dist/index-CRdsZkOC.cjs +17 -0
- package/dist/index-CmEzEdk2.cjs +5 -0
- package/dist/index-XYfXmNqA.js +186 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +276 -262
- package/dist/isFocusVisible-CPZqtjv2.js +12 -0
- package/dist/isFocusVisible-DlSijby6.cjs +2 -0
- package/dist/isHostComponent-PydJW4A4.cjs +1 -0
- package/dist/isHostComponent-kiaBvYVo.js +6 -0
- package/dist/{memoTheme-B6o2KVgJ.cjs → memoTheme-D99chbOP.cjs} +1 -1
- package/dist/{memoTheme-DfGVDRrB.js → memoTheme-o8RCKrNG.js} +1 -1
- package/dist/mergeSlotProps-DSv3FKLb.cjs +1 -0
- package/dist/{resolveComponentProps-CxJ2yAJn.js → mergeSlotProps-KHPCviGJ.js} +7 -7
- package/dist/ownerDocument-4MViGo3k.cjs +1 -0
- package/dist/ownerDocument-CUrv0DIK.js +6 -0
- package/dist/ownerWindow-DDHucZi0.cjs +1 -0
- package/dist/ownerWindow-niciwP7I.js +7 -0
- package/dist/useEnhancedEffect-C9MKL5N4.cjs +1 -0
- package/dist/useEnhancedEffect-DlS7O_-p.js +7 -0
- package/dist/useForkRef-CTI33h-3.cjs +1 -0
- package/dist/useForkRef-C_4o__cU.js +15 -0
- package/dist/useSlot-DsW0udy9.cjs +1 -0
- package/dist/{useSlot-Co14PUn6.js → useSlot-eWxwpnv1.js} +2 -2
- package/dist/useSlotProps--FPRW1CI.cjs +1 -0
- package/dist/{index-CRT92bm7.js → useSlotProps-C7zjg7t9.js} +26 -26
- package/dist/useTheme-B1YEBlI0.cjs +1 -0
- package/dist/useTheme-BXzyKigM.js +11 -0
- package/dist/{useTheme-oM_SFWy4.js → useTheme-D0ITn2Re.js} +1 -1
- package/dist/useTheme-DFJNv-zn.cjs +1 -0
- package/dist/useThemeProps-BwyYDczI.cjs +1 -0
- package/dist/{useThemeProps-BlQ3SLfB.js → useThemeProps-DrCROxdY.js} +2 -2
- package/dist/{useThemeProps-FiA8ivG-.js → useThemeProps-DsDeaP0E.js} +3 -3
- package/dist/{useThemeProps-HLq2mDKk.cjs → useThemeProps-j-HQOOfB.cjs} +1 -1
- package/dist/{useTimeout-D16vpBhn.js → useTimeout-FkIxJmTC.js} +4 -4
- package/dist/useTimeout-NIA-3R5R.cjs +1 -0
- package/dist/utils-70jLtOQP.js +391 -0
- package/dist/utils-BWx1W_q1.cjs +1 -0
- package/dist/utils-DWqc1kRF.js +13 -0
- package/dist/utils-DlWHEABQ.cjs +1 -0
- package/package.json +5 -5
- package/dist/Backdrop-KAJqifAq.cjs +0 -1
- package/dist/Backdrop-RBPtVAPX.js +0 -744
- package/dist/Box-H49yQEt_.cjs +0 -1
- package/dist/Button-qc45QbX6.cjs +0 -1
- package/dist/ButtonBase-UEHzzfUL.cjs +0 -75
- package/dist/Checkbox-CuYTY0gd.cjs +0 -1
- package/dist/CircularProgress-BPHINMQw.cjs +0 -28
- package/dist/DatePicker-rhgpaD-r.cjs +0 -17
- package/dist/DatePicker-u4rtXGeo.js +0 -12791
- package/dist/DefaultPropsProvider-BrX6iuA3.cjs +0 -17
- package/dist/DefaultPropsProvider-CaRoy5OV.js +0 -484
- package/dist/FormGroup-BBYEQB4C.cjs +0 -1
- package/dist/FormGroup-BVtE8Mrv.js +0 -348
- package/dist/FormLabel-D8jYibc1.cjs +0 -2
- package/dist/IconButton-CVyLtjcH.cjs +0 -2
- package/dist/InputAdornment-BJfpEQAa.cjs +0 -1
- package/dist/InputBase-Ctmib7Br.cjs +0 -3
- package/dist/MenuItem-Els-vJZW.cjs +0 -1
- package/dist/Select-BlPQngVF.js +0 -4720
- package/dist/Select-ipcMZ4iK.cjs +0 -11
- package/dist/Stack-CEjx3KHM.cjs +0 -1
- package/dist/SwitchBase-URM3X3YZ.cjs +0 -1
- package/dist/Tabs-Nvk94RTW.cjs +0 -4
- package/dist/TextField-BVAkADOb.cjs +0 -1
- package/dist/Tooltip-DvPL2M0E.cjs +0 -100
- package/dist/Typography-5OodZ94T.cjs +0 -1
- package/dist/createSvgIcon-GU7fqNnI.cjs +0 -1
- package/dist/extendSxProp-D11-pC6h.cjs +0 -1
- package/dist/formControlState-DCkDUdfO.cjs +0 -1
- package/dist/formControlState-DdQP43Uo.js +0 -21
- package/dist/fr-B8_MxRl5.js +0 -307
- package/dist/fr-Nvp7C-vS.cjs +0 -1
- package/dist/identifier-BQH88SE0.cjs +0 -59
- package/dist/index-CNv8ppur.cjs +0 -1
- package/dist/index-D7nFYLYq.cjs +0 -1
- package/dist/ownerWindow-BoRkeomM.js +0 -23
- package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
- package/dist/refType-DlHf9HvO.js +0 -27
- package/dist/refType-Do7KaOvv.cjs +0 -1
- package/dist/resolveComponentProps-DTv6xPbb.cjs +0 -1
- package/dist/useForkRef-D-DyzOXj.js +0 -21
- package/dist/useForkRef-D81w5oMb.cjs +0 -1
- package/dist/useSlot-42jgZftI.cjs +0 -1
- package/dist/useTheme-CtT7O-Wk.js +0 -11
- package/dist/useTheme-cVN-YQNB.cjs +0 -1
- package/dist/useTheme-tZYpFplW.cjs +0 -1
- package/dist/useThemeProps-r0DnR8FJ.cjs +0 -1
- package/dist/useTimeout-DWEGwfTA.cjs +0 -1
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import * as c from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { m as
|
|
2
|
+
import { H as pt, I as ft, G as W, P as o } from "./generateUtilityClasses--6MLb_cS.js";
|
|
3
|
+
import { m as bt } from "./memoTheme-o8RCKrNG.js";
|
|
4
4
|
import { jsxs as q, jsx as x } from "react/jsx-runtime";
|
|
5
|
-
import { s as
|
|
6
|
-
import { B as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import {
|
|
12
|
-
import { u as
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
import { s as j, u as ht, c as mt } from "./DefaultPropsProvider-DUWovK-8.js";
|
|
6
|
+
import { B as Wt } from "./ButtonBase-CYkLbJ0U.js";
|
|
7
|
+
import { c as kt } from "./capitalize-NmHVRYy8.js";
|
|
8
|
+
import { a as oo } from "./useThemeProps-DsDeaP0E.js";
|
|
9
|
+
import { r as eo } from "./index-XYfXmNqA.js";
|
|
10
|
+
import { u as zt, a as rt } from "./useSlotProps-C7zjg7t9.js";
|
|
11
|
+
import { u as ro } from "./useTheme-BXzyKigM.js";
|
|
12
|
+
import { u as no, r as lo } from "./useEnhancedEffect-DlS7O_-p.js";
|
|
13
|
+
import { o as Dt } from "./ownerWindow-niciwP7I.js";
|
|
14
|
+
import { d as $t } from "./debounce-46wSf_lW.js";
|
|
15
|
+
import { a as dt } from "./useTimeout-FkIxJmTC.js";
|
|
16
|
+
import { c as At } from "./createSvgIcon-CeuAoIMQ.js";
|
|
17
|
+
import { o as so } from "./ownerDocument-CUrv0DIK.js";
|
|
18
|
+
function ao(e) {
|
|
19
|
+
return pt("MuiTab", e);
|
|
16
20
|
}
|
|
17
|
-
const T =
|
|
21
|
+
const T = ft("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper", "icon"]), io = (e) => {
|
|
18
22
|
const {
|
|
19
|
-
classes:
|
|
23
|
+
classes: t,
|
|
20
24
|
textColor: l,
|
|
21
25
|
fullWidth: d,
|
|
22
26
|
wrapped: i,
|
|
@@ -24,28 +28,28 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
24
28
|
label: b,
|
|
25
29
|
selected: h,
|
|
26
30
|
disabled: f
|
|
27
|
-
} =
|
|
28
|
-
root: ["root", u && b && "labelIcon", `textColor${
|
|
31
|
+
} = e, S = {
|
|
32
|
+
root: ["root", u && b && "labelIcon", `textColor${kt(l)}`, d && "fullWidth", i && "wrapped", h && "selected", f && "disabled"],
|
|
29
33
|
icon: ["iconWrapper", "icon"]
|
|
30
34
|
};
|
|
31
|
-
return
|
|
32
|
-
},
|
|
35
|
+
return mt(S, ao, t);
|
|
36
|
+
}, co = j(Wt, {
|
|
33
37
|
name: "MuiTab",
|
|
34
38
|
slot: "Root",
|
|
35
|
-
overridesResolver: (
|
|
39
|
+
overridesResolver: (e, t) => {
|
|
36
40
|
const {
|
|
37
41
|
ownerState: l
|
|
38
|
-
} =
|
|
39
|
-
return [
|
|
40
|
-
[`& .${T.iconWrapper}`]:
|
|
42
|
+
} = e;
|
|
43
|
+
return [t.root, l.label && l.icon && t.labelIcon, t[`textColor${kt(l.textColor)}`], l.fullWidth && t.fullWidth, l.wrapped && t.wrapped, {
|
|
44
|
+
[`& .${T.iconWrapper}`]: t.iconWrapper
|
|
41
45
|
}, {
|
|
42
|
-
[`& .${T.icon}`]:
|
|
46
|
+
[`& .${T.icon}`]: t.icon
|
|
43
47
|
}];
|
|
44
48
|
}
|
|
45
|
-
})(
|
|
46
|
-
theme:
|
|
49
|
+
})(bt(({
|
|
50
|
+
theme: e
|
|
47
51
|
}) => ({
|
|
48
|
-
...
|
|
52
|
+
...e.typography.button,
|
|
49
53
|
maxWidth: 360,
|
|
50
54
|
minWidth: 90,
|
|
51
55
|
position: "relative",
|
|
@@ -58,22 +62,22 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
58
62
|
lineHeight: 1.25,
|
|
59
63
|
variants: [{
|
|
60
64
|
props: ({
|
|
61
|
-
ownerState:
|
|
62
|
-
}) =>
|
|
65
|
+
ownerState: t
|
|
66
|
+
}) => t.label && (t.iconPosition === "top" || t.iconPosition === "bottom"),
|
|
63
67
|
style: {
|
|
64
68
|
flexDirection: "column"
|
|
65
69
|
}
|
|
66
70
|
}, {
|
|
67
71
|
props: ({
|
|
68
|
-
ownerState:
|
|
69
|
-
}) =>
|
|
72
|
+
ownerState: t
|
|
73
|
+
}) => t.label && t.iconPosition !== "top" && t.iconPosition !== "bottom",
|
|
70
74
|
style: {
|
|
71
75
|
flexDirection: "row"
|
|
72
76
|
}
|
|
73
77
|
}, {
|
|
74
78
|
props: ({
|
|
75
|
-
ownerState:
|
|
76
|
-
}) =>
|
|
79
|
+
ownerState: t
|
|
80
|
+
}) => t.icon && t.label,
|
|
77
81
|
style: {
|
|
78
82
|
minHeight: 72,
|
|
79
83
|
paddingTop: 9,
|
|
@@ -81,9 +85,9 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
81
85
|
}
|
|
82
86
|
}, {
|
|
83
87
|
props: ({
|
|
84
|
-
ownerState:
|
|
88
|
+
ownerState: t,
|
|
85
89
|
iconPosition: l
|
|
86
|
-
}) =>
|
|
90
|
+
}) => t.icon && t.label && l === "top",
|
|
87
91
|
style: {
|
|
88
92
|
[`& > .${T.icon}`]: {
|
|
89
93
|
marginBottom: 6
|
|
@@ -91,9 +95,9 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
91
95
|
}
|
|
92
96
|
}, {
|
|
93
97
|
props: ({
|
|
94
|
-
ownerState:
|
|
98
|
+
ownerState: t,
|
|
95
99
|
iconPosition: l
|
|
96
|
-
}) =>
|
|
100
|
+
}) => t.icon && t.label && l === "bottom",
|
|
97
101
|
style: {
|
|
98
102
|
[`& > .${T.icon}`]: {
|
|
99
103
|
marginTop: 6
|
|
@@ -101,22 +105,22 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
101
105
|
}
|
|
102
106
|
}, {
|
|
103
107
|
props: ({
|
|
104
|
-
ownerState:
|
|
108
|
+
ownerState: t,
|
|
105
109
|
iconPosition: l
|
|
106
|
-
}) =>
|
|
110
|
+
}) => t.icon && t.label && l === "start",
|
|
107
111
|
style: {
|
|
108
112
|
[`& > .${T.icon}`]: {
|
|
109
|
-
marginRight:
|
|
113
|
+
marginRight: e.spacing(1)
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
}, {
|
|
113
117
|
props: ({
|
|
114
|
-
ownerState:
|
|
118
|
+
ownerState: t,
|
|
115
119
|
iconPosition: l
|
|
116
|
-
}) =>
|
|
120
|
+
}) => t.icon && t.label && l === "end",
|
|
117
121
|
style: {
|
|
118
122
|
[`& > .${T.icon}`]: {
|
|
119
|
-
marginLeft:
|
|
123
|
+
marginLeft: e.spacing(1)
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
126
|
}, {
|
|
@@ -131,7 +135,7 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
131
135
|
opacity: 1
|
|
132
136
|
},
|
|
133
137
|
[`&.${T.disabled}`]: {
|
|
134
|
-
opacity: (
|
|
138
|
+
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
135
139
|
}
|
|
136
140
|
}
|
|
137
141
|
}, {
|
|
@@ -139,12 +143,12 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
139
143
|
textColor: "primary"
|
|
140
144
|
},
|
|
141
145
|
style: {
|
|
142
|
-
color: (
|
|
146
|
+
color: (e.vars || e).palette.text.secondary,
|
|
143
147
|
[`&.${T.selected}`]: {
|
|
144
|
-
color: (
|
|
148
|
+
color: (e.vars || e).palette.primary.main
|
|
145
149
|
},
|
|
146
150
|
[`&.${T.disabled}`]: {
|
|
147
|
-
color: (
|
|
151
|
+
color: (e.vars || e).palette.text.disabled
|
|
148
152
|
}
|
|
149
153
|
}
|
|
150
154
|
}, {
|
|
@@ -152,18 +156,18 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
152
156
|
textColor: "secondary"
|
|
153
157
|
},
|
|
154
158
|
style: {
|
|
155
|
-
color: (
|
|
159
|
+
color: (e.vars || e).palette.text.secondary,
|
|
156
160
|
[`&.${T.selected}`]: {
|
|
157
|
-
color: (
|
|
161
|
+
color: (e.vars || e).palette.secondary.main
|
|
158
162
|
},
|
|
159
163
|
[`&.${T.disabled}`]: {
|
|
160
|
-
color: (
|
|
164
|
+
color: (e.vars || e).palette.text.disabled
|
|
161
165
|
}
|
|
162
166
|
}
|
|
163
167
|
}, {
|
|
164
168
|
props: ({
|
|
165
|
-
ownerState:
|
|
166
|
-
}) =>
|
|
169
|
+
ownerState: t
|
|
170
|
+
}) => t.fullWidth,
|
|
167
171
|
style: {
|
|
168
172
|
flexShrink: 1,
|
|
169
173
|
flexGrow: 1,
|
|
@@ -172,15 +176,15 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
172
176
|
}
|
|
173
177
|
}, {
|
|
174
178
|
props: ({
|
|
175
|
-
ownerState:
|
|
176
|
-
}) =>
|
|
179
|
+
ownerState: t
|
|
180
|
+
}) => t.wrapped,
|
|
177
181
|
style: {
|
|
178
|
-
fontSize:
|
|
182
|
+
fontSize: e.typography.pxToRem(12)
|
|
179
183
|
}
|
|
180
184
|
}]
|
|
181
|
-
}))),
|
|
182
|
-
const d =
|
|
183
|
-
props:
|
|
185
|
+
}))), uo = /* @__PURE__ */ c.forwardRef(function(t, l) {
|
|
186
|
+
const d = ht({
|
|
187
|
+
props: t,
|
|
184
188
|
name: "MuiTab"
|
|
185
189
|
}), {
|
|
186
190
|
className: i,
|
|
@@ -201,9 +205,9 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
201
205
|
// eslint-disable-next-line react/prop-types
|
|
202
206
|
selectionFollowsFocus: g,
|
|
203
207
|
// eslint-disable-next-line react/prop-types
|
|
204
|
-
textColor:
|
|
208
|
+
textColor: L = "inherit",
|
|
205
209
|
value: M,
|
|
206
|
-
wrapped:
|
|
210
|
+
wrapped: nt = !1,
|
|
207
211
|
...H
|
|
208
212
|
} = d, U = {
|
|
209
213
|
...d,
|
|
@@ -214,16 +218,16 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
214
218
|
iconPosition: S,
|
|
215
219
|
label: !!y,
|
|
216
220
|
fullWidth: h,
|
|
217
|
-
textColor:
|
|
218
|
-
wrapped:
|
|
219
|
-
}, V =
|
|
221
|
+
textColor: L,
|
|
222
|
+
wrapped: nt
|
|
223
|
+
}, V = io(U), z = f && y && /* @__PURE__ */ c.isValidElement(f) ? /* @__PURE__ */ c.cloneElement(f, {
|
|
220
224
|
className: W(V.icon, f.props.className)
|
|
221
225
|
}) : f, G = (R) => {
|
|
222
226
|
!I && m && m(R, M), C && C(R);
|
|
223
227
|
}, N = (R) => {
|
|
224
228
|
g && !I && m && m(R, M), k && k(R);
|
|
225
229
|
};
|
|
226
|
-
return /* @__PURE__ */ q(
|
|
230
|
+
return /* @__PURE__ */ q(co, {
|
|
227
231
|
focusRipple: !b,
|
|
228
232
|
className: W(V.root, i),
|
|
229
233
|
ref: l,
|
|
@@ -242,7 +246,7 @@ const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrima
|
|
|
242
246
|
}), v]
|
|
243
247
|
});
|
|
244
248
|
});
|
|
245
|
-
process.env.NODE_ENV !== "production" && (
|
|
249
|
+
process.env.NODE_ENV !== "production" && (uo.propTypes = {
|
|
246
250
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
247
251
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
248
252
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -251,25 +255,25 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
|
|
|
251
255
|
* This prop isn't supported.
|
|
252
256
|
* Use the `component` prop if you need to change the children structure.
|
|
253
257
|
*/
|
|
254
|
-
children:
|
|
258
|
+
children: oo,
|
|
255
259
|
/**
|
|
256
260
|
* Override or extend the styles applied to the component.
|
|
257
261
|
*/
|
|
258
|
-
classes:
|
|
262
|
+
classes: o.object,
|
|
259
263
|
/**
|
|
260
264
|
* @ignore
|
|
261
265
|
*/
|
|
262
|
-
className:
|
|
266
|
+
className: o.string,
|
|
263
267
|
/**
|
|
264
268
|
* If `true`, the component is disabled.
|
|
265
269
|
* @default false
|
|
266
270
|
*/
|
|
267
|
-
disabled:
|
|
271
|
+
disabled: o.bool,
|
|
268
272
|
/**
|
|
269
273
|
* If `true`, the keyboard focus ripple is disabled.
|
|
270
274
|
* @default false
|
|
271
275
|
*/
|
|
272
|
-
disableFocusRipple:
|
|
276
|
+
disableFocusRipple: o.bool,
|
|
273
277
|
/**
|
|
274
278
|
* If `true`, the ripple effect is disabled.
|
|
275
279
|
*
|
|
@@ -277,64 +281,64 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
|
|
|
277
281
|
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
278
282
|
* @default false
|
|
279
283
|
*/
|
|
280
|
-
disableRipple:
|
|
284
|
+
disableRipple: o.bool,
|
|
281
285
|
/**
|
|
282
286
|
* The icon to display.
|
|
283
287
|
*/
|
|
284
|
-
icon:
|
|
288
|
+
icon: o.oneOfType([o.element, o.string]),
|
|
285
289
|
/**
|
|
286
290
|
* The position of the icon relative to the label.
|
|
287
291
|
* @default 'top'
|
|
288
292
|
*/
|
|
289
|
-
iconPosition:
|
|
293
|
+
iconPosition: o.oneOf(["bottom", "end", "start", "top"]),
|
|
290
294
|
/**
|
|
291
295
|
* The label element.
|
|
292
296
|
*/
|
|
293
|
-
label:
|
|
297
|
+
label: o.node,
|
|
294
298
|
/**
|
|
295
299
|
* @ignore
|
|
296
300
|
*/
|
|
297
|
-
onChange:
|
|
301
|
+
onChange: o.func,
|
|
298
302
|
/**
|
|
299
303
|
* @ignore
|
|
300
304
|
*/
|
|
301
|
-
onClick:
|
|
305
|
+
onClick: o.func,
|
|
302
306
|
/**
|
|
303
307
|
* @ignore
|
|
304
308
|
*/
|
|
305
|
-
onFocus:
|
|
309
|
+
onFocus: o.func,
|
|
306
310
|
/**
|
|
307
311
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
308
312
|
*/
|
|
309
|
-
sx:
|
|
313
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
310
314
|
/**
|
|
311
315
|
* You can provide your own value. Otherwise, we fallback to the child position index.
|
|
312
316
|
*/
|
|
313
|
-
value:
|
|
317
|
+
value: o.any,
|
|
314
318
|
/**
|
|
315
319
|
* Tab labels appear in a single row.
|
|
316
320
|
* They can use a second line if needed.
|
|
317
321
|
* @default false
|
|
318
322
|
*/
|
|
319
|
-
wrapped:
|
|
323
|
+
wrapped: o.bool
|
|
320
324
|
});
|
|
321
|
-
const
|
|
325
|
+
const po = At(/* @__PURE__ */ x("path", {
|
|
322
326
|
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
323
|
-
}), "KeyboardArrowLeft"),
|
|
327
|
+
}), "KeyboardArrowLeft"), fo = At(/* @__PURE__ */ x("path", {
|
|
324
328
|
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
325
329
|
}), "KeyboardArrowRight");
|
|
326
|
-
function
|
|
327
|
-
return (1 + Math.sin(Math.PI *
|
|
330
|
+
function bo(e) {
|
|
331
|
+
return (1 + Math.sin(Math.PI * e - Math.PI / 2)) / 2;
|
|
328
332
|
}
|
|
329
|
-
function
|
|
333
|
+
function ho(e, t, l, d = {}, i = () => {
|
|
330
334
|
}) {
|
|
331
335
|
const {
|
|
332
|
-
ease: u =
|
|
336
|
+
ease: u = bo,
|
|
333
337
|
duration: b = 300
|
|
334
338
|
// standard
|
|
335
339
|
} = d;
|
|
336
340
|
let h = null;
|
|
337
|
-
const f = e
|
|
341
|
+
const f = t[e];
|
|
338
342
|
let S = !1;
|
|
339
343
|
const v = () => {
|
|
340
344
|
S = !0;
|
|
@@ -345,7 +349,7 @@ function bt(o, e, l, d = {}, i = () => {
|
|
|
345
349
|
}
|
|
346
350
|
h === null && (h = m);
|
|
347
351
|
const C = Math.min(1, (m - h) / b);
|
|
348
|
-
if (e
|
|
352
|
+
if (t[e] = u(C) * (l - f) + f, C >= 1) {
|
|
349
353
|
requestAnimationFrame(() => {
|
|
350
354
|
i(null);
|
|
351
355
|
});
|
|
@@ -355,65 +359,65 @@ function bt(o, e, l, d = {}, i = () => {
|
|
|
355
359
|
};
|
|
356
360
|
return f === l ? (i(new Error("Element already at target position")), v) : (requestAnimationFrame(y), v);
|
|
357
361
|
}
|
|
358
|
-
const
|
|
362
|
+
const mo = {
|
|
359
363
|
width: 99,
|
|
360
364
|
height: 99,
|
|
361
365
|
position: "absolute",
|
|
362
366
|
top: -9999,
|
|
363
367
|
overflow: "scroll"
|
|
364
368
|
};
|
|
365
|
-
function
|
|
369
|
+
function Ft(e) {
|
|
366
370
|
const {
|
|
367
|
-
onChange:
|
|
371
|
+
onChange: t,
|
|
368
372
|
...l
|
|
369
|
-
} =
|
|
373
|
+
} = e, d = c.useRef(), i = c.useRef(null), u = () => {
|
|
370
374
|
d.current = i.current.offsetHeight - i.current.clientHeight;
|
|
371
375
|
};
|
|
372
|
-
return
|
|
373
|
-
const b = $
|
|
376
|
+
return no(() => {
|
|
377
|
+
const b = $t(() => {
|
|
374
378
|
const f = d.current;
|
|
375
|
-
u(), f !== d.current &&
|
|
376
|
-
}), h =
|
|
379
|
+
u(), f !== d.current && t(d.current);
|
|
380
|
+
}), h = Dt(i.current);
|
|
377
381
|
return h.addEventListener("resize", b), () => {
|
|
378
382
|
b.clear(), h.removeEventListener("resize", b);
|
|
379
383
|
};
|
|
380
|
-
}, [
|
|
381
|
-
u(),
|
|
382
|
-
}, [
|
|
383
|
-
style:
|
|
384
|
+
}, [t]), c.useEffect(() => {
|
|
385
|
+
u(), t(d.current);
|
|
386
|
+
}, [t]), /* @__PURE__ */ x("div", {
|
|
387
|
+
style: mo,
|
|
384
388
|
ref: i,
|
|
385
389
|
...l
|
|
386
390
|
});
|
|
387
391
|
}
|
|
388
|
-
process.env.NODE_ENV !== "production" && (
|
|
389
|
-
onChange:
|
|
392
|
+
process.env.NODE_ENV !== "production" && (Ft.propTypes = {
|
|
393
|
+
onChange: o.func.isRequired
|
|
390
394
|
});
|
|
391
|
-
function
|
|
392
|
-
return
|
|
395
|
+
function So(e) {
|
|
396
|
+
return pt("MuiTabScrollButton", e);
|
|
393
397
|
}
|
|
394
|
-
const
|
|
398
|
+
const vo = ft("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), yo = (e) => {
|
|
395
399
|
const {
|
|
396
|
-
classes:
|
|
400
|
+
classes: t,
|
|
397
401
|
orientation: l,
|
|
398
402
|
disabled: d
|
|
399
|
-
} =
|
|
400
|
-
return
|
|
403
|
+
} = e;
|
|
404
|
+
return mt({
|
|
401
405
|
root: ["root", l, d && "disabled"]
|
|
402
|
-
},
|
|
403
|
-
},
|
|
406
|
+
}, So, t);
|
|
407
|
+
}, go = j(Wt, {
|
|
404
408
|
name: "MuiTabScrollButton",
|
|
405
409
|
slot: "Root",
|
|
406
|
-
overridesResolver: (
|
|
410
|
+
overridesResolver: (e, t) => {
|
|
407
411
|
const {
|
|
408
412
|
ownerState: l
|
|
409
|
-
} =
|
|
410
|
-
return [
|
|
413
|
+
} = e;
|
|
414
|
+
return [t.root, l.orientation && t[l.orientation]];
|
|
411
415
|
}
|
|
412
416
|
})({
|
|
413
417
|
width: 40,
|
|
414
418
|
flexShrink: 0,
|
|
415
419
|
opacity: 0.8,
|
|
416
|
-
[`&.${
|
|
420
|
+
[`&.${vo.disabled}`]: {
|
|
417
421
|
opacity: 0
|
|
418
422
|
},
|
|
419
423
|
variants: [{
|
|
@@ -428,9 +432,9 @@ const St = fe("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
428
432
|
}
|
|
429
433
|
}
|
|
430
434
|
}]
|
|
431
|
-
}),
|
|
432
|
-
const d =
|
|
433
|
-
props:
|
|
435
|
+
}), jt = /* @__PURE__ */ c.forwardRef(function(t, l) {
|
|
436
|
+
const d = ht({
|
|
437
|
+
props: t,
|
|
434
438
|
name: "MuiTabScrollButton"
|
|
435
439
|
}), {
|
|
436
440
|
className: i,
|
|
@@ -440,17 +444,17 @@ const St = fe("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
440
444
|
orientation: f,
|
|
441
445
|
disabled: S,
|
|
442
446
|
...v
|
|
443
|
-
} = d, y =
|
|
447
|
+
} = d, y = zt(), m = {
|
|
444
448
|
isRtl: y,
|
|
445
449
|
...d
|
|
446
|
-
}, C =
|
|
450
|
+
}, C = yo(m), k = u.StartScrollButtonIcon ?? po, I = u.EndScrollButtonIcon ?? fo, g = rt({
|
|
447
451
|
elementType: k,
|
|
448
452
|
externalSlotProps: b.startScrollButtonIcon,
|
|
449
453
|
additionalProps: {
|
|
450
454
|
fontSize: "small"
|
|
451
455
|
},
|
|
452
456
|
ownerState: m
|
|
453
|
-
}),
|
|
457
|
+
}), L = rt({
|
|
454
458
|
elementType: I,
|
|
455
459
|
externalSlotProps: b.endScrollButtonIcon,
|
|
456
460
|
additionalProps: {
|
|
@@ -458,7 +462,7 @@ const St = fe("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
458
462
|
},
|
|
459
463
|
ownerState: m
|
|
460
464
|
});
|
|
461
|
-
return /* @__PURE__ */ x(
|
|
465
|
+
return /* @__PURE__ */ x(go, {
|
|
462
466
|
component: "div",
|
|
463
467
|
className: W(C.root, i),
|
|
464
468
|
ref: l,
|
|
@@ -475,11 +479,11 @@ const St = fe("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled
|
|
|
475
479
|
children: h === "left" ? /* @__PURE__ */ x(k, {
|
|
476
480
|
...g
|
|
477
481
|
}) : /* @__PURE__ */ x(I, {
|
|
478
|
-
...
|
|
482
|
+
...L
|
|
479
483
|
})
|
|
480
484
|
});
|
|
481
485
|
});
|
|
482
|
-
process.env.NODE_ENV !== "production" && (
|
|
486
|
+
process.env.NODE_ENV !== "production" && (jt.propTypes = {
|
|
483
487
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
484
488
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
485
489
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -487,76 +491,76 @@ process.env.NODE_ENV !== "production" && (Le.propTypes = {
|
|
|
487
491
|
/**
|
|
488
492
|
* The content of the component.
|
|
489
493
|
*/
|
|
490
|
-
children:
|
|
494
|
+
children: o.node,
|
|
491
495
|
/**
|
|
492
496
|
* Override or extend the styles applied to the component.
|
|
493
497
|
*/
|
|
494
|
-
classes:
|
|
498
|
+
classes: o.object,
|
|
495
499
|
/**
|
|
496
500
|
* @ignore
|
|
497
501
|
*/
|
|
498
|
-
className:
|
|
502
|
+
className: o.string,
|
|
499
503
|
/**
|
|
500
504
|
* The direction the button should indicate.
|
|
501
505
|
*/
|
|
502
|
-
direction:
|
|
506
|
+
direction: o.oneOf(["left", "right"]).isRequired,
|
|
503
507
|
/**
|
|
504
508
|
* If `true`, the component is disabled.
|
|
505
509
|
* @default false
|
|
506
510
|
*/
|
|
507
|
-
disabled:
|
|
511
|
+
disabled: o.bool,
|
|
508
512
|
/**
|
|
509
513
|
* The component orientation (layout flow direction).
|
|
510
514
|
*/
|
|
511
|
-
orientation:
|
|
515
|
+
orientation: o.oneOf(["horizontal", "vertical"]).isRequired,
|
|
512
516
|
/**
|
|
513
517
|
* The extra props for the slot components.
|
|
514
518
|
* You can override the existing props or add new ones.
|
|
515
519
|
* @default {}
|
|
516
520
|
*/
|
|
517
|
-
slotProps:
|
|
518
|
-
endScrollButtonIcon:
|
|
519
|
-
startScrollButtonIcon:
|
|
521
|
+
slotProps: o.shape({
|
|
522
|
+
endScrollButtonIcon: o.oneOfType([o.func, o.object]),
|
|
523
|
+
startScrollButtonIcon: o.oneOfType([o.func, o.object])
|
|
520
524
|
}),
|
|
521
525
|
/**
|
|
522
526
|
* The components used for each slot inside.
|
|
523
527
|
* @default {}
|
|
524
528
|
*/
|
|
525
|
-
slots:
|
|
526
|
-
EndScrollButtonIcon:
|
|
527
|
-
StartScrollButtonIcon:
|
|
529
|
+
slots: o.shape({
|
|
530
|
+
EndScrollButtonIcon: o.elementType,
|
|
531
|
+
StartScrollButtonIcon: o.elementType
|
|
528
532
|
}),
|
|
529
533
|
/**
|
|
530
534
|
* @ignore
|
|
531
535
|
*/
|
|
532
|
-
style:
|
|
536
|
+
style: o.object,
|
|
533
537
|
/**
|
|
534
538
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
535
539
|
*/
|
|
536
|
-
sx:
|
|
540
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
537
541
|
});
|
|
538
|
-
function
|
|
539
|
-
return
|
|
542
|
+
function To(e) {
|
|
543
|
+
return pt("MuiTabs", e);
|
|
540
544
|
}
|
|
541
|
-
const
|
|
542
|
-
let d = !1, i = l(
|
|
545
|
+
const ut = ft("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), Rt = (e, t) => e === t ? e.firstChild : t && t.nextElementSibling ? t.nextElementSibling : e.firstChild, Ot = (e, t) => e === t ? e.lastChild : t && t.previousElementSibling ? t.previousElementSibling : e.lastChild, et = (e, t, l) => {
|
|
546
|
+
let d = !1, i = l(e, t);
|
|
543
547
|
for (; i; ) {
|
|
544
|
-
if (i ===
|
|
548
|
+
if (i === e.firstChild) {
|
|
545
549
|
if (d)
|
|
546
550
|
return;
|
|
547
551
|
d = !0;
|
|
548
552
|
}
|
|
549
553
|
const u = i.disabled || i.getAttribute("aria-disabled") === "true";
|
|
550
554
|
if (!i.hasAttribute("tabindex") || u)
|
|
551
|
-
i = l(
|
|
555
|
+
i = l(e, i);
|
|
552
556
|
else {
|
|
553
557
|
i.focus();
|
|
554
558
|
return;
|
|
555
559
|
}
|
|
556
560
|
}
|
|
557
|
-
},
|
|
561
|
+
}, wo = (e) => {
|
|
558
562
|
const {
|
|
559
|
-
vertical:
|
|
563
|
+
vertical: t,
|
|
560
564
|
fixed: l,
|
|
561
565
|
hideScrollbar: d,
|
|
562
566
|
scrollableX: i,
|
|
@@ -564,31 +568,31 @@ const ue = fe("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
564
568
|
centered: b,
|
|
565
569
|
scrollButtonsHideMobile: h,
|
|
566
570
|
classes: f
|
|
567
|
-
} =
|
|
568
|
-
return
|
|
569
|
-
root: ["root",
|
|
571
|
+
} = e;
|
|
572
|
+
return mt({
|
|
573
|
+
root: ["root", t && "vertical"],
|
|
570
574
|
scroller: ["scroller", l && "fixed", d && "hideScrollbar", i && "scrollableX", u && "scrollableY"],
|
|
571
|
-
flexContainer: ["flexContainer",
|
|
575
|
+
flexContainer: ["flexContainer", t && "flexContainerVertical", b && "centered"],
|
|
572
576
|
indicator: ["indicator"],
|
|
573
577
|
scrollButtons: ["scrollButtons", h && "scrollButtonsHideMobile"],
|
|
574
578
|
scrollableX: [i && "scrollableX"],
|
|
575
579
|
hideScrollbar: [d && "hideScrollbar"]
|
|
576
|
-
},
|
|
577
|
-
},
|
|
580
|
+
}, To, f);
|
|
581
|
+
}, Bo = j("div", {
|
|
578
582
|
name: "MuiTabs",
|
|
579
583
|
slot: "Root",
|
|
580
|
-
overridesResolver: (
|
|
584
|
+
overridesResolver: (e, t) => {
|
|
581
585
|
const {
|
|
582
586
|
ownerState: l
|
|
583
|
-
} =
|
|
587
|
+
} = e;
|
|
584
588
|
return [{
|
|
585
|
-
[`& .${
|
|
589
|
+
[`& .${ut.scrollButtons}`]: t.scrollButtons
|
|
586
590
|
}, {
|
|
587
|
-
[`& .${
|
|
588
|
-
},
|
|
591
|
+
[`& .${ut.scrollButtons}`]: l.scrollButtonsHideMobile && t.scrollButtonsHideMobile
|
|
592
|
+
}, t.root, l.vertical && t.vertical];
|
|
589
593
|
}
|
|
590
|
-
})(
|
|
591
|
-
theme:
|
|
594
|
+
})(bt(({
|
|
595
|
+
theme: e
|
|
592
596
|
}) => ({
|
|
593
597
|
overflow: "hidden",
|
|
594
598
|
minHeight: 48,
|
|
@@ -597,31 +601,31 @@ const ue = fe("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
597
601
|
display: "flex",
|
|
598
602
|
variants: [{
|
|
599
603
|
props: ({
|
|
600
|
-
ownerState:
|
|
601
|
-
}) =>
|
|
604
|
+
ownerState: t
|
|
605
|
+
}) => t.vertical,
|
|
602
606
|
style: {
|
|
603
607
|
flexDirection: "column"
|
|
604
608
|
}
|
|
605
609
|
}, {
|
|
606
610
|
props: ({
|
|
607
|
-
ownerState:
|
|
608
|
-
}) =>
|
|
611
|
+
ownerState: t
|
|
612
|
+
}) => t.scrollButtonsHideMobile,
|
|
609
613
|
style: {
|
|
610
|
-
[`& .${
|
|
611
|
-
[
|
|
614
|
+
[`& .${ut.scrollButtons}`]: {
|
|
615
|
+
[e.breakpoints.down("sm")]: {
|
|
612
616
|
display: "none"
|
|
613
617
|
}
|
|
614
618
|
}
|
|
615
619
|
}
|
|
616
620
|
}]
|
|
617
|
-
}))),
|
|
621
|
+
}))), xo = j("div", {
|
|
618
622
|
name: "MuiTabs",
|
|
619
623
|
slot: "Scroller",
|
|
620
|
-
overridesResolver: (
|
|
624
|
+
overridesResolver: (e, t) => {
|
|
621
625
|
const {
|
|
622
626
|
ownerState: l
|
|
623
|
-
} =
|
|
624
|
-
return [
|
|
627
|
+
} = e;
|
|
628
|
+
return [t.scroller, l.fixed && t.fixed, l.hideScrollbar && t.hideScrollbar, l.scrollableX && t.scrollableX, l.scrollableY && t.scrollableY];
|
|
625
629
|
}
|
|
626
630
|
})({
|
|
627
631
|
position: "relative",
|
|
@@ -630,16 +634,16 @@ const ue = fe("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
630
634
|
whiteSpace: "nowrap",
|
|
631
635
|
variants: [{
|
|
632
636
|
props: ({
|
|
633
|
-
ownerState:
|
|
634
|
-
}) =>
|
|
637
|
+
ownerState: e
|
|
638
|
+
}) => e.fixed,
|
|
635
639
|
style: {
|
|
636
640
|
overflowX: "hidden",
|
|
637
641
|
width: "100%"
|
|
638
642
|
}
|
|
639
643
|
}, {
|
|
640
644
|
props: ({
|
|
641
|
-
ownerState:
|
|
642
|
-
}) =>
|
|
645
|
+
ownerState: e
|
|
646
|
+
}) => e.hideScrollbar,
|
|
643
647
|
style: {
|
|
644
648
|
// Hide dimensionless scrollbar on macOS
|
|
645
649
|
scrollbarWidth: "none",
|
|
@@ -651,84 +655,84 @@ const ue = fe("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
651
655
|
}
|
|
652
656
|
}, {
|
|
653
657
|
props: ({
|
|
654
|
-
ownerState:
|
|
655
|
-
}) =>
|
|
658
|
+
ownerState: e
|
|
659
|
+
}) => e.scrollableX,
|
|
656
660
|
style: {
|
|
657
661
|
overflowX: "auto",
|
|
658
662
|
overflowY: "hidden"
|
|
659
663
|
}
|
|
660
664
|
}, {
|
|
661
665
|
props: ({
|
|
662
|
-
ownerState:
|
|
663
|
-
}) =>
|
|
666
|
+
ownerState: e
|
|
667
|
+
}) => e.scrollableY,
|
|
664
668
|
style: {
|
|
665
669
|
overflowY: "auto",
|
|
666
670
|
overflowX: "hidden"
|
|
667
671
|
}
|
|
668
672
|
}]
|
|
669
|
-
}),
|
|
673
|
+
}), Co = j("div", {
|
|
670
674
|
name: "MuiTabs",
|
|
671
675
|
slot: "FlexContainer",
|
|
672
|
-
overridesResolver: (
|
|
676
|
+
overridesResolver: (e, t) => {
|
|
673
677
|
const {
|
|
674
678
|
ownerState: l
|
|
675
|
-
} =
|
|
676
|
-
return [
|
|
679
|
+
} = e;
|
|
680
|
+
return [t.flexContainer, l.vertical && t.flexContainerVertical, l.centered && t.centered];
|
|
677
681
|
}
|
|
678
682
|
})({
|
|
679
683
|
display: "flex",
|
|
680
684
|
variants: [{
|
|
681
685
|
props: ({
|
|
682
|
-
ownerState:
|
|
683
|
-
}) =>
|
|
686
|
+
ownerState: e
|
|
687
|
+
}) => e.vertical,
|
|
684
688
|
style: {
|
|
685
689
|
flexDirection: "column"
|
|
686
690
|
}
|
|
687
691
|
}, {
|
|
688
692
|
props: ({
|
|
689
|
-
ownerState:
|
|
690
|
-
}) =>
|
|
693
|
+
ownerState: e
|
|
694
|
+
}) => e.centered,
|
|
691
695
|
style: {
|
|
692
696
|
justifyContent: "center"
|
|
693
697
|
}
|
|
694
698
|
}]
|
|
695
|
-
}),
|
|
699
|
+
}), Io = j("span", {
|
|
696
700
|
name: "MuiTabs",
|
|
697
701
|
slot: "Indicator",
|
|
698
|
-
overridesResolver: (
|
|
699
|
-
})(
|
|
700
|
-
theme:
|
|
702
|
+
overridesResolver: (e, t) => t.indicator
|
|
703
|
+
})(bt(({
|
|
704
|
+
theme: e
|
|
701
705
|
}) => ({
|
|
702
706
|
position: "absolute",
|
|
703
707
|
height: 2,
|
|
704
708
|
bottom: 0,
|
|
705
709
|
width: "100%",
|
|
706
|
-
transition:
|
|
710
|
+
transition: e.transitions.create(),
|
|
707
711
|
variants: [{
|
|
708
712
|
props: {
|
|
709
713
|
indicatorColor: "primary"
|
|
710
714
|
},
|
|
711
715
|
style: {
|
|
712
|
-
backgroundColor: (
|
|
716
|
+
backgroundColor: (e.vars || e).palette.primary.main
|
|
713
717
|
}
|
|
714
718
|
}, {
|
|
715
719
|
props: {
|
|
716
720
|
indicatorColor: "secondary"
|
|
717
721
|
},
|
|
718
722
|
style: {
|
|
719
|
-
backgroundColor: (
|
|
723
|
+
backgroundColor: (e.vars || e).palette.secondary.main
|
|
720
724
|
}
|
|
721
725
|
}, {
|
|
722
726
|
props: ({
|
|
723
|
-
ownerState:
|
|
724
|
-
}) =>
|
|
727
|
+
ownerState: t
|
|
728
|
+
}) => t.vertical,
|
|
725
729
|
style: {
|
|
726
730
|
height: "100%",
|
|
727
731
|
width: 2,
|
|
728
732
|
right: 0
|
|
729
733
|
}
|
|
730
734
|
}]
|
|
731
|
-
}))),
|
|
735
|
+
}))), Eo = j(Ft)({
|
|
732
736
|
overflowX: "auto",
|
|
733
737
|
overflowY: "hidden",
|
|
734
738
|
// Hide dimensionless scrollbar on macOS
|
|
@@ -738,13 +742,13 @@ const ue = fe("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVer
|
|
|
738
742
|
display: "none"
|
|
739
743
|
// Safari + Chrome
|
|
740
744
|
}
|
|
741
|
-
}),
|
|
742
|
-
let
|
|
743
|
-
const
|
|
744
|
-
const d =
|
|
745
|
-
props:
|
|
745
|
+
}), Nt = {};
|
|
746
|
+
let Pt = !1;
|
|
747
|
+
const Mo = /* @__PURE__ */ c.forwardRef(function(t, l) {
|
|
748
|
+
const d = ht({
|
|
749
|
+
props: t,
|
|
746
750
|
name: "MuiTabs"
|
|
747
|
-
}), i =
|
|
751
|
+
}), i = ro(), u = zt(), {
|
|
748
752
|
"aria-label": b,
|
|
749
753
|
"aria-labelledby": h,
|
|
750
754
|
action: f,
|
|
@@ -756,9 +760,9 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
756
760
|
indicatorColor: k = "primary",
|
|
757
761
|
onChange: I,
|
|
758
762
|
orientation: g = "horizontal",
|
|
759
|
-
ScrollButtonComponent:
|
|
763
|
+
ScrollButtonComponent: L = jt,
|
|
760
764
|
scrollButtons: M = "auto",
|
|
761
|
-
selectionFollowsFocus:
|
|
765
|
+
selectionFollowsFocus: nt,
|
|
762
766
|
slots: H = {},
|
|
763
767
|
slotProps: U = {},
|
|
764
768
|
TabIndicatorProps: V = {},
|
|
@@ -766,9 +770,9 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
766
770
|
textColor: G = "primary",
|
|
767
771
|
value: N,
|
|
768
772
|
variant: R = "standard",
|
|
769
|
-
visibleScrollbar:
|
|
770
|
-
...
|
|
771
|
-
} = d, w = R === "scrollable", B = g === "vertical", X = B ? "scrollTop" : "scrollLeft", J = B ? "top" : "left", Q = B ? "bottom" : "right",
|
|
773
|
+
visibleScrollbar: lt = !1,
|
|
774
|
+
...Lt
|
|
775
|
+
} = d, w = R === "scrollable", B = g === "vertical", X = B ? "scrollTop" : "scrollLeft", J = B ? "top" : "left", Q = B ? "bottom" : "right", st = B ? "clientHeight" : "clientWidth", Y = B ? "height" : "width", D = {
|
|
772
776
|
...d,
|
|
773
777
|
component: m,
|
|
774
778
|
allowScrollButtonsMobile: C,
|
|
@@ -778,27 +782,27 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
778
782
|
scrollButtons: M,
|
|
779
783
|
textColor: G,
|
|
780
784
|
variant: R,
|
|
781
|
-
visibleScrollbar:
|
|
785
|
+
visibleScrollbar: lt,
|
|
782
786
|
fixed: !w,
|
|
783
|
-
hideScrollbar: w && !
|
|
787
|
+
hideScrollbar: w && !lt,
|
|
784
788
|
scrollableX: w && !B,
|
|
785
789
|
scrollableY: w && B,
|
|
786
790
|
centered: S && !w,
|
|
787
791
|
scrollButtonsHideMobile: !C
|
|
788
|
-
}, P =
|
|
792
|
+
}, P = wo(D), Ht = rt({
|
|
789
793
|
elementType: H.StartScrollButtonIcon,
|
|
790
794
|
externalSlotProps: U.startScrollButtonIcon,
|
|
791
795
|
ownerState: D
|
|
792
|
-
}),
|
|
796
|
+
}), Vt = rt({
|
|
793
797
|
elementType: H.EndScrollButtonIcon,
|
|
794
798
|
externalSlotProps: U.endScrollButtonIcon,
|
|
795
799
|
ownerState: D
|
|
796
800
|
});
|
|
797
801
|
process.env.NODE_ENV !== "production" && S && w && console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');
|
|
798
|
-
const [
|
|
802
|
+
const [St, Ut] = c.useState(!1), [$, vt] = c.useState(Nt), [yt, Xt] = c.useState(!1), [gt, Yt] = c.useState(!1), [Tt, Kt] = c.useState(!1), [wt, _t] = c.useState({
|
|
799
803
|
overflow: "hidden",
|
|
800
804
|
scrollbarWidth: 0
|
|
801
|
-
}), Z = /* @__PURE__ */ new Map(), O = c.useRef(null), A = c.useRef(null),
|
|
805
|
+
}), Z = /* @__PURE__ */ new Map(), O = c.useRef(null), A = c.useRef(null), Bt = () => {
|
|
802
806
|
const r = O.current;
|
|
803
807
|
let n;
|
|
804
808
|
if (r) {
|
|
@@ -820,20 +824,20 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
820
824
|
if (a.length > 0) {
|
|
821
825
|
const p = a[Z.get(N)];
|
|
822
826
|
process.env.NODE_ENV !== "production" && (p || console.error(["MUI: The `value` provided to the Tabs component is invalid.", `None of the Tabs' children match with "${N}".`, Z.keys ? `You can provide one of the following values: ${Array.from(Z.keys()).join(", ")}.` : null].join(`
|
|
823
|
-
`))), s = p ? p.getBoundingClientRect() : null, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && !
|
|
827
|
+
`))), s = p ? p.getBoundingClientRect() : null, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && !Pt && s && s.width === 0 && s.height === 0 && // if the whole Tabs component is hidden, don't warn
|
|
824
828
|
n.clientWidth !== 0 && (n = null, console.error(["MUI: The `value` provided to the Tabs component is invalid.", `The Tab with this \`value\` ("${N}") 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(`
|
|
825
|
-
`)),
|
|
829
|
+
`)), Pt = !0);
|
|
826
830
|
}
|
|
827
831
|
}
|
|
828
832
|
return {
|
|
829
833
|
tabsMeta: n,
|
|
830
834
|
tabMeta: s
|
|
831
835
|
};
|
|
832
|
-
}, K =
|
|
836
|
+
}, K = dt(() => {
|
|
833
837
|
const {
|
|
834
838
|
tabsMeta: r,
|
|
835
839
|
tabMeta: n
|
|
836
|
-
} =
|
|
840
|
+
} = Bt();
|
|
837
841
|
let s = 0, a;
|
|
838
842
|
B ? (a = "top", n && r && (s = n.top - r.top + r.scrollTop)) : (a = u ? "right" : "left", n && r && (s = (u ? -1 : 1) * (n[a] - r[a] + r.scrollLeft)));
|
|
839
843
|
const p = {
|
|
@@ -842,99 +846,99 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
842
846
|
[Y]: n ? n[Y] : 0
|
|
843
847
|
};
|
|
844
848
|
if (typeof $[a] != "number" || typeof $[Y] != "number")
|
|
845
|
-
|
|
849
|
+
vt(p);
|
|
846
850
|
else {
|
|
847
851
|
const E = Math.abs($[a] - p[a]), F = Math.abs($[Y] - p[Y]);
|
|
848
|
-
(E >= 1 || F >= 1) &&
|
|
852
|
+
(E >= 1 || F >= 1) && vt(p);
|
|
849
853
|
}
|
|
850
|
-
}),
|
|
854
|
+
}), at = (r, {
|
|
851
855
|
animation: n = !0
|
|
852
856
|
} = {}) => {
|
|
853
|
-
n ?
|
|
857
|
+
n ? ho(X, O.current, r, {
|
|
854
858
|
duration: i.transitions.duration.standard
|
|
855
859
|
}) : O.current[X] = r;
|
|
856
|
-
},
|
|
860
|
+
}, xt = (r) => {
|
|
857
861
|
let n = O.current[X];
|
|
858
|
-
B ? n += r : n += r * (u ? -1 : 1),
|
|
859
|
-
},
|
|
860
|
-
const r = O.current[
|
|
862
|
+
B ? n += r : n += r * (u ? -1 : 1), at(n);
|
|
863
|
+
}, Ct = () => {
|
|
864
|
+
const r = O.current[st];
|
|
861
865
|
let n = 0;
|
|
862
866
|
const s = Array.from(A.current.children);
|
|
863
867
|
for (let a = 0; a < s.length; a += 1) {
|
|
864
868
|
const p = s[a];
|
|
865
|
-
if (n + p[
|
|
869
|
+
if (n + p[st] > r) {
|
|
866
870
|
a === 0 && (n = r);
|
|
867
871
|
break;
|
|
868
872
|
}
|
|
869
|
-
n += p[
|
|
873
|
+
n += p[st];
|
|
870
874
|
}
|
|
871
875
|
return n;
|
|
872
|
-
},
|
|
873
|
-
|
|
874
|
-
},
|
|
875
|
-
|
|
876
|
-
},
|
|
877
|
-
|
|
876
|
+
}, qt = () => {
|
|
877
|
+
xt(-1 * Ct());
|
|
878
|
+
}, Gt = () => {
|
|
879
|
+
xt(Ct());
|
|
880
|
+
}, Jt = c.useCallback((r) => {
|
|
881
|
+
_t({
|
|
878
882
|
overflow: null,
|
|
879
883
|
scrollbarWidth: r
|
|
880
884
|
});
|
|
881
|
-
}, []),
|
|
885
|
+
}, []), Qt = () => {
|
|
882
886
|
const r = {};
|
|
883
|
-
r.scrollbarSizeListener = w ? /* @__PURE__ */ x(
|
|
884
|
-
onChange:
|
|
887
|
+
r.scrollbarSizeListener = w ? /* @__PURE__ */ x(Eo, {
|
|
888
|
+
onChange: Jt,
|
|
885
889
|
className: W(P.scrollableX, P.hideScrollbar)
|
|
886
890
|
}) : null;
|
|
887
|
-
const s = w && (M === "auto" && (
|
|
888
|
-
return r.scrollButtonStart = s ? /* @__PURE__ */ x(
|
|
891
|
+
const s = w && (M === "auto" && (yt || gt) || M === !0);
|
|
892
|
+
return r.scrollButtonStart = s ? /* @__PURE__ */ x(L, {
|
|
889
893
|
slots: {
|
|
890
894
|
StartScrollButtonIcon: H.StartScrollButtonIcon
|
|
891
895
|
},
|
|
892
896
|
slotProps: {
|
|
893
|
-
startScrollButtonIcon:
|
|
897
|
+
startScrollButtonIcon: Ht
|
|
894
898
|
},
|
|
895
899
|
orientation: g,
|
|
896
900
|
direction: u ? "right" : "left",
|
|
897
|
-
onClick:
|
|
898
|
-
disabled: !
|
|
901
|
+
onClick: qt,
|
|
902
|
+
disabled: !yt,
|
|
899
903
|
...z,
|
|
900
904
|
className: W(P.scrollButtons, z.className)
|
|
901
|
-
}) : null, r.scrollButtonEnd = s ? /* @__PURE__ */ x(
|
|
905
|
+
}) : null, r.scrollButtonEnd = s ? /* @__PURE__ */ x(L, {
|
|
902
906
|
slots: {
|
|
903
907
|
EndScrollButtonIcon: H.EndScrollButtonIcon
|
|
904
908
|
},
|
|
905
909
|
slotProps: {
|
|
906
|
-
endScrollButtonIcon:
|
|
910
|
+
endScrollButtonIcon: Vt
|
|
907
911
|
},
|
|
908
912
|
orientation: g,
|
|
909
913
|
direction: u ? "left" : "right",
|
|
910
|
-
onClick:
|
|
911
|
-
disabled: !
|
|
914
|
+
onClick: Gt,
|
|
915
|
+
disabled: !gt,
|
|
912
916
|
...z,
|
|
913
917
|
className: W(P.scrollButtons, z.className)
|
|
914
918
|
}) : null, r;
|
|
915
|
-
},
|
|
919
|
+
}, It = dt((r) => {
|
|
916
920
|
const {
|
|
917
921
|
tabsMeta: n,
|
|
918
922
|
tabMeta: s
|
|
919
|
-
} =
|
|
923
|
+
} = Bt();
|
|
920
924
|
if (!(!s || !n)) {
|
|
921
925
|
if (s[J] < n[J]) {
|
|
922
926
|
const a = n[X] + (s[J] - n[J]);
|
|
923
|
-
|
|
927
|
+
at(a, {
|
|
924
928
|
animation: r
|
|
925
929
|
});
|
|
926
930
|
} else if (s[Q] > n[Q]) {
|
|
927
931
|
const a = n[X] + (s[Q] - n[Q]);
|
|
928
|
-
|
|
932
|
+
at(a, {
|
|
929
933
|
animation: r
|
|
930
934
|
});
|
|
931
935
|
}
|
|
932
936
|
}
|
|
933
|
-
}),
|
|
934
|
-
w && M !== !1 &&
|
|
937
|
+
}), tt = dt(() => {
|
|
938
|
+
w && M !== !1 && Kt(!Tt);
|
|
935
939
|
});
|
|
936
940
|
c.useEffect(() => {
|
|
937
|
-
const r = $
|
|
941
|
+
const r = $t(() => {
|
|
938
942
|
O.current && K();
|
|
939
943
|
});
|
|
940
944
|
let n;
|
|
@@ -945,8 +949,8 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
945
949
|
}), F.addedNodes.forEach((_) => {
|
|
946
950
|
n == null || n.observe(_);
|
|
947
951
|
});
|
|
948
|
-
}), r(),
|
|
949
|
-
}, a =
|
|
952
|
+
}), r(), tt();
|
|
953
|
+
}, a = Dt(O.current);
|
|
950
954
|
a.addEventListener("resize", r);
|
|
951
955
|
let p;
|
|
952
956
|
return typeof ResizeObserver < "u" && (n = new ResizeObserver(r), Array.from(A.current.children).forEach((E) => {
|
|
@@ -956,34 +960,34 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
956
960
|
})), () => {
|
|
957
961
|
r.clear(), a.removeEventListener("resize", r), p == null || p.disconnect(), n == null || n.disconnect();
|
|
958
962
|
};
|
|
959
|
-
}, [K,
|
|
963
|
+
}, [K, tt]), c.useEffect(() => {
|
|
960
964
|
const r = Array.from(A.current.children), n = r.length;
|
|
961
965
|
if (typeof IntersectionObserver < "u" && n > 0 && w && M !== !1) {
|
|
962
966
|
const s = r[0], a = r[n - 1], p = {
|
|
963
967
|
root: O.current,
|
|
964
968
|
threshold: 0.99
|
|
965
|
-
}, E = (
|
|
966
|
-
|
|
969
|
+
}, E = (ct) => {
|
|
970
|
+
Xt(!ct[0].isIntersecting);
|
|
967
971
|
}, F = new IntersectionObserver(E, p);
|
|
968
972
|
F.observe(s);
|
|
969
|
-
const _ = (
|
|
970
|
-
|
|
971
|
-
},
|
|
972
|
-
return
|
|
973
|
-
F.disconnect(),
|
|
973
|
+
const _ = (ct) => {
|
|
974
|
+
Yt(!ct[0].isIntersecting);
|
|
975
|
+
}, Mt = new IntersectionObserver(_, p);
|
|
976
|
+
return Mt.observe(a), () => {
|
|
977
|
+
F.disconnect(), Mt.disconnect();
|
|
974
978
|
};
|
|
975
979
|
}
|
|
976
|
-
}, [w, M,
|
|
977
|
-
|
|
980
|
+
}, [w, M, Tt, v == null ? void 0 : v.length]), c.useEffect(() => {
|
|
981
|
+
Ut(!0);
|
|
978
982
|
}, []), c.useEffect(() => {
|
|
979
983
|
K();
|
|
980
984
|
}), c.useEffect(() => {
|
|
981
|
-
|
|
982
|
-
}, [
|
|
985
|
+
It(Nt !== $);
|
|
986
|
+
}, [It, $]), c.useImperativeHandle(f, () => ({
|
|
983
987
|
updateIndicator: K,
|
|
984
|
-
updateScrollButtons:
|
|
985
|
-
}), [K,
|
|
986
|
-
const
|
|
988
|
+
updateScrollButtons: tt
|
|
989
|
+
}), [K, tt]);
|
|
990
|
+
const Et = /* @__PURE__ */ x(Io, {
|
|
987
991
|
...V,
|
|
988
992
|
className: W(P.indicator, V.className),
|
|
989
993
|
ownerState: D,
|
|
@@ -992,76 +996,76 @@ const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
|
992
996
|
...V.style
|
|
993
997
|
}
|
|
994
998
|
});
|
|
995
|
-
let
|
|
996
|
-
const
|
|
999
|
+
let ot = 0;
|
|
1000
|
+
const Zt = c.Children.map(v, (r) => {
|
|
997
1001
|
if (!/* @__PURE__ */ c.isValidElement(r))
|
|
998
1002
|
return null;
|
|
999
|
-
process.env.NODE_ENV !== "production" &&
|
|
1003
|
+
process.env.NODE_ENV !== "production" && eo.isFragment(r) && console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
|
|
1000
1004
|
`));
|
|
1001
|
-
const n = r.props.value === void 0 ?
|
|
1002
|
-
Z.set(n,
|
|
1005
|
+
const n = r.props.value === void 0 ? ot : r.props.value;
|
|
1006
|
+
Z.set(n, ot);
|
|
1003
1007
|
const s = n === N;
|
|
1004
|
-
return
|
|
1008
|
+
return ot += 1, /* @__PURE__ */ c.cloneElement(r, {
|
|
1005
1009
|
fullWidth: R === "fullWidth",
|
|
1006
|
-
indicator: s && !
|
|
1010
|
+
indicator: s && !St && Et,
|
|
1007
1011
|
selected: s,
|
|
1008
|
-
selectionFollowsFocus:
|
|
1012
|
+
selectionFollowsFocus: nt,
|
|
1009
1013
|
onChange: I,
|
|
1010
1014
|
textColor: G,
|
|
1011
1015
|
value: n,
|
|
1012
|
-
...
|
|
1016
|
+
...ot === 1 && N === !1 && !r.props.tabIndex ? {
|
|
1013
1017
|
tabIndex: 0
|
|
1014
1018
|
} : {}
|
|
1015
1019
|
});
|
|
1016
|
-
}),
|
|
1017
|
-
const n = A.current, s =
|
|
1020
|
+
}), to = (r) => {
|
|
1021
|
+
const n = A.current, s = so(n).activeElement;
|
|
1018
1022
|
if (s.getAttribute("role") !== "tab")
|
|
1019
1023
|
return;
|
|
1020
1024
|
let p = g === "horizontal" ? "ArrowLeft" : "ArrowUp", E = g === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
1021
1025
|
switch (g === "horizontal" && u && (p = "ArrowRight", E = "ArrowLeft"), r.key) {
|
|
1022
1026
|
case p:
|
|
1023
|
-
r.preventDefault(),
|
|
1027
|
+
r.preventDefault(), et(n, s, Ot);
|
|
1024
1028
|
break;
|
|
1025
1029
|
case E:
|
|
1026
|
-
r.preventDefault(),
|
|
1030
|
+
r.preventDefault(), et(n, s, Rt);
|
|
1027
1031
|
break;
|
|
1028
1032
|
case "Home":
|
|
1029
|
-
r.preventDefault(),
|
|
1033
|
+
r.preventDefault(), et(n, null, Rt);
|
|
1030
1034
|
break;
|
|
1031
1035
|
case "End":
|
|
1032
|
-
r.preventDefault(),
|
|
1036
|
+
r.preventDefault(), et(n, null, Ot);
|
|
1033
1037
|
break;
|
|
1034
1038
|
}
|
|
1035
|
-
},
|
|
1036
|
-
return /* @__PURE__ */ q(
|
|
1039
|
+
}, it = Qt();
|
|
1040
|
+
return /* @__PURE__ */ q(Bo, {
|
|
1037
1041
|
className: W(P.root, y),
|
|
1038
1042
|
ownerState: D,
|
|
1039
1043
|
ref: l,
|
|
1040
1044
|
as: m,
|
|
1041
|
-
...
|
|
1042
|
-
children: [
|
|
1045
|
+
...Lt,
|
|
1046
|
+
children: [it.scrollButtonStart, it.scrollbarSizeListener, /* @__PURE__ */ q(xo, {
|
|
1043
1047
|
className: P.scroller,
|
|
1044
1048
|
ownerState: D,
|
|
1045
1049
|
style: {
|
|
1046
|
-
overflow:
|
|
1047
|
-
[B ? `margin${u ? "Left" : "Right"}` : "marginBottom"]:
|
|
1050
|
+
overflow: wt.overflow,
|
|
1051
|
+
[B ? `margin${u ? "Left" : "Right"}` : "marginBottom"]: lt ? void 0 : -wt.scrollbarWidth
|
|
1048
1052
|
},
|
|
1049
1053
|
ref: O,
|
|
1050
|
-
children: [/* @__PURE__ */ x(
|
|
1054
|
+
children: [/* @__PURE__ */ x(Co, {
|
|
1051
1055
|
"aria-label": b,
|
|
1052
1056
|
"aria-labelledby": h,
|
|
1053
1057
|
"aria-orientation": g === "vertical" ? "vertical" : null,
|
|
1054
1058
|
className: P.flexContainer,
|
|
1055
1059
|
ownerState: D,
|
|
1056
|
-
onKeyDown:
|
|
1060
|
+
onKeyDown: to,
|
|
1057
1061
|
ref: A,
|
|
1058
1062
|
role: "tablist",
|
|
1059
|
-
children:
|
|
1060
|
-
}),
|
|
1061
|
-
}),
|
|
1063
|
+
children: Zt
|
|
1064
|
+
}), St && Et]
|
|
1065
|
+
}), it.scrollButtonEnd]
|
|
1062
1066
|
});
|
|
1063
1067
|
});
|
|
1064
|
-
process.env.NODE_ENV !== "production" && (
|
|
1068
|
+
process.env.NODE_ENV !== "production" && (Mo.propTypes = {
|
|
1065
1069
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1066
1070
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1067
1071
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -1074,66 +1078,66 @@ process.env.NODE_ENV !== "production" && (Et.propTypes = {
|
|
|
1074
1078
|
* @param {object} actions This object contains all possible actions
|
|
1075
1079
|
* that can be triggered programmatically.
|
|
1076
1080
|
*/
|
|
1077
|
-
action:
|
|
1081
|
+
action: lo,
|
|
1078
1082
|
/**
|
|
1079
1083
|
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
1080
1084
|
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
1081
1085
|
* @default false
|
|
1082
1086
|
*/
|
|
1083
|
-
allowScrollButtonsMobile:
|
|
1087
|
+
allowScrollButtonsMobile: o.bool,
|
|
1084
1088
|
/**
|
|
1085
1089
|
* The label for the Tabs as a string.
|
|
1086
1090
|
*/
|
|
1087
|
-
"aria-label":
|
|
1091
|
+
"aria-label": o.string,
|
|
1088
1092
|
/**
|
|
1089
1093
|
* An id or list of ids separated by a space that label the Tabs.
|
|
1090
1094
|
*/
|
|
1091
|
-
"aria-labelledby":
|
|
1095
|
+
"aria-labelledby": o.string,
|
|
1092
1096
|
/**
|
|
1093
1097
|
* If `true`, the tabs are centered.
|
|
1094
1098
|
* This prop is intended for large views.
|
|
1095
1099
|
* @default false
|
|
1096
1100
|
*/
|
|
1097
|
-
centered:
|
|
1101
|
+
centered: o.bool,
|
|
1098
1102
|
/**
|
|
1099
1103
|
* The content of the component.
|
|
1100
1104
|
*/
|
|
1101
|
-
children:
|
|
1105
|
+
children: o.node,
|
|
1102
1106
|
/**
|
|
1103
1107
|
* Override or extend the styles applied to the component.
|
|
1104
1108
|
*/
|
|
1105
|
-
classes:
|
|
1109
|
+
classes: o.object,
|
|
1106
1110
|
/**
|
|
1107
1111
|
* @ignore
|
|
1108
1112
|
*/
|
|
1109
|
-
className:
|
|
1113
|
+
className: o.string,
|
|
1110
1114
|
/**
|
|
1111
1115
|
* The component used for the root node.
|
|
1112
1116
|
* Either a string to use a HTML element or a component.
|
|
1113
1117
|
*/
|
|
1114
|
-
component:
|
|
1118
|
+
component: o.elementType,
|
|
1115
1119
|
/**
|
|
1116
1120
|
* Determines the color of the indicator.
|
|
1117
1121
|
* @default 'primary'
|
|
1118
1122
|
*/
|
|
1119
|
-
indicatorColor:
|
|
1123
|
+
indicatorColor: o.oneOfType([o.oneOf(["primary", "secondary"]), o.string]),
|
|
1120
1124
|
/**
|
|
1121
1125
|
* Callback fired when the value changes.
|
|
1122
1126
|
*
|
|
1123
1127
|
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
1124
1128
|
* @param {any} value We default to the index of the child (number)
|
|
1125
1129
|
*/
|
|
1126
|
-
onChange:
|
|
1130
|
+
onChange: o.func,
|
|
1127
1131
|
/**
|
|
1128
1132
|
* The component orientation (layout flow direction).
|
|
1129
1133
|
* @default 'horizontal'
|
|
1130
1134
|
*/
|
|
1131
|
-
orientation:
|
|
1135
|
+
orientation: o.oneOf(["horizontal", "vertical"]),
|
|
1132
1136
|
/**
|
|
1133
1137
|
* The component used to render the scroll buttons.
|
|
1134
1138
|
* @default TabScrollButton
|
|
1135
1139
|
*/
|
|
1136
|
-
ScrollButtonComponent:
|
|
1140
|
+
ScrollButtonComponent: o.elementType,
|
|
1137
1141
|
/**
|
|
1138
1142
|
* Determine behavior of scroll buttons when tabs are set to scroll:
|
|
1139
1143
|
*
|
|
@@ -1145,53 +1149,53 @@ process.env.NODE_ENV !== "production" && (Et.propTypes = {
|
|
|
1145
1149
|
* This behavior can be disabled with `allowScrollButtonsMobile`.
|
|
1146
1150
|
* @default 'auto'
|
|
1147
1151
|
*/
|
|
1148
|
-
scrollButtons:
|
|
1152
|
+
scrollButtons: o.oneOf(["auto", !1, !0]),
|
|
1149
1153
|
/**
|
|
1150
1154
|
* If `true` the selected tab changes on focus. Otherwise it only
|
|
1151
1155
|
* changes on activation.
|
|
1152
1156
|
*/
|
|
1153
|
-
selectionFollowsFocus:
|
|
1157
|
+
selectionFollowsFocus: o.bool,
|
|
1154
1158
|
/**
|
|
1155
1159
|
* The extra props for the slot components.
|
|
1156
1160
|
* You can override the existing props or add new ones.
|
|
1157
1161
|
* @default {}
|
|
1158
1162
|
*/
|
|
1159
|
-
slotProps:
|
|
1160
|
-
endScrollButtonIcon:
|
|
1161
|
-
startScrollButtonIcon:
|
|
1163
|
+
slotProps: o.shape({
|
|
1164
|
+
endScrollButtonIcon: o.oneOfType([o.func, o.object]),
|
|
1165
|
+
startScrollButtonIcon: o.oneOfType([o.func, o.object])
|
|
1162
1166
|
}),
|
|
1163
1167
|
/**
|
|
1164
1168
|
* The components used for each slot inside.
|
|
1165
1169
|
* @default {}
|
|
1166
1170
|
*/
|
|
1167
|
-
slots:
|
|
1168
|
-
EndScrollButtonIcon:
|
|
1169
|
-
StartScrollButtonIcon:
|
|
1171
|
+
slots: o.shape({
|
|
1172
|
+
EndScrollButtonIcon: o.elementType,
|
|
1173
|
+
StartScrollButtonIcon: o.elementType
|
|
1170
1174
|
}),
|
|
1171
1175
|
/**
|
|
1172
1176
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1173
1177
|
*/
|
|
1174
|
-
sx:
|
|
1178
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
1175
1179
|
/**
|
|
1176
1180
|
* Props applied to the tab indicator element.
|
|
1177
1181
|
* @default {}
|
|
1178
1182
|
*/
|
|
1179
|
-
TabIndicatorProps:
|
|
1183
|
+
TabIndicatorProps: o.object,
|
|
1180
1184
|
/**
|
|
1181
1185
|
* Props applied to the [`TabScrollButton`](https://mui.com/material-ui/api/tab-scroll-button/) element.
|
|
1182
1186
|
* @default {}
|
|
1183
1187
|
*/
|
|
1184
|
-
TabScrollButtonProps:
|
|
1188
|
+
TabScrollButtonProps: o.object,
|
|
1185
1189
|
/**
|
|
1186
1190
|
* Determines the color of the `Tab`.
|
|
1187
1191
|
* @default 'primary'
|
|
1188
1192
|
*/
|
|
1189
|
-
textColor:
|
|
1193
|
+
textColor: o.oneOf(["inherit", "primary", "secondary"]),
|
|
1190
1194
|
/**
|
|
1191
1195
|
* The value of the currently selected `Tab`.
|
|
1192
1196
|
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
1193
1197
|
*/
|
|
1194
|
-
value:
|
|
1198
|
+
value: o.any,
|
|
1195
1199
|
/**
|
|
1196
1200
|
* Determines additional display behavior of the tabs:
|
|
1197
1201
|
*
|
|
@@ -1202,21 +1206,21 @@ process.env.NODE_ENV !== "production" && (Et.propTypes = {
|
|
|
1202
1206
|
* - `standard` will render the default state.
|
|
1203
1207
|
* @default 'standard'
|
|
1204
1208
|
*/
|
|
1205
|
-
variant:
|
|
1209
|
+
variant: o.oneOf(["fullWidth", "scrollable", "standard"]),
|
|
1206
1210
|
/**
|
|
1207
1211
|
* If `true`, the scrollbar is visible. It can be useful when displaying
|
|
1208
1212
|
* a long vertical list of tabs.
|
|
1209
1213
|
* @default false
|
|
1210
1214
|
*/
|
|
1211
|
-
visibleScrollbar:
|
|
1215
|
+
visibleScrollbar: o.bool
|
|
1212
1216
|
});
|
|
1213
1217
|
export {
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1218
|
+
fo as K,
|
|
1219
|
+
uo as T,
|
|
1220
|
+
Mo as a,
|
|
1221
|
+
ut as b,
|
|
1222
|
+
To as c,
|
|
1223
|
+
po as d,
|
|
1224
|
+
ao as g,
|
|
1221
1225
|
T as t
|
|
1222
1226
|
};
|