react-crud-mui 0.2.3 → 0.2.4

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.
@@ -414,6 +414,7 @@ declare function useDetailPageModal<TModel extends FieldValues>({ models, unique
414
414
  readonly footerContent?: import('react').ReactNode;
415
415
  readonly moreContent?: import('react').ReactNode;
416
416
  readonly panels?: import('../../page/components/DefaultPanels').PanelPane[];
417
+ readonly hiddenOnSingleTab?: boolean;
417
418
  readonly commandsPosition?: import('../../page/Page').CommandsPosition;
418
419
  readonly onHeader?: (props: import('../components/DetailPageHeader').DetailPageHeaderProps) => import('react').ReactNode;
419
420
  readonly onLayout?: (props: import('../../page/components/DefaultLayout').PageLayoutProps) => import('react').ReactNode;
@@ -33,6 +33,7 @@ export interface PageProps extends HeaderProps {
33
33
  tabs?: TabPane[];
34
34
  tabsPosition?: TabsPosition;
35
35
  tabExtraContent?: ReactNode;
36
+ hiddenOnSingleTab?: boolean;
36
37
  selectedTabIndex?: number;
37
38
  onTabChanged?: (selected: TabChangedPayload) => void;
38
39
  onTabs?: (props: DefaultTabsProps) => ReactNode;
@@ -40,7 +41,7 @@ export interface PageProps extends HeaderProps {
40
41
  panels?: PanelPane[];
41
42
  }
42
43
  export declare const PagePadding: Record<PaddingSize, number>;
43
- declare function Page({ alertsContent, bordered, centerContent, children, commandsContent, commandsPosition, disabled, footerContent, loading, progressProps, moreContent, morePanelProps, onHeader, onLayout, onTabChanged, onTabs, panels, rightContent, selectedTabIndex, showCommands, showHeader, size, style, sx, tabs, tabExtraContent, tabsPosition, ...headerProps }: PageProps): import("react/jsx-runtime").JSX.Element;
44
+ declare function Page({ alertsContent, bordered, centerContent, children, commandsContent, commandsPosition, disabled, footerContent, loading, progressProps, moreContent, morePanelProps, onHeader, onLayout, onTabChanged, onTabs, panels, rightContent, selectedTabIndex, showCommands, showHeader, size, style, sx, tabs, tabExtraContent, tabsPosition, hiddenOnSingleTab, ...headerProps }: PageProps): import("react/jsx-runtime").JSX.Element;
44
45
  declare namespace Page {
45
46
  var Content: typeof PageContent;
46
47
  var Divider: typeof PageDivider;
@@ -5,15 +5,17 @@ import { TabsProps } from '@mui/material/Tabs';
5
5
  export type TabPane = Omit<TabProps, 'children' | 'key'> & {
6
6
  children?: ReactNode;
7
7
  key: string;
8
+ hidden?: boolean;
8
9
  };
9
10
  export interface DefaultTabsProps extends TabsProps {
10
11
  tabs: TabPane[];
11
12
  extra?: ReactNode;
12
13
  wrapperSx?: SxProps;
14
+ hiddenOnSingleTab?: boolean;
13
15
  }
14
16
  export type TabChangedPayload = {
15
17
  selectedTabIndex: number;
16
18
  selectedTabValue: string;
17
19
  };
18
- declare function DefaultTabs({ tabs, extra, wrapperSx, sx, ...tabsProps }: DefaultTabsProps): import("react/jsx-runtime").JSX.Element;
20
+ declare function DefaultTabs({ tabs, extra, wrapperSx, sx, hiddenOnSingleTab, ...tabsProps }: DefaultTabsProps): import("react/jsx-runtime").JSX.Element | null;
19
21
  export default DefaultTabs;