@m4l/components 9.3.12-BE080925-beta.1 → 9.3.12-BE090925-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.
@@ -4,9 +4,10 @@ import { useEnvironment, useModuleDictionary } from "@m4l/core";
4
4
  import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
5
5
  import { P as Popover } from "../mui_extended/Popover/Popover.js";
6
6
  import { M as MenuItem } from "../mui_extended/MenuItem/MenuItem.js";
7
- import { I as ICON_PATH, a as ICONS, M as MENU_ACTIONS_ } from "./constants.js";
7
+ import { I as ICON_PATH, a as ICONS, M as MENU_ACTIONS_, b as MENU_ACTIONS_CLASSES } from "./constants.js";
8
8
  import { a as getMenuActionsDictionary, D as DICTIONARY } from "./dictionary.js";
9
9
  import { M as MenuDivider } from "../mui_extended/MenuDivider/MenuDivider.js";
10
+ import clsx from "clsx";
10
11
  import { M as MenuListStyled, a as MenuLoaderStyled, R as RootStyled, I as IconButtonStyled, H as HeaderMenuActionsStyled, F as FooterMenuActionsStyled } from "./slots/MenuActionsSlots.js";
11
12
  import { C as CircularProgress } from "../mui_extended/CircularProgress/CircularProgress.js";
12
13
  function MenuActions(props) {
@@ -128,7 +129,7 @@ function MenuActions(props) {
128
129
  endListElement && endListElement
129
130
  ] });
130
131
  }, [menuActions, header, size, footer, endListElement, objItem, getLabel, actionKey, handleClick]);
131
- return /* @__PURE__ */ jsxs(RootStyled, { className, ownerState: { ownerState }, children: [
132
+ return /* @__PURE__ */ jsxs(RootStyled, { className: clsx(className, MENU_ACTIONS_CLASSES.root, ownerState.selected && MENU_ACTIONS_CLASSES.selected), ownerState: { ownerState }, children: [
132
133
  /* @__PURE__ */ jsx(
133
134
  IconButtonStyled,
134
135
  {
@@ -38,7 +38,7 @@ const menuActionsStyles = {
38
38
  "& active": {
39
39
  backgroundColor: theme.vars.palette[ownerState?.paletteColor ?? "default"].selectedOpacity
40
40
  },
41
- '& [class*="M4LIcon-icon"]': {
41
+ "& .M4LIcon-icon": {
42
42
  backgroundColor: ownerState?.selected ? theme.vars.palette[ownerState?.paletteColor ?? "default"].selected : void 0
43
43
  }
44
44
  }),
@@ -20,3 +20,4 @@ export declare const MENU_ACTIONS_EMPTY = "menu_action_empty";
20
20
  * Prefijo de la clave que se utiliza cuando un ítem del menú está cargando en React.
21
21
  */
22
22
  export declare const MENU_ACTIONS_ = "menu_action_";
23
+ export declare const MENU_ACTIONS_CLASSES: Record<string, string>;
@@ -1,12 +1,23 @@
1
+ import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
2
+ import { M as MenuActionsSlots } from "./slots/MenuActionsEnum.js";
1
3
  const ICON_PATH = "frontend/components/menu_actions/assets/icons";
2
4
  const ICONS = {
3
5
  MENU: "menu.svg"
4
6
  };
5
7
  const MENU_ACTIONS_KEY_COMPONENT = "M4LMenuActions";
6
8
  const MENU_ACTIONS_ = "menu_action_";
9
+ const MenuActionsComplementaryClasses = {
10
+ selected: "selected"
11
+ };
12
+ const MENU_ACTIONS_COMBINATE_CLASSES = {
13
+ ...MenuActionsSlots,
14
+ ...MenuActionsComplementaryClasses
15
+ };
16
+ const MENU_ACTIONS_CLASSES = getComponentClasses(MENU_ACTIONS_KEY_COMPONENT, MENU_ACTIONS_COMBINATE_CLASSES);
7
17
  export {
8
18
  ICON_PATH as I,
9
19
  MENU_ACTIONS_ as M,
10
20
  ICONS as a,
11
- MENU_ACTIONS_KEY_COMPONENT as b
21
+ MENU_ACTIONS_CLASSES as b,
22
+ MENU_ACTIONS_KEY_COMPONENT as c
12
23
  };
@@ -1,6 +1,6 @@
1
1
  import { MenuList } from "@mui/material";
2
2
  import { styled } from "@mui/material/styles";
3
- import { b as MENU_ACTIONS_KEY_COMPONENT } from "../constants.js";
3
+ import { c as MENU_ACTIONS_KEY_COMPONENT } from "../constants.js";
4
4
  import { m as menuActionsStyles } from "../MenuActions.styles.js";
5
5
  import { M as MenuActionsSlots } from "./MenuActionsEnum.js";
6
6
  import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
@@ -291,7 +291,7 @@ const windowBaseStyles = {
291
291
  }
292
292
  }
293
293
  },
294
- "&.MuiButtonBase-root:not(:hover, :active, :focus) .M4LIcon-root .M4LIcon-icon": {
294
+ "&.MuiButtonBase-root:not(:hover, :active, :focus, .M4LIconButton-selected) .M4LIcon-root .M4LIcon-icon": {
295
295
  backgroundColor: `${theme.vars.palette.text.disabled} !important`
296
296
  }
297
297
  },
@@ -88,7 +88,12 @@ const IconButton = forwardRef((props, ref) => {
88
88
  color,
89
89
  role: "button",
90
90
  ...other,
91
- className: clsx(ICON_BUTTON_CLASSES[variant], ICON_BUTTON_CLASSES.styledMUIIconButton, className),
91
+ className: clsx(
92
+ ICON_BUTTON_CLASSES[variant],
93
+ ICON_BUTTON_CLASSES.styledMUIIconButton,
94
+ selected && ICON_BUTTON_CLASSES.selected,
95
+ className
96
+ ),
92
97
  children: renderIcon(icon || src)
93
98
  }
94
99
  )
@@ -104,7 +109,12 @@ const IconButton = forwardRef((props, ref) => {
104
109
  "data-testid": "IconButtonRoot",
105
110
  color,
106
111
  ...other,
107
- className: clsx(ICON_BUTTON_CLASSES[variant], ICON_BUTTON_CLASSES.styledMUIIconButton, className),
112
+ className: clsx(
113
+ ICON_BUTTON_CLASSES[variant],
114
+ ICON_BUTTON_CLASSES.styledMUIIconButton,
115
+ selected && ICON_BUTTON_CLASSES.selected,
116
+ className
117
+ ),
108
118
  children: renderIcon(icon || src)
109
119
  }
110
120
  );
@@ -1,7 +1,14 @@
1
1
  import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
2
2
  import { I as IconButtonSlots } from "./slots/IconButtonEnum.js";
3
3
  const ICON_BUTTON_KEY_COMPONENT = "M4LIconButton";
4
- const ICON_BUTTON_CLASSES = getComponentClasses(ICON_BUTTON_KEY_COMPONENT, IconButtonSlots);
4
+ const IconButtonComplementaryClasses = {
5
+ selected: "selected"
6
+ };
7
+ const IconButtonCombineClasses = {
8
+ ...IconButtonSlots,
9
+ ...IconButtonComplementaryClasses
10
+ };
11
+ const ICON_BUTTON_CLASSES = getComponentClasses(ICON_BUTTON_KEY_COMPONENT, IconButtonCombineClasses);
5
12
  export {
6
13
  ICON_BUTTON_CLASSES as I,
7
14
  ICON_BUTTON_KEY_COMPONENT as a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.3.12-BE080925-beta.1",
3
+ "version": "9.3.12-BE090925-beta.1",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {