@starasia/admin 4.0.1 → 4.1.0
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/dist/components/AppLayout/index.d.ts +8 -2
- package/dist/components/AsideBar/index.d.ts +4 -1
- package/dist/components/BackButton/index.d.ts +20 -0
- package/dist/components/HeaderLeftSlot/index.d.ts +15 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +781 -686
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,13 @@ interface AppLayoutProps {
|
|
|
19
19
|
};
|
|
20
20
|
isLoadingProfile?: boolean;
|
|
21
21
|
onLogout: () => void;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Slot di sisi kiri header (di samping mobile menu button), untuk konten
|
|
24
|
+
* yang selalu tampil app-wide (mis. version text). Untuk inject ReactNode
|
|
25
|
+
* dari per-page secara dinamis (mis. back button hanya di halaman detail),
|
|
26
|
+
* pakai komponen `<HeaderLeftSlot>` dari `@starasia/admin`.
|
|
27
|
+
*/
|
|
28
|
+
headerLeftSlot?: ReactNode;
|
|
23
29
|
isLoggingOut?: boolean;
|
|
24
30
|
loadingComponent?: ReactNode;
|
|
25
31
|
/**
|
|
@@ -70,5 +76,5 @@ interface AppLayoutProps {
|
|
|
70
76
|
* - Embed mode for iframes
|
|
71
77
|
* - Header actions slot for caller-composed controls (e.g. ModuleSwitcher)
|
|
72
78
|
*/
|
|
73
|
-
export declare function AppLayout({ children,
|
|
79
|
+
export declare function AppLayout({ children, headerLeftSlot, profile, isLoadingProfile, onLogout, isLoggingOut, loadingComponent, sidebarHeaderContent, headerActions, profileRole, profileMenuButtons, profileMenuItems, logoutButton, }: AppLayoutProps): React.JSX.Element;
|
|
74
80
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@starasia/box';
|
|
2
3
|
|
|
3
4
|
type Props = {
|
|
4
5
|
pageLayout: React.ReactNode;
|
|
5
6
|
children?: React.ReactNode;
|
|
7
|
+
wrapperProps?: BoxProps;
|
|
8
|
+
containerProps?: BoxProps;
|
|
6
9
|
};
|
|
7
|
-
export declare const AsideBar: ({ pageLayout, children }: Props) => React.JSX.Element;
|
|
10
|
+
export declare const AsideBar: ({ pageLayout, children, wrapperProps, containerProps }: Props) => React.JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconName } from '@starasia/icon/dist/types';
|
|
3
|
+
|
|
4
|
+
type BackButtonBaseProps = {
|
|
5
|
+
title?: string | ReactNode;
|
|
6
|
+
iconName?: IconName;
|
|
7
|
+
textColor?: string;
|
|
8
|
+
iconColor?: string;
|
|
9
|
+
hoverTextColor?: string;
|
|
10
|
+
hoverIconColor?: string;
|
|
11
|
+
};
|
|
12
|
+
export type BackButtonProps = BackButtonBaseProps & ({
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
navigateTo?: never;
|
|
15
|
+
} | {
|
|
16
|
+
navigateTo: string;
|
|
17
|
+
onClick?: never;
|
|
18
|
+
});
|
|
19
|
+
export declare const BackButton: (props: BackButtonProps) => import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type HeaderLeftSlotMode = "append" | "prepend" | "replace";
|
|
4
|
+
export declare function HeaderLeftSlotProvider({ children }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function HeaderLeftSlotOutlet({ children }: {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export interface HeaderLeftSlotProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
mode?: HeaderLeftSlotMode;
|
|
13
|
+
}
|
|
14
|
+
export declare function HeaderLeftSlot({ children, mode, }: HeaderLeftSlotProps): import('react').ReactPortal | null;
|
|
15
|
+
export {};
|