@m4l/components 0.1.62 → 0.1.63
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/@types/export.d.ts +45 -4
- package/components/AccountPopover/AccountPopover.d.ts +2 -0
- package/components/AccountPopover/classes/constants.d.ts +1 -0
- package/components/AccountPopover/classes/index.d.ts +7 -0
- package/components/AccountPopover/classes/types.d.ts +5 -0
- package/components/AccountPopover/index.d.ts +2 -0
- package/components/AccountPopover/style.d.ts +2 -0
- package/components/AccountPopover/subcomponents/PopOver/index.d.ts +2 -0
- package/components/AccountPopover/subcomponents/PopOver/styles.d.ts +8 -0
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +9 -0
- package/components/AccountPopover/types.d.ts +28 -0
- package/components/AppBar/AppBar.d.ts +2 -0
- package/components/AppBar/classes/constants.d.ts +1 -0
- package/components/AppBar/classes/index.d.ts +6 -0
- package/components/AppBar/classes/types.d.ts +4 -0
- package/components/AppBar/index.d.ts +1 -0
- package/components/AppBar/styles.d.ts +2 -0
- package/components/AppBar/subcomponents/MyAvatar/createAvatar.d.ts +4 -0
- package/components/AppBar/subcomponents/MyAvatar/index.d.ts +2 -0
- package/components/AppBar/tests/constants.d.ts +1 -0
- package/components/AppBar/tests/utils.d.ts +2 -0
- package/components/AppBar/types.d.ts +9 -0
- package/components/CommonActions/components/ActionCancel/{index.a81752ef.js → index.2eb2c1e1.js} +1 -1
- package/components/CommonActions/components/ActionCancel/index.d.ts +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.2124a98a.js → index.2864d574.js} +16 -17
- package/components/CommonActions/components/ActionFormIntro/index.d.ts +2 -2
- package/components/CommonActions/components/ActionFormIntro/{index.ca4d2674.js → index.e7f83ddd.js} +1 -1
- package/components/CommonActions/components/ActionIntro/{index.3f75a205.js → index.0d138cb3.js} +2 -2
- package/components/CommonActions/components/ActionIntro/index.d.ts +2 -2
- package/components/CommonActions/components/Actions/{index.6eb24c0b.js → index.433cd345.js} +17 -15
- package/components/CommonActions/components/Actions/styles.d.ts +2 -0
- package/components/DataGrid/{index.58f35158.js → index.42521a55.js} +24 -22
- package/components/DataGrid/styles.d.ts +3 -0
- package/components/DataGrid/subcomponents/Actions/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/styles.d.ts +3 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/styles.d.ts +4 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +8 -0
- package/components/DataGrid/subcomponents/Table/styles.d.ts +3 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +6 -0
- package/components/DynamicFilter/{index.10f901c6.js → index.442bda79.js} +38 -37
- package/components/DynamicFilter/subcomponents/ApplyedFilters/styles.d.ts +3 -0
- package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/styles.d.ts +6 -0
- package/components/DynamicFilter/subcomponents/ClearFilters/styles.d.ts +3 -0
- package/components/DynamicFilter/subcomponents/FilterButton/styles.d.ts +3 -0
- package/components/DynamicFilter/subcomponents/InnerForHooks/styles.d.ts +3 -0
- package/components/DynamicFilter/subcomponents/InputFilter/styles.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/styles.d.ts +3 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/styles.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/styles.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/styles.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/styles.d.ts +2 -0
- package/components/HelperText/index.3c07ca2a.js +70 -0
- package/components/HelperText/index.d.ts +10 -0
- package/components/HelperText/styles.d.ts +2 -0
- package/components/HelperText/types.d.ts +8 -0
- package/components/HelperText/utils/Clases/constant.d.ts +1 -0
- package/components/HelperText/utils/Clases/index.d.ts +7 -0
- package/components/HelperText/utils/Clases/types.d.ts +7 -0
- package/components/Icon/classes/index.d.ts +1 -1
- package/components/Icon/classes/types.d.ts +3 -8
- package/components/Icon/index.0f9b360e.js +200 -0
- package/components/Icon/styles.d.ts +4 -0
- package/components/Icon/tests/constants.d.ts +1 -0
- package/components/Icon/tests/utils.d.ts +2 -0
- package/components/Icon/types.d.ts +3 -4
- package/components/Image/{index.aa24e982.js → index.1a9c0327.js} +124 -56
- package/components/Image/styles.d.ts +3 -0
- package/components/Image/subcomponents/LazyLoadComponent/styles.d.ts +2 -0
- package/components/Image/subcomponents/Skeleton/styles.d.ts +2 -0
- package/components/Image/subcomponents/Skeleton/types.d.ts +2 -0
- package/components/Image/tests/constants.d.ts +1 -0
- package/components/Image/tests/utils.d.ts +2 -0
- package/components/Image/types.d.ts +9 -2
- package/components/Image/utils/classes/types.d.ts +1 -0
- package/components/Image/utils/getRatioValues.d.ts +5 -0
- package/components/LanguagePopover/classes/types.d.ts +1 -0
- package/components/LanguagePopover/{index.df9b47a6.js → index.68de7176.js} +49 -25
- package/components/LanguagePopover/styles.d.ts +6 -0
- package/components/LanguagePopover/tests/constants.d.ts +1 -0
- package/components/LanguagePopover/tests/utils.d.ts +2 -0
- package/components/ModalDialog/{index.dc7ebe06.js → index.3efe049b.js} +5 -5
- package/components/NavLink/NavLink.d.ts +2 -0
- package/components/NavLink/classes/constant.d.ts +1 -0
- package/components/NavLink/classes/index.d.ts +6 -0
- package/components/NavLink/classes/types.d.ts +4 -0
- package/components/NavLink/index.ae9f1cc9.js +74 -0
- package/components/NavLink/index.d.ts +1 -0
- package/components/NavLink/styles.d.ts +2 -0
- package/components/NavLink/tests/constants.d.ts +1 -0
- package/components/NavLink/tests/utils.d.ts +2 -0
- package/components/NavLink/types.d.ts +5 -0
- package/components/NoItemSelected/{index.9636ec8a.js → index.7cfd7613.js} +2 -4
- package/components/NoItemSelected/styles.d.ts +5 -0
- package/components/ObjectLogs/components/DetailDialog/styles.d.ts +3 -0
- package/components/ObjectLogs/{index.38c2ad18.js → index.b50726fb.js} +20 -18
- package/components/ObjectLogs/styles.d.ts +4 -0
- package/components/PaperForm/{index.3cdac885.js → index.44bf4469.js} +1 -1
- package/components/PaperForm/styles.d.ts +7 -0
- package/components/Period/{index.796b3af4.js → index.99feb99e.js} +18 -17
- package/components/Period/styles.d.ts +7 -0
- package/components/PropertyValue/styles.d.ts +6 -0
- package/components/Resizeable/{index.04fa8de5.js → index.b5d42efb.js} +1 -1
- package/components/ResizeableWindow/styles.d.ts +5 -0
- package/components/ScrollBar/{index.b77feabd.js → index.bbe48f4d.js} +7 -2
- package/components/ScrollBar/styles.d.ts +8 -0
- package/components/SideBar/SideBar.d.ts +2 -0
- package/components/SideBar/classes/constants.d.ts +1 -0
- package/components/SideBar/classes/index.d.ts +37 -0
- package/components/SideBar/classes/types.d.ts +37 -0
- package/components/SideBar/context/sideBarContext/index.d.ts +5 -0
- package/components/SideBar/context/sideBarContext/types.d.ts +9 -0
- package/components/SideBar/hooks/useSideBar/index.d.ts +2 -0
- package/components/SideBar/index.011880b6.js +1010 -0
- package/components/SideBar/index.d.ts +2 -0
- package/components/SideBar/styles.d.ts +5 -0
- package/components/SideBar/subcomponents/ContentDesktop/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentDesktop/style.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +6 -0
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +5 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/types.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +9 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/styles.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/type.d.ts +9 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +14 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +22 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/types.d.ts +7 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/types.d.ts +13 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/type.d.ts +12 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/types.d.ts +13 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/styles.d.ts +5 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/types.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentGroups/type.d.ts +7 -0
- package/components/SideBar/subcomponents/ContentMobile/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +3 -0
- package/components/SideBar/tests/constants.d.ts +5 -0
- package/components/SideBar/tests/utils.d.ts +2 -0
- package/components/SideBar/types.d.ts +29 -0
- package/components/SplitLayout/styles.d.ts +4 -0
- package/components/animate/LoadingScreen/styles.d.ts +3 -0
- package/components/animate/PropagateLoader/syles.d.ts +2 -0
- package/components/areas/components/Area/styles.d.ts +6 -0
- package/components/areas/components/AreasAdmin/{index.645bd2c7.js → index.51e28f63.js} +11 -10
- package/components/areas/components/AreasAdmin/styles.d.ts +2 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +3 -0
- package/components/areas/components/AreasContainer/{index.3e74c849.js → index.1e5e6e91.js} +3 -3
- package/components/areas/components/AreasContainer/styles.d.ts +2 -0
- package/components/areas/components/GridLayout/{index.50810712.js → index.5bf8d5e4.js} +5 -5
- package/components/areas/components/GridLayout/styles.d.ts +7 -0
- package/components/areas/components/Window/{index.8040dbe4.js → index.416a874f.js} +49 -49
- package/components/areas/components/Window/styles.d.ts +6 -0
- package/components/areas/components/Window/subcomponents/InnerForHooks/styles.d.ts +2 -0
- package/components/areas/components/Window/subcomponents/InnerForHooks/subcomponents/Header/styles.d.ts +9 -0
- package/components/areas/components/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/styles.d.ts +2 -0
- package/components/areas/components/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/styles.d.ts +2 -0
- package/components/areas/components/WindowModal/styles.d.ts +3 -0
- package/components/areas/components/WindowPopUp/{index.4514046e.js → index.f053fca7.js} +45 -42
- package/components/areas/components/WindowsPanel/styles.d.ts +10 -0
- package/components/areas/components/{index.9f62ca8e.js → index.eace295a.js} +10 -10
- package/components/areas/contexts/AreaContext/{index.368adb8d.js → index.7890e58d.js} +1 -1
- package/components/areas/contexts/AreasContext/{index.f3d6e728.js → index.0792a8d1.js} +1 -1
- package/components/areas/contexts/{index.3623b460.js → index.2a915acf.js} +1 -1
- package/components/areas/hooks/{index.18982960.js → index.f4d78492.js} +1 -1
- package/components/areas/hooks/useArea/{index.dab7ce20.js → index.d6263051.js} +2 -2
- package/components/areas/index.8fca0f8f.js +20 -0
- package/components/formatters/BooleanFormatter/{index.bf947220.js → index.cd00c8e1.js} +2 -3
- package/components/formatters/{index.acd3dcea.js → index.deae4701.js} +2 -3
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/classes/constant.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +10 -0
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +15 -0
- package/components/hook-form/RHFAutocomplete/index.083e23c1.js +400 -0
- package/components/hook-form/RHFAutocomplete/index.d.ts +1 -2
- package/components/hook-form/RHFAutocomplete/styles.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/styles.d.ts +4 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/test/constants.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/test/utils.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +9 -0
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +7 -0
- package/components/hook-form/RHFAutocompleteAsync/classes/constant.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/classes/index.d.ts +6 -0
- package/components/hook-form/RHFAutocompleteAsync/classes/types.d.ts +4 -0
- package/components/hook-form/RHFAutocompleteAsync/index.ba751be9.js +156 -0
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +5 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/constants.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/utils.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/classes/index.d.ts +3 -1
- package/components/hook-form/RHFCheckbox/classes/types.d.ts +4 -0
- package/components/hook-form/RHFCheckbox/index.c19393b1.js +152 -0
- package/components/hook-form/RHFCheckbox/styles.d.ts +15 -0
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/styles.d.ts +3 -0
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/types.d.ts +1 -0
- package/components/hook-form/RHFCheckbox/test/constants.d.ts +4 -0
- package/components/hook-form/RHFCheckbox/test/utils.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/types.d.ts +1 -0
- package/components/hook-form/RHFDateTime/subcomponents/Skeleton/styles.d.ts +2 -0
- package/components/hook-form/RHFPeriod/{index.c4944f9c.js → index.c0a80aeb.js} +3 -3
- package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
- package/components/hook-form/RHFTextField/RHFTextField.d.ts +1 -1
- package/components/hook-form/RHFTextField/classes/index.d.ts +3 -1
- package/components/hook-form/RHFTextField/classes/types.d.ts +9 -3
- package/components/hook-form/RHFTextField/index.97485ff2.js +341 -0
- package/components/hook-form/RHFTextField/styles.d.ts +3 -0
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +3 -0
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/types.d.ts +2 -2
- package/components/hook-form/RHFTextField/tests/{contants.d.ts → constants.d.ts} +1 -0
- package/components/hook-form/RHFTextField/tests/utils.d.ts +2 -0
- package/components/hook-form/RHFTextField/types.d.ts +15 -1
- package/components/hook-form/RHFTextFieldPassword/styles.d.ts +2 -0
- package/components/hook-form/RHFTextFieldPassword/tests/constants.d.ts +2 -0
- package/components/hook-form/RHFTextFieldPassword/tests/utils.d.ts +2 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +2 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +12 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/styles.d.ts +2 -0
- package/components/hook-form/RHFUpload/{index.7fdff30f.js → index.798eb11d.js} +3 -5
- package/components/hook-form/index.d.ts +2 -2
- package/components/index.d.ts +9 -2
- package/components/modal/ModalDialog/styles.d.ts +9 -0
- package/components/modal/WindowBase/styles.d.ts +2 -0
- package/components/modal/WindowBase/subcomponents/Header/styles.d.ts +6 -0
- package/components/modal/{WindowBase.7828e042.js → WindowBase.59f50553.js} +3 -3
- package/components/modal/WindowConfirm/subcomponents/MessageIlustration/styles.d.ts +6 -0
- package/components/modal/{WindowConfirm.42ec4dcd.js → WindowConfirm.c1339cf8.js} +21 -19
- package/components/modal/index.7a84f64d.js +30 -0
- package/components/mui_extended/Accordion/{index.725a10af.js → index.b7487e37.js} +2 -2
- package/components/mui_extended/Accordion/styles.d.ts +4 -0
- package/components/mui_extended/Button/classes/index.d.ts +2 -1
- package/components/mui_extended/Button/classes/types.d.ts +7 -1
- package/components/mui_extended/Button/index.d9e0ae2e.js +208 -0
- package/components/mui_extended/Button/styles.d.ts +13 -0
- package/components/mui_extended/Button/types.d.ts +6 -1
- package/components/mui_extended/IconButton/IconButton.d.ts +1 -2
- package/components/mui_extended/IconButton/classes/index.d.ts +2 -1
- package/components/mui_extended/IconButton/classes/types.d.ts +8 -0
- package/components/mui_extended/IconButton/{index.afa201a7.js → index.be9c2ce5.js} +48 -22
- package/components/mui_extended/IconButton/styles.d.ts +2 -0
- package/components/mui_extended/IconButton/types.d.ts +13 -1
- package/components/mui_extended/ImageButton/ImageButton.d.ts +0 -3
- package/components/mui_extended/ImageButton/styles.d.ts +2 -0
- package/components/mui_extended/ImageButton/tests/constants.d.ts +1 -0
- package/components/mui_extended/ImageButton/tests/utils.d.ts +2 -0
- package/components/mui_extended/ImageButton/types.d.ts +1 -0
- package/components/mui_extended/ImageButton/utils/Clases/types.d.ts +1 -0
- package/components/mui_extended/LoadingButton/classes/constants.d.ts +1 -0
- package/components/mui_extended/LoadingButton/classes/index.d.ts +8 -0
- package/components/mui_extended/LoadingButton/classes/types.d.ts +11 -0
- package/components/mui_extended/LoadingButton/styles.d.ts +2 -0
- package/components/mui_extended/LoadingButton/tests/constants.d.ts +1 -0
- package/components/mui_extended/LoadingButton/tests/utils.d.ts +2 -0
- package/components/mui_extended/LoadingButton/types.d.ts +5 -0
- package/components/mui_extended/MenuActions/{index.1affe51a.js → index.ec654122.js} +2 -2
- package/components/mui_extended/MenuActions/styles.d.ts +30 -0
- package/components/mui_extended/Pager/components/PagerActions/styles.d.ts +2 -0
- package/components/mui_extended/Pager/{index.d4d1a1a0.js → index.9e123670.js} +1 -1
- package/components/mui_extended/Pager/styles.d.ts +6 -0
- package/components/mui_extended/Popover/{index.8ed52492.js → index.260aae81.js} +2 -3
- package/components/mui_extended/Popover/index.d.ts +2 -0
- package/components/mui_extended/Popover/styles.d.ts +1 -0
- package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +3 -0
- package/components/mui_extended/Tab/styles.d.ts +2 -0
- package/components/mui_extended/Typography/Typography.d.ts +2 -0
- package/components/mui_extended/Typography/{index.be3a279a.js → index.41b60a6b.js} +20 -15
- package/components/mui_extended/Typography/index.d.ts +1 -5
- package/components/mui_extended/Typography/styles.d.ts +2 -0
- package/components/mui_extended/Typography/tests/constants.d.ts +1 -0
- package/components/mui_extended/Typography/tests/utils.d.ts +2 -0
- package/components/mui_extended/Typography/utils/Clases/types.d.ts +1 -0
- package/components/mui_extended/index.459cbd6c.js +19 -0
- package/components/mui_extended/index.d.ts +1 -1
- package/contexts/ModalContext/{index.b4114066.js → index.ae8041f3.js} +1 -1
- package/contexts/RHFormContext/{index.3dc6e2f5.js → index.a7511399.js} +2 -8
- package/contexts/RHFormContext/styles.d.ts +2 -0
- package/hooks/useModal/{index.77b3415c.js → index.5c159ed2.js} +1 -1
- package/index.js +69 -65
- package/package.json +4 -4
- package/{react-draggable.6471b07e.js → react-draggable.1aa81436.js} +1 -1
- package/{react-resizable.b620abed.js → react-resizable.e86cb01e.js} +2 -2
- package/utils/{index.b6ae791a.js → index.e199226a.js} +7 -18
- package/vendor.a15d263e.js +458 -0
- package/components/ErrorLabel/index.d.ts +0 -10
- package/components/ErrorLabel/index.e140421c.js +0 -65
- package/components/ErrorLabel/types.d.ts +0 -4
- package/components/ErrorLabel/utils/Clases/index.d.ts +0 -6
- package/components/ErrorLabel/utils/Clases/types.d.ts +0 -3
- package/components/Icon/index.b29ff2d9.js +0 -200
- package/components/areas/index.a0456f95.js +0 -21
- package/components/hook-form/RHFAutocomplete/index.bb6cb5df.js +0 -289
- package/components/hook-form/RHFAutocomplete/test/contants.d.ts +0 -1
- package/components/hook-form/RHFAutocompleteAsync/index.815949a9.js +0 -87
- package/components/hook-form/RHFAutocompleteAsync/index.d.ts +0 -2
- package/components/hook-form/RHFCheckbox/index.6e80f572.js +0 -110
- package/components/hook-form/RHFTextField/index.d3544fa3.js +0 -228
- package/components/modal/index.3cc54b93.js +0 -29
- package/components/mui_extended/Button/index.8406ed5b.js +0 -150
- package/components/mui_extended/LoadingButton/subcomponents/Skeleton/index.d.ts +0 -1
- package/components/mui_extended/index.9ce0bca3.js +0 -19
- package/vendor.29969396.js +0 -145
|
@@ -0,0 +1,1010 @@
|
|
|
1
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
2
|
+
import { useEnvironment } from "@m4l/core";
|
|
3
|
+
import { createContext, useContext, useState } from "react";
|
|
4
|
+
import { T as TEST_PROP_ID } from "../../vendor.a15d263e.js";
|
|
5
|
+
import { I as Image } from "../Image/index.1a9c0327.js";
|
|
6
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.be9c2ce5.js";
|
|
7
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
8
|
+
import { styled as styled$1, ListItemText, ListItemButton, Collapse, Skeleton, generateUtilityClasses, Drawer } from "@mui/material";
|
|
9
|
+
import { I as Icon, A as ArrowIcon } from "../Icon/index.0f9b360e.js";
|
|
10
|
+
import { T as Typography } from "../mui_extended/Typography/index.41b60a6b.js";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
import { P as Popover } from "../mui_extended/Popover/index.260aae81.js";
|
|
13
|
+
import { S as ScrollBar } from "../ScrollBar/index.bbe48f4d.js";
|
|
14
|
+
import { styled, alpha } from "@mui/material/styles";
|
|
15
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
16
|
+
import { g as getComponentUtilityClass } from "../../utils/index.e199226a.js";
|
|
17
|
+
const SideBarRoot = styled("div")(({
|
|
18
|
+
theme
|
|
19
|
+
}) => ({
|
|
20
|
+
...theme.components?.M4LSideBar?.styleOverrides
|
|
21
|
+
}));
|
|
22
|
+
styled("div", {
|
|
23
|
+
shouldForwardProp: (props) => props !== "collapsed"
|
|
24
|
+
})((props) => ({
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexDirection: "row",
|
|
27
|
+
justifyContent: "center",
|
|
28
|
+
alignItems: props.collapsed ? "center" : "normal",
|
|
29
|
+
padding: props.theme.spacing(3, 2.5, 2, 2.5)
|
|
30
|
+
}));
|
|
31
|
+
const WrapperSideBar = styled("div", {
|
|
32
|
+
shouldForwardProp: (props) => props !== "width" && props !== "visible"
|
|
33
|
+
})(({
|
|
34
|
+
width,
|
|
35
|
+
visible,
|
|
36
|
+
theme
|
|
37
|
+
}) => ({
|
|
38
|
+
width,
|
|
39
|
+
transition: theme.transitions.create("width", {
|
|
40
|
+
duration: theme.transitions.duration.shorter
|
|
41
|
+
}),
|
|
42
|
+
opacity: 1,
|
|
43
|
+
...!visible && {
|
|
44
|
+
width: 0,
|
|
45
|
+
opacity: 0
|
|
46
|
+
},
|
|
47
|
+
[theme.breakpoints.down("sm")]: {
|
|
48
|
+
position: "absolute"
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
const WrapperContentDesktop = styled$1("div")(() => ({
|
|
52
|
+
display: "flex",
|
|
53
|
+
flexDirection: "column",
|
|
54
|
+
height: "100%",
|
|
55
|
+
"& .m4l_image": {
|
|
56
|
+
display: "flex",
|
|
57
|
+
flexDirection: "row",
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
alignItems: "center"
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
const CollapseButtonRoot = styled$1("div")(() => ({
|
|
63
|
+
display: "flex"
|
|
64
|
+
}));
|
|
65
|
+
const ContainerLogoButton = styled$1("div")(() => ({
|
|
66
|
+
display: "flex"
|
|
67
|
+
}));
|
|
68
|
+
const initialState = {
|
|
69
|
+
collapsed: false,
|
|
70
|
+
visible: true,
|
|
71
|
+
onToggleCollapse: () => {
|
|
72
|
+
},
|
|
73
|
+
onToggleVisible: () => {
|
|
74
|
+
},
|
|
75
|
+
menuData: [],
|
|
76
|
+
companyLogoNormalUrl: "",
|
|
77
|
+
companyLogoSmallUrl: "",
|
|
78
|
+
onClick: () => {
|
|
79
|
+
},
|
|
80
|
+
isItemActive: () => false,
|
|
81
|
+
collapsedWidht: "",
|
|
82
|
+
unCollapsedWidht: "",
|
|
83
|
+
classes: {},
|
|
84
|
+
companyName: ""
|
|
85
|
+
};
|
|
86
|
+
const SideBarContext = createContext(initialState);
|
|
87
|
+
const SideBarProvider = (props) => {
|
|
88
|
+
const {
|
|
89
|
+
value,
|
|
90
|
+
children
|
|
91
|
+
} = props;
|
|
92
|
+
const {
|
|
93
|
+
collapsed,
|
|
94
|
+
visible,
|
|
95
|
+
onToggleCollapse,
|
|
96
|
+
onToggleVisible,
|
|
97
|
+
menuData,
|
|
98
|
+
onClick,
|
|
99
|
+
companyLogoNormalUrl,
|
|
100
|
+
companyLogoSmallUrl,
|
|
101
|
+
isItemActive,
|
|
102
|
+
collapsedWidht,
|
|
103
|
+
unCollapsedWidht,
|
|
104
|
+
classes,
|
|
105
|
+
companyName
|
|
106
|
+
} = value;
|
|
107
|
+
return /* @__PURE__ */ jsx(SideBarContext.Provider, {
|
|
108
|
+
value: {
|
|
109
|
+
collapsed,
|
|
110
|
+
visible,
|
|
111
|
+
onToggleCollapse,
|
|
112
|
+
onToggleVisible,
|
|
113
|
+
menuData,
|
|
114
|
+
onClick,
|
|
115
|
+
companyLogoNormalUrl,
|
|
116
|
+
companyLogoSmallUrl,
|
|
117
|
+
isItemActive,
|
|
118
|
+
collapsedWidht,
|
|
119
|
+
unCollapsedWidht,
|
|
120
|
+
classes,
|
|
121
|
+
companyName
|
|
122
|
+
},
|
|
123
|
+
children
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
const useSideBar = () => useContext(SideBarContext);
|
|
127
|
+
const SIDEBAR_PREFIX = "M4LSideBar";
|
|
128
|
+
const getNameDataTestId = (KEY) => {
|
|
129
|
+
return `${SIDEBAR_PREFIX}-${KEY}`;
|
|
130
|
+
};
|
|
131
|
+
function CollapseButton(props) {
|
|
132
|
+
const {
|
|
133
|
+
onToggleCollapse,
|
|
134
|
+
collapsed
|
|
135
|
+
} = props;
|
|
136
|
+
const {
|
|
137
|
+
host_static_assets,
|
|
138
|
+
environment_assets
|
|
139
|
+
} = useEnvironment();
|
|
140
|
+
const {
|
|
141
|
+
classes,
|
|
142
|
+
companyLogoNormalUrl
|
|
143
|
+
} = useSideBar();
|
|
144
|
+
return /* @__PURE__ */ jsx(CollapseButtonRoot, {
|
|
145
|
+
className: classes.collapseButton,
|
|
146
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
147
|
+
[TEST_PROP_ID]: getNameDataTestId("collapseButton")
|
|
148
|
+
} : {},
|
|
149
|
+
children: /* @__PURE__ */ jsxs(ContainerLogoButton, {
|
|
150
|
+
className: classes.containerLogoButton,
|
|
151
|
+
children: [!collapsed && /* @__PURE__ */ jsx("div", {
|
|
152
|
+
className: classes.containerLogoButtonLogo,
|
|
153
|
+
children: /* @__PURE__ */ jsx(Image, {
|
|
154
|
+
width: "100%",
|
|
155
|
+
height: "100%",
|
|
156
|
+
src: companyLogoNormalUrl,
|
|
157
|
+
alt: "logo"
|
|
158
|
+
}, "Logo")
|
|
159
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
160
|
+
className: classes.containerLogoButtonIcon,
|
|
161
|
+
style: {
|
|
162
|
+
transform: `rotate(${collapsed ? 0 : 180}deg)`
|
|
163
|
+
},
|
|
164
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
165
|
+
className: classes.collapseButtontriangleTop
|
|
166
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
167
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/arrow_right.svg`,
|
|
168
|
+
onClick: onToggleCollapse
|
|
169
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
170
|
+
className: classes.collapseButtontriangleBottom
|
|
171
|
+
})]
|
|
172
|
+
})]
|
|
173
|
+
})
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
const WrapperGroup = styled$1("ul")(({
|
|
177
|
+
theme
|
|
178
|
+
}) => ({
|
|
179
|
+
display: "flex",
|
|
180
|
+
width: "100%",
|
|
181
|
+
flexDirection: "column",
|
|
182
|
+
gap: theme.spacing(0.5),
|
|
183
|
+
listStyle: "none",
|
|
184
|
+
padding: "0px"
|
|
185
|
+
}));
|
|
186
|
+
const ContentGroupsRoot = styled$1("ul")(() => ({
|
|
187
|
+
display: "flex",
|
|
188
|
+
width: "100%",
|
|
189
|
+
height: "100%"
|
|
190
|
+
}));
|
|
191
|
+
const WrapperGroupTitle = styled$1("li", {
|
|
192
|
+
shouldForwardProp: (props) => props !== "collapsed"
|
|
193
|
+
})(({
|
|
194
|
+
collapsed,
|
|
195
|
+
theme
|
|
196
|
+
}) => ({
|
|
197
|
+
...theme.typography.overline,
|
|
198
|
+
paddingTop: theme.spacing(3),
|
|
199
|
+
paddingLeft: theme.spacing(2),
|
|
200
|
+
paddingBottom: theme.spacing(1),
|
|
201
|
+
color: theme.palette.text.primary,
|
|
202
|
+
transition: theme.transitions.create("opacity", {
|
|
203
|
+
duration: theme.transitions.duration.shorter
|
|
204
|
+
}),
|
|
205
|
+
...collapsed && {
|
|
206
|
+
opacity: 0,
|
|
207
|
+
width: 0,
|
|
208
|
+
overflowX: "hidden"
|
|
209
|
+
}
|
|
210
|
+
}));
|
|
211
|
+
const NavItemMainRoot = styled("div", {
|
|
212
|
+
shouldForwardProp: (prop) => prop !== "activeRoot"
|
|
213
|
+
})(({
|
|
214
|
+
activeRoot,
|
|
215
|
+
theme
|
|
216
|
+
}) => ({
|
|
217
|
+
...activeRoot && {
|
|
218
|
+
...theme.typography.subtitle2,
|
|
219
|
+
color: theme.palette.primary.main,
|
|
220
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
221
|
+
}
|
|
222
|
+
}));
|
|
223
|
+
styled(ListItemText, {
|
|
224
|
+
shouldForwardProp: (prop) => prop !== "isCollapse"
|
|
225
|
+
})(({
|
|
226
|
+
isCollapse,
|
|
227
|
+
theme
|
|
228
|
+
}) => ({
|
|
229
|
+
whiteSpace: "nowrap",
|
|
230
|
+
transition: theme.transitions.create(["width", "opacity"], {
|
|
231
|
+
duration: theme.transitions.duration.shorter
|
|
232
|
+
}),
|
|
233
|
+
...isCollapse && {
|
|
234
|
+
width: 0,
|
|
235
|
+
opacity: 0
|
|
236
|
+
}
|
|
237
|
+
}));
|
|
238
|
+
const NavItemMainContentRoot = styled$1("div", {
|
|
239
|
+
shouldForwardProp: (props) => props !== "collapsed"
|
|
240
|
+
})(({
|
|
241
|
+
collapsed
|
|
242
|
+
}) => ({
|
|
243
|
+
...collapsed && {
|
|
244
|
+
padding: "0",
|
|
245
|
+
display: "block"
|
|
246
|
+
},
|
|
247
|
+
"& .M4LTypography-root": {
|
|
248
|
+
...collapsed && {
|
|
249
|
+
width: 0,
|
|
250
|
+
opacity: 0
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"& .m4l_icon": {
|
|
254
|
+
...collapsed && {
|
|
255
|
+
width: "100%",
|
|
256
|
+
height: "100%"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}));
|
|
260
|
+
const NavItemMainContent = (props) => {
|
|
261
|
+
const {
|
|
262
|
+
item,
|
|
263
|
+
onClick,
|
|
264
|
+
handlerOpen,
|
|
265
|
+
changeVisible,
|
|
266
|
+
open
|
|
267
|
+
} = props;
|
|
268
|
+
const {
|
|
269
|
+
title,
|
|
270
|
+
icon_url: icon,
|
|
271
|
+
children
|
|
272
|
+
} = item;
|
|
273
|
+
const {
|
|
274
|
+
host_static_assets,
|
|
275
|
+
environment_assets
|
|
276
|
+
} = useEnvironment();
|
|
277
|
+
const {
|
|
278
|
+
collapsed,
|
|
279
|
+
isItemActive,
|
|
280
|
+
classes
|
|
281
|
+
} = useSideBar();
|
|
282
|
+
const active = isItemActive(item);
|
|
283
|
+
console.log("NavItemRootContent active", active);
|
|
284
|
+
const isDesktop = useResponsiveDesktop();
|
|
285
|
+
const handlerClick = (event) => {
|
|
286
|
+
onClick && onClick(item);
|
|
287
|
+
handlerOpen && handlerOpen(event);
|
|
288
|
+
!isDesktop && changeVisible && changeVisible();
|
|
289
|
+
};
|
|
290
|
+
return /* @__PURE__ */ jsxs(NavItemMainContentRoot, {
|
|
291
|
+
className: classes.navItemRootContent,
|
|
292
|
+
collapsed,
|
|
293
|
+
id: "WrapperNavItemRootContent",
|
|
294
|
+
onClick: handlerClick,
|
|
295
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
296
|
+
className: classes.navItemRootContentIconTypo,
|
|
297
|
+
children: [icon ? /* @__PURE__ */ jsx(Icon, {
|
|
298
|
+
src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/${icon}`
|
|
299
|
+
}) : null, /* @__PURE__ */ jsx(Typography, {
|
|
300
|
+
variant: "paragraph",
|
|
301
|
+
color: "text.secondary",
|
|
302
|
+
children: !collapsed ? title : " "
|
|
303
|
+
})]
|
|
304
|
+
}), !collapsed && children ? /* @__PURE__ */ jsx(ArrowIcon, {
|
|
305
|
+
openState: open
|
|
306
|
+
}) : null]
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
const NavListSubItemRoot = styled$1("div")(() => ({
|
|
310
|
+
display: "flex",
|
|
311
|
+
flexDirection: "column"
|
|
312
|
+
}));
|
|
313
|
+
const NavSubItemContentRoot = styled$1(ListItemButton)(({
|
|
314
|
+
theme
|
|
315
|
+
}) => ({
|
|
316
|
+
display: "flex",
|
|
317
|
+
padding: theme.spacing(0, 2),
|
|
318
|
+
alignItems: "center",
|
|
319
|
+
height: theme.spacing(6),
|
|
320
|
+
borderRadius: theme.spacing(1),
|
|
321
|
+
"& .m4l_icon": {
|
|
322
|
+
marginRight: theme.spacing(1)
|
|
323
|
+
}
|
|
324
|
+
}));
|
|
325
|
+
styled$1("span", {
|
|
326
|
+
shouldForwardProp: (props) => props !== "active"
|
|
327
|
+
})(({
|
|
328
|
+
theme,
|
|
329
|
+
active
|
|
330
|
+
}) => ({
|
|
331
|
+
width: "22px",
|
|
332
|
+
height: "22px",
|
|
333
|
+
display: "flex",
|
|
334
|
+
justifyContent: "center",
|
|
335
|
+
alignItems: "center",
|
|
336
|
+
borderRadius: "50%",
|
|
337
|
+
transition: theme.transitions.create("transform", {
|
|
338
|
+
duration: theme.transitions.duration.shorter
|
|
339
|
+
}),
|
|
340
|
+
"&::before": {
|
|
341
|
+
content: '""',
|
|
342
|
+
width: "4px",
|
|
343
|
+
height: "4px",
|
|
344
|
+
borderRadius: "50%",
|
|
345
|
+
backgroundColor: theme.palette.text.disabled,
|
|
346
|
+
...active && {
|
|
347
|
+
transform: "scale(1.5)",
|
|
348
|
+
backgroundColor: theme.palette.primary.main
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}));
|
|
352
|
+
const NavSubItemContent = (props) => {
|
|
353
|
+
const {
|
|
354
|
+
item,
|
|
355
|
+
onClick,
|
|
356
|
+
closePopover = () => {
|
|
357
|
+
}
|
|
358
|
+
} = props;
|
|
359
|
+
const {
|
|
360
|
+
title
|
|
361
|
+
} = item;
|
|
362
|
+
const {
|
|
363
|
+
isItemActive,
|
|
364
|
+
onToggleVisible,
|
|
365
|
+
classes
|
|
366
|
+
} = useSideBar();
|
|
367
|
+
const active = isItemActive(item);
|
|
368
|
+
const isDesktop = useResponsiveDesktop();
|
|
369
|
+
const handlerClick = () => {
|
|
370
|
+
onClick(item);
|
|
371
|
+
closePopover();
|
|
372
|
+
if (!isDesktop) {
|
|
373
|
+
onToggleVisible();
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
return /* @__PURE__ */ jsxs(NavSubItemContentRoot, {
|
|
377
|
+
onClick: handlerClick,
|
|
378
|
+
disableRipple: true,
|
|
379
|
+
className: clsx(classes.navSubItemContentRoot, active && classes.subItemActive),
|
|
380
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
381
|
+
[TEST_PROP_ID]: getNameDataTestId("navSubItemContentRoot")
|
|
382
|
+
} : {},
|
|
383
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
384
|
+
className: classes.navSubItemContentBullet
|
|
385
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
386
|
+
variant: "body",
|
|
387
|
+
children: title
|
|
388
|
+
})]
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
function NavSubItem(props) {
|
|
392
|
+
const {
|
|
393
|
+
item,
|
|
394
|
+
closePopover
|
|
395
|
+
} = props;
|
|
396
|
+
const {
|
|
397
|
+
onClick
|
|
398
|
+
} = useSideBar();
|
|
399
|
+
return /* @__PURE__ */ jsx(NavSubItemContent, {
|
|
400
|
+
item,
|
|
401
|
+
onClick: () => onClick(item),
|
|
402
|
+
closePopover
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
function NavListSubItem(props) {
|
|
406
|
+
const {
|
|
407
|
+
item: list,
|
|
408
|
+
closePopover = () => {
|
|
409
|
+
},
|
|
410
|
+
setSubItemActive
|
|
411
|
+
} = props;
|
|
412
|
+
const {
|
|
413
|
+
isItemActive,
|
|
414
|
+
classes
|
|
415
|
+
} = useSideBar();
|
|
416
|
+
const active = isItemActive(list);
|
|
417
|
+
const [openSub, setOpenSub] = useState(active);
|
|
418
|
+
const hasChildren = list.children && Array.isArray(list.children) && list.children.length > 0;
|
|
419
|
+
return /* @__PURE__ */ jsx(NavListSubItemRoot, {
|
|
420
|
+
className: classes.navListSubItemRoot,
|
|
421
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
422
|
+
[TEST_PROP_ID]: getNameDataTestId("navListSubItemRoot")
|
|
423
|
+
} : {},
|
|
424
|
+
children: hasChildren ? /* @__PURE__ */ jsxs(Fragment, {
|
|
425
|
+
children: [/* @__PURE__ */ jsx(NavSubItem, {
|
|
426
|
+
item: list,
|
|
427
|
+
open: openSub,
|
|
428
|
+
setOpen: setOpenSub,
|
|
429
|
+
closePopover
|
|
430
|
+
}), /* @__PURE__ */ jsx(Collapse, {
|
|
431
|
+
in: openSub,
|
|
432
|
+
timeout: "auto",
|
|
433
|
+
unmountOnExit: true,
|
|
434
|
+
children: (list.children || []).map((item) => /* @__PURE__ */ jsx(NavListSubItem, {
|
|
435
|
+
item,
|
|
436
|
+
setSubItemActive
|
|
437
|
+
}, item.title))
|
|
438
|
+
})]
|
|
439
|
+
}) : /* @__PURE__ */ jsx(NavSubItem, {
|
|
440
|
+
item: list,
|
|
441
|
+
open: openSub,
|
|
442
|
+
setOpen: setOpenSub,
|
|
443
|
+
closePopover
|
|
444
|
+
})
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
function NavItemMain(props) {
|
|
448
|
+
const {
|
|
449
|
+
item,
|
|
450
|
+
setOpen,
|
|
451
|
+
open
|
|
452
|
+
} = props;
|
|
453
|
+
const {
|
|
454
|
+
children
|
|
455
|
+
} = item;
|
|
456
|
+
const {
|
|
457
|
+
collapsed,
|
|
458
|
+
onClick,
|
|
459
|
+
isItemActive,
|
|
460
|
+
onToggleVisible,
|
|
461
|
+
classes
|
|
462
|
+
} = useSideBar();
|
|
463
|
+
const [popoverStatus, setPopoverStatus] = useState(null);
|
|
464
|
+
const active = isItemActive(item);
|
|
465
|
+
const handleOpen = (event) => {
|
|
466
|
+
setPopoverStatus(event.currentTarget);
|
|
467
|
+
};
|
|
468
|
+
const handleClose = () => {
|
|
469
|
+
setPopoverStatus(null);
|
|
470
|
+
};
|
|
471
|
+
if (children) {
|
|
472
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
473
|
+
children: [collapsed && /* @__PURE__ */ jsxs(NavItemMainRoot, {
|
|
474
|
+
activeRoot: active,
|
|
475
|
+
className: classes.navItemMainRoot,
|
|
476
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
477
|
+
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
478
|
+
} : {},
|
|
479
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
480
|
+
className: classes.navItemMainTriangleTop
|
|
481
|
+
}), /* @__PURE__ */ jsx(NavItemMainContent, {
|
|
482
|
+
item,
|
|
483
|
+
handlerOpen: handleOpen,
|
|
484
|
+
open
|
|
485
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
486
|
+
className: classes.navItemMainTriangleBottom
|
|
487
|
+
}), /* @__PURE__ */ jsx(Popover, {
|
|
488
|
+
className: classes.popover,
|
|
489
|
+
open: Boolean(popoverStatus),
|
|
490
|
+
anchorEl: popoverStatus,
|
|
491
|
+
onClose: handleClose,
|
|
492
|
+
arrowType: "left-center",
|
|
493
|
+
sx: {
|
|
494
|
+
ml: "14px"
|
|
495
|
+
},
|
|
496
|
+
anchorOrigin: {
|
|
497
|
+
vertical: "center",
|
|
498
|
+
horizontal: "right"
|
|
499
|
+
},
|
|
500
|
+
transformOrigin: {
|
|
501
|
+
vertical: "center",
|
|
502
|
+
horizontal: "left"
|
|
503
|
+
},
|
|
504
|
+
children: (item.children || []).map((itemList) => /* @__PURE__ */ jsx(NavListSubItem, {
|
|
505
|
+
item: itemList,
|
|
506
|
+
closePopover: handleClose
|
|
507
|
+
}, itemList.title))
|
|
508
|
+
})]
|
|
509
|
+
}), !collapsed && /* @__PURE__ */ jsxs(NavItemMainRoot, {
|
|
510
|
+
className: classes.navItemMainRoot,
|
|
511
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
512
|
+
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
513
|
+
} : {},
|
|
514
|
+
onClick: () => setOpen((lastOpen) => !lastOpen),
|
|
515
|
+
activeRoot: active,
|
|
516
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
517
|
+
className: classes.navItemMainTriangleTop
|
|
518
|
+
}), /* @__PURE__ */ jsx(NavItemMainContent, {
|
|
519
|
+
item,
|
|
520
|
+
open
|
|
521
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
522
|
+
className: classes.navItemMainTriangleBottom
|
|
523
|
+
})]
|
|
524
|
+
})]
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
return /* @__PURE__ */ jsxs(NavItemMainRoot, {
|
|
528
|
+
activeRoot: active,
|
|
529
|
+
className: classes.navItemMainRoot,
|
|
530
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
531
|
+
[TEST_PROP_ID]: getNameDataTestId("navItemMainRoot")
|
|
532
|
+
} : {},
|
|
533
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
534
|
+
className: classes.navItemMainTriangleTop
|
|
535
|
+
}), /* @__PURE__ */ jsx(NavItemMainContent, {
|
|
536
|
+
item,
|
|
537
|
+
onClick,
|
|
538
|
+
changeVisible: onToggleVisible,
|
|
539
|
+
open
|
|
540
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
541
|
+
className: classes.navItemMainTriangleBottom
|
|
542
|
+
})]
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
const ContainerListSubItem = styled$1("div")(({
|
|
546
|
+
theme
|
|
547
|
+
}) => ({
|
|
548
|
+
width: "100%",
|
|
549
|
+
height: "auto",
|
|
550
|
+
paddingLeft: theme.spacing(2.75)
|
|
551
|
+
}));
|
|
552
|
+
function ItemListMain(props) {
|
|
553
|
+
const {
|
|
554
|
+
list,
|
|
555
|
+
setItemMainActive,
|
|
556
|
+
itemMainActive,
|
|
557
|
+
id
|
|
558
|
+
} = props;
|
|
559
|
+
const {
|
|
560
|
+
collapsed: isSideBarCollapsed,
|
|
561
|
+
isItemActive,
|
|
562
|
+
classes
|
|
563
|
+
} = useSideBar();
|
|
564
|
+
const active = isItemActive(list);
|
|
565
|
+
const [subItemActive, setSubItemActive] = useState(false);
|
|
566
|
+
const [open, setOpen] = useState(active);
|
|
567
|
+
const hasChildren = list.children && Array.isArray(list.children) && list.children.length > 0;
|
|
568
|
+
console.log("test item active equal", itemMainActive === id);
|
|
569
|
+
if (hasChildren) {
|
|
570
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
571
|
+
className: clsx(classes.itemListMainRoot, itemMainActive === id && classes.itemMainActive),
|
|
572
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
573
|
+
[TEST_PROP_ID]: getNameDataTestId("itemListMainRoot")
|
|
574
|
+
} : {},
|
|
575
|
+
onClick: () => setItemMainActive(id),
|
|
576
|
+
children: [/* @__PURE__ */ jsx(NavItemMain, {
|
|
577
|
+
item: list,
|
|
578
|
+
open,
|
|
579
|
+
setOpen,
|
|
580
|
+
subItemActive
|
|
581
|
+
}), !isSideBarCollapsed && /* @__PURE__ */ jsx(Collapse, {
|
|
582
|
+
in: open,
|
|
583
|
+
timeout: "auto",
|
|
584
|
+
unmountOnExit: true,
|
|
585
|
+
children: (list.children || []).map((item) => /* @__PURE__ */ jsx(ContainerListSubItem, {
|
|
586
|
+
className: classes.containerListSubItem,
|
|
587
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
588
|
+
[TEST_PROP_ID]: getNameDataTestId("containerListSubItem")
|
|
589
|
+
} : {},
|
|
590
|
+
children: /* @__PURE__ */ jsx(NavListSubItem, {
|
|
591
|
+
item,
|
|
592
|
+
setSubItemActive
|
|
593
|
+
}, item.title)
|
|
594
|
+
}, item.title))
|
|
595
|
+
})]
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
return /* @__PURE__ */ jsx("div", {
|
|
599
|
+
className: clsx(classes.itemListMainRoot, itemMainActive === id && classes.itemMainActive),
|
|
600
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
601
|
+
[TEST_PROP_ID]: getNameDataTestId("itemListMainRoot")
|
|
602
|
+
} : {},
|
|
603
|
+
onClick: () => setItemMainActive(id),
|
|
604
|
+
children: /* @__PURE__ */ jsx(NavItemMain, {
|
|
605
|
+
item: list,
|
|
606
|
+
open,
|
|
607
|
+
setOpen
|
|
608
|
+
})
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
const WrapperSKTNavSectionVertical = styled$1("div", {
|
|
612
|
+
shouldForwardProp: (props) => props !== "collapse"
|
|
613
|
+
})(({
|
|
614
|
+
theme,
|
|
615
|
+
collapse
|
|
616
|
+
}) => ({
|
|
617
|
+
margin: "0",
|
|
618
|
+
padding: "0",
|
|
619
|
+
position: "relative",
|
|
620
|
+
paddingLeft: theme.spacing(2),
|
|
621
|
+
paddingRight: theme.spacing(2),
|
|
622
|
+
marginTop: collapse ? "50px" : "0px",
|
|
623
|
+
height: "100%",
|
|
624
|
+
paddingTop: "100px"
|
|
625
|
+
}));
|
|
626
|
+
const NavSectionVerticalItem = styled$1("div")(({
|
|
627
|
+
theme
|
|
628
|
+
}) => ({
|
|
629
|
+
display: "grid",
|
|
630
|
+
gridTemplateColumns: "20px 1fr",
|
|
631
|
+
gridGap: theme.spacing(2),
|
|
632
|
+
alignItems: "center",
|
|
633
|
+
width: "100%",
|
|
634
|
+
padding: theme.spacing(1, 1.5, 1, 0.5),
|
|
635
|
+
marginBottom: theme.spacing(0.5),
|
|
636
|
+
height: theme.spacing(6)
|
|
637
|
+
}));
|
|
638
|
+
const NavSectionVerticalTitle = styled$1("div")(({
|
|
639
|
+
theme
|
|
640
|
+
}) => ({
|
|
641
|
+
display: "flex",
|
|
642
|
+
justifyContent: "flex-start",
|
|
643
|
+
height: "50px",
|
|
644
|
+
padding: theme.spacing(3, 0, 1, 2)
|
|
645
|
+
}));
|
|
646
|
+
const SkeletonNavSectionVertical = () => {
|
|
647
|
+
const {
|
|
648
|
+
collapsed,
|
|
649
|
+
classes
|
|
650
|
+
} = useSideBar();
|
|
651
|
+
return /* @__PURE__ */ jsxs(WrapperSKTNavSectionVertical, {
|
|
652
|
+
collapse: collapsed,
|
|
653
|
+
className: classes.skeleton,
|
|
654
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
655
|
+
[TEST_PROP_ID]: getNameDataTestId("skeleton")
|
|
656
|
+
} : {},
|
|
657
|
+
children: [!collapsed && /* @__PURE__ */ jsx(NavSectionVerticalTitle, {
|
|
658
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
659
|
+
variant: "text",
|
|
660
|
+
height: "14px",
|
|
661
|
+
width: "80px"
|
|
662
|
+
})
|
|
663
|
+
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
664
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
665
|
+
variant: "circular",
|
|
666
|
+
width: "22px",
|
|
667
|
+
height: "22px"
|
|
668
|
+
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
669
|
+
variant: "text",
|
|
670
|
+
height: "14px",
|
|
671
|
+
width: "100%"
|
|
672
|
+
})]
|
|
673
|
+
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
674
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
675
|
+
variant: "circular",
|
|
676
|
+
width: "22px",
|
|
677
|
+
height: "22px"
|
|
678
|
+
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
679
|
+
variant: "text",
|
|
680
|
+
height: "14px",
|
|
681
|
+
width: "100%"
|
|
682
|
+
})]
|
|
683
|
+
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
684
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
685
|
+
variant: "circular",
|
|
686
|
+
width: "22px",
|
|
687
|
+
height: "22px"
|
|
688
|
+
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
689
|
+
variant: "text",
|
|
690
|
+
height: "14px",
|
|
691
|
+
width: "100%"
|
|
692
|
+
})]
|
|
693
|
+
}), /* @__PURE__ */ jsxs(NavSectionVerticalItem, {
|
|
694
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
695
|
+
variant: "circular",
|
|
696
|
+
width: "22px",
|
|
697
|
+
height: "22px"
|
|
698
|
+
}), !collapsed && /* @__PURE__ */ jsx(Skeleton, {
|
|
699
|
+
variant: "text",
|
|
700
|
+
height: "14px",
|
|
701
|
+
width: "100%"
|
|
702
|
+
})]
|
|
703
|
+
})]
|
|
704
|
+
});
|
|
705
|
+
};
|
|
706
|
+
const ContentGroups = () => {
|
|
707
|
+
const {
|
|
708
|
+
collapsed,
|
|
709
|
+
menuData,
|
|
710
|
+
classes
|
|
711
|
+
} = useSideBar();
|
|
712
|
+
const [itemMainActive, setItemMainActive] = useState(-1);
|
|
713
|
+
console.log("valor del item main active", itemMainActive);
|
|
714
|
+
if (menuData && menuData.length > 0) {
|
|
715
|
+
return /* @__PURE__ */ jsx(ContentGroupsRoot, {
|
|
716
|
+
className: classes.contentGroups,
|
|
717
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
718
|
+
[TEST_PROP_ID]: getNameDataTestId("contentGroups")
|
|
719
|
+
} : {},
|
|
720
|
+
children: /* @__PURE__ */ jsx(ScrollBar, {
|
|
721
|
+
children: /* @__PURE__ */ jsx(Fragment, {
|
|
722
|
+
children: menuData.map((group) => /* @__PURE__ */ jsxs(WrapperGroup, {
|
|
723
|
+
className: classes.wrapperGroup,
|
|
724
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
725
|
+
[TEST_PROP_ID]: getNameDataTestId("wrapperGroup")
|
|
726
|
+
} : {},
|
|
727
|
+
children: [/* @__PURE__ */ jsx(WrapperGroupTitle, {
|
|
728
|
+
collapsed,
|
|
729
|
+
className: classes.wrapperGroupTitle,
|
|
730
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
731
|
+
variant: "paragraphDens",
|
|
732
|
+
skeletonWidth: "100px",
|
|
733
|
+
children: group.title
|
|
734
|
+
})
|
|
735
|
+
}), /* @__PURE__ */ jsx(ScrollBar, {
|
|
736
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
737
|
+
style: {
|
|
738
|
+
display: "flex",
|
|
739
|
+
flexDirection: "column",
|
|
740
|
+
width: "100%",
|
|
741
|
+
height: "auto"
|
|
742
|
+
},
|
|
743
|
+
children: group.children?.map((list, id) => /* @__PURE__ */ jsx(ItemListMain, {
|
|
744
|
+
list,
|
|
745
|
+
itemMainActive,
|
|
746
|
+
setItemMainActive,
|
|
747
|
+
id
|
|
748
|
+
}, id))
|
|
749
|
+
})
|
|
750
|
+
})]
|
|
751
|
+
}, group.title))
|
|
752
|
+
})
|
|
753
|
+
})
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
return /* @__PURE__ */ jsx(SkeletonNavSectionVertical, {});
|
|
757
|
+
};
|
|
758
|
+
const ContentDesktop = () => {
|
|
759
|
+
const {
|
|
760
|
+
collapsed,
|
|
761
|
+
onToggleCollapse,
|
|
762
|
+
companyLogoSmallUrl,
|
|
763
|
+
classes,
|
|
764
|
+
companyName
|
|
765
|
+
} = useSideBar();
|
|
766
|
+
return /* @__PURE__ */ jsxs(WrapperContentDesktop, {
|
|
767
|
+
className: classes.contentDesktop,
|
|
768
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
769
|
+
[TEST_PROP_ID]: getNameDataTestId("contentDesktop")
|
|
770
|
+
} : {},
|
|
771
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
772
|
+
className: classes.containerSideBarLogo,
|
|
773
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
774
|
+
[TEST_PROP_ID]: getNameDataTestId("containerSideBarLogo")
|
|
775
|
+
} : {},
|
|
776
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
777
|
+
className: classes.containerLogo,
|
|
778
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
779
|
+
[TEST_PROP_ID]: getNameDataTestId("containerLogo")
|
|
780
|
+
} : {},
|
|
781
|
+
children: [/* @__PURE__ */ jsx(Image, {
|
|
782
|
+
width: "64px",
|
|
783
|
+
height: "64px",
|
|
784
|
+
src: companyLogoSmallUrl,
|
|
785
|
+
alt: "logo"
|
|
786
|
+
}, "Logo"), !collapsed && /* @__PURE__ */ jsx(Typography, {
|
|
787
|
+
variant: "subtitleDens",
|
|
788
|
+
skeletonWidth: "100px",
|
|
789
|
+
children: companyName
|
|
790
|
+
})]
|
|
791
|
+
})
|
|
792
|
+
}), /* @__PURE__ */ jsx(ContentGroups, {}), /* @__PURE__ */ jsx(CollapseButton, {
|
|
793
|
+
onToggleCollapse,
|
|
794
|
+
collapsed
|
|
795
|
+
})]
|
|
796
|
+
});
|
|
797
|
+
};
|
|
798
|
+
const componentName = "M4LSideBar";
|
|
799
|
+
generateUtilityClasses(
|
|
800
|
+
componentName,
|
|
801
|
+
[
|
|
802
|
+
"root",
|
|
803
|
+
"containerSideBarLogo",
|
|
804
|
+
"contentDesktop",
|
|
805
|
+
"contentMobile",
|
|
806
|
+
"collapseButton",
|
|
807
|
+
"containerLogo",
|
|
808
|
+
"contentGroups",
|
|
809
|
+
"wrapperGroup",
|
|
810
|
+
"wrapperGroupTitle",
|
|
811
|
+
"itemListMainRoot",
|
|
812
|
+
"containerListSubItem",
|
|
813
|
+
"navItemMainRoot",
|
|
814
|
+
"navItemRootContent",
|
|
815
|
+
"arrowIconRoot",
|
|
816
|
+
"navListSubItemRoot",
|
|
817
|
+
"navSubItemContentRoot",
|
|
818
|
+
"skeleton",
|
|
819
|
+
"lineLeft",
|
|
820
|
+
"wrapperSideBar",
|
|
821
|
+
"containerLogoButton",
|
|
822
|
+
"navItemMainTriangleTop",
|
|
823
|
+
"navItemMainTriangleBottom",
|
|
824
|
+
"navItemRootContentIconTypo",
|
|
825
|
+
"navSubItemContentBullet",
|
|
826
|
+
"containerLogoButtonLogo",
|
|
827
|
+
"containerLogoButtonIcon",
|
|
828
|
+
"collapseButtontriangleTop",
|
|
829
|
+
"collapseButtontriangleBottom",
|
|
830
|
+
"drawer",
|
|
831
|
+
"popover",
|
|
832
|
+
"collapsed",
|
|
833
|
+
"visible",
|
|
834
|
+
"subItemActive",
|
|
835
|
+
"itemMainActive"
|
|
836
|
+
]
|
|
837
|
+
);
|
|
838
|
+
const getSideBarClassesByState = (ownerState) => {
|
|
839
|
+
const slots = {
|
|
840
|
+
root: ["root", ownerState.collapsed && "collapsed", ownerState.visible && "visible"],
|
|
841
|
+
containerSideBarLogo: ["containerSideBarLogo"],
|
|
842
|
+
contentDesktop: ["contentDesktop"],
|
|
843
|
+
contentMobile: ["contentMobile"],
|
|
844
|
+
collapseButton: ["collapseButton"],
|
|
845
|
+
containerLogo: ["containerLogo"],
|
|
846
|
+
contentGroups: ["contentGroups"],
|
|
847
|
+
wrapperGroup: ["wrapperGroup"],
|
|
848
|
+
wrapperGroupTitle: ["wrapperGroupTitle"],
|
|
849
|
+
itemListMainRoot: ["itemListMainRoot"],
|
|
850
|
+
containerListSubItem: ["containerListSubItem"],
|
|
851
|
+
navItemMainRoot: ["navItemMainRoot"],
|
|
852
|
+
navItemRootContent: ["navItemRootContent"],
|
|
853
|
+
arrowIconRoot: ["arrowIconRoot"],
|
|
854
|
+
navListSubItemRoot: ["navListSubItemRoot"],
|
|
855
|
+
navSubItemContentRoot: ["navSubItemContentRoot"],
|
|
856
|
+
skeleton: ["skeleton"],
|
|
857
|
+
subItemActive: ["subItemActive"],
|
|
858
|
+
lineLeft: ["lineLeft"],
|
|
859
|
+
wrapperSideBar: ["wrapperSideBar"],
|
|
860
|
+
containerLogoButton: ["containerLogoButton"],
|
|
861
|
+
itemMainActive: ["itemMainActive"],
|
|
862
|
+
navItemMainTriangleTop: ["navItemMainTriangleTop"],
|
|
863
|
+
navItemMainTriangleBottom: ["navItemMainTriangleBottom"],
|
|
864
|
+
navItemRootContentIconTypo: ["navItemRootContentIconTypo"],
|
|
865
|
+
navSubItemContentBullet: ["navSubItemContentBullet"],
|
|
866
|
+
containerLogoButtonLogo: ["containerLogoButtonLogo"],
|
|
867
|
+
containerLogoButtonIcon: ["containerLogoButtonIcon"],
|
|
868
|
+
collapseButtontriangleTop: ["collapseButtontriangleTop"],
|
|
869
|
+
collapseButtontriangleBottom: ["collapseButtontriangleBottom"],
|
|
870
|
+
drawer: ["drawer"],
|
|
871
|
+
popover: ["popover"]
|
|
872
|
+
};
|
|
873
|
+
const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
874
|
+
return {
|
|
875
|
+
...composedClasses
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
const WrapperContentMobile = styled$1("div")(({
|
|
879
|
+
theme
|
|
880
|
+
}) => ({
|
|
881
|
+
"& .m4l_image": {
|
|
882
|
+
display: "flex",
|
|
883
|
+
gap: theme.spacing(3),
|
|
884
|
+
alignItems: "center",
|
|
885
|
+
justifyContent: "center",
|
|
886
|
+
flexShrink: 0
|
|
887
|
+
}
|
|
888
|
+
}));
|
|
889
|
+
styled$1("div")(({
|
|
890
|
+
theme
|
|
891
|
+
}) => ({
|
|
892
|
+
width: "100%",
|
|
893
|
+
height: "auto",
|
|
894
|
+
padding: theme.spacing(0, 2)
|
|
895
|
+
}));
|
|
896
|
+
const ContentMobile = () => {
|
|
897
|
+
const {
|
|
898
|
+
visible,
|
|
899
|
+
onToggleVisible,
|
|
900
|
+
companyLogoSmallUrl,
|
|
901
|
+
collapsedWidht,
|
|
902
|
+
collapsed,
|
|
903
|
+
classes,
|
|
904
|
+
companyName
|
|
905
|
+
} = useSideBar();
|
|
906
|
+
return /* @__PURE__ */ jsxs(Drawer, {
|
|
907
|
+
open: visible,
|
|
908
|
+
onClose: onToggleVisible,
|
|
909
|
+
PaperProps: {
|
|
910
|
+
sx: {
|
|
911
|
+
width: collapsedWidht
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
className: classes.drawer,
|
|
915
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
916
|
+
className: classes.lineLeft,
|
|
917
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
918
|
+
[TEST_PROP_ID]: getNameDataTestId("lineLeft")
|
|
919
|
+
} : {}
|
|
920
|
+
}), /* @__PURE__ */ jsxs(WrapperContentMobile, {
|
|
921
|
+
className: classes.contentMobile,
|
|
922
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
923
|
+
[TEST_PROP_ID]: getNameDataTestId("contentMobile")
|
|
924
|
+
} : {},
|
|
925
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
926
|
+
className: classes.containerSideBarLogo,
|
|
927
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
928
|
+
[TEST_PROP_ID]: getNameDataTestId("containerSideBarLogo")
|
|
929
|
+
} : {},
|
|
930
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
931
|
+
className: classes.containerLogo,
|
|
932
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
933
|
+
[TEST_PROP_ID]: getNameDataTestId("containerLogo")
|
|
934
|
+
} : {},
|
|
935
|
+
children: [/* @__PURE__ */ jsx(Image, {
|
|
936
|
+
width: "64px",
|
|
937
|
+
height: "64px",
|
|
938
|
+
src: companyLogoSmallUrl,
|
|
939
|
+
alt: "logo"
|
|
940
|
+
}, "Logo"), !collapsed && /* @__PURE__ */ jsx(Typography, {
|
|
941
|
+
variant: "subtitleDens",
|
|
942
|
+
skeletonWidth: "100px",
|
|
943
|
+
children: companyName
|
|
944
|
+
})]
|
|
945
|
+
})
|
|
946
|
+
}), /* @__PURE__ */ jsx(ContentGroups, {})]
|
|
947
|
+
})]
|
|
948
|
+
});
|
|
949
|
+
};
|
|
950
|
+
const SideBar = (props) => {
|
|
951
|
+
const {
|
|
952
|
+
collapsed,
|
|
953
|
+
visible,
|
|
954
|
+
onToggleCollapse,
|
|
955
|
+
onToggleVisible,
|
|
956
|
+
menuData,
|
|
957
|
+
onClick,
|
|
958
|
+
companyLogoNormalUrl,
|
|
959
|
+
companyLogoSmallUrl,
|
|
960
|
+
isItemActive,
|
|
961
|
+
collapsedWidht = "280px",
|
|
962
|
+
unCollapsedWidht = "72px",
|
|
963
|
+
companyName
|
|
964
|
+
} = props;
|
|
965
|
+
const isDesktop = useResponsiveDesktop();
|
|
966
|
+
const ownerState = {
|
|
967
|
+
collapsed,
|
|
968
|
+
visible
|
|
969
|
+
};
|
|
970
|
+
const classes = getSideBarClassesByState(ownerState);
|
|
971
|
+
return /* @__PURE__ */ jsx(SideBarRoot, {
|
|
972
|
+
className: classes.root,
|
|
973
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
974
|
+
[TEST_PROP_ID]: getNameDataTestId("root")
|
|
975
|
+
} : {},
|
|
976
|
+
children: /* @__PURE__ */ jsx(SideBarProvider, {
|
|
977
|
+
value: {
|
|
978
|
+
collapsed,
|
|
979
|
+
visible,
|
|
980
|
+
onToggleCollapse,
|
|
981
|
+
onToggleVisible,
|
|
982
|
+
menuData,
|
|
983
|
+
onClick,
|
|
984
|
+
companyLogoNormalUrl,
|
|
985
|
+
companyLogoSmallUrl,
|
|
986
|
+
isItemActive,
|
|
987
|
+
collapsedWidht,
|
|
988
|
+
unCollapsedWidht,
|
|
989
|
+
classes,
|
|
990
|
+
companyName
|
|
991
|
+
},
|
|
992
|
+
children: /* @__PURE__ */ jsxs(WrapperSideBar, {
|
|
993
|
+
className: classes.wrapperSideBar,
|
|
994
|
+
width: !collapsed ? collapsedWidht : unCollapsedWidht,
|
|
995
|
+
visible,
|
|
996
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
997
|
+
className: classes.lineLeft,
|
|
998
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
999
|
+
[TEST_PROP_ID]: getNameDataTestId("lineLeft")
|
|
1000
|
+
} : {}
|
|
1001
|
+
}), isDesktop ? /* @__PURE__ */ jsx(ContentDesktop, {}) : /* @__PURE__ */ jsx(ContentMobile, {})]
|
|
1002
|
+
})
|
|
1003
|
+
})
|
|
1004
|
+
});
|
|
1005
|
+
};
|
|
1006
|
+
export {
|
|
1007
|
+
SideBar as S,
|
|
1008
|
+
getNameDataTestId as g,
|
|
1009
|
+
useSideBar as u
|
|
1010
|
+
};
|