react-crud-mui 0.2.66 → 0.2.68

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.
@@ -424,11 +424,16 @@ declare function useDetailPageModal<TModel extends FieldValues>({ models, unique
424
424
  readonly size?: import('../../page/components/PageProvider').PaddingSize;
425
425
  readonly icon?: import('react').ReactNode;
426
426
  readonly centerContent?: import('react').ReactNode;
427
- readonly headerProps?: import('@mui/material').BoxProps;
428
427
  readonly helperText?: import('react').ReactNode;
429
428
  readonly moreOptions?: import('../../..').MoreButtonProps["options"];
430
429
  readonly rightContent?: import('react').ReactNode;
431
430
  readonly useHeaderIconWrapper?: boolean;
431
+ readonly styles?: {
432
+ wrapper?: import('../../..').FlexBoxProps["sx"];
433
+ icon?: import('@mui/material').BoxProps["sx"];
434
+ title?: import('@mui/material').BoxProps["sx"];
435
+ helperText?: import('@mui/material').BoxProps["sx"];
436
+ };
432
437
  readonly tabs?: import('../../..').TabPane[];
433
438
  readonly error?: import('../../utils').ServerError;
434
439
  readonly footerContent?: import('react').ReactNode;
@@ -1,17 +1,23 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { BoxProps } from '@mui/material/Box';
3
3
  import { FlexBetween } from '../flexbox';
4
+ import { FlexBoxProps } from '../flexbox/FlexBox';
4
5
  import { MoreButtonProps } from '../more-button/MoreButton';
5
6
  export interface HeaderOwnProps {
6
7
  rightContent?: ReactNode;
7
8
  centerContent?: ReactNode;
8
9
  helperText?: ReactNode;
9
10
  header?: ReactNode;
10
- headerProps?: BoxProps;
11
11
  icon?: ReactNode;
12
12
  moreOptions?: MoreButtonProps['options'];
13
13
  useHeaderIconWrapper?: boolean;
14
+ styles?: {
15
+ wrapper?: FlexBoxProps['sx'];
16
+ icon?: BoxProps['sx'];
17
+ title?: BoxProps['sx'];
18
+ helperText?: BoxProps['sx'];
19
+ };
14
20
  }
15
21
  export type HeaderProps = HeaderOwnProps & React.ComponentProps<typeof FlexBetween>;
16
- declare function Header({ centerContent, children, header, headerProps, helperText, icon, moreOptions, rightContent, useHeaderIconWrapper, ...flexProps }: HeaderProps): import("react/jsx-runtime").JSX.Element;
22
+ declare function Header({ centerContent, children, header, helperText, icon, moreOptions, rightContent, useHeaderIconWrapper, styles, ...flexProps }: HeaderProps): import("react/jsx-runtime").JSX.Element;
17
23
  export default Header;
@@ -51,7 +51,7 @@ export interface ListPageFilterProps<TModel extends FieldValues, TFilter extends
51
51
  * Enable table sorting default true
52
52
  */
53
53
  enableSorting?: boolean;
54
- cardProps?: Pick<CardListProps<TModel>, 'cardColProps' | 'cardRowProps' | 'onCardMeta' | 'emptyTextProps'>;
54
+ cardProps?: Pick<CardListProps<TModel>, 'cardColProps' | 'cardRowProps' | 'onCardMeta' | 'emptyTextProps' | 'cardWrapperProps'>;
55
55
  }
56
56
  /**
57
57
  * ListPage with filtering features
@@ -1,8 +1,12 @@
1
1
  import { AlertProps } from '@mui/material/Alert';
2
2
  import { Message } from '../hooks/useNormalizeMessages';
3
- interface AlertsProps {
3
+ import { default as ErrorAlert } from './ErrorAlert';
4
+ export interface AlertsProps {
4
5
  messages?: Message[];
5
6
  defaultType?: AlertProps['severity'];
6
7
  }
7
8
  declare function Alerts({ messages, defaultType }: AlertsProps): import("react/jsx-runtime").JSX.Element;
9
+ declare namespace Alerts {
10
+ var Error: typeof ErrorAlert;
11
+ }
8
12
  export default Alerts;
@@ -0,0 +1,6 @@
1
+ import { ServerError } from '../../utils';
2
+ interface ErrorAlertProps {
3
+ error?: ServerError;
4
+ }
5
+ declare function ErrorAlert({ error }: ErrorAlertProps): import("react/jsx-runtime").JSX.Element;
6
+ export default ErrorAlert;
@@ -12,7 +12,7 @@ export interface PanelProps extends CardProps, HeaderOwnProps {
12
12
  activeTabKey?: string;
13
13
  onTabChange?: (key: string) => void;
14
14
  }
15
- declare function Panel({ tabs, children, rightContent, centerContent, helperText, header, headerProps, icon, moreOptions, useHeaderIconWrapper, activeTabKey, onTabChange, ...cardProps }: PanelProps): import("react/jsx-runtime").JSX.Element;
15
+ declare function Panel({ tabs, children, rightContent, centerContent, helperText, header, icon, moreOptions, useHeaderIconWrapper, activeTabKey, onTabChange, styles, ...cardProps }: PanelProps): import("react/jsx-runtime").JSX.Element;
16
16
  declare namespace Panel {
17
17
  var Header: typeof import("../..").Header;
18
18
  }