@cgi-learning-hub/ui 1.2.0 → 1.3.0
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-CxHwPsCX.js +789 -0
- package/dist/Backdrop-ZCTs-Ws8.cjs +1 -0
- package/dist/Box-D61CmHcZ.cjs +1 -0
- package/dist/{Box-Bawb5zHX.js → Box-a6v7fn61.js} +31 -30
- package/dist/Button-B8Vr_qVd.js +450 -0
- package/dist/Button-elp97nQ8.cjs +1 -0
- package/dist/ButtonBase-S0mFlojL.cjs +75 -0
- package/dist/ButtonBase-Y5TK5SRu.js +890 -0
- package/dist/CircularProgress-DDIZxeFH.cjs +28 -0
- package/dist/CircularProgress-DU3DJQfF.js +252 -0
- package/dist/DatePicker-BigDV0IN.cjs +17 -0
- package/dist/{DatePicker-DGVeagTz.js → DatePicker-ZdjLD9eR.js} +6100 -5984
- package/dist/DefaultPropsProvider-7QnSWHxy.js +484 -0
- package/dist/DefaultPropsProvider-eEVEiLDf.cjs +17 -0
- package/dist/IconButton-C7H_G1LX.js +230 -0
- package/dist/IconButton-DfmbM9nO.cjs +2 -0
- package/dist/InputAdornment-C-EbfNtT.cjs +1 -0
- package/dist/{InputAdornment-hNrnvXW9.js → InputAdornment-CPJFY_m_.js} +81 -64
- package/dist/InputBase-5GB2c2J6.js +803 -0
- package/dist/InputBase-CPtGhJye.cjs +3 -0
- package/dist/Stack-656bqKiW.cjs +1 -0
- package/dist/{Stack-BJ2ths-g.js → Stack-CutIWKkG.js} +61 -60
- package/dist/Tabs-CKic46Op.js +1222 -0
- package/dist/Tabs-DzrxYlm-.cjs +4 -0
- package/dist/TextField-BLEvZwPH.cjs +14 -0
- package/dist/TextField-CGMPbx_J.js +5686 -0
- package/dist/Tooltip-BJefPCe7.cjs +100 -0
- package/dist/{Tooltip-D42pzHKW.js → Tooltip-DqLAZimE.js} +4764 -3511
- package/dist/TransitionGroupContext-DMJLhY9-.js +24 -0
- package/dist/TransitionGroupContext-DbXD5xqS.cjs +1 -0
- package/dist/Typography-CreZW2v6.cjs +1 -0
- package/dist/Typography-DsJC595c.js +259 -0
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/client-error-BUtdld5f.cjs +1 -0
- package/dist/client-error-B_-qjgAB.js +395 -0
- package/dist/components/Alert/Alert.cjs.js +1 -0
- package/dist/components/{feedback/Alert → Alert}/Alert.d.ts +0 -1
- package/dist/components/Alert/Alert.stories.cjs.js +1 -0
- package/dist/components/{feedback/Alert → Alert}/Alert.stories.d.ts +0 -1
- package/dist/components/{feedback/Alert → Alert}/Alert.stories.es.js +7 -7
- package/dist/components/Button/Button.cjs.js +1 -0
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.es.js +334 -0
- package/dist/components/Button/Button.stories.cjs.js +1 -0
- package/dist/components/{buttons/SecondaryButton/SecondaryButton.stories.d.ts → Button/Button.stories.d.ts} +3 -2
- package/dist/components/Button/Button.stories.es.js +45 -0
- package/dist/components/Button/index.cjs.js +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.es.js +4 -0
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -0
- package/dist/components/{pickers/DatePicker → DatePicker}/DatePicker.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.es.js +6 -0
- package/dist/components/DatePicker/DatePicker.stories.cjs.js +1 -0
- package/dist/components/{pickers/DatePicker → DatePicker}/DatePicker.stories.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.stories.es.js +16 -0
- package/dist/components/{pickers → DatePicker}/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +4 -0
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.d.ts +0 -1
- package/dist/components/Dropzone/Dropzone.es.js +1685 -686
- package/dist/components/Dropzone/Dropzone.stories.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.stories.d.ts +0 -1
- package/dist/components/Dropzone/Dropzone.stories.es.js +1 -1
- package/dist/components/EmptyState/EmptyState.cjs.js +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +12 -0
- package/dist/components/EmptyState/EmptyState.es.js +31 -0
- package/dist/components/EmptyState/EmptyState.stories.cjs.js +1 -0
- package/dist/components/{PaperHeader/PaperHeader.stories.d.ts → EmptyState/EmptyState.stories.d.ts} +0 -1
- package/dist/components/EmptyState/EmptyState.stories.es.js +17 -0
- package/dist/components/EmptyState/index.cjs.js +1 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EmptyState/index.es.js +4 -0
- package/dist/components/FileList/FileList.cjs.js +1 -0
- package/dist/components/{lists/FileList → FileList}/FileList.d.ts +0 -1
- package/dist/components/{lists/FileList → FileList}/FileList.es.js +1 -1
- package/dist/components/FileList/FileList.stories.cjs.js +1 -0
- package/dist/components/{lists/FileList → FileList}/FileList.stories.d.ts +0 -1
- package/dist/components/{lists/FileList → FileList}/FileList.stories.es.js +3 -3
- package/dist/components/FileList/FileListItem.cjs.js +1 -0
- package/dist/components/FileList/FileListItem.d.ts +12 -0
- package/dist/components/FileList/FileListItem.es.js +29 -0
- package/dist/components/Heading/Heading.cjs.js +1 -0
- package/dist/components/{PaperHeader/PaperHeader.d.ts → Heading/Heading.d.ts} +6 -5
- package/dist/components/Heading/Heading.es.js +39 -0
- package/dist/components/Heading/Heading.stories.cjs.js +1 -0
- package/dist/components/{buttons/PrimaryButton/PrimaryButton.stories.d.ts → Heading/Heading.stories.d.ts} +0 -1
- package/dist/components/Heading/Heading.stories.es.js +22 -0
- package/dist/components/Heading/index.cjs.js +1 -0
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/Heading/index.es.js +4 -0
- package/dist/components/IconButton.stories.cjs.js +1 -0
- package/dist/components/{buttons/IconButton.stories.d.ts → IconButton.stories.d.ts} +0 -1
- package/dist/components/IconButton.stories.es.js +21 -0
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.d.ts +0 -1
- package/dist/components/Loader/Loader.es.js +2 -2
- package/dist/components/Loader/Loader.stories.cjs.js +1 -1
- package/dist/components/Loader/Loader.stories.d.ts +0 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +0 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +10 -8
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.d.ts +0 -1
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -0
- package/dist/components/{inputs/PasswordInput → PasswordInput}/PasswordInput.d.ts +0 -1
- package/dist/components/{inputs/PasswordInput → PasswordInput}/PasswordInput.es.js +10 -11
- package/dist/components/{inputs/PasswordInput → PasswordInput}/PasswordInput.stories.cjs.js +1 -1
- package/dist/components/{inputs/PasswordInput → PasswordInput}/PasswordInput.stories.d.ts +0 -1
- package/dist/components/PasswordInput/PasswordInput.stories.es.js +16 -0
- package/dist/components/QueryError/QueryError.cjs.js +1 -0
- package/dist/components/{feedback/QueryError → QueryError}/QueryError.d.ts +0 -1
- package/dist/components/QueryError/QueryError.es.js +43 -0
- package/dist/components/{feedback/QueryError → QueryError}/helpers.d.ts +0 -1
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -0
- package/dist/components/{inputs/SearchInput → SearchInput}/SearchInput.d.ts +0 -1
- package/dist/components/{inputs/SearchInput → SearchInput}/SearchInput.es.js +4 -4
- package/dist/components/SearchInput/SearchInput.stories.cjs.js +1 -0
- package/dist/components/{inputs/SearchInput → SearchInput}/SearchInput.stories.d.ts +0 -1
- package/dist/components/{inputs/SearchInput → SearchInput}/SearchInput.stories.es.js +1 -1
- package/dist/components/TabList.stories.cjs.js +1 -0
- package/dist/components/{lists/TabList.stories.d.ts → TabList.stories.d.ts} +0 -1
- package/dist/components/{lists/TabList.stories.es.js → TabList.stories.es.js} +99 -87
- package/dist/components/TextInput/TextInput.cjs.js +1 -0
- package/dist/components/{inputs/TextInput → TextInput}/TextInput.d.ts +0 -1
- package/dist/components/{inputs/TextInput → TextInput}/TextInput.es.js +1 -1
- package/dist/components/TextInput/TextInput.stories.cjs.js +1 -0
- package/dist/components/{inputs/TextInput → TextInput}/TextInput.stories.d.ts +0 -1
- package/dist/components/{inputs/TextInput → TextInput}/TextInput.stories.es.js +7 -7
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +14 -20
- package/dist/components/index.es.js +270 -272
- package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +17 -0
- package/dist/createSimplePaletteValueFilter-PTK3TAhW.cjs +1 -0
- package/dist/createSvgIcon-Ae1vF9Lv.js +250 -0
- package/dist/createSvgIcon-PXjVOXDY.cjs +1 -0
- package/dist/error-CRNeivL7.js +5 -0
- package/dist/error-Dk3o6ber.cjs +1 -0
- package/dist/extendSxProp-BzTGWWcy.js +37 -0
- package/dist/extendSxProp-DLhbnNxc.cjs +1 -0
- package/dist/{fr-By4s91yO.js → fr-B0c4Eu-I.js} +13 -13
- package/dist/{fr-TRjulm1Q.cjs → fr-BtINyNRC.cjs} +1 -1
- package/dist/hooks/lazySvgImport.cjs.js +1 -0
- package/dist/hooks/lazySvgImport.d.ts +6 -0
- package/dist/hooks/lazySvgImport.es.js +34 -0
- package/dist/identifier-B_IiMbpZ.cjs +59 -0
- package/dist/identifier-Bu3vgTzE.js +3115 -0
- package/dist/index-BDy6VH40.cjs +1 -0
- package/dist/index-D4YvqRSh.js +45 -0
- package/dist/index-DNmEgr4X.js +89 -0
- package/dist/index-Dl4BXU0b.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +271 -273
- package/dist/memoTheme-C4_nd-x4.js +15 -0
- package/dist/memoTheme-DvW891YJ.cjs +1 -0
- package/dist/{ownerWindow-C7EH1lr6.js → ownerWindow-BoRkeomM.js} +2 -2
- package/dist/refType-DYRsy3ld.cjs +1 -0
- package/dist/refType-DvOnKTmB.js +27 -0
- package/dist/server-error-CeAtUo4S.cjs +1 -0
- package/dist/server-error-DMyaPFs8.js +400 -0
- package/dist/useForkRef-D-DyzOXj.js +21 -0
- package/dist/useForkRef-D81w5oMb.cjs +1 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useId-DNXtOFeX.cjs +1 -0
- package/dist/useTheme-B_3HWqyi.js +88 -0
- package/dist/useTheme-BvsnROiB.cjs +1 -0
- package/dist/{useTheme-CjBTq22m.js → useTheme-DhYab2-0.js} +5 -5
- package/dist/useTheme-vN32oV1t.cjs +1 -0
- package/dist/useThemeProps-5hp2m3Xl.cjs +1 -0
- package/dist/{useThemeProps-BM4fCFq5.js → useThemeProps-Bmkt_XOR.js} +2 -2
- package/dist/useThemeProps-D_gKWuk1.cjs +1 -0
- package/dist/useThemeProps-DftpgVZ0.js +24 -0
- package/dist/useTimeout-Bx22KOcH.js +53 -0
- package/dist/useTimeout-gEG15bRo.cjs +1 -0
- package/package.json +14 -17
- package/dist/Box-5x1F2S3-.cjs +0 -1
- package/dist/Button-C__-QOJY.js +0 -359
- package/dist/Button-DKIRmOzf.cjs +0 -1
- package/dist/ButtonBase-4F5roLHd.js +0 -827
- package/dist/ButtonBase-Bw3wq81v.cjs +0 -75
- package/dist/CircularProgress-BNazIBar.js +0 -217
- package/dist/CircularProgress-WnNPMTjD.cjs +0 -28
- package/dist/DatePicker-B0jLSEvZ.cjs +0 -19
- package/dist/DefaultButton-F67BOmrx.js +0 -258
- package/dist/DefaultButton-y-mHSNFH.cjs +0 -1
- package/dist/IconButton-D_deQOvN.js +0 -184
- package/dist/IconButton-DhWgsgQ7.cjs +0 -2
- package/dist/InputAdornment-DYqMrYJz.cjs +0 -1
- package/dist/InputBase-BeZ70Fbf.cjs +0 -3
- package/dist/InputBase-DNkF-TAp.js +0 -794
- package/dist/Stack-BOcvai-O.cjs +0 -1
- package/dist/Tabs-CG428TT3.cjs +0 -4
- package/dist/Tabs-CWujD0SK.js +0 -1091
- package/dist/TextField-DDmGQyEr.js +0 -5800
- package/dist/TextField-wYRnAj1v.cjs +0 -12
- package/dist/Tooltip-O30xWGZU.cjs +0 -95
- package/dist/TransitionGroupContext-BkoHK5Kx.js +0 -14
- package/dist/TransitionGroupContext-mYDSzffd.cjs +0 -1
- package/dist/Typography-B2XMXu83.js +0 -178
- package/dist/Typography-DR_aF9lJ.cjs +0 -1
- package/dist/assets/index.css +0 -1
- package/dist/components/PaperHeader/PaperHeader.cjs.js +0 -1
- package/dist/components/PaperHeader/PaperHeader.es.js +0 -41
- package/dist/components/PaperHeader/PaperHeader.stories.cjs.js +0 -1
- package/dist/components/PaperHeader/PaperHeader.stories.es.js +0 -28
- package/dist/components/PaperHeader/index.cjs.js +0 -1
- package/dist/components/PaperHeader/index.d.ts +0 -2
- package/dist/components/PaperHeader/index.es.js +0 -4
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +0 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.d.ts +0 -9
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +0 -8
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +0 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.d.ts +0 -9
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +0 -143
- package/dist/components/buttons/DefaultButton/index.cjs.js +0 -1
- package/dist/components/buttons/DefaultButton/index.d.ts +0 -2
- package/dist/components/buttons/DefaultButton/index.es.js +0 -4
- package/dist/components/buttons/IconButton.stories.cjs.js +0 -1
- package/dist/components/buttons/IconButton.stories.es.js +0 -28
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +0 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.d.ts +0 -6
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +0 -13
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +0 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +0 -25
- package/dist/components/buttons/PrimaryButton/index.cjs.js +0 -1
- package/dist/components/buttons/PrimaryButton/index.d.ts +0 -2
- package/dist/components/buttons/PrimaryButton/index.es.js +0 -4
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +0 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.d.ts +0 -6
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +0 -6
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +0 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +0 -25
- package/dist/components/buttons/SecondaryButton/index.cjs.js +0 -1
- package/dist/components/buttons/SecondaryButton/index.d.ts +0 -2
- package/dist/components/buttons/SecondaryButton/index.es.js +0 -4
- package/dist/components/buttons/index.cjs.js +0 -1
- package/dist/components/buttons/index.d.ts +0 -3
- package/dist/components/buttons/index.es.js +0 -8
- package/dist/components/feedback/Alert/Alert.cjs.js +0 -1
- package/dist/components/feedback/Alert/Alert.stories.cjs.js +0 -1
- package/dist/components/feedback/QueryError/QueryError.cjs.js +0 -1
- package/dist/components/feedback/QueryError/QueryError.es.js +0 -19
- package/dist/components/feedback/index.cjs.js +0 -1
- package/dist/components/feedback/index.d.ts +0 -2
- package/dist/components/feedback/index.es.js +0 -6
- package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +0 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.stories.es.js +0 -16
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +0 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +0 -1
- package/dist/components/inputs/TextInput/TextInput.cjs.js +0 -1
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +0 -1
- package/dist/components/inputs/index.cjs.js +0 -1
- package/dist/components/inputs/index.d.ts +0 -3
- package/dist/components/inputs/index.es.js +0 -8
- package/dist/components/lists/FileList/FileList.cjs.js +0 -1
- package/dist/components/lists/FileList/FileList.stories.cjs.js +0 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +0 -1
- package/dist/components/lists/FileList/FileListItem.d.ts +0 -14
- package/dist/components/lists/FileList/FileListItem.es.js +0 -42
- package/dist/components/lists/TabList.stories.cjs.js +0 -1
- package/dist/components/lists/index.cjs.js +0 -1
- package/dist/components/lists/index.d.ts +0 -1
- package/dist/components/lists/index.es.js +0 -6
- package/dist/components/pickers/DatePicker/DatePicker.cjs.js +0 -1
- package/dist/components/pickers/DatePicker/DatePicker.es.js +0 -6
- package/dist/components/pickers/DatePicker/DatePicker.stories.cjs.js +0 -1
- package/dist/components/pickers/DatePicker/DatePicker.stories.es.js +0 -16
- package/dist/components/pickers/DatePicker/index.cjs.js +0 -1
- package/dist/components/pickers/DatePicker/index.es.js +0 -4
- package/dist/components/pickers/index.d.ts +0 -1
- package/dist/components/pickers/index.es.js +0 -4
- package/dist/createStyled-CzVedz8V.js +0 -142
- package/dist/createStyled-LobpFGWo.cjs +0 -1
- package/dist/createSvgIcon-B8vHI3I6.js +0 -183
- package/dist/createSvgIcon-BGm-SWUB.cjs +0 -1
- package/dist/createSvgIcon-CKlvKClV.cjs +0 -2
- package/dist/createSvgIcon-DjuUwmEp.js +0 -75
- package/dist/identifier-4KVhx666.cjs +0 -50
- package/dist/identifier-D-ng7Qqa.js +0 -3047
- package/dist/isHostComponent-PydJW4A4.cjs +0 -1
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/refType-BhXrhWFB.cjs +0 -1
- package/dist/refType-COGEdfch.js +0 -29
- package/dist/styled-ZF_yhfMW.cjs +0 -17
- package/dist/styled-xiAudcD_.js +0 -533
- package/dist/unsupportedProp-Bn6XWqwH.cjs +0 -1
- package/dist/unsupportedProp-BuVD30Gh.js +0 -9
- package/dist/useControlled-DKpcyPsg.cjs +0 -3
- package/dist/useControlled-DoRrpN8o.js +0 -48
- package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
- package/dist/useForkRef-DwN_Iz9R.js +0 -17
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useId-Cw0TtD-8.cjs +0 -1
- package/dist/useIsFocusVisible-Bv_7uvif.cjs +0 -1
- package/dist/useIsFocusVisible-DhASXQ4o.js +0 -69
- package/dist/useTheme-B5RCz7rY.cjs +0 -1
- package/dist/useTheme-iNHILPzK.js +0 -99
- package/dist/useTheme-kqsjFBnC.cjs +0 -1
- package/dist/useThemeProps-B-Oq4Y2j.cjs +0 -1
- package/dist/useThemeProps-BHAsCmc4.cjs +0 -1
- package/dist/useThemeProps-BVvSbkPP.js +0 -17
- package/dist/useTimeout-BdvDipeg.js +0 -47
- package/dist/useTimeout-XUWYBnl6.cjs +0 -1
- package/dist/vite-env.d.cjs.js +0 -1
- package/dist/vite-env.d.es.js +0 -1
- /package/dist/components/{feedback/Alert → Alert}/Alert.es.js +0 -0
- /package/dist/components/{feedback/Alert → Alert}/index.cjs.js +0 -0
- /package/dist/components/{feedback/Alert → Alert}/index.d.ts +0 -0
- /package/dist/components/{feedback/Alert → Alert}/index.es.js +0 -0
- /package/dist/components/{pickers/DatePicker → DatePicker}/index.d.ts +0 -0
- /package/dist/components/{lists/FileList → FileList}/index.cjs.js +0 -0
- /package/dist/components/{lists/FileList → FileList}/index.d.ts +0 -0
- /package/dist/components/{lists/FileList → FileList}/index.es.js +0 -0
- /package/dist/components/{inputs/PasswordInput → PasswordInput}/index.cjs.js +0 -0
- /package/dist/components/{inputs/PasswordInput → PasswordInput}/index.d.ts +0 -0
- /package/dist/components/{inputs/PasswordInput → PasswordInput}/index.es.js +0 -0
- /package/dist/components/{feedback/QueryError → QueryError}/helpers.cjs.js +0 -0
- /package/dist/components/{feedback/QueryError → QueryError}/helpers.es.js +0 -0
- /package/dist/components/{feedback/QueryError → QueryError}/index.cjs.js +0 -0
- /package/dist/components/{feedback/QueryError → QueryError}/index.d.ts +0 -0
- /package/dist/components/{feedback/QueryError → QueryError}/index.es.js +0 -0
- /package/dist/components/{inputs/SearchInput → SearchInput}/index.cjs.js +0 -0
- /package/dist/components/{inputs/SearchInput → SearchInput}/index.d.ts +0 -0
- /package/dist/components/{inputs/SearchInput → SearchInput}/index.es.js +0 -0
- /package/dist/components/{inputs/TextInput → TextInput}/index.cjs.js +0 -0
- /package/dist/components/{inputs/TextInput → TextInput}/index.d.ts +0 -0
- /package/dist/components/{inputs/TextInput → TextInput}/index.es.js +0 -0
|
@@ -0,0 +1,1222 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import { I as pe, J as fe, K as We, L as W, P as t } from "./identifier-Bu3vgTzE.js";
|
|
3
|
+
import { m as be } from "./memoTheme-C4_nd-x4.js";
|
|
4
|
+
import { jsxs as q, jsx as x } from "react/jsx-runtime";
|
|
5
|
+
import { s as L, u as he, c as me, e as tt } from "./DefaultPropsProvider-7QnSWHxy.js";
|
|
6
|
+
import { B as ke } from "./ButtonBase-Y5TK5SRu.js";
|
|
7
|
+
import { a as ot } from "./useThemeProps-DftpgVZ0.js";
|
|
8
|
+
import { u as ze, a as re } from "./index-D4YvqRSh.js";
|
|
9
|
+
import { u as rt } from "./useTheme-B_3HWqyi.js";
|
|
10
|
+
import { u as nt, r as lt } from "./refType-DvOnKTmB.js";
|
|
11
|
+
import { o as De, d as $e, a as st } from "./ownerWindow-BoRkeomM.js";
|
|
12
|
+
import { u as de } from "./useTimeout-Bx22KOcH.js";
|
|
13
|
+
import { c as Ae } from "./createSvgIcon-Ae1vF9Lv.js";
|
|
14
|
+
function at(o) {
|
|
15
|
+
return pe("MuiTab", o);
|
|
16
|
+
}
|
|
17
|
+
const T = fe("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper", "icon"]), it = (o) => {
|
|
18
|
+
const {
|
|
19
|
+
classes: e,
|
|
20
|
+
textColor: l,
|
|
21
|
+
fullWidth: d,
|
|
22
|
+
wrapped: i,
|
|
23
|
+
icon: u,
|
|
24
|
+
label: b,
|
|
25
|
+
selected: h,
|
|
26
|
+
disabled: f
|
|
27
|
+
} = o, S = {
|
|
28
|
+
root: ["root", u && b && "labelIcon", `textColor${We(l)}`, d && "fullWidth", i && "wrapped", h && "selected", f && "disabled"],
|
|
29
|
+
icon: ["iconWrapper", "icon"]
|
|
30
|
+
};
|
|
31
|
+
return me(S, at, e);
|
|
32
|
+
}, ct = L(ke, {
|
|
33
|
+
name: "MuiTab",
|
|
34
|
+
slot: "Root",
|
|
35
|
+
overridesResolver: (o, e) => {
|
|
36
|
+
const {
|
|
37
|
+
ownerState: l
|
|
38
|
+
} = o;
|
|
39
|
+
return [e.root, l.label && l.icon && e.labelIcon, e[`textColor${We(l.textColor)}`], l.fullWidth && e.fullWidth, l.wrapped && e.wrapped, {
|
|
40
|
+
[`& .${T.iconWrapper}`]: e.iconWrapper
|
|
41
|
+
}, {
|
|
42
|
+
[`& .${T.icon}`]: e.icon
|
|
43
|
+
}];
|
|
44
|
+
}
|
|
45
|
+
})(be(({
|
|
46
|
+
theme: o
|
|
47
|
+
}) => ({
|
|
48
|
+
...o.typography.button,
|
|
49
|
+
maxWidth: 360,
|
|
50
|
+
minWidth: 90,
|
|
51
|
+
position: "relative",
|
|
52
|
+
minHeight: 48,
|
|
53
|
+
flexShrink: 0,
|
|
54
|
+
padding: "12px 16px",
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
whiteSpace: "normal",
|
|
57
|
+
textAlign: "center",
|
|
58
|
+
lineHeight: 1.25,
|
|
59
|
+
variants: [{
|
|
60
|
+
props: ({
|
|
61
|
+
ownerState: e
|
|
62
|
+
}) => e.label && (e.iconPosition === "top" || e.iconPosition === "bottom"),
|
|
63
|
+
style: {
|
|
64
|
+
flexDirection: "column"
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
props: ({
|
|
68
|
+
ownerState: e
|
|
69
|
+
}) => e.label && e.iconPosition !== "top" && e.iconPosition !== "bottom",
|
|
70
|
+
style: {
|
|
71
|
+
flexDirection: "row"
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
props: ({
|
|
75
|
+
ownerState: e
|
|
76
|
+
}) => e.icon && e.label,
|
|
77
|
+
style: {
|
|
78
|
+
minHeight: 72,
|
|
79
|
+
paddingTop: 9,
|
|
80
|
+
paddingBottom: 9
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
props: ({
|
|
84
|
+
ownerState: e,
|
|
85
|
+
iconPosition: l
|
|
86
|
+
}) => e.icon && e.label && l === "top",
|
|
87
|
+
style: {
|
|
88
|
+
[`& > .${T.icon}`]: {
|
|
89
|
+
marginBottom: 6
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
props: ({
|
|
94
|
+
ownerState: e,
|
|
95
|
+
iconPosition: l
|
|
96
|
+
}) => e.icon && e.label && l === "bottom",
|
|
97
|
+
style: {
|
|
98
|
+
[`& > .${T.icon}`]: {
|
|
99
|
+
marginTop: 6
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
props: ({
|
|
104
|
+
ownerState: e,
|
|
105
|
+
iconPosition: l
|
|
106
|
+
}) => e.icon && e.label && l === "start",
|
|
107
|
+
style: {
|
|
108
|
+
[`& > .${T.icon}`]: {
|
|
109
|
+
marginRight: o.spacing(1)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
props: ({
|
|
114
|
+
ownerState: e,
|
|
115
|
+
iconPosition: l
|
|
116
|
+
}) => e.icon && e.label && l === "end",
|
|
117
|
+
style: {
|
|
118
|
+
[`& > .${T.icon}`]: {
|
|
119
|
+
marginLeft: o.spacing(1)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
props: {
|
|
124
|
+
textColor: "inherit"
|
|
125
|
+
},
|
|
126
|
+
style: {
|
|
127
|
+
color: "inherit",
|
|
128
|
+
opacity: 0.6,
|
|
129
|
+
// same opacity as theme.palette.text.secondary
|
|
130
|
+
[`&.${T.selected}`]: {
|
|
131
|
+
opacity: 1
|
|
132
|
+
},
|
|
133
|
+
[`&.${T.disabled}`]: {
|
|
134
|
+
opacity: (o.vars || o).palette.action.disabledOpacity
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
props: {
|
|
139
|
+
textColor: "primary"
|
|
140
|
+
},
|
|
141
|
+
style: {
|
|
142
|
+
color: (o.vars || o).palette.text.secondary,
|
|
143
|
+
[`&.${T.selected}`]: {
|
|
144
|
+
color: (o.vars || o).palette.primary.main
|
|
145
|
+
},
|
|
146
|
+
[`&.${T.disabled}`]: {
|
|
147
|
+
color: (o.vars || o).palette.text.disabled
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}, {
|
|
151
|
+
props: {
|
|
152
|
+
textColor: "secondary"
|
|
153
|
+
},
|
|
154
|
+
style: {
|
|
155
|
+
color: (o.vars || o).palette.text.secondary,
|
|
156
|
+
[`&.${T.selected}`]: {
|
|
157
|
+
color: (o.vars || o).palette.secondary.main
|
|
158
|
+
},
|
|
159
|
+
[`&.${T.disabled}`]: {
|
|
160
|
+
color: (o.vars || o).palette.text.disabled
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
props: ({
|
|
165
|
+
ownerState: e
|
|
166
|
+
}) => e.fullWidth,
|
|
167
|
+
style: {
|
|
168
|
+
flexShrink: 1,
|
|
169
|
+
flexGrow: 1,
|
|
170
|
+
flexBasis: 0,
|
|
171
|
+
maxWidth: "none"
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
props: ({
|
|
175
|
+
ownerState: e
|
|
176
|
+
}) => e.wrapped,
|
|
177
|
+
style: {
|
|
178
|
+
fontSize: o.typography.pxToRem(12)
|
|
179
|
+
}
|
|
180
|
+
}]
|
|
181
|
+
}))), dt = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
182
|
+
const d = he({
|
|
183
|
+
props: e,
|
|
184
|
+
name: "MuiTab"
|
|
185
|
+
}), {
|
|
186
|
+
className: i,
|
|
187
|
+
disabled: u = !1,
|
|
188
|
+
disableFocusRipple: b = !1,
|
|
189
|
+
// eslint-disable-next-line react/prop-types
|
|
190
|
+
fullWidth: h,
|
|
191
|
+
icon: f,
|
|
192
|
+
iconPosition: S = "top",
|
|
193
|
+
// eslint-disable-next-line react/prop-types
|
|
194
|
+
indicator: v,
|
|
195
|
+
label: y,
|
|
196
|
+
onChange: m,
|
|
197
|
+
onClick: C,
|
|
198
|
+
onFocus: k,
|
|
199
|
+
// eslint-disable-next-line react/prop-types
|
|
200
|
+
selected: I,
|
|
201
|
+
// eslint-disable-next-line react/prop-types
|
|
202
|
+
selectionFollowsFocus: g,
|
|
203
|
+
// eslint-disable-next-line react/prop-types
|
|
204
|
+
textColor: j = "inherit",
|
|
205
|
+
value: M,
|
|
206
|
+
wrapped: ne = !1,
|
|
207
|
+
...H
|
|
208
|
+
} = d, U = {
|
|
209
|
+
...d,
|
|
210
|
+
disabled: u,
|
|
211
|
+
disableFocusRipple: b,
|
|
212
|
+
selected: I,
|
|
213
|
+
icon: !!f,
|
|
214
|
+
iconPosition: S,
|
|
215
|
+
label: !!y,
|
|
216
|
+
fullWidth: h,
|
|
217
|
+
textColor: j,
|
|
218
|
+
wrapped: ne
|
|
219
|
+
}, V = it(U), z = f && y && /* @__PURE__ */ c.isValidElement(f) ? /* @__PURE__ */ c.cloneElement(f, {
|
|
220
|
+
className: W(V.icon, f.props.className)
|
|
221
|
+
}) : f, G = (R) => {
|
|
222
|
+
!I && m && m(R, M), C && C(R);
|
|
223
|
+
}, N = (R) => {
|
|
224
|
+
g && !I && m && m(R, M), k && k(R);
|
|
225
|
+
};
|
|
226
|
+
return /* @__PURE__ */ q(ct, {
|
|
227
|
+
focusRipple: !b,
|
|
228
|
+
className: W(V.root, i),
|
|
229
|
+
ref: l,
|
|
230
|
+
role: "tab",
|
|
231
|
+
"aria-selected": I,
|
|
232
|
+
disabled: u,
|
|
233
|
+
onClick: G,
|
|
234
|
+
onFocus: N,
|
|
235
|
+
ownerState: U,
|
|
236
|
+
tabIndex: I ? 0 : -1,
|
|
237
|
+
...H,
|
|
238
|
+
children: [S === "top" || S === "start" ? /* @__PURE__ */ q(c.Fragment, {
|
|
239
|
+
children: [z, y]
|
|
240
|
+
}) : /* @__PURE__ */ q(c.Fragment, {
|
|
241
|
+
children: [y, z]
|
|
242
|
+
}), v]
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
process.env.NODE_ENV !== "production" && (dt.propTypes = {
|
|
246
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
247
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
248
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
249
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
250
|
+
/**
|
|
251
|
+
* This prop isn't supported.
|
|
252
|
+
* Use the `component` prop if you need to change the children structure.
|
|
253
|
+
*/
|
|
254
|
+
children: ot,
|
|
255
|
+
/**
|
|
256
|
+
* Override or extend the styles applied to the component.
|
|
257
|
+
*/
|
|
258
|
+
classes: t.object,
|
|
259
|
+
/**
|
|
260
|
+
* @ignore
|
|
261
|
+
*/
|
|
262
|
+
className: t.string,
|
|
263
|
+
/**
|
|
264
|
+
* If `true`, the component is disabled.
|
|
265
|
+
* @default false
|
|
266
|
+
*/
|
|
267
|
+
disabled: t.bool,
|
|
268
|
+
/**
|
|
269
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
270
|
+
* @default false
|
|
271
|
+
*/
|
|
272
|
+
disableFocusRipple: t.bool,
|
|
273
|
+
/**
|
|
274
|
+
* If `true`, the ripple effect is disabled.
|
|
275
|
+
*
|
|
276
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
277
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
278
|
+
* @default false
|
|
279
|
+
*/
|
|
280
|
+
disableRipple: t.bool,
|
|
281
|
+
/**
|
|
282
|
+
* The icon to display.
|
|
283
|
+
*/
|
|
284
|
+
icon: t.oneOfType([t.element, t.string]),
|
|
285
|
+
/**
|
|
286
|
+
* The position of the icon relative to the label.
|
|
287
|
+
* @default 'top'
|
|
288
|
+
*/
|
|
289
|
+
iconPosition: t.oneOf(["bottom", "end", "start", "top"]),
|
|
290
|
+
/**
|
|
291
|
+
* The label element.
|
|
292
|
+
*/
|
|
293
|
+
label: t.node,
|
|
294
|
+
/**
|
|
295
|
+
* @ignore
|
|
296
|
+
*/
|
|
297
|
+
onChange: t.func,
|
|
298
|
+
/**
|
|
299
|
+
* @ignore
|
|
300
|
+
*/
|
|
301
|
+
onClick: t.func,
|
|
302
|
+
/**
|
|
303
|
+
* @ignore
|
|
304
|
+
*/
|
|
305
|
+
onFocus: t.func,
|
|
306
|
+
/**
|
|
307
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
308
|
+
*/
|
|
309
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
310
|
+
/**
|
|
311
|
+
* You can provide your own value. Otherwise, we fallback to the child position index.
|
|
312
|
+
*/
|
|
313
|
+
value: t.any,
|
|
314
|
+
/**
|
|
315
|
+
* Tab labels appear in a single row.
|
|
316
|
+
* They can use a second line if needed.
|
|
317
|
+
* @default false
|
|
318
|
+
*/
|
|
319
|
+
wrapped: t.bool
|
|
320
|
+
});
|
|
321
|
+
const ut = Ae(/* @__PURE__ */ x("path", {
|
|
322
|
+
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
323
|
+
}), "KeyboardArrowLeft"), pt = Ae(/* @__PURE__ */ x("path", {
|
|
324
|
+
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
325
|
+
}), "KeyboardArrowRight");
|
|
326
|
+
function ft(o) {
|
|
327
|
+
return (1 + Math.sin(Math.PI * o - Math.PI / 2)) / 2;
|
|
328
|
+
}
|
|
329
|
+
function bt(o, e, l, d = {}, i = () => {
|
|
330
|
+
}) {
|
|
331
|
+
const {
|
|
332
|
+
ease: u = ft,
|
|
333
|
+
duration: b = 300
|
|
334
|
+
// standard
|
|
335
|
+
} = d;
|
|
336
|
+
let h = null;
|
|
337
|
+
const f = e[o];
|
|
338
|
+
let S = !1;
|
|
339
|
+
const v = () => {
|
|
340
|
+
S = !0;
|
|
341
|
+
}, y = (m) => {
|
|
342
|
+
if (S) {
|
|
343
|
+
i(new Error("Animation cancelled"));
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
h === null && (h = m);
|
|
347
|
+
const C = Math.min(1, (m - h) / b);
|
|
348
|
+
if (e[o] = u(C) * (l - f) + f, C >= 1) {
|
|
349
|
+
requestAnimationFrame(() => {
|
|
350
|
+
i(null);
|
|
351
|
+
});
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
requestAnimationFrame(y);
|
|
355
|
+
};
|
|
356
|
+
return f === l ? (i(new Error("Element already at target position")), v) : (requestAnimationFrame(y), v);
|
|
357
|
+
}
|
|
358
|
+
const ht = {
|
|
359
|
+
width: 99,
|
|
360
|
+
height: 99,
|
|
361
|
+
position: "absolute",
|
|
362
|
+
top: -9999,
|
|
363
|
+
overflow: "scroll"
|
|
364
|
+
};
|
|
365
|
+
function Fe(o) {
|
|
366
|
+
const {
|
|
367
|
+
onChange: e,
|
|
368
|
+
...l
|
|
369
|
+
} = o, d = c.useRef(), i = c.useRef(null), u = () => {
|
|
370
|
+
d.current = i.current.offsetHeight - i.current.clientHeight;
|
|
371
|
+
};
|
|
372
|
+
return nt(() => {
|
|
373
|
+
const b = $e(() => {
|
|
374
|
+
const f = d.current;
|
|
375
|
+
u(), f !== d.current && e(d.current);
|
|
376
|
+
}), h = De(i.current);
|
|
377
|
+
return h.addEventListener("resize", b), () => {
|
|
378
|
+
b.clear(), h.removeEventListener("resize", b);
|
|
379
|
+
};
|
|
380
|
+
}, [e]), c.useEffect(() => {
|
|
381
|
+
u(), e(d.current);
|
|
382
|
+
}, [e]), /* @__PURE__ */ x("div", {
|
|
383
|
+
style: ht,
|
|
384
|
+
ref: i,
|
|
385
|
+
...l
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
process.env.NODE_ENV !== "production" && (Fe.propTypes = {
|
|
389
|
+
onChange: t.func.isRequired
|
|
390
|
+
});
|
|
391
|
+
function mt(o) {
|
|
392
|
+
return pe("MuiTabScrollButton", o);
|
|
393
|
+
}
|
|
394
|
+
const St = fe("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), vt = (o) => {
|
|
395
|
+
const {
|
|
396
|
+
classes: e,
|
|
397
|
+
orientation: l,
|
|
398
|
+
disabled: d
|
|
399
|
+
} = o;
|
|
400
|
+
return me({
|
|
401
|
+
root: ["root", l, d && "disabled"]
|
|
402
|
+
}, mt, e);
|
|
403
|
+
}, yt = L(ke, {
|
|
404
|
+
name: "MuiTabScrollButton",
|
|
405
|
+
slot: "Root",
|
|
406
|
+
overridesResolver: (o, e) => {
|
|
407
|
+
const {
|
|
408
|
+
ownerState: l
|
|
409
|
+
} = o;
|
|
410
|
+
return [e.root, l.orientation && e[l.orientation]];
|
|
411
|
+
}
|
|
412
|
+
})({
|
|
413
|
+
width: 40,
|
|
414
|
+
flexShrink: 0,
|
|
415
|
+
opacity: 0.8,
|
|
416
|
+
[`&.${St.disabled}`]: {
|
|
417
|
+
opacity: 0
|
|
418
|
+
},
|
|
419
|
+
variants: [{
|
|
420
|
+
props: {
|
|
421
|
+
orientation: "vertical"
|
|
422
|
+
},
|
|
423
|
+
style: {
|
|
424
|
+
width: "100%",
|
|
425
|
+
height: 40,
|
|
426
|
+
"& svg": {
|
|
427
|
+
transform: "var(--TabScrollButton-svgRotate)"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}]
|
|
431
|
+
}), Le = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
432
|
+
const d = he({
|
|
433
|
+
props: e,
|
|
434
|
+
name: "MuiTabScrollButton"
|
|
435
|
+
}), {
|
|
436
|
+
className: i,
|
|
437
|
+
slots: u = {},
|
|
438
|
+
slotProps: b = {},
|
|
439
|
+
direction: h,
|
|
440
|
+
orientation: f,
|
|
441
|
+
disabled: S,
|
|
442
|
+
...v
|
|
443
|
+
} = d, y = ze(), m = {
|
|
444
|
+
isRtl: y,
|
|
445
|
+
...d
|
|
446
|
+
}, C = vt(m), k = u.StartScrollButtonIcon ?? ut, I = u.EndScrollButtonIcon ?? pt, g = re({
|
|
447
|
+
elementType: k,
|
|
448
|
+
externalSlotProps: b.startScrollButtonIcon,
|
|
449
|
+
additionalProps: {
|
|
450
|
+
fontSize: "small"
|
|
451
|
+
},
|
|
452
|
+
ownerState: m
|
|
453
|
+
}), j = re({
|
|
454
|
+
elementType: I,
|
|
455
|
+
externalSlotProps: b.endScrollButtonIcon,
|
|
456
|
+
additionalProps: {
|
|
457
|
+
fontSize: "small"
|
|
458
|
+
},
|
|
459
|
+
ownerState: m
|
|
460
|
+
});
|
|
461
|
+
return /* @__PURE__ */ x(yt, {
|
|
462
|
+
component: "div",
|
|
463
|
+
className: W(C.root, i),
|
|
464
|
+
ref: l,
|
|
465
|
+
role: null,
|
|
466
|
+
ownerState: m,
|
|
467
|
+
tabIndex: null,
|
|
468
|
+
...v,
|
|
469
|
+
style: {
|
|
470
|
+
...v.style,
|
|
471
|
+
...f === "vertical" && {
|
|
472
|
+
"--TabScrollButton-svgRotate": `rotate(${y ? -90 : 90}deg)`
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
children: h === "left" ? /* @__PURE__ */ x(k, {
|
|
476
|
+
...g
|
|
477
|
+
}) : /* @__PURE__ */ x(I, {
|
|
478
|
+
...j
|
|
479
|
+
})
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
process.env.NODE_ENV !== "production" && (Le.propTypes = {
|
|
483
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
484
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
485
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
486
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
487
|
+
/**
|
|
488
|
+
* The content of the component.
|
|
489
|
+
*/
|
|
490
|
+
children: t.node,
|
|
491
|
+
/**
|
|
492
|
+
* Override or extend the styles applied to the component.
|
|
493
|
+
*/
|
|
494
|
+
classes: t.object,
|
|
495
|
+
/**
|
|
496
|
+
* @ignore
|
|
497
|
+
*/
|
|
498
|
+
className: t.string,
|
|
499
|
+
/**
|
|
500
|
+
* The direction the button should indicate.
|
|
501
|
+
*/
|
|
502
|
+
direction: t.oneOf(["left", "right"]).isRequired,
|
|
503
|
+
/**
|
|
504
|
+
* If `true`, the component is disabled.
|
|
505
|
+
* @default false
|
|
506
|
+
*/
|
|
507
|
+
disabled: t.bool,
|
|
508
|
+
/**
|
|
509
|
+
* The component orientation (layout flow direction).
|
|
510
|
+
*/
|
|
511
|
+
orientation: t.oneOf(["horizontal", "vertical"]).isRequired,
|
|
512
|
+
/**
|
|
513
|
+
* The extra props for the slot components.
|
|
514
|
+
* You can override the existing props or add new ones.
|
|
515
|
+
* @default {}
|
|
516
|
+
*/
|
|
517
|
+
slotProps: t.shape({
|
|
518
|
+
endScrollButtonIcon: t.oneOfType([t.func, t.object]),
|
|
519
|
+
startScrollButtonIcon: t.oneOfType([t.func, t.object])
|
|
520
|
+
}),
|
|
521
|
+
/**
|
|
522
|
+
* The components used for each slot inside.
|
|
523
|
+
* @default {}
|
|
524
|
+
*/
|
|
525
|
+
slots: t.shape({
|
|
526
|
+
EndScrollButtonIcon: t.elementType,
|
|
527
|
+
StartScrollButtonIcon: t.elementType
|
|
528
|
+
}),
|
|
529
|
+
/**
|
|
530
|
+
* @ignore
|
|
531
|
+
*/
|
|
532
|
+
style: t.object,
|
|
533
|
+
/**
|
|
534
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
535
|
+
*/
|
|
536
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
537
|
+
});
|
|
538
|
+
function gt(o) {
|
|
539
|
+
return pe("MuiTabs", o);
|
|
540
|
+
}
|
|
541
|
+
const ue = fe("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), Re = (o, e) => o === e ? o.firstChild : e && e.nextElementSibling ? e.nextElementSibling : o.firstChild, Oe = (o, e) => o === e ? o.lastChild : e && e.previousElementSibling ? e.previousElementSibling : o.lastChild, oe = (o, e, l) => {
|
|
542
|
+
let d = !1, i = l(o, e);
|
|
543
|
+
for (; i; ) {
|
|
544
|
+
if (i === o.firstChild) {
|
|
545
|
+
if (d)
|
|
546
|
+
return;
|
|
547
|
+
d = !0;
|
|
548
|
+
}
|
|
549
|
+
const u = i.disabled || i.getAttribute("aria-disabled") === "true";
|
|
550
|
+
if (!i.hasAttribute("tabindex") || u)
|
|
551
|
+
i = l(o, i);
|
|
552
|
+
else {
|
|
553
|
+
i.focus();
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}, Tt = (o) => {
|
|
558
|
+
const {
|
|
559
|
+
vertical: e,
|
|
560
|
+
fixed: l,
|
|
561
|
+
hideScrollbar: d,
|
|
562
|
+
scrollableX: i,
|
|
563
|
+
scrollableY: u,
|
|
564
|
+
centered: b,
|
|
565
|
+
scrollButtonsHideMobile: h,
|
|
566
|
+
classes: f
|
|
567
|
+
} = o;
|
|
568
|
+
return me({
|
|
569
|
+
root: ["root", e && "vertical"],
|
|
570
|
+
scroller: ["scroller", l && "fixed", d && "hideScrollbar", i && "scrollableX", u && "scrollableY"],
|
|
571
|
+
flexContainer: ["flexContainer", e && "flexContainerVertical", b && "centered"],
|
|
572
|
+
indicator: ["indicator"],
|
|
573
|
+
scrollButtons: ["scrollButtons", h && "scrollButtonsHideMobile"],
|
|
574
|
+
scrollableX: [i && "scrollableX"],
|
|
575
|
+
hideScrollbar: [d && "hideScrollbar"]
|
|
576
|
+
}, gt, f);
|
|
577
|
+
}, wt = L("div", {
|
|
578
|
+
name: "MuiTabs",
|
|
579
|
+
slot: "Root",
|
|
580
|
+
overridesResolver: (o, e) => {
|
|
581
|
+
const {
|
|
582
|
+
ownerState: l
|
|
583
|
+
} = o;
|
|
584
|
+
return [{
|
|
585
|
+
[`& .${ue.scrollButtons}`]: e.scrollButtons
|
|
586
|
+
}, {
|
|
587
|
+
[`& .${ue.scrollButtons}`]: l.scrollButtonsHideMobile && e.scrollButtonsHideMobile
|
|
588
|
+
}, e.root, l.vertical && e.vertical];
|
|
589
|
+
}
|
|
590
|
+
})(be(({
|
|
591
|
+
theme: o
|
|
592
|
+
}) => ({
|
|
593
|
+
overflow: "hidden",
|
|
594
|
+
minHeight: 48,
|
|
595
|
+
// Add iOS momentum scrolling for iOS < 13.0
|
|
596
|
+
WebkitOverflowScrolling: "touch",
|
|
597
|
+
display: "flex",
|
|
598
|
+
variants: [{
|
|
599
|
+
props: ({
|
|
600
|
+
ownerState: e
|
|
601
|
+
}) => e.vertical,
|
|
602
|
+
style: {
|
|
603
|
+
flexDirection: "column"
|
|
604
|
+
}
|
|
605
|
+
}, {
|
|
606
|
+
props: ({
|
|
607
|
+
ownerState: e
|
|
608
|
+
}) => e.scrollButtonsHideMobile,
|
|
609
|
+
style: {
|
|
610
|
+
[`& .${ue.scrollButtons}`]: {
|
|
611
|
+
[o.breakpoints.down("sm")]: {
|
|
612
|
+
display: "none"
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}]
|
|
617
|
+
}))), Bt = L("div", {
|
|
618
|
+
name: "MuiTabs",
|
|
619
|
+
slot: "Scroller",
|
|
620
|
+
overridesResolver: (o, e) => {
|
|
621
|
+
const {
|
|
622
|
+
ownerState: l
|
|
623
|
+
} = o;
|
|
624
|
+
return [e.scroller, l.fixed && e.fixed, l.hideScrollbar && e.hideScrollbar, l.scrollableX && e.scrollableX, l.scrollableY && e.scrollableY];
|
|
625
|
+
}
|
|
626
|
+
})({
|
|
627
|
+
position: "relative",
|
|
628
|
+
display: "inline-block",
|
|
629
|
+
flex: "1 1 auto",
|
|
630
|
+
whiteSpace: "nowrap",
|
|
631
|
+
variants: [{
|
|
632
|
+
props: ({
|
|
633
|
+
ownerState: o
|
|
634
|
+
}) => o.fixed,
|
|
635
|
+
style: {
|
|
636
|
+
overflowX: "hidden",
|
|
637
|
+
width: "100%"
|
|
638
|
+
}
|
|
639
|
+
}, {
|
|
640
|
+
props: ({
|
|
641
|
+
ownerState: o
|
|
642
|
+
}) => o.hideScrollbar,
|
|
643
|
+
style: {
|
|
644
|
+
// Hide dimensionless scrollbar on macOS
|
|
645
|
+
scrollbarWidth: "none",
|
|
646
|
+
// Firefox
|
|
647
|
+
"&::-webkit-scrollbar": {
|
|
648
|
+
display: "none"
|
|
649
|
+
// Safari + Chrome
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}, {
|
|
653
|
+
props: ({
|
|
654
|
+
ownerState: o
|
|
655
|
+
}) => o.scrollableX,
|
|
656
|
+
style: {
|
|
657
|
+
overflowX: "auto",
|
|
658
|
+
overflowY: "hidden"
|
|
659
|
+
}
|
|
660
|
+
}, {
|
|
661
|
+
props: ({
|
|
662
|
+
ownerState: o
|
|
663
|
+
}) => o.scrollableY,
|
|
664
|
+
style: {
|
|
665
|
+
overflowY: "auto",
|
|
666
|
+
overflowX: "hidden"
|
|
667
|
+
}
|
|
668
|
+
}]
|
|
669
|
+
}), xt = L("div", {
|
|
670
|
+
name: "MuiTabs",
|
|
671
|
+
slot: "FlexContainer",
|
|
672
|
+
overridesResolver: (o, e) => {
|
|
673
|
+
const {
|
|
674
|
+
ownerState: l
|
|
675
|
+
} = o;
|
|
676
|
+
return [e.flexContainer, l.vertical && e.flexContainerVertical, l.centered && e.centered];
|
|
677
|
+
}
|
|
678
|
+
})({
|
|
679
|
+
display: "flex",
|
|
680
|
+
variants: [{
|
|
681
|
+
props: ({
|
|
682
|
+
ownerState: o
|
|
683
|
+
}) => o.vertical,
|
|
684
|
+
style: {
|
|
685
|
+
flexDirection: "column"
|
|
686
|
+
}
|
|
687
|
+
}, {
|
|
688
|
+
props: ({
|
|
689
|
+
ownerState: o
|
|
690
|
+
}) => o.centered,
|
|
691
|
+
style: {
|
|
692
|
+
justifyContent: "center"
|
|
693
|
+
}
|
|
694
|
+
}]
|
|
695
|
+
}), Ct = L("span", {
|
|
696
|
+
name: "MuiTabs",
|
|
697
|
+
slot: "Indicator",
|
|
698
|
+
overridesResolver: (o, e) => e.indicator
|
|
699
|
+
})(be(({
|
|
700
|
+
theme: o
|
|
701
|
+
}) => ({
|
|
702
|
+
position: "absolute",
|
|
703
|
+
height: 2,
|
|
704
|
+
bottom: 0,
|
|
705
|
+
width: "100%",
|
|
706
|
+
transition: o.transitions.create(),
|
|
707
|
+
variants: [{
|
|
708
|
+
props: {
|
|
709
|
+
indicatorColor: "primary"
|
|
710
|
+
},
|
|
711
|
+
style: {
|
|
712
|
+
backgroundColor: (o.vars || o).palette.primary.main
|
|
713
|
+
}
|
|
714
|
+
}, {
|
|
715
|
+
props: {
|
|
716
|
+
indicatorColor: "secondary"
|
|
717
|
+
},
|
|
718
|
+
style: {
|
|
719
|
+
backgroundColor: (o.vars || o).palette.secondary.main
|
|
720
|
+
}
|
|
721
|
+
}, {
|
|
722
|
+
props: ({
|
|
723
|
+
ownerState: e
|
|
724
|
+
}) => e.vertical,
|
|
725
|
+
style: {
|
|
726
|
+
height: "100%",
|
|
727
|
+
width: 2,
|
|
728
|
+
right: 0
|
|
729
|
+
}
|
|
730
|
+
}]
|
|
731
|
+
}))), It = L(Fe)({
|
|
732
|
+
overflowX: "auto",
|
|
733
|
+
overflowY: "hidden",
|
|
734
|
+
// Hide dimensionless scrollbar on macOS
|
|
735
|
+
scrollbarWidth: "none",
|
|
736
|
+
// Firefox
|
|
737
|
+
"&::-webkit-scrollbar": {
|
|
738
|
+
display: "none"
|
|
739
|
+
// Safari + Chrome
|
|
740
|
+
}
|
|
741
|
+
}), Ne = {};
|
|
742
|
+
let Pe = !1;
|
|
743
|
+
const Et = /* @__PURE__ */ c.forwardRef(function(e, l) {
|
|
744
|
+
const d = he({
|
|
745
|
+
props: e,
|
|
746
|
+
name: "MuiTabs"
|
|
747
|
+
}), i = rt(), u = ze(), {
|
|
748
|
+
"aria-label": b,
|
|
749
|
+
"aria-labelledby": h,
|
|
750
|
+
action: f,
|
|
751
|
+
centered: S = !1,
|
|
752
|
+
children: v,
|
|
753
|
+
className: y,
|
|
754
|
+
component: m = "div",
|
|
755
|
+
allowScrollButtonsMobile: C = !1,
|
|
756
|
+
indicatorColor: k = "primary",
|
|
757
|
+
onChange: I,
|
|
758
|
+
orientation: g = "horizontal",
|
|
759
|
+
ScrollButtonComponent: j = Le,
|
|
760
|
+
scrollButtons: M = "auto",
|
|
761
|
+
selectionFollowsFocus: ne,
|
|
762
|
+
slots: H = {},
|
|
763
|
+
slotProps: U = {},
|
|
764
|
+
TabIndicatorProps: V = {},
|
|
765
|
+
TabScrollButtonProps: z = {},
|
|
766
|
+
textColor: G = "primary",
|
|
767
|
+
value: N,
|
|
768
|
+
variant: R = "standard",
|
|
769
|
+
visibleScrollbar: le = !1,
|
|
770
|
+
...je
|
|
771
|
+
} = d, w = R === "scrollable", B = g === "vertical", X = B ? "scrollTop" : "scrollLeft", J = B ? "top" : "left", Q = B ? "bottom" : "right", se = B ? "clientHeight" : "clientWidth", Y = B ? "height" : "width", D = {
|
|
772
|
+
...d,
|
|
773
|
+
component: m,
|
|
774
|
+
allowScrollButtonsMobile: C,
|
|
775
|
+
indicatorColor: k,
|
|
776
|
+
orientation: g,
|
|
777
|
+
vertical: B,
|
|
778
|
+
scrollButtons: M,
|
|
779
|
+
textColor: G,
|
|
780
|
+
variant: R,
|
|
781
|
+
visibleScrollbar: le,
|
|
782
|
+
fixed: !w,
|
|
783
|
+
hideScrollbar: w && !le,
|
|
784
|
+
scrollableX: w && !B,
|
|
785
|
+
scrollableY: w && B,
|
|
786
|
+
centered: S && !w,
|
|
787
|
+
scrollButtonsHideMobile: !C
|
|
788
|
+
}, P = Tt(D), He = re({
|
|
789
|
+
elementType: H.StartScrollButtonIcon,
|
|
790
|
+
externalSlotProps: U.startScrollButtonIcon,
|
|
791
|
+
ownerState: D
|
|
792
|
+
}), Ve = re({
|
|
793
|
+
elementType: H.EndScrollButtonIcon,
|
|
794
|
+
externalSlotProps: U.endScrollButtonIcon,
|
|
795
|
+
ownerState: D
|
|
796
|
+
});
|
|
797
|
+
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 [Se, Ue] = c.useState(!1), [$, ve] = c.useState(Ne), [ye, Xe] = c.useState(!1), [ge, Ye] = c.useState(!1), [Te, Ke] = c.useState(!1), [we, _e] = c.useState({
|
|
799
|
+
overflow: "hidden",
|
|
800
|
+
scrollbarWidth: 0
|
|
801
|
+
}), Z = /* @__PURE__ */ new Map(), O = c.useRef(null), A = c.useRef(null), Be = () => {
|
|
802
|
+
const r = O.current;
|
|
803
|
+
let n;
|
|
804
|
+
if (r) {
|
|
805
|
+
const a = r.getBoundingClientRect();
|
|
806
|
+
n = {
|
|
807
|
+
clientWidth: r.clientWidth,
|
|
808
|
+
scrollLeft: r.scrollLeft,
|
|
809
|
+
scrollTop: r.scrollTop,
|
|
810
|
+
scrollWidth: r.scrollWidth,
|
|
811
|
+
top: a.top,
|
|
812
|
+
bottom: a.bottom,
|
|
813
|
+
left: a.left,
|
|
814
|
+
right: a.right
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
let s;
|
|
818
|
+
if (r && N !== !1) {
|
|
819
|
+
const a = A.current.children;
|
|
820
|
+
if (a.length > 0) {
|
|
821
|
+
const p = a[Z.get(N)];
|
|
822
|
+
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" && !Pe && s && s.width === 0 && s.height === 0 && // if the whole Tabs component is hidden, don't warn
|
|
824
|
+
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
|
+
`)), Pe = !0);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return {
|
|
829
|
+
tabsMeta: n,
|
|
830
|
+
tabMeta: s
|
|
831
|
+
};
|
|
832
|
+
}, K = de(() => {
|
|
833
|
+
const {
|
|
834
|
+
tabsMeta: r,
|
|
835
|
+
tabMeta: n
|
|
836
|
+
} = Be();
|
|
837
|
+
let s = 0, a;
|
|
838
|
+
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
|
+
const p = {
|
|
840
|
+
[a]: s,
|
|
841
|
+
// May be wrong until the font is loaded.
|
|
842
|
+
[Y]: n ? n[Y] : 0
|
|
843
|
+
};
|
|
844
|
+
if (typeof $[a] != "number" || typeof $[Y] != "number")
|
|
845
|
+
ve(p);
|
|
846
|
+
else {
|
|
847
|
+
const E = Math.abs($[a] - p[a]), F = Math.abs($[Y] - p[Y]);
|
|
848
|
+
(E >= 1 || F >= 1) && ve(p);
|
|
849
|
+
}
|
|
850
|
+
}), ae = (r, {
|
|
851
|
+
animation: n = !0
|
|
852
|
+
} = {}) => {
|
|
853
|
+
n ? bt(X, O.current, r, {
|
|
854
|
+
duration: i.transitions.duration.standard
|
|
855
|
+
}) : O.current[X] = r;
|
|
856
|
+
}, xe = (r) => {
|
|
857
|
+
let n = O.current[X];
|
|
858
|
+
B ? n += r : n += r * (u ? -1 : 1), ae(n);
|
|
859
|
+
}, Ce = () => {
|
|
860
|
+
const r = O.current[se];
|
|
861
|
+
let n = 0;
|
|
862
|
+
const s = Array.from(A.current.children);
|
|
863
|
+
for (let a = 0; a < s.length; a += 1) {
|
|
864
|
+
const p = s[a];
|
|
865
|
+
if (n + p[se] > r) {
|
|
866
|
+
a === 0 && (n = r);
|
|
867
|
+
break;
|
|
868
|
+
}
|
|
869
|
+
n += p[se];
|
|
870
|
+
}
|
|
871
|
+
return n;
|
|
872
|
+
}, qe = () => {
|
|
873
|
+
xe(-1 * Ce());
|
|
874
|
+
}, Ge = () => {
|
|
875
|
+
xe(Ce());
|
|
876
|
+
}, Je = c.useCallback((r) => {
|
|
877
|
+
_e({
|
|
878
|
+
overflow: null,
|
|
879
|
+
scrollbarWidth: r
|
|
880
|
+
});
|
|
881
|
+
}, []), Qe = () => {
|
|
882
|
+
const r = {};
|
|
883
|
+
r.scrollbarSizeListener = w ? /* @__PURE__ */ x(It, {
|
|
884
|
+
onChange: Je,
|
|
885
|
+
className: W(P.scrollableX, P.hideScrollbar)
|
|
886
|
+
}) : null;
|
|
887
|
+
const s = w && (M === "auto" && (ye || ge) || M === !0);
|
|
888
|
+
return r.scrollButtonStart = s ? /* @__PURE__ */ x(j, {
|
|
889
|
+
slots: {
|
|
890
|
+
StartScrollButtonIcon: H.StartScrollButtonIcon
|
|
891
|
+
},
|
|
892
|
+
slotProps: {
|
|
893
|
+
startScrollButtonIcon: He
|
|
894
|
+
},
|
|
895
|
+
orientation: g,
|
|
896
|
+
direction: u ? "right" : "left",
|
|
897
|
+
onClick: qe,
|
|
898
|
+
disabled: !ye,
|
|
899
|
+
...z,
|
|
900
|
+
className: W(P.scrollButtons, z.className)
|
|
901
|
+
}) : null, r.scrollButtonEnd = s ? /* @__PURE__ */ x(j, {
|
|
902
|
+
slots: {
|
|
903
|
+
EndScrollButtonIcon: H.EndScrollButtonIcon
|
|
904
|
+
},
|
|
905
|
+
slotProps: {
|
|
906
|
+
endScrollButtonIcon: Ve
|
|
907
|
+
},
|
|
908
|
+
orientation: g,
|
|
909
|
+
direction: u ? "left" : "right",
|
|
910
|
+
onClick: Ge,
|
|
911
|
+
disabled: !ge,
|
|
912
|
+
...z,
|
|
913
|
+
className: W(P.scrollButtons, z.className)
|
|
914
|
+
}) : null, r;
|
|
915
|
+
}, Ie = de((r) => {
|
|
916
|
+
const {
|
|
917
|
+
tabsMeta: n,
|
|
918
|
+
tabMeta: s
|
|
919
|
+
} = Be();
|
|
920
|
+
if (!(!s || !n)) {
|
|
921
|
+
if (s[J] < n[J]) {
|
|
922
|
+
const a = n[X] + (s[J] - n[J]);
|
|
923
|
+
ae(a, {
|
|
924
|
+
animation: r
|
|
925
|
+
});
|
|
926
|
+
} else if (s[Q] > n[Q]) {
|
|
927
|
+
const a = n[X] + (s[Q] - n[Q]);
|
|
928
|
+
ae(a, {
|
|
929
|
+
animation: r
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}), ee = de(() => {
|
|
934
|
+
w && M !== !1 && Ke(!Te);
|
|
935
|
+
});
|
|
936
|
+
c.useEffect(() => {
|
|
937
|
+
const r = $e(() => {
|
|
938
|
+
O.current && K();
|
|
939
|
+
});
|
|
940
|
+
let n;
|
|
941
|
+
const s = (E) => {
|
|
942
|
+
E.forEach((F) => {
|
|
943
|
+
F.removedNodes.forEach((_) => {
|
|
944
|
+
n == null || n.unobserve(_);
|
|
945
|
+
}), F.addedNodes.forEach((_) => {
|
|
946
|
+
n == null || n.observe(_);
|
|
947
|
+
});
|
|
948
|
+
}), r(), ee();
|
|
949
|
+
}, a = De(O.current);
|
|
950
|
+
a.addEventListener("resize", r);
|
|
951
|
+
let p;
|
|
952
|
+
return typeof ResizeObserver < "u" && (n = new ResizeObserver(r), Array.from(A.current.children).forEach((E) => {
|
|
953
|
+
n.observe(E);
|
|
954
|
+
})), typeof MutationObserver < "u" && (p = new MutationObserver(s), p.observe(A.current, {
|
|
955
|
+
childList: !0
|
|
956
|
+
})), () => {
|
|
957
|
+
r.clear(), a.removeEventListener("resize", r), p == null || p.disconnect(), n == null || n.disconnect();
|
|
958
|
+
};
|
|
959
|
+
}, [K, ee]), c.useEffect(() => {
|
|
960
|
+
const r = Array.from(A.current.children), n = r.length;
|
|
961
|
+
if (typeof IntersectionObserver < "u" && n > 0 && w && M !== !1) {
|
|
962
|
+
const s = r[0], a = r[n - 1], p = {
|
|
963
|
+
root: O.current,
|
|
964
|
+
threshold: 0.99
|
|
965
|
+
}, E = (ce) => {
|
|
966
|
+
Xe(!ce[0].isIntersecting);
|
|
967
|
+
}, F = new IntersectionObserver(E, p);
|
|
968
|
+
F.observe(s);
|
|
969
|
+
const _ = (ce) => {
|
|
970
|
+
Ye(!ce[0].isIntersecting);
|
|
971
|
+
}, Me = new IntersectionObserver(_, p);
|
|
972
|
+
return Me.observe(a), () => {
|
|
973
|
+
F.disconnect(), Me.disconnect();
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
}, [w, M, Te, v == null ? void 0 : v.length]), c.useEffect(() => {
|
|
977
|
+
Ue(!0);
|
|
978
|
+
}, []), c.useEffect(() => {
|
|
979
|
+
K();
|
|
980
|
+
}), c.useEffect(() => {
|
|
981
|
+
Ie(Ne !== $);
|
|
982
|
+
}, [Ie, $]), c.useImperativeHandle(f, () => ({
|
|
983
|
+
updateIndicator: K,
|
|
984
|
+
updateScrollButtons: ee
|
|
985
|
+
}), [K, ee]);
|
|
986
|
+
const Ee = /* @__PURE__ */ x(Ct, {
|
|
987
|
+
...V,
|
|
988
|
+
className: W(P.indicator, V.className),
|
|
989
|
+
ownerState: D,
|
|
990
|
+
style: {
|
|
991
|
+
...$,
|
|
992
|
+
...V.style
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
let te = 0;
|
|
996
|
+
const Ze = c.Children.map(v, (r) => {
|
|
997
|
+
if (!/* @__PURE__ */ c.isValidElement(r))
|
|
998
|
+
return null;
|
|
999
|
+
process.env.NODE_ENV !== "production" && tt.isFragment(r) && console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
|
|
1000
|
+
`));
|
|
1001
|
+
const n = r.props.value === void 0 ? te : r.props.value;
|
|
1002
|
+
Z.set(n, te);
|
|
1003
|
+
const s = n === N;
|
|
1004
|
+
return te += 1, /* @__PURE__ */ c.cloneElement(r, {
|
|
1005
|
+
fullWidth: R === "fullWidth",
|
|
1006
|
+
indicator: s && !Se && Ee,
|
|
1007
|
+
selected: s,
|
|
1008
|
+
selectionFollowsFocus: ne,
|
|
1009
|
+
onChange: I,
|
|
1010
|
+
textColor: G,
|
|
1011
|
+
value: n,
|
|
1012
|
+
...te === 1 && N === !1 && !r.props.tabIndex ? {
|
|
1013
|
+
tabIndex: 0
|
|
1014
|
+
} : {}
|
|
1015
|
+
});
|
|
1016
|
+
}), et = (r) => {
|
|
1017
|
+
const n = A.current, s = st(n).activeElement;
|
|
1018
|
+
if (s.getAttribute("role") !== "tab")
|
|
1019
|
+
return;
|
|
1020
|
+
let p = g === "horizontal" ? "ArrowLeft" : "ArrowUp", E = g === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
1021
|
+
switch (g === "horizontal" && u && (p = "ArrowRight", E = "ArrowLeft"), r.key) {
|
|
1022
|
+
case p:
|
|
1023
|
+
r.preventDefault(), oe(n, s, Oe);
|
|
1024
|
+
break;
|
|
1025
|
+
case E:
|
|
1026
|
+
r.preventDefault(), oe(n, s, Re);
|
|
1027
|
+
break;
|
|
1028
|
+
case "Home":
|
|
1029
|
+
r.preventDefault(), oe(n, null, Re);
|
|
1030
|
+
break;
|
|
1031
|
+
case "End":
|
|
1032
|
+
r.preventDefault(), oe(n, null, Oe);
|
|
1033
|
+
break;
|
|
1034
|
+
}
|
|
1035
|
+
}, ie = Qe();
|
|
1036
|
+
return /* @__PURE__ */ q(wt, {
|
|
1037
|
+
className: W(P.root, y),
|
|
1038
|
+
ownerState: D,
|
|
1039
|
+
ref: l,
|
|
1040
|
+
as: m,
|
|
1041
|
+
...je,
|
|
1042
|
+
children: [ie.scrollButtonStart, ie.scrollbarSizeListener, /* @__PURE__ */ q(Bt, {
|
|
1043
|
+
className: P.scroller,
|
|
1044
|
+
ownerState: D,
|
|
1045
|
+
style: {
|
|
1046
|
+
overflow: we.overflow,
|
|
1047
|
+
[B ? `margin${u ? "Left" : "Right"}` : "marginBottom"]: le ? void 0 : -we.scrollbarWidth
|
|
1048
|
+
},
|
|
1049
|
+
ref: O,
|
|
1050
|
+
children: [/* @__PURE__ */ x(xt, {
|
|
1051
|
+
"aria-label": b,
|
|
1052
|
+
"aria-labelledby": h,
|
|
1053
|
+
"aria-orientation": g === "vertical" ? "vertical" : null,
|
|
1054
|
+
className: P.flexContainer,
|
|
1055
|
+
ownerState: D,
|
|
1056
|
+
onKeyDown: et,
|
|
1057
|
+
ref: A,
|
|
1058
|
+
role: "tablist",
|
|
1059
|
+
children: Ze
|
|
1060
|
+
}), Se && Ee]
|
|
1061
|
+
}), ie.scrollButtonEnd]
|
|
1062
|
+
});
|
|
1063
|
+
});
|
|
1064
|
+
process.env.NODE_ENV !== "production" && (Et.propTypes = {
|
|
1065
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1066
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1067
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
1068
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1069
|
+
/**
|
|
1070
|
+
* Callback fired when the component mounts.
|
|
1071
|
+
* This is useful when you want to trigger an action programmatically.
|
|
1072
|
+
* It supports two actions: `updateIndicator()` and `updateScrollButtons()`
|
|
1073
|
+
*
|
|
1074
|
+
* @param {object} actions This object contains all possible actions
|
|
1075
|
+
* that can be triggered programmatically.
|
|
1076
|
+
*/
|
|
1077
|
+
action: lt,
|
|
1078
|
+
/**
|
|
1079
|
+
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
1080
|
+
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
1081
|
+
* @default false
|
|
1082
|
+
*/
|
|
1083
|
+
allowScrollButtonsMobile: t.bool,
|
|
1084
|
+
/**
|
|
1085
|
+
* The label for the Tabs as a string.
|
|
1086
|
+
*/
|
|
1087
|
+
"aria-label": t.string,
|
|
1088
|
+
/**
|
|
1089
|
+
* An id or list of ids separated by a space that label the Tabs.
|
|
1090
|
+
*/
|
|
1091
|
+
"aria-labelledby": t.string,
|
|
1092
|
+
/**
|
|
1093
|
+
* If `true`, the tabs are centered.
|
|
1094
|
+
* This prop is intended for large views.
|
|
1095
|
+
* @default false
|
|
1096
|
+
*/
|
|
1097
|
+
centered: t.bool,
|
|
1098
|
+
/**
|
|
1099
|
+
* The content of the component.
|
|
1100
|
+
*/
|
|
1101
|
+
children: t.node,
|
|
1102
|
+
/**
|
|
1103
|
+
* Override or extend the styles applied to the component.
|
|
1104
|
+
*/
|
|
1105
|
+
classes: t.object,
|
|
1106
|
+
/**
|
|
1107
|
+
* @ignore
|
|
1108
|
+
*/
|
|
1109
|
+
className: t.string,
|
|
1110
|
+
/**
|
|
1111
|
+
* The component used for the root node.
|
|
1112
|
+
* Either a string to use a HTML element or a component.
|
|
1113
|
+
*/
|
|
1114
|
+
component: t.elementType,
|
|
1115
|
+
/**
|
|
1116
|
+
* Determines the color of the indicator.
|
|
1117
|
+
* @default 'primary'
|
|
1118
|
+
*/
|
|
1119
|
+
indicatorColor: t.oneOfType([t.oneOf(["primary", "secondary"]), t.string]),
|
|
1120
|
+
/**
|
|
1121
|
+
* Callback fired when the value changes.
|
|
1122
|
+
*
|
|
1123
|
+
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
1124
|
+
* @param {any} value We default to the index of the child (number)
|
|
1125
|
+
*/
|
|
1126
|
+
onChange: t.func,
|
|
1127
|
+
/**
|
|
1128
|
+
* The component orientation (layout flow direction).
|
|
1129
|
+
* @default 'horizontal'
|
|
1130
|
+
*/
|
|
1131
|
+
orientation: t.oneOf(["horizontal", "vertical"]),
|
|
1132
|
+
/**
|
|
1133
|
+
* The component used to render the scroll buttons.
|
|
1134
|
+
* @default TabScrollButton
|
|
1135
|
+
*/
|
|
1136
|
+
ScrollButtonComponent: t.elementType,
|
|
1137
|
+
/**
|
|
1138
|
+
* Determine behavior of scroll buttons when tabs are set to scroll:
|
|
1139
|
+
*
|
|
1140
|
+
* - `auto` will only present them when not all the items are visible.
|
|
1141
|
+
* - `true` will always present them.
|
|
1142
|
+
* - `false` will never present them.
|
|
1143
|
+
*
|
|
1144
|
+
* By default the scroll buttons are hidden on mobile.
|
|
1145
|
+
* This behavior can be disabled with `allowScrollButtonsMobile`.
|
|
1146
|
+
* @default 'auto'
|
|
1147
|
+
*/
|
|
1148
|
+
scrollButtons: t.oneOf(["auto", !1, !0]),
|
|
1149
|
+
/**
|
|
1150
|
+
* If `true` the selected tab changes on focus. Otherwise it only
|
|
1151
|
+
* changes on activation.
|
|
1152
|
+
*/
|
|
1153
|
+
selectionFollowsFocus: t.bool,
|
|
1154
|
+
/**
|
|
1155
|
+
* The extra props for the slot components.
|
|
1156
|
+
* You can override the existing props or add new ones.
|
|
1157
|
+
* @default {}
|
|
1158
|
+
*/
|
|
1159
|
+
slotProps: t.shape({
|
|
1160
|
+
endScrollButtonIcon: t.oneOfType([t.func, t.object]),
|
|
1161
|
+
startScrollButtonIcon: t.oneOfType([t.func, t.object])
|
|
1162
|
+
}),
|
|
1163
|
+
/**
|
|
1164
|
+
* The components used for each slot inside.
|
|
1165
|
+
* @default {}
|
|
1166
|
+
*/
|
|
1167
|
+
slots: t.shape({
|
|
1168
|
+
EndScrollButtonIcon: t.elementType,
|
|
1169
|
+
StartScrollButtonIcon: t.elementType
|
|
1170
|
+
}),
|
|
1171
|
+
/**
|
|
1172
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1173
|
+
*/
|
|
1174
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
1175
|
+
/**
|
|
1176
|
+
* Props applied to the tab indicator element.
|
|
1177
|
+
* @default {}
|
|
1178
|
+
*/
|
|
1179
|
+
TabIndicatorProps: t.object,
|
|
1180
|
+
/**
|
|
1181
|
+
* Props applied to the [`TabScrollButton`](https://mui.com/material-ui/api/tab-scroll-button/) element.
|
|
1182
|
+
* @default {}
|
|
1183
|
+
*/
|
|
1184
|
+
TabScrollButtonProps: t.object,
|
|
1185
|
+
/**
|
|
1186
|
+
* Determines the color of the `Tab`.
|
|
1187
|
+
* @default 'primary'
|
|
1188
|
+
*/
|
|
1189
|
+
textColor: t.oneOf(["inherit", "primary", "secondary"]),
|
|
1190
|
+
/**
|
|
1191
|
+
* The value of the currently selected `Tab`.
|
|
1192
|
+
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
1193
|
+
*/
|
|
1194
|
+
value: t.any,
|
|
1195
|
+
/**
|
|
1196
|
+
* Determines additional display behavior of the tabs:
|
|
1197
|
+
*
|
|
1198
|
+
* - `scrollable` will invoke scrolling properties and allow for horizontally
|
|
1199
|
+
* scrolling (or swiping) of the tab bar.
|
|
1200
|
+
* - `fullWidth` will make the tabs grow to use all the available space,
|
|
1201
|
+
* which should be used for small views, like on mobile.
|
|
1202
|
+
* - `standard` will render the default state.
|
|
1203
|
+
* @default 'standard'
|
|
1204
|
+
*/
|
|
1205
|
+
variant: t.oneOf(["fullWidth", "scrollable", "standard"]),
|
|
1206
|
+
/**
|
|
1207
|
+
* If `true`, the scrollbar is visible. It can be useful when displaying
|
|
1208
|
+
* a long vertical list of tabs.
|
|
1209
|
+
* @default false
|
|
1210
|
+
*/
|
|
1211
|
+
visibleScrollbar: t.bool
|
|
1212
|
+
});
|
|
1213
|
+
export {
|
|
1214
|
+
pt as K,
|
|
1215
|
+
dt as T,
|
|
1216
|
+
Et as a,
|
|
1217
|
+
ue as b,
|
|
1218
|
+
gt as c,
|
|
1219
|
+
ut as d,
|
|
1220
|
+
at as g,
|
|
1221
|
+
T as t
|
|
1222
|
+
};
|