@m4l/components 9.2.62-JT08072025.beta.1 → 9.2.62-JT09072025.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.
@@ -406,9 +406,9 @@ const dataGridStyles = {
406
406
  ...theme.colorSchemes.finalTheme.typography.bodyDens,
407
407
  //ajuste de contenido filtro del DataGrid
408
408
  width: "100%",
409
- display: "flex",
410
- justifyContent: "center",
411
- alignItems: "center",
409
+ whiteSpace: "nowrap",
410
+ overflow: "hidden",
411
+ textOverflow: "ellipsis",
412
412
  ...getTypographyStyles(
413
413
  theme.generalSettings.isMobile,
414
414
  ownerState?.size || "medium",
@@ -446,6 +446,7 @@ const dataGridStyles = {
446
446
  textAlign: "start",
447
447
  display: "inline",
448
448
  justifyContent: "center",
449
+ alignContent: "center",
449
450
  alignItems: "center",
450
451
  '&:not([role="columnheader"])': {
451
452
  "& > div:first-of-type": {
@@ -466,6 +467,7 @@ const dataGridStyles = {
466
467
  },
467
468
  "& .rdg-cell.rdg-cell-align-right": {
468
469
  textAlign: "right",
470
+ alignContent: "center",
469
471
  '&:not([role="columnheader"])': {
470
472
  "& > div:first-of-type": {
471
473
  marginLeft: "auto"
@@ -474,17 +476,14 @@ const dataGridStyles = {
474
476
  }
475
477
  },
476
478
  '& [role="columnheader"].rdg-cell.rdg-cell-align-left .rdg-header-sort-name': {
477
- textAlign: "start",
478
- display: "inline",
479
- justifyContent: "center",
480
- alignItems: "center"
479
+ textAlign: "start"
481
480
  },
482
481
  '& [role="columnheader"].rdg-cell.rdg-cell-align-center .rdg-header-sort-name': {
483
- textAlign: "center",
484
- alignContent: "center"
482
+ textAlign: "center"
485
483
  },
486
484
  '& [role="columnheader"].rdg-cell.rdg-cell-align-right .rdg-header-sort-name': {
487
- textAlign: "right"
485
+ textAlign: "right",
486
+ paddingRight: theme.vars.size.baseSpacings.sp3
488
487
  },
489
488
  // Estilado de la ultima celda congelada
490
489
  "& .rdg-row .rdg-cell-frozen-last:after": {
@@ -103,7 +103,19 @@ function DraggableHeaderRenderer(props) {
103
103
  if (!newColumn.withinHeaderRenderer) {
104
104
  const columnIcons = getColumnIcons();
105
105
  if (columnIcons) {
106
- newColumn.name = /* @__PURE__ */ jsxs(NameColumnIconStyled, { children: [
106
+ const getJustifyContent = () => {
107
+ switch (column.align) {
108
+ case "left":
109
+ return "flex-start";
110
+ case "center":
111
+ return "center";
112
+ case "right":
113
+ return "flex-end";
114
+ default:
115
+ return "flex-start";
116
+ }
117
+ };
118
+ newColumn.name = /* @__PURE__ */ jsxs(NameColumnIconStyled, { style: { justifyContent: getJustifyContent() }, children: [
107
119
  /* @__PURE__ */ jsx(NameColumnStyled, { children: newColumn.name }),
108
120
  /* @__PURE__ */ jsx(IconColumnStyled, { children: columnIcons })
109
121
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.62-JT08072025.beta.1",
3
+ "version": "9.2.62-JT09072025.beta.2",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {
@@ -23,6 +23,10 @@ export declare const DatagridWithFormatters: Story;
23
23
  * DataGrid con columns with actions
24
24
  */
25
25
  export declare const DatagridWithActions: Story;
26
+ /**
27
+ * DataGrid con columnas con alineación
28
+ */
29
+ export declare const DatagridWithAlign: Story;
26
30
  /**
27
31
  * DataGrid sin pager
28
32
  */
@@ -1,6 +1,7 @@
1
1
  import { HeaderRendererProps } from 'react-data-grid';
2
2
  import { ChipStatusFormatterProps } from '../../../../src/components/formatters/ChipStatusFormatter/types';
3
3
  import { DeepKeyOf } from '../../../../src/utils/types';
4
+ import { ColumnAlign } from '../../../../src/components/DataGrid/types';
4
5
  export interface SeedProps {
5
6
  quantity: number;
6
7
  withBoolean?: boolean;
@@ -20,6 +21,8 @@ export interface SeedProps {
20
21
  withActionsUser?: boolean;
21
22
  withBooleanStatus?: boolean;
22
23
  withUserType?: boolean;
24
+ aligns?: Record<string, ColumnAlign>;
25
+ names?: Record<string, string>;
23
26
  }
24
27
  export type GetColumnsProps = Omit<SeedProps, 'quantity'>;
25
28
  export type ColumnType = 'string' | 'number' | 'boolean' | 'date' | 'custom';
@@ -1,4 +1,5 @@
1
- import { GetColumnsProps, RowType, Column } from './types';
1
+ import { GetColumnsProps, RowType } from './types';
2
+ import { Column } from 'react-data-grid';
2
3
  /**
3
4
  * ****************************************************************
4
5
  * Función que retorna las columnas para el DataGrid de Storybook
@@ -3,7 +3,7 @@ import { SeedProps } from './types';
3
3
  * Función que retorna el seed para el DataGrid de Storybook
4
4
  */
5
5
  export declare const useSeed: (props: SeedProps) => {
6
- columns: readonly import('./types').Column<import('./types').RowType, unknown>[];
6
+ columns: readonly import('react-data-grid').Column<import('./types').RowType, unknown>[];
7
7
  filters: import('../../../../src').FilterField[];
8
8
  sorts: import('../../../../src').SortField[];
9
9
  rows: import('./types').RowType[];