@starasia/admin 1.0.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.
Files changed (100) hide show
  1. package/dist/components/ActionMenu/components/ButtonDefault.d.ts +6 -0
  2. package/dist/components/ActionMenu/index.d.ts +28 -0
  3. package/dist/components/AdvanceFilter/components/Chip.d.ts +13 -0
  4. package/dist/components/AdvanceFilter/components/Container.d.ts +13 -0
  5. package/dist/components/AdvanceFilter/components/Field.d.ts +34 -0
  6. package/dist/components/AdvanceFilter/components/Form.d.ts +0 -0
  7. package/dist/components/AdvanceFilter/components/Group.d.ts +0 -0
  8. package/dist/components/AdvanceFilter/components/Header.d.ts +11 -0
  9. package/dist/components/AdvanceFilter/components/Toggle.d.ts +7 -0
  10. package/dist/components/AdvanceFilter/hooks.d.ts +48 -0
  11. package/dist/components/AdvanceFilter/index.d.ts +7 -0
  12. package/dist/components/AdvanceFilter/types.d.ts +27 -0
  13. package/dist/components/AdvanceFilter/utils.d.ts +10 -0
  14. package/dist/components/AsideBar/index.d.ts +8 -0
  15. package/dist/components/AuthLayout/index.d.ts +8 -0
  16. package/dist/components/ContentLayout/index.d.ts +10 -0
  17. package/dist/components/DashboardLayout/index.d.ts +33 -0
  18. package/dist/components/DecisionWrapper/index.d.ts +11 -0
  19. package/dist/components/EachUtils/index.d.ts +6 -0
  20. package/dist/components/FloatingFooter/index.d.ts +14 -0
  21. package/dist/components/Form/ToggleStatus.d.ts +20 -0
  22. package/dist/components/Form/components/ActionButton.d.ts +15 -0
  23. package/dist/components/Form/components/CheckBoxOptions.d.ts +27 -0
  24. package/dist/components/Form/components/Custom.d.ts +21 -0
  25. package/dist/components/Form/components/ErrorMessage.d.ts +7 -0
  26. package/dist/components/Form/components/FormTitle.d.ts +7 -0
  27. package/dist/components/Form/components/InputDate.d.ts +22 -0
  28. package/dist/components/Form/components/InputDropdown.d.ts +24 -0
  29. package/dist/components/Form/components/InputImgFile.d.ts +21 -0
  30. package/dist/components/Form/components/InputSingleFile.d.ts +20 -0
  31. package/dist/components/Form/components/InputText.d.ts +23 -0
  32. package/dist/components/Form/components/InputTextArea.d.ts +21 -0
  33. package/dist/components/Form/components/RadioOptions.d.ts +28 -0
  34. package/dist/components/Form/components/TextFormLabel.d.ts +7 -0
  35. package/dist/components/Form/components/ToggleForm.d.ts +22 -0
  36. package/dist/components/Form/components/index.d.ts +13 -0
  37. package/dist/components/Form/index.d.ts +149 -0
  38. package/dist/components/Header/MenuSelectButton.d.ts +16 -0
  39. package/dist/components/Header/MobileBottomDrawer.d.ts +9 -0
  40. package/dist/components/Header/PhotoProfile.d.ts +11 -0
  41. package/dist/components/Header/hooks.d.ts +4 -0
  42. package/dist/components/Header/index.d.ts +37 -0
  43. package/dist/components/HorizontalField/components/Field.d.ts +5 -0
  44. package/dist/components/HorizontalField/components/FieldGroup.d.ts +10 -0
  45. package/dist/components/HorizontalField/index.d.ts +11 -0
  46. package/dist/components/HorizontalField/types.d.ts +12 -0
  47. package/dist/components/HorizontalField/utils.d.ts +3 -0
  48. package/dist/components/InputFile/FilledField.d.ts +11 -0
  49. package/dist/components/InputFile/InitialField.d.ts +12 -0
  50. package/dist/components/InputFile/index.d.ts +19 -0
  51. package/dist/components/InputFile/utils.d.ts +2 -0
  52. package/dist/components/InputImage/index.d.ts +27 -0
  53. package/dist/components/InputImage/utils.d.ts +12 -0
  54. package/dist/components/ModalDialog/index.d.ts +12 -0
  55. package/dist/components/PageLayout/index.d.ts +33 -0
  56. package/dist/components/Pressable/index.d.ts +6 -0
  57. package/dist/components/RightDrawer/index.d.ts +18 -0
  58. package/dist/components/ScrollToTopButton/index.d.ts +5 -0
  59. package/dist/components/Section/index.d.ts +25 -0
  60. package/dist/components/SelectButton/index.d.ts +13 -0
  61. package/dist/components/Sidebar/components/Group.d.ts +9 -0
  62. package/dist/components/Sidebar/components/Item.d.ts +13 -0
  63. package/dist/components/Sidebar/components/Provider.d.ts +5 -0
  64. package/dist/components/Sidebar/components/Wrapper.d.ts +10 -0
  65. package/dist/components/Sidebar/context.d.ts +32 -0
  66. package/dist/components/Sidebar/hooks.d.ts +4 -0
  67. package/dist/components/Sidebar/index.d.ts +15 -0
  68. package/dist/components/Sidebar/types.d.ts +18 -0
  69. package/dist/components/SwitchApps/drawer/AppCard.d.ts +14 -0
  70. package/dist/components/SwitchApps/drawer/index-v2.d.ts +13 -0
  71. package/dist/components/SwitchApps/drawer/index.d.ts +16 -0
  72. package/dist/components/SwitchApps/index.d.ts +15 -0
  73. package/dist/components/SwitchApps/types.d.ts +18 -0
  74. package/dist/components/Typography/index.d.ts +22 -0
  75. package/dist/components/index.d.ts +23 -0
  76. package/dist/entries/App/context.d.ts +16 -0
  77. package/dist/entries/App/hooks.d.ts +10 -0
  78. package/dist/entries/App/index.d.ts +22 -0
  79. package/dist/entries/index.d.ts +1 -0
  80. package/dist/hooks/index.d.ts +4 -0
  81. package/dist/hooks/useAuthRole.d.ts +35 -0
  82. package/dist/hooks/useDynamicTitle.d.ts +7 -0
  83. package/dist/hooks/useRouteParams.d.ts +49 -0
  84. package/dist/hooks/useTabState.d.ts +8 -0
  85. package/dist/index.cjs.js +12816 -0
  86. package/dist/index.d.ts +37 -0
  87. package/dist/index.es.js +51531 -0
  88. package/dist/index.umd.js +12816 -0
  89. package/dist/style.css +1 -0
  90. package/dist/types/auth.d.ts +31 -0
  91. package/dist/types/index.d.ts +1 -0
  92. package/dist/utils/formatter.d.ts +11 -0
  93. package/dist/utils/handler.d.ts +1 -0
  94. package/dist/utils/index.d.ts +5 -0
  95. package/dist/utils/regex.d.ts +5 -0
  96. package/dist/utils/styles.d.ts +18 -0
  97. package/dist/utils/texts.d.ts +2 -0
  98. package/dist/utils/url.d.ts +0 -0
  99. package/dist/utils/validator.d.ts +8 -0
  100. package/package.json +73 -0
@@ -0,0 +1,149 @@
1
+ export declare const Form: {
2
+ InputText: ({ size, direction, requiredTitle, fullWidth, ...props }: {
3
+ title?: string;
4
+ requiredTitle?: string;
5
+ description?: string;
6
+ errorMessage?: string;
7
+ inputProps: import('@starasia/input').IInputProps & {
8
+ extended?: React.ReactNode;
9
+ };
10
+ containerProps?: import('@starasia/box').BoxProps;
11
+ hideMessageError?: boolean;
12
+ size?: "sm" | "md" | "lg";
13
+ direction?: "vertical" | "horizontal";
14
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
15
+ inputRef?: React.Ref<HTMLInputElement>;
16
+ fullWidth?: boolean;
17
+ }) => import("react").JSX.Element;
18
+ InputDropdown: ({ size, direction, requiredTitle, fullWidth, ...props }: {
19
+ title?: string;
20
+ requiredTitle?: string;
21
+ description?: string;
22
+ errorMessage?: string;
23
+ inputProps: import('@starasia/dropdown').IDropdown & {
24
+ required?: boolean;
25
+ fullWidth?: boolean;
26
+ extended?: React.ReactNode;
27
+ };
28
+ onClickContainer?: () => void;
29
+ customWidth?: string;
30
+ hideMessageError?: boolean;
31
+ direction?: "vertical" | "horizontal";
32
+ size?: "sm" | "md" | "lg";
33
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
34
+ fullWidth?: boolean;
35
+ }) => import("react").JSX.Element;
36
+ InputSingleFile: ({ size, direction, requiredTitle, fullWidth, ...props }: {
37
+ errorMessage?: string;
38
+ inputProps: import('..').IInputFilesProps;
39
+ title?: string;
40
+ requiredTitle?: string;
41
+ description?: string;
42
+ containerProps?: import('@starasia/box').BoxProps;
43
+ hideMessageError?: boolean;
44
+ size?: "sm" | "md" | "lg";
45
+ direction?: "vertical" | "horizontal";
46
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
47
+ fullWidth?: boolean;
48
+ }) => import("react").JSX.Element;
49
+ CheckBoxOptions: <T extends {
50
+ id: number | string;
51
+ name: string;
52
+ description?: string;
53
+ renderBadge?: React.ReactNode;
54
+ }>({ size, direction, requiredTitle, fullWidth, required, ...props }: import('./components').ICheckBoxOptionsProps<T>) => import("react").JSX.Element;
55
+ RadioOptions: <T extends {
56
+ id: number;
57
+ value: string;
58
+ label: string;
59
+ description?: string;
60
+ subInput?: React.ReactNode;
61
+ }>({ position, size, fullWidth, ...props }: import('./components').IRadioOptionsProps<T>) => import("react").JSX.Element;
62
+ InputTextArea: ({ size, direction, requiredTitle, fullWidth, ...props }: {
63
+ title?: string;
64
+ requiredTitle?: string;
65
+ description?: string;
66
+ errorMessage?: string;
67
+ inputProps: import('@starasia/textarea').TextareaProps;
68
+ containerProps?: import('@starasia/box').BoxProps;
69
+ hideMessageError?: boolean;
70
+ size?: "sm" | "md" | "lg";
71
+ direction?: "vertical" | "horizontal";
72
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
73
+ inputRef?: React.Ref<HTMLTextAreaElement>;
74
+ fullWidth?: boolean;
75
+ }) => import("react").JSX.Element;
76
+ ToggleForm: ({ size, direction, requiredTitle, required, fullWidth, ...props }: {
77
+ title?: string;
78
+ titleDescription?: string;
79
+ errorMessage?: string;
80
+ label: string;
81
+ description?: string;
82
+ checked: boolean;
83
+ onChange: () => void;
84
+ size?: "sm" | "md" | "lg";
85
+ direction?: "vertical" | "horizontal";
86
+ requiredTitle?: string;
87
+ containerProps?: import('@starasia/box').BoxProps;
88
+ required?: boolean;
89
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
90
+ fullWidth?: boolean;
91
+ }) => import("react").JSX.Element;
92
+ ActionButton: ({ variant, size, ...props }: {
93
+ title?: string;
94
+ disabled?: boolean;
95
+ onClick?: () => void;
96
+ type?: "submit" | "reset" | "button" | undefined;
97
+ iconLeft?: import('@starasia/icon').IconName;
98
+ iconRight?: import('@starasia/icon').IconName;
99
+ size?: "xs" | "sm" | "md" | "lg";
100
+ variant?: "primary" | "secondary" | "secondary-danger" | "success" | "secondary-primary";
101
+ }) => import("react").JSX.Element;
102
+ FormTitle: (props: import('./components').IFormTitle) => import("react").JSX.Element;
103
+ InputDate: ({ size, direction, requiredTitle, fullWidth, ...props }: {
104
+ title?: string;
105
+ requiredTitle?: string;
106
+ description?: string;
107
+ errorMessage?: string;
108
+ inputProps: import('@starasia/date').IDateProps & {
109
+ required?: boolean;
110
+ };
111
+ onClickContainer?: () => void;
112
+ customWidth?: string;
113
+ hideMessageError?: boolean;
114
+ direction?: "vertical" | "horizontal";
115
+ size?: "sm" | "md" | "lg";
116
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
117
+ fullWidth?: boolean;
118
+ }) => import("react").JSX.Element;
119
+ InputImgFile: ({ size, direction, requiredTitle, fullWidth, required, ...props }: {
120
+ errorMessage?: string;
121
+ inputProps: import('..').InputImageProps;
122
+ title?: string;
123
+ requiredTitle?: string;
124
+ required?: boolean;
125
+ description?: string;
126
+ containerProps?: import('@starasia/box').BoxProps;
127
+ hideMessageError?: boolean;
128
+ size?: "sm" | "md" | "lg";
129
+ direction?: "vertical" | "horizontal";
130
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
131
+ fullWidth?: boolean;
132
+ }) => import("react").JSX.Element;
133
+ Custom: ({ size, direction, requiredTitle, fullWidth, ...props }: {
134
+ title?: string;
135
+ requiredTitle?: string;
136
+ description?: string;
137
+ inputProps: {
138
+ required?: boolean;
139
+ extended?: React.ReactNode;
140
+ };
141
+ containerProps?: import('@starasia/box').BoxProps;
142
+ hideMessageError?: boolean;
143
+ size?: "sm" | "md" | "lg";
144
+ direction?: "vertical" | "horizontal";
145
+ tooltip?: Omit<import('@starasia/tooltip').ITooltipProps, "children">;
146
+ fullWidth?: boolean;
147
+ }) => import("react").JSX.Element;
148
+ };
149
+ export * from './ToggleStatus';
@@ -0,0 +1,16 @@
1
+ import { IconName } from '@starasia/icon';
2
+ import { default as React } from 'react';
3
+ import { TextColor } from '@starasia/text';
4
+
5
+ export type MenuSelectButtonProps = {
6
+ onClick?: () => void;
7
+ title: string;
8
+ icon: IconName;
9
+ iconProps?: {
10
+ color?: string;
11
+ };
12
+ titleProps?: {
13
+ color?: TextColor;
14
+ };
15
+ };
16
+ export declare const MenuSelectButton: ({ onClick, icon, title, iconProps, titleProps, }: MenuSelectButtonProps) => React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type Props = {
4
+ onHide: () => void;
5
+ onClickLogout?: () => void;
6
+ renderExtendedContent?: React.ReactNode;
7
+ };
8
+ export declare const MobileBottomDrawer: ({ onHide, onClickLogout, renderExtendedContent, }: Props) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { BoxProps } from '@starasia/box';
3
+
4
+ type Props = {
5
+ width: BoxProps["width"];
6
+ height: BoxProps["height"];
7
+ photoURL?: string;
8
+ name?: string;
9
+ };
10
+ export declare const PhotoProfile: ({ width, height, photoURL, name }: Props) => React.JSX.Element;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const useHeaderState: () => {
2
+ mobileLogout: boolean;
3
+ toggleMobileLogout: () => void;
4
+ };
@@ -0,0 +1,37 @@
1
+ import { default as React } from 'react';
2
+ import { IconName } from '@starasia/icon/dist/types';
3
+ import { MenuSelectButtonProps } from './MenuSelectButton';
4
+
5
+ export interface HeaderUserData {
6
+ name: string;
7
+ email: string;
8
+ photoURL?: string;
9
+ role?: string;
10
+ descriptionOption?: "role" | "email";
11
+ }
12
+ export interface HeaderButtonProps {
13
+ icon?: IconName;
14
+ onClick?: () => void;
15
+ render?: React.ReactNode;
16
+ dot?: boolean;
17
+ boundaryLine?: boolean;
18
+ show?: "desktop" | "mobile";
19
+ }
20
+ export interface HeaderProps {
21
+ logo?: {
22
+ url?: string;
23
+ name?: string;
24
+ props?: React.ImgHTMLAttributes<HTMLImageElement>;
25
+ onClick?: () => void;
26
+ to?: string;
27
+ };
28
+ userData?: HeaderUserData;
29
+ buttons?: HeaderButtonProps[];
30
+ onClickLogout?: () => void;
31
+ logoutButton?: React.ReactNode;
32
+ buttonsLeft?: HeaderButtonProps[];
33
+ menuSelectButtons?: MenuSelectButtonProps[];
34
+ menuSelectCustom?: React.ReactNode;
35
+ bottomDrawerContent?: React.ReactNode;
36
+ }
37
+ export declare function Header({ userData, onClickLogout, logo, buttons, buttonsLeft, logoutButton, menuSelectButtons, menuSelectCustom, bottomDrawerContent, }: HeaderProps): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { FieldProps } from '../types';
2
+ import { default as React } from 'react';
3
+
4
+ declare const Field: React.MemoExoticComponent<({ value, label, separator, labelWidth, lastIndex, labelAlign, }: FieldProps) => React.JSX.Element>;
5
+ export default Field;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { FieldType } from '../types';
3
+
4
+ interface FieldGroupProps {
5
+ fields: FieldType[];
6
+ separator?: React.ReactNode;
7
+ labelWidth?: number;
8
+ }
9
+ declare const FieldGroup: React.MemoExoticComponent<({ fields, separator, labelWidth }: FieldGroupProps) => React.JSX.Element>;
10
+ export default FieldGroup;
@@ -0,0 +1,11 @@
1
+ import { ReactNode, default as React } from 'react';
2
+ import { FieldType } from './types';
3
+
4
+ export interface HorizontalFieldProps {
5
+ maxRow?: number;
6
+ maxColumn?: 1 | 2 | 3 | 4;
7
+ separator?: ReactNode;
8
+ fields?: FieldType[];
9
+ labelWidth?: number;
10
+ }
11
+ export declare const HorizontalField: React.MemoExoticComponent<({ maxRow, maxColumn, separator, fields, labelWidth, }: HorizontalFieldProps) => React.JSX.Element>;
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface FieldType {
4
+ label?: ReactNode;
5
+ value?: ReactNode;
6
+ labelAlign?: "top" | "center";
7
+ }
8
+ export interface FieldProps extends FieldType {
9
+ separator?: ReactNode;
10
+ labelWidth?: number;
11
+ lastIndex?: boolean;
12
+ }
@@ -0,0 +1,3 @@
1
+ import { FieldProps } from './types';
2
+
3
+ export declare const generateField: (datas: FieldProps[], maxRow: number) => Array<Array<FieldProps>>;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ type TFilledField = {
4
+ handleOnClickFile?: () => void;
5
+ fileSelected?: File | null;
6
+ fileDate?: string;
7
+ handleOnDeleteFile: () => void;
8
+ defaultUrl?: string;
9
+ };
10
+ export declare const FilledField: (props: TFilledField) => React.JSX.Element;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ type TInitialFieldProps = {
4
+ handleOnClick: () => void;
5
+ isDesktop: boolean;
6
+ handleOnFileChange: (file: File | null) => void;
7
+ errorMessage?: string;
8
+ fileSupports?: string[];
9
+ status?: "error" | "default";
10
+ };
11
+ export declare const InitialField: (props: TInitialFieldProps) => React.JSX.Element;
12
+ export {};
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { BoxProps } from '@starasia/box';
3
+
4
+ type TFileSupport = "svg" | "jpg" | "png" | "jpeg" | "pdf" | "doc" | "docx" | "xls" | "xlsx" | "xlsx" | "ppt" | "pptx";
5
+ export interface IInputFilesProps {
6
+ fileSupportOption?: TFileSupport[];
7
+ handleOnChangeFile: (file: File | null) => void;
8
+ handleOnDeleteFile: () => void;
9
+ fileSelected?: File | null;
10
+ errorMessage?: string;
11
+ isLoading?: boolean;
12
+ fileDate?: string;
13
+ defaultUrl?: string;
14
+ required?: boolean;
15
+ status?: "error" | "default";
16
+ containerProps?: BoxProps;
17
+ }
18
+ export declare const InputFile: ({ status, ...props }: IInputFilesProps) => React.JSX.Element;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ export default function convertSize(size: string): string;
2
+ export declare function extractFileName(url: string): string;
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { BoxProps } from '@starasia/box';
3
+
4
+ export type AspectRatioKey = "1:1" | "4:3" | "16:9" | "3:4" | "9:16" | "2:3" | "3:2" | "32:9";
5
+ export type InputImageRef = {
6
+ openFileDialog: () => void;
7
+ };
8
+ export type InputImageProps = {
9
+ handleUpload?: (file: File) => void;
10
+ urlImage?: string | null;
11
+ isUploading?: boolean;
12
+ croppedImage: string | null;
13
+ setCroppedImage: (value: string | null, file?: File) => void;
14
+ size?: "48" | "64" | "80" | "96" | "128" | "160" | "192" | "224" | "256";
15
+ aspect?: AspectRatioKey;
16
+ containerProps?: {
17
+ bg?: BoxProps["bg"];
18
+ borderColor?: BoxProps["borderColor"];
19
+ borderStyle?: BoxProps["borderStyle"];
20
+ borderWidth?: BoxProps["borderWidth"];
21
+ borderRadius?: BoxProps["borderRadius"];
22
+ fullWidth?: BoxProps["fullWidth"];
23
+ };
24
+ maxFileSize?: number;
25
+ onError?: (message: string) => void;
26
+ };
27
+ export declare const InputImage: React.ForwardRefExoticComponent<InputImageProps & React.RefAttributes<InputImageRef>>;
@@ -0,0 +1,12 @@
1
+ export declare function getCroppedImg(imageSrc: string, pixelCrop: {
2
+ width: number;
3
+ height: number;
4
+ x: number;
5
+ y: number;
6
+ }): Promise<File>;
7
+ export declare function getCroppedImgPng(imageSrc: string, pixelCrop: {
8
+ width: number;
9
+ height: number;
10
+ x: number;
11
+ y: number;
12
+ }): Promise<File>;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface ModalDialogProps {
4
+ title: string;
5
+ content: string;
6
+ onHide: () => void;
7
+ onSuccess: () => void;
8
+ isShow: boolean;
9
+ successButtonTitle: string;
10
+ theme: "info" | "danger" | "success";
11
+ }
12
+ export declare const ModalDialog: React.FC<ModalDialogProps>;
@@ -0,0 +1,33 @@
1
+ import { BoxProps } from '@starasia/box';
2
+ import { PropsWithChildren, ReactNode, default as React } from 'react';
3
+ import { IBadges } from '@starasia/badges';
4
+ import { IconName } from '@starasia/icon/dist/types';
5
+ import { ButtonProps } from '@starasia/button/dist/types';
6
+
7
+ interface BackButtonProps {
8
+ show?: boolean;
9
+ title?: string | ReactNode;
10
+ navigateTo?: string;
11
+ onClick?: () => void;
12
+ textColor?: React.CSSProperties["color"] | string;
13
+ iconColor?: React.CSSProperties["color"] | string;
14
+ iconName?: IconName;
15
+ }
16
+ interface ActionProps {
17
+ title?: string | ReactNode;
18
+ icon?: IconName;
19
+ buttonProps?: ButtonProps;
20
+ onClick?: () => void;
21
+ }
22
+ export interface PageLayoutProps extends PropsWithChildren {
23
+ title?: string | ReactNode;
24
+ titleTag?: string;
25
+ header?: boolean;
26
+ backButton?: BackButtonProps;
27
+ action?: ActionProps[] | React.ReactNode;
28
+ titleTagProps?: Omit<IBadges, "text" | "border" | "size">;
29
+ containerProps?: Omit<BoxProps, "variant" | "gap">;
30
+ headerProps?: Omit<BoxProps, "gap">;
31
+ }
32
+ export declare const PageLayout: React.MemoExoticComponent<({ backButton, title, titleTag, children, header, action, titleTagProps, containerProps, headerProps, }: PageLayoutProps) => React.JSX.Element>;
33
+ export {};
@@ -0,0 +1,6 @@
1
+ import { BoxProps } from '@starasia/box/dist/types';
2
+ import { default as React } from 'react';
3
+
4
+ export interface PressableProps extends BoxProps {
5
+ }
6
+ export declare const Pressable: React.MemoExoticComponent<({ children, ...rest }: PressableProps) => React.JSX.Element>;
@@ -0,0 +1,18 @@
1
+ import { IconName } from '@starasia/icon/dist/types';
2
+ import { default as React, CSSProperties, ReactNode } from 'react';
3
+
4
+ interface CloseButton {
5
+ icon: IconName;
6
+ title?: string;
7
+ }
8
+ export interface RightDrawerProps {
9
+ show: boolean;
10
+ onHide: () => void;
11
+ withBlur?: boolean;
12
+ style?: CSSProperties;
13
+ children: ReactNode;
14
+ closeButton?: CloseButton | null | false;
15
+ paddingHorizontal?: boolean;
16
+ }
17
+ export declare const RightDrawer: React.ForwardRefExoticComponent<RightDrawerProps & React.RefAttributes<HTMLDivElement>>;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const ScrollToTopButton: ({ customBottom }: {
4
+ customBottom?: string;
5
+ }) => React.JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { BoxProps } from '@starasia/box';
2
+ import { IBadges } from '@starasia/badges';
3
+ import { PropsWithChildren, default as React } from 'react';
4
+
5
+ export interface SectionProps extends PropsWithChildren {
6
+ header?: React.ReactNode | null;
7
+ filter?: React.ReactNode | null;
8
+ filterContainer?: BoxProps;
9
+ actionContainer?: BoxProps;
10
+ title?: string;
11
+ titleTag?: string;
12
+ variantTag?: IBadges["variant"];
13
+ action?: React.ReactNode | null;
14
+ searchField?: boolean;
15
+ searchKey?: string;
16
+ searchPlaceholder?: string;
17
+ searchHighlightPlaceholder?: string;
18
+ onSearchChange?: (value: string) => void;
19
+ headerProps?: SectionHeaderProps;
20
+ }
21
+ export interface SectionHeaderProps extends PropsWithChildren {
22
+ borderBottom?: boolean;
23
+ padding?: boolean;
24
+ }
25
+ export declare const Section: React.MemoExoticComponent<({ children, title, titleTag, action, filter, searchField, header, onSearchChange, searchKey, searchPlaceholder, searchHighlightPlaceholder, filterContainer, actionContainer, headerProps, variantTag, }: SectionProps) => React.JSX.Element>;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface SelectButtonOption {
4
+ label?: string;
5
+ value?: string | number | boolean | object;
6
+ }
7
+ export interface SelectButtonProps {
8
+ value?: SelectButtonOption[];
9
+ options?: SelectButtonOption[];
10
+ onChange?: (value: SelectButtonOption[]) => void;
11
+ multiple?: boolean;
12
+ }
13
+ export declare const SelectButton: React.MemoExoticComponent<({ value, options, onChange, multiple }: SelectButtonProps) => React.JSX.Element>;
@@ -0,0 +1,9 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+ import { BoxProps } from '@starasia/box';
3
+
4
+ interface GroupProps extends PropsWithChildren {
5
+ border?: boolean;
6
+ paddingTop?: BoxProps["paddingTop"];
7
+ }
8
+ declare const Group: React.MemoExoticComponent<({ children, border, paddingTop }: GroupProps) => React.JSX.Element>;
9
+ export default Group;
@@ -0,0 +1,13 @@
1
+ import { IconName } from '@starasia/icon/dist/types';
2
+ import { default as React } from 'react';
3
+
4
+ interface ItemProps {
5
+ to: string;
6
+ title: string;
7
+ icon: IconName;
8
+ collapse?: boolean;
9
+ onHide?: () => void;
10
+ maxWidth?: React.CSSProperties["maxWidth"];
11
+ }
12
+ declare const Item: React.MemoExoticComponent<({ to, title, icon, collapse, onHide, maxWidth }: ItemProps) => React.JSX.Element>;
13
+ export default Item;
@@ -0,0 +1,5 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+
3
+ export interface SidebarProviderProps extends PropsWithChildren {
4
+ }
5
+ export declare const SidebarProvider: ({ children }: SidebarProviderProps) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { PropsWithChildren, default as React } from 'react';
2
+ import { SidebarMenuItem } from '../types';
3
+
4
+ interface WrapperProps extends PropsWithChildren {
5
+ show?: boolean;
6
+ maxWidth?: React.CSSProperties["maxWidth"];
7
+ menuBottom?: SidebarMenuItem[];
8
+ }
9
+ declare const Wrapper: React.MemoExoticComponent<({ show, children, maxWidth, menuBottom }: WrapperProps) => React.JSX.Element>;
10
+ export default Wrapper;
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface ConfirmationDialogPropsState {
4
+ show: boolean;
5
+ title: string | ReactNode;
6
+ message: string | ReactNode;
7
+ callback: () => void;
8
+ data?: unknown;
9
+ variant: "success" | "danger" | "info" | "default";
10
+ }
11
+ export interface ConfirmationDialogUnSavedChangesProps {
12
+ value: boolean;
13
+ title?: string | ReactNode;
14
+ message?: string | ReactNode;
15
+ callback?: () => void;
16
+ }
17
+ export interface SidebarContextValue {
18
+ show: boolean;
19
+ open: () => void;
20
+ close: () => void;
21
+ toggle: () => void;
22
+ setUnsavedChanges: ({ value, message, title, }: ConfirmationDialogUnSavedChangesProps) => void;
23
+ confirmNavigation: (callback: () => void) => void;
24
+ renderConfirmationDialog: ({ title, message, callback, data, }: Omit<ConfirmationDialogPropsState, "show" | "variant"> & {
25
+ variant?: "success" | "danger" | "info" | "default";
26
+ }) => void;
27
+ confirmationDialog: ConfirmationDialogPropsState;
28
+ handleDialogConfirm: () => void;
29
+ handleDialogCancel: () => void;
30
+ }
31
+ export declare const sidebarContextDefaultValue: SidebarContextValue;
32
+ export declare const SidebarContext: import('react').Context<SidebarContextValue>;
@@ -0,0 +1,4 @@
1
+ import { SidebarContextValue } from './context';
2
+
3
+ export declare function useSidebar(): SidebarContextValue;
4
+ export declare const useSidebarState: () => SidebarContextValue;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { SidebarMenuItem, SidebarMenus } from './types';
3
+
4
+ export interface SidebarProps {
5
+ menus: SidebarMenus;
6
+ menuBottom?: SidebarMenuItem[];
7
+ maxWidth?: React.CSSProperties["maxWidth"];
8
+ header?: React.ReactNode;
9
+ }
10
+ export declare const Sidebar: React.MemoExoticComponent<({ menus, maxWidth, header, menuBottom, }: SidebarProps) => React.JSX.Element>;
11
+ export * from './hooks';
12
+ export * from './context';
13
+ export * from './types';
14
+ export { SidebarProvider } from './components/Provider';
15
+ export type { SidebarProviderProps } from './components/Provider';
@@ -0,0 +1,18 @@
1
+ import { IconName } from '@starasia/icon/dist/types';
2
+
3
+ export interface SidebarMenuItem {
4
+ id: number;
5
+ title: string;
6
+ to: string;
7
+ icon: IconName;
8
+ }
9
+ export interface SidebarMenuGroup {
10
+ id: number;
11
+ name: string;
12
+ items: SidebarMenuItem[];
13
+ }
14
+ export type SidebarMenus = SidebarMenuGroup[];
15
+ export declare enum SidebarStyle {
16
+ Width = "19.125rem",
17
+ WidthCollapse = "6rem"
18
+ }
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { AppAccessModel } from '../types';
3
+
4
+ type Props = {
5
+ item: AppAccessModel;
6
+ handleToSelectOrg?: (item: AppAccessModel) => void;
7
+ handleSwitch?: (appKey: string, organizationId?: string) => void;
8
+ showIcon?: boolean;
9
+ showRole?: boolean;
10
+ isOnOrgSelect?: boolean;
11
+ setSelectedApp: (item: string) => void;
12
+ };
13
+ declare const AppCard: ({ item, handleSwitch, handleToSelectOrg, showIcon, showRole, isOnOrgSelect, setSelectedApp, }: Props) => React.JSX.Element;
14
+ export default AppCard;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { AppAccessModel } from '../types';
3
+
4
+ interface DrawerSwitchAppsProps {
5
+ show: boolean;
6
+ onHide: () => void;
7
+ dataApps?: AppAccessModel[];
8
+ totalData?: number;
9
+ handleSwitch?: (appKey: string, organizationId?: string, item?: AppAccessModel) => void;
10
+ setSelectedApp: (item: string) => void;
11
+ }
12
+ declare const DrawerSwitchAppsV2: React.FC<DrawerSwitchAppsProps>;
13
+ export default DrawerSwitchAppsV2;