@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
@@ -317,7 +317,14 @@ const dataGridStyles = {
317
317
  },
318
318
  '& [role="columnheader"]': {
319
319
  paddingTop: theme.vars.size.baseSpacings.sp2,
320
- paddingBottom: theme.vars.size.baseSpacings.sp2
320
+ paddingBottom: theme.vars.size.baseSpacings.sp2,
321
+ "& .MuiInputBase-input": {
322
+ ...getTypographyStyles(
323
+ theme.generalSettings.isMobile,
324
+ ownerState?.size || "medium",
325
+ "body"
326
+ )
327
+ }
321
328
  },
322
329
  '& [role="grid"]': {
323
330
  '& [aria-rowindex="1"].rdg-row .rdg-cell:last-child': {
@@ -424,6 +431,10 @@ const dataGridStyles = {
424
431
  borderColor: `${theme.vars.palette?.border.disabled} !important`,
425
432
  ...theme.colorSchemes.finalTheme.typography.body
426
433
  },
434
+ "&:has(> .M4LRadioButton-root)": {
435
+ overflow: "visible",
436
+ paddingInline: 0
437
+ },
427
438
  "&.rdg-cell-frozen": {
428
439
  display: "flex",
429
440
  boxShadow: "unset",
@@ -734,7 +745,10 @@ const dataGridStyles = {
734
745
  */
735
746
  cardsContainer: () => ({
736
747
  height: "auto",
737
- overflow: "auto"
748
+ overflow: "auto",
749
+ "& > .M4LContainerFlow-root": {
750
+ alignItems: "start"
751
+ }
738
752
  }),
739
753
  /**
740
754
  * Card de la vista cards
@@ -746,6 +760,8 @@ const dataGridStyles = {
746
760
  minWidth: "280px",
747
761
  maxWidth: "580px",
748
762
  cursor: "pointer",
763
+ padding: theme.vars.size.baseSpacings["sp2-5"],
764
+ gap: "0 !important",
749
765
  // Si está checked (pero no selected), border de checked
750
766
  ...ownerState?.checked && !ownerState?.selected && {
751
767
  borderColor: theme.vars.palette.primary.activeOpacity
@@ -786,7 +802,7 @@ const dataGridStyles = {
786
802
  cardHeaderRight: ({ theme }) => ({
787
803
  display: "flex",
788
804
  alignItems: "center",
789
- gap: theme.vars.size.baseSpacings.sp1
805
+ gap: theme.vars.size.baseSpacings["sp0-5"]
790
806
  }),
791
807
  /**
792
808
  * Contenido de la card (body)
@@ -155,6 +155,7 @@ function DataGridProvider(props) {
155
155
  initialRowHeightVariant = "standard",
156
156
  checkedRows,
157
157
  onCheckedRowsChange,
158
+ checkedRowsMultiple,
158
159
  rowKeyGetter,
159
160
  onChangeUserColumns,
160
161
  externalSortSettings: sortSettings,
@@ -530,6 +531,7 @@ function DataGridProvider(props) {
530
531
  rowActionsGetter,
531
532
  setRowHeightVariant: setCurrentRowHeightInternal,
532
533
  onCheckedRowsChange,
534
+ checkedRowsMultiple,
533
535
  rowKeyGetter,
534
536
  onChangeUserColumns,
535
537
  sortColumns,
@@ -79,7 +79,7 @@ export interface IGridConfig {
79
79
  export interface IGridConfigExtended extends IGridConfig {
80
80
  columnsConfigCards?: BaseConfigColumnCards[];
81
81
  }
82
- export interface DataGridProviderProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<GridProps<TRow, TSummaryRow, TKey>, 'rows' | 'columns' | 'rowActionsGetter' | 'rowHeaderHeights' | 'rowHeights' | 'initialRowHeightVariant' | 'checkedRows' | 'onCheckedRowsChange' | 'rowKeyGetter' | 'onChangeUserColumns' | 'defaultUserColumns' | 'externalSortSettings' | 'externalFilterSettings' | 'defaultViewMode' | 'cardsViewConfig'> {
82
+ export interface DataGridProviderProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<GridProps<TRow, TSummaryRow, TKey>, 'rows' | 'columns' | 'rowActionsGetter' | 'rowHeaderHeights' | 'rowHeights' | 'initialRowHeightVariant' | 'checkedRows' | 'onCheckedRowsChange' | 'checkedRowsMultiple' | 'rowKeyGetter' | 'onChangeUserColumns' | 'defaultUserColumns' | 'externalSortSettings' | 'externalFilterSettings' | 'defaultViewMode' | 'cardsViewConfig'> {
83
83
  id: number | string;
84
84
  children: ReactNode;
85
85
  rowsCount: number;
@@ -92,7 +92,7 @@ export type RowHeightState = {
92
92
  rowHeight: number;
93
93
  rowHeaderHeight: number;
94
94
  };
95
- export interface DataGridContextProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<DataGridProviderProps<TRow, TSummaryRow, TKey>, 'rows' | 'checkedRows' | 'onCheckedRowsChange' | 'rowHeights' | 'rowsCount' | 'rowActionsGetter' | 'rowKeyGetter' | 'onChangeUserColumns' | 'externalSortSettings' | 'externalFilterSettings' | 'viewMode' | 'onViewModeChange' | 'defaultViewMode' | 'cardsViewConfig'> {
95
+ export interface DataGridContextProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Pick<DataGridProviderProps<TRow, TSummaryRow, TKey>, 'rows' | 'checkedRows' | 'onCheckedRowsChange' | 'checkedRowsMultiple' | 'rowHeights' | 'rowsCount' | 'rowActionsGetter' | 'rowKeyGetter' | 'onChangeUserColumns' | 'externalSortSettings' | 'externalFilterSettings' | 'viewMode' | 'onViewModeChange' | 'defaultViewMode' | 'cardsViewConfig'> {
96
96
  getConfigColumns: (viewMode: ViewMode) => IViewConfig[];
97
97
  onChangeColumnsConfig: (viewMode: ViewMode, config: IViewConfig[]) => void;
98
98
  onChangeColumnsOrder: (viewMode: ViewMode, sourceKey: string, targetKey: string) => void;
@@ -15,7 +15,7 @@ function CardHeader({
15
15
  checkedRows,
16
16
  onCheckedRowsChange
17
17
  }) {
18
- const { rowKeyGetter, rowActionsGetter, size } = useDataGrid();
18
+ const { rowKeyGetter, rowActionsGetter, size, checkedRowsMultiple } = useDataGrid();
19
19
  const { host_static_assets, environment_assets } = useEnvironment();
20
20
  const rowKey = useMemo(() => rowKeyGetter(row), [rowKeyGetter, row]);
21
21
  const onChange = useCallback(
@@ -23,15 +23,23 @@ function CardHeader({
23
23
  if (!onCheckedRowsChange || !checkedRows) {
24
24
  return;
25
25
  }
26
- const newCheckedRows = new Set(checkedRows);
27
- if (checked) {
28
- newCheckedRows.add(rowKey);
26
+ if (checkedRowsMultiple === false) {
27
+ if (checked) {
28
+ onCheckedRowsChange(/* @__PURE__ */ new Set([rowKey]));
29
+ } else {
30
+ onCheckedRowsChange(/* @__PURE__ */ new Set());
31
+ }
29
32
  } else {
30
- newCheckedRows.delete(rowKey);
33
+ const newCheckedRows = new Set(checkedRows);
34
+ if (checked) {
35
+ newCheckedRows.add(rowKey);
36
+ } else {
37
+ newCheckedRows.delete(rowKey);
38
+ }
39
+ onCheckedRowsChange(newCheckedRows);
31
40
  }
32
- onCheckedRowsChange(newCheckedRows);
33
41
  },
34
- [checkedRows, onCheckedRowsChange, rowKey]
42
+ [checkedRows, onCheckedRowsChange, rowKey, checkedRowsMultiple]
35
43
  );
36
44
  const anchorOrigin = useMemo(
37
45
  () => ({
@@ -2,6 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useContext } from "react";
3
3
  import { SelectCellFormatter } from "react-data-grid";
4
4
  import { C as CheckboxFormatter } from "../Table/subcomponents/CheckboxFormatter.js";
5
+ import { R as RadioButtonFormatter } from "../Table/subcomponents/RadioButtonFormatter.js";
5
6
  import { a as DataGridContext } from "../../contexts/DataGridContext/index.js";
6
7
  import { l as CheckboxCellWrapperStyled } from "../../slots/DataGridSlot.js";
7
8
  const CheckboxCellAdapter = forwardRef(function CheckboxCellAdapter2(props, ref) {
@@ -14,12 +15,14 @@ const CheckboxCellAdapter = forwardRef(function CheckboxCellAdapter2(props, ref)
14
15
  } = props;
15
16
  const context = useContext(DataGridContext);
16
17
  const viewMode = context?.viewMode ?? "cards";
18
+ const checkedRowsMultiple = context?.checkedRowsMultiple;
17
19
  if (viewMode !== "table") {
18
20
  const handleClick = (e) => {
19
21
  e.stopPropagation();
20
22
  };
23
+ const FormatterComponent = checkedRowsMultiple === false ? RadioButtonFormatter : CheckboxFormatter;
21
24
  return /* @__PURE__ */ jsx(CheckboxCellWrapperStyled, { onClick: handleClick, children: /* @__PURE__ */ jsx(
22
- CheckboxFormatter,
25
+ FormatterComponent,
23
26
  {
24
27
  ref,
25
28
  checked: value,
@@ -1,7 +1,6 @@
1
1
  import { jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { useEnvironment, useModuleDictionary } from "@m4l/core";
4
- import { useTheme } from "@mui/material";
5
4
  import { M as MenuActions } from "../../../../../MenuActions/MenuActions.js";
6
5
  import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
7
6
  import { p as pathIcons } from "../../../../icons.js";
@@ -45,7 +44,6 @@ function Density() {
45
44
  environment_assets,
46
45
  getLabel
47
46
  ]);
48
- const theme = useTheme();
49
47
  const currenViewIcon = useMemo(() => {
50
48
  if (currentRowHeightVariant === "compact") {
51
49
  return `${host_static_assets}/${environment_assets}/${pathIcons.compact}`;
@@ -62,7 +60,6 @@ function Density() {
62
60
  MenuActions,
63
61
  {
64
62
  arrowType: "right-top",
65
- menuActionSx: theme.components?.M4LDataGridDensityPopover?.styleOverrides,
66
63
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
67
64
  transformOrigin: { vertical: "top", horizontal: "left" },
68
65
  menuActions,
@@ -2,6 +2,7 @@ import { useState, useEffect, useMemo } from "react";
2
2
  import { g as getDragHeaderRenderer } from "./getDragHeaderRenderer.js";
3
3
  import { A as ActionsColumn } from "../subcomponents/ActionsColumn.js";
4
4
  import { f as filterColumnClassName, S as SelectColumn } from "../subcomponents/SelectColumn.js";
5
+ import { R as RadioSelectColumn } from "../subcomponents/RadioSelectColumn.js";
5
6
  import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
6
7
  import { u as useFilters } from "../../../hooks/useFilters.js";
7
8
  import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
@@ -38,7 +39,7 @@ function getComparator(columns, sortColumn) {
38
39
  }
39
40
  }
40
41
  const getColumIndex = (key, columnsConfig) => columnsConfig.findIndex((columnConfig) => columnConfig.key === key);
41
- const getInOrderColumns = (columns, hasCheckedRows, columnsConfig, columnsWidths, rowActionsGetter) => {
42
+ const getInOrderColumns = (columns, hasCheckedRows, checkedRowsMultiple, columnsConfig, columnsWidths, rowActionsGetter) => {
42
43
  let filteredSortedColumns = columns.filter((column) => {
43
44
  const columnConfigIndex = getColumIndex(column.key, columnsConfig);
44
45
  const visible = columnConfigIndex > -1 ? columnsConfig[columnConfigIndex].visible : true;
@@ -64,7 +65,8 @@ const getInOrderColumns = (columns, hasCheckedRows, columnsConfig, columnsWidths
64
65
  filteredSortedColumns = [ActionsColumn, ...filteredSortedColumns];
65
66
  }
66
67
  if (hasCheckedRows) {
67
- filteredSortedColumns = [SelectColumn, ...filteredSortedColumns];
68
+ const selectionColumn = checkedRowsMultiple === false ? RadioSelectColumn : SelectColumn;
69
+ filteredSortedColumns = [selectionColumn, ...filteredSortedColumns];
68
70
  }
69
71
  return filteredSortedColumns;
70
72
  };
@@ -89,6 +91,7 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
89
91
  rowActionsGetter,
90
92
  checkedRows,
91
93
  onCheckedRowsChange,
94
+ checkedRowsMultiple,
92
95
  sortColumns,
93
96
  setSortColumns
94
97
  } = useDataGrid();
@@ -109,6 +112,7 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
109
112
  sourceColumns,
110
113
  !!checkedRows && !!onCheckedRowsChange,
111
114
  //Si están seteados se habilita el múltipe
115
+ checkedRowsMultiple,
112
116
  columnsConfig,
113
117
  columnsWidths,
114
118
  rowActionsGetter
@@ -1,11 +1,9 @@
1
1
  import { jsx, Fragment } from "react/jsx-runtime";
2
2
  import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
3
- import { useTheme } from "@mui/material";
4
3
  import { f as DATAGRID_SEMANTIC_WIDTHS, e as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../constants.js";
5
4
  import { M as MenuActions } from "../../../../MenuActions/MenuActions.js";
6
5
  function ActionsFormatter(props) {
7
6
  const { rowActionsGetter } = useDataGrid();
8
- const theme = useTheme();
9
7
  if (rowActionsGetter === void 0) {
10
8
  return /* @__PURE__ */ jsx(Fragment, {});
11
9
  }
@@ -15,7 +13,6 @@ function ActionsFormatter(props) {
15
13
  arrowType: "top-left",
16
14
  objItem: props.row,
17
15
  menuActions: rowActionsGetter,
18
- menuActionSx: theme.components?.M4LDataGridActionsFormatter?.styleOverrides,
19
16
  marginTop: 1,
20
17
  marginLeft: "-11px",
21
18
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
@@ -0,0 +1,6 @@
1
+ import { RenderCheckboxProps } from 'react-data-grid';
2
+ /**
3
+ * Componente visual del RadioButton que se renderiza dentro de cada celda del DataGrid.
4
+ * ¿Para que sirve? Es un wrapper alrededor del componente Radio del MUI que adapta las props de react-data-grid
5
+ */
6
+ export declare const RadioButtonFormatter: import('react').ForwardRefExoticComponent<RenderCheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { R as RadioButton } from "../../../../mui_extended/RadioButton/RadioButton.js";
4
+ const RadioButtonFormatter = forwardRef(function RadioFormatter({ onChange, checked, ...props }, _ref) {
5
+ function handleChange(e) {
6
+ onChange(e.target.checked, e.nativeEvent.shiftKey);
7
+ }
8
+ return /* @__PURE__ */ jsx(RadioButton, { checked, onChange: handleChange, ...props });
9
+ });
10
+ export {
11
+ RadioButtonFormatter as R
12
+ };
@@ -0,0 +1,64 @@
1
+ import { Column, RenderCellProps, RenderGroupCellProps, RenderHeaderCellProps } from 'react-data-grid';
2
+ export declare const filterColumnClassName = "filter-cell";
3
+ export declare const filterHeight = 35;
4
+ /**
5
+ * Formateador para la celda de selección con radio button en filas agrupadas.
6
+ *
7
+ * **Nota:** Para radio buttons (selección única), no tiene sentido seleccionar grupos completos,
8
+ * por lo que este formateador retorna `null` y no renderiza ningún control.
9
+ * @param _props - Propiedades para renderizar la celda de grupo (no utilizadas).
10
+ * @returns `null` - No se renderiza ningún control de selección en grupos.
11
+ * @example
12
+ * // En un DataGrid con grupos, las filas de grupo no tendrán radio button
13
+ * // Solo las filas individuales tendrán radio buttons
14
+ */
15
+ export declare function RadioSelectGroupFormatter(_props: RenderGroupCellProps<unknown>): null;
16
+ /**
17
+ * Formateador para la celda de selección con radio button en filas individuales.
18
+ *
19
+ * Este componente maneja la lógica de **selección única**: cuando el usuario hace click
20
+ * en un radio button, se REEMPLAZA completamente la selección anterior con solo la fila actual.
21
+ *
22
+ * **Comportamiento:**
23
+ * - Si `checked` es `true`: El Set de `checkedRows` se reemplaza con `[rowKey actual]`
24
+ * - Si `checked` es `false`: El Set de `checkedRows` se vacía (deselección)
25
+ * @param props - Propiedades para renderizar la celda, incluyendo la fila actual.
26
+ * @returns Un componente `SelectCellFormatter` configurado como radio button.
27
+ * @example
28
+ * // Cuando el usuario hace click en el radio de la fila con ID=5:
29
+ * // checkedRows antes: Set([3])
30
+ * // checkedRows después: Set([5]) ← Reemplaza, no agrega
31
+ */
32
+ export declare function RadioSelectFormatter(props: RenderCellProps<any, any>): import("react/jsx-runtime").JSX.Element;
33
+ /**
34
+ * Renderizador para la celda de cabecera (header) de la columna de selección con radio buttons.
35
+ *
36
+ * **Nota:** A diferencia de los checkboxes, los radio buttons NO tienen funcionalidad de
37
+ * "Seleccionar Todo", ya que solo se puede seleccionar una fila a la vez. Por lo tanto,
38
+ * este renderizador retorna `null` y no muestra ningún control en el header.
39
+ * @param _props - Propiedades para renderizar la celda de cabecera (no utilizadas).
40
+ * @returns `null` - No se renderiza ningún control en la cabecera.
41
+ * @example
42
+ * // La cabecera de la columna estará vacía (sin checkbox "Select All")
43
+ */
44
+ export declare function RadioSelectColumnHeaderRenderer(_props: RenderHeaderCellProps<any, any>): null;
45
+ /**
46
+ * Definición de la columna de selección con radio buttons para el DataGrid.
47
+ *
48
+ * Esta columna permite **selección única** de filas mediante radio buttons.
49
+ *
50
+ * **Características:**
51
+ * - **Ancho fijo:** 32px (igual que la columna de checkboxes)
52
+ * - **No redimensionable:** `resizable: false`
53
+ * - **No draggable:** `isDraggable: false`
54
+ * - **No sortable:** `sortable: false`
55
+ * - **Congelada:** `frozen: true` (siempre visible al hacer scroll horizontal)
56
+ * - **Header vacío:** No tiene control "Select All"
57
+ * - **Selección única:** Solo una fila puede estar seleccionada a la vez
58
+ * @example
59
+ * // En useSortColumnsRows.tsx:
60
+ * const selectionColumn = checkedRowsMultiple === false
61
+ * ? RadioSelectColumn // ← Selección única con radio buttons
62
+ * : SelectColumn; // ← Selección múltiple con checkboxes
63
+ */
64
+ export declare const RadioSelectColumn: Column<any, any>;
@@ -0,0 +1,46 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
3
+ import { d as DATAGRID_SELECT_COLUMN_KEY } from "../../../constants.js";
4
+ import { R as RadioButtonFormatter } from "./RadioButtonFormatter.js";
5
+ function RadioSelectGroupFormatter(_props) {
6
+ return null;
7
+ }
8
+ function RadioSelectFormatter(props) {
9
+ const { checkedRows, onCheckedRowsChange, rowKeyGetter } = useDataGrid();
10
+ const onChange = (checked, _isShiftClick) => {
11
+ if (checked) {
12
+ onCheckedRowsChange && onCheckedRowsChange(/* @__PURE__ */ new Set([rowKeyGetter(props.row)]));
13
+ } else {
14
+ onCheckedRowsChange && onCheckedRowsChange(/* @__PURE__ */ new Set());
15
+ }
16
+ };
17
+ return /* @__PURE__ */ jsx(
18
+ RadioButtonFormatter,
19
+ {
20
+ checked: checkedRows?.has(rowKeyGetter(props.row)) || false,
21
+ tabIndex: props.tabIndex,
22
+ onChange,
23
+ "aria-label": "Select"
24
+ }
25
+ );
26
+ }
27
+ function RadioSelectColumnHeaderRenderer(_props) {
28
+ return null;
29
+ }
30
+ const RadioSelectColumn = {
31
+ key: DATAGRID_SELECT_COLUMN_KEY,
32
+ name: "",
33
+ width: 32,
34
+ minWidth: 32,
35
+ isDraggable: false,
36
+ resizable: false,
37
+ sortable: false,
38
+ frozen: true,
39
+ type: "boolean",
40
+ renderHeaderCell: RadioSelectColumnHeaderRenderer,
41
+ renderCell: RadioSelectFormatter,
42
+ renderGroupCell: RadioSelectGroupFormatter
43
+ };
44
+ export {
45
+ RadioSelectColumn as R
46
+ };
@@ -137,6 +137,13 @@ export interface GridProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> exte
137
137
  onSelectedRowsChange?: (mapRowsSelected: ReadonlySet<TKey>) => void;
138
138
  checkedRows?: ReadonlySet<TKey>;
139
139
  onCheckedRowsChange?: (mapRowsSelected: ReadonlySet<TKey>) => void;
140
+ /**
141
+ * Define si la selección de filas es múltiple (checkboxes) o única (radio buttons).
142
+ *
143
+ * - `true` (default): Permite seleccionar múltiples filas con checkboxes
144
+ * - `false`: Permite seleccionar solo una fila con radio buttons
145
+ */
146
+ checkedRowsMultiple?: boolean;
140
147
  onRowsChange?: Maybe<(rows: TRow[], data: RowsChangeData<TRow, TSummaryRow>) => void>;
141
148
  /**
142
149
  * Propiedad opcional que recibe la configuración de las columnas
@@ -227,7 +227,8 @@ const dynamicFilterStyles = {
227
227
  flexDirection: "column",
228
228
  padding: theme.vars.size.baseSpacings.sp3,
229
229
  gap: theme.vars.size.baseSpacings.sp1,
230
- borderRadius: theme.vars.size.borderRadius.r1
230
+ borderRadius: theme.vars.size.borderRadius.r1,
231
+ backgroundColor: theme.vars.palette.background.default
231
232
  }
232
233
  }),
233
234
  /**
@@ -241,6 +242,7 @@ const dynamicFilterStyles = {
241
242
  minWidth: "220px",
242
243
  maxWidth: "100%",
243
244
  minHeight: "auto",
245
+ backgroundColor: theme.vars.palette.background.default,
244
246
  boxShadow: theme.customShadows?.z3,
245
247
  "& .M4LPopover-arrowStyle": {
246
248
  display: "none"
@@ -250,7 +252,8 @@ const dynamicFilterStyles = {
250
252
  width: "max-content",
251
253
  minWidth: "220px",
252
254
  maxWidth: "420px",
253
- height: "fit-content"
255
+ height: "fit-content",
256
+ overflow: "visible"
254
257
  },
255
258
  "& .M4LWindowBase-root": {
256
259
  borderRadius: `${theme.vars.size.borderRadius.r3}!important`,
@@ -227,7 +227,8 @@ const dynamicSortStyles = {
227
227
  flexDirection: "column",
228
228
  padding: theme.vars.size.baseSpacings.sp3,
229
229
  gap: theme.vars.size.baseSpacings.sp1,
230
- borderRadius: theme.vars.size.borderRadius.r1
230
+ borderRadius: theme.vars.size.borderRadius.r1,
231
+ backgroundColor: theme.vars.palette.background.default
231
232
  }
232
233
  }),
233
234
  /**
@@ -241,6 +242,7 @@ const dynamicSortStyles = {
241
242
  maxWidth: "100%",
242
243
  minHeight: "auto",
243
244
  borderRadius: `${theme.vars.size.borderRadius.r3}!important`,
245
+ backgroundColor: theme.vars.palette.background.default,
244
246
  boxShadow: theme.customShadows?.z3,
245
247
  "& .M4LPopover-arrowStyle": {
246
248
  display: "none"
@@ -250,7 +252,8 @@ const dynamicSortStyles = {
250
252
  width: "max-content",
251
253
  minWidth: "220px",
252
254
  maxWidth: "420px",
253
- height: "fit-content"
255
+ height: "fit-content",
256
+ overflow: "visible"
254
257
  },
255
258
  "& .M4LWindowBase-root": {
256
259
  borderRadius: `${theme.vars.size.borderRadius.r3} !important`,
@@ -67,7 +67,6 @@ const GridLayoutRoot = styled("div")`
67
67
  display: none;
68
68
  }
69
69
  ${react_resizable_css}
70
- ${(props) => props.theme.components?.M4LGridLayout?.styleOverrides}
71
70
  `;
72
71
  export {
73
72
  GridLayoutRoot as G
@@ -1,2 +1,2 @@
1
1
  export { Label } from './Label';
2
- export type { LabelProps } from './types';
2
+ export type { LabelProps, LabelPropsBase } from './types';
@@ -5,6 +5,12 @@ import { LABEL_KEY_COMPONENT } from './constants';
5
5
  import { Sizes } from '@m4l/styles';
6
6
  import { TypographyProps } from '../mui_extended/Typography/types';
7
7
  export type LabelVariants = 'standard';
8
+ /**
9
+ * Base props for Label component, excluding control and layout properties.
10
+ * This type is commonly used as a base for form field components that need
11
+ * Label's content and configuration props but manage their own control/layout.
12
+ */
13
+ export type LabelPropsBase = Omit<LabelProps, 'children' | 'disabled' | 'size' | 'className' | 'error'>;
8
14
  export interface LabelProps extends Pick<TypographyProps, 'skeletonWidth'> {
9
15
  /**
10
16
  * Mensaje de ayuda para el campo. Si es un string, muestra un icono de ayuda
@@ -35,10 +35,19 @@ const languagePopoverStyles = {
35
35
  * Estilos del paper
36
36
  */
37
37
  paper: ({ theme }) => ({
38
- position: "absolute",
39
- marginTop: theme.vars.size.baseSpacings.sp1,
40
- "& .MuiTypography-root": {
41
- cursor: "pointer"
38
+ "&&&": {
39
+ position: "absolute",
40
+ marginTop: theme.vars.size.baseSpacings.sp1,
41
+ backgroundColor: theme.vars.palette.background.default,
42
+ borderRadius: theme.vars.size.borderRadius.r2,
43
+ boxShadow: theme.vars.customShadows.z4,
44
+ padding: theme.vars.size.baseSpacings.sp3,
45
+ "& .MuiList-root": {
46
+ padding: "unset"
47
+ },
48
+ "& .MuiTypography-root": {
49
+ cursor: "pointer"
50
+ }
42
51
  }
43
52
  })
44
53
  };
@@ -15,7 +15,6 @@ const MFLoaderRoot = styled("div")(() => ({
15
15
  "& .MuiLinearProgress-root": {
16
16
  width: "100%"
17
17
  }
18
- // ...theme.components?.M4LMFLoader?.styleOverrides || {},
19
18
  }));
20
19
  export {
21
20
  MFLoaderRoot as M
@@ -9,8 +9,15 @@ const modalDialogStyles = {
9
9
  position: "absolute",
10
10
  background: "transparent"
11
11
  }),
12
+ /**
13
+ * Dialog Root style
14
+ */
12
15
  dialogRoot: ({ theme }) => ({
13
- padding: theme.vars.size.baseSpacings["sp2-5"]
16
+ padding: theme.vars.size.baseSpacings["sp2-5"],
17
+ "& .MuiBackdrop-root": {
18
+ backdropFilter: "blur(7px)",
19
+ backgroundColor: theme.vars.palette.background.backdrop
20
+ }
14
21
  })
15
22
  };
16
23
  export {
@@ -9,6 +9,7 @@ import { P as PRINTING_SYSTEM_KEY_COMPONENT } from "./constants.js";
9
9
  import { P as PrintingSystemSlots } from "./slots/PrintingSystemEnum.js";
10
10
  import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
11
11
  import clsx from "clsx";
12
+ import { p as printingSystemStyles } from "./PrintingSystem.styles.js";
12
13
  const PrintingSystem = forwardRef((props, ref) => {
13
14
  const { templateData: nodeRoot, sourceData, size = "medium", variant = "body", className, dataTestId } = props;
14
15
  const theme = useTheme();
@@ -29,7 +30,8 @@ const PrintingSystem = forwardRef((props, ref) => {
29
30
  );
30
31
  printDocument.body.appendChild(content.cloneNode(true));
31
32
  const styleElement = printDocument.createElement("style");
32
- styleElement.textContent = `${theme.components?.M4LPrintingSystem?.styleOverrides}`;
33
+ const rootStyles = printingSystemStyles.root && typeof printingSystemStyles.root === "function" ? printingSystemStyles.root({ theme }) : null;
34
+ styleElement.textContent = rootStyles ? String(rootStyles) : "";
33
35
  printDocument.head.appendChild(styleElement);
34
36
  printDocument.close();
35
37
  printWindow.print();