x-ui-design 1.0.31-gamma.1 → 1.0.33
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/.github/workflows/x-ui-design.yml +14 -0
- package/README.md +22 -1
- package/compile.sh +15 -0
- package/dist/{components → esm/types/components}/DatePicker/DatePicker.d.ts +2 -1
- package/dist/{components → esm/types/components}/DatePicker/RangePicker/RangePicker.d.ts +2 -1
- package/dist/{components → esm/types/components}/Dropdown/Dropdown.d.ts +2 -1
- package/dist/{components → esm/types/components}/Empty/Empty.d.ts +2 -1
- package/dist/{components → esm/types/components}/Form/Item/Item.d.ts +2 -1
- package/dist/esm/types/components/Icons/Icons.d.ts +19 -0
- package/dist/{components → esm/types/components}/Input/Input.d.ts +2 -1
- package/dist/{components → esm/types/components}/Input/Textarea/Textarea.d.ts +2 -1
- package/dist/{components → esm/types/components}/Popover/Popover.d.ts +2 -1
- package/dist/{components → esm/types/components}/Radio/Button/Button.d.ts +2 -1
- package/dist/{components → esm/types/components}/Radio/Group/Group.d.ts +2 -1
- package/dist/{components → esm/types/components}/Radio/Radio.d.ts +2 -1
- package/dist/{components → esm/types/components}/Result/Result.d.ts +2 -1
- package/dist/{components → esm/types/components}/Switch/Switch.d.ts +2 -1
- package/dist/{components → esm/types/components}/Upload/Upload.d.ts +2 -1
- package/dist/esm/types/index.d.ts +50 -0
- package/dist/{types → esm/types/types}/input.d.ts +2 -2
- package/dist/index.d.ts +144 -1
- package/dist/index.esm.js +4233 -3792
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4338 -3897
- package/dist/index.js.map +1 -1
- package/eslint.config.mjs +16 -0
- package/lib/components/Button/Button.tsx +136 -0
- package/lib/components/Button/index.ts +1 -0
- package/lib/components/Button/style.css +197 -0
- package/lib/components/Checkbox/Checkbox.tsx +131 -0
- package/lib/components/Checkbox/index.ts +1 -0
- package/lib/components/Checkbox/style.css +95 -0
- package/lib/components/ConditionalWrapper/index.tsx +12 -0
- package/lib/components/DatePicker/DatePicker.tsx +526 -0
- package/lib/components/DatePicker/RangePicker/RangePicker.tsx +500 -0
- package/lib/components/DatePicker/RangePicker/index.ts +1 -0
- package/lib/components/DatePicker/RangePicker/style.css +434 -0
- package/lib/components/DatePicker/TimePicker/TimePicker.tsx +497 -0
- package/lib/components/DatePicker/TimePicker/index.ts +1 -0
- package/lib/components/DatePicker/TimePicker/style.css +197 -0
- package/lib/components/DatePicker/index.ts +1 -0
- package/lib/components/DatePicker/style.css +318 -0
- package/lib/components/Dropdown/Dropdown.tsx +234 -0
- package/lib/components/Dropdown/index.ts +1 -0
- package/lib/components/Dropdown/style.css +124 -0
- package/lib/components/Empty/Empty.tsx +45 -0
- package/lib/components/Empty/index.ts +1 -0
- package/lib/components/Empty/style.css +13 -0
- package/lib/components/Form/Form.tsx +130 -0
- package/lib/components/Form/Item/Item.tsx +294 -0
- package/lib/components/Form/Item/index.ts +1 -0
- package/lib/components/Form/Item/style.css +61 -0
- package/lib/components/Form/index.ts +1 -0
- package/lib/components/Icons/Icons.tsx +433 -0
- package/lib/components/Icons/index.ts +15 -0
- package/lib/components/Input/Input.tsx +218 -0
- package/lib/components/Input/Textarea/Textarea.tsx +110 -0
- package/lib/components/Input/Textarea/index.ts +1 -0
- package/lib/components/Input/Textarea/style.css +104 -0
- package/lib/components/Input/index.ts +1 -0
- package/lib/components/Input/style.css +137 -0
- package/lib/components/Menu/Item/Item.tsx +65 -0
- package/lib/components/Menu/Menu.tsx +261 -0
- package/lib/components/Menu/SubMenu/SubMenu.tsx +68 -0
- package/lib/components/Menu/index.css +145 -0
- package/lib/components/Menu/index.ts +1 -0
- package/lib/components/Popover/Popover.tsx +135 -0
- package/lib/components/Popover/index.ts +1 -0
- package/lib/components/Popover/style.css +82 -0
- package/lib/components/Radio/Button/Button.tsx +42 -0
- package/lib/components/Radio/Button/index.ts +1 -0
- package/lib/components/Radio/Button/style.css +43 -0
- package/lib/components/Radio/Group/Group.tsx +105 -0
- package/lib/components/Radio/Group/index.ts +1 -0
- package/lib/components/Radio/Group/style.css +53 -0
- package/lib/components/Radio/Radio.tsx +83 -0
- package/lib/components/Radio/index.ts +1 -0
- package/lib/components/Radio/style.css +73 -0
- package/lib/components/Result/Result.tsx +39 -0
- package/lib/components/Result/index.ts +1 -0
- package/lib/components/Result/style.css +173 -0
- package/lib/components/Select/Option/Option.tsx +49 -0
- package/lib/components/Select/Option/index.ts +1 -0
- package/lib/components/Select/Option/style.css +50 -0
- package/lib/components/Select/Select.tsx +935 -0
- package/lib/components/Select/Tag/Tag.tsx +43 -0
- package/lib/components/Select/Tag/index.ts +1 -0
- package/lib/components/Select/Tag/style.css +87 -0
- package/lib/components/Select/index.ts +1 -0
- package/lib/components/Select/style.css +186 -0
- package/lib/components/Skeleton/Avatar/Avatar.tsx +61 -0
- package/lib/components/Skeleton/Avatar/index.ts +1 -0
- package/lib/components/Skeleton/Avatar/style.css +27 -0
- package/lib/components/Skeleton/Button/Button.tsx +44 -0
- package/lib/components/Skeleton/Button/index.ts +1 -0
- package/lib/components/Skeleton/Button/style.css +50 -0
- package/lib/components/Skeleton/Image/Image.tsx +45 -0
- package/lib/components/Skeleton/Image/index.ts +1 -0
- package/lib/components/Skeleton/Image/style.css +23 -0
- package/lib/components/Skeleton/Input/Input.tsx +42 -0
- package/lib/components/Skeleton/Input/index.ts +1 -0
- package/lib/components/Skeleton/Input/style.css +56 -0
- package/lib/components/Skeleton/Skeleton.tsx +97 -0
- package/lib/components/Skeleton/index.ts +1 -0
- package/lib/components/Skeleton/style.css +84 -0
- package/lib/components/Switch/Switch.tsx +68 -0
- package/lib/components/Switch/index.css +50 -0
- package/lib/components/Switch/index.ts +1 -0
- package/lib/components/Upload/Upload.tsx +291 -0
- package/lib/components/Upload/index.ts +1 -0
- package/lib/components/Upload/style.css +151 -0
- package/lib/global.d.ts +1 -0
- package/lib/helpers/flatten.ts +26 -0
- package/lib/helpers/index.ts +52 -0
- package/lib/helpers/mask.ts +52 -0
- package/lib/hooks/useForm.ts +548 -0
- package/lib/hooks/usePosition.ts +206 -0
- package/lib/hooks/useWatch.ts +41 -0
- package/lib/hooks/useWatchError.ts +20 -0
- package/lib/index.ts +184 -0
- package/lib/styles/global.css +57 -0
- package/lib/types/button.ts +83 -0
- package/lib/types/checkbox.ts +32 -0
- package/lib/types/datepicker.ts +165 -0
- package/lib/types/dropdown.ts +41 -0
- package/lib/types/empty.ts +8 -0
- package/lib/types/form.ts +179 -0
- package/lib/types/index.ts +38 -0
- package/lib/types/input.ts +72 -0
- package/lib/types/menu.ts +55 -0
- package/lib/types/popover.ts +16 -0
- package/lib/types/radio.ts +69 -0
- package/lib/types/result.ts +22 -0
- package/lib/types/select.ts +126 -0
- package/lib/types/skeleton.ts +62 -0
- package/lib/types/switch.ts +22 -0
- package/lib/types/upload.ts +67 -0
- package/lib/utils/index.ts +37 -0
- package/lib/utils/lazy.ts +17 -0
- package/next.config.ts +7 -0
- package/package.json +18 -20
- package/rollup.config.js +71 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +48 -0
- package/src/app/layout.d.ts +5 -0
- package/src/app/layout.tsx +16 -0
- package/src/app/page.d.ts +1 -0
- package/src/app/page.tsx +22 -0
- package/tsconfig.json +46 -0
- package/dist/components/Icons/Icons.d.ts +0 -18
- /package/dist/{components → esm/types/components}/Button/Button.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Button/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Checkbox/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/ConditionalWrapper/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/RangePicker/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/TimePicker/TimePicker.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/TimePicker/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Dropdown/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Empty/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Form/Form.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Form/Item/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Form/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Icons/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Input/Textarea/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Input/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/Item/Item.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/Menu.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/SubMenu/SubMenu.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Popover/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Radio/Button/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Radio/Group/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Radio/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Result/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Option/Option.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Option/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Select.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Tag/Tag.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Tag/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Avatar/Avatar.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Avatar/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Button/Button.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Button/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Image/Image.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Image/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Input/Input.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Input/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Switch/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Upload/index.d.ts +0 -0
- /package/dist/{helpers → esm/types/helpers}/flatten.d.ts +0 -0
- /package/dist/{helpers → esm/types/helpers}/index.d.ts +0 -0
- /package/dist/{helpers → esm/types/helpers}/mask.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/useForm.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/usePosition.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/useWatch.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/useWatchError.d.ts +0 -0
- /package/dist/{types → esm/types/types}/button.d.ts +0 -0
- /package/dist/{types → esm/types/types}/checkbox.d.ts +0 -0
- /package/dist/{types → esm/types/types}/datepicker.d.ts +0 -0
- /package/dist/{types → esm/types/types}/dropdown.d.ts +0 -0
- /package/dist/{types → esm/types/types}/empty.d.ts +0 -0
- /package/dist/{types → esm/types/types}/form.d.ts +0 -0
- /package/dist/{types → esm/types/types}/index.d.ts +0 -0
- /package/dist/{types → esm/types/types}/menu.d.ts +0 -0
- /package/dist/{types → esm/types/types}/popover.d.ts +0 -0
- /package/dist/{types → esm/types/types}/radio.d.ts +0 -0
- /package/dist/{types → esm/types/types}/result.d.ts +0 -0
- /package/dist/{types → esm/types/types}/select.d.ts +0 -0
- /package/dist/{types → esm/types/types}/skeleton.d.ts +0 -0
- /package/dist/{types → esm/types/types}/switch.d.ts +0 -0
- /package/dist/{types → esm/types/types}/upload.d.ts +0 -0
- /package/dist/{utils → esm/types/utils}/index.d.ts +0 -0
- /package/dist/{utils → esm/types/utils}/lazy.d.ts +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { FocusEvent, ReactNode } from 'react';
|
|
2
|
+
import { DefaultProps, Placement, RuleType, SizeType } from '.';
|
|
3
|
+
|
|
4
|
+
export interface BaseInfo {
|
|
5
|
+
range?: 'start' | 'end';
|
|
6
|
+
source?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type CustomFormat<RuleType> = (value: RuleType) => string;
|
|
10
|
+
export type FormatType<DateType = RuleType> = string | CustomFormat<DateType>;
|
|
11
|
+
export type PanelMode =
|
|
12
|
+
| 'time'
|
|
13
|
+
| 'date'
|
|
14
|
+
| 'week'
|
|
15
|
+
| 'month'
|
|
16
|
+
| 'quarter'
|
|
17
|
+
| 'year'
|
|
18
|
+
| 'decade';
|
|
19
|
+
|
|
20
|
+
export type TDatePickerProps = DefaultProps & {
|
|
21
|
+
value?: Date;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
error?: boolean;
|
|
25
|
+
feedbackIcons?: boolean;
|
|
26
|
+
locale?: Locale;
|
|
27
|
+
placement?: Placement;
|
|
28
|
+
defaultOpen?: boolean;
|
|
29
|
+
allowClear?:
|
|
30
|
+
| boolean
|
|
31
|
+
| {
|
|
32
|
+
clearIcon?: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
defaultValue?: Date;
|
|
35
|
+
disabledDate?: (
|
|
36
|
+
date: RuleType,
|
|
37
|
+
info: {
|
|
38
|
+
to: RuleType;
|
|
39
|
+
from?: RuleType;
|
|
40
|
+
}
|
|
41
|
+
) => boolean;
|
|
42
|
+
suffixIcon?: ReactNode;
|
|
43
|
+
prefix?: ReactNode;
|
|
44
|
+
size?: SizeType;
|
|
45
|
+
format?:
|
|
46
|
+
| FormatType<RuleType>
|
|
47
|
+
| FormatType<RuleType>[]
|
|
48
|
+
| {
|
|
49
|
+
format: string;
|
|
50
|
+
type?: 'mask';
|
|
51
|
+
};
|
|
52
|
+
onChange?: (
|
|
53
|
+
date: RuleType | RuleType[],
|
|
54
|
+
dateString: string | string[]
|
|
55
|
+
) => void;
|
|
56
|
+
onCalendarChange?: (
|
|
57
|
+
date: RuleType | RuleType[],
|
|
58
|
+
dateString: string | string[],
|
|
59
|
+
info: BaseInfo
|
|
60
|
+
) => void;
|
|
61
|
+
onVisibleChange?: ((open: boolean) => void) | undefined;
|
|
62
|
+
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
63
|
+
showToday?: boolean;
|
|
64
|
+
inputReadOnly?: boolean;
|
|
65
|
+
picker?: PanelMode;
|
|
66
|
+
bordered?: boolean;
|
|
67
|
+
defaultPickerValue?: Date;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type TRangePickerProps = Omit<
|
|
71
|
+
TDatePickerProps,
|
|
72
|
+
'placeholder' | 'value' | 'defaultValue'
|
|
73
|
+
> & {
|
|
74
|
+
placeholder?: string[];
|
|
75
|
+
value?: Date[];
|
|
76
|
+
defaultValue?: Date[];
|
|
77
|
+
separator?: ReactNode;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type Locale = {
|
|
81
|
+
locale: string;
|
|
82
|
+
dateFormat?: string;
|
|
83
|
+
dateTimeFormat?: string;
|
|
84
|
+
fieldDateTimeFormat?: string;
|
|
85
|
+
fieldDateFormat?: string;
|
|
86
|
+
fieldTimeFormat?: string;
|
|
87
|
+
fieldMonthFormat?: string;
|
|
88
|
+
fieldYearFormat?: string;
|
|
89
|
+
fieldWeekFormat?: string;
|
|
90
|
+
fieldQuarterFormat?: string;
|
|
91
|
+
monthBeforeYear?: boolean;
|
|
92
|
+
yearFormat?: string;
|
|
93
|
+
monthFormat?: string;
|
|
94
|
+
cellYearFormat?: string;
|
|
95
|
+
cellQuarterFormat?: string;
|
|
96
|
+
dayFormat?: string;
|
|
97
|
+
cellDateFormat?: string;
|
|
98
|
+
cellMeridiemFormat?: string;
|
|
99
|
+
today: string;
|
|
100
|
+
now: string;
|
|
101
|
+
backToToday: string;
|
|
102
|
+
ok: string;
|
|
103
|
+
timeSelect: string;
|
|
104
|
+
dateSelect: string;
|
|
105
|
+
weekSelect?: string;
|
|
106
|
+
clear: string;
|
|
107
|
+
week: string;
|
|
108
|
+
month: string;
|
|
109
|
+
year: string;
|
|
110
|
+
previousMonth: string;
|
|
111
|
+
nextMonth: string;
|
|
112
|
+
monthSelect: string;
|
|
113
|
+
yearSelect: string;
|
|
114
|
+
decadeSelect: string;
|
|
115
|
+
previousYear: string;
|
|
116
|
+
nextYear: string;
|
|
117
|
+
previousDecade: string;
|
|
118
|
+
nextDecade: string;
|
|
119
|
+
previousCentury: string;
|
|
120
|
+
nextCentury: string;
|
|
121
|
+
shortWeekDays?: string[];
|
|
122
|
+
shortMonths?: string[];
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export interface DisabledTimes {
|
|
126
|
+
disabledHours?: () => number[];
|
|
127
|
+
disabledMinutes?: (hour: number) => number[];
|
|
128
|
+
disabledSeconds?: (hour: number, minute: number) => number[];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type PickerFocusEventHandler = (
|
|
132
|
+
e: FocusEvent<HTMLElement>,
|
|
133
|
+
info: BaseInfo
|
|
134
|
+
) => void;
|
|
135
|
+
|
|
136
|
+
export type DisabledDate<DateType = RuleType> = (
|
|
137
|
+
date: DateType,
|
|
138
|
+
info: {
|
|
139
|
+
type: PanelMode;
|
|
140
|
+
from?: DateType;
|
|
141
|
+
}
|
|
142
|
+
) => boolean;
|
|
143
|
+
|
|
144
|
+
export type TimePickerProps = DefaultProps & {
|
|
145
|
+
disabledTime?: (date: RuleType) => DisabledTimes;
|
|
146
|
+
inputReadOnly?: boolean;
|
|
147
|
+
format?:
|
|
148
|
+
| FormatType<RuleType>
|
|
149
|
+
| FormatType<RuleType>[]
|
|
150
|
+
| {
|
|
151
|
+
format: string;
|
|
152
|
+
type?: 'mask';
|
|
153
|
+
};
|
|
154
|
+
defaultValue?: RuleType | null;
|
|
155
|
+
value?: RuleType | null;
|
|
156
|
+
onChange?: (date: RuleType, dateString: string | string[]) => void;
|
|
157
|
+
onBlur?: PickerFocusEventHandler;
|
|
158
|
+
onSelect?: ((value: Date | null) => void) | undefined;
|
|
159
|
+
showNow?: boolean;
|
|
160
|
+
clearIcon?: ReactNode;
|
|
161
|
+
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
162
|
+
suffixIcon?: ReactNode;
|
|
163
|
+
placeholder?: string;
|
|
164
|
+
placement?: Placement;
|
|
165
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactElement, ReactNode, RefObject } from "react";
|
|
2
|
+
import { DefaultProps, Placement } from ".";
|
|
3
|
+
|
|
4
|
+
export type TriggerType = 'click' | 'hover' | 'contextMenu' | Array<TriggerType>;
|
|
5
|
+
|
|
6
|
+
export interface DropdownItemType {
|
|
7
|
+
key: string;
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onClick?: (e: MouseEvent) => void;
|
|
11
|
+
danger?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare type OverlayFunc = () => ReactElement;
|
|
15
|
+
|
|
16
|
+
export type DropdownProps = DefaultProps & {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
menu?: { items: DropdownItemType[] };
|
|
19
|
+
open?: boolean;
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
onVisibleChange?: ((open: boolean) => void) | undefined;
|
|
22
|
+
trigger?: TriggerType;
|
|
23
|
+
placement?: Placement;
|
|
24
|
+
overlayClassName?: string;
|
|
25
|
+
overlayStyle?: CSSProperties;
|
|
26
|
+
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
27
|
+
destroyOnHidden?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
arrow?: boolean;
|
|
30
|
+
autoFocus?: boolean;
|
|
31
|
+
autoAdjustOverflow?: boolean;
|
|
32
|
+
popupRender?: (node: ReactNode) => ReactNode;
|
|
33
|
+
overlay?: ReactElement | OverlayFunc;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export type DropdownMenuInnerProps = DefaultProps & {
|
|
38
|
+
items: DropdownItemType[];
|
|
39
|
+
menuRef: RefObject<HTMLUListElement | null>;
|
|
40
|
+
onClose: () => void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { ComponentClass, FC, FormEvent, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DefaultProps,
|
|
4
|
+
RuleType,
|
|
5
|
+
RuleTypes,
|
|
6
|
+
SizeType,
|
|
7
|
+
SyntheticBaseEvent
|
|
8
|
+
} from '.';
|
|
9
|
+
import { OptionProps } from './select';
|
|
10
|
+
|
|
11
|
+
export type RuleRender = (form: FormInstance) => RuleObject;
|
|
12
|
+
|
|
13
|
+
export type RuleObject =
|
|
14
|
+
| RuleRender
|
|
15
|
+
| {
|
|
16
|
+
required?: boolean;
|
|
17
|
+
message?: string;
|
|
18
|
+
pattern?: RegExp;
|
|
19
|
+
min?: number;
|
|
20
|
+
max?: number;
|
|
21
|
+
validateBooleanFalse?: boolean;
|
|
22
|
+
warningPattern?: RegExp;
|
|
23
|
+
warningMessage?: string;
|
|
24
|
+
validator?: (
|
|
25
|
+
rule: RuleObject,
|
|
26
|
+
value: RuleTypes,
|
|
27
|
+
callback: (error?: string) => void
|
|
28
|
+
) => Promise<void> | void;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface FieldData {
|
|
32
|
+
name: string | string[];
|
|
33
|
+
value?: RuleTypes;
|
|
34
|
+
errors?: string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type FieldInstancesInputRef = HTMLInputElement | null;
|
|
38
|
+
export type FieldInstancesRef = {
|
|
39
|
+
input?: FieldInstancesInputRef;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export interface FieldError {
|
|
43
|
+
name: string;
|
|
44
|
+
errors: string[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type FormLayoutTypes = 'horizontal' | 'vertical' | 'inline';
|
|
48
|
+
|
|
49
|
+
export type FormProps = DefaultProps & {
|
|
50
|
+
colon?: boolean;
|
|
51
|
+
name?: string;
|
|
52
|
+
layout?: FormLayoutTypes;
|
|
53
|
+
form?: FormInstance;
|
|
54
|
+
size?: SizeType;
|
|
55
|
+
initialValues?: Record<string, RuleTypes>;
|
|
56
|
+
children?: ReactNode;
|
|
57
|
+
component?: false | string | FC<ReactNode> | ComponentClass<ReactNode>;
|
|
58
|
+
fields?: FieldData[];
|
|
59
|
+
onChange?: (e: FormEvent<HTMLFormElement>) => void;
|
|
60
|
+
onFieldsChange?: (changedFields: FieldData[]) => void;
|
|
61
|
+
onSubmitCapture?: (changedFields: FieldData[]) => void;
|
|
62
|
+
onValuesChange?: (
|
|
63
|
+
changedValues: Record<string, RuleTypes>,
|
|
64
|
+
allValues: Record<string, RuleTypes>
|
|
65
|
+
) => void;
|
|
66
|
+
onFinish?: (values: Record<string, RuleTypes>) => void;
|
|
67
|
+
onFinishFailed?: (errorInfo: {
|
|
68
|
+
values: Record<string, RuleTypes>;
|
|
69
|
+
errorFields: Pick<FieldError, 'errors' | 'name'>[];
|
|
70
|
+
}) => void;
|
|
71
|
+
scrollToFirstError?: boolean;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export type FormItemProps = DefaultProps & {
|
|
75
|
+
name: string;
|
|
76
|
+
label?: string | ReactNode;
|
|
77
|
+
rules?: RuleObject[];
|
|
78
|
+
initialValue?: RuleType;
|
|
79
|
+
children:
|
|
80
|
+
| (ReactElement & { props: { value: RuleTypes } })
|
|
81
|
+
| (ReactElement & { props: { value: RuleTypes } })[];
|
|
82
|
+
layout?: FormLayoutTypes;
|
|
83
|
+
dependencies?: string[];
|
|
84
|
+
normalize?: (
|
|
85
|
+
value: RuleType,
|
|
86
|
+
prevValue: RuleType,
|
|
87
|
+
allValues: RuleType
|
|
88
|
+
) => RuleType;
|
|
89
|
+
feedbackIcons?: boolean;
|
|
90
|
+
extra?: ReactNode;
|
|
91
|
+
hideLabel?: boolean;
|
|
92
|
+
removeErrorMessageHeight?: boolean;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export interface FormItemChildComponentProps {
|
|
96
|
+
child: ReactElement;
|
|
97
|
+
name: string;
|
|
98
|
+
error: boolean;
|
|
99
|
+
fieldValue: RuleTypes;
|
|
100
|
+
value: RuleType;
|
|
101
|
+
setFieldValue: (
|
|
102
|
+
name: string,
|
|
103
|
+
value: RuleType,
|
|
104
|
+
errors?: string[],
|
|
105
|
+
reset?: boolean | null | undefined,
|
|
106
|
+
touch?: boolean) => void;
|
|
107
|
+
onChange?: (e: SyntheticBaseEvent, option?: OptionProps) => void;
|
|
108
|
+
size?: SizeType;
|
|
109
|
+
normalize?: (
|
|
110
|
+
value: RuleType,
|
|
111
|
+
prevValue: RuleType,
|
|
112
|
+
allValues: RuleType
|
|
113
|
+
) => RuleType;
|
|
114
|
+
noStyle?: boolean;
|
|
115
|
+
feedbackIcons?: boolean;
|
|
116
|
+
ref?: FieldInstancesRef | null
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface FormInstance {
|
|
120
|
+
submit: () => Promise<Record<string, RuleTypes> | undefined>;
|
|
121
|
+
setFields: (fields: FieldData[]) => void;
|
|
122
|
+
resetFields: (nameList?: string[], showError?: boolean | null) => void;
|
|
123
|
+
getFieldError: (name: string) => string[];
|
|
124
|
+
registerField: (name: string, rules?: RuleObject[], remove?: boolean) => void;
|
|
125
|
+
setFieldValue: (name: string, value: RuleTypes, errors?: string[],
|
|
126
|
+
reset?: boolean | null | undefined,
|
|
127
|
+
touch?: boolean) => void;
|
|
128
|
+
getFieldValue: (name: string) => RuleTypes;
|
|
129
|
+
validateFields: (nameList?: string[]) => Promise<boolean>;
|
|
130
|
+
setFieldsValue: (
|
|
131
|
+
values: Partial<Record<string, RuleTypes>>,
|
|
132
|
+
reset?: boolean | null | undefined
|
|
133
|
+
) => void;
|
|
134
|
+
getFieldsValue: (nameList?: string[]) => Record<string, RuleTypes>;
|
|
135
|
+
isFieldTouched: (name: string) => boolean;
|
|
136
|
+
getFieldsError: () => Pick<FieldError, 'errors' | 'name'>[];
|
|
137
|
+
isFieldsTouched: (nameList?: string[], allFieldsTouched?: boolean) => boolean;
|
|
138
|
+
getFieldWarning: (name: string) => string[];
|
|
139
|
+
subscribeToField: (
|
|
140
|
+
name: string,
|
|
141
|
+
callback: (value: RuleTypes) => void
|
|
142
|
+
) => () => void;
|
|
143
|
+
subscribeToForm: (
|
|
144
|
+
callback: (values: Record<string, RuleTypes>) => void
|
|
145
|
+
) => () => void;
|
|
146
|
+
subscribeToFields: (
|
|
147
|
+
names: string[],
|
|
148
|
+
callback: (values: Record<string, RuleTypes>) => void
|
|
149
|
+
) => () => void;
|
|
150
|
+
subscribeToError?: (name: string, callback: (errors?: string[]) => void) => void;
|
|
151
|
+
isFieldValidating: (name: string) => boolean;
|
|
152
|
+
onFieldsChange?: (changedFields: FieldData[]) => void;
|
|
153
|
+
onValuesChange?: (
|
|
154
|
+
changedValues: Record<string, RuleTypes>,
|
|
155
|
+
allValues: Record<string, RuleTypes>
|
|
156
|
+
) => void;
|
|
157
|
+
getFieldInstance: (fieldName?: string) => FieldInstancesRef | null;
|
|
158
|
+
setFieldInstance: (fieldName: string, fieldRef: FieldInstancesRef | null) => void;
|
|
159
|
+
setScrollToFirstError: (value: boolean) => void;
|
|
160
|
+
scrollToFirstError?: boolean;
|
|
161
|
+
isReseting: boolean;
|
|
162
|
+
setOnFieldsChange?: (
|
|
163
|
+
onFieldsChange?: (changedFields: FieldData[]) => void
|
|
164
|
+
) => void;
|
|
165
|
+
setOnFinish?: (onFinish?: ((values: Record<string, RuleTypes>) => void) | undefined) => void,
|
|
166
|
+
setOnValuesChange?: (
|
|
167
|
+
onValuesChange?: (
|
|
168
|
+
changedValues: Record<string, RuleTypes>,
|
|
169
|
+
allValues: Record<string, RuleTypes>
|
|
170
|
+
) => void
|
|
171
|
+
) => void;
|
|
172
|
+
setOnFinishFailed?: (
|
|
173
|
+
onFinishFailed?: (errorInfo: {
|
|
174
|
+
values: Record<string, RuleTypes>;
|
|
175
|
+
errorFields: Pick<FieldError, 'errors' | 'name'>[];
|
|
176
|
+
}) => void
|
|
177
|
+
) => void;
|
|
178
|
+
changeStep: (step: number) => void;
|
|
179
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
export type RuleType = any;
|
|
5
|
+
export type RuleTypes = RuleType | RuleType[];
|
|
6
|
+
export type SizeType = 'small' | 'middle' | 'large';
|
|
7
|
+
export type MouseEventHandlerSelect = MouseEvent<HTMLDivElement> & TargetProps;
|
|
8
|
+
export interface DefaultProps {
|
|
9
|
+
prefixCls?: string;
|
|
10
|
+
prefixClsV3?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
noStyle?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type TargetProps = {
|
|
17
|
+
target: {
|
|
18
|
+
value: RuleType;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type SyntheticBaseEvent = {
|
|
23
|
+
target: EventTarget & {
|
|
24
|
+
value: RuleType;
|
|
25
|
+
};
|
|
26
|
+
nativeEvent?: Event & { data?: string | null };
|
|
27
|
+
currentTarget: EventTarget;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type Placement =
|
|
31
|
+
| 'bottomLeft'
|
|
32
|
+
| 'bottom'
|
|
33
|
+
| 'bottomRight'
|
|
34
|
+
| 'topLeft'
|
|
35
|
+
| 'top'
|
|
36
|
+
| 'topRight'
|
|
37
|
+
| 'left'
|
|
38
|
+
| 'right';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CSSProperties,
|
|
3
|
+
ForwardedRef,
|
|
4
|
+
InputHTMLAttributes,
|
|
5
|
+
KeyboardEvent,
|
|
6
|
+
KeyboardEventHandler,
|
|
7
|
+
MouseEventHandler,
|
|
8
|
+
ReactElement,
|
|
9
|
+
ReactNode,
|
|
10
|
+
TextareaHTMLAttributes
|
|
11
|
+
} from 'react';
|
|
12
|
+
import { DefaultProps, SizeType, SyntheticBaseEvent } from '.';
|
|
13
|
+
|
|
14
|
+
export type InputProps = Omit<
|
|
15
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
16
|
+
'size' | 'prefix'
|
|
17
|
+
> &
|
|
18
|
+
DefaultProps & {
|
|
19
|
+
addonBefore?: ReactNode;
|
|
20
|
+
addonAfter?: ReactNode;
|
|
21
|
+
size?: SizeType;
|
|
22
|
+
prefix?: ReactNode;
|
|
23
|
+
suffix?: ReactNode;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
allowClear?: boolean;
|
|
26
|
+
error?: boolean;
|
|
27
|
+
bordered?: boolean;
|
|
28
|
+
iconRender?: (visible: boolean) => ReactElement;
|
|
29
|
+
onChange?: (event: SyntheticBaseEvent) => void;
|
|
30
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
31
|
+
onMouseEnter?: MouseEventHandler<HTMLElement>;
|
|
32
|
+
onMouseLeave?: MouseEventHandler<HTMLElement>;
|
|
33
|
+
onKeyPress?: KeyboardEventHandler<HTMLElement>;
|
|
34
|
+
onKeyDown?: KeyboardEventHandler<HTMLElement>;
|
|
35
|
+
onPressEnter?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
36
|
+
feedbackIcons?: boolean;
|
|
37
|
+
child?: ReactNode;
|
|
38
|
+
mask?: string;
|
|
39
|
+
maskChar?: string;
|
|
40
|
+
maskRegex?: RegExp;
|
|
41
|
+
ref?: ForwardedRef<HTMLInputElement>,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type TextareaProps = Omit<
|
|
45
|
+
TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
46
|
+
'onResize'
|
|
47
|
+
> &
|
|
48
|
+
DefaultProps & {
|
|
49
|
+
value?: string;
|
|
50
|
+
className?: string;
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
autoSize?:
|
|
53
|
+
| boolean
|
|
54
|
+
| {
|
|
55
|
+
minRows?: number;
|
|
56
|
+
maxRows?: number;
|
|
57
|
+
};
|
|
58
|
+
onPressEnter?: KeyboardEventHandler<HTMLTextAreaElement>;
|
|
59
|
+
onResize?: (size: { width: number; height: number }) => void;
|
|
60
|
+
styles?: {
|
|
61
|
+
textarea?: CSSProperties;
|
|
62
|
+
count?: CSSProperties;
|
|
63
|
+
};
|
|
64
|
+
bordered?: boolean;
|
|
65
|
+
size?: SizeType;
|
|
66
|
+
status?: 'success' | 'error';
|
|
67
|
+
rootClassName?: string;
|
|
68
|
+
variant?: 'outlined' | 'borderless' | 'filled' | 'underlined';
|
|
69
|
+
error?: boolean;
|
|
70
|
+
allowClear?: boolean;
|
|
71
|
+
ref?: ForwardedRef<HTMLTextAreaElement>
|
|
72
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactNode } from "react";
|
|
2
|
+
import { DefaultProps } from ".";
|
|
3
|
+
|
|
4
|
+
export type MenuMode = "vertical" | "horizontal" | "inline";
|
|
5
|
+
|
|
6
|
+
export type ItemType = DefaultProps & {
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
extra?: ReactNode;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
key: string;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
title?: ReactNode;
|
|
14
|
+
children?: ItemType[];
|
|
15
|
+
type?: string;
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
itemKey?: string;
|
|
18
|
+
onClick?: (info: { key: string; keyPath: string[]; domEvent?: MouseEvent }) => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type SubMenuItem = DefaultProps & {
|
|
22
|
+
key: string;
|
|
23
|
+
title?: ReactNode;
|
|
24
|
+
icon?: ReactNode;
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
itemKey: string;
|
|
27
|
+
level: "1" | "2"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface MenuProps {
|
|
31
|
+
prefixCls?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
defaultOpenKeys?: string[];
|
|
35
|
+
defaultSelectedKeys?: string[];
|
|
36
|
+
expandIcon?: ReactNode;
|
|
37
|
+
forceSubMenuRender?: boolean;
|
|
38
|
+
inlineCollapsed?: boolean;
|
|
39
|
+
inlineIndent?: number;
|
|
40
|
+
items?: ItemType[];
|
|
41
|
+
mode?: MenuMode;
|
|
42
|
+
multiple?: boolean;
|
|
43
|
+
openKeys?: string[];
|
|
44
|
+
overflowedIndicator?: ReactNode;
|
|
45
|
+
selectable?: boolean;
|
|
46
|
+
selectedKeys?: string[];
|
|
47
|
+
subMenuCloseDelay?: number;
|
|
48
|
+
subMenuOpenDelay?: number;
|
|
49
|
+
triggerSubMenuAction?: "hover" | "click";
|
|
50
|
+
onClick?: (info: { key: string; keyPath: string[]; domEvent?: MouseEvent }) => void;
|
|
51
|
+
onDeselect?: (info: { key: string; keyPath: string[] }) => void;
|
|
52
|
+
onOpenChange?: (openKeys: string[]) => void;
|
|
53
|
+
onSelect?: (info: { key: string; keyPath: string[]; selectedKeys: string[] }) => void;
|
|
54
|
+
children?: ReactNode;
|
|
55
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import { DefaultProps } from ".";
|
|
3
|
+
|
|
4
|
+
export type PopoverProps = DefaultProps & {
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
trigger?: "click" | "hover";
|
|
8
|
+
placement?: "top" | "bottom" | "left" | "right" | "topRight" | "bottomRight" | "topLeft" | "bottomLeft";
|
|
9
|
+
open?: boolean;
|
|
10
|
+
overlayStyle?: CSSProperties;
|
|
11
|
+
overlayClassName?: string;
|
|
12
|
+
title?: string | ReactNode;
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
onVisibleChange?: ((open: boolean) => void) | undefined;
|
|
15
|
+
getPopupContainer?: ((node: HTMLElement) => HTMLElement) | undefined
|
|
16
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CSSProperties,
|
|
3
|
+
FocusEventHandler,
|
|
4
|
+
ForwardedRef,
|
|
5
|
+
KeyboardEventHandler,
|
|
6
|
+
MouseEventHandler,
|
|
7
|
+
ReactNode
|
|
8
|
+
} from 'react';
|
|
9
|
+
import { DefaultProps, RuleType, SizeType, SyntheticBaseEvent } from '.';
|
|
10
|
+
|
|
11
|
+
export type RadioValueType = string | number | readonly string[] | undefined;
|
|
12
|
+
|
|
13
|
+
export interface RadioGroupProps {
|
|
14
|
+
defaultValue?: RuleType;
|
|
15
|
+
value?: RuleType;
|
|
16
|
+
onChange?: (e: SyntheticBaseEvent) => void;
|
|
17
|
+
size?: SizeType;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
20
|
+
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
|
|
21
|
+
name?: string;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
id?: string;
|
|
24
|
+
optionType?: 'default' | 'button';
|
|
25
|
+
buttonStyle?: 'outline' | 'solid';
|
|
26
|
+
onFocus?: FocusEventHandler<HTMLDivElement>;
|
|
27
|
+
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
28
|
+
block?: boolean;
|
|
29
|
+
prefixCls?: string;
|
|
30
|
+
prefixClsV3?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
options?:
|
|
33
|
+
| Array<{ label: ReactNode; value: RuleType; disabled?: boolean }>
|
|
34
|
+
| string[]
|
|
35
|
+
| number[];
|
|
36
|
+
style?: CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type RadioProps = DefaultProps & {
|
|
40
|
+
defaultChecked?: boolean;
|
|
41
|
+
checked?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
title?: string;
|
|
44
|
+
onChange?: (e: SyntheticBaseEvent) => void;
|
|
45
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
46
|
+
onMouseEnter?: MouseEventHandler<HTMLElement>;
|
|
47
|
+
onMouseLeave?: MouseEventHandler<HTMLElement>;
|
|
48
|
+
onKeyPress?: KeyboardEventHandler<HTMLElement>;
|
|
49
|
+
onKeyDown?: KeyboardEventHandler<HTMLElement>;
|
|
50
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
51
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
52
|
+
value?: RuleType;
|
|
53
|
+
tabIndex?: number;
|
|
54
|
+
name?: string;
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
id?: string;
|
|
57
|
+
autoFocus?: boolean;
|
|
58
|
+
type?: string;
|
|
59
|
+
skipGroup?: boolean;
|
|
60
|
+
required?: boolean;
|
|
61
|
+
button?: boolean;
|
|
62
|
+
error?: boolean;
|
|
63
|
+
ref?: ForwardedRef<HTMLLabelElement>
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type RadioButtonProps = RadioProps & {
|
|
67
|
+
children?: ReactNode;
|
|
68
|
+
size?: SizeType;
|
|
69
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export type ResultStatusType =
|
|
4
|
+
| "success"
|
|
5
|
+
| "error"
|
|
6
|
+
| "info"
|
|
7
|
+
| "warning"
|
|
8
|
+
| "403"
|
|
9
|
+
| "404"
|
|
10
|
+
| "500";
|
|
11
|
+
|
|
12
|
+
export interface ResultProps {
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
status?: ResultStatusType;
|
|
15
|
+
title?: ReactNode;
|
|
16
|
+
subTitle?: ReactNode;
|
|
17
|
+
extra?: ReactNode;
|
|
18
|
+
prefixCls?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|