@movable/ui 3.0.0 → 3.1.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.
@@ -0,0 +1,9 @@
1
+ import { GridColDef } from '@mui/x-data-grid-premium';
2
+ /**
3
+ * Creates empty column definitions with skeleton loading placeholders.
4
+ * Used to maintain grid structure while showing loading state.
5
+ *
6
+ * @param columns - The original column definitions to create empty versions of
7
+ * @returns Array of column definitions with skeleton renderCell functions
8
+ */
9
+ export declare function createEmptyColumns(columns: GridColDef[]): GridColDef[];
@@ -0,0 +1,12 @@
1
+ import { DataGridPremiumProps } from '@mui/x-data-grid-premium';
2
+ export interface InkDataGridProps extends DataGridPremiumProps {
3
+ /**
4
+ * Test selector for automated testing
5
+ */
6
+ testSelector?: string;
7
+ }
8
+ /**
9
+ * InkDataGrid is a customized DataGridPremium component with Movable Ink styling and behavior.
10
+ * It provides automatic height adjustment, hidden column separators, and transparent row hover effects.
11
+ */
12
+ export declare function InkDataGrid({ testSelector, sx, rows, ...rest }: InkDataGridProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { GridColDef } from '@mui/x-data-grid-premium';
2
+ export interface InkDataGridEmptyProps {
3
+ /**
4
+ * Test selector for automated testing
5
+ */
6
+ testSelector?: string;
7
+ /**
8
+ * Column definitions to display in the empty state grid
9
+ */
10
+ emptyColumns: GridColDef[];
11
+ }
12
+ /**
13
+ * InkDataGridEmpty displays an empty state grid with skeleton rows.
14
+ * Used to show the grid structure while data is loading.
15
+ */
16
+ export declare function InkDataGridEmpty({ testSelector, emptyColumns, }: InkDataGridEmptyProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { InkDataGrid, type InkDataGridProps } from './InkDataGrid';
2
+ export { InkDataGridEmpty, type InkDataGridEmptyProps, } from './InkDataGridEmpty';
3
+ export { createEmptyColumns } from './CreateEmptyColumns';
@@ -24,3 +24,4 @@ export { InternalUseOnlyLabel, InternalUseOnlyAlert, } from './InternalUseOnlyIn
24
24
  export { InkChart } from './InkChart';
25
25
  export { InkCard } from './InkCard';
26
26
  export { InkGridToolBar } from './InkGridToolBar';
27
+ export { InkDataGrid, InkDataGridEmpty, createEmptyColumns, type InkDataGridProps, type InkDataGridEmptyProps, } from './InkDataGrid';
package/lib/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { CheckboxProps } from '@mui/material';
11
11
  import { CheckboxProps as CheckboxProps_2 } from '@mui/material/Checkbox';
12
12
  import { ChipProps } from '@mui/material';
13
13
  import { CustomContentProps } from 'notistack';
14
+ import { DataGridPremiumProps } from '@mui/x-data-grid-premium';
14
15
  import type { DialogProps } from '@mui/material/Dialog';
15
16
  import { DrawerProps } from '@mui/material/Drawer';
16
17
  import { DrawerProps as DrawerProps_2 } from '@mui/material';
@@ -51,7 +52,8 @@ import { SvgIconTypeMap } from '@mui/material';
51
52
  import { SwitchProps } from '@mui/material/Switch';
52
53
  import { SxProps } from '@mui/material';
53
54
  import { TextFieldProps } from '@mui/material/TextField';
54
- import { Theme } from '@mui/material';
55
+ import { Theme } from '@mui/material/styles';
56
+ import { Theme as Theme_2 } from '@mui/material';
55
57
  import { ToggleButtonGroupProps } from '@mui/material';
56
58
  import { ToggleButtonProps } from '@mui/material';
57
59
  import { TypographyProps } from '@mui/material';
@@ -122,13 +124,22 @@ declare interface CommonDrawerProps extends DrawerProps_2 {
122
124
  isComponentLevelDrawer?: boolean;
123
125
  mainProps?: BoxProps;
124
126
  icon?: JSX.Element | OverridableComponent<SvgIconTypeMap<object, 'svg'>>;
125
- paperSx?: SxProps<Theme> | undefined;
127
+ paperSx?: SxProps<Theme_2> | undefined;
126
128
  }
127
129
 
128
130
  declare type CopiedValue = string | null;
129
131
 
130
132
  declare type CopyFn = (text: string) => Promise<boolean>;
131
133
 
134
+ /**
135
+ * Creates empty column definitions with skeleton loading placeholders.
136
+ * Used to maintain grid structure while showing loading state.
137
+ *
138
+ * @param columns - The original column definitions to create empty versions of
139
+ * @returns Array of column definitions with skeleton renderCell functions
140
+ */
141
+ export declare function createEmptyColumns(columns: GridColDef[]): GridColDef[];
142
+
132
143
  declare const defaultDrawerWidths: {
133
144
  md: number;
134
145
  lg: number;
@@ -364,6 +375,36 @@ declare type InkChipPropType = {
364
375
  truncation?: 'end' | 'middle';
365
376
  };
366
377
 
378
+ /**
379
+ * InkDataGrid is a customized DataGridPremium component with Movable Ink styling and behavior.
380
+ * It provides automatic height adjustment, hidden column separators, and transparent row hover effects.
381
+ */
382
+ export declare function InkDataGrid({ testSelector, sx, rows, ...rest }: InkDataGridProps): JSX_2.Element;
383
+
384
+ /**
385
+ * InkDataGridEmpty displays an empty state grid with skeleton rows.
386
+ * Used to show the grid structure while data is loading.
387
+ */
388
+ export declare function InkDataGridEmpty({ testSelector, emptyColumns, }: InkDataGridEmptyProps): JSX_2.Element;
389
+
390
+ export declare interface InkDataGridEmptyProps {
391
+ /**
392
+ * Test selector for automated testing
393
+ */
394
+ testSelector?: string;
395
+ /**
396
+ * Column definitions to display in the empty state grid
397
+ */
398
+ emptyColumns: GridColDef[];
399
+ }
400
+
401
+ export declare interface InkDataGridProps extends DataGridPremiumProps {
402
+ /**
403
+ * Test selector for automated testing
404
+ */
405
+ testSelector?: string;
406
+ }
407
+
367
408
  export declare function InkDialog({ Title, Content, Actions, onClose, hideCloseButton, ActionsProp, ...props }: InkDialogProps): JSX_2.Element;
368
409
 
369
410
  export declare const inkDialog: InkDialogPageObject;
@@ -409,7 +450,7 @@ declare type InkEmptyStateProps = {
409
450
  action?: ActionType;
410
451
  variant: VariantType;
411
452
  icon?: JSX.Element | OverridableComponent<SvgIconTypeMap<object, 'svg'>>;
412
- sx?: SxProps<Theme>;
453
+ sx?: SxProps<Theme_2>;
413
454
  };
414
455
 
415
456
  export declare function InkFormCheckboxGroup<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, rules, onChange, ...rest }: InkFormCheckboxGroupProps<TFieldValues, TName>): JSX_2.Element;
@@ -467,7 +508,7 @@ declare type InkPageHeaderProps = {
467
508
  ButtonGroup?: JSX.Element;
468
509
  Chips?: JSX.Element;
469
510
  Tabs?: JSX.Element;
470
- sx?: SxProps<Theme>;
511
+ sx?: SxProps<Theme_2>;
471
512
  };
472
513
 
473
514
  export declare function InkPaper({ Header, Description, Icon, CTA, children, shouldShowFullDescription, isLoading, loadingSkeleton, ...props }: InkPaperProps): JSX_2.Element;
@@ -535,7 +576,7 @@ export declare type InkRadioTilesProps = {
535
576
  value: string | number;
536
577
  ref?: Ref<HTMLDivElement>;
537
578
  direction?: 'row' | 'column';
538
- cardSx?: SxProps<Theme>;
579
+ cardSx?: SxProps<Theme_2>;
539
580
  fullWidth?: boolean;
540
581
  disabled?: boolean;
541
582
  };