@m4l/components 9.3.35-BE20251128-beta.1 → 9.3.35-BE20251129-beta.2

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 (109) hide show
  1. package/@types/export.d.ts +3 -0
  2. package/@types/types.d.ts +40 -5
  3. package/components/AccountPopover/AccountPopover.styles.js +5 -2
  4. package/components/ActionsGroup/ActionsGroup.d.ts +5 -0
  5. package/components/ActionsGroup/ActionsGroup.js +40 -0
  6. package/components/ActionsGroup/ActionsGroup.styles.d.ts +2 -0
  7. package/components/ActionsGroup/ActionsGroup.styles.js +95 -0
  8. package/components/ActionsGroup/__tests__/ActionsGroup.test.d.ts +1 -0
  9. package/components/ActionsGroup/constants.d.ts +2 -0
  10. package/components/ActionsGroup/constants.js +8 -0
  11. package/components/ActionsGroup/icons.d.ts +3 -0
  12. package/components/ActionsGroup/icons.js +6 -0
  13. package/components/ActionsGroup/index.d.ts +1 -0
  14. package/components/ActionsGroup/index.js +1 -0
  15. package/components/ActionsGroup/slots/ActionsGroupEnum.d.ts +8 -0
  16. package/components/ActionsGroup/slots/ActionsGroupEnum.js +12 -0
  17. package/components/ActionsGroup/slots/ActionsGroupSlots.d.ts +15 -0
  18. package/components/ActionsGroup/slots/ActionsGroupSlots.js +35 -0
  19. package/components/ActionsGroup/subcomponents/ActionIconButton/ActionIconButton.d.ts +6 -0
  20. package/components/ActionsGroup/subcomponents/ActionIconButton/ActionIconButton.js +76 -0
  21. package/components/ActionsGroup/subcomponents/ActionIconButton/types.d.ts +7 -0
  22. package/components/ActionsGroup/types.d.ts +60 -0
  23. package/components/DataGrid/DataGrid.js +2 -0
  24. package/components/DataGrid/Datagrid.styles.js +19 -3
  25. package/components/DataGrid/contexts/DataGridContext/index.js +2 -0
  26. package/components/DataGrid/contexts/DataGridContext/types.d.ts +2 -2
  27. package/components/DataGrid/subcomponents/Cards/subcomponents/CardHeader/index.js +15 -7
  28. package/components/DataGrid/subcomponents/CheckboxCellAdapter/index.js +4 -1
  29. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Density/index.js +0 -3
  30. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +6 -2
  31. package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +0 -3
  32. package/components/DataGrid/subcomponents/Table/subcomponents/RadioButtonFormatter.d.ts +6 -0
  33. package/components/DataGrid/subcomponents/Table/subcomponents/RadioButtonFormatter.js +12 -0
  34. package/components/DataGrid/subcomponents/Table/subcomponents/RadioSelectColumn.d.ts +64 -0
  35. package/components/DataGrid/subcomponents/Table/subcomponents/RadioSelectColumn.js +46 -0
  36. package/components/DataGrid/tests/table/subcomponents/RadioButtonFormatter.test.d.ts +1 -0
  37. package/components/DataGrid/tests/table/subcomponents/RadioSelectColumn.test.d.ts +1 -0
  38. package/components/DataGrid/types.d.ts +7 -0
  39. package/components/DynamicFilter/DynamicFilter.styles.js +5 -2
  40. package/components/DynamicSort/DynamicSort.styles.js +5 -2
  41. package/components/GridLayout/styles.js +0 -1
  42. package/components/Label/index.d.ts +1 -1
  43. package/components/Label/types.d.ts +6 -0
  44. package/components/LanguagePopover/LanguagePopover.styles.js +13 -4
  45. package/components/MFLoader/styles.js +0 -1
  46. package/components/ModalDialog/ModalDialog.styles.js +8 -1
  47. package/components/PrintingSystem/PrintingSystem.js +3 -1
  48. package/components/PrintingSystem/PrintingSystem.styles.js +179 -2
  49. package/components/SideBar/subcomponents/SideBarMobile/index.js +0 -3
  50. package/components/TabsNavigator/slots/TabsNavigatorSlots.d.ts +10 -10
  51. package/components/WindowBase/WindowBase.styles.js +8 -0
  52. package/components/WindowBase/subcomponents/Header/useButtonActions.js +23 -13
  53. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +5 -0
  54. package/components/commercial/AppBarCommercial/styles.js +1 -3
  55. package/components/commercial/HamburgerMenu/styles.js +1 -3
  56. package/components/commercial/SectionCommercial/styles.js +1 -3
  57. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.js +1 -3
  58. package/components/commercial/TopBar/style.js +1 -3
  59. package/components/hook-form/RHFActionsGroup/RHFActionsGroup.d.ts +7 -0
  60. package/components/hook-form/RHFActionsGroup/RHFActionsGroup.js +87 -0
  61. package/components/hook-form/RHFActionsGroup/RHFActionsGroupStyles.d.ts +2 -0
  62. package/components/hook-form/RHFActionsGroup/RHFActionsGroupStyles.js +14 -0
  63. package/components/hook-form/RHFActionsGroup/constants.d.ts +9 -0
  64. package/components/hook-form/RHFActionsGroup/constants.js +8 -0
  65. package/components/hook-form/RHFActionsGroup/index.d.ts +2 -0
  66. package/components/hook-form/RHFActionsGroup/index.js +1 -0
  67. package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupEnum.d.ts +3 -0
  68. package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupEnum.js +7 -0
  69. package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupSlots.d.ts +1 -0
  70. package/components/hook-form/RHFActionsGroup/slots/RHFActionsGroupSlots.js +11 -0
  71. package/components/hook-form/RHFActionsGroup/slots/index.d.ts +2 -0
  72. package/components/hook-form/RHFActionsGroup/slots/index.js +1 -0
  73. package/components/hook-form/RHFActionsGroup/tests/RHFActionsGroup.test.d.ts +1 -0
  74. package/components/hook-form/RHFActionsGroup/tests/common.d.ts +28 -0
  75. package/components/hook-form/RHFActionsGroup/types.d.ts +54 -0
  76. package/components/hook-form/RHFormProvider/styles.js +4 -3
  77. package/components/hook-form/index.d.ts +1 -0
  78. package/components/index.d.ts +1 -0
  79. package/components/mui_extended/Accordion/styles.js +9 -5
  80. package/components/mui_extended/Autocomplete/Autocomplete.styles.js +11 -1
  81. package/components/mui_extended/DateTimePicker/DateTimePicker.styles.js +5 -1
  82. package/components/mui_extended/ImageButton/styles.js +1 -3
  83. package/components/mui_extended/Popover/Popover.styles.js +6 -1
  84. package/components/mui_extended/RadioButton/RadioButton.d.ts +24 -0
  85. package/components/mui_extended/RadioButton/RadioButton.js +110 -0
  86. package/components/mui_extended/RadioButton/RadioButton.styles.d.ts +2 -0
  87. package/components/mui_extended/RadioButton/RadioButton.styles.js +126 -0
  88. package/components/mui_extended/RadioButton/constants.d.ts +1 -0
  89. package/components/mui_extended/RadioButton/constants.js +4 -0
  90. package/components/mui_extended/RadioButton/icons.d.ts +4 -0
  91. package/components/mui_extended/RadioButton/icons.js +7 -0
  92. package/components/mui_extended/RadioButton/index.d.ts +1 -0
  93. package/components/mui_extended/RadioButton/index.js +1 -0
  94. package/components/mui_extended/RadioButton/slots/RadioButtonEnum.d.ts +8 -0
  95. package/components/mui_extended/RadioButton/slots/RadioButtonEnum.js +12 -0
  96. package/components/mui_extended/RadioButton/slots/RadioButtonSlots.d.ts +20 -0
  97. package/components/mui_extended/RadioButton/slots/RadioButtonSlots.js +39 -0
  98. package/components/mui_extended/RadioButton/tests/RadioButton.test.d.ts +1 -0
  99. package/components/mui_extended/RadioButton/types.d.ts +50 -0
  100. package/components/mui_extended/Select/Select.js +2 -18
  101. package/components/mui_extended/Select/Select.styles.js +33 -1
  102. package/components/mui_extended/Select/constants.d.ts +2 -1
  103. package/components/mui_extended/Select/slots/SelectEnum.d.ts +2 -1
  104. package/components/mui_extended/Select/slots/SelectEnum.js +1 -0
  105. package/components/mui_extended/TextField/TextField.styles.js +2 -1
  106. package/components/mui_extended/Tooltip/Tooltip.styles.js +22 -4
  107. package/components/mui_extended/index.d.ts +1 -0
  108. package/index.js +76 -70
  109. package/package.json +3 -3
@@ -55,6 +55,9 @@ declare module '@mui/material/styles' {
55
55
  M4LCheckBox?: {
56
56
  styleOverrides?: ComponentsOverrides<Theme>['M4LCheckBox'];
57
57
  };
58
+ M4LRadioButton?: {
59
+ styleOverrides?: ComponentsOverrides<Theme>['M4LRadioButton'];
60
+ };
58
61
  M4LDataGrid?: {
59
62
  styleOverrides?: ComponentsOverrides<Theme>['M4LDataGrid'];
60
63
  };
package/@types/types.d.ts CHANGED
@@ -76,6 +76,10 @@ import {
76
76
  CheckBoxOwnerState,
77
77
  CheckBoxSlotsType,
78
78
  } from '../components/mui_extended/CheckBox/types';
79
+ import {
80
+ RadioButtonOwnerState,
81
+ RadioButtonSlotsType,
82
+ } from '../components/mui_extended/RadioButton/types';
79
83
  import {
80
84
  RHFNumberInputOwnerState,
81
85
  RHFNumberInputSlotsType,
@@ -292,10 +296,26 @@ import {
292
296
  ImageTextOwnerState,
293
297
  ImageTextSlotsType,
294
298
  } from '../components/ImageText/types';
295
- import { FormContainerOwnerState, FormContainerSlotsType } from '../components/FormContainer/types';
296
- import { TabsNavigatorSlotsType } from '../components/TabsNavigator/types';
297
- import { EditLabelOwnerState, EditLabelSlotsType } from '../components/EditLabel/types';
298
- import { MFIsolationAppOwnerState, MFIsolationAppSlotsType } from '../components/MFIsolationApp/types';
299
+ import {
300
+ FormContainerOwnerState,
301
+ FormContainerSlotsType,
302
+ } from '../components/FormContainer/types';
303
+ import {
304
+ ActionsGroupOwnerState,
305
+ ActionsGroupSlotsType,
306
+ } from '../components/ActionsGroup/types';
307
+ import {
308
+ TabsNavigatorSlotsType,
309
+ TabsNavigatorOwnerState,
310
+ } from 'src/components/TabsNavigator/types';
311
+ import {
312
+ EditLabelOwnerState,
313
+ EditLabelSlotsType,
314
+ } from '../components/EditLabel/types';
315
+ import {
316
+ MFIsolationAppOwnerState,
317
+ MFIsolationAppSlotsType,
318
+ } from '../components/MFIsolationApp/types';
299
319
  import {
300
320
  TagsFormatterOwnerState,
301
321
  TagsFormatterSlotsType,
@@ -332,6 +352,7 @@ declare module '@mui/material/styles' {
332
352
  M4LSelect: SelectSlotsType;
333
353
  M4LTypography: TypographySlotsType;
334
354
  M4LCheckBox: CheckBoxSlotsType;
355
+ M4LRadioButton: RadioButtonSlotsType;
335
356
  M4LRHFNumberInput: RHFNumberInputSlotsType;
336
357
  M4LTab: TabSlotsType;
337
358
  M4LButton: ButtonSlotsType;
@@ -346,7 +367,8 @@ declare module '@mui/material/styles' {
346
367
  M4LChip: ChipSlotsType;
347
368
  M4LCircularProgress: CircularProgressSlotsType;
348
369
  M4LPaperForm: PaperFormSlotsType;
349
- M4LWindowBase: WindowBaseType;a
370
+ M4LWindowBase: WindowBaseType;
371
+ a;
350
372
  M4LWindowConfirm: WindowConfirmType;
351
373
  M4LAppBar: AppBarSlotsType;
352
374
  M4LDialog: DialogType;
@@ -396,6 +418,7 @@ declare module '@mui/material/styles' {
396
418
  M4LStepper: StepperSlotsType;
397
419
  M4LImageText: ImageTextSlotsType;
398
420
  M4LFormContainer: FormContainerSlotsType;
421
+ M4LActionsGroup: ActionsGroupSlotsType;
399
422
  M4LTabsNavigator: TabsNavigatorSlotsType;
400
423
  M4LEditLabel: EditLabelSlotsType;
401
424
  M4LMFIsolationApp: MFIsolationAppSlotsType;
@@ -425,6 +448,7 @@ declare module '@mui/material/styles' {
425
448
  M4LSelect: Partial<SelectOwnerState>;
426
449
  M4LTypography: Partial<TypographyOwnerState>;
427
450
  M4LCheckBox: Partial<CheckBoxOwnerState>;
451
+ M4LRadioButton: Partial<RadioButtonOwnerState>;
428
452
  M4LRHFNumberInput: Partial<RHFNumberInputOwnerState>;
429
453
  M4LTab: Partial<TabOwnerState>;
430
454
  M4LButton: Partial<ButtonOwnerState>;
@@ -489,6 +513,7 @@ declare module '@mui/material/styles' {
489
513
  M4LStepper: Partial<StepperOwnerState>;
490
514
  M4LImageText: Partial<ImageTextOwnerState>;
491
515
  M4LFormContainer: Partial<FormContainerOwnerState>;
516
+ M4LActionsGroup: Partial<ActionsGroupOwnerState>;
492
517
  M4LTabsNavigator: Partial<TabsNavigatorOwnerState>;
493
518
  M4LEditLabel: Partial<EditLabelOwnerState>;
494
519
  M4LMFIsolationApp: Partial<MFIsolationAppOwnerState>;
@@ -617,6 +642,11 @@ declare module '@mui/material/styles' {
617
642
  styleOverrides?: ComponentsOverrides<Theme>['M4LCheckBox'];
618
643
  variants?: ComponentsVariants['M4LCheckBox'];
619
644
  };
645
+ M4LRadioButton?: {
646
+ defaultProps?: ComponentsPropsList['M4LRadioButton'];
647
+ styleOverrides?: ComponentsOverrides<Theme>['M4LRadioButton'];
648
+ variants?: ComponentsVariants['M4LRadioButton'];
649
+ };
620
650
  M4LActionCancel?: {
621
651
  defaultProps?: ComponentsPropsList['M4LActionCancel'];
622
652
  styleOverrides?: ComponentsOverrides<Theme>['M4LActionCancel'];
@@ -927,6 +957,11 @@ declare module '@mui/material/styles' {
927
957
  styleOverrides?: ComponentsOverrides<Theme>['M4LFormContainer'];
928
958
  variants?: ComponentsVariants['M4LFormContainer'];
929
959
  };
960
+ M4LActionsGroup?: {
961
+ defaultProps?: ComponentsPropsList['M4LActionsGroup'];
962
+ styleOverrides?: ComponentsOverrides<Theme>['M4LActionsGroup'];
963
+ variants?: ComponentsVariants['M4LActionsGroup'];
964
+ };
930
965
  M4LTabsNavigator?: {
931
966
  defaultProps?: ComponentsPropsList['M4LTabsNavigator'];
932
967
  styleOverrides?: ComponentsOverrides<Theme>['M4LTabsNavigator'];
@@ -43,9 +43,12 @@ const accountPopoverStyles = {
43
43
  * *******************************************************************
44
44
  */
45
45
  popoverRoot: ({ theme }) => ({
46
- "& .MuiPaper-root": {
46
+ "&&& .MuiPaper-root": {
47
47
  marginTop: "5px",
48
- padding: `${theme.vars.size.baseSpacings.sp2} !important`
48
+ padding: theme.vars.size.baseSpacings.sp3,
49
+ backgroundColor: theme.vars.palette.background.default,
50
+ borderRadius: theme.vars.size.borderRadius.r2,
51
+ boxShadow: theme.vars.customShadows.z4
49
52
  }
50
53
  }),
51
54
  /**
@@ -0,0 +1,5 @@
1
+ import { ActionsGroupProps, ActionsGroupValueType } from './types';
2
+ /**
3
+ * ActionsGroup component that renders a group of actions.
4
+ */
5
+ export declare const ActionsGroup: <T extends ActionsGroupValueType>(props: ActionsGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { A as ActionsGroupRootStyled } from "./slots/ActionsGroupSlots.js";
4
+ import { A as ACTIONS_GROUP_CLASSES } from "./constants.js";
5
+ import clsx from "clsx";
6
+ import { A as ActionIconButton } from "./subcomponents/ActionIconButton/ActionIconButton.js";
7
+ const ActionsGroup = (props) => {
8
+ const { actions, variant = "horizontal", disabled = false, className, value, size, onChange, ariaLabel, ariaLabelledBy } = props;
9
+ const ownerState = useMemo(() => ({
10
+ disabled,
11
+ variant,
12
+ size
13
+ }), [disabled, size, variant]);
14
+ return /* @__PURE__ */ jsx(
15
+ ActionsGroupRootStyled,
16
+ {
17
+ className: clsx(className, ACTIONS_GROUP_CLASSES.root),
18
+ ownerState,
19
+ role: "toolbar",
20
+ "aria-orientation": variant === "vertical" ? "vertical" : "horizontal",
21
+ "aria-disabled": disabled || void 0,
22
+ "aria-label": ariaLabel,
23
+ "aria-labelledby": ariaLabel ? void 0 : ariaLabelledBy,
24
+ children: actions.map((action) => /* @__PURE__ */ jsx(
25
+ ActionIconButton,
26
+ {
27
+ action,
28
+ selected: action.id === value,
29
+ ownerState,
30
+ onChange,
31
+ groupDisabled: disabled
32
+ },
33
+ String(action.id ?? action.label)
34
+ ))
35
+ }
36
+ );
37
+ };
38
+ export {
39
+ ActionsGroup as A
40
+ };
@@ -0,0 +1,2 @@
1
+ import { ActionsGroupStyles } from './types';
2
+ export declare const actionsGroupStyles: ActionsGroupStyles;
@@ -0,0 +1,95 @@
1
+ import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
2
+ const actionsGroupStyles = {
3
+ /**
4
+ * Styles for the actions group root element.
5
+ */
6
+ root: ({ theme, ownerState }) => ({
7
+ display: "flex",
8
+ flexDirection: "row",
9
+ gap: theme.vars.size.baseSpacings.sp1,
10
+ padding: theme.vars.size.baseSpacings["sp0-5"],
11
+ borderRadius: theme.vars.size.borderRadius.r2,
12
+ backgroundColor: theme.vars.palette.default.enabledOpacity,
13
+ width: "fit-content",
14
+ height: "fit-content",
15
+ ...ownerState?.variant === "vertical" && {
16
+ flexDirection: "column"
17
+ },
18
+ ...ownerState?.variant === "horizontal" && {
19
+ flexDirection: "row"
20
+ }
21
+ }),
22
+ /**
23
+ * Styles for the action icon button element.
24
+ */
25
+ actionIconButton: ({ theme, ownerState }) => ({
26
+ "&&&": {
27
+ ...getSizeStyles(theme, ownerState?.size || "medium", "case", (size) => ({
28
+ width: size,
29
+ height: size
30
+ })),
31
+ ...ownerState?.disabled && {
32
+ "& .M4LIcon-root .M4LIcon-icon": {
33
+ backgroundColor: `${theme.vars.palette.text.disabled} !important`
34
+ }
35
+ },
36
+ ...ownerState?.itemSelected && {
37
+ backgroundColor: theme.vars.palette.background.default,
38
+ boxShadow: theme.vars.customShadows.z1,
39
+ "& .M4LIcon-root .M4LIcon-icon": {
40
+ backgroundColor: `${theme.vars.palette.primary.semanticText} !important`
41
+ }
42
+ },
43
+ ...!ownerState?.itemDisabled && !ownerState?.itemSelected && {
44
+ "& .M4LIcon-root .M4LIcon-icon": {
45
+ backgroundColor: `${theme.vars.palette.text.secondary} !important`
46
+ }
47
+ }
48
+ }
49
+ }),
50
+ /**
51
+ * Styles for the action icon button skeleton element.
52
+ */
53
+ actionIconButtonSkeleton: ({ theme, ownerState }) => ({
54
+ "&&&": {
55
+ borderRadius: theme.vars.size.borderRadius["r1-5"],
56
+ ...getSizeStyles(theme, ownerState?.size || "medium", "case", (size) => ({
57
+ width: `${size}!important`,
58
+ height: `${size}!important`
59
+ }))
60
+ }
61
+ }),
62
+ /**
63
+ * Styles for the icon tooltip message element.
64
+ */
65
+ iconTooltipMessage: {},
66
+ /**
67
+ * Styles for the text tooltip message element.
68
+ */
69
+ textTooltipMessage: ({ theme }) => ({
70
+ color: theme.vars.palette.text.contrastText
71
+ }),
72
+ /**
73
+ * Styles for the tooltip element.
74
+ */
75
+ tooltip: ({ theme }) => ({
76
+ "&&&": {
77
+ display: "flex",
78
+ flexDirection: "row",
79
+ gap: theme.vars.size.baseSpacings.sp2,
80
+ paddingTop: theme.vars.size.baseSpacings.sp1,
81
+ paddingBottom: theme.vars.size.baseSpacings.sp1,
82
+ paddingLeft: theme.vars.size.baseSpacings.sp2,
83
+ paddingRight: theme.vars.size.baseSpacings.sp2,
84
+ "&.MuiTooltip-tooltip .M4LIcon-icon": {
85
+ backgroundColor: theme.vars.palette.text.contrastText
86
+ },
87
+ "& .M4LTypography-root": {
88
+ color: theme.vars.palette.text.contrastText
89
+ }
90
+ }
91
+ })
92
+ };
93
+ export {
94
+ actionsGroupStyles as a
95
+ };
@@ -0,0 +1,2 @@
1
+ export declare const ACTIONS_GROUP_KEY_COMPONENT = "M4LActionsGroup";
2
+ export declare const ACTIONS_GROUP_CLASSES: Record<"root" | "tooltip" | "actionIconButton" | "actionIconButtonSkeleton" | "iconTooltipMessage" | "textTooltipMessage", string>;
@@ -0,0 +1,8 @@
1
+ import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
2
+ import { A as ActionsGroupSlots } from "./slots/ActionsGroupEnum.js";
3
+ const ACTIONS_GROUP_KEY_COMPONENT = "M4LActionsGroup";
4
+ const ACTIONS_GROUP_CLASSES = getComponentClasses(ACTIONS_GROUP_KEY_COMPONENT, ActionsGroupSlots);
5
+ export {
6
+ ACTIONS_GROUP_CLASSES as A,
7
+ ACTIONS_GROUP_KEY_COMPONENT as a
8
+ };
@@ -0,0 +1,3 @@
1
+ export declare const ACTIONS_GROUP_ICONS: {
2
+ blocked: string;
3
+ };
@@ -0,0 +1,6 @@
1
+ const ACTIONS_GROUP_ICONS = {
2
+ blocked: "frontend/components/actions_group/assets/icons/lock.svg"
3
+ };
4
+ export {
5
+ ACTIONS_GROUP_ICONS as A
6
+ };
@@ -0,0 +1 @@
1
+ export { ActionsGroup } from './ActionsGroup';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,8 @@
1
+ export declare enum ActionsGroupSlots {
2
+ root = "root",
3
+ actionIconButton = "actionIconButton",
4
+ actionIconButtonSkeleton = "actionIconButtonSkeleton",
5
+ iconTooltipMessage = "iconTooltipMessage",
6
+ textTooltipMessage = "textTooltipMessage",
7
+ tooltip = "tooltip"
8
+ }
@@ -0,0 +1,12 @@
1
+ var ActionsGroupSlots = /* @__PURE__ */ ((ActionsGroupSlots2) => {
2
+ ActionsGroupSlots2["root"] = "root";
3
+ ActionsGroupSlots2["actionIconButton"] = "actionIconButton";
4
+ ActionsGroupSlots2["actionIconButtonSkeleton"] = "actionIconButtonSkeleton";
5
+ ActionsGroupSlots2["iconTooltipMessage"] = "iconTooltipMessage";
6
+ ActionsGroupSlots2["textTooltipMessage"] = "textTooltipMessage";
7
+ ActionsGroupSlots2["tooltip"] = "tooltip";
8
+ return ActionsGroupSlots2;
9
+ })(ActionsGroupSlots || {});
10
+ export {
11
+ ActionsGroupSlots as A
12
+ };
@@ -0,0 +1,15 @@
1
+ export declare const ActionsGroupRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
2
+ ownerState?: (Partial<import('../types').ActionsGroupOwnerState> & Record<string, unknown>) | undefined;
3
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
+ export declare const ActionIconButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "variant" | "color" | "content" | "translate" | "className" | "style" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tooltip" | "instaceDataTestId" | "placement" | "icon" | "rotationAngle" | "ariaLabel" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
5
+ ownerState?: (Partial<import('../types').ActionsGroupOwnerState> & Record<string, unknown>) | undefined;
6
+ }, {}, {}>;
7
+ export declare const ActionIconButtonSkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Skeleton/types').SkeletonProps, keyof import('../../mui_extended/Skeleton/types').SkeletonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
8
+ ownerState?: (Partial<import('../types').ActionsGroupOwnerState> & Record<string, unknown>) | undefined;
9
+ }, {}, {}>;
10
+ export declare const IconTooltipMessageStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
11
+ ownerState?: (Partial<import('../types').ActionsGroupOwnerState> & Record<string, unknown>) | undefined;
12
+ }, {}, {}>;
13
+ export declare const TextTooltipMessageStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/Typography/types').TypographyProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "size" | "children" | "title" | "component" | "zIndex" | "id" | "disabled" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "variant" | "color" | "dataTestid" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "className" | "style" | "classes" | "sx" | "p" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "htmlFor" | "gutterBottom" | "noWrap" | "variantMapping" | "skeletonWidth" | "skeletonRows" | "ellipsis" | keyof import('react').RefAttributes<HTMLSpanElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
14
+ ownerState?: (Partial<import('../types').ActionsGroupOwnerState> & Record<string, unknown>) | undefined;
15
+ }, {}, {}>;
@@ -0,0 +1,35 @@
1
+ import { A as ActionsGroupSlots } from "./ActionsGroupEnum.js";
2
+ import { a as ACTIONS_GROUP_KEY_COMPONENT } from "../constants.js";
3
+ import { styled } from "@mui/material/styles";
4
+ import { a as actionsGroupStyles } from "../ActionsGroup.styles.js";
5
+ import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
6
+ import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
7
+ import { T as Typography } from "../../mui_extended/Typography/Typography.js";
8
+ import { I as Icon } from "../../Icon/Icon.js";
9
+ const ActionsGroupRootStyled = styled("div", {
10
+ name: ACTIONS_GROUP_KEY_COMPONENT,
11
+ slot: ActionsGroupSlots.root
12
+ })(actionsGroupStyles?.root);
13
+ const ActionIconButtonStyled = styled(IconButton, {
14
+ name: ACTIONS_GROUP_KEY_COMPONENT,
15
+ slot: ActionsGroupSlots.actionIconButton
16
+ })(actionsGroupStyles?.actionIconButton);
17
+ const ActionIconButtonSkeletonStyled = styled(Skeleton, {
18
+ name: ACTIONS_GROUP_KEY_COMPONENT,
19
+ slot: ActionsGroupSlots.actionIconButtonSkeleton
20
+ })(actionsGroupStyles?.actionIconButtonSkeleton);
21
+ const IconTooltipMessageStyled = styled(Icon, {
22
+ name: ACTIONS_GROUP_KEY_COMPONENT,
23
+ slot: ActionsGroupSlots.iconTooltipMessage
24
+ })(actionsGroupStyles?.iconTooltipMessage);
25
+ const TextTooltipMessageStyled = styled(Typography, {
26
+ name: ACTIONS_GROUP_KEY_COMPONENT,
27
+ slot: ActionsGroupSlots.textTooltipMessage
28
+ })(actionsGroupStyles?.textTooltipMessage);
29
+ export {
30
+ ActionsGroupRootStyled as A,
31
+ IconTooltipMessageStyled as I,
32
+ TextTooltipMessageStyled as T,
33
+ ActionIconButtonSkeletonStyled as a,
34
+ ActionIconButtonStyled as b
35
+ };
@@ -0,0 +1,6 @@
1
+ import { ActionIconButtonProps } from './types';
2
+ import { ActionsGroupValueType } from '../../types';
3
+ /**
4
+ * ActionIconButton component that renders an icon button for an action.
5
+ */
6
+ export declare const ActionIconButton: <T extends ActionsGroupValueType>(props: ActionIconButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,76 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
3
+ import { a as ActionIconButtonSkeletonStyled, b as ActionIconButtonStyled, I as IconTooltipMessageStyled, T as TextTooltipMessageStyled } from "../../slots/ActionsGroupSlots.js";
4
+ import { useEnvironment, useModuleSkeleton } from "@m4l/core";
5
+ import { A as ACTIONS_GROUP_ICONS } from "../../icons.js";
6
+ import { a as actionsGroupStyles } from "../../ActionsGroup.styles.js";
7
+ import { T as Tooltip } from "../../../mui_extended/Tooltip/Tooltip.js";
8
+ const ActionIconButton = (props) => {
9
+ const { action, selected, ownerState, onChange, groupDisabled } = props;
10
+ const { iconUrl: urlIcon, onClick, disabled, label } = action;
11
+ const { host_static_assets, environment_assets } = useEnvironment();
12
+ const isSkeleton = useModuleSkeleton();
13
+ const { currentSize } = useComponentSize();
14
+ const handleClick = () => {
15
+ if (disabled) {
16
+ return;
17
+ }
18
+ onChange?.(action.id);
19
+ onClick?.(action.id);
20
+ };
21
+ if (isSkeleton) {
22
+ return /* @__PURE__ */ jsx(ActionIconButtonSkeletonStyled, { ownerState: { ...ownerState } });
23
+ }
24
+ return /* @__PURE__ */ jsx(
25
+ Tooltip,
26
+ {
27
+ arrow: true,
28
+ PopperProps: {
29
+ modifiers: [
30
+ {
31
+ name: "offset",
32
+ options: {
33
+ offset: [0, 10]
34
+ }
35
+ }
36
+ ]
37
+ },
38
+ slotProps: {
39
+ tooltip: {
40
+ /**
41
+ * Estilos del tooltip.
42
+ */
43
+ sx: (theme) => typeof actionsGroupStyles.tooltip === "function" ? actionsGroupStyles.tooltip({ theme }) : {}
44
+ }
45
+ },
46
+ title: /* @__PURE__ */ jsxs(Fragment, { children: [
47
+ (disabled || groupDisabled) && /* @__PURE__ */ jsx(
48
+ IconTooltipMessageStyled,
49
+ {
50
+ variant: "text",
51
+ size: "small",
52
+ src: `${host_static_assets}/${environment_assets}/${ACTIONS_GROUP_ICONS.blocked}`
53
+ }
54
+ ),
55
+ /* @__PURE__ */ jsx(TextTooltipMessageStyled, { variant: "body", children: label })
56
+ ] }),
57
+ children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
58
+ ActionIconButtonStyled,
59
+ {
60
+ ownerState: { ...ownerState, itemSelected: selected, itemDisabled: disabled },
61
+ size: currentSize,
62
+ src: urlIcon,
63
+ onClick: handleClick,
64
+ disabled: disabled || groupDisabled,
65
+ variant: "text",
66
+ color: selected ? "primary" : "default",
67
+ "aria-label": label,
68
+ "aria-pressed": selected
69
+ }
70
+ ) })
71
+ }
72
+ );
73
+ };
74
+ export {
75
+ ActionIconButton as A
76
+ };
@@ -0,0 +1,7 @@
1
+ import { ActionGroupItem, ActionsGroupOwnerState, ActionsGroupProps, ActionsGroupValueType } from '../../types';
2
+ export interface ActionIconButtonProps<T extends ActionsGroupValueType> extends Pick<ActionsGroupProps<T>, 'onChange'> {
3
+ action: ActionGroupItem<T>;
4
+ ownerState: ActionsGroupOwnerState;
5
+ groupDisabled: boolean;
6
+ selected: boolean;
7
+ }
@@ -0,0 +1,60 @@
1
+ import { M4LOverridesStyleRules } from '../../@types/augmentations';
2
+ import { ActionsGroupSlots } from './slots/ActionsGroupEnum';
3
+ import { ACTIONS_GROUP_KEY_COMPONENT } from './constants';
4
+ import { Theme } from '@mui/material';
5
+ import { Sizes } from '@m4l/styles';
6
+ export type ActionsGroupValueType = string | number | null;
7
+ export interface ActionGroupItem<T extends ActionsGroupValueType> {
8
+ id: T;
9
+ label: string;
10
+ iconUrl: string;
11
+ onClick?: (item: T) => void;
12
+ disabled?: boolean;
13
+ }
14
+ export interface ActionsGroupProps<T extends ActionsGroupValueType> {
15
+ /**
16
+ * Indica si el grupo de acciones está deshabilitado.
17
+ */
18
+ disabled?: boolean;
19
+ /**
20
+ * Clase personalizada para el grupo de acciones.
21
+ */
22
+ className?: string;
23
+ /**
24
+ * Etiqueta accesible para el grupo (role toolbar).
25
+ */
26
+ ariaLabel?: string;
27
+ /**
28
+ * ID de elemento que etiqueta al grupo (alternativa a ariaLabel).
29
+ */
30
+ ariaLabelledBy?: string;
31
+ /**
32
+ * Item seleccionado.
33
+ */
34
+ value: T;
35
+ /**
36
+ * Función que se ejecuta cuando se selecciona una acción.
37
+ */
38
+ onChange: (newValue: T) => void;
39
+ /**
40
+ * Tamaño del grupo de acciones.
41
+ */
42
+ size?: Extract<Sizes, 'small' | 'medium'>;
43
+ /**
44
+ * Lista de acciones para el grupo.
45
+ */
46
+ actions: ActionGroupItem<T>[];
47
+ /**
48
+ * Variante del grupo de acciones.
49
+ */
50
+ variant?: 'vertical' | 'horizontal';
51
+ }
52
+ export type ActionsGroupSlotsType = keyof typeof ActionsGroupSlots;
53
+ export type ActionsGroupOwnerState = {
54
+ size?: Extract<Sizes, 'small' | 'medium'>;
55
+ disabled?: boolean;
56
+ variant?: 'vertical' | 'horizontal';
57
+ itemSelected?: boolean;
58
+ itemDisabled?: boolean;
59
+ };
60
+ export type ActionsGroupStyles = M4LOverridesStyleRules<ActionsGroupSlotsType, typeof ACTIONS_GROUP_KEY_COMPONENT, Theme>;
@@ -30,6 +30,7 @@ function DataGrid(props) {
30
30
  initialRowHeightVariant,
31
31
  checkedRows,
32
32
  onCheckedRowsChange,
33
+ checkedRowsMultiple,
33
34
  dataTestId = "",
34
35
  customHeader: CustomHeader,
35
36
  visibleCustomHeader = true,
@@ -87,6 +88,7 @@ function DataGrid(props) {
87
88
  checkedRows,
88
89
  rowActionsGetter,
89
90
  onCheckedRowsChange,
91
+ checkedRowsMultiple,
90
92
  rowKeyGetter,
91
93
  rows,
92
94
  onChangeUserColumns,