@m4l/components 9.2.62-B10072025beta.1 → 9.2.62-B11072025beta.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.
@@ -43,7 +43,7 @@ const chipStyles = {
43
43
  display: "flex",
44
44
  alignItems: "center",
45
45
  padding: theme.vars.size.baseSpacings.sp1,
46
- borderRadius: theme.vars.size.borderRadius["r0-5"],
46
+ borderRadius: theme.vars.size.borderRadius["r1-5"],
47
47
  gap: theme.vars.size.baseSpacings["sp0-5"],
48
48
  width: "max-content",
49
49
  cursor: "pointer",
@@ -21,6 +21,7 @@ export declare const ALL_SIDEBAR_SLOTS: {
21
21
  containerContentItem: ContentGroupsSlots.containerContentItem;
22
22
  containerArrowIconRoot: ContentGroupsSlots.containerArrowIconRoot;
23
23
  containerAdornmentIcon: ContentGroupsSlots.containerAdornmentIcon;
24
+ wrapperMenuItem: ContentGroupsSlots.wrapperMenuItem;
24
25
  backgroundAdornmentIcon: ContentGroupsSlots.backgroundAdornmentIcon;
25
26
  containerSideBarMobile: SideBarMobileSlots.containerSideBarMobile;
26
27
  containerDesktopRoot: SideBarDesktopSlots.containerDesktopRoot;
@@ -22,9 +22,9 @@ export {
22
22
  PATH_ICONS as P,
23
23
  SIDEBAR_KEY_COMPONENT as S,
24
24
  CLASS_NAME_MENU_ACTIVE as a,
25
- CLASS_NAME_HAS_CHILDREN as b,
26
- CLASS_NAME_ITEM_CLOSED as c,
27
- CLASS_NAME_ITEM_IN_TREE_ACTIVE as d,
25
+ CLASS_NAME_ITEM_IN_TREE_ACTIVE as b,
26
+ CLASS_NAME_HAS_CHILDREN as c,
27
+ CLASS_NAME_ITEM_CLOSED as d,
28
28
  PATH_ARROW_RIGHT_ICON as e,
29
29
  PATH_ARROW_DOWN_ICON as f
30
30
  };
@@ -13,6 +13,7 @@ export declare enum ContentGroupsSlots {
13
13
  containerContentItem = "containerContentItem",
14
14
  containerArrowIconRoot = "containerArrowIconRoot",
15
15
  containerAdornmentIcon = "containerAdornmentIcon",
16
+ wrapperMenuItem = "wrapperMenuItem",
16
17
  backgroundAdornmentIcon = "backgroundAdornmentIcon"
17
18
  }
18
19
  export declare enum HeaderSidebarSlots {
@@ -15,6 +15,7 @@ var ContentGroupsSlots = /* @__PURE__ */ ((ContentGroupsSlots2) => {
15
15
  ContentGroupsSlots2["containerContentItem"] = "containerContentItem";
16
16
  ContentGroupsSlots2["containerArrowIconRoot"] = "containerArrowIconRoot";
17
17
  ContentGroupsSlots2["containerAdornmentIcon"] = "containerAdornmentIcon";
18
+ ContentGroupsSlots2["wrapperMenuItem"] = "wrapperMenuItem";
18
19
  ContentGroupsSlots2["backgroundAdornmentIcon"] = "backgroundAdornmentIcon";
19
20
  return ContentGroupsSlots2;
20
21
  })(ContentGroupsSlots || {});
@@ -25,6 +25,9 @@ export declare const ContainerArrowIconRootStyled: import('@emotion/styled').Sty
25
25
  export declare const HeaderContainerComponentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
26
26
  ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
27
27
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, keyof import('react').HTMLAttributes<HTMLElement> | keyof import('react').ClassAttributes<HTMLElement>>, {}>;
28
+ export declare const WrapperMenuItemStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
29
+ ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
30
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
28
31
  export declare const ContainerAdornmentIconStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
29
32
  ownerState?: (Partial<import('../types').SideBarOwnerState> & Record<string, unknown>) | undefined;
30
33
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
@@ -40,6 +40,10 @@ const HeaderContainerComponentStyled = styled("section", {
40
40
  name: SIDEBAR_KEY_COMPONENT,
41
41
  slot: HeaderSidebarSlots.headerContainerComponent
42
42
  })(sideBarStyles?.headerContainerComponent);
43
+ const WrapperMenuItemStyled = styled("div", {
44
+ name: SIDEBAR_KEY_COMPONENT,
45
+ slot: ContentGroupsSlots.wrapperMenuItem
46
+ })(sideBarStyles?.wrapperMenuItem);
43
47
  const ContainerAdornmentIconStyled = styled("div", {
44
48
  name: SIDEBAR_KEY_COMPONENT,
45
49
  slot: ContentGroupsSlots.containerAdornmentIcon
@@ -85,6 +89,7 @@ export {
85
89
  ContentComponentRootStyled as C,
86
90
  HeaderContainerComponentStyled as H,
87
91
  MenuItemMainStyled as M,
92
+ WrapperMenuItemStyled as W,
88
93
  ContainerTreeItemsHeaderFooterStyled as a,
89
94
  ContainerFooterStyled as b,
90
95
  ContainerDesktopContentStyled as c,
@@ -1,4 +1,4 @@
1
- import { C as CLASS_NAME_IS_ROOT, a as CLASS_NAME_MENU_ACTIVE, b as CLASS_NAME_HAS_CHILDREN, c as CLASS_NAME_ITEM_CLOSED, d as CLASS_NAME_ITEM_IN_TREE_ACTIVE } from "../../constants.js";
1
+ import { C as CLASS_NAME_IS_ROOT, a as CLASS_NAME_MENU_ACTIVE, b as CLASS_NAME_ITEM_IN_TREE_ACTIVE, c as CLASS_NAME_HAS_CHILDREN, d as CLASS_NAME_ITEM_CLOSED } from "../../constants.js";
2
2
  import { g as getTypographyStyles } from "../../../../utils/getTypographyStyles.js";
3
3
  const contentComponentStyles = {
4
4
  /**
@@ -35,10 +35,7 @@ const contentComponentStyles = {
35
35
  },
36
36
  "& .M4LMenuItem-root": {
37
37
  border: "unset",
38
- paddingTop: theme.vars.size.baseSpacings.sp2,
39
- paddingBottom: theme.vars.size.baseSpacings.sp2,
40
- paddingLeft: theme.vars.size.baseSpacings.sp2,
41
- paddingRight: theme.vars.size.baseSpacings.sp2,
38
+ padding: 0,
42
39
  borderRadius: theme.vars.size.borderRadius["r1-5"],
43
40
  '& [class*="M4LMenuItem-menuItemContainer"]': {
44
41
  gap: theme.vars.size.baseSpacings["sp2-5"],
@@ -63,7 +60,7 @@ const contentComponentStyles = {
63
60
  * Contenedor que contiene grupo menu item desplegable.
64
61
  */
65
62
  containerNodeMenuItem: ({ theme }) => ({
66
- marginLeft: theme.vars.size.baseSpacings.sp6,
63
+ marginLeft: theme.vars.size.baseSpacings["sp7-5"],
67
64
  display: "flex",
68
65
  flexDirection: "column",
69
66
  overflow: "visible",
@@ -74,6 +71,9 @@ const contentComponentStyles = {
74
71
  color: `${theme.vars.palette.text.secondary}!important`
75
72
  }
76
73
  },
74
+ "& .MuiCollapse-root": {
75
+ position: "relative"
76
+ },
77
77
  [`&.${CLASS_NAME_IS_ROOT}`]: {
78
78
  margin: "unset",
79
79
  border: theme.vars.size.borderStroke.container,
@@ -82,35 +82,35 @@ const contentComponentStyles = {
82
82
  paddingRight: theme.vars.size.baseSpacings["sp0-5"]
83
83
  }
84
84
  },
85
- [`&.M4LSidebar-containerNodeMenuItem > .M4LMenuItem-root[class*="${CLASS_NAME_ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
85
+ [`&.M4LSidebar-containerNodeMenuItem > M4LSideBar-wrapperMenuItem > .M4LMenuItem-root[class*="${CLASS_NAME_ITEM_IN_TREE_ACTIVE}"] .M4LIconClass-root`]: {
86
86
  background: theme.vars.palette.text.primary
87
87
  },
88
- [`& > .MuiCollapse-root > .MuiCollapse-wrapper .MuiCollapse-wrapperInner > .M4LSideBar-containerNodeMenuItem:last-child > .M4LMenuItem-root:not(.${CLASS_NAME_IS_ROOT}).${CLASS_NAME_MENU_ACTIVE}`]: {
88
+ [`& > .MuiCollapse-root > .MuiCollapse-wrapper .MuiCollapse-wrapperInner > .M4LSideBar-containerNodeMenuItem:last-child > .M4LSideBar-wrapperMenuItem > .M4LMenuItem-root:not(.${CLASS_NAME_IS_ROOT}).${CLASS_NAME_MENU_ACTIVE}`]: {
89
89
  "& .M4LMenuItem-menuItemContainer": {
90
90
  "&::before": {
91
91
  content: '""',
92
92
  borderLeft: "3px solid",
93
93
  borderColor: theme.vars.palette.background.default,
94
94
  width: "3px",
95
- height: "50%",
96
- bottom: 0,
95
+ height: "90%",
96
+ bottom: "-10px",
97
97
  position: "absolute",
98
- left: "-5px",
98
+ left: "-19px",
99
99
  zIndex: 1
100
100
  }
101
101
  }
102
102
  },
103
- [`& > .M4LMenuItem-root:not(.${CLASS_NAME_IS_ROOT}).${CLASS_NAME_MENU_ACTIVE}`]: {
103
+ [`& > .M4LSideBar-wrapperMenuItem > .M4LMenuItem-root:not(.${CLASS_NAME_IS_ROOT}).${CLASS_NAME_MENU_ACTIVE}`]: {
104
104
  [`&.${CLASS_NAME_HAS_CHILDREN}:not(.${CLASS_NAME_ITEM_CLOSED})`]: {
105
105
  '& [class*="M4LMenuItem-menuItemContainer"]:before': {
106
106
  content: '""',
107
107
  borderLeft: "3px solid",
108
108
  borderColor: theme.vars.palette.background.default,
109
109
  width: "3px",
110
- height: "50%",
111
- bottom: 0,
110
+ height: "90%",
111
+ bottom: "-10px",
112
112
  position: "absolute",
113
- left: "-5px",
113
+ left: "-19px",
114
114
  zIndex: 1
115
115
  }
116
116
  },
@@ -121,7 +121,7 @@ const contentComponentStyles = {
121
121
  height: "5px",
122
122
  top: "50%",
123
123
  transform: "translateY(-50%)",
124
- left: "-6px",
124
+ left: "-20px",
125
125
  borderRadius: theme.vars.size.borderRadius["r0-5"],
126
126
  backgroundColor: theme.vars.palette.primary.focus,
127
127
  zIndex: 2
@@ -132,18 +132,23 @@ const contentComponentStyles = {
132
132
  width: "1px",
133
133
  top: "0px",
134
134
  bottom: "0px",
135
- left: "-4px",
135
+ left: "-18px",
136
136
  backgroundImage: `linear-gradient(180deg,
137
137
  transparent 0%,
138
138
  ${theme.vars.palette.primary.opacityGradient1} 50%,
139
139
  transparent 100%)`
140
140
  }
141
141
  },
142
- [`& > .M4LMenuItem-root.${CLASS_NAME_IS_ROOT}`]: {
143
- paddingRight: "11px"
142
+ [`&.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}.${CLASS_NAME_ITEM_IN_TREE_ACTIVE} > .M4LSideBar-wrapperMenuItem`]: {
143
+ backgroundColor: theme.vars.palette.primary.opacity
144
+ },
145
+ [`&.${CLASS_NAME_IS_ROOT} > .M4LSideBar-wrapperMenuItem`]: {
146
+ paddingRight: "7px",
147
+ paddingTop: theme.vars.size.baseSpacings.sp1,
148
+ paddingBottom: theme.vars.size.baseSpacings.sp1,
149
+ paddingLeft: theme.vars.size.baseSpacings.sp1
144
150
  },
145
- [`& > .M4LMenuItem-root.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}`]: {
146
- backgroundColor: theme.vars.palette.primary.opacity,
151
+ [`& > .M4LSideBar-wrapperMenuItem > .M4LMenuItem-root.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}`]: {
147
152
  borderBottomLeftRadius: 0,
148
153
  borderBottomRightRadius: 0
149
154
  },
@@ -159,7 +164,7 @@ const contentComponentStyles = {
159
164
  width: "1px",
160
165
  top: "-4px",
161
166
  bottom: "-4px",
162
- left: "-4px",
167
+ left: "-14px",
163
168
  backgroundColor: theme.vars.palette.background.default,
164
169
  zIndex: 1
165
170
  }
@@ -169,7 +174,7 @@ const contentComponentStyles = {
169
174
  borderRadius: theme.vars.size.borderRadius.r2,
170
175
  border: theme.vars.size.borderStroke.container,
171
176
  borderColor: theme.vars.palette.primary.selectedOpacity,
172
- boxShadow: theme.vars.customShadows.z2,
177
+ boxShadow: theme.vars.customShadows.z1,
173
178
  overflow: "hidden"
174
179
  },
175
180
  "& .MuiCollapse-root:first-of-type": {
@@ -181,7 +186,7 @@ const contentComponentStyles = {
181
186
  width: "1px",
182
187
  top: "5px",
183
188
  bottom: "5px",
184
- left: "20px",
189
+ left: "16px",
185
190
  borderLeft: theme.vars.size.borderStroke.container,
186
191
  borderColor: theme.vars.palette.border.secondary,
187
192
  zIndex: 1
@@ -191,7 +196,10 @@ const contentComponentStyles = {
191
196
  * Contenedor que contiene el menu item principal.
192
197
  */
193
198
  containerNodeMenuItemMain: ({ theme }) => ({
194
- gap: theme.vars.size.baseSpacings.sp1
199
+ gap: theme.vars.size.baseSpacings.sp1,
200
+ "& .M4LSideBar-wrapperMenuItem": {
201
+ padding: theme.vars.size.baseSpacings.sp1
202
+ }
195
203
  }),
196
204
  /**
197
205
  * Estilos del menu item principal.
@@ -16,10 +16,6 @@ const headerComponentStyles = {
16
16
  "& > div": {
17
17
  transition: "all 0.5s"
18
18
  },
19
- "& > div:first-of-type .M4LImage-root": {
20
- //minWidth: '140px',
21
- minHeight: theme.vars.size.baseSpacings.sp10
22
- },
23
19
  ...!ownerState?.anchored && ownerState?.variant !== "host" && {
24
20
  transition: "all 0.5s",
25
21
  height: theme.vars.size.baseSpacings.sp14,
@@ -73,6 +73,26 @@ const contentGroupStyles = {
73
73
  lineHeight: 0,
74
74
  marginLeft: "auto"
75
75
  }),
76
+ /**
77
+ * Wrapper for the menu item
78
+ */
79
+ wrapperMenuItem: ({ theme, ownerState }) => ({
80
+ display: "flex",
81
+ position: "relative",
82
+ paddingTop: theme.vars.size.baseSpacings.sp2,
83
+ paddingBottom: theme.vars.size.baseSpacings.sp2,
84
+ paddingLeft: theme.vars.size.baseSpacings.sp2,
85
+ paddingRight: theme.vars.size.baseSpacings.sp2,
86
+ ...getSizeStyles(
87
+ theme,
88
+ ownerState?.size || "medium",
89
+ "container",
90
+ (size) => ({
91
+ minHeight: size,
92
+ height: "auto"
93
+ })
94
+ )
95
+ }),
76
96
  /**
77
97
  * Styles applied to the container of the adornment icon in the header component
78
98
  */
@@ -85,6 +105,8 @@ const contentGroupStyles = {
85
105
  position: "relative",
86
106
  width: "fit-content",
87
107
  height: "fit-content",
108
+ minWidth: "fit-content",
109
+ minHeight: "fit-content",
88
110
  padding: "1px",
89
111
  "& .M4LIcon-root": {
90
112
  width: "fit-content",
@@ -5,8 +5,8 @@ import { u as useSideBar } from "../../../../hooks/useSideBar/index.js";
5
5
  import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
6
6
  import { g as getNameDataTestId } from "../../../../tests/utils.js";
7
7
  import { A as ArrowIcon } from "../ArrowIcon/index.js";
8
- import { l as ContainerNodeMenuItemStyled } from "../../../../slots/SideBarSlots.js";
9
- import { a as CLASS_NAME_MENU_ACTIVE, d as CLASS_NAME_ITEM_IN_TREE_ACTIVE, b as CLASS_NAME_HAS_CHILDREN, c as CLASS_NAME_ITEM_CLOSED } from "../../../../constants.js";
8
+ import { l as ContainerNodeMenuItemStyled, W as WrapperMenuItemStyled } from "../../../../slots/SideBarSlots.js";
9
+ import { a as CLASS_NAME_MENU_ACTIVE, b as CLASS_NAME_ITEM_IN_TREE_ACTIVE, c as CLASS_NAME_HAS_CHILDREN, d as CLASS_NAME_ITEM_CLOSED } from "../../../../constants.js";
10
10
  import { useModuleSkeleton } from "@m4l/core";
11
11
  import { A as AdornmentIcon } from "../AdormentIcon/AdormentIcon.js";
12
12
  import { u as useCollapse } from "../../../../hooks/useCollapse/useCollapse.js";
@@ -34,7 +34,7 @@ function NodeMenuItem(props) {
34
34
  ownerState,
35
35
  ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("menuItems") } : {},
36
36
  children: [
37
- /* @__PURE__ */ jsx(
37
+ /* @__PURE__ */ jsx(WrapperMenuItemStyled, { ownerState, className: classes.wrapperMenuItem, children: /* @__PURE__ */ jsx(
38
38
  MenuItem,
39
39
  {
40
40
  className: clsx(
@@ -51,7 +51,7 @@ function NodeMenuItem(props) {
51
51
  onClick: () => handlerClick(),
52
52
  size: currentSize
53
53
  }
54
- ),
54
+ ) }),
55
55
  hasChildren ? /* @__PURE__ */ jsx(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: (item.children || []).map((child, index) => /* @__PURE__ */ jsx(
56
56
  NodeMenuItem,
57
57
  {
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { m as ContainerNodeMenuItemMainStyled, M as MenuItemMainStyled } from "../../../../slots/SideBarSlots.js";
2
+ import { m as ContainerNodeMenuItemMainStyled, W as WrapperMenuItemStyled, M as MenuItemMainStyled } from "../../../../slots/SideBarSlots.js";
3
3
  import { g as getNameDataTestId } from "../../../../tests/utils.js";
4
4
  import { T as TEST_PROP_ID } from "../../../../../../test/constants_no_mock.js";
5
5
  import { A as ArrowIcon } from "../ArrowIcon/index.js";
@@ -14,7 +14,7 @@ import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/
14
14
  import { u as useCollapse } from "../../../../hooks/useCollapse/useCollapse.js";
15
15
  const NodeMenuItemMain = (props) => {
16
16
  const { item, size, defaultOpen = false } = props;
17
- const { urlIconPrefix } = useSideBar();
17
+ const { urlIconPrefix, classes } = useSideBar();
18
18
  const { currentSize } = useComponentSize(size);
19
19
  const { isOpen, handlerClick, hasChildren } = useCollapse(item, defaultOpen);
20
20
  const isSkeleton = useModuleSkeleton();
@@ -30,7 +30,7 @@ const NodeMenuItemMain = (props) => {
30
30
  ownerState,
31
31
  ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("menuItems") } : {},
32
32
  children: [
33
- /* @__PURE__ */ jsx(
33
+ /* @__PURE__ */ jsx(WrapperMenuItemStyled, { ownerState, className: classes.wrapperMenuItem, children: /* @__PURE__ */ jsx(
34
34
  MenuItemMainStyled,
35
35
  {
36
36
  label: item.title,
@@ -39,7 +39,7 @@ const NodeMenuItemMain = (props) => {
39
39
  onClick: () => handlerClick(),
40
40
  size: currentSize
41
41
  }
42
- ),
42
+ ) }),
43
43
  /* @__PURE__ */ jsx(Collapse, { in: isOpen, timeout: "auto", unmountOnExit: true, children: (item.children || []).map((child, index) => /* @__PURE__ */ jsx(
44
44
  NodeMenuItem,
45
45
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.62-B10072025beta.1",
3
+ "version": "9.2.62-B11072025beta.1",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {
@@ -11,8 +11,8 @@
11
11
  "@googlemaps/js-api-loader": "^1.16.6",
12
12
  "@hookform/resolvers": "2.9.11",
13
13
  "@m4l/core": "^2.0.0",
14
- "@m4l/graphics": "7.1.2-B10072025beta.1",
15
- "@m4l/styles": "7.1.30-B10072025beta.1",
14
+ "@m4l/graphics": "7.1.2-B11072025beta.1",
15
+ "@m4l/styles": "7.1.30-B11072025beta.1",
16
16
  "@microlink/react-json-view": "^1.23.3",
17
17
  "@mui/lab": "5.0.0-alpha.173",
18
18
  "@mui/material": "5.16.7",