@m4l/components 9.2.62-JT08072025.beta.1 → 9.2.62-JT09072025.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.
- package/components/DataGrid/Datagrid.styles.js +12 -4
- package/package.json +1 -1
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +4 -0
- package/storybook/components/DataGrid/helpers/types.d.ts +3 -0
- package/storybook/components/DataGrid/helpers/useColumns.d.ts +2 -1
- package/storybook/components/DataGrid/helpers/useSeed.d.ts +1 -1
|
@@ -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"
|
|
@@ -475,16 +477,22 @@ const dataGridStyles = {
|
|
|
475
477
|
},
|
|
476
478
|
'& [role="columnheader"].rdg-cell.rdg-cell-align-left .rdg-header-sort-name': {
|
|
477
479
|
textAlign: "start",
|
|
478
|
-
display: "
|
|
479
|
-
justifyContent: "
|
|
480
|
+
display: "flex",
|
|
481
|
+
justifyContent: "flex-start",
|
|
480
482
|
alignItems: "center"
|
|
481
483
|
},
|
|
482
484
|
'& [role="columnheader"].rdg-cell.rdg-cell-align-center .rdg-header-sort-name': {
|
|
483
485
|
textAlign: "center",
|
|
484
|
-
|
|
486
|
+
display: "flex",
|
|
487
|
+
justifyContent: "center",
|
|
488
|
+
alignItems: "center"
|
|
485
489
|
},
|
|
486
490
|
'& [role="columnheader"].rdg-cell.rdg-cell-align-right .rdg-header-sort-name': {
|
|
487
|
-
textAlign: "right"
|
|
491
|
+
textAlign: "right",
|
|
492
|
+
display: "flex",
|
|
493
|
+
justifyContent: "flex-end",
|
|
494
|
+
alignItems: "center",
|
|
495
|
+
paddingRight: theme.vars.size.baseSpacings.sp3
|
|
488
496
|
},
|
|
489
497
|
// Estilado de la ultima celda congelada
|
|
490
498
|
"& .rdg-row .rdg-cell-frozen-last:after": {
|
package/package.json
CHANGED
|
@@ -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
|
|
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('
|
|
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[];
|