@m4l/components 9.2.62-B07072025beta.1 → 9.2.62-B08072025beta.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.
@@ -35,7 +35,7 @@ const AppBar = (props) => {
35
35
  {
36
36
  src: `${host_static_assets}/${environment_assets}/${PATH_IMG_HAMBURGUER}`,
37
37
  onClick: onToggleAnchored,
38
- rotationAngle: sidebarAnchored ? 180 : 0,
38
+ rotationAngle: sidebarAnchored ? 0 : 180,
39
39
  variant: "outline",
40
40
  role: "anchored-button"
41
41
  }
@@ -1,2 +1,2 @@
1
1
  export declare const APP_BAR_KEY = "M4LAppBar";
2
- export declare const PATH_IMG_HAMBURGUER = "frontend/components/settings/assets/icons/options.svg";
2
+ export declare const PATH_IMG_HAMBURGUER = "frontend/components/sidebar/assets/icons/panel-left-close.svg";
@@ -1,5 +1,5 @@
1
1
  const APP_BAR_KEY = "M4LAppBar";
2
- const PATH_IMG_HAMBURGUER = "frontend/components/settings/assets/icons/options.svg";
2
+ const PATH_IMG_HAMBURGUER = "frontend/components/sidebar/assets/icons/panel-left-close.svg";
3
3
  export {
4
4
  APP_BAR_KEY as A,
5
5
  PATH_IMG_HAMBURGUER as P
@@ -4,7 +4,7 @@ export declare const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
4
4
  export declare const LIST_MENU_ITEM = "M4LListMenuItem";
5
5
  export declare const PATH_ICONS = "/frontend/domain/microfrontends/";
6
6
  export declare const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
7
- export declare const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
7
+ export declare const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/panel-left-close.svg";
8
8
  export declare const ALL_SIDEBAR_SLOTS: {
9
9
  contentComponentRoot: ContentComponentSlots.contentComponentRoot;
10
10
  containerTreeItemsHeaderFooter: ContentComponentSlots.containerTreeItemsHeaderFooter;
@@ -2,7 +2,7 @@ import { C as ContentComponentSlots, S as SideBarFooterSlots, H as HeaderSidebar
2
2
  const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
3
3
  const PATH_ICONS = "/frontend/domain/microfrontends/";
4
4
  const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
5
- const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
5
+ const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/panel-left-close.svg";
6
6
  const ALL_SIDEBAR_SLOTS = {
7
7
  ...SideBarDesktopSlots,
8
8
  ...SideBarMobileSlots,
@@ -21,8 +21,8 @@ export {
21
21
  PATH_ICONS as P,
22
22
  SIDEBAR_KEY_COMPONENT as S,
23
23
  CLASS_NAME_MENU_ACTIVE as a,
24
- CLASS_NAME_ITEM_IN_TREE_ACTIVE as b,
25
- PATH_ARROW_RIGHT_ICON as c,
26
- PATH_ARROW_DOWN_ICON as d,
27
- CLASS_NAME_HAS_CHILDREN as e
24
+ CLASS_NAME_HAS_CHILDREN as b,
25
+ CLASS_NAME_ITEM_IN_TREE_ACTIVE as c,
26
+ PATH_ARROW_RIGHT_ICON as d,
27
+ PATH_ARROW_DOWN_ICON as e
28
28
  };
@@ -1,6 +1,5 @@
1
- import { C as CLASS_NAME_IS_ROOT, a as CLASS_NAME_MENU_ACTIVE, b 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_HAS_CHILDREN, c as CLASS_NAME_ITEM_IN_TREE_ACTIVE } from "../../constants.js";
2
2
  import { g as getTypographyStyles } from "../../../../utils/getTypographyStyles.js";
3
- import { g as getSizeStyles } from "../../../../utils/getSizeStyles/getSizeStyles.js";
4
3
  const contentComponentStyles = {
5
4
  /**
6
5
  * Estilos del contenedor principal del sidebar
@@ -32,23 +31,26 @@ const contentComponentStyles = {
32
31
  paddingRight: "unset"
33
32
  },
34
33
  '& [class*="M4LMenuItem-root"], & [class*="M4LMenuItem-skeletonMenuItem"]': {
35
- ...getSizeStyles(
36
- theme,
37
- ownerState?.size || "medium",
38
- "container",
39
- (size) => ({
40
- height: size,
41
- minHeight: size,
42
- maxHeight: size
43
- })
44
- )
34
+ height: "fit-content"
45
35
  },
46
36
  "& .M4LMenuItem-root": {
47
37
  border: "unset",
38
+ paddingTop: theme.vars.size.baseSpacings.sp2,
39
+ paddingBottom: theme.vars.size.baseSpacings.sp2,
48
40
  paddingLeft: theme.vars.size.baseSpacings.sp2,
49
41
  paddingRight: theme.vars.size.baseSpacings.sp2,
42
+ borderRadius: theme.vars.size.borderRadius["r1-5"],
43
+ '& [class*="M4LMenuItem-menuItemContainer"]': {
44
+ gap: theme.vars.size.baseSpacings["sp2-5"],
45
+ overflow: "visible"
46
+ },
47
+ "&.menu-active": {
48
+ "& .M4LTypography-root": {
49
+ color: theme.vars.palette.primary.semanticText
50
+ }
51
+ },
50
52
  "& .M4LTypography-root": {
51
- paddingLeft: `${theme.vars.size.baseSpacings.sp2} !important`,
53
+ paddingLeft: 0,
52
54
  ...getTypographyStyles(
53
55
  theme.generalSettings.isMobile,
54
56
  ownerState?.size || "medium",
@@ -61,7 +63,7 @@ const contentComponentStyles = {
61
63
  * Contenedor que contiene grupo menu item desplegable.
62
64
  */
63
65
  containerNodeMenuItem: ({ theme }) => ({
64
- marginLeft: "22px",
66
+ marginLeft: theme.vars.size.baseSpacings.sp6,
65
67
  display: "flex",
66
68
  flexDirection: "column",
67
69
  overflow: "visible",
@@ -79,6 +81,19 @@ const contentComponentStyles = {
79
81
  background: theme.vars.palette.text.primary
80
82
  },
81
83
  [`& > .M4LMenuItem-root:not(.${CLASS_NAME_IS_ROOT}).${CLASS_NAME_MENU_ACTIVE}`]: {
84
+ [`&.${CLASS_NAME_HAS_CHILDREN}`]: {
85
+ '& [class*="M4LMenuItem-menuItemContainer"]:before': {
86
+ content: '""',
87
+ borderLeft: "3px solid",
88
+ borderColor: theme.vars.palette.background.default,
89
+ width: "3px",
90
+ height: "50%",
91
+ bottom: 0,
92
+ position: "absolute",
93
+ left: "-5px",
94
+ zIndex: 1
95
+ }
96
+ },
82
97
  "&::before": {
83
98
  content: '""',
84
99
  position: "absolute",
@@ -86,26 +101,28 @@ const contentComponentStyles = {
86
101
  height: "5px",
87
102
  top: "50%",
88
103
  transform: "translateY(-50%)",
89
- left: "-3px",
90
- borderRadius: "50%",
104
+ left: "-6px",
105
+ borderRadius: theme.vars.size.borderRadius["r0-5"],
91
106
  backgroundColor: theme.vars.palette.primary.focus,
92
- zIndex: 1
107
+ zIndex: 2
93
108
  },
94
109
  "&::after": {
95
110
  content: '""',
96
111
  position: "absolute",
97
112
  width: "1px",
98
- top: "5px",
99
- bottom: "5px",
100
- left: "-1px",
101
- backgroundImage: `linear-gradient(to bottom,
102
- ${theme.vars.palette.primary.opacityGradient2},
103
- ${theme.vars.palette.primary.opacityGradient1},
104
- ${theme.vars.palette.primary.opacityGradient2})`
113
+ top: "0px",
114
+ bottom: "0px",
115
+ left: "-4px",
116
+ backgroundImage: `linear-gradient(180deg,
117
+ transparent 0%,
118
+ ${theme.vars.palette.primary.opacityGradient1} 50%,
119
+ transparent 100%)`
105
120
  }
106
121
  },
107
122
  [`& > .M4LMenuItem-root.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}`]: {
108
- backgroundColor: theme.vars.palette.primary.opacity
123
+ backgroundColor: theme.vars.palette.primary.opacity,
124
+ borderBottomLeftRadius: 0,
125
+ borderBottomRightRadius: 0
109
126
  },
110
127
  "& .MuiCollapse-wrapperInner": {
111
128
  display: "flex",
@@ -117,16 +134,16 @@ const contentComponentStyles = {
117
134
  content: '""',
118
135
  position: "absolute",
119
136
  width: "1px",
120
- top: "0",
121
- bottom: "0",
122
- left: "-1px",
137
+ top: "-4px",
138
+ bottom: "-4px",
139
+ left: "-4px",
123
140
  backgroundColor: theme.vars.palette.background.default,
124
141
  zIndex: 1
125
142
  }
126
143
  },
127
144
  [`&.${CLASS_NAME_IS_ROOT}.${CLASS_NAME_MENU_ACTIVE}`]: {
128
145
  backgroundColor: theme.vars.palette.background.default,
129
- borderRadius: theme.vars.size.borderRadius["r1-5"],
146
+ borderRadius: theme.vars.size.borderRadius.r2,
130
147
  border: theme.vars.size.borderStroke.container,
131
148
  borderColor: theme.vars.palette.primary.selectedOpacity,
132
149
  boxShadow: theme.vars.customShadows.z2,
@@ -141,7 +158,7 @@ const contentComponentStyles = {
141
158
  width: "1px",
142
159
  top: "5px",
143
160
  bottom: "5px",
144
- left: "21px",
161
+ left: "20px",
145
162
  borderLeft: theme.vars.size.borderStroke.container,
146
163
  borderColor: theme.vars.palette.border.secondary,
147
164
  zIndex: 1
@@ -157,6 +174,9 @@ const contentComponentStyles = {
157
174
  * Estilos del menu item principal.
158
175
  */
159
176
  menuItemMain: ({ theme, ownerState }) => ({
177
+ "& .M4LSideBar-containerArrowIconRoot": {
178
+ marginLeft: "unset"
179
+ },
160
180
  "&&& .M4LTypography-root": {
161
181
  ...getTypographyStyles(
162
182
  theme.generalSettings.isMobile,
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { u as useSideBar } from "../../hooks/useSideBar/index.js";
3
3
  import { H as HeaderContainerComponentStyled, B as ButtonAnchoredStyled } from "../../slots/SideBarSlots.js";
4
4
  import { useEnvironment } from "@m4l/core";
5
- import { c as PATH_ARROW_RIGHT_ICON } from "../../constants.js";
5
+ import { d as PATH_ARROW_RIGHT_ICON } from "../../constants.js";
6
6
  import { useIsMobile } from "@m4l/graphics";
7
7
  const HeaderComponent = () => {
8
8
  const {
@@ -24,7 +24,7 @@ const HeaderComponent = () => {
24
24
  {
25
25
  icon: `${host_static_assets}/${environment_assets}/${PATH_ARROW_RIGHT_ICON}`,
26
26
  onClick: handleToggleAnchored,
27
- rotationAngle: anchored ? 180 : 0,
27
+ rotationAngle: anchored ? 0 : 180,
28
28
  className: classes.buttonAnchored,
29
29
  variant: "outline",
30
30
  role: "anchored-button"
@@ -11,6 +11,7 @@ const headerComponentStyles = {
11
11
  gap: theme.vars.size.baseSpacings.sp3,
12
12
  paddingLeft: theme.vars.size.baseSpacings.sp4,
13
13
  paddingRight: theme.vars.size.baseSpacings.sp4,
14
+ paddingBottom: theme.vars.size.baseSpacings.sp3,
14
15
  transition: "all 0.5s",
15
16
  "& > div": {
16
17
  transition: "all 0.5s"
@@ -21,7 +21,7 @@ const sideBarDesktopStyles = {
21
21
  height: "100%",
22
22
  width: "100%",
23
23
  overflow: "visible",
24
- borderRight: `1px solid ${theme.vars.palette.border.default}`,
24
+ borderRight: `1px solid ${theme.vars.palette.border.secondary}`,
25
25
  inset: 0,
26
26
  //add hover effect
27
27
  zIndex: 999
@@ -13,6 +13,7 @@ const contentGroupStyles = {
13
13
  alignItems: "center",
14
14
  justifyContent: ownerState?.noItems ? "center" : "flex-start",
15
15
  transition: "all 0.5s",
16
+ paddingTop: theme.vars.size.baseSpacings.sp3,
16
17
  paddingLeft: theme.vars.size.baseSpacings.sp4,
17
18
  paddingRight: theme.vars.size.baseSpacings.sp4,
18
19
  gap: theme.vars.size.baseSpacings.sp4,
@@ -78,22 +79,31 @@ const contentGroupStyles = {
78
79
  containerAdornmentIcon: ({ theme, ownerState }) => ({
79
80
  overflow: "hidden",
80
81
  borderRadius: theme.vars.size.borderRadius["r1-5"],
81
- padding: "1px",
82
82
  display: "flex",
83
83
  justifyContent: "center",
84
84
  alignItems: "center",
85
85
  position: "relative",
86
- ...getSizeStyles(
87
- theme,
88
- ownerState?.size || "medium",
89
- "action",
90
- (sizeValue) => ({
91
- width: sizeValue,
92
- height: sizeValue,
93
- minWidth: sizeValue,
94
- minHeight: sizeValue
95
- })
96
- ),
86
+ width: "fit-content",
87
+ height: "fit-content",
88
+ padding: "1px",
89
+ "& .M4LIcon-root": {
90
+ width: "fit-content",
91
+ height: "fit-content",
92
+ padding: theme.vars.size.baseSpacings["sp0-5"],
93
+ "& .M4LIcon-icon": {
94
+ ...getSizeStyles(
95
+ theme,
96
+ ownerState?.size || "medium",
97
+ "case",
98
+ (sizeValue) => ({
99
+ width: `${sizeValue}!important`,
100
+ height: `${sizeValue}!important`,
101
+ minWidth: `${sizeValue}!important`,
102
+ minHeight: `${sizeValue}!important`
103
+ })
104
+ )
105
+ }
106
+ },
97
107
  ...ownerState?.variant !== "itemActive" && ownerState?.variant !== "normal" && {
98
108
  "& .M4LIcon-icon": {
99
109
  backgroundColor: `${theme.vars.palette.chips.persianGreen.contained.colorTone}!important`
@@ -111,6 +121,7 @@ const contentGroupStyles = {
111
121
  backgroundColor: theme.vars.palette.primary.enabled
112
122
  },
113
123
  ...ownerState?.variant === "itemActive" && {
124
+ boxShadow: theme.vars.customShadows.primary2,
114
125
  background: `linear-gradient(to bottom,
115
126
  ${theme.vars.palette.primary.opacityGradient1},
116
127
  ${theme.vars.palette.primary.opacityGradient2})`,
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { useEnvironment } from "@m4l/core";
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 { d as PATH_ARROW_DOWN_ICON } from "../../../../constants.js";
5
+ import { e as PATH_ARROW_DOWN_ICON } from "../../../../constants.js";
6
6
  import { k as ContainerArrowIconRootStyled } from "../../../../slots/SideBarSlots.js";
7
7
  import { u as useSideBar } from "../../../../hooks/useSideBar/index.js";
8
8
  import { I as Icon } from "../../../../../Icon/Icon.js";
@@ -6,7 +6,7 @@ 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
8
  import { l as ContainerNodeMenuItemStyled } from "../../../../slots/SideBarSlots.js";
9
- import { a as CLASS_NAME_MENU_ACTIVE, b as CLASS_NAME_ITEM_IN_TREE_ACTIVE, e as CLASS_NAME_HAS_CHILDREN } from "../../../../constants.js";
9
+ import { a as CLASS_NAME_MENU_ACTIVE, c as CLASS_NAME_ITEM_IN_TREE_ACTIVE, b as CLASS_NAME_HAS_CHILDREN } 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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.62-B07072025beta.1",
3
+ "version": "9.2.62-B08072025beta.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.0.0",
15
- "@m4l/styles": "7.0.0-B07072025beta.1",
14
+ "@m4l/graphics": "7.1.2-B08072025beta.1",
15
+ "@m4l/styles": "7.1.30-B08072025beta.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",
@@ -24,4 +24,4 @@ export declare const getHeightSizeStyles: (isMobile: boolean, size: Extract<Size
24
24
  * @param property - Propiedad CSS que se desea aplicar (por defecto es 'height').
25
25
  * @returns Objeto con los estilos calculados.
26
26
  */
27
- export declare const getSizeStyles: (theme: Theme, size: Extract<Sizes, "small" | "medium">, variantSize: SizesComponentsTypes, css?: Record<string, any> | ((sizeValue: string | number) => Record<string, any>), property?: "height" | "width") => any;
27
+ export declare const getSizeStyles: (theme: Theme, size: Sizes, variantSize: SizesComponentsTypes, css?: Record<string, any> | ((sizeValue: string | number) => Record<string, any>), property?: "height" | "width") => any;