aristid-ds 0.5.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.
- package/README.md +434 -0
- package/dist/Kit/App/index.d.ts +5 -0
- package/dist/Kit/App/style.d.ts +3 -0
- package/dist/Kit/App/types.d.ts +5 -0
- package/dist/Kit/DataDisplay/Avatar/Avatar.d.ts +4 -0
- package/dist/Kit/DataDisplay/Avatar/AvatarGroup.d.ts +4 -0
- package/dist/Kit/DataDisplay/Avatar/index.d.ts +7 -0
- package/dist/Kit/DataDisplay/Avatar/types.d.ts +15 -0
- package/dist/Kit/DataDisplay/Badge/index.d.ts +3 -0
- package/dist/Kit/DataDisplay/Badge/types.d.ts +9 -0
- package/dist/Kit/DataDisplay/Card/ColorBar.d.ts +4 -0
- package/dist/Kit/DataDisplay/Card/index.d.ts +3 -0
- package/dist/Kit/DataDisplay/Card/types.d.ts +27 -0
- package/dist/Kit/DataDisplay/Collapse/Collapse.d.ts +4 -0
- package/dist/Kit/DataDisplay/Collapse/Header.d.ts +4 -0
- package/dist/Kit/DataDisplay/Collapse/HeaderExtra.d.ts +4 -0
- package/dist/Kit/DataDisplay/Collapse/index.d.ts +8 -0
- package/dist/Kit/DataDisplay/Collapse/types.d.ts +29 -0
- package/dist/Kit/DataDisplay/Image/index.d.ts +8 -0
- package/dist/Kit/DataDisplay/Image/theme.d.ts +3 -0
- package/dist/Kit/DataDisplay/Image/types.d.ts +14 -0
- package/dist/Kit/DataDisplay/ItemList/index.d.ts +3 -0
- package/dist/Kit/DataDisplay/ItemList/types.d.ts +12 -0
- package/dist/Kit/DataDisplay/Tabs/index.d.ts +4 -0
- package/dist/Kit/DataDisplay/Tabs/theme.d.ts +2 -0
- package/dist/Kit/DataDisplay/Tabs/types.d.ts +16 -0
- package/dist/Kit/DataDisplay/Tooltip/index.d.ts +3 -0
- package/dist/Kit/DataDisplay/Tooltip/types.d.ts +6 -0
- package/dist/Kit/DataDisplay/Tree/index.d.ts +3 -0
- package/dist/Kit/DataDisplay/Tree/types.d.ts +19 -0
- package/dist/Kit/DataDisplay/index.d.ts +18 -0
- package/dist/Kit/DataEntry/AutoComplete/index.d.ts +3 -0
- package/dist/Kit/DataEntry/AutoComplete/types.d.ts +8 -0
- package/dist/Kit/DataEntry/Checkbox/Checkbox.d.ts +4 -0
- package/dist/Kit/DataEntry/Checkbox/Group.d.ts +30 -0
- package/dist/Kit/DataEntry/Checkbox/index.d.ts +9 -0
- package/dist/Kit/DataEntry/Checkbox/theme.d.ts +3 -0
- package/dist/Kit/DataEntry/Checkbox/types.d.ts +50 -0
- package/dist/Kit/DataEntry/DatePicker/DatePicker.d.ts +4 -0
- package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +4 -0
- package/dist/Kit/DataEntry/DatePicker/index.d.ts +7 -0
- package/dist/Kit/DataEntry/DatePicker/style.d.ts +2 -0
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +24 -0
- package/dist/Kit/DataEntry/Input/Input.d.ts +4 -0
- package/dist/Kit/DataEntry/Input/InputWrapper.d.ts +4 -0
- package/dist/Kit/DataEntry/Input/Password.d.ts +4 -0
- package/dist/Kit/DataEntry/Input/TextArea.d.ts +4 -0
- package/dist/Kit/DataEntry/Input/index.d.ts +8 -0
- package/dist/Kit/DataEntry/Input/types.d.ts +36 -0
- package/dist/Kit/DataEntry/InputNumber/index.d.ts +3 -0
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +11 -0
- package/dist/Kit/DataEntry/Radio/Group.d.ts +4 -0
- package/dist/Kit/DataEntry/Radio/Radio.d.ts +4 -0
- package/dist/Kit/DataEntry/Radio/index.d.ts +8 -0
- package/dist/Kit/DataEntry/Radio/theme.d.ts +3 -0
- package/dist/Kit/DataEntry/Radio/types.d.ts +70 -0
- package/dist/Kit/DataEntry/Rate/index.d.ts +3 -0
- package/dist/Kit/DataEntry/Rate/types.d.ts +11 -0
- package/dist/Kit/DataEntry/Select/index.d.ts +3 -0
- package/dist/Kit/DataEntry/Select/style.d.ts +561 -0
- package/dist/Kit/DataEntry/Select/types.d.ts +48 -0
- package/dist/Kit/DataEntry/Slider/index.d.ts +3 -0
- package/dist/Kit/DataEntry/Slider/types.d.ts +18 -0
- package/dist/Kit/DataEntry/Switch/index.d.ts +3 -0
- package/dist/Kit/DataEntry/Switch/theme.d.ts +3 -0
- package/dist/Kit/DataEntry/Switch/types.d.ts +53 -0
- package/dist/Kit/DataEntry/Tag/Tag.d.ts +4 -0
- package/dist/Kit/DataEntry/Tag/index.d.ts +3 -0
- package/dist/Kit/DataEntry/Tag/types.d.ts +12 -0
- package/dist/Kit/DataEntry/Upload/Dragger.d.ts +4 -0
- package/dist/Kit/DataEntry/Upload/Upload.d.ts +4 -0
- package/dist/Kit/DataEntry/Upload/index.d.ts +8 -0
- package/dist/Kit/DataEntry/Upload/types.d.ts +20 -0
- package/dist/Kit/DataEntry/index.d.ts +23 -0
- package/dist/Kit/Feedback/Alert/index.d.ts +3 -0
- package/dist/Kit/Feedback/Alert/types.d.ts +6 -0
- package/dist/Kit/Feedback/Feedback/index.d.ts +0 -0
- package/dist/Kit/Feedback/Modal/ConfirmDialog.d.ts +4 -0
- package/dist/Kit/Feedback/Modal/Modal.d.ts +4 -0
- package/dist/Kit/Feedback/Modal/confirm.d.ts +10 -0
- package/dist/Kit/Feedback/Modal/index.d.ts +11 -0
- package/dist/Kit/Feedback/Modal/theme.d.ts +2 -0
- package/dist/Kit/Feedback/Modal/types.d.ts +68 -0
- package/dist/Kit/Feedback/Notification/index.d.ts +1 -0
- package/dist/Kit/Feedback/Notification/style.d.ts +2 -0
- package/dist/Kit/Feedback/Notification/types.d.ts +26 -0
- package/dist/Kit/Feedback/Notification/useKitNotification.d.ts +6 -0
- package/dist/Kit/Feedback/Progress/index.d.ts +3 -0
- package/dist/Kit/Feedback/Progress/theme.d.ts +2 -0
- package/dist/Kit/Feedback/Progress/types.d.ts +9 -0
- package/dist/Kit/Feedback/SnackBar/SnackBar.d.ts +6 -0
- package/dist/Kit/Feedback/SnackBar/SnackBarProvider.d.ts +3 -0
- package/dist/Kit/Feedback/SnackBar/index.d.ts +4 -0
- package/dist/Kit/Feedback/SnackBar/types.d.ts +16 -0
- package/dist/Kit/Feedback/index.d.ts +5 -0
- package/dist/Kit/General/Button/index.d.ts +5 -0
- package/dist/Kit/General/Button/types.d.ts +18 -0
- package/dist/Kit/General/Icon/index.d.ts +3 -0
- package/dist/Kit/General/Icon/theme.d.ts +2 -0
- package/dist/Kit/General/Icon/types.d.ts +35 -0
- package/dist/Kit/General/Typography/Link.d.ts +4 -0
- package/dist/Kit/General/Typography/Paragraph.d.ts +4 -0
- package/dist/Kit/General/Typography/Text.d.ts +4 -0
- package/dist/Kit/General/Typography/Title.d.ts +4 -0
- package/dist/Kit/General/Typography/commons.d.ts +12 -0
- package/dist/Kit/General/Typography/index.d.ts +11 -0
- package/dist/Kit/General/Typography/types.d.ts +39 -0
- package/dist/Kit/General/index.d.ts +6 -0
- package/dist/Kit/Layout/Divider/index.d.ts +3 -0
- package/dist/Kit/Layout/Divider/types.d.ts +11 -0
- package/dist/Kit/Layout/Grid/Col.d.ts +4 -0
- package/dist/Kit/Layout/Grid/Row.d.ts +4 -0
- package/dist/Kit/Layout/Grid/index.d.ts +9 -0
- package/dist/Kit/Layout/Grid/types.d.ts +12 -0
- package/dist/Kit/Layout/Space/index.d.ts +8 -0
- package/dist/Kit/Layout/Space/theme.d.ts +7 -0
- package/dist/Kit/Layout/Space/types.d.ts +14 -0
- package/dist/Kit/Layout/index.d.ts +6 -0
- package/dist/Kit/Navigation/Breadcrumb/index.d.ts +3 -0
- package/dist/Kit/Navigation/Breadcrumb/theme.d.ts +8 -0
- package/dist/Kit/Navigation/Breadcrumb/types.d.ts +4 -0
- package/dist/Kit/Navigation/DropDown/index.d.ts +3 -0
- package/dist/Kit/Navigation/DropDown/style.d.ts +2 -0
- package/dist/Kit/Navigation/DropDown/types.d.ts +6 -0
- package/dist/Kit/Navigation/Header/index.d.ts +3 -0
- package/dist/Kit/Navigation/Header/theme.d.ts +6 -0
- package/dist/Kit/Navigation/Header/types.d.ts +10 -0
- package/dist/Kit/Navigation/Menu/ItemMenu.d.ts +4 -0
- package/dist/Kit/Navigation/Menu/Menu.d.ts +4 -0
- package/dist/Kit/Navigation/Menu/index.d.ts +7 -0
- package/dist/Kit/Navigation/Menu/types.d.ts +34 -0
- package/dist/Kit/Navigation/Pagination/index.d.ts +3 -0
- package/dist/Kit/Navigation/Pagination/theme.d.ts +2 -0
- package/dist/Kit/Navigation/Pagination/types.d.ts +17 -0
- package/dist/Kit/Navigation/Steps/index.d.ts +3 -0
- package/dist/Kit/Navigation/Steps/types.d.ts +12 -0
- package/dist/Kit/Navigation/index.d.ts +12 -0
- package/dist/Kit/index.d.ts +6 -0
- package/dist/icons/KitCalendarOutlined.d.ts +4 -0
- package/dist/icons/KitDeleteOutlined.d.ts +4 -0
- package/dist/icons/KitDownloadOutlined.d.ts +4 -0
- package/dist/icons/KitDropdownOutlined.d.ts +4 -0
- package/dist/icons/KitDropupOutlined.d.ts +4 -0
- package/dist/icons/KitEditOutlined.d.ts +4 -0
- package/dist/icons/KitHideOutlined.d.ts +4 -0
- package/dist/icons/KitInfoOutlined.d.ts +4 -0
- package/dist/icons/KitLessOutlined.d.ts +4 -0
- package/dist/icons/KitListOutlined.d.ts +4 -0
- package/dist/icons/KitLockOutlined.d.ts +4 -0
- package/dist/icons/KitLogoutOutlined.d.ts +4 -0
- package/dist/icons/KitPdfOutlined.d.ts +4 -0
- package/dist/icons/KitPlusOutlined.d.ts +4 -0
- package/dist/icons/KitRailroadOutlined.d.ts +4 -0
- package/dist/icons/KitShowOutlined.d.ts +4 -0
- package/dist/icons/KitWarningOutlined.d.ts +4 -0
- package/dist/icons/asn/KitCalendarOutlined.d.ts +3 -0
- package/dist/icons/asn/KitDeleteOutlined.d.ts +3 -0
- package/dist/icons/asn/KitDownloadOutlined.d.ts +3 -0
- package/dist/icons/asn/KitDropdownOutlined.d.ts +3 -0
- package/dist/icons/asn/KitDropupOutlined.d.ts +3 -0
- package/dist/icons/asn/KitEditOutlined.d.ts +3 -0
- package/dist/icons/asn/KitHideOutlined.d.ts +3 -0
- package/dist/icons/asn/KitInfoOutlined.d.ts +3 -0
- package/dist/icons/asn/KitLessOutlined.d.ts +3 -0
- package/dist/icons/asn/KitListOutlined.d.ts +3 -0
- package/dist/icons/asn/KitLockOutlined.d.ts +3 -0
- package/dist/icons/asn/KitLogoutOutlined.d.ts +3 -0
- package/dist/icons/asn/KitPdfOutlined.d.ts +3 -0
- package/dist/icons/asn/KitPlusOutlined.d.ts +3 -0
- package/dist/icons/asn/KitRailroadOutlined.d.ts +3 -0
- package/dist/icons/asn/KitShowOutlined.d.ts +3 -0
- package/dist/icons/asn/KitWarningOutlined.d.ts +3 -0
- package/dist/icons/index.d.ts +17 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +4281 -0
- package/dist/theme/aristid/components/DataDisplay/Avatar/index.d.ts +22 -0
- package/dist/theme/aristid/components/DataDisplay/Badge/index.d.ts +1 -0
- package/dist/theme/aristid/components/DataDisplay/Card/index.d.ts +101 -0
- package/dist/theme/aristid/components/DataDisplay/Tooltip/index.d.ts +1 -0
- package/dist/theme/aristid/components/DataEntry/Input/Input/index.d.ts +1 -0
- package/dist/theme/aristid/components/DataEntry/Input/InputWrapper/index.d.ts +14 -0
- package/dist/theme/aristid/components/DataEntry/Rate/index.d.ts +1 -0
- package/dist/theme/aristid/components/DataEntry/Slider/index.d.ts +1 -0
- package/dist/theme/aristid/components/DataEntry/Tag/index.d.ts +1 -0
- package/dist/theme/aristid/components/General/Button/index.d.ts +1 -0
- package/dist/theme/aristid/general/border/index.d.ts +2 -0
- package/dist/theme/aristid/general/colors/index.d.ts +2 -0
- package/dist/theme/aristid/general/index.d.ts +2 -0
- package/dist/theme/aristid/general/spacing/index.d.ts +2 -0
- package/dist/theme/aristid/general/typography/index.d.ts +2 -0
- package/dist/theme/aristid/index.d.ts +2 -0
- package/dist/theme/colors.d.ts +95 -0
- package/dist/theme/index.d.ts +10 -0
- package/dist/theme/theme-context.d.ts +9 -0
- package/dist/theme/types/components/DataDisplay/Avatar/index.d.ts +27 -0
- package/dist/theme/types/components/DataDisplay/Badge/index.d.ts +34 -0
- package/dist/theme/types/components/DataDisplay/Card/index.d.ts +103 -0
- package/dist/theme/types/components/DataDisplay/Tooltip/index.d.ts +19 -0
- package/dist/theme/types/components/DataEntry/Input/Input/index.d.ts +59 -0
- package/dist/theme/types/components/DataEntry/Input/InputWrapper/index.d.ts +16 -0
- package/dist/theme/types/components/DataEntry/Rate/index.d.ts +25 -0
- package/dist/theme/types/components/DataEntry/Slider/index.d.ts +69 -0
- package/dist/theme/types/components/DataEntry/Tag/index.d.ts +40 -0
- package/dist/theme/types/components/General/Button/index.d.ts +66 -0
- package/dist/theme/types/general/border/index.d.ts +14 -0
- package/dist/theme/types/general/colors/index.d.ts +96 -0
- package/dist/theme/types/general/spacing/index.d.ts +12 -0
- package/dist/theme/types/general/typography/index.d.ts +22 -0
- package/dist/theme/types/index.d.ts +52 -0
- package/dist/theme/typography.d.ts +35 -0
- package/dist/vite-env.d.ts +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {SwitchProps} from 'antd';
|
|
2
|
+
import {HTMLAttributes} from 'react';
|
|
3
|
+
|
|
4
|
+
export interface KitSwitchProps extends SwitchProps, HTMLAttributes<HTMLButtonElement> {}
|
|
5
|
+
|
|
6
|
+
export interface StyledSwitchProps extends SwitchProps {}
|
|
7
|
+
|
|
8
|
+
export interface KitSwitchTheme {
|
|
9
|
+
fontWeight: {
|
|
10
|
+
default: string | number;
|
|
11
|
+
checked: string | number;
|
|
12
|
+
};
|
|
13
|
+
borderWidth: string;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
iconFontSize: number;
|
|
17
|
+
pinHeight: number;
|
|
18
|
+
handle: {
|
|
19
|
+
borderWidth: string;
|
|
20
|
+
borderColor: {
|
|
21
|
+
default: {
|
|
22
|
+
off: string;
|
|
23
|
+
on: string;
|
|
24
|
+
};
|
|
25
|
+
disabled: {
|
|
26
|
+
off: string;
|
|
27
|
+
on: string;
|
|
28
|
+
};
|
|
29
|
+
focus: {
|
|
30
|
+
off: string;
|
|
31
|
+
on: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
backgroundColor: {
|
|
35
|
+
default: {on: string; off: string};
|
|
36
|
+
disabled: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
backgroundColor: {
|
|
40
|
+
default: {
|
|
41
|
+
on: string;
|
|
42
|
+
off: string;
|
|
43
|
+
};
|
|
44
|
+
focus: {
|
|
45
|
+
on: string;
|
|
46
|
+
off: string;
|
|
47
|
+
};
|
|
48
|
+
disabled: {
|
|
49
|
+
on: string;
|
|
50
|
+
off: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {TagProps} from 'antd';
|
|
2
|
+
import {HTMLAttributes} from 'react';
|
|
3
|
+
|
|
4
|
+
export const AntdTagPropsToOmit = 'color' | 'checkableTag' | 'icon' | 'closable';
|
|
5
|
+
|
|
6
|
+
export type KitTagColor = 'red' | 'green' | 'blue' | 'blueInvert' | 'default';
|
|
7
|
+
|
|
8
|
+
export interface KitTagProps extends Omit<TagProps, AntdTagPropsToOmit>, HTMLAttributes<HTMLSpanElement> {
|
|
9
|
+
color?: KitTagColor;
|
|
10
|
+
children?: ReactNode[] | ReactNode;
|
|
11
|
+
onClose?: TagProps['onClose'];
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { KitDraggerProps, KitUploadProps } from './types';
|
|
3
|
+
type UploadCompoundedComponent = React.FunctionComponent<KitUploadProps> & {
|
|
4
|
+
KitDragger: React.FunctionComponent<KitDraggerProps>;
|
|
5
|
+
LIST_IGNORE: String;
|
|
6
|
+
};
|
|
7
|
+
export declare const KitUpload: UploadCompoundedComponent;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {BadgeProps, UploadProps} from 'antd';
|
|
2
|
+
import { DraggerProps } from 'antd/lib/upload';
|
|
3
|
+
|
|
4
|
+
type AntdUploadTypesToOmit = 'listType' | 'itemRender' | 'openFileDialogOnClick';
|
|
5
|
+
|
|
6
|
+
export type KitUploadListType = 'text' | 'picture' | 'picture-card';
|
|
7
|
+
|
|
8
|
+
export interface KitUploadProps extends Omit<UploadProps, AntdUploadTypesToOmit> {
|
|
9
|
+
listType?: KitUploadListType;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
imageUrl?: string;
|
|
12
|
+
buttonWording?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type AntdDraggerTypesToOmit = 'listType' | 'itemRender' | 'openFileDialogOnClick';
|
|
16
|
+
|
|
17
|
+
export interface KitDraggerProps extends Omit<DraggerProps, AntdDraggerTypesToOmit> {
|
|
18
|
+
title?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { KitCheckbox } from './Checkbox';
|
|
2
|
+
import { KitInput } from './Input';
|
|
3
|
+
import { KitInputNumber } from './InputNumber';
|
|
4
|
+
import { KitRadio } from './Radio';
|
|
5
|
+
import { KitRate } from './Rate';
|
|
6
|
+
import { KitSelect } from './Select';
|
|
7
|
+
import { KitTag } from './Tag';
|
|
8
|
+
import { KitSwitch } from './Switch';
|
|
9
|
+
import { KitDatePicker } from './DatePicker';
|
|
10
|
+
import { KitAutoComplete } from './AutoComplete';
|
|
11
|
+
import { KitUpload } from './Upload';
|
|
12
|
+
export { KitSlider } from './Slider';
|
|
13
|
+
export { KitCheckbox };
|
|
14
|
+
export { KitInput };
|
|
15
|
+
export { KitInputNumber };
|
|
16
|
+
export { KitRadio };
|
|
17
|
+
export { KitRate };
|
|
18
|
+
export { KitSelect };
|
|
19
|
+
export { KitTag };
|
|
20
|
+
export { KitSwitch };
|
|
21
|
+
export { KitAutoComplete };
|
|
22
|
+
export { KitDatePicker };
|
|
23
|
+
export { KitUpload };
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { confirmDialogProps } from './types';
|
|
3
|
+
declare const ConfirmDialog: ({ icon, title, firstLine, secondLine, image, type, isOpen, width, portalClassName, okCancel, onCancel, cancelText, onOk, okText, close, ...props }: confirmDialogProps) => React.JSX.Element;
|
|
4
|
+
export default ConfirmDialog;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConfigUpdate, confirmDialogProps } from './types';
|
|
2
|
+
export default function confirm(config: confirmDialogProps): {
|
|
3
|
+
destroy: (...args: any) => void;
|
|
4
|
+
update: (configUpdate: ConfigUpdate) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function withWarn(props: confirmDialogProps): confirmDialogProps;
|
|
7
|
+
export declare function withInfo(props: confirmDialogProps): confirmDialogProps;
|
|
8
|
+
export declare function withSuccess(props: confirmDialogProps): confirmDialogProps;
|
|
9
|
+
export declare function withError(props: confirmDialogProps): confirmDialogProps;
|
|
10
|
+
export declare function withConfirm(props: confirmDialogProps): confirmDialogProps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ModalFunc, KitModalProps } from './types';
|
|
3
|
+
type CompoundedComponent = React.FunctionComponent<KitModalProps> & {
|
|
4
|
+
info: ModalFunc;
|
|
5
|
+
success: ModalFunc;
|
|
6
|
+
error: ModalFunc;
|
|
7
|
+
warning: ModalFunc;
|
|
8
|
+
confirm: ModalFunc;
|
|
9
|
+
};
|
|
10
|
+
export declare const KitModal: CompoundedComponent;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {HTMLAttributes, ReactNode} from 'react';
|
|
2
|
+
import type ReactModal from 'react-modal';
|
|
3
|
+
|
|
4
|
+
type propsToOmit =
|
|
5
|
+
| 'bodyOpenClassName'
|
|
6
|
+
| 'htmlOpenClassName'
|
|
7
|
+
| 'closeTimeoutMS'
|
|
8
|
+
| 'overlayRef'
|
|
9
|
+
| 'contentRef'
|
|
10
|
+
| 'overlayElement'
|
|
11
|
+
| 'contentElement';
|
|
12
|
+
|
|
13
|
+
export interface KitModalProps extends Omit<ReactModal.Props, propsToOmit>, HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
width?: string;
|
|
15
|
+
showCloseIcon?: boolean;
|
|
16
|
+
close?: (args: any[]) => void;
|
|
17
|
+
title?: ReactNode;
|
|
18
|
+
footer?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface confirmDialogProps extends KitModalProps {
|
|
22
|
+
type: 'info' | 'success' | 'warning' | 'error' | 'warn' | 'confirm';
|
|
23
|
+
image?: string;
|
|
24
|
+
icon?: ReactNode;
|
|
25
|
+
firstLine?: ReactNode;
|
|
26
|
+
secondLine?: ReactNode;
|
|
27
|
+
okCancel?: boolean;
|
|
28
|
+
title?: string;
|
|
29
|
+
cancelText?: string;
|
|
30
|
+
close?: (...args: any[]) => void;
|
|
31
|
+
okText?: string;
|
|
32
|
+
onCancel?: () => {};
|
|
33
|
+
onOk?: () => {};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type ConfigUpdate = confirmDialogProps | ((prevConfig: confirmDialogProps) => confirmDialogProps);
|
|
37
|
+
|
|
38
|
+
export type ModalFunc = (props: confirmDialogProps) => {
|
|
39
|
+
destroy: () => void;
|
|
40
|
+
update: (configUpdate: ConfigUpdate) => void;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export interface modalThemeProps {
|
|
44
|
+
backgroundColor: string;
|
|
45
|
+
fontFamily: string;
|
|
46
|
+
fontSize: {
|
|
47
|
+
title: number;
|
|
48
|
+
content: number;
|
|
49
|
+
};
|
|
50
|
+
fontWeight: {
|
|
51
|
+
title: number | string;
|
|
52
|
+
content: number | string;
|
|
53
|
+
};
|
|
54
|
+
itemsVerticalSpacing: 24;
|
|
55
|
+
textVerticalSpacing: 8;
|
|
56
|
+
icon: {
|
|
57
|
+
successColor: string;
|
|
58
|
+
successBgColor: string;
|
|
59
|
+
errorColor: string;
|
|
60
|
+
errorBgColor: string;
|
|
61
|
+
warngingColor: string;
|
|
62
|
+
warngingBgColor: string;
|
|
63
|
+
};
|
|
64
|
+
borderRadius: number;
|
|
65
|
+
imageBorderColor: string;
|
|
66
|
+
overlayColor: string;
|
|
67
|
+
boxShadow: string;
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useKitNotification } from './useKitNotification';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {ArgsProps} from 'antd/es/notification/interface';
|
|
2
|
+
|
|
3
|
+
export type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
4
|
+
|
|
5
|
+
type AntdArgsPropsTypesToOmit = 'message' | 'description' | 'placement';
|
|
6
|
+
|
|
7
|
+
export interface IKitNotificationContext {
|
|
8
|
+
kitNotification: KitNotification;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface KitNotificationArgsProps extends Omit<ArgsProps, AntdArgsPropsTypesToOmit> {
|
|
12
|
+
message: string;
|
|
13
|
+
description: string;
|
|
14
|
+
placement?: NotificationPlacement;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type KitNotificationStaticFn = (args: KitNotificationArgsProps) => void;
|
|
18
|
+
|
|
19
|
+
export type KitNotification = {
|
|
20
|
+
error: KitNotificationStaticFn;
|
|
21
|
+
warning: KitNotificationStaticFn;
|
|
22
|
+
success: KitNotificationStaticFn;
|
|
23
|
+
info: KitNotificationStaticFn;
|
|
24
|
+
destroy: (key?: React.Key) => void;
|
|
25
|
+
open: KitNotificationStaticFn;
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type {ProgressProps} from 'antd';
|
|
2
|
+
import {HTMLAttributes} from 'react';
|
|
3
|
+
|
|
4
|
+
export interface ProgressThemeProps {
|
|
5
|
+
circleFontSize: number;
|
|
6
|
+
circleFontWeight: string | number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface KitProgressProps extends ProgressProps, HTMLAttributes<HTMLDivElement> {}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KitOpenSnackBarProps, KitSnackBarProps } from './types';
|
|
3
|
+
export declare const openSnackBar: ({ message, closable, ctaText, ctaOnClick, duration }: KitOpenSnackBarProps) => string;
|
|
4
|
+
export declare const closeSnackBar: () => void;
|
|
5
|
+
declare const KitSnackBar: React.FunctionComponent<KitSnackBarProps>;
|
|
6
|
+
export default KitSnackBar;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const openKitSnackBar: ({ message, closable, ctaText, ctaOnClick, duration }: import("./types").KitOpenSnackBarProps) => string;
|
|
3
|
+
export declare const closeKitSnackBar: () => void;
|
|
4
|
+
export declare const KitSnackBarProvider: import("react").FunctionComponent<{}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {HTMLAttributes} from 'react';
|
|
2
|
+
|
|
3
|
+
export interface KitSnackBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
message: string;
|
|
5
|
+
ctaText?: string;
|
|
6
|
+
ctaOnClick?: Function;
|
|
7
|
+
closable?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface KitOpenSnackBarProps {
|
|
11
|
+
message: string;
|
|
12
|
+
closable?: boolean;
|
|
13
|
+
ctaText?: string;
|
|
14
|
+
ctaOnClick?: Function;
|
|
15
|
+
duration?: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {KitColorsPalette} from '@theme/types/general/colors';
|
|
2
|
+
import {ButtonProps} from 'antd';
|
|
3
|
+
import {HTMLAttributes} from 'react';
|
|
4
|
+
|
|
5
|
+
export type KitButtonType = 'primary' | 'default' | 'link' | 'segmented';
|
|
6
|
+
|
|
7
|
+
export type AntdButtonTypesToOmit = 'type' | 'size' | 'ghost' | 'shape' | 'styles';
|
|
8
|
+
|
|
9
|
+
export type KitButtonIconSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
10
|
+
|
|
11
|
+
export interface KitButtonProps extends Omit<ButtonProps, AntdButtonTypesToOmit>, HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
type?: KitButtonType;
|
|
13
|
+
segmentedActived?: boolean;
|
|
14
|
+
segmentedChecked?: boolean;
|
|
15
|
+
segmentedColor?: keyof KitColorsPalette['secondary'];
|
|
16
|
+
primaryModal?: boolean;
|
|
17
|
+
iconSize?: KitButtonIconSize;
|
|
18
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type IconBaseComponent from '@ant-design/icons/lib/components/AntdIcon';
|
|
2
|
+
import {HTMLAttributes, ReactNode} from 'react';
|
|
3
|
+
|
|
4
|
+
export interface KitIconTheme {
|
|
5
|
+
color: {
|
|
6
|
+
on: string;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
backgroundColor: {
|
|
10
|
+
on: string;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
borderRadius: {
|
|
14
|
+
default: number;
|
|
15
|
+
on: number;
|
|
16
|
+
};
|
|
17
|
+
width: number;
|
|
18
|
+
padding: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface KitIconProps extends IconBaseComponent, HTMLAttributes<HTMLSpanElement> {
|
|
22
|
+
on?: boolean;
|
|
23
|
+
hoverable?: boolean;
|
|
24
|
+
color?: string;
|
|
25
|
+
rev?: any;
|
|
26
|
+
displayName?: string;
|
|
27
|
+
icon: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
onClick?: MouseEventHandler<HTMLSpanElement> | undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface StyledKitIconProps extends KitIconProps {
|
|
33
|
+
$on?: boolean;
|
|
34
|
+
$hoverable?: boolean;
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const TITLE_ELE_LIST: readonly [1, 2, 3, 4, 5, 6, 7];
|
|
2
|
+
export declare const fontBaseCss: import("styled-components").RuleSet<object>;
|
|
3
|
+
export declare const sizeTofontSize: {
|
|
4
|
+
large: number;
|
|
5
|
+
medium: number;
|
|
6
|
+
small: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const getWeightClassname: (props: any) => string;
|
|
9
|
+
export declare const textStyles: import("styled-components").RuleSet<{
|
|
10
|
+
size: number;
|
|
11
|
+
weight: string;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { KitLinkProps, KitTextProps, KitTitleProps } from './types';
|
|
3
|
+
type CompoundedComponent = {
|
|
4
|
+
Title: React.FunctionComponent<KitTitleProps>;
|
|
5
|
+
Text: React.FunctionComponent<KitTextProps>;
|
|
6
|
+
Link: React.FunctionComponent<KitLinkProps>;
|
|
7
|
+
Paragraph: React.FunctionComponent<KitTextProps>;
|
|
8
|
+
displayName?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const KitTypography: CompoundedComponent;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { BlockProps, EllipsisConfig, Base } from 'antd/lib/typography/Base';
|
|
2
|
+
import { TITLE_ELE_LIST } from './commons';
|
|
3
|
+
|
|
4
|
+
type antdTitleTypesToOmit = 'type' | 'editable' | 'code' | 'italic' | 'keyboard' | 'mark' | 'underline';
|
|
5
|
+
|
|
6
|
+
export interface KitTitleProps
|
|
7
|
+
extends Omit<BlockProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7'>, 'strong'>,
|
|
8
|
+
Omit<
|
|
9
|
+
React.HTMLAttributes<HTMLHeadElement>,
|
|
10
|
+
antdTitleTypesToOmit | keyof BlockProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7'>
|
|
11
|
+
> {
|
|
12
|
+
level?: (typeof TITLE_ELE_LIST)[number];
|
|
13
|
+
regular?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type kitTextSize = 'small' | 'medium' | 'large';
|
|
17
|
+
type kitTextWeight = 'bold' | 'medium' | 'regular';
|
|
18
|
+
|
|
19
|
+
type antdTextTypesToOmit = 'code' | 'mark' | 'keyboard' | 'delete' | 'strong' | 'italic';
|
|
20
|
+
|
|
21
|
+
export interface KitTextProps
|
|
22
|
+
extends BlockProps<'span'>,
|
|
23
|
+
Omit<React.HTMLAttributes<HTMLSpanElement>, 'type' | keyof BlockProps<'span'>> {
|
|
24
|
+
ellipsis?: boolean | Omit<EllipsisConfig, 'onExpand'>;
|
|
25
|
+
size?: kitTextSize;
|
|
26
|
+
weight?: kitTextWeight;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface KitLinkProps
|
|
30
|
+
extends BlockProps<'a'>,
|
|
31
|
+
Omit<React.AllHTMLAttributes<HTMLAnchorElement>, 'type' | keyof BlockProps<'a>'>> {
|
|
32
|
+
ellipsis?: boolean;
|
|
33
|
+
size?: kitTextSize;
|
|
34
|
+
weight?: kitTextWeight;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface KitBaseProps extends Base {
|
|
38
|
+
component: keyof JSX.IntrinsicElements;
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {DividerProps} from 'antd';
|
|
2
|
+
import {HTMLAttributes} from 'react';
|
|
3
|
+
|
|
4
|
+
export type AntdDividerTypesToOmit = 'style' | 'plain';
|
|
5
|
+
|
|
6
|
+
export type KitDividerColor = 'default' | 'lightGrey';
|
|
7
|
+
|
|
8
|
+
export interface KitDividerProps extends Omit<DividerProps, AntdDividerTypesToOmit>, HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
noMargin?: boolean;
|
|
10
|
+
color?: KitDividerColor;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { KitColProps, KitRowProps } from './types';
|
|
3
|
+
type CompoundedComponent = {
|
|
4
|
+
Row: React.FunctionComponent<KitRowProps>;
|
|
5
|
+
Col: React.FunctionComponent<KitColProps>;
|
|
6
|
+
displayName?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const KitGrid: CompoundedComponent;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {ColProps, RowProps} from 'antd';
|
|
2
|
+
import {HTMLAttributes} from 'react';
|
|
3
|
+
|
|
4
|
+
type KitGridJustify = 'start' | 'end' | 'center';
|
|
5
|
+
|
|
6
|
+
type AntdRowTypesToOmit = 'gutter' | 'justify';
|
|
7
|
+
|
|
8
|
+
export interface KitRowProps extends Omit<RowProps, AntdRowTypesToOmit>, HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
justify?: KitGridJustify;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface KitColProps extends ColProps, HTMLAttributes<HTMLDivElement> {}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { KitSpaceProps } from './types';
|
|
3
|
+
import { SpaceCompactProps } from 'antd/es/space/Compact';
|
|
4
|
+
type CompoundedComponent = React.FunctionComponent<KitSpaceProps> & {
|
|
5
|
+
Compact: React.FunctionComponent<SpaceCompactProps>;
|
|
6
|
+
};
|
|
7
|
+
export declare const KitSpace: CompoundedComponent;
|
|
8
|
+
export {};
|