@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.
- package/dist/components/ActionMenu/components/ButtonDefault.d.ts +6 -0
- package/dist/components/ActionMenu/index.d.ts +28 -0
- package/dist/components/AdvanceFilter/components/Chip.d.ts +13 -0
- package/dist/components/AdvanceFilter/components/Container.d.ts +13 -0
- package/dist/components/AdvanceFilter/components/Field.d.ts +34 -0
- package/dist/components/AdvanceFilter/components/Form.d.ts +0 -0
- package/dist/components/AdvanceFilter/components/Group.d.ts +0 -0
- package/dist/components/AdvanceFilter/components/Header.d.ts +11 -0
- package/dist/components/AdvanceFilter/components/Toggle.d.ts +7 -0
- package/dist/components/AdvanceFilter/hooks.d.ts +48 -0
- package/dist/components/AdvanceFilter/index.d.ts +7 -0
- package/dist/components/AdvanceFilter/types.d.ts +27 -0
- package/dist/components/AdvanceFilter/utils.d.ts +10 -0
- package/dist/components/AsideBar/index.d.ts +8 -0
- package/dist/components/AuthLayout/index.d.ts +8 -0
- package/dist/components/ContentLayout/index.d.ts +10 -0
- package/dist/components/DashboardLayout/index.d.ts +33 -0
- package/dist/components/DecisionWrapper/index.d.ts +11 -0
- package/dist/components/EachUtils/index.d.ts +6 -0
- package/dist/components/FloatingFooter/index.d.ts +14 -0
- package/dist/components/Form/ToggleStatus.d.ts +20 -0
- package/dist/components/Form/components/ActionButton.d.ts +15 -0
- package/dist/components/Form/components/CheckBoxOptions.d.ts +27 -0
- package/dist/components/Form/components/Custom.d.ts +21 -0
- package/dist/components/Form/components/ErrorMessage.d.ts +7 -0
- package/dist/components/Form/components/FormTitle.d.ts +7 -0
- package/dist/components/Form/components/InputDate.d.ts +22 -0
- package/dist/components/Form/components/InputDropdown.d.ts +24 -0
- package/dist/components/Form/components/InputImgFile.d.ts +21 -0
- package/dist/components/Form/components/InputSingleFile.d.ts +20 -0
- package/dist/components/Form/components/InputText.d.ts +23 -0
- package/dist/components/Form/components/InputTextArea.d.ts +21 -0
- package/dist/components/Form/components/RadioOptions.d.ts +28 -0
- package/dist/components/Form/components/TextFormLabel.d.ts +7 -0
- package/dist/components/Form/components/ToggleForm.d.ts +22 -0
- package/dist/components/Form/components/index.d.ts +13 -0
- package/dist/components/Form/index.d.ts +149 -0
- package/dist/components/Header/MenuSelectButton.d.ts +16 -0
- package/dist/components/Header/MobileBottomDrawer.d.ts +9 -0
- package/dist/components/Header/PhotoProfile.d.ts +11 -0
- package/dist/components/Header/hooks.d.ts +4 -0
- package/dist/components/Header/index.d.ts +37 -0
- package/dist/components/HorizontalField/components/Field.d.ts +5 -0
- package/dist/components/HorizontalField/components/FieldGroup.d.ts +10 -0
- package/dist/components/HorizontalField/index.d.ts +11 -0
- package/dist/components/HorizontalField/types.d.ts +12 -0
- package/dist/components/HorizontalField/utils.d.ts +3 -0
- package/dist/components/InputFile/FilledField.d.ts +11 -0
- package/dist/components/InputFile/InitialField.d.ts +12 -0
- package/dist/components/InputFile/index.d.ts +19 -0
- package/dist/components/InputFile/utils.d.ts +2 -0
- package/dist/components/InputImage/index.d.ts +27 -0
- package/dist/components/InputImage/utils.d.ts +12 -0
- package/dist/components/ModalDialog/index.d.ts +12 -0
- package/dist/components/PageLayout/index.d.ts +33 -0
- package/dist/components/Pressable/index.d.ts +6 -0
- package/dist/components/RightDrawer/index.d.ts +18 -0
- package/dist/components/ScrollToTopButton/index.d.ts +5 -0
- package/dist/components/Section/index.d.ts +25 -0
- package/dist/components/SelectButton/index.d.ts +13 -0
- package/dist/components/Sidebar/components/Group.d.ts +9 -0
- package/dist/components/Sidebar/components/Item.d.ts +13 -0
- package/dist/components/Sidebar/components/Provider.d.ts +5 -0
- package/dist/components/Sidebar/components/Wrapper.d.ts +10 -0
- package/dist/components/Sidebar/context.d.ts +32 -0
- package/dist/components/Sidebar/hooks.d.ts +4 -0
- package/dist/components/Sidebar/index.d.ts +15 -0
- package/dist/components/Sidebar/types.d.ts +18 -0
- package/dist/components/SwitchApps/drawer/AppCard.d.ts +14 -0
- package/dist/components/SwitchApps/drawer/index-v2.d.ts +13 -0
- package/dist/components/SwitchApps/drawer/index.d.ts +16 -0
- package/dist/components/SwitchApps/index.d.ts +15 -0
- package/dist/components/SwitchApps/types.d.ts +18 -0
- package/dist/components/Typography/index.d.ts +22 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/entries/App/context.d.ts +16 -0
- package/dist/entries/App/hooks.d.ts +10 -0
- package/dist/entries/App/index.d.ts +22 -0
- package/dist/entries/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useAuthRole.d.ts +35 -0
- package/dist/hooks/useDynamicTitle.d.ts +7 -0
- package/dist/hooks/useRouteParams.d.ts +49 -0
- package/dist/hooks/useTabState.d.ts +8 -0
- package/dist/index.cjs.js +12816 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.es.js +51531 -0
- package/dist/index.umd.js +12816 -0
- package/dist/style.css +1 -0
- package/dist/types/auth.d.ts +31 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/formatter.d.ts +11 -0
- package/dist/utils/handler.d.ts +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/styles.d.ts +18 -0
- package/dist/utils/texts.d.ts +2 -0
- package/dist/utils/url.d.ts +0 -0
- package/dist/utils/validator.d.ts +8 -0
- package/package.json +73 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PressableProps } from '../../Pressable';
|
|
3
|
+
|
|
4
|
+
export interface ActionMenuButtonDefaultProps extends PressableProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const ActionMenuButtonDefault: React.NamedExoticComponent<ActionMenuButtonDefaultProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ButtonProps } from '@starasia/button/dist/types';
|
|
2
|
+
import { IconName, IconProps } from '@starasia/icon/dist/types';
|
|
3
|
+
import { IMenuProps } from '@starasia/menu';
|
|
4
|
+
import { TextProps } from '@starasia/text/dist/types';
|
|
5
|
+
import { default as React } from 'react';
|
|
6
|
+
import { PressableProps } from '../Pressable';
|
|
7
|
+
|
|
8
|
+
export interface ActionMenuItemProps {
|
|
9
|
+
id?: number;
|
|
10
|
+
label: string;
|
|
11
|
+
icon: IconName;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
buttonProps?: ButtonProps;
|
|
14
|
+
iconProps?: IconProps;
|
|
15
|
+
textProps?: TextProps;
|
|
16
|
+
}
|
|
17
|
+
export interface ActionMenuProps {
|
|
18
|
+
icon: IconName;
|
|
19
|
+
position?: IMenuProps["position"];
|
|
20
|
+
items?: ActionMenuItemProps[];
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
triggerStyle?: React.CSSProperties;
|
|
23
|
+
buttonProps?: ButtonProps | PressableProps;
|
|
24
|
+
iconProps?: IconProps;
|
|
25
|
+
containerStyle?: React.CSSProperties;
|
|
26
|
+
variant?: "default" | "outline-button";
|
|
27
|
+
}
|
|
28
|
+
export declare const ActionMenu: React.MemoExoticComponent<({ icon, items, style, triggerStyle, containerStyle, position, buttonProps, iconProps, variant, }: ActionMenuProps) => React.JSX.Element>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ChipItem } from '../types';
|
|
3
|
+
|
|
4
|
+
export interface FilterChipProps {
|
|
5
|
+
text?: string;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Chip: React.MemoExoticComponent<({ text, onClose }: FilterChipProps) => React.JSX.Element>;
|
|
9
|
+
export interface FilterChipsProps {
|
|
10
|
+
items?: ChipItem[];
|
|
11
|
+
onClose?: (field: ChipItem) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const Chips: React.MemoExoticComponent<({ items, onClose }: FilterChipsProps) => React.JSX.Element>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FieldProps } from './Field';
|
|
3
|
+
|
|
4
|
+
export interface AdvanceFilterProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
show?: boolean;
|
|
7
|
+
fields?: FieldProps[];
|
|
8
|
+
withSearchParam?: boolean;
|
|
9
|
+
onReset?: (reset: boolean) => void;
|
|
10
|
+
onHide?: () => void;
|
|
11
|
+
resetting?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Container: React.MemoExoticComponent<({ show, title, fields, withSearchParam, onReset, onHide, resetting, }: AdvanceFilterProps) => React.JSX.Element>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React, HTMLInputTypeAttribute } from 'react';
|
|
2
|
+
import { ChangeHandler, InputType, Option } from '../types';
|
|
3
|
+
import { IDateProps } from '@starasia/date';
|
|
4
|
+
|
|
5
|
+
export interface FieldProps {
|
|
6
|
+
name?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
parentKey?: string;
|
|
10
|
+
childrenKey?: string[];
|
|
11
|
+
relationWith?: string;
|
|
12
|
+
relationLabel?: string;
|
|
13
|
+
relationLabelChip?: string;
|
|
14
|
+
type?: InputType;
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
searchable?: boolean;
|
|
18
|
+
options?: Option[];
|
|
19
|
+
onChange?: ChangeHandler;
|
|
20
|
+
value?: any;
|
|
21
|
+
fields?: FieldProps[];
|
|
22
|
+
onSearch?: (value: string) => void;
|
|
23
|
+
borderBottom?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
dateFilter?: IDateProps["filter"];
|
|
26
|
+
enableInputDate?: boolean;
|
|
27
|
+
withSearchParam?: boolean;
|
|
28
|
+
rangedDate?: boolean;
|
|
29
|
+
dateValueFormatText?: "indonesian" | "iso";
|
|
30
|
+
inputTextType?: HTMLInputTypeAttribute;
|
|
31
|
+
min?: number;
|
|
32
|
+
max?: number;
|
|
33
|
+
}
|
|
34
|
+
export declare const FilterField: React.MemoExoticComponent<React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLDivElement>>>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface HeaderResetButton {
|
|
4
|
+
label?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface HeaderProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
resetButton?: HeaderResetButton;
|
|
10
|
+
}
|
|
11
|
+
export declare const Header: React.MemoExoticComponent<({ title, resetButton }: HeaderProps) => React.JSX.Element>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AdvanceFilterProps } from './components/Container';
|
|
2
|
+
import { FieldProps } from './components/Field';
|
|
3
|
+
import { ChipItem } from './types';
|
|
4
|
+
|
|
5
|
+
export interface UseAdvanceFilterConfig {
|
|
6
|
+
withSearchParam?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
fields?: AdvanceFilterProps["fields"];
|
|
9
|
+
}
|
|
10
|
+
export declare const useAdvanceFilter: (config?: UseAdvanceFilterConfig) => {
|
|
11
|
+
value: {
|
|
12
|
+
[name: string]: any;
|
|
13
|
+
} | undefined;
|
|
14
|
+
open: () => void;
|
|
15
|
+
close: () => void;
|
|
16
|
+
toggle: () => void;
|
|
17
|
+
reset: () => void;
|
|
18
|
+
chips: {
|
|
19
|
+
name: string | undefined;
|
|
20
|
+
label: string | undefined;
|
|
21
|
+
value: any;
|
|
22
|
+
valueText: string;
|
|
23
|
+
children: FieldProps[];
|
|
24
|
+
}[];
|
|
25
|
+
toggleConfig: {
|
|
26
|
+
active: boolean;
|
|
27
|
+
onClick: () => void;
|
|
28
|
+
};
|
|
29
|
+
chipsConfig: {
|
|
30
|
+
items: {
|
|
31
|
+
name: string | undefined;
|
|
32
|
+
label: string | undefined;
|
|
33
|
+
value: any;
|
|
34
|
+
valueText: string;
|
|
35
|
+
children: FieldProps[];
|
|
36
|
+
}[];
|
|
37
|
+
onClose: (f: ChipItem) => void;
|
|
38
|
+
};
|
|
39
|
+
config: {
|
|
40
|
+
show: boolean;
|
|
41
|
+
onHide: () => void;
|
|
42
|
+
resetting: boolean;
|
|
43
|
+
onReset: (val: boolean) => void;
|
|
44
|
+
withSearchParam?: boolean;
|
|
45
|
+
title?: string;
|
|
46
|
+
fields?: AdvanceFilterProps["fields"];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const AdvanceFilter: {
|
|
2
|
+
Container: import('react').MemoExoticComponent<({ show, title, fields, withSearchParam, onReset, onHide, resetting, }: import('./components/Container').AdvanceFilterProps) => import("react").JSX.Element>;
|
|
3
|
+
Toggle: import('react').MemoExoticComponent<({ active, onClick }: import('./components/Toggle').FilterToggleProps) => import("react").JSX.Element>;
|
|
4
|
+
Chips: import('react').MemoExoticComponent<({ items, onClose }: import('./components/Chip').FilterChipsProps) => import("react").JSX.Element>;
|
|
5
|
+
Chip: import('react').MemoExoticComponent<({ text, onClose }: import('./components/Chip').FilterChipProps) => import("react").JSX.Element>;
|
|
6
|
+
};
|
|
7
|
+
export * from './hooks';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IconProps } from '@starasia/icon';
|
|
2
|
+
import { FieldProps } from './components/Field';
|
|
3
|
+
|
|
4
|
+
export interface Option {
|
|
5
|
+
icon?: React.ReactElement<IconProps>;
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
export type InputType = "dropdown" | "text" | "date" | "select-button" | "date-range";
|
|
10
|
+
export type ChangeHandler = (params: {
|
|
11
|
+
value: any;
|
|
12
|
+
name?: string;
|
|
13
|
+
type?: InputType;
|
|
14
|
+
}) => void;
|
|
15
|
+
export interface ChipItem {
|
|
16
|
+
name?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
value?: any;
|
|
19
|
+
children?: FieldProps[];
|
|
20
|
+
valueText?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FilterQueryParams<T = Record<string, any>> {
|
|
23
|
+
filter?: T;
|
|
24
|
+
}
|
|
25
|
+
export declare enum FilterContants {
|
|
26
|
+
SearchParamKey = "filter"
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IDropdown } from '@starasia/dropdown';
|
|
2
|
+
import { IDateRange } from '@starasia/date';
|
|
3
|
+
|
|
4
|
+
export declare const resolveDropdownValueToString: (value: IDropdown["defaultValue"]) => string;
|
|
5
|
+
export declare const resolveDateValueToString: (value: Date | IDateRange) => string | undefined;
|
|
6
|
+
export declare const getDropdownValueFromQueryString: (value?: string, options?: IDropdown["dropdownLists"]) => any;
|
|
7
|
+
export declare const getDateValueFromQueryString: (value?: any, rangedDate?: boolean) => Date | {
|
|
8
|
+
from: Date | null;
|
|
9
|
+
to: Date | null;
|
|
10
|
+
} | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren, default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface AuthLayoutProps extends PropsWithChildren {
|
|
4
|
+
coverImage?: string;
|
|
5
|
+
logo?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const AuthLayout: React.MemoExoticComponent<({ children, coverImage, logo }: AuthLayoutProps) => React.JSX.Element>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoxProps } from '@starasia/box';
|
|
2
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ContentLayoutProps extends PropsWithChildren {
|
|
5
|
+
sidebarWidth?: string | number;
|
|
6
|
+
overflowContent?: BoxProps["overflow"];
|
|
7
|
+
isPadding?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const ContentLayout: React.MemoExoticComponent<({ children, sidebarWidth, overflowContent, isPadding, }: ContentLayoutProps) => React.JSX.Element>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropsWithChildren, default as React } from 'react';
|
|
2
|
+
import { HeaderButtonProps, HeaderUserData } from '../Header';
|
|
3
|
+
import { SidebarMenuItem, SidebarMenus } from '../Sidebar';
|
|
4
|
+
import { BoxProps } from '@starasia/box';
|
|
5
|
+
import { MenuSelectButtonProps } from '../Header/MenuSelectButton';
|
|
6
|
+
|
|
7
|
+
interface DashboardLayoutProps extends PropsWithChildren {
|
|
8
|
+
userData?: HeaderUserData;
|
|
9
|
+
menus?: SidebarMenus;
|
|
10
|
+
menuBottom?: SidebarMenuItem[];
|
|
11
|
+
onClickLogout?: () => void;
|
|
12
|
+
logo?: {
|
|
13
|
+
url?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
props?: React.ImgHTMLAttributes<HTMLImageElement>;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
to?: string;
|
|
18
|
+
};
|
|
19
|
+
headerButtons?: HeaderButtonProps[];
|
|
20
|
+
headerButtonsLeft?: HeaderButtonProps[];
|
|
21
|
+
sidebar?: {
|
|
22
|
+
maxWidth?: React.CSSProperties["maxWidth"];
|
|
23
|
+
header?: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
overflowContent?: BoxProps["overflow"];
|
|
26
|
+
logoutButton?: React.ReactNode;
|
|
27
|
+
menuSelectButtons?: MenuSelectButtonProps[];
|
|
28
|
+
menuSelectCustom?: React.ReactNode;
|
|
29
|
+
paddingContent?: boolean;
|
|
30
|
+
bottomDrawerContent?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare const DashboardLayout: React.MemoExoticComponent<({ userData, menus, menuBottom, children, logo, headerButtons, onClickLogout, sidebar, overflowContent, logoutButton, headerButtonsLeft, menuSelectButtons, menuSelectCustom, paddingContent, bottomDrawerContent, }: DashboardLayoutProps) => React.JSX.Element>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface DecisionWrapperProps {
|
|
4
|
+
condition: boolean;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
loading?: React.ReactNode;
|
|
7
|
+
fallback?: React.ReactNode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const DecisionWrapper: React.FC<DecisionWrapperProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface IEachUtilsProps<T> {
|
|
2
|
+
of?: T[];
|
|
3
|
+
render: (item: T, idx: number, arr: T[]) => React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare const EachUtils: <T extends object>({ of, render, }: IEachUtilsProps<T>) => (string | number | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | import('react').ReactPortal)[];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@starasia/box';
|
|
3
|
+
import { ScrollToTopButton } from '../ScrollToTopButton';
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
withScrollToTopButton?: boolean;
|
|
8
|
+
scrollToTopButtonProps?: React.ComponentProps<typeof ScrollToTopButton>;
|
|
9
|
+
containerProps?: {
|
|
10
|
+
justify?: BoxProps["justify"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const FloatingFooter: ({ children, withScrollToTopButton, scrollToTopButtonProps, containerProps, }: Props) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface StatusItemState {
|
|
4
|
+
id: string | number;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface BaseObject {
|
|
8
|
+
id: string | number;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface Props<T> {
|
|
12
|
+
id: string | number;
|
|
13
|
+
items?: T[];
|
|
14
|
+
handleOnUpdate?: (x: boolean) => void;
|
|
15
|
+
width?: string;
|
|
16
|
+
toggleShow?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const ToggleStatus: <T extends BaseObject>({ items, id, handleOnUpdate, width, toggleShow, disabled, }: Props<T>) => React.JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconName } from '@starasia/icon';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
type ActionButtonProps = {
|
|
5
|
+
title?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
type?: "submit" | "reset" | "button" | undefined;
|
|
9
|
+
iconLeft?: IconName;
|
|
10
|
+
iconRight?: IconName;
|
|
11
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
12
|
+
variant?: "primary" | "secondary" | "secondary-danger" | "success" | "secondary-primary";
|
|
13
|
+
};
|
|
14
|
+
export declare const ActionButton: ({ variant, size, ...props }: ActionButtonProps) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@starasia/box';
|
|
3
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
4
|
+
|
|
5
|
+
export interface ICheckBoxOptionsProps<T> {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
checkBoxesList: T[];
|
|
10
|
+
onChecked: (id: number | string, item: T) => void;
|
|
11
|
+
checkBoxesAreChecked: (number | string)[];
|
|
12
|
+
hideMessageError?: boolean;
|
|
13
|
+
direction?: "vertical" | "horizontal" | "horizontal-inline";
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
requiredTitle?: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
18
|
+
containerProps?: BoxProps;
|
|
19
|
+
fullWidth?: boolean;
|
|
20
|
+
badgeContainerProps?: BoxProps;
|
|
21
|
+
}
|
|
22
|
+
export declare const CheckBoxOptions: <T extends {
|
|
23
|
+
id: number | string;
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
renderBadge?: React.ReactNode;
|
|
27
|
+
}>({ size, direction, requiredTitle, fullWidth, required, ...props }: ICheckBoxOptionsProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BoxProps } from '@starasia/box';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
4
|
+
|
|
5
|
+
type CustomProps = {
|
|
6
|
+
title?: string;
|
|
7
|
+
requiredTitle?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
inputProps: {
|
|
10
|
+
required?: boolean;
|
|
11
|
+
extended?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
containerProps?: BoxProps;
|
|
14
|
+
hideMessageError?: boolean;
|
|
15
|
+
size?: "sm" | "md" | "lg";
|
|
16
|
+
direction?: "vertical" | "horizontal";
|
|
17
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const Custom: ({ size, direction, requiredTitle, fullWidth, ...props }: CustomProps) => React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
3
|
+
import { IDateProps } from '@starasia/date';
|
|
4
|
+
|
|
5
|
+
type InputDateProps = {
|
|
6
|
+
title?: string;
|
|
7
|
+
requiredTitle?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
inputProps: IDateProps & {
|
|
11
|
+
required?: boolean;
|
|
12
|
+
};
|
|
13
|
+
onClickContainer?: () => void;
|
|
14
|
+
customWidth?: string;
|
|
15
|
+
hideMessageError?: boolean;
|
|
16
|
+
direction?: "vertical" | "horizontal";
|
|
17
|
+
size?: "sm" | "md" | "lg";
|
|
18
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
19
|
+
fullWidth?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const InputDate: ({ size, direction, requiredTitle, fullWidth, ...props }: InputDateProps) => React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IDropdown } from '@starasia/dropdown';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
4
|
+
|
|
5
|
+
type InputDropdownProps = {
|
|
6
|
+
title?: string;
|
|
7
|
+
requiredTitle?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
inputProps: IDropdown & {
|
|
11
|
+
required?: boolean;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
extended?: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
onClickContainer?: () => void;
|
|
16
|
+
customWidth?: string;
|
|
17
|
+
hideMessageError?: boolean;
|
|
18
|
+
direction?: "vertical" | "horizontal";
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
21
|
+
fullWidth?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const InputDropdown: ({ size, direction, requiredTitle, fullWidth, ...props }: InputDropdownProps) => React.JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BoxProps } from '@starasia/box';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
4
|
+
import { InputImageProps } from '../../InputImage';
|
|
5
|
+
|
|
6
|
+
type InputImgFileProps = {
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
inputProps: InputImageProps;
|
|
9
|
+
title?: string;
|
|
10
|
+
requiredTitle?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
description?: string;
|
|
13
|
+
containerProps?: BoxProps;
|
|
14
|
+
hideMessageError?: boolean;
|
|
15
|
+
size?: "sm" | "md" | "lg";
|
|
16
|
+
direction?: "vertical" | "horizontal";
|
|
17
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const InputImgFile: ({ size, direction, requiredTitle, fullWidth, required, ...props }: InputImgFileProps) => React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BoxProps } from '@starasia/box';
|
|
2
|
+
import { IInputFilesProps } from '../../InputFile';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
5
|
+
|
|
6
|
+
type InputSingleFileProps = {
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
inputProps: IInputFilesProps;
|
|
9
|
+
title?: string;
|
|
10
|
+
requiredTitle?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
containerProps?: BoxProps;
|
|
13
|
+
hideMessageError?: boolean;
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
direction?: "vertical" | "horizontal";
|
|
16
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const InputSingleFile: ({ size, direction, requiredTitle, fullWidth, ...props }: InputSingleFileProps) => React.JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IInputProps } from '@starasia/input';
|
|
2
|
+
import { BoxProps } from '@starasia/box';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
5
|
+
|
|
6
|
+
type InputTextProps = {
|
|
7
|
+
title?: string;
|
|
8
|
+
requiredTitle?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
inputProps: IInputProps & {
|
|
12
|
+
extended?: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
containerProps?: BoxProps;
|
|
15
|
+
hideMessageError?: boolean;
|
|
16
|
+
size?: "sm" | "md" | "lg";
|
|
17
|
+
direction?: "vertical" | "horizontal";
|
|
18
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
19
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
20
|
+
fullWidth?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare const InputText: ({ size, direction, requiredTitle, fullWidth, ...props }: InputTextProps) => React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TextareaProps } from '@starasia/textarea';
|
|
2
|
+
import { BoxProps } from '@starasia/box';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
5
|
+
|
|
6
|
+
type InputTextAreaProps = {
|
|
7
|
+
title?: string;
|
|
8
|
+
requiredTitle?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
inputProps: TextareaProps;
|
|
12
|
+
containerProps?: BoxProps;
|
|
13
|
+
hideMessageError?: boolean;
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
direction?: "vertical" | "horizontal";
|
|
16
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
17
|
+
inputRef?: React.Ref<HTMLTextAreaElement>;
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const InputTextArea: ({ size, direction, requiredTitle, fullWidth, ...props }: InputTextAreaProps) => React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
type Position = "horizontal" | "vertical" | "horizontal-inline" | "horizontal-block";
|
|
4
|
+
export interface IRadioOptionsProps<T> {
|
|
5
|
+
position?: Position;
|
|
6
|
+
description?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
radioList: T[];
|
|
10
|
+
onChecked: (item: {
|
|
11
|
+
id: number;
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
radioIsChecked: number;
|
|
16
|
+
disableAll?: boolean;
|
|
17
|
+
size?: "sm" | "md" | "lg";
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
groupName?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const RadioOptions: <T extends {
|
|
22
|
+
id: number;
|
|
23
|
+
value: string;
|
|
24
|
+
label: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
subInput?: React.ReactNode;
|
|
27
|
+
}>({ position, size, fullWidth, ...props }: IRadioOptionsProps<T>) => React.JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@starasia/box';
|
|
3
|
+
import { ITooltipProps } from '@starasia/tooltip';
|
|
4
|
+
|
|
5
|
+
type ToggleFormProps = {
|
|
6
|
+
title?: string;
|
|
7
|
+
titleDescription?: string;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
checked: boolean;
|
|
12
|
+
onChange: () => void;
|
|
13
|
+
size?: "sm" | "md" | "lg";
|
|
14
|
+
direction?: "vertical" | "horizontal";
|
|
15
|
+
requiredTitle?: string;
|
|
16
|
+
containerProps?: BoxProps;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
tooltip?: Omit<ITooltipProps, "children">;
|
|
19
|
+
fullWidth?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const ToggleForm: ({ size, direction, requiredTitle, required, fullWidth, ...props }: ToggleFormProps) => React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './InputText';
|
|
2
|
+
export * from './InputDropdown';
|
|
3
|
+
export * from './InputSingleFile';
|
|
4
|
+
export * from './CheckBoxOptions';
|
|
5
|
+
export * from './TextFormLabel';
|
|
6
|
+
export * from './RadioOptions';
|
|
7
|
+
export * from './InputTextArea';
|
|
8
|
+
export * from './ToggleForm';
|
|
9
|
+
export * from './ActionButton';
|
|
10
|
+
export * from './FormTitle';
|
|
11
|
+
export * from './InputDate';
|
|
12
|
+
export * from './InputImgFile';
|
|
13
|
+
export * from './Custom';
|