@starasia/admin 5.2.0 → 5.3.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,15 @@
1
+ import { default as React } from 'react';
2
+ import { LayoutDialogHeader } from './components/LayoutDialogHeader';
3
+ import { LayoutDialogBody } from './components/LayoutDialogBody';
4
+ import { LayoutDialogAside } from './components/LayoutDialogAside';
5
+ import { LayoutDialogFooter } from './components/LayoutDialogFooter';
6
+ import { LayoutDialogProps } from './types';
7
+
8
+ type LayoutDialogComponent = React.FC<LayoutDialogProps> & {
9
+ Header: typeof LayoutDialogHeader;
10
+ Body: typeof LayoutDialogBody;
11
+ Aside: typeof LayoutDialogAside;
12
+ Footer: typeof LayoutDialogFooter;
13
+ };
14
+ export declare const LayoutDialog: LayoutDialogComponent;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { LayoutDialogSlotProps } from '../types';
3
+
4
+ export declare function LayoutDialogAside(_props: LayoutDialogSlotProps): React.ReactElement | null;
5
+ export declare namespace LayoutDialogAside {
6
+ var displayName: string;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { LayoutDialogSlotProps } from '../types';
3
+
4
+ export declare function LayoutDialogBody(_props: LayoutDialogSlotProps): React.ReactElement | null;
5
+ export declare namespace LayoutDialogBody {
6
+ var displayName: string;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { LayoutDialogSlotProps } from '../types';
3
+
4
+ export declare function LayoutDialogFooter(_props: LayoutDialogSlotProps): React.ReactElement | null;
5
+ export declare namespace LayoutDialogFooter {
6
+ var displayName: string;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { LayoutDialogSlotProps } from '../types';
3
+
4
+ export declare function LayoutDialogHeader(_props: LayoutDialogSlotProps): React.ReactElement | null;
5
+ export declare namespace LayoutDialogHeader {
6
+ var displayName: string;
7
+ }
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { LayoutDialogViewMode } from '../types';
3
+
4
+ interface Props {
5
+ value: LayoutDialogViewMode;
6
+ onChange: (mode: LayoutDialogViewMode) => void;
7
+ }
8
+ export declare function LayoutDialogViewModeMenu({ value, onChange }: Props): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ export { LayoutDialog } from './LayoutDialog';
2
+ export { LayoutDialogHeader } from './components/LayoutDialogHeader';
3
+ export { LayoutDialogBody } from './components/LayoutDialogBody';
4
+ export { LayoutDialogAside } from './components/LayoutDialogAside';
5
+ export { LayoutDialogFooter } from './components/LayoutDialogFooter';
6
+ export type { LayoutDialogProps, LayoutDialogViewMode, LayoutDialogSize, LayoutDialogSizeKey, LayoutDialogSlotProps, } from './types';
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export type LayoutDialogViewMode = "modal" | "fullscreen" | "sidebar";
4
+ export type LayoutDialogSizeKey = "md" | "lg" | "xl" | "2xl";
5
+ export type LayoutDialogSize = LayoutDialogSizeKey | (string & {});
6
+ export declare const LAYOUT_DIALOG_SIZE_MAP: Record<LayoutDialogSizeKey, string>;
7
+ export interface LayoutDialogProps {
8
+ isOpen: boolean;
9
+ onClose: () => void;
10
+ /** Controlled view mode. Pair with `onViewModeChange`. */
11
+ viewMode?: LayoutDialogViewMode;
12
+ /** Initial view mode when uncontrolled. Default: "modal". */
13
+ defaultViewMode?: LayoutDialogViewMode;
14
+ onViewModeChange?: (mode: LayoutDialogViewMode) => void;
15
+ /** Show the view-mode toggle in the header. Default: true. */
16
+ showViewModeToggle?: boolean;
17
+ /** Show the close (X) button in the header. Default: true. */
18
+ showCloseButton?: boolean;
19
+ /** Max width for `modal` and `sidebar` view modes. Accepts size key ('md'|'lg'|'xl'|'2xl') or any CSS length. Default: 'xl'. */
20
+ size?: LayoutDialogSize;
21
+ /** Disable closing via the Escape key. */
22
+ disableEscapeClose?: boolean;
23
+ /** Disable closing via backdrop click. */
24
+ disableBackdropClose?: boolean;
25
+ /** Lock page scroll while the dialog is open. Default: true. */
26
+ lockBodyScroll?: boolean;
27
+ children: ReactNode;
28
+ }
29
+ export interface LayoutDialogSlotProps {
30
+ children: ReactNode;
31
+ }
@@ -6,7 +6,6 @@ export * from './SidebarHeaderSlot';
6
6
  export * from './ModuleSwitcherModal';
7
7
  export * from './ModuleSwitcher';
8
8
  export * from './HorizontalField';
9
- export * from './ModalDialog';
10
9
  export * from './PageLayout';
11
10
  export * from './Pressable';
12
11
  export * from './RightDrawer';
@@ -28,3 +27,4 @@ export * from './PageState';
28
27
  export * from './Dialog';
29
28
  export * from './FullSection';
30
29
  export * from './SelectButton';
30
+ export * from './LayoutDialog';