x-ui-design 1.0.30 → 1.0.31-gamma.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 +1 -22
- package/dist/{esm/types/components → components}/DatePicker/DatePicker.d.ts +1 -2
- package/dist/{esm/types/components → components}/DatePicker/RangePicker/RangePicker.d.ts +1 -2
- package/dist/{esm/types/components → components}/Dropdown/Dropdown.d.ts +1 -2
- package/dist/{esm/types/components → components}/Empty/Empty.d.ts +1 -2
- package/dist/{esm/types/components → components}/Form/Item/Item.d.ts +1 -2
- package/dist/components/Icons/Icons.d.ts +18 -0
- package/dist/components/Input/Input.d.ts +11 -0
- package/dist/{esm/types/components → components}/Input/Textarea/Textarea.d.ts +1 -2
- package/dist/{esm/types/components → components}/Popover/Popover.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Button/Button.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Group/Group.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Radio.d.ts +1 -2
- package/dist/{esm/types/components → components}/Result/Result.d.ts +1 -2
- package/dist/{esm/types/components → components}/Switch/Switch.d.ts +1 -2
- package/dist/{esm/types/components → components}/Upload/Upload.d.ts +1 -2
- package/dist/esm/types/index.d.ts +0 -56
- package/dist/index.d.ts +1 -150
- package/dist/index.esm.js +3433 -3863
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3395 -3825
- package/dist/index.js.map +1 -1
- package/package.json +22 -20
- package/.github/workflows/x-ui-design.yml +0 -14
- package/compile.sh +0 -15
- package/dist/esm/types/components/Icons/Icons.d.ts +0 -19
- package/dist/esm/types/components/Input/Input.d.ts +0 -16
- package/eslint.config.mjs +0 -16
- package/lib/components/Button/Button.tsx +0 -136
- package/lib/components/Button/index.ts +0 -1
- package/lib/components/Button/style.css +0 -197
- package/lib/components/Checkbox/Checkbox.tsx +0 -131
- package/lib/components/Checkbox/index.ts +0 -1
- package/lib/components/Checkbox/style.css +0 -95
- package/lib/components/ConditionalWrapper/index.tsx +0 -12
- package/lib/components/DatePicker/DatePicker.tsx +0 -526
- package/lib/components/DatePicker/RangePicker/RangePicker.tsx +0 -500
- package/lib/components/DatePicker/RangePicker/index.ts +0 -1
- package/lib/components/DatePicker/RangePicker/style.css +0 -434
- package/lib/components/DatePicker/TimePicker/TimePicker.tsx +0 -497
- package/lib/components/DatePicker/TimePicker/index.ts +0 -1
- package/lib/components/DatePicker/TimePicker/style.css +0 -197
- package/lib/components/DatePicker/index.ts +0 -1
- package/lib/components/DatePicker/style.css +0 -318
- package/lib/components/Dropdown/Dropdown.tsx +0 -234
- package/lib/components/Dropdown/index.ts +0 -1
- package/lib/components/Dropdown/style.css +0 -124
- package/lib/components/Empty/Empty.tsx +0 -45
- package/lib/components/Empty/index.ts +0 -1
- package/lib/components/Empty/style.css +0 -13
- package/lib/components/Form/Form.tsx +0 -130
- package/lib/components/Form/Item/Item.tsx +0 -294
- package/lib/components/Form/Item/index.ts +0 -1
- package/lib/components/Form/Item/style.css +0 -61
- package/lib/components/Form/index.ts +0 -1
- package/lib/components/Icons/Icons.tsx +0 -433
- package/lib/components/Icons/index.ts +0 -15
- package/lib/components/Input/Input.tsx +0 -228
- package/lib/components/Input/Textarea/Textarea.tsx +0 -110
- package/lib/components/Input/Textarea/index.ts +0 -1
- package/lib/components/Input/Textarea/style.css +0 -104
- package/lib/components/Input/index.ts +0 -1
- package/lib/components/Input/style.css +0 -137
- package/lib/components/Menu/Item/Item.tsx +0 -65
- package/lib/components/Menu/Menu.tsx +0 -261
- package/lib/components/Menu/SubMenu/SubMenu.tsx +0 -68
- package/lib/components/Menu/index.css +0 -145
- package/lib/components/Menu/index.ts +0 -1
- package/lib/components/Popover/Popover.tsx +0 -135
- package/lib/components/Popover/index.ts +0 -1
- package/lib/components/Popover/style.css +0 -82
- package/lib/components/Radio/Button/Button.tsx +0 -42
- package/lib/components/Radio/Button/index.ts +0 -1
- package/lib/components/Radio/Button/style.css +0 -43
- package/lib/components/Radio/Group/Group.tsx +0 -105
- package/lib/components/Radio/Group/index.ts +0 -1
- package/lib/components/Radio/Group/style.css +0 -53
- package/lib/components/Radio/Radio.tsx +0 -83
- package/lib/components/Radio/index.ts +0 -1
- package/lib/components/Radio/style.css +0 -73
- package/lib/components/Result/Result.tsx +0 -39
- package/lib/components/Result/index.ts +0 -1
- package/lib/components/Result/style.css +0 -173
- package/lib/components/Select/Option/Option.tsx +0 -49
- package/lib/components/Select/Option/index.ts +0 -1
- package/lib/components/Select/Option/style.css +0 -50
- package/lib/components/Select/Select.tsx +0 -935
- package/lib/components/Select/Tag/Tag.tsx +0 -43
- package/lib/components/Select/Tag/index.ts +0 -1
- package/lib/components/Select/Tag/style.css +0 -87
- package/lib/components/Select/index.ts +0 -1
- package/lib/components/Select/style.css +0 -186
- package/lib/components/Skeleton/Avatar/Avatar.tsx +0 -61
- package/lib/components/Skeleton/Avatar/index.ts +0 -1
- package/lib/components/Skeleton/Avatar/style.css +0 -27
- package/lib/components/Skeleton/Button/Button.tsx +0 -44
- package/lib/components/Skeleton/Button/index.ts +0 -1
- package/lib/components/Skeleton/Button/style.css +0 -50
- package/lib/components/Skeleton/Image/Image.tsx +0 -45
- package/lib/components/Skeleton/Image/index.ts +0 -1
- package/lib/components/Skeleton/Image/style.css +0 -23
- package/lib/components/Skeleton/Input/Input.tsx +0 -42
- package/lib/components/Skeleton/Input/index.ts +0 -1
- package/lib/components/Skeleton/Input/style.css +0 -56
- package/lib/components/Skeleton/Skeleton.tsx +0 -97
- package/lib/components/Skeleton/index.ts +0 -1
- package/lib/components/Skeleton/style.css +0 -84
- package/lib/components/Switch/Switch.tsx +0 -68
- package/lib/components/Switch/index.css +0 -50
- package/lib/components/Switch/index.ts +0 -1
- package/lib/components/Upload/Upload.tsx +0 -291
- package/lib/components/Upload/index.ts +0 -1
- package/lib/components/Upload/style.css +0 -151
- package/lib/global.d.ts +0 -1
- package/lib/helpers/flatten.ts +0 -26
- package/lib/helpers/index.ts +0 -52
- package/lib/helpers/mask.ts +0 -52
- package/lib/hooks/useForm.ts +0 -548
- package/lib/hooks/usePosition.ts +0 -206
- package/lib/hooks/useWatch.ts +0 -41
- package/lib/hooks/useWatchError.ts +0 -20
- package/lib/index.ts +0 -184
- package/lib/styles/global.css +0 -57
- package/lib/types/button.ts +0 -83
- package/lib/types/checkbox.ts +0 -32
- package/lib/types/datepicker.ts +0 -165
- package/lib/types/dropdown.ts +0 -41
- package/lib/types/empty.ts +0 -8
- package/lib/types/form.ts +0 -179
- package/lib/types/index.ts +0 -38
- package/lib/types/input.ts +0 -72
- package/lib/types/menu.ts +0 -55
- package/lib/types/popover.ts +0 -16
- package/lib/types/radio.ts +0 -69
- package/lib/types/result.ts +0 -22
- package/lib/types/select.ts +0 -126
- package/lib/types/skeleton.ts +0 -62
- package/lib/types/switch.ts +0 -22
- package/lib/types/upload.ts +0 -67
- package/lib/utils/index.ts +0 -37
- package/lib/utils/lazy.ts +0 -17
- package/next.config.ts +0 -7
- package/rollup.config.js +0 -71
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +0 -48
- package/src/app/layout.d.ts +0 -5
- package/src/app/layout.tsx +0 -16
- package/src/app/page.d.ts +0 -1
- package/src/app/page.tsx +0 -21
- package/tsconfig.json +0 -46
- /package/dist/{esm/types/components → components}/Button/Button.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Checkbox/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/ConditionalWrapper/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/RangePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/TimePicker/TimePicker.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/TimePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Dropdown/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Empty/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/Form.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/Item/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Icons/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Input/Textarea/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Input/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/Item/Item.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/Menu.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/SubMenu/SubMenu.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Popover/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/Group/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Result/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Option/Option.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Option/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Select.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Tag/Tag.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Tag/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Avatar/Avatar.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Avatar/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Button/Button.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Image/Image.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Image/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Input/Input.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Input/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Switch/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Upload/index.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/flatten.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/index.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/mask.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useForm.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/usePosition.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useWatch.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useWatchError.d.ts +0 -0
- /package/dist/{esm/types/types → types}/button.d.ts +0 -0
- /package/dist/{esm/types/types → types}/checkbox.d.ts +0 -0
- /package/dist/{esm/types/types → types}/datepicker.d.ts +0 -0
- /package/dist/{esm/types/types → types}/dropdown.d.ts +0 -0
- /package/dist/{esm/types/types → types}/empty.d.ts +0 -0
- /package/dist/{esm/types/types → types}/form.d.ts +0 -0
- /package/dist/{esm/types/types → types}/index.d.ts +0 -0
- /package/dist/{esm/types/types → types}/input.d.ts +0 -0
- /package/dist/{esm/types/types → types}/menu.d.ts +0 -0
- /package/dist/{esm/types/types → types}/popover.d.ts +0 -0
- /package/dist/{esm/types/types → types}/radio.d.ts +0 -0
- /package/dist/{esm/types/types → types}/result.d.ts +0 -0
- /package/dist/{esm/types/types → types}/select.d.ts +0 -0
- /package/dist/{esm/types/types → types}/skeleton.d.ts +0 -0
- /package/dist/{esm/types/types → types}/switch.d.ts +0 -0
- /package/dist/{esm/types/types → types}/upload.d.ts +0 -0
- /package/dist/{esm/types/utils → utils}/index.d.ts +0 -0
- /package/dist/{esm/types/utils → utils}/lazy.d.ts +0 -0
package/lib/types/datepicker.ts
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
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
|
-
};
|
package/lib/types/dropdown.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
}
|
package/lib/types/empty.ts
DELETED
package/lib/types/form.ts
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
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
|
-
}
|
package/lib/types/index.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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';
|
package/lib/types/input.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
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, RuleType, 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?: RuleType;
|
|
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
|
-
};
|
package/lib/types/menu.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
}
|
package/lib/types/popover.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
package/lib/types/radio.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
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
|
-
}
|
package/lib/types/result.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|