@starasia/admin 7.0.0 → 7.0.2
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/BackButton/index.d.ts +2 -2
- package/dist/components/HeaderLeftSlot/index.d.ts +4 -4
- package/dist/components/ImagePreview/ImagePreview.d.ts +3 -1
- package/dist/components/InputFile/index.d.ts +12 -4
- package/dist/components/Pressable/index.d.ts +1 -1
- package/dist/components/SidebarGroupSlot/index.d.ts +4 -4
- package/dist/components/TableSection/types.d.ts +4 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1700 -1669
- package/dist/index.umd.js +1 -1
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { IconName } from '@starasia/icon/dist/types';
|
|
3
3
|
|
|
4
4
|
type BackButtonBaseProps = {
|
|
@@ -20,5 +20,5 @@ export type BackButtonProps = BackButtonBaseProps & {
|
|
|
20
20
|
items?: BackButtonItem[];
|
|
21
21
|
separator?: ReactNode;
|
|
22
22
|
};
|
|
23
|
-
export declare const BackButton: (props: BackButtonProps) =>
|
|
23
|
+
export declare const BackButton: (props: BackButtonProps) => React.JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
type HeaderLeftSlotMode = "append" | "prepend" | "replace";
|
|
4
4
|
export declare function HeaderLeftSlotProvider({ children }: {
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
}):
|
|
6
|
+
}): React.JSX.Element;
|
|
7
7
|
export declare function HeaderLeftSlotOutlet({ children }: {
|
|
8
8
|
children?: ReactNode;
|
|
9
|
-
}):
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
export interface HeaderLeftSlotProps {
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
mode?: HeaderLeftSlotMode;
|
|
13
13
|
}
|
|
14
|
-
export declare function HeaderLeftSlot({ children, mode, }: HeaderLeftSlotProps):
|
|
14
|
+
export declare function HeaderLeftSlot({ children, mode, }: HeaderLeftSlotProps): React.ReactPortal | null;
|
|
15
15
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
1
3
|
export interface ImagePreviewProps {
|
|
2
4
|
url: string;
|
|
3
5
|
filename: string;
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
}
|
|
6
|
-
export declare function ImagePreview({ url, filename, onClose }: ImagePreviewProps):
|
|
8
|
+
export declare function ImagePreview({ url, filename, onClose }: ImagePreviewProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { ReactNode, default as React } from 'react';
|
|
2
2
|
import { BoxProps } from '@starasia/box';
|
|
3
|
+
import { InputLabelPosition } from '@starasia/input';
|
|
3
4
|
|
|
4
5
|
type TFileSupport = "svg" | "jpg" | "png" | "jpeg" | "pdf" | "doc" | "docx" | "xls" | "xlsx" | "xlsx" | "ppt" | "pptx";
|
|
5
6
|
export interface IInputFilesProps {
|
|
@@ -7,16 +8,23 @@ export interface IInputFilesProps {
|
|
|
7
8
|
handleOnChangeFile: (file: File | null) => void;
|
|
8
9
|
handleOnDeleteFile: () => void;
|
|
9
10
|
fileSelected?: File | null;
|
|
10
|
-
errorMessage?: string;
|
|
11
11
|
isLoading?: boolean;
|
|
12
12
|
defaultFile?: {
|
|
13
13
|
url: string;
|
|
14
14
|
size?: string;
|
|
15
15
|
date?: string;
|
|
16
16
|
};
|
|
17
|
-
required?: boolean;
|
|
18
17
|
status?: "error" | "default";
|
|
19
18
|
containerProps?: BoxProps;
|
|
19
|
+
label?: ReactNode;
|
|
20
|
+
labelPosition?: InputLabelPosition;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
optional?: boolean;
|
|
23
|
+
description?: string;
|
|
24
|
+
helperText?: string;
|
|
25
|
+
errorText?: string;
|
|
26
|
+
/** @deprecated gunakan errorText + status="error" */
|
|
27
|
+
errorMessage?: string;
|
|
20
28
|
}
|
|
21
|
-
export declare const InputFile: ({ status, ...props }: IInputFilesProps) => React.JSX.Element;
|
|
29
|
+
export declare const InputFile: ({ status, labelPosition, ...props }: IInputFilesProps) => React.JSX.Element;
|
|
22
30
|
export {};
|
|
@@ -3,4 +3,4 @@ import { default as React } from 'react';
|
|
|
3
3
|
|
|
4
4
|
export interface PressableProps extends BoxProps {
|
|
5
5
|
}
|
|
6
|
-
export declare const Pressable: React.
|
|
6
|
+
export declare const Pressable: React.ForwardRefExoticComponent<PressableProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
export declare function SidebarGroupSlotProvider({ children }: {
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
}):
|
|
5
|
+
}): React.JSX.Element;
|
|
6
6
|
interface SidebarGroupSlotOutletProps {
|
|
7
7
|
slotKey: string;
|
|
8
8
|
fallback?: ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export declare function SidebarGroupSlotOutlet({ slotKey, fallback }: SidebarGroupSlotOutletProps):
|
|
10
|
+
export declare function SidebarGroupSlotOutlet({ slotKey, fallback }: SidebarGroupSlotOutletProps): React.JSX.Element;
|
|
11
11
|
interface SidebarGroupSlotProps {
|
|
12
12
|
slotKey: string;
|
|
13
13
|
children: ReactNode;
|
|
@@ -20,5 +20,5 @@ interface SidebarGroupSlotProps {
|
|
|
20
20
|
*
|
|
21
21
|
* Must be used inside a component tree rendered within `AppLayout`.
|
|
22
22
|
*/
|
|
23
|
-
export declare function SidebarGroupSlot({ slotKey, children }: SidebarGroupSlotProps):
|
|
23
|
+
export declare function SidebarGroupSlot({ slotKey, children }: SidebarGroupSlotProps): React.ReactPortal | null;
|
|
24
24
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from './AppLayout';
|
|
2
2
|
export * from './BackButton';
|
|
3
|
+
export * from './ModuleSwitcherModal';
|
|
4
|
+
export * from './ModuleSwitcher';
|
|
3
5
|
export * from './HeaderLeftSlot';
|
|
4
6
|
export * from './SidebarGroupSlot';
|
|
5
7
|
export * from './SidebarHeaderSlot';
|
|
6
|
-
export * from './ModuleSwitcherModal';
|
|
7
|
-
export * from './ModuleSwitcher';
|
|
8
8
|
export * from './HorizontalField';
|
|
9
9
|
export * from './PageLayout';
|
|
10
10
|
export * from './Pressable';
|