@m4l/components 9.2.60-24062025.beta.1 → 9.2.60-J24062025.beta.1
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/types.d.ts +0 -8
- package/components/Chip/Chip.js +10 -9
- package/components/Chip/ChipStyles.js +2 -13
- package/components/Chip/constants.d.ts +0 -9
- package/components/Chip/constants.js +2 -6
- package/components/Chip/slots/ChipEnum.d.ts +0 -3
- package/components/Chip/slots/ChipEnum.js +1 -6
- package/components/Chip/slots/ChipSlots.js +1 -1
- package/components/DataGrid/DataGrid.js +17 -3
- package/components/DataGrid/Datagrid.styles.js +66 -27
- package/components/DataGrid/constants.d.ts +2 -0
- package/components/DataGrid/constants.js +7 -3
- package/components/DataGrid/contexts/DataGridContext/index.js +77 -30
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +5 -2
- package/components/DataGrid/dictionary.d.ts +8 -0
- package/components/DataGrid/dictionary.js +26 -17
- package/components/DataGrid/icons.d.ts +7 -0
- package/components/DataGrid/icons.js +8 -1
- package/components/DataGrid/slots/DataGridEnum.d.ts +5 -1
- package/components/DataGrid/slots/DataGridEnum.js +4 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +4 -0
- package/components/DataGrid/slots/DataGridSlot.js +22 -2
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Filter/index.js +9 -1
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +3 -1
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.js +9 -2
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +6 -0
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +262 -0
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.d.ts +6 -4
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +35 -18
- package/components/DataGrid/subcomponents/Table/index.js +97 -34
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +79 -4
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +146 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.d.ts +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/types.d.ts +131 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +1 -1
- package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
- package/components/DataGrid/tests/HeaderRenderClick.test.d.ts +1 -0
- package/components/DataGrid/tests/useHeaderMenuActions.test.d.ts +1 -0
- package/components/DataGrid/types.d.ts +53 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +90 -99
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +3 -0
- package/components/DynamicFilter/slots/SlotsEnum.js +3 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +9 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +19 -3
- package/components/DynamicFilter/store/DynamicFilterContext.js +67 -26
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +0 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +1 -2
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +0 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +18 -23
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +1 -4
- package/components/DynamicFilter/types.d.ts +3 -0
- package/components/DynamicSort/DynamicSort.js +10 -6
- package/components/DynamicSort/DynamicSort.styles.js +88 -90
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +9 -0
- package/components/DynamicSort/slots/DynamicSortSlots.js +21 -5
- package/components/DynamicSort/slots/SlotsEnum.d.ts +4 -1
- package/components/DynamicSort/slots/SlotsEnum.js +4 -1
- package/components/DynamicSort/store/DynamicSortContext.js +96 -67
- package/components/DynamicSort/store/DynamicSortStore.js +53 -4
- package/components/DynamicSort/store/types.d.ts +11 -0
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +0 -2
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +17 -21
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +0 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +1 -2
- package/components/DynamicSort/types.d.ts +4 -0
- package/components/LanguagePopover/LanguagePopover.js +6 -8
- package/components/LanguagePopover/LanguagePopover.styles.js +4 -25
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +3 -9
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +3 -1
- package/components/LanguagePopover/types.d.ts +1 -6
- package/components/PaperForm/styles.js +1 -2
- package/components/PropertyValue/PropertyValue.js +1 -2
- package/components/PropertyValue/PropertyValue.styles.js +4 -7
- package/components/PropertyValue/types.d.ts +0 -4
- package/components/SideBar/SideBar.js +2 -4
- package/components/SideBar/constants.d.ts +2 -26
- package/components/SideBar/constants.js +7 -19
- package/components/SideBar/context/sideBarContext/index.js +5 -19
- package/components/SideBar/context/sideBarContext/types.d.ts +1 -22
- package/components/SideBar/helpers/getMenuDataWithState/index.js +8 -25
- package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
- package/components/SideBar/slots/SideBarEnum.js +11 -9
- package/components/SideBar/slots/SideBarSlots.d.ts +3 -9
- package/components/SideBar/slots/SideBarSlots.js +28 -36
- package/components/SideBar/styles.js +4 -2
- package/components/SideBar/subcomponents/ContentComponent/index.js +19 -39
- package/components/SideBar/subcomponents/ContentComponent/style.js +22 -171
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +5 -0
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/index.js +18 -16
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.js +7 -5
- package/components/SideBar/subcomponents/{TreeGroupItems/subcomponents/NodeMenuItem → ContentGroups/subcomponents/ContainerMenuItemsMain}/index.d.ts +3 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +63 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +47 -0
- package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.js +7 -10
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +7 -0
- package/components/SideBar/subcomponents/ContentGroups/types.d.ts +4 -0
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.js +15 -8
- package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.js +2 -2
- package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +25 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +14 -10
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/types.d.ts +3 -7
- package/components/WindowBase/WindowBase.js +1 -4
- package/components/WindowBase/WindowBase.styles.js +13 -48
- package/components/WindowBase/constants.d.ts +0 -1
- package/components/WindowBase/constants.js +1 -5
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +1 -2
- package/components/WindowBase/slots/WindowBaseEnum.js +0 -1
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +0 -3
- package/components/WindowBase/slots/WindowBaseSlots.js +1 -6
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +4 -8
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +2 -4
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +0 -5
- package/components/WindowBase/types.d.ts +0 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +0 -13
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +20 -21
- package/components/extended/React-Resizable/helpers.js +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +3 -6
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +36 -78
- package/components/extended/React-resizable-panels/constants.d.ts +0 -6
- package/components/extended/React-resizable-panels/constants.js +1 -5
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +1 -2
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +0 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +0 -3
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +1 -7
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.js +0 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +1 -1
- package/components/mui_extended/Accordion/styles.js +2 -10
- package/components/mui_extended/Button/Button.js +1 -3
- package/components/mui_extended/Button/ButtonStyles.js +1 -6
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/CheckBox/CheckBox.styles.js +2 -1
- package/components/mui_extended/NavLink/NavLink.js +1 -3
- package/components/mui_extended/NavLink/NavLink.styles.js +1 -2
- package/components/mui_extended/NavLink/types.d.ts +1 -3
- package/components/mui_extended/Tab/Tab.styles.js +1 -2
- package/components/mui_extended/TabContent/TabContent.styles.js +8 -2
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +13 -15
- package/components/mui_extended/index.d.ts +0 -1
- package/hooks/useDynamicFilterAndSort/styles.js +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +3 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +334 -88
- package/index.d.ts +0 -1
- package/index.js +20 -23
- package/package.json +5 -6
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +22 -0
- package/storybook/components/DataGrid/MswHandles.d.ts +1 -0
- package/storybook/components/DataGrid/helpers/filterFieldsSeedData.d.ts +5 -0
- package/storybook/components/DataGrid/helpers/getRows.d.ts +4 -0
- package/storybook/components/DataGrid/helpers/getRowsWithBackendSimulation.d.ts +9 -0
- package/storybook/components/DataGrid/helpers/sortsSeedData.d.ts +5 -0
- package/storybook/components/DataGrid/helpers/types.d.ts +1 -0
- package/storybook/components/DataGrid/helpers/useSeed.d.ts +3 -0
- package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +2 -0
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +11 -27
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +10 -26
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +0 -1
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +0 -1
- package/utils/index.d.ts +0 -1
- package/components/SideBar/hooks/useCollapse/index.d.ts +0 -1
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +0 -11
- package/components/SideBar/hooks/useCollapse/useCollapse.js +0 -23
- package/components/SideBar/subcomponents/Promotion/types.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +0 -69
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +0 -9
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +0 -5
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +0 -56
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +0 -1
- package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +0 -4
- package/components/mui_extended/Divider/index.d.ts +0 -1
- package/components/mui_extended/Divider/index.js +0 -1
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +0 -3
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +0 -1
- /package/components/{SideBar/hooks/useCollapse → DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick}/index.js +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.d.ts +0 -0
- /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/types.d.ts +0 -0
- /package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.d.ts +0 -0
|
@@ -1,193 +1,44 @@
|
|
|
1
|
-
import { b as CLASS_NAME_IS_ROOT, c as CLASS_NAME_MENU_ACTIVE, d as CLASS_NAME_ITEM_IN_TREE_ACTIVE, e as CLASS_NAME_HAS_CHILDREN } from "../../constants.js";
|
|
2
|
-
import { g as getTypographyStyles } from "../../../../utils/getTypographyStyles.js";
|
|
3
|
-
import { g as getSizeStyles } from "../../../../utils/getSizeStyles/getSizeStyles.js";
|
|
4
1
|
const contentComponentStyles = {
|
|
5
2
|
/**
|
|
6
3
|
* Estilos del contenedor principal del sidebar
|
|
7
4
|
*/
|
|
8
5
|
contentComponentRoot: ({ theme }) => ({
|
|
9
6
|
position: "relative",
|
|
10
|
-
display: "flex",
|
|
11
|
-
flexDirection: "column",
|
|
12
7
|
height: "100%",
|
|
13
|
-
width: "
|
|
14
|
-
backgroundColor: theme.vars.palette.background.default
|
|
8
|
+
width: "auto",
|
|
9
|
+
backgroundColor: theme.vars.palette.background.default,
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexDirection: "column"
|
|
15
12
|
}),
|
|
16
13
|
/**
|
|
17
14
|
* Estilos del contenedor que oculta el contenido cuando se encuentra des anclado.
|
|
18
15
|
*/
|
|
19
|
-
contentComponentHide: ({ theme, ownerState }) => {
|
|
20
|
-
|
|
21
|
-
return {
|
|
22
|
-
width: "100%",
|
|
23
|
-
height: "100%",
|
|
24
|
-
overflow: "hidden",
|
|
25
|
-
flex: 1,
|
|
26
|
-
display: "flex",
|
|
27
|
-
flexDirection: "column",
|
|
28
|
-
transition: "all 0.5s",
|
|
29
|
-
...!ownerState?.anchored && !theme.generalSettings.isMobile && {
|
|
30
|
-
width: ownerState?.anchored && ownerState?.isDesktop ? ownerState?.expandedWidth : !ownerState?.isDesktop ? "100%" : theme.vars.size.baseSpacings.sp4,
|
|
31
|
-
minWidth: width,
|
|
32
|
-
maxWidth: width,
|
|
33
|
-
...ownerState?.isHover && !theme.generalSettings.isMobile && {
|
|
34
|
-
transition: "all 0.5s",
|
|
35
|
-
width: `${ownerState?.expandedWidth}!important`,
|
|
36
|
-
maxWidth: `${ownerState?.expandedWidth}!important`,
|
|
37
|
-
contentVisibility: "visible",
|
|
38
|
-
'& [class*="containerFooter"]': {
|
|
39
|
-
borderWidth: theme.vars.size.baseSpacings["sp0-5"]
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
/**
|
|
46
|
-
* Contenedor que abraza el contenido del menu en primer lugar.
|
|
47
|
-
*/
|
|
48
|
-
containerTreeItemsAndPromotion: ({ theme, ownerState }) => ({
|
|
16
|
+
contentComponentHide: ({ theme, ownerState }) => ({
|
|
17
|
+
width: "100%",
|
|
49
18
|
height: "100%",
|
|
50
|
-
width: ownerState?.expandedWidth,
|
|
51
|
-
flex: 1,
|
|
52
19
|
overflow: "hidden",
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
height: size,
|
|
64
|
-
minHeight: size,
|
|
65
|
-
maxHeight: size
|
|
66
|
-
})
|
|
67
|
-
)
|
|
68
|
-
},
|
|
69
|
-
"& .M4LMenuItem-root": {
|
|
70
|
-
border: "unset",
|
|
71
|
-
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
72
|
-
paddingRight: theme.vars.size.baseSpacings.sp2,
|
|
73
|
-
"& .M4LTypography-root": {
|
|
74
|
-
paddingLeft: `${theme.vars.size.baseSpacings.sp2} !important`,
|
|
75
|
-
...getTypographyStyles(
|
|
76
|
-
theme.generalSettings.isMobile,
|
|
77
|
-
ownerState?.size || "medium",
|
|
78
|
-
"caption"
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}),
|
|
83
|
-
/**
|
|
84
|
-
* Contenedor que contiene grupo menu item desplegable.
|
|
85
|
-
*/
|
|
86
|
-
containerNodeMenuItem: ({ theme, ownerState }) => ({
|
|
87
|
-
marginLeft: theme.vars.size.baseSpacings.sp4,
|
|
88
|
-
display: "flex",
|
|
89
|
-
flexDirection: "column",
|
|
90
|
-
overflow: "visible",
|
|
91
|
-
'& [class*="M4LMenuItem-root"]:not(.menu-active)': {
|
|
92
|
-
"& .M4LTypography-root": {
|
|
93
|
-
color: `${theme.vars.palette.text.secondary}!important`
|
|
94
|
-
},
|
|
95
|
-
"& .M4LIcon-icon": {
|
|
96
|
-
backgroundColor: `${theme.vars.palette.text.secondary}!important`
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
[`&.${CLASS_NAME_IS_ROOT}`]: {
|
|
100
|
-
margin: "unset"
|
|
101
|
-
},
|
|
102
|
-
[`& > .M4LMenuItem-root:first-of-type:not(.${CLASS_NAME_MENU_ACTIVE}).${CLASS_NAME_ITEM_IN_TREE_ACTIVE}`]: {
|
|
103
|
-
borderColor: theme.vars.palette.divider,
|
|
104
|
-
// Linea de referencia vertical
|
|
105
|
-
"&::before": {
|
|
106
|
-
content: '""',
|
|
107
|
-
position: "absolute",
|
|
108
|
-
top: "-25%",
|
|
109
|
-
bottom: "-25%",
|
|
110
|
-
height: "150%",
|
|
111
|
-
left: 0,
|
|
112
|
-
width: 2,
|
|
113
|
-
borderLeft: theme.vars.size.borderStroke.container,
|
|
114
|
-
borderColor: theme.vars.palette.border.default,
|
|
115
|
-
...ownerState?.isLastSibling && !ownerState?.hasChildren && {
|
|
116
|
-
height: "75%"
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
// Linea de referencia horizontal
|
|
120
|
-
[`&:not(.${CLASS_NAME_HAS_CHILDREN}):after`]: {
|
|
121
|
-
content: '""',
|
|
122
|
-
position: "absolute",
|
|
123
|
-
margin: "0",
|
|
124
|
-
left: 1,
|
|
125
|
-
width: 4,
|
|
126
|
-
height: 1,
|
|
127
|
-
borderTop: theme.vars.size.borderStroke.container,
|
|
128
|
-
borderColor: theme.vars.palette.border.default
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
[`&.M4LSidebar-containerNodeMenuItem > .M4LMenuItem-root[class*="${CLASS_NAME_ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
|
|
132
|
-
background: theme.vars.palette.text.primary
|
|
133
|
-
},
|
|
134
|
-
[`& > .M4LMenuItem-root:not(.${CLASS_NAME_IS_ROOT}).${CLASS_NAME_MENU_ACTIVE}`]: {
|
|
135
|
-
"&::before": {
|
|
136
|
-
content: '""',
|
|
137
|
-
position: "absolute",
|
|
138
|
-
height: "25%",
|
|
139
|
-
top: "25%",
|
|
140
|
-
bottom: 0,
|
|
141
|
-
left: 0,
|
|
142
|
-
width: 2,
|
|
143
|
-
borderLeft: theme.vars.size.borderStroke.container,
|
|
144
|
-
borderColor: theme.vars.palette.primary.enabled,
|
|
145
|
-
...!ownerState?.isLastSibling && !ownerState?.hasChildren && {
|
|
146
|
-
height: "50%"
|
|
20
|
+
transition: "all 0.5s",
|
|
21
|
+
flex: 1,
|
|
22
|
+
...!ownerState?.anchored && {
|
|
23
|
+
width: ownerState?.anchored && ownerState?.isDesktop ? ownerState?.expandedWidth : !ownerState?.isDesktop ? "100%" : theme.vars.size.baseSpacings.sp4,
|
|
24
|
+
"&:hover": {
|
|
25
|
+
transition: "all 0.5s",
|
|
26
|
+
width: ownerState?.expandedWidth,
|
|
27
|
+
contentVisibility: "visible",
|
|
28
|
+
'& [class*="containerFooter"]': {
|
|
29
|
+
borderWidth: theme.vars.size.baseSpacings["sp0-5"]
|
|
147
30
|
}
|
|
148
|
-
},
|
|
149
|
-
"&:after": {
|
|
150
|
-
content: '""',
|
|
151
|
-
position: "absolute",
|
|
152
|
-
margin: "0",
|
|
153
|
-
left: 0,
|
|
154
|
-
width: theme.vars.size.baseSpacings.sp1,
|
|
155
|
-
height: 1,
|
|
156
|
-
borderTop: theme.vars.size.borderStroke.container,
|
|
157
|
-
borderColor: theme.vars.palette.primary.enabled
|
|
158
31
|
}
|
|
159
|
-
},
|
|
160
|
-
[`& > .M4LMenuItem-root.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}`]: {
|
|
161
|
-
backgroundColor: theme.vars.palette.primary.opacity
|
|
162
|
-
},
|
|
163
|
-
"& .MuiCollapse-wrapperInner": {
|
|
164
|
-
display: "flex",
|
|
165
|
-
flexDirection: "column",
|
|
166
|
-
paddingLeft: 0,
|
|
167
|
-
paddingBottom: theme.vars.size.baseSpacings.sp1,
|
|
168
|
-
paddingTop: 0,
|
|
169
|
-
paddingRight: theme.vars.size.baseSpacings.sp1
|
|
170
|
-
},
|
|
171
|
-
[`&.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}`]: {
|
|
172
|
-
backgroundColor: theme.vars.palette.background.base,
|
|
173
|
-
borderRadius: theme.vars.size.borderRadius["r1-5"]
|
|
174
32
|
}
|
|
175
33
|
}),
|
|
176
|
-
containerNodeMenuItemMain: {},
|
|
177
34
|
/**
|
|
178
|
-
*
|
|
35
|
+
* Contenedor que abraza el contenido del menu en primer lugar.
|
|
179
36
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
...getTypographyStyles(
|
|
186
|
-
theme.generalSettings.isMobile,
|
|
187
|
-
ownerState?.size || "medium",
|
|
188
|
-
"bodyDens"
|
|
189
|
-
)
|
|
190
|
-
}
|
|
37
|
+
containerComponent: ({ ownerState }) => ({
|
|
38
|
+
height: "100%",
|
|
39
|
+
width: ownerState?.expandedWidth,
|
|
40
|
+
display: "flex",
|
|
41
|
+
flexDirection: "column"
|
|
191
42
|
})
|
|
192
43
|
};
|
|
193
44
|
export {
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleDictionary
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { u as useSideBar } from "../../hooks/useSideBar/index.js";
|
|
4
4
|
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
|
|
5
5
|
import { g as getNameDataTestId } from "../../tests/utils.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { d as ContainerContentGroupsRootStyled, e as ContainerContentGroupsStyled, f as ContainerContentTitleStyled, g as ContainerContentNavItemsStyled } from "../../slots/SideBarSlots.js";
|
|
7
|
+
import { C as ContainerMenuItemsMain } from "./subcomponents/ContainerMenuItemsMain/index.js";
|
|
8
8
|
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
9
|
+
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
9
10
|
import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
|
|
10
|
-
const
|
|
11
|
+
const ContentGroups = (contentGroupsProps) => {
|
|
11
12
|
const { menuData } = useSideBar();
|
|
12
13
|
const { getLabel } = useModuleDictionary();
|
|
13
14
|
const { size } = contentGroupsProps;
|
|
14
15
|
const { currentSize } = useComponentSize(size);
|
|
15
|
-
const isSkeleton = useModuleSkeleton();
|
|
16
16
|
const ownerState = {
|
|
17
17
|
noItems: menuData.length === 0
|
|
18
18
|
};
|
|
19
|
+
const renderTitle = (title) => {
|
|
20
|
+
return /* @__PURE__ */ jsx(ContainerContentTitleStyled, { children: /* @__PURE__ */ jsx(Typography, { variant: "bodyDens", skeletonWidth: "100px", children: title }) });
|
|
21
|
+
};
|
|
22
|
+
const renderItems = (item) => {
|
|
23
|
+
return /* @__PURE__ */ jsx(ContainerContentNavItemsStyled, { children: item?.map((list) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: list, openSubItem: true, size: currentSize }, list.title)) });
|
|
24
|
+
};
|
|
19
25
|
const renderItemsDisabled = () => {
|
|
20
26
|
return /* @__PURE__ */ jsx(ContainerContentTitleStyled, { ownerState: { disabled: true }, children: /* @__PURE__ */ jsx(
|
|
21
27
|
MenuItem,
|
|
@@ -26,25 +32,21 @@ const TreeGroupItems = (contentGroupsProps) => {
|
|
|
26
32
|
) });
|
|
27
33
|
};
|
|
28
34
|
return /* @__PURE__ */ jsx(
|
|
29
|
-
|
|
35
|
+
ContainerContentGroupsRootStyled,
|
|
30
36
|
{
|
|
31
37
|
ownerState,
|
|
32
38
|
role: "bodysidebar",
|
|
33
39
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("content-groups") } : {},
|
|
34
40
|
children: menuData.length > 0 ? menuData.map((itemGroup) => (
|
|
35
41
|
/* Render title section in menusidebar */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
size: currentSize,
|
|
41
|
-
defaultOpen: isSkeleton ? false : true
|
|
42
|
-
}
|
|
43
|
-
) }, itemGroup.title)
|
|
42
|
+
/* @__PURE__ */ jsxs(ContainerContentGroupsStyled, { children: [
|
|
43
|
+
renderTitle(itemGroup.title),
|
|
44
|
+
renderItems(itemGroup.children)
|
|
45
|
+
] }, itemGroup.title)
|
|
44
46
|
)) : renderItemsDisabled()
|
|
45
47
|
}
|
|
46
48
|
);
|
|
47
49
|
};
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
ContentGroups as C
|
|
50
52
|
};
|
|
@@ -2,11 +2,10 @@ const contentGroupStyles = {
|
|
|
2
2
|
/**
|
|
3
3
|
* Container for the group items in the sidebar
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
containerContentGroupsRoot: ({ theme, ownerState }) => ({
|
|
6
6
|
display: "flex",
|
|
7
7
|
width: "100%",
|
|
8
8
|
height: "100%",
|
|
9
|
-
flex: 1,
|
|
10
9
|
flexDirection: "column",
|
|
11
10
|
overflowY: "auto",
|
|
12
11
|
padding: `${theme.vars.size.baseSpacings.sp3} 0px 0px 0px`,
|
|
@@ -16,11 +15,14 @@ const contentGroupStyles = {
|
|
|
16
15
|
/**
|
|
17
16
|
* Wrapper for every principal item group in the sidebar
|
|
18
17
|
*/
|
|
19
|
-
containerContentGroups: () => ({
|
|
18
|
+
containerContentGroups: ({ theme }) => ({
|
|
20
19
|
display: "flex",
|
|
21
20
|
width: "100%",
|
|
22
|
-
height: "
|
|
23
|
-
flexDirection: "column"
|
|
21
|
+
height: "100%",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
padding: `${theme.vars.size.baseSpacings.sp3} 0px`,
|
|
24
|
+
flex: 1,
|
|
25
|
+
overflow: "auto"
|
|
24
26
|
}),
|
|
25
27
|
/**
|
|
26
28
|
* Title wrapper for every principal item group in the sidebar
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NavListSubItemProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* MenuItems component renderiza los items del menu con sus respectivos hijos y estados
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {NavListSubItemProps} props - Propiedades del componente
|
|
5
5
|
* @param {MenuDataType} props.item - Datos del item del menu
|
|
6
6
|
* @param {boolean} props.openSubItem - Estado del item del menu: Abierto - cerrado
|
|
7
7
|
*/
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function ContainerMenuItemsMain(props: NavListSubItemProps): import("react/jsx-runtime").JSX.Element;
|
package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Collapse } from "@mui/material";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import { u as useSideBar } from "../../../../hooks/useSideBar/index.js";
|
|
7
|
+
import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
|
|
8
|
+
import { g as getNameDataTestId } from "../../../../tests/utils.js";
|
|
9
|
+
import { A as ArrowIcon } from "./subcomponents/ArrowIcon/index.js";
|
|
10
|
+
import { h as ContainerMenuItemsStyled } from "../../../../slots/SideBarSlots.js";
|
|
11
|
+
import { a as getComponentSlotRoot } from "../../../../../../utils/getComponentSlotRoot.js";
|
|
12
|
+
import { I as ITEM_ACTIVE, b as ITEM_IN_TREE_ACTIVE, L as LIST_MENU_ITEM } from "../../../../constants.js";
|
|
13
|
+
import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
14
|
+
import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
|
|
15
|
+
function ContainerMenuItemsMain(props) {
|
|
16
|
+
const { item, size } = props;
|
|
17
|
+
const { onMenuItemClick, onToggleVisible, urlIconPrefix } = useSideBar();
|
|
18
|
+
const [openSub, setOpenSub] = useState(props.openSubItem ?? false);
|
|
19
|
+
const hasChildren = item.children && Array.isArray(item.children) && item.children.length > 0;
|
|
20
|
+
const isMobile = useIsMobile();
|
|
21
|
+
const { currentSize } = useComponentSize(size);
|
|
22
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
23
|
+
const ownerState = {
|
|
24
|
+
active: item.active,
|
|
25
|
+
itemInTreeActive: item.itemInTreeActive,
|
|
26
|
+
sidebarSize: adjustedSize
|
|
27
|
+
};
|
|
28
|
+
const handlerClick = () => {
|
|
29
|
+
onMenuItemClick(item);
|
|
30
|
+
setOpenSub(!openSub);
|
|
31
|
+
if (isMobile && (!hasChildren || hasChildren === void 0)) {
|
|
32
|
+
onToggleVisible(true);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const classRoot = getComponentSlotRoot(LIST_MENU_ITEM);
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
ContainerMenuItemsStyled,
|
|
38
|
+
{
|
|
39
|
+
className: clsx(classRoot),
|
|
40
|
+
role: "listitem",
|
|
41
|
+
ownerState,
|
|
42
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("menuItems") } : {},
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
MenuItem,
|
|
46
|
+
{
|
|
47
|
+
className: clsx(item.active ? ITEM_ACTIVE : ITEM_IN_TREE_ACTIVE),
|
|
48
|
+
label: item.title,
|
|
49
|
+
selected: item.active || item.itemInTreeActive,
|
|
50
|
+
startIcon: `${urlIconPrefix}${item.iconUrl}`,
|
|
51
|
+
endIcon: hasChildren ? /* @__PURE__ */ jsx(ArrowIcon, { openState: openSub, active: item.active }) : null,
|
|
52
|
+
onClick: () => handlerClick(),
|
|
53
|
+
size: adjustedSize
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
hasChildren ? /* @__PURE__ */ jsx(Collapse, { in: openSub, timeout: "auto", unmountOnExit: true, children: (item.children || []).map((child) => /* @__PURE__ */ jsx(ContainerMenuItemsMain, { item: child, size: adjustedSize }, child.title)) }) : null
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
ContainerMenuItemsMain as C
|
|
63
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { a as getHeightSizeStyles } from "../../../../../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
|
+
import { I as ITEM_ACTIVE, b as ITEM_IN_TREE_ACTIVE } from "../../../../constants.js";
|
|
3
|
+
const containerMenuItemsMainStyles = {
|
|
4
|
+
/**
|
|
5
|
+
* Style aplicado al contenedor de los items del menú
|
|
6
|
+
*/
|
|
7
|
+
containerMenuItems: ({ theme, ownerState }) => ({
|
|
8
|
+
marginLeft: theme.vars.size.baseSpacings.sp4,
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
12
|
+
...getHeightSizeStyles(
|
|
13
|
+
theme.generalSettings.isMobile,
|
|
14
|
+
ownerState?.size || "medium",
|
|
15
|
+
"container",
|
|
16
|
+
(height) => {
|
|
17
|
+
return {
|
|
18
|
+
height: "auto",
|
|
19
|
+
minHeight: height
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
[`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_IN_TREE_ACTIVE}"]`]: {
|
|
24
|
+
borderColor: theme.vars.palette.divider,
|
|
25
|
+
"& span": {
|
|
26
|
+
color: theme.vars.palette.text.primary
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
[`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
|
|
30
|
+
background: theme.vars.palette.text.primary
|
|
31
|
+
},
|
|
32
|
+
[`&.M4LListMenuItem-root > .M4LMenuItem-root[class*="${ITEM_ACTIVE}"]`]: {
|
|
33
|
+
borderColor: theme.vars.palette.primary.enabled,
|
|
34
|
+
"& span": {
|
|
35
|
+
color: theme.vars.palette.primary.enabled
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"& .MuiCollapse-wrapperInner": {
|
|
39
|
+
display: "flex",
|
|
40
|
+
flexDirection: "column",
|
|
41
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
containerMenuItemsMainStyles as c
|
|
47
|
+
};
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
|
-
import { T as TEST_PROP_ID } from "
|
|
4
|
-
import { g as getNameDataTestId } from "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { I as Icon } from "../../../../../Icon/Icon.js";
|
|
3
|
+
import { T as TEST_PROP_ID } from "../../../../../../../../test/constants_no_mock.js";
|
|
4
|
+
import { g as getNameDataTestId } from "../../../../../../tests/utils.js";
|
|
5
|
+
import { c as PATH_ARROW_DOWN_ICON } from "../../../../../../constants.js";
|
|
6
|
+
import { i as ContainerArrowIconRootStyled } from "../../../../../../slots/SideBarSlots.js";
|
|
7
|
+
import { I as IconButton } from "../../../../../../../mui_extended/IconButton/IconButton.js";
|
|
9
8
|
function ArrowIcon(props) {
|
|
10
9
|
const { openState, active } = props;
|
|
11
10
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
12
|
-
const { classes } = useSideBar();
|
|
13
11
|
return /* @__PURE__ */ jsx(
|
|
14
12
|
ContainerArrowIconRootStyled,
|
|
15
13
|
{
|
|
16
|
-
className: classes.containerArrowIconRoot,
|
|
17
14
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("arrowIconRoot") } : {},
|
|
18
15
|
children: /* @__PURE__ */ jsx(
|
|
19
|
-
|
|
16
|
+
IconButton,
|
|
20
17
|
{
|
|
21
18
|
src: `${host_static_assets}/${environment_assets}/${PATH_ARROW_DOWN_ICON}`,
|
|
22
19
|
rotationAngle: openState ? 270 : 90,
|
|
23
|
-
color: active ? "primary
|
|
20
|
+
color: active ? "primary" : "default"
|
|
24
21
|
}
|
|
25
22
|
)
|
|
26
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FooterSidebarProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renderiza el footer del sidebar
|
|
4
4
|
* @param {CollapseButtonProps} props - Propiedades del componente
|
|
@@ -6,4 +6,4 @@ import { PromotionProps } from './types';
|
|
|
6
6
|
* @param {VoidFunction} props.collapsed - Variable que guarda el estado de colapsado en desktop
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export default function
|
|
9
|
+
export default function FooterSidebar({ anchored }: FooterSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,25 +2,32 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { u as useSideBar } from "../../hooks/useSideBar/index.js";
|
|
3
3
|
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
|
|
4
4
|
import { g as getNameDataTestId } from "../../tests/utils.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { j as ContainerFooterStyled } from "../../slots/SideBarSlots.js";
|
|
6
|
+
import { I as Image } from "../../../Image/Image.js";
|
|
7
|
+
function FooterSidebar({ anchored }) {
|
|
8
|
+
const { companyLogoNormalUrl } = useSideBar();
|
|
8
9
|
const ownerState = {
|
|
9
10
|
anchored
|
|
10
11
|
};
|
|
11
|
-
if (!promotion) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
12
|
return /* @__PURE__ */ jsx(
|
|
15
13
|
ContainerFooterStyled,
|
|
16
14
|
{
|
|
17
15
|
ownerState,
|
|
18
16
|
role: "footer",
|
|
19
17
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("footer") } : {},
|
|
20
|
-
children:
|
|
18
|
+
children: /* @__PURE__ */ jsx(
|
|
19
|
+
Image,
|
|
20
|
+
{
|
|
21
|
+
width: "auto",
|
|
22
|
+
height: "40px",
|
|
23
|
+
src: companyLogoNormalUrl || "",
|
|
24
|
+
alt: "logo"
|
|
25
|
+
},
|
|
26
|
+
"Logo"
|
|
27
|
+
)
|
|
21
28
|
}
|
|
22
29
|
);
|
|
23
30
|
}
|
|
24
31
|
export {
|
|
25
|
-
|
|
32
|
+
FooterSidebar as F
|
|
26
33
|
};
|
|
@@ -6,10 +6,10 @@ const footerSideBarStyles = {
|
|
|
6
6
|
height: "auto",
|
|
7
7
|
display: "grid",
|
|
8
8
|
placeItems: "center",
|
|
9
|
+
padding: `${theme.vars.size.baseSpacings.sp4} ${theme.vars.size.baseSpacings.sp12}`,
|
|
9
10
|
borderTop: `${theme.vars.size.baseSpacings["sp0-5"]} solid ${theme.vars.palette.border.secondary}`,
|
|
10
11
|
borderWidth: ownerState?.anchored ? theme.vars.size.baseSpacings["sp0-5"] : theme.vars.size.baseSpacings.sp0,
|
|
11
|
-
transition: "all 0.5s"
|
|
12
|
-
paddingBottom: theme.vars.size.baseSpacings.sp2
|
|
12
|
+
transition: "all 0.5s"
|
|
13
13
|
})
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { k as ContainerHeaderSidebarRootStyled, l as ContainerTitleSubtitleStyled } from "../../slots/SideBarSlots.js";
|
|
3
|
+
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
4
|
+
import { I as Image } from "../../../Image/Image.js";
|
|
5
|
+
const HeaderSidebar = ({ srcIcon, title, subtitle }) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs(ContainerHeaderSidebarRootStyled, { role: "heading", children: [
|
|
7
|
+
/* @__PURE__ */ jsx(
|
|
8
|
+
Image,
|
|
9
|
+
{
|
|
10
|
+
width: "24px",
|
|
11
|
+
height: "24px",
|
|
12
|
+
src: srcIcon,
|
|
13
|
+
alt: "logo"
|
|
14
|
+
},
|
|
15
|
+
"Logo"
|
|
16
|
+
),
|
|
17
|
+
/* @__PURE__ */ jsxs(ContainerTitleSubtitleStyled, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitleDens", size: "medium", skeletonWidth: 120, children: title }),
|
|
19
|
+
/* @__PURE__ */ jsx(Typography, { variant: "paragraph", size: "medium", margin: 0, skeletonWidth: 150, children: subtitle })
|
|
20
|
+
] })
|
|
21
|
+
] });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
HeaderSidebar as H
|
|
25
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useFirstRender } from "@m4l/graphics";
|
|
3
3
|
import { u as useSideBar } from "../../hooks/useSideBar/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { m as ContainerDesktopContentStyled, n as ContainerDesktopRootStyled } from "../../slots/SideBarSlots.js";
|
|
5
5
|
import { S as SIDEBAR_KEY_COMPONENT } from "../../constants.js";
|
|
6
6
|
import { C as ContentComponent } from "../ContentComponent/index.js";
|
|
7
7
|
import { useState, useEffect } from "react";
|
|
@@ -30,22 +30,14 @@ const sideBarDesktopStyles = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Container button to achores the sidebar.
|
|
32
32
|
*/
|
|
33
|
-
containerBtnAnchored: ({ theme
|
|
33
|
+
containerBtnAnchored: ({ theme }) => ({
|
|
34
34
|
position: "absolute",
|
|
35
35
|
right: "-20px",
|
|
36
36
|
top: "20px",
|
|
37
37
|
zIndex: 1e3,
|
|
38
38
|
padding: `${theme.vars.size.baseSpacings.sp10} 10px`,
|
|
39
39
|
"& .MuiButtonBase-root": {
|
|
40
|
-
|
|
41
|
-
"&:before": {
|
|
42
|
-
content: '""',
|
|
43
|
-
position: "absolute",
|
|
44
|
-
inset: 0,
|
|
45
|
-
backgroundColor: theme.vars.palette.background.default,
|
|
46
|
-
zIndex: -1
|
|
47
|
-
}
|
|
48
|
-
}
|
|
40
|
+
background: theme.vars.palette.background.default
|
|
49
41
|
},
|
|
50
42
|
"&&& .M4LIconButton-root:hover": {
|
|
51
43
|
backgroundColor: theme.vars.palette.primary.enabled,
|
|
@@ -53,6 +45,18 @@ const sideBarDesktopStyles = {
|
|
|
53
45
|
backgroundColor: `${theme.vars.palette.primary.contrastText}!important`
|
|
54
46
|
}
|
|
55
47
|
}
|
|
48
|
+
// '&:hover': {
|
|
49
|
+
// '& .MuiButtonBase-root': {
|
|
50
|
+
// border: `1px solid ${theme.palette.border.default}`,
|
|
51
|
+
// background: theme.vars.palette.primary.enabled,
|
|
52
|
+
// '& [class*="M4LIcon-root"] > div':{
|
|
53
|
+
// backgroundColor: theme.vars.palette.background.default,
|
|
54
|
+
// },
|
|
55
|
+
// },
|
|
56
|
+
// '& .MuiButtonBase-root:active': {
|
|
57
|
+
// background: theme.vars.palette.primary.active,
|
|
58
|
+
// },
|
|
59
|
+
// },
|
|
56
60
|
})
|
|
57
61
|
};
|
|
58
62
|
export {
|