@m4l/components 9.2.60-24062025.beta.1 → 9.2.60-J18062025.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.
Files changed (199) hide show
  1. package/@types/types.d.ts +0 -8
  2. package/components/Chip/Chip.js +10 -9
  3. package/components/Chip/ChipStyles.js +2 -13
  4. package/components/Chip/constants.d.ts +0 -9
  5. package/components/Chip/constants.js +2 -6
  6. package/components/Chip/slots/ChipEnum.d.ts +0 -3
  7. package/components/Chip/slots/ChipEnum.js +1 -6
  8. package/components/Chip/slots/ChipSlots.js +1 -1
  9. package/components/DataGrid/DataGrid.js +17 -3
  10. package/components/DataGrid/Datagrid.styles.js +67 -27
  11. package/components/DataGrid/constants.d.ts +2 -0
  12. package/components/DataGrid/constants.js +7 -3
  13. package/components/DataGrid/contexts/DataGridContext/index.js +77 -30
  14. package/components/DataGrid/contexts/DataGridContext/types.d.ts +5 -2
  15. package/components/DataGrid/dictionary.d.ts +8 -0
  16. package/components/DataGrid/dictionary.js +26 -17
  17. package/components/DataGrid/icons.d.ts +6 -0
  18. package/components/DataGrid/icons.js +7 -1
  19. package/components/DataGrid/slots/DataGridEnum.d.ts +5 -1
  20. package/components/DataGrid/slots/DataGridEnum.js +4 -0
  21. package/components/DataGrid/slots/DataGridSlot.d.ts +4 -0
  22. package/components/DataGrid/slots/DataGridSlot.js +22 -2
  23. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Filter/index.js +9 -1
  24. package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +3 -1
  25. package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.js +9 -2
  26. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +6 -0
  27. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +259 -0
  28. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.d.ts +6 -4
  29. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +35 -18
  30. package/components/DataGrid/subcomponents/Table/index.js +97 -34
  31. package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
  32. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +1 -0
  33. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +42 -3
  34. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
  35. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +136 -0
  36. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.d.ts +1 -0
  37. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/types.d.ts +131 -0
  38. package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +1 -1
  39. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
  40. package/components/DataGrid/tests/HeaderRenderClick.test.d.ts +1 -0
  41. package/components/DataGrid/tests/useHeaderMenuActions.test.d.ts +1 -0
  42. package/components/DataGrid/types.d.ts +53 -0
  43. package/components/DynamicFilter/DynamicFilter.styles.js +90 -99
  44. package/components/DynamicFilter/slots/SlotsEnum.d.ts +3 -0
  45. package/components/DynamicFilter/slots/SlotsEnum.js +3 -0
  46. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +9 -0
  47. package/components/DynamicFilter/slots/dynamicFilterSlots.js +19 -3
  48. package/components/DynamicFilter/store/DynamicFilterContext.js +67 -26
  49. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
  50. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
  51. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
  52. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
  53. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
  54. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
  55. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
  56. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +0 -1
  57. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +1 -2
  58. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +0 -2
  59. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +18 -23
  60. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +1 -4
  61. package/components/DynamicFilter/types.d.ts +3 -0
  62. package/components/DynamicSort/DynamicSort.js +10 -6
  63. package/components/DynamicSort/DynamicSort.styles.js +88 -90
  64. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +9 -0
  65. package/components/DynamicSort/slots/DynamicSortSlots.js +21 -5
  66. package/components/DynamicSort/slots/SlotsEnum.d.ts +4 -1
  67. package/components/DynamicSort/slots/SlotsEnum.js +4 -1
  68. package/components/DynamicSort/store/DynamicSortContext.js +96 -67
  69. package/components/DynamicSort/store/DynamicSortStore.js +53 -4
  70. package/components/DynamicSort/store/types.d.ts +11 -0
  71. package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
  72. package/components/DynamicSort/subcomponents/InputSort/InputSort.js +0 -2
  73. package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +17 -21
  74. package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
  75. package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +0 -2
  76. package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +1 -2
  77. package/components/DynamicSort/types.d.ts +4 -0
  78. package/components/LanguagePopover/LanguagePopover.js +6 -8
  79. package/components/LanguagePopover/LanguagePopover.styles.js +4 -25
  80. package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +3 -9
  81. package/components/LanguagePopover/slots/LanguagePopoverSlots.js +3 -1
  82. package/components/LanguagePopover/types.d.ts +1 -6
  83. package/components/PaperForm/styles.js +1 -2
  84. package/components/PropertyValue/PropertyValue.js +1 -2
  85. package/components/PropertyValue/PropertyValue.styles.js +4 -7
  86. package/components/PropertyValue/types.d.ts +0 -4
  87. package/components/SideBar/SideBar.js +2 -4
  88. package/components/SideBar/constants.d.ts +2 -26
  89. package/components/SideBar/constants.js +7 -19
  90. package/components/SideBar/context/sideBarContext/index.js +5 -19
  91. package/components/SideBar/context/sideBarContext/types.d.ts +1 -22
  92. package/components/SideBar/helpers/getMenuDataWithState/index.js +8 -25
  93. package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
  94. package/components/SideBar/slots/SideBarEnum.js +11 -9
  95. package/components/SideBar/slots/SideBarSlots.d.ts +3 -9
  96. package/components/SideBar/slots/SideBarSlots.js +28 -36
  97. package/components/SideBar/styles.js +4 -2
  98. package/components/SideBar/subcomponents/ContentComponent/index.js +19 -39
  99. package/components/SideBar/subcomponents/ContentComponent/style.js +22 -171
  100. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +5 -0
  101. package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/index.js +18 -16
  102. package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.js +7 -5
  103. package/components/SideBar/subcomponents/{TreeGroupItems/subcomponents/NodeMenuItem → ContentGroups/subcomponents/ContainerMenuItemsMain}/index.d.ts +3 -3
  104. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +63 -0
  105. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +2 -0
  106. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +47 -0
  107. package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.js +7 -10
  108. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +7 -0
  109. package/components/SideBar/subcomponents/ContentGroups/types.d.ts +4 -0
  110. package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.d.ts +2 -2
  111. package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/index.js +15 -8
  112. package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.js +2 -2
  113. package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +5 -0
  114. package/components/SideBar/subcomponents/HeaderSidebar/index.js +25 -0
  115. package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
  116. package/components/SideBar/subcomponents/SideBarDesktop/styles.js +14 -10
  117. package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
  118. package/components/SideBar/types.d.ts +3 -7
  119. package/components/WindowBase/WindowBase.js +1 -4
  120. package/components/WindowBase/WindowBase.styles.js +13 -48
  121. package/components/WindowBase/constants.d.ts +0 -1
  122. package/components/WindowBase/constants.js +1 -5
  123. package/components/WindowBase/slots/WindowBaseEnum.d.ts +1 -2
  124. package/components/WindowBase/slots/WindowBaseEnum.js +0 -1
  125. package/components/WindowBase/slots/WindowBaseSlots.d.ts +0 -3
  126. package/components/WindowBase/slots/WindowBaseSlots.js +1 -6
  127. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +4 -8
  128. package/components/WindowBase/subcomponents/Header/useButtonActions.js +2 -4
  129. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
  130. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
  131. package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +0 -5
  132. package/components/WindowBase/types.d.ts +0 -11
  133. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +0 -13
  134. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +20 -21
  135. package/components/extended/React-Resizable/helpers.js +1 -1
  136. package/components/extended/React-resizable-panels/SplitLayout.js +3 -6
  137. package/components/extended/React-resizable-panels/SplitLayout.styles.js +36 -78
  138. package/components/extended/React-resizable-panels/constants.d.ts +0 -6
  139. package/components/extended/React-resizable-panels/constants.js +1 -5
  140. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +1 -2
  141. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +0 -1
  142. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +0 -3
  143. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +1 -7
  144. package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
  145. package/components/hook-form/RHFTextField/RHFTextField.js +0 -1
  146. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +1 -1
  147. package/components/mui_extended/Accordion/styles.js +2 -10
  148. package/components/mui_extended/Button/Button.js +1 -3
  149. package/components/mui_extended/Button/ButtonStyles.js +1 -6
  150. package/components/mui_extended/Button/types.d.ts +1 -1
  151. package/components/mui_extended/NavLink/NavLink.js +1 -3
  152. package/components/mui_extended/NavLink/NavLink.styles.js +1 -2
  153. package/components/mui_extended/NavLink/types.d.ts +1 -3
  154. package/components/mui_extended/Tab/Tab.styles.js +1 -2
  155. package/components/mui_extended/TabContent/TabContent.styles.js +8 -2
  156. package/components/mui_extended/TextField/TextField.js +1 -1
  157. package/components/mui_extended/TextField/TextField.styles.js +13 -15
  158. package/components/mui_extended/index.d.ts +0 -1
  159. package/hooks/useDynamicFilterAndSort/styles.js +1 -1
  160. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +7 -0
  161. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +300 -88
  162. package/index.d.ts +0 -1
  163. package/index.js +20 -23
  164. package/package.json +5 -6
  165. package/storybook/components/DataGrid/DataGrid.stories.d.ts +22 -0
  166. package/storybook/components/DataGrid/MswHandles.d.ts +1 -0
  167. package/storybook/components/DataGrid/helpers/filterFieldsSeedData.d.ts +5 -0
  168. package/storybook/components/DataGrid/helpers/getRows.d.ts +4 -0
  169. package/storybook/components/DataGrid/helpers/getRowsWithBackendSimulation.d.ts +9 -0
  170. package/storybook/components/DataGrid/helpers/sortsSeedData.d.ts +5 -0
  171. package/storybook/components/DataGrid/helpers/types.d.ts +1 -0
  172. package/storybook/components/DataGrid/helpers/useSeed.d.ts +3 -0
  173. package/storybook/components/DataGrid/subcomponents/DataGridRenderWithExternalFiltersAndSorts.d.ts +16 -0
  174. package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +11 -27
  175. package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +10 -26
  176. package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +0 -1
  177. package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +0 -1
  178. package/utils/index.d.ts +0 -1
  179. package/components/SideBar/hooks/useCollapse/index.d.ts +0 -1
  180. package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +0 -11
  181. package/components/SideBar/hooks/useCollapse/useCollapse.js +0 -23
  182. package/components/SideBar/subcomponents/Promotion/types.d.ts +0 -5
  183. package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +0 -5
  184. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +0 -69
  185. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +0 -9
  186. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +0 -5
  187. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +0 -56
  188. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +0 -1
  189. package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +0 -4
  190. package/components/mui_extended/Divider/index.d.ts +0 -1
  191. package/components/mui_extended/Divider/index.js +0 -1
  192. package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +0 -4
  193. package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +0 -3
  194. package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +0 -1
  195. /package/components/{SideBar/hooks/useCollapse → DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick}/index.js +0 -0
  196. /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups}/styles.d.ts +0 -0
  197. /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/index.d.ts +0 -0
  198. /package/components/SideBar/subcomponents/{TreeGroupItems → ContentGroups/subcomponents/ContainerMenuItemsMain}/subcomponents/ArrowIcon/types.d.ts +0 -0
  199. /package/components/SideBar/subcomponents/{Promotion → FooterSidebar}/styles.d.ts +0 -0
@@ -9,8 +9,7 @@ const propertyValueStyles = {
9
9
  minWidth: `${maxWidth}px`,
10
10
  [`@container ${CONTAINER_QUERY_NAME} (max-width: ${maxWidth - 1}px)`]: {
11
11
  minWidth: "100px",
12
- maxWidth: "100%",
13
- width: "100%"
12
+ maxWidth: "100%"
14
13
  }
15
14
  });
16
15
  const semanticStylesMap = {
@@ -45,11 +44,11 @@ const propertyValueStyles = {
45
44
  display: "flex",
46
45
  flexDirection: ownerState?.isForm ? "column" : "row",
47
46
  justifyContent: ownerState?.isForm ? "space-between" : "left",
48
- alignItems: "center",
47
+ alignItems: "flex-start",
49
48
  gap: theme.vars.size.baseSpacings["sp1"],
50
49
  width: ownerState?.semanticWidth ? "auto" : "200px",
51
50
  overflow: "hidden",
52
- color: theme.vars.palette.text.primary,
51
+ color: theme.palette.text.primary,
53
52
  paddingTop: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
54
53
  paddingBottom: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
55
54
  borderBottom: !ownerState?.isForm ? `${theme.vars.palette.border.disabled} solid 1px` : "none",
@@ -62,7 +61,6 @@ const propertyValueStyles = {
62
61
  ...theme.generalSettings.isMobile && {
63
62
  flexDirection: "column"
64
63
  },
65
- minHeight: theme.vars.size.baseSpacings.sp5,
66
64
  ...semanticStyle
67
65
  };
68
66
  },
@@ -73,7 +71,7 @@ const propertyValueStyles = {
73
71
  display: "flex",
74
72
  alignItems: "center",
75
73
  fontSize: theme.typography.body2.fontSize,
76
- color: theme.vars.palette.text.primary,
74
+ color: theme.palette.text.primary,
77
75
  gap: theme.vars.size.baseSpacings["sp1"],
78
76
  overflow: "hidden",
79
77
  width: "100%"
@@ -85,7 +83,6 @@ const propertyValueStyles = {
85
83
  width: "100%",
86
84
  display: "flex",
87
85
  justifyContent: "flex-start",
88
- alignItems: "center",
89
86
  overflow: "hidden",
90
87
  height: ownerState?.valueHeight ? ownerState?.valueHeight : "auto",
91
88
  ...ownerState?.isForm && {
@@ -91,10 +91,6 @@ export interface PropertyVaLueOwnerState extends Pick<PropertyValueProps, 'disab
91
91
  * Indica si el componente está en modo formulario.
92
92
  */
93
93
  isForm: boolean;
94
- /**
95
- * Tamaño del componente.
96
- */
97
- size?: PropertyValueProps['size'];
98
94
  /**
99
95
  * Propiedades adicionales para estilos o comportamientos personalizados.
100
96
  */
@@ -23,8 +23,7 @@ const SideBar = memo((props) => {
23
23
  expandedWidth = "230px",
24
24
  companyName,
25
25
  companySlogan,
26
- urlIconPrefix = `${host_static_assets}/${environment_assets}${PATH_ICONS}`,
27
- promotion
26
+ urlIconPrefix = `${host_static_assets}/${environment_assets}${PATH_ICONS}`
28
27
  } = props;
29
28
  const menuDataWithState = useMemo(() => getMenuDataWithState({ menuData: menuData ?? getDataToSkeleton(), moduleSelectedId }), [menuData, moduleSelectedId]);
30
29
  const isMobile = useIsMobile();
@@ -45,8 +44,7 @@ const SideBar = memo((props) => {
45
44
  expandedWidth,
46
45
  companyName,
47
46
  companySlogan,
48
- urlIconPrefix,
49
- promotion
47
+ urlIconPrefix
50
48
  },
51
49
  children: !isMobile ? /* @__PURE__ */ jsx(SideBarDesktop, {}) : /* @__PURE__ */ jsx(SideBarMobile, {})
52
50
  }
@@ -1,32 +1,8 @@
1
- import { HeaderSidebarSlots, ContentGroupsSlots, SideBarDesktopSlots, SideBarFooterSlots, SideBarMobileSlots, ContentComponentSlots } from './slots/SideBarEnum';
2
1
  export declare const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
3
2
  export declare const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
4
3
  export declare const LIST_MENU_ITEM = "M4LListMenuItem";
4
+ export declare const ITEM_ACTIVE = "M4LItemActive";
5
+ export declare const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
5
6
  export declare const PATH_ICONS = "/frontend/domain/microfrontends/";
6
7
  export declare const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
7
8
  export declare const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
8
- export declare const ALL_SIDEBAR_SLOTS: {
9
- contentComponentRoot: ContentComponentSlots.contentComponentRoot;
10
- contentComponentHide: ContentComponentSlots.contentComponentHide;
11
- containerTreeItemsAndPromotion: ContentComponentSlots.containerTreeItemsAndPromotion;
12
- containerNodeMenuItem: ContentComponentSlots.containerNodeMenuItem;
13
- containerNodeMenuItemMain: ContentComponentSlots.containerNodeMenuItemMain;
14
- menuItemMain: ContentComponentSlots.menuItemMain;
15
- containerFooter: SideBarFooterSlots.containerFooter;
16
- containerHeaderSidebarRoot: HeaderSidebarSlots.containerHeaderSidebarRoot;
17
- containerTitleSubtitle: HeaderSidebarSlots.containerTitleSubtitle;
18
- containerTreeGroupItems: ContentGroupsSlots.containerTreeGroupItems;
19
- containerContentGroups: ContentGroupsSlots.containerContentGroups;
20
- containerContentTitle: ContentGroupsSlots.containerContentTitle;
21
- containerContentNavItems: ContentGroupsSlots.containerContentNavItems;
22
- containerContentItem: ContentGroupsSlots.containerContentItem;
23
- containerArrowIconRoot: ContentGroupsSlots.containerArrowIconRoot;
24
- containerSideBarMobile: SideBarMobileSlots.containerSideBarMobile;
25
- containerDesktopRoot: SideBarDesktopSlots.containerDesktopRoot;
26
- containerDesktopContent: SideBarDesktopSlots.containerDesktopContent;
27
- containerBtnAnchored: SideBarDesktopSlots.containerBtnAnchored;
28
- };
29
- export declare const CLASS_NAME_IS_ROOT = "is-root";
30
- export declare const CLASS_NAME_MENU_ACTIVE = "menu-active";
31
- export declare const CLASS_NAME_ITEM_IN_TREE_ACTIVE = "item-in-tree-active";
32
- export declare const CLASS_NAME_HAS_CHILDREN = "has-children";
@@ -1,30 +1,18 @@
1
- import { C as ContentComponentSlots, S as SideBarFooterSlots, H as HeaderSidebarSlots, a as ContentGroupsSlots, b as SideBarMobileSlots, c as SideBarDesktopSlots } from "./slots/SideBarEnum.js";
2
1
  const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
3
2
  const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
3
+ const LIST_MENU_ITEM = "M4LListMenuItem";
4
+ const ITEM_ACTIVE = "M4LItemActive";
5
+ const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
4
6
  const PATH_ICONS = "/frontend/domain/microfrontends/";
5
7
  const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
6
8
  const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
7
- const ALL_SIDEBAR_SLOTS = {
8
- ...SideBarDesktopSlots,
9
- ...SideBarMobileSlots,
10
- ...ContentGroupsSlots,
11
- ...HeaderSidebarSlots,
12
- ...SideBarFooterSlots,
13
- ...ContentComponentSlots
14
- };
15
- const CLASS_NAME_IS_ROOT = "is-root";
16
- const CLASS_NAME_MENU_ACTIVE = "menu-active";
17
- const CLASS_NAME_ITEM_IN_TREE_ACTIVE = "item-in-tree-active";
18
- const CLASS_NAME_HAS_CHILDREN = "has-children";
19
9
  export {
20
- ALL_SIDEBAR_SLOTS as A,
21
10
  CONTAINER_BTN_ANCHORED as C,
11
+ ITEM_ACTIVE as I,
12
+ LIST_MENU_ITEM as L,
22
13
  PATH_ICONS as P,
23
14
  SIDEBAR_KEY_COMPONENT as S,
24
15
  PATH_ARROW_RIGHT_ICON as a,
25
- CLASS_NAME_IS_ROOT as b,
26
- CLASS_NAME_MENU_ACTIVE as c,
27
- CLASS_NAME_ITEM_IN_TREE_ACTIVE as d,
28
- CLASS_NAME_HAS_CHILDREN as e,
29
- PATH_ARROW_DOWN_ICON as f
16
+ ITEM_IN_TREE_ACTIVE as b,
17
+ PATH_ARROW_DOWN_ICON as c
30
18
  };
@@ -1,8 +1,5 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
2
- import { useState, createContext } from "react";
3
- import { g as getComponentClasses } from "../../../../utils/getComponentSlotRoot.js";
4
- import { A as ALL_SIDEBAR_SLOTS, S as SIDEBAR_KEY_COMPONENT } from "../../constants.js";
5
- const classes = getComponentClasses(SIDEBAR_KEY_COMPONENT, ALL_SIDEBAR_SLOTS);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext } from "react";
6
3
  const initialState = {
7
4
  anchored: false,
8
5
  visible: true,
@@ -17,17 +14,11 @@ const initialState = {
17
14
  },
18
15
  expandedWidth: "",
19
16
  companyName: "",
20
- companySlogan: "",
21
- classes,
22
- promotion: /* @__PURE__ */ jsx(Fragment, {}),
23
- isHover: false,
24
- setIsHover: (_isHover) => {
25
- }
17
+ companySlogan: ""
26
18
  };
27
19
  const SideBarContext = createContext(initialState);
28
20
  const SideBarProvider = (props) => {
29
21
  const { value, children } = props;
30
- const [isHover, setIsHover] = useState(false);
31
22
  const {
32
23
  anchored,
33
24
  visible,
@@ -41,8 +32,7 @@ const SideBarProvider = (props) => {
41
32
  moduleSelectedId,
42
33
  companyName,
43
34
  companySlogan,
44
- urlIconPrefix,
45
- promotion
35
+ urlIconPrefix
46
36
  } = value;
47
37
  return (
48
38
  // Proporcionar el contexto con las propiedades desestructuradas
@@ -62,11 +52,7 @@ const SideBarProvider = (props) => {
62
52
  expandedWidth,
63
53
  companyName,
64
54
  companySlogan,
65
- urlIconPrefix,
66
- classes,
67
- promotion,
68
- isHover,
69
- setIsHover
55
+ urlIconPrefix
70
56
  },
71
57
  children
72
58
  }
@@ -1,6 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { IMenuDataWithState, SideBarProps } from '../../types';
3
- import { ALL_SIDEBAR_SLOTS } from '../../constants';
4
3
  /**
5
4
  * Valor proporcionado por el proveedor del contexto Sidebar.
6
5
  */
@@ -10,33 +9,13 @@ export interface SideBarProviderValue extends SideBarProps {
10
9
  */
11
10
  anchored: boolean;
12
11
  menuData: Array<IMenuDataWithState>;
13
- /**
14
- * Las clases asociadas al proveedor del contexto Sidebar.
15
- */
16
- classes: Record<keyof typeof ALL_SIDEBAR_SLOTS, string>;
17
- /**
18
- * Promoción del sidebar, se renderiza en el footer del sidebar
19
- */
20
- promotion: SideBarProps['promotion'];
21
- /**
22
- * Indica si el sidebar está siendo hoverado
23
- */
24
- isHover: boolean;
25
- /**
26
- * Función para establecer el estado de hover
27
- */
28
- setIsHover: (value: boolean) => void;
29
12
  }
30
13
  /**
31
14
  * Propiedades para el proveedor del contexto Sidebar.
32
15
  */
33
16
  export interface SideBarProviderProps {
34
17
  /** value contendrá el valor que se proporcionará en el contexto*/
35
- value: Omit<SideBarProviderValue, 'collapsed' | 'classes' | 'isHover' | 'setIsHover'>;
18
+ value: Omit<SideBarProviderValue, 'collapsed'>;
36
19
  /** children contendrá los elementos secundarios que estarán dentro del ámbito del proveedor del contexto.*/
37
20
  children: ReactNode;
38
- /**
39
- * Promoción del sidebar, se renderiza en el footer del sidebar
40
- */
41
- promotion?: SideBarProps['promotion'];
42
21
  }
@@ -1,39 +1,22 @@
1
1
  const getMenuDataWithState = ({ menuData, moduleSelectedId, initialLevel = 0 }) => {
2
2
  const newMenuDataItems = menuData.map((item) => {
3
3
  if (!item.children && item.moduleId === moduleSelectedId) {
4
- return { ...item, active: true, itemInTreeActive: false };
4
+ return { ...item, active: true, itemInTreeActive: true };
5
5
  }
6
6
  if (item.children) {
7
7
  let childrenItem = getMenuDataWithState({ menuData: item.children, moduleSelectedId, initialLevel: initialLevel + 1 });
8
8
  const indexTrue = childrenItem.findIndex((child) => child.active === true);
9
9
  if (initialLevel === 0) {
10
- return { ...item, children: childrenItem, active: false, itemInTreeActive: false };
10
+ return { ...item, children: childrenItem };
11
11
  }
12
12
  if (indexTrue !== -1) {
13
- childrenItem = childrenItem.map((child, index) => {
14
- if (child.active) {
15
- return { ...child, itemInTreeActive: false };
16
- }
17
- if (!child.active && !(child.children?.length ?? 0 > 0)) {
18
- return { ...child, itemInTreeActive: true, active: false };
19
- }
20
- if (index <= indexTrue) {
21
- return {
22
- ...child,
23
- itemInTreeActive: true,
24
- active: false
25
- };
26
- }
27
- return { ...child, itemInTreeActive: false, active: false };
28
- });
13
+ childrenItem = childrenItem.map((child, index) => ({
14
+ ...child,
15
+ itemInTreeActive: index <= indexTrue ? true : false
16
+ }));
29
17
  }
30
- const status = indexTrue >= 0;
31
- return {
32
- ...item,
33
- children: childrenItem,
34
- itemInTreeActive: status,
35
- active: status && !!item.children
36
- };
18
+ const status = indexTrue >= 0 ? true : false;
19
+ return { ...item, children: childrenItem, itemInTreeActive: status, active: status };
37
20
  }
38
21
  return { ...item, active: false, itemInTreeActive: false };
39
22
  });
@@ -7,7 +7,7 @@ export declare enum SideBarMobileSlots {
7
7
  containerSideBarMobile = "containerSideBarMobile"
8
8
  }
9
9
  export declare enum ContentGroupsSlots {
10
- containerTreeGroupItems = "containerTreeGroupItems",
10
+ containerContentGroupsRoot = "containerContentGroupsRoot",
11
11
  containerContentGroups = "containerContentGroups",
12
12
  containerContentTitle = "containerContentTitle",
13
13
  containerContentNavItems = "containerContentNavItems",
@@ -24,8 +24,8 @@ export declare enum SideBarFooterSlots {
24
24
  export declare enum ContentComponentSlots {
25
25
  contentComponentRoot = "contentComponentRoot",
26
26
  contentComponentHide = "contentComponentHide",
27
- containerTreeItemsAndPromotion = "containerTreeItemsAndPromotion",
28
- containerNodeMenuItem = "containerNodeMenuItem",
29
- containerNodeMenuItemMain = "containerNodeMenuItemMain",
30
- menuItemMain = "menuItemMain"
27
+ containerComponent = "containerComponent"
28
+ }
29
+ export declare enum ContainerMenuItemsMainSlots {
30
+ containerMenuItems = "containerMenuItems"
31
31
  }
@@ -9,7 +9,7 @@ var SideBarMobileSlots = /* @__PURE__ */ ((SideBarMobileSlots2) => {
9
9
  return SideBarMobileSlots2;
10
10
  })(SideBarMobileSlots || {});
11
11
  var ContentGroupsSlots = /* @__PURE__ */ ((ContentGroupsSlots2) => {
12
- ContentGroupsSlots2["containerTreeGroupItems"] = "containerTreeGroupItems";
12
+ ContentGroupsSlots2["containerContentGroupsRoot"] = "containerContentGroupsRoot";
13
13
  ContentGroupsSlots2["containerContentGroups"] = "containerContentGroups";
14
14
  ContentGroupsSlots2["containerContentTitle"] = "containerContentTitle";
15
15
  ContentGroupsSlots2["containerContentNavItems"] = "containerContentNavItems";
@@ -29,17 +29,19 @@ var SideBarFooterSlots = /* @__PURE__ */ ((SideBarFooterSlots2) => {
29
29
  var ContentComponentSlots = /* @__PURE__ */ ((ContentComponentSlots2) => {
30
30
  ContentComponentSlots2["contentComponentRoot"] = "contentComponentRoot";
31
31
  ContentComponentSlots2["contentComponentHide"] = "contentComponentHide";
32
- ContentComponentSlots2["containerTreeItemsAndPromotion"] = "containerTreeItemsAndPromotion";
33
- ContentComponentSlots2["containerNodeMenuItem"] = "containerNodeMenuItem";
34
- ContentComponentSlots2["containerNodeMenuItemMain"] = "containerNodeMenuItemMain";
35
- ContentComponentSlots2["menuItemMain"] = "menuItemMain";
32
+ ContentComponentSlots2["containerComponent"] = "containerComponent";
36
33
  return ContentComponentSlots2;
37
34
  })(ContentComponentSlots || {});
35
+ var ContainerMenuItemsMainSlots = /* @__PURE__ */ ((ContainerMenuItemsMainSlots2) => {
36
+ ContainerMenuItemsMainSlots2["containerMenuItems"] = "containerMenuItems";
37
+ return ContainerMenuItemsMainSlots2;
38
+ })(ContainerMenuItemsMainSlots || {});
38
39
  export {
39
40
  ContentComponentSlots as C,
40
41
  HeaderSidebarSlots as H,
41
- SideBarFooterSlots as S,
42
- ContentGroupsSlots as a,
43
- SideBarMobileSlots as b,
44
- SideBarDesktopSlots as c
42
+ SideBarDesktopSlots as S,
43
+ SideBarMobileSlots as a,
44
+ SideBarFooterSlots as b,
45
+ ContentGroupsSlots as c,
46
+ ContainerMenuItemsMainSlots as d
45
47
  };
@@ -7,7 +7,7 @@ export declare const ContainerDesktopContentStyled: import('@emotion/styled').St
7
7
  export declare const ContainerBtnAnchoredStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
8
8
  ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
9
9
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
10
- export declare const ContainerTreeGroupItemsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
10
+ export declare const ContainerContentGroupsRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
11
11
  ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
12
12
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, keyof import('react').HTMLAttributes<HTMLElement> | keyof import('react').ClassAttributes<HTMLElement>>, {}>;
13
13
  export declare const ContainerContentGroupsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
@@ -43,15 +43,9 @@ export declare const ContentComponentRootStyled: import('@emotion/styled').Style
43
43
  export declare const ContentComponentHideStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
44
44
  ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
45
45
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
46
- export declare const ContainerTreeItemsAndPromotionStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
46
+ export declare const ContainerComponentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
47
47
  ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
48
48
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
49
- export declare const ContainerNodeMenuItemStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
49
+ export declare const ContainerMenuItemsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
50
50
  ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
51
51
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
52
- export declare const ContainerNodeMenuItemMainStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
53
- ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
54
- }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
55
- export declare const MenuItemMainStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/MenuItem').MenuItemProps, keyof import('../../mui_extended/MenuItem').MenuItemProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
56
- ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
57
- }, {}, {}>;
@@ -1,8 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
- import { c as SideBarDesktopSlots, b as SideBarMobileSlots, C as ContentComponentSlots, S as SideBarFooterSlots, a as ContentGroupsSlots, H as HeaderSidebarSlots } from "./SideBarEnum.js";
2
+ import { S as SideBarDesktopSlots, a as SideBarMobileSlots, C as ContentComponentSlots, b as SideBarFooterSlots, H as HeaderSidebarSlots, c as ContentGroupsSlots, d as ContainerMenuItemsMainSlots } from "./SideBarEnum.js";
3
3
  import { S as SIDEBAR_KEY_COMPONENT } from "../constants.js";
4
4
  import { s as sideBarStyles } from "../styles.js";
5
- import { M as MenuItem } from "../../mui_extended/MenuItem/MenuItem.js";
6
5
  const ContainerDesktopRootStyled = styled("section", {
7
6
  name: SIDEBAR_KEY_COMPONENT,
8
7
  slot: SideBarDesktopSlots.containerDesktopRoot
@@ -15,10 +14,10 @@ const ContainerBtnAnchoredStyled = styled("div", {
15
14
  name: SIDEBAR_KEY_COMPONENT,
16
15
  slot: SideBarDesktopSlots.containerBtnAnchored
17
16
  })(sideBarStyles?.containerBtnAnchored);
18
- const ContainerTreeGroupItemsStyled = styled("section", {
17
+ const ContainerContentGroupsRootStyled = styled("section", {
19
18
  name: SIDEBAR_KEY_COMPONENT,
20
- slot: ContentGroupsSlots.containerTreeGroupItems
21
- })(sideBarStyles?.containerTreeGroupItems);
19
+ slot: ContentGroupsSlots.containerContentGroupsRoot
20
+ })(sideBarStyles?.containerContentGroupsRoot);
22
21
  const ContainerContentGroupsStyled = styled("section", {
23
22
  name: SIDEBAR_KEY_COMPONENT,
24
23
  slot: ContentGroupsSlots.containerContentGroups
@@ -27,7 +26,7 @@ const ContainerContentTitleStyled = styled("div", {
27
26
  name: SIDEBAR_KEY_COMPONENT,
28
27
  slot: ContentGroupsSlots.containerContentTitle
29
28
  })(sideBarStyles?.containerContentTitle);
30
- styled("nav", {
29
+ const ContainerContentNavItemsStyled = styled("nav", {
31
30
  name: SIDEBAR_KEY_COMPONENT,
32
31
  slot: ContentGroupsSlots.containerContentNavItems
33
32
  })(sideBarStyles?.containerContentNavItems);
@@ -39,11 +38,11 @@ const ContainerArrowIconRootStyled = styled("div", {
39
38
  name: SIDEBAR_KEY_COMPONENT,
40
39
  slot: ContentGroupsSlots.containerArrowIconRoot
41
40
  })(sideBarStyles?.containerArrowIconRoot);
42
- styled("section", {
41
+ const ContainerHeaderSidebarRootStyled = styled("section", {
43
42
  name: SIDEBAR_KEY_COMPONENT,
44
43
  slot: HeaderSidebarSlots.containerHeaderSidebarRoot
45
44
  })(sideBarStyles?.containerHeaderSidebarRoot);
46
- styled("div", {
45
+ const ContainerTitleSubtitleStyled = styled("div", {
47
46
  name: SIDEBAR_KEY_COMPONENT,
48
47
  slot: HeaderSidebarSlots.containerTitleSubtitle
49
48
  })(sideBarStyles?.containerTitleSubtitle);
@@ -63,36 +62,29 @@ const ContentComponentHideStyled = styled("div", {
63
62
  name: SIDEBAR_KEY_COMPONENT,
64
63
  slot: ContentComponentSlots.contentComponentHide
65
64
  })(sideBarStyles?.contentComponentHide);
66
- const ContainerTreeItemsAndPromotionStyled = styled("div", {
67
- name: SIDEBAR_KEY_COMPONENT,
68
- slot: ContentComponentSlots.containerTreeItemsAndPromotion
69
- })(sideBarStyles?.containerTreeItemsAndPromotion);
70
- const ContainerNodeMenuItemStyled = styled("div", {
71
- name: SIDEBAR_KEY_COMPONENT,
72
- slot: ContentComponentSlots.containerNodeMenuItem
73
- })(sideBarStyles?.containerNodeMenuItem);
74
- const ContainerNodeMenuItemMainStyled = styled("div", {
65
+ const ContainerComponentStyled = styled("div", {
75
66
  name: SIDEBAR_KEY_COMPONENT,
76
- slot: ContentComponentSlots.containerNodeMenuItemMain
77
- })(sideBarStyles?.containerNodeMenuItemMain);
78
- const MenuItemMainStyled = styled(MenuItem, {
67
+ slot: ContentComponentSlots.containerComponent
68
+ })(sideBarStyles?.containerComponent);
69
+ const ContainerMenuItemsStyled = styled("div", {
79
70
  name: SIDEBAR_KEY_COMPONENT,
80
- slot: ContentComponentSlots.menuItemMain
81
- })(sideBarStyles?.menuItemMain);
71
+ slot: ContainerMenuItemsMainSlots.containerMenuItems
72
+ })(sideBarStyles?.containerMenuItems);
82
73
  export {
83
74
  ContentComponentRootStyled as C,
84
- MenuItemMainStyled as M,
85
- ContainerBtnAnchoredStyled as a,
86
- ContentComponentHideStyled as b,
87
- ContainerTreeItemsAndPromotionStyled as c,
88
- ContainerFooterStyled as d,
89
- ContainerDesktopContentStyled as e,
90
- ContainerDesktopRootStyled as f,
91
- ContainerSideBarMobileStyled as g,
92
- ContainerTreeGroupItemsStyled as h,
93
- ContainerContentGroupsStyled as i,
94
- ContainerContentTitleStyled as j,
95
- ContainerArrowIconRootStyled as k,
96
- ContainerNodeMenuItemStyled as l,
97
- ContainerNodeMenuItemMainStyled as m
75
+ ContentComponentHideStyled as a,
76
+ ContainerComponentStyled as b,
77
+ ContainerBtnAnchoredStyled as c,
78
+ ContainerContentGroupsRootStyled as d,
79
+ ContainerContentGroupsStyled as e,
80
+ ContainerContentTitleStyled as f,
81
+ ContainerContentNavItemsStyled as g,
82
+ ContainerMenuItemsStyled as h,
83
+ ContainerArrowIconRootStyled as i,
84
+ ContainerFooterStyled as j,
85
+ ContainerHeaderSidebarRootStyled as k,
86
+ ContainerTitleSubtitleStyled as l,
87
+ ContainerDesktopContentStyled as m,
88
+ ContainerDesktopRootStyled as n,
89
+ ContainerSideBarMobileStyled as o
98
90
  };
@@ -1,10 +1,12 @@
1
1
  import { s as sideBarDesktopStyles } from "./subcomponents/SideBarDesktop/styles.js";
2
- import { c as contentGroupStyles } from "./subcomponents/TreeGroupItems/styles.js";
2
+ import { c as contentGroupStyles } from "./subcomponents/ContentGroups/styles.js";
3
3
  import { h as headerSidebarStyles } from "./subcomponents/HeaderSidebar/styles.js";
4
- import { f as footerSideBarStyles } from "./subcomponents/Promotion/styles.js";
4
+ import { f as footerSideBarStyles } from "./subcomponents/FooterSidebar/styles.js";
5
5
  import { c as contentComponentStyles } from "./subcomponents/ContentComponent/style.js";
6
+ import { c as containerMenuItemsMainStyles } from "./subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js";
6
7
  import { s as sideBarMobileStyles } from "./subcomponents/SideBarMobile/styles.js";
7
8
  const sideBarStyles = {
9
+ ...containerMenuItemsMainStyles,
8
10
  ...sideBarDesktopStyles,
9
11
  ...sideBarMobileStyles,
10
12
  ...contentGroupStyles,
@@ -2,22 +2,20 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useIsMobile } from "@m4l/graphics";
3
3
  import { useEnvironment } from "@m4l/core";
4
4
  import { u as useSideBar } from "../../hooks/useSideBar/index.js";
5
- import { C as ContentComponentRootStyled, a as ContainerBtnAnchoredStyled, b as ContentComponentHideStyled, c as ContainerTreeItemsAndPromotionStyled } from "../../slots/SideBarSlots.js";
6
- import { T as TreeGroupItems } from "../TreeGroupItems/index.js";
7
- import { P as Promotion } from "../Promotion/index.js";
5
+ import { C as ContentComponentRootStyled, a as ContentComponentHideStyled, b as ContainerComponentStyled, c as ContainerBtnAnchoredStyled } from "../../slots/SideBarSlots.js";
6
+ import { C as ContentGroups } from "../ContentGroups/index.js";
7
+ import { F as FooterSidebar } from "../FooterSidebar/index.js";
8
+ import { H as HeaderSidebar } from "../HeaderSidebar/index.js";
8
9
  import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
9
10
  import { a as PATH_ARROW_RIGHT_ICON, C as CONTAINER_BTN_ANCHORED } from "../../constants.js";
10
- import { useRef } from "react";
11
11
  import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
12
12
  import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js";
13
13
  const ContentComponent = () => {
14
- const { anchored, onToggleAnchored, expandedWidth, size, classes, isHover, setIsHover } = useSideBar();
14
+ const { anchored, onToggleAnchored, companyName, companySlogan, companyLogoSmallUrl, expandedWidth, size } = useSideBar();
15
15
  const ownerState = {
16
16
  expandedWidth,
17
17
  anchored
18
18
  };
19
- const btnAnchoredRef = useRef(null);
20
- const contentRef = useRef(null);
21
19
  const { host_static_assets, environment_assets } = useEnvironment();
22
20
  const isDesktop = !useIsMobile();
23
21
  const { currentSize } = useComponentSize(size);
@@ -26,52 +24,34 @@ const ContentComponent = () => {
26
24
  onToggleAnchored(!anchored);
27
25
  };
28
26
  return /* @__PURE__ */ jsxs(ContentComponentRootStyled, { ownerState, children: [
27
+ /* @__PURE__ */ jsx(ContentComponentHideStyled, { ownerState: { ...ownerState, isDesktop }, role: "complementary", "aria-label": "hidden content", children: /* @__PURE__ */ jsxs(ContainerComponentStyled, { ownerState, children: [
28
+ /* @__PURE__ */ jsx(
29
+ HeaderSidebar,
30
+ {
31
+ title: companyName ?? "",
32
+ subtitle: companySlogan ?? "",
33
+ srcIcon: companyLogoSmallUrl ?? ""
34
+ }
35
+ ),
36
+ /* @__PURE__ */ jsx(ContentGroups, { size: currentSize }),
37
+ /* @__PURE__ */ jsx(FooterSidebar, { onToggleAnchored, anchored })
38
+ ] }) }),
29
39
  isDesktop && /* @__PURE__ */ jsx(
30
40
  ContainerBtnAnchoredStyled,
31
41
  {
32
- ref: btnAnchoredRef,
33
42
  className: classRootBtnAnchored,
34
43
  ownerState,
35
- onMouseLeave: (event) => {
36
- if (!anchored && contentRef.current && !contentRef.current.contains(event.relatedTarget)) {
37
- setIsHover(false);
38
- }
39
- },
40
44
  children: /* @__PURE__ */ jsx(
41
45
  IconButton,
42
46
  {
43
47
  role: "anchored-button",
44
- variant: anchored ? "contained" : "outline",
48
+ variant: "outline",
45
49
  rotationAngle: !anchored ? 0 : 180,
46
50
  onClick: handlerAnchoredButton,
47
- src: `${host_static_assets}/${environment_assets}/${PATH_ARROW_RIGHT_ICON}`,
48
- color: anchored ? "primary" : "default"
51
+ src: `${host_static_assets}/${environment_assets}/${PATH_ARROW_RIGHT_ICON}`
49
52
  }
50
53
  )
51
54
  }
52
- ),
53
- /* @__PURE__ */ jsx(
54
- ContentComponentHideStyled,
55
- {
56
- ref: contentRef,
57
- ownerState: { ...ownerState, isDesktop, isHover },
58
- className: classes.contentComponentHide,
59
- role: "complementary",
60
- "aria-label": "hidden content",
61
- onMouseEnter: () => {
62
- !anchored && setIsHover(true);
63
- },
64
- onMouseLeave: (event) => {
65
- if (!anchored && btnAnchoredRef.current && btnAnchoredRef.current.contains(event.relatedTarget)) {
66
- return;
67
- }
68
- setIsHover(false);
69
- },
70
- children: /* @__PURE__ */ jsxs(ContainerTreeItemsAndPromotionStyled, { ownerState, children: [
71
- /* @__PURE__ */ jsx(TreeGroupItems, { size: currentSize }),
72
- /* @__PURE__ */ jsx(Promotion, { onToggleAnchored, anchored })
73
- ] })
74
- }
75
55
  )
76
56
  ] });
77
57
  };