aristid-ds 0.6.4 → 0.6.6
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/Kit/App/types.d.ts +6 -0
- package/dist/Kit/DataDisplay/Avatar/types.d.ts +16 -0
- package/dist/Kit/DataDisplay/Badge/types.d.ts +10 -0
- package/dist/Kit/DataDisplay/Card/types.d.ts +30 -0
- package/dist/Kit/DataDisplay/Collapse/types.d.ts +32 -0
- package/dist/Kit/DataDisplay/Image/types.d.ts +14 -0
- package/dist/Kit/DataDisplay/ItemList/types.d.ts +14 -0
- package/dist/Kit/DataDisplay/Tabs/types.d.ts +16 -0
- package/dist/Kit/DataDisplay/Tooltip/types.d.ts +9 -0
- package/dist/Kit/DataDisplay/Tree/types.d.ts +19 -0
- package/dist/Kit/DataEntry/AutoComplete/types.d.ts +9 -0
- package/dist/Kit/DataEntry/Checkbox/types.d.ts +50 -0
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +23 -0
- package/dist/Kit/DataEntry/Input/types.d.ts +36 -0
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +11 -0
- package/dist/Kit/DataEntry/Radio/types.d.ts +71 -0
- package/dist/Kit/DataEntry/Rate/types.d.ts +11 -0
- package/dist/Kit/DataEntry/Select/types.d.ts +49 -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/types.d.ts +53 -0
- package/dist/Kit/DataEntry/Tag/types.d.ts +13 -0
- package/dist/Kit/DataEntry/Upload/types.d.ts +20 -0
- package/dist/Kit/Feedback/Alert/types.d.ts +8 -0
- package/dist/Kit/Feedback/Modal/types.d.ts +72 -0
- package/dist/Kit/Feedback/Notification/types.d.ts +22 -0
- package/dist/Kit/Feedback/Progress/types.d.ts +9 -0
- package/dist/Kit/Feedback/SnackBar/types.d.ts +16 -0
- package/dist/Kit/General/Button/types.d.ts +21 -0
- package/dist/Kit/General/Icon/types.d.ts +36 -0
- package/dist/Kit/General/Typography/types.d.ts +41 -0
- package/dist/Kit/Layout/Divider/types.d.ts +11 -0
- package/dist/Kit/Layout/Grid/types.d.ts +12 -0
- package/dist/Kit/Layout/Space/types.d.ts +15 -0
- package/dist/Kit/Navigation/Breadcrumb/types.d.ts +4 -0
- package/dist/Kit/Navigation/DropDown/types.d.ts +6 -0
- package/dist/Kit/Navigation/Header/types.d.ts +11 -0
- package/dist/Kit/Navigation/Menu/types.d.ts +34 -0
- package/dist/Kit/Navigation/Pagination/types.d.ts +17 -0
- package/dist/Kit/Navigation/Steps/types.d.ts +12 -0
- package/dist/index.es.js +248 -248
- package/dist/index.js +3786 -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/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/types.d.ts +183 -0
- package/dist/vite-env.d.ts +1 -0
- package/package.json +16 -12
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {AvatarProps} from 'antd';
|
|
2
|
+
import {GroupProps} from 'antd/es/avatar';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
|
|
5
|
+
type AntdAvatarTypesToOmit = '';
|
|
6
|
+
type AntdAvatarGroupTypesToOmit = 'maxStyle';
|
|
7
|
+
|
|
8
|
+
export type KitAvatarColorType = 'default' | 'blueInvert';
|
|
9
|
+
|
|
10
|
+
export interface KitAvatarProps extends Omit<AvatarProps, AntdAvatarTypesToOmit>, KitHTMLAttributes<HTMLSpanElement> {
|
|
11
|
+
color?: KitAvatarColorType;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface KitAvatarGroupProps
|
|
15
|
+
extends Omit<GroupProps, AntdAvatarGroupTypesToOmit>,
|
|
16
|
+
KitHTMLAttributes<HTMLDivElement> {}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {BadgeProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
type AntdBadgeTypesToOmit = 'color' | 'size' | 'offset' | 'text';
|
|
5
|
+
|
|
6
|
+
export type KitBadgeCountColor = 'default' | 'green' | 'blue' | 'blueInvert' | 'gray';
|
|
7
|
+
|
|
8
|
+
export interface KitBadgeProps extends Omit<BadgeProps, AntdBadgeTypesToOmit>, KitHTMLAttributes<HTMLDivElement> {
|
|
9
|
+
countColor?: KitBadgeCountColor;
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
2
|
+
import {KitTagProps} from '../../DataEntry/Tag/types';
|
|
3
|
+
import {ReactNode} from 'react';
|
|
4
|
+
import {CheckboxChangeEvent} from 'antd/es/checkbox';
|
|
5
|
+
|
|
6
|
+
export type cardColor = {
|
|
7
|
+
label: string;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export interface KitColorbarProps {
|
|
12
|
+
colors?: cardColor[] | null;
|
|
13
|
+
vertical?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//TODO change title wording and delete omit<title>
|
|
18
|
+
export default interface KitCardProps extends Omit<KitHTMLAttributes<HTMLDivElement>, 'title'> {
|
|
19
|
+
vertical?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
colors?: cardColor[] | null;
|
|
22
|
+
picture?: ReactNode;
|
|
23
|
+
title?: ReactNode;
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
extrainfo?: ReactNode;
|
|
26
|
+
tags?: KitTagProps[] | string[];
|
|
27
|
+
actions?: ReactNode[];
|
|
28
|
+
onSelectChange?: (e: CheckboxChangeEvent) => void;
|
|
29
|
+
onEdit?: () => void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {CollapseProps} from 'antd';
|
|
2
|
+
import {MouseEventHandler, ReactNode} from 'react';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
import {CheckboxChangeEvent} from 'antd/es/checkbox';
|
|
5
|
+
import {MenuInfo} from '../../';
|
|
6
|
+
|
|
7
|
+
type AntdCollapseTypesToOmit = 'bordered' | 'expandIconPosition' | 'ghost';
|
|
8
|
+
|
|
9
|
+
export interface KitCollapseProps
|
|
10
|
+
extends Omit<CollapseProps, AntdCollapseTypesToOmit>,
|
|
11
|
+
KitHTMLAttributes<HTMLDivElement> {}
|
|
12
|
+
|
|
13
|
+
export interface KitHeaderProps {
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
imageSrc?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
tagContent?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface KitHeaderExtraAction {
|
|
22
|
+
icon: ReactNode;
|
|
23
|
+
label: string;
|
|
24
|
+
onClick?: (e: MouseEvent<HTMLElement, MouseEvent> | MenuInfo) => void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface KitHeaderExtraActions extends Array<KitHeaderExtraAction> {}
|
|
28
|
+
|
|
29
|
+
export interface KitHeaderExtraProps {
|
|
30
|
+
onSelectChange?: (e: CheckboxChangeEvent) => void;
|
|
31
|
+
actions?: KitHeaderExtraActions;
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type {ImageProps} from 'antd';
|
|
2
|
+
import {ReactElement} from 'react';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
|
|
5
|
+
export interface KitImageProps extends ImageProps, KitHTMLAttributes<HTMLDivElement> {
|
|
6
|
+
rounded?: boolean;
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
PreviewGroup?: ReactElement;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface themeProps {
|
|
12
|
+
borderRadius: number;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
2
|
+
import {ReactNode} from 'react';
|
|
3
|
+
import {CheckboxChangeEvent} from 'antd/es/checkbox';
|
|
4
|
+
|
|
5
|
+
export interface KitItemListProps extends KitHTMLAttributes<HTMLDivElement> {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
picture?: ReactNode;
|
|
9
|
+
onSelectChange?: (e: CheckboxChangeEvent) => void;
|
|
10
|
+
tagNumber?: number;
|
|
11
|
+
onRafterClick?: Function;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
onClick?: Function;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type {TabsProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface KitTabsProps extends TabsProps, KitHTMLAttributes<HTMLDivElement> {}
|
|
5
|
+
|
|
6
|
+
export interface KitTabsThemeProps {
|
|
7
|
+
extra: {
|
|
8
|
+
borderRadius: number;
|
|
9
|
+
borderColor: string;
|
|
10
|
+
padding: string;
|
|
11
|
+
height: number;
|
|
12
|
+
color: string;
|
|
13
|
+
verticalMargin: number;
|
|
14
|
+
horizontalMargin: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {TooltipProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
type AntdTooltipTypesToOmit = 'color' | 'overlayClassName' | 'overlayStyle' | 'overlayInnerStyle';
|
|
5
|
+
|
|
6
|
+
//TODO change title wording and delete Omit<title>
|
|
7
|
+
export interface KitTooltipProps
|
|
8
|
+
extends Omit<TooltipProps, AntdTooltipTypesToOmit>,
|
|
9
|
+
Omit<KitHTMLAttributes<HTMLDivElement>, 'title'> {}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type {BasicDataNode} from 'rc-tree';
|
|
2
|
+
import {TreeProps} from 'antd';
|
|
3
|
+
import {DataNode} from 'antd/es/tree';
|
|
4
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
5
|
+
|
|
6
|
+
type AntdTreeTypesToOmit =
|
|
7
|
+
| 'blockNode'
|
|
8
|
+
| 'draggable'
|
|
9
|
+
| 'onDragEnd'
|
|
10
|
+
| 'onDragEnter'
|
|
11
|
+
| 'onDragLeave'
|
|
12
|
+
| 'onDragOver'
|
|
13
|
+
| 'onDragStart'
|
|
14
|
+
| 'onDrop'
|
|
15
|
+
| 'filterTreeNode';
|
|
16
|
+
|
|
17
|
+
export interface KitTreeProps
|
|
18
|
+
extends Omit<TreeProps<BasicDataNode | DataNode>, AntdTreeTypesToOmit>,
|
|
19
|
+
KitHTMLAttributes<HTMLDivElement> {}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type {AutoCompleteProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface KitAutoCompleteProps extends AutoCompleteProps, KitHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
label?: string;
|
|
6
|
+
helper?: string;
|
|
7
|
+
allowClear?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {CheckboxProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface KitCheckboxProps extends CheckboxProps, KitHTMLAttributes<HTMLLabelElement> {
|
|
5
|
+
danger?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface KitCheckboxTheme {
|
|
9
|
+
fontWeight: {
|
|
10
|
+
default: string | number;
|
|
11
|
+
checked: string | number;
|
|
12
|
+
};
|
|
13
|
+
borderWidth: string;
|
|
14
|
+
color: {
|
|
15
|
+
default: string;
|
|
16
|
+
disabled: string;
|
|
17
|
+
danger: {
|
|
18
|
+
default: string;
|
|
19
|
+
disabled: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
backgroundColor: {
|
|
23
|
+
default: string;
|
|
24
|
+
hover: string;
|
|
25
|
+
active: string;
|
|
26
|
+
focus: string;
|
|
27
|
+
disabled: string;
|
|
28
|
+
danger: {
|
|
29
|
+
default: string;
|
|
30
|
+
hover: string;
|
|
31
|
+
active: string;
|
|
32
|
+
focus: string;
|
|
33
|
+
disabled: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
borderColor: {
|
|
37
|
+
default: string;
|
|
38
|
+
hover: string;
|
|
39
|
+
active: string;
|
|
40
|
+
focus: string;
|
|
41
|
+
disabled: string;
|
|
42
|
+
danger: {
|
|
43
|
+
default: string;
|
|
44
|
+
hover: string;
|
|
45
|
+
active: string;
|
|
46
|
+
focus: string;
|
|
47
|
+
disabled: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {DatePickerProps, RangePickerProps} from 'antd/lib/date-picker';
|
|
2
|
+
|
|
3
|
+
// Use "never" instead of Omit properties to avoid issues with Antd type/interface declarations
|
|
4
|
+
interface InternalDatePickerProps {
|
|
5
|
+
size?: never;
|
|
6
|
+
bordered?: never;
|
|
7
|
+
label?: string;
|
|
8
|
+
helper?: string;
|
|
9
|
+
allowClear?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type KitDatePickerProps = DatePickerProps & InternalDatePickerProps;
|
|
13
|
+
|
|
14
|
+
// Use "never" instead of Omit properties to avoid issues with Antd type/interface declarations
|
|
15
|
+
interface InternalRangerPickerProps {
|
|
16
|
+
size?: never;
|
|
17
|
+
bordered?: never;
|
|
18
|
+
label?: string;
|
|
19
|
+
helper?: string;
|
|
20
|
+
allowClear?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type KitRangePickerProps = RangePickerProps & InternalRangerPickerProps;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {InputProps} from 'antd';
|
|
2
|
+
import {PasswordProps, TextAreaProps} from 'antd/es/input';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
|
|
5
|
+
type AntdInputTypesToOmit = 'styles' | 'type' | 'bordered' | 'size' | 'addonBefore' | 'addonAfter';
|
|
6
|
+
|
|
7
|
+
export interface KitInputProps
|
|
8
|
+
extends Omit<InputProps, AntdInputTypesToOmit>,
|
|
9
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement> {
|
|
10
|
+
label?: string;
|
|
11
|
+
helper?: string;
|
|
12
|
+
allowClear?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface KitTextAreaProps
|
|
16
|
+
extends Omit<TextAreaProps, AntdInputTypesToOmit>,
|
|
17
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement> {
|
|
18
|
+
label?: string;
|
|
19
|
+
helper?: string;
|
|
20
|
+
allowClear?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface KitPasswordProps
|
|
24
|
+
extends Omit<PasswordProps, AntdInputTypesToOmit>,
|
|
25
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement> {
|
|
26
|
+
label?: string;
|
|
27
|
+
helper?: string;
|
|
28
|
+
allowClear?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface KitInputWrapperProps extends KitHTMLAttributes<HTMLDivElement> {
|
|
32
|
+
label?: string;
|
|
33
|
+
helper?: string;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
status?: '' | 'warning' | 'error';
|
|
36
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {InputNumberProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
type AntdInputNumberTypesToOmit = 'size' | 'addonBefore' | 'addonAfter' | 'borderless';
|
|
5
|
+
|
|
6
|
+
export interface KitInputNumberProps
|
|
7
|
+
extends Omit<InputNumberProps, AntdInputNumberTypesToOmit>,
|
|
8
|
+
KitHTMLAttributes<HTMLSpanElement | HTMLInputElement> {
|
|
9
|
+
label?: string;
|
|
10
|
+
helper?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {RadioProps, RadioGroupProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
import {ReactNode, CSSProperties} from 'react';
|
|
4
|
+
|
|
5
|
+
export interface KitRadioProps extends RadioProps, KitHTMLAttributes<HTMLLabelElement> {
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
prefixCls?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
defaultValue?: any;
|
|
12
|
+
value?: any;
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface StyledKitRadioProps extends RadioProps {}
|
|
18
|
+
|
|
19
|
+
export interface KitRadioGroupProps extends RadioGroupProps, KitHTMLAttributes<HTMLDivElement> {
|
|
20
|
+
defaultValue?: any;
|
|
21
|
+
value?: any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface KitRadioTheme {
|
|
25
|
+
fontWeight: {
|
|
26
|
+
default: string | number;
|
|
27
|
+
checked: string | number;
|
|
28
|
+
};
|
|
29
|
+
borderWidth: string;
|
|
30
|
+
color: {
|
|
31
|
+
default: string;
|
|
32
|
+
disabled: string;
|
|
33
|
+
enabled: string;
|
|
34
|
+
danger: {
|
|
35
|
+
default: string;
|
|
36
|
+
disabled: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
backgroundColor: {
|
|
40
|
+
default: string;
|
|
41
|
+
checked: string;
|
|
42
|
+
hover: string;
|
|
43
|
+
disabled: string;
|
|
44
|
+
danger: {
|
|
45
|
+
default: string;
|
|
46
|
+
hover: string;
|
|
47
|
+
disabled: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
borderColor: {
|
|
51
|
+
default: string;
|
|
52
|
+
checked: string;
|
|
53
|
+
hover: string;
|
|
54
|
+
disabled: string;
|
|
55
|
+
danger: {
|
|
56
|
+
default: string;
|
|
57
|
+
hover: string;
|
|
58
|
+
disabled: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
bulletColor: {
|
|
62
|
+
default: string;
|
|
63
|
+
hover: string;
|
|
64
|
+
disabled: string;
|
|
65
|
+
danger: {
|
|
66
|
+
default: string;
|
|
67
|
+
hover: string;
|
|
68
|
+
disabled: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {RateProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
type AntdRateTypesToOmit = '';
|
|
5
|
+
|
|
6
|
+
export type KitRateColor = 'default' | 'red' | 'green' | 'blue';
|
|
7
|
+
|
|
8
|
+
export interface KitRateProps extends Omit<RateProps, AntdRateTypesToOmit>, KitHTMLAttributes<HTMLDivElement> {
|
|
9
|
+
color?: KitRateColor;
|
|
10
|
+
disabledStarTransparency?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {SelectProps} from 'antd';
|
|
2
|
+
import {BaseOptionType, DefaultOptionType} from 'antd/es/select';
|
|
3
|
+
import type {OptionProps} from 'rc-select/lib/Option';
|
|
4
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
5
|
+
import {ReactNode} from 'react';
|
|
6
|
+
|
|
7
|
+
export type AntdSelectTypesToOmit =
|
|
8
|
+
| 'dropdownMatchSelectWidth'
|
|
9
|
+
| 'options'
|
|
10
|
+
| 'bordered'
|
|
11
|
+
| 'fieldNames'
|
|
12
|
+
| 'filterOption'
|
|
13
|
+
| 'filterSort'
|
|
14
|
+
| 'labelInValue'
|
|
15
|
+
| 'maxTagCount'
|
|
16
|
+
| 'maxTagPlaceholder'
|
|
17
|
+
| 'maxTagTextLength'
|
|
18
|
+
| 'notFoundContent'
|
|
19
|
+
| 'optionFilterProp'
|
|
20
|
+
| 'optionLabelProp'
|
|
21
|
+
| 'removeIcon'
|
|
22
|
+
| 'searchValue'
|
|
23
|
+
| 'showSearch'
|
|
24
|
+
| 'size'
|
|
25
|
+
| 'tokenSeparators'
|
|
26
|
+
| 'virtual'
|
|
27
|
+
| 'clearIcon'
|
|
28
|
+
| 'onDeselect'
|
|
29
|
+
| 'onInputKeyDown'
|
|
30
|
+
| 'dropdownStyle'
|
|
31
|
+
| 'menuItemSelectedIcon';
|
|
32
|
+
|
|
33
|
+
export interface KitSelectProps
|
|
34
|
+
extends Omit<SelectProps<any, DefaultOptionType | BaseOptionType>, AntdSelectTypesToOmit>,
|
|
35
|
+
KitHTMLAttributes<HTMLDivElement> {
|
|
36
|
+
label?: string;
|
|
37
|
+
helper?: string;
|
|
38
|
+
allowClear?: boolean;
|
|
39
|
+
oneLineTags?: boolean;
|
|
40
|
+
options?: KitOptionProps[];
|
|
41
|
+
labelOnly?: boolean | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface KitOptionProps extends Omit<OptionProps, 'children'> {
|
|
45
|
+
icon?: ReactNode;
|
|
46
|
+
color?: string;
|
|
47
|
+
label?: string;
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {SliderSingleProps} from 'antd';
|
|
2
|
+
import {SliderMarks, SliderRangeProps} from 'antd/es/slider';
|
|
3
|
+
|
|
4
|
+
type AntdSliderTypesToOmit = 'vertical' | 'trackStyle' | 'railStyle' | 'handleStyle' | 'marks';
|
|
5
|
+
|
|
6
|
+
interface SliderIcons {
|
|
7
|
+
startIcon?: any;
|
|
8
|
+
endIcon?: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type KitSliderMarks = SliderMarks;
|
|
12
|
+
|
|
13
|
+
export interface KitSliderSingleProps extends Omit<SliderSingleProps, AntdSliderTypesToOmit>, SliderIcons {
|
|
14
|
+
marks?: KitSliderMarks;
|
|
15
|
+
}
|
|
16
|
+
export interface KitSliderRangeProps extends Omit<SliderRangeProps, AntdSliderTypesToOmit>, SliderIcons {
|
|
17
|
+
marks?: KitSliderMarks;
|
|
18
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {SwitchProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface KitSwitchProps extends SwitchProps, KitHTMLAttributes<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,13 @@
|
|
|
1
|
+
import {TagProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
import {ReactNode} from 'react';
|
|
4
|
+
|
|
5
|
+
export type AntdTagPropsToOmit = 'color' | 'checkableTag' | 'icon' | 'closable';
|
|
6
|
+
|
|
7
|
+
export type KitTagColor = 'red' | 'green' | 'blue' | 'blueInvert' | 'default';
|
|
8
|
+
|
|
9
|
+
export interface KitTagProps extends Omit<TagProps, AntdTagPropsToOmit>, KitHTMLAttributes<HTMLSpanElement> {
|
|
10
|
+
color?: KitTagColor;
|
|
11
|
+
children?: ReactNode[] | ReactNode;
|
|
12
|
+
onClose?: TagProps['onClose'];
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {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,8 @@
|
|
|
1
|
+
import {AlertProps} from 'antd';
|
|
2
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
3
|
+
|
|
4
|
+
type AntdAlertTypesToOmit = 'closeText' | 'closeIcon' | 'action' | 'icon';
|
|
5
|
+
|
|
6
|
+
export interface KitAlertProps
|
|
7
|
+
extends Omit<AlertProps, AntdAlertTypesToOmit>,
|
|
8
|
+
Omit<KitHTMLAttributes<HTMLDivElement>, 'role'> {}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {HTMLAttributes, ReactNode} from 'react';
|
|
2
|
+
import type ReactModal from 'react-modal';
|
|
3
|
+
import {KitHTMLAttributes} from '../../../types';
|
|
4
|
+
|
|
5
|
+
type propsToOmit =
|
|
6
|
+
| 'bodyOpenClassName'
|
|
7
|
+
| 'htmlOpenClassName'
|
|
8
|
+
| 'closeTimeoutMS'
|
|
9
|
+
| 'overlayRef'
|
|
10
|
+
| 'contentRef'
|
|
11
|
+
| 'overlayElement'
|
|
12
|
+
| 'contentElement';
|
|
13
|
+
|
|
14
|
+
//todo delete Omit<title role className style>
|
|
15
|
+
export interface KitModalProps
|
|
16
|
+
extends Omit<ReactModal.Props, propsToOmit>,
|
|
17
|
+
Omit<KitHTMLAttributes<HTMLDivElement>, 'title' | 'role' | 'className' | 'style'> {
|
|
18
|
+
width?: string;
|
|
19
|
+
showCloseIcon?: boolean;
|
|
20
|
+
close?: (args: any[]) => void;
|
|
21
|
+
title?: ReactNode;
|
|
22
|
+
footer?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface confirmDialogProps extends KitModalProps {
|
|
26
|
+
type: 'info' | 'success' | 'warning' | 'error' | 'warn' | 'confirm';
|
|
27
|
+
image?: string;
|
|
28
|
+
icon?: ReactNode;
|
|
29
|
+
firstLine?: ReactNode;
|
|
30
|
+
secondLine?: ReactNode;
|
|
31
|
+
okCancel?: boolean;
|
|
32
|
+
title?: string;
|
|
33
|
+
cancelText?: string;
|
|
34
|
+
close?: (...args: any[]) => void;
|
|
35
|
+
okText?: string;
|
|
36
|
+
onCancel?: () => {};
|
|
37
|
+
onOk?: () => {};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ConfigUpdate = confirmDialogProps | ((prevConfig: confirmDialogProps) => confirmDialogProps);
|
|
41
|
+
|
|
42
|
+
export type ModalFunc = (props: confirmDialogProps) => {
|
|
43
|
+
destroy: () => void;
|
|
44
|
+
update: (configUpdate: ConfigUpdate) => void;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export interface modalThemeProps {
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
fontFamily: string;
|
|
50
|
+
fontSize: {
|
|
51
|
+
title: number;
|
|
52
|
+
content: number;
|
|
53
|
+
};
|
|
54
|
+
fontWeight: {
|
|
55
|
+
title: number | string;
|
|
56
|
+
content: number | string;
|
|
57
|
+
};
|
|
58
|
+
itemsVerticalSpacing: 24;
|
|
59
|
+
textVerticalSpacing: 8;
|
|
60
|
+
icon: {
|
|
61
|
+
successColor: string;
|
|
62
|
+
successBgColor: string;
|
|
63
|
+
errorColor: string;
|
|
64
|
+
errorBgColor: string;
|
|
65
|
+
warngingColor: string;
|
|
66
|
+
warngingBgColor: string;
|
|
67
|
+
};
|
|
68
|
+
borderRadius: number;
|
|
69
|
+
imageBorderColor: string;
|
|
70
|
+
overlayColor: string;
|
|
71
|
+
boxShadow: string;
|
|
72
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {ArgsProps} from 'antd/lib/notification/interface';
|
|
2
|
+
|
|
3
|
+
export type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
4
|
+
|
|
5
|
+
type AntdArgsPropsTypesToOmit = 'message' | 'description' | 'placement';
|
|
6
|
+
|
|
7
|
+
export interface KitNotificationArgsProps extends Omit<ArgsProps, AntdArgsPropsTypesToOmit> {
|
|
8
|
+
message: string;
|
|
9
|
+
description: string;
|
|
10
|
+
placement?: NotificationPlacement;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type KitNotificationStaticFn = (args: KitNotificationArgsProps) => void;
|
|
14
|
+
|
|
15
|
+
export interface KitNotification {
|
|
16
|
+
error: KitNotificationStaticFn;
|
|
17
|
+
warning: KitNotificationStaticFn;
|
|
18
|
+
success: KitNotificationStaticFn;
|
|
19
|
+
info: KitNotificationStaticFn;
|
|
20
|
+
destroy: (key?: React.Key) => void;
|
|
21
|
+
open: KitNotificationStaticFn;
|
|
22
|
+
}
|