x-ui-design 0.2.67 → 0.2.69
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/esm/types/components/Input/Textarea/Textarea.d.ts +1 -1
- package/dist/esm/types/components/Radio/Radio.d.ts +3 -3
- package/dist/esm/types/index.d.ts +24 -18
- package/dist/index.d.ts +29 -301
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/lib/index.ts +74 -25
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './style.css';
|
|
3
|
-
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onResize"> & import("
|
|
3
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onResize"> & import("../../..").DefaultProps & {
|
|
4
4
|
value?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: React.CSSProperties;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './style.css';
|
|
3
|
-
declare const Radio: React.ForwardRefExoticComponent<import("
|
|
3
|
+
declare const Radio: React.ForwardRefExoticComponent<import("../..").DefaultProps & {
|
|
4
4
|
defaultChecked?: boolean;
|
|
5
5
|
checked?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
title?: string;
|
|
8
|
-
onChange?: (e: import("
|
|
8
|
+
onChange?: (e: import("../..").SyntheticBaseEvent) => void;
|
|
9
9
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
10
10
|
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
11
11
|
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
@@ -13,7 +13,7 @@ declare const Radio: React.ForwardRefExoticComponent<import("../../types").Defau
|
|
|
13
13
|
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
14
14
|
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
15
15
|
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
16
|
-
value?: import("
|
|
16
|
+
value?: import("../..").RuleType;
|
|
17
17
|
tabIndex?: number;
|
|
18
18
|
name?: string;
|
|
19
19
|
children?: React.ReactNode;
|
|
@@ -21,10 +21,10 @@ declare const Checkbox: import("react").ComponentType<import("@/types").DefaultP
|
|
|
21
21
|
checked?: boolean;
|
|
22
22
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
23
|
declare const Empty: import("react").ComponentType<import("./types/empty").EmptyContentProps>;
|
|
24
|
-
declare const Upload: import("react").ComponentType<import("
|
|
25
|
-
declare const DatePicker: import("react").ComponentType<import("
|
|
26
|
-
declare const RangePicker: import("react").ComponentType<import("
|
|
27
|
-
declare const TimePicker: import("react").ComponentType<import("
|
|
24
|
+
declare const Upload: import("react").ComponentType<import("@/types/upload").UploadProps>;
|
|
25
|
+
declare const DatePicker: import("react").ComponentType<import("@/types/datepicker").TDatePickerProps>;
|
|
26
|
+
declare const RangePicker: import("react").ComponentType<import("@/types/datepicker").TRangePickerProps>;
|
|
27
|
+
declare const TimePicker: import("react").ComponentType<import("@/types/datepicker").TimePickerProps>;
|
|
28
28
|
declare const Form: import("react").ComponentType<import("@/types/form").FormProps>;
|
|
29
29
|
declare const FormItem: import("react").ComponentType<import("@/types/form").FormItemProps>;
|
|
30
30
|
declare const Input: import("react").ComponentType<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & import("@/types").DefaultProps & {
|
|
@@ -97,18 +97,18 @@ declare const Radio: import("react").ComponentType<import("@/types").DefaultProp
|
|
|
97
97
|
button?: boolean;
|
|
98
98
|
error?: boolean;
|
|
99
99
|
} & import("react").RefAttributes<HTMLLabelElement>>;
|
|
100
|
-
declare const RadioButton: import("react").ComponentType<import("
|
|
101
|
-
declare const RadioGroup: import("react").ComponentType<import("
|
|
100
|
+
declare const RadioButton: import("react").ComponentType<import("@/types/radio").RadioButtonProps>;
|
|
101
|
+
declare const RadioGroup: import("react").ComponentType<import("@/types/radio").RadioGroupProps>;
|
|
102
102
|
declare const Select: import("react").ComponentType<import("@/types").DefaultProps & {
|
|
103
103
|
id?: string;
|
|
104
104
|
searchValue?: string;
|
|
105
105
|
onSearch?: (value: string) => void;
|
|
106
106
|
autoClearSearchValue?: boolean;
|
|
107
|
-
onSelect?: (value: import("@/types").RuleTypes, option?: import("
|
|
108
|
-
onDeselect?: (value: string, option?: import("
|
|
109
|
-
filterOption?: boolean | ((input: string, option: import("
|
|
107
|
+
onSelect?: (value: import("@/types").RuleTypes, option?: import("@/types/select").OptionType) => void;
|
|
108
|
+
onDeselect?: (value: string, option?: import("@/types/select").OptionType) => void;
|
|
109
|
+
filterOption?: boolean | ((input: string, option: import("@/types/select").OptionType) => boolean);
|
|
110
110
|
optionFilterProp?: string;
|
|
111
|
-
options?: import("
|
|
111
|
+
options?: import("@/types/select").OptionType[];
|
|
112
112
|
children?: import("react").ReactNode;
|
|
113
113
|
defaultActiveFirstOption?: boolean;
|
|
114
114
|
listHeight?: number;
|
|
@@ -117,7 +117,7 @@ declare const Select: import("react").ComponentType<import("@/types").DefaultPro
|
|
|
117
117
|
value?: import("@/types").RuleTypes;
|
|
118
118
|
defaultValue?: import("@/types").RuleTypes;
|
|
119
119
|
maxCount?: number;
|
|
120
|
-
onChange?: (e: import("@/types").RuleTypes, option?: import("
|
|
120
|
+
onChange?: (e: import("@/types").RuleTypes, option?: import("@/types/select").OptionType) => void;
|
|
121
121
|
disabled?: boolean;
|
|
122
122
|
loading?: boolean;
|
|
123
123
|
placeholder?: string;
|
|
@@ -128,8 +128,8 @@ declare const Select: import("react").ComponentType<import("@/types").DefaultPro
|
|
|
128
128
|
onClear?: () => void;
|
|
129
129
|
error?: boolean;
|
|
130
130
|
showSearch?: boolean;
|
|
131
|
-
tagRender?: ((props: import("
|
|
132
|
-
maxTagPlaceholder?: import("react").ReactNode | ((omittedValues: import("
|
|
131
|
+
tagRender?: ((props: import("@/types/select").CustomTagProps) => import("react").ReactElement) | undefined;
|
|
132
|
+
maxTagPlaceholder?: import("react").ReactNode | ((omittedValues: import("@/types/select").DisplayValueType[]) => import("react").ReactNode);
|
|
133
133
|
dropdownClassName?: string;
|
|
134
134
|
showArrow?: boolean;
|
|
135
135
|
onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
@@ -144,8 +144,8 @@ declare const Select: import("react").ComponentType<import("@/types").DefaultPro
|
|
|
144
144
|
placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
|
|
145
145
|
removeIcon?: import("react").ReactNode;
|
|
146
146
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
147
|
-
declare const Option: import("react").ComponentType<import("
|
|
148
|
-
declare const Tag: import("react").ComponentType<import("
|
|
147
|
+
declare const Option: import("react").ComponentType<import("@/types/select").OptionProps>;
|
|
148
|
+
declare const Tag: import("react").ComponentType<import("@/types/select").CustomTagProps>;
|
|
149
149
|
declare const Skeleton: import("react").ComponentType<import("./types/skeleton").SkeletonProps>;
|
|
150
150
|
declare const SkeletonAvatar: import("react").ComponentType<import("./types/skeleton").SkeletonAvatarProps>;
|
|
151
151
|
declare const SkeletonButton: import("react").ComponentType<import("./types/skeleton").SkeletonButtonProps>;
|
|
@@ -155,7 +155,13 @@ export { Button, Checkbox, Empty, DatePicker, RangePicker, TimePicker, Form, For
|
|
|
155
155
|
export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, } from '@/components/Icons';
|
|
156
156
|
export { useForm } from '@/hooks/useForm';
|
|
157
157
|
export { useWatch } from '@/hooks/useWatch';
|
|
158
|
-
export type {
|
|
159
|
-
export type {
|
|
160
|
-
export type {
|
|
158
|
+
export type { FormInstance, RuleObject, RuleRender, FieldData, FieldInstancesInputRef, FieldError, FormProps, FormItemChildComponentProps } from '@/types/form';
|
|
159
|
+
export type { DefaultProps, TargetProps, RuleTypes, RuleType, MouseEventHandlerSelect, SyntheticBaseEvent } from '@/types';
|
|
160
|
+
export type { CheckboxProps } from '@/types/checkbox';
|
|
161
|
+
export type { InputProps, TextareaProps } from '@/types/input';
|
|
162
|
+
export type { ButtonProps, BaseButtonProps } from '@/types/button';
|
|
163
|
+
export type { RadioProps, RadioGroupProps, RadioButtonProps } from '@/types/radio';
|
|
164
|
+
export type { TDatePickerProps, TRangePickerProps, TimePickerProps } from '@/types/datepicker';
|
|
165
|
+
export type { SelectProps, OptionType, OptionProps, CustomTagProps, TagProps, DisplayValueType } from '@/types/select';
|
|
166
|
+
export type { RcFile, UploadFile, UploadProps, UploadChangeParam } from '@/types/upload';
|
|
161
167
|
export { clsx, createArray, parseValue } from '@/helpers';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { CSSProperties, ReactNode
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
import * as __types_select from '@/types/select';
|
|
4
|
+
export { CustomTagProps, DisplayValueType, OptionProps, OptionType, SelectProps, TagProps } from '@/types/select';
|
|
5
|
+
import * as __types_radio from '@/types/radio';
|
|
6
|
+
export { RadioButtonProps, RadioGroupProps, RadioProps } from '@/types/radio';
|
|
3
7
|
import * as __types_form from '@/types/form';
|
|
4
|
-
export { FormInstance } from '@/types/form';
|
|
8
|
+
export { FieldData, FieldError, FieldInstancesInputRef, FormInstance, FormItemChildComponentProps, FormProps, RuleObject, RuleRender } from '@/types/form';
|
|
9
|
+
import * as __types_datepicker from '@/types/datepicker';
|
|
10
|
+
export { TDatePickerProps, TRangePickerProps, TimePickerProps } from '@/types/datepicker';
|
|
11
|
+
import * as __types_upload from '@/types/upload';
|
|
12
|
+
export { RcFile, UploadChangeParam, UploadFile, UploadProps } from '@/types/upload';
|
|
5
13
|
import * as __types from '@/types';
|
|
6
|
-
export { RuleTypes } from '@/types';
|
|
14
|
+
export { DefaultProps, MouseEventHandlerSelect, RuleType, RuleTypes, SyntheticBaseEvent, TargetProps } from '@/types';
|
|
7
15
|
import * as __types_button from '@/types/button';
|
|
8
|
-
export { ButtonProps } from '@/types/button';
|
|
16
|
+
export { BaseButtonProps, ButtonProps } from '@/types/button';
|
|
9
17
|
export { ArrowIcon, CalendarIcon, CheckIcon, ClearIcon, DateDistanceIcon, ErrorIcon, LoadingIcon, SearchIcon, SpinerIcon, StampleIcon, SuccessIcon, TimeIcon, TrashIcon } from '@/components/Icons';
|
|
10
18
|
export { useForm } from '@/hooks/useForm';
|
|
11
19
|
export { useWatch } from '@/hooks/useWatch';
|
|
20
|
+
export { CheckboxProps } from '@/types/checkbox';
|
|
21
|
+
export { InputProps, TextareaProps } from '@/types/input';
|
|
12
22
|
export { clsx, createArray, parseValue } from '@/helpers';
|
|
13
23
|
|
|
14
|
-
type RuleType = any;
|
|
15
|
-
type SizeType = 'small' | 'middle' | 'large';
|
|
16
24
|
interface DefaultProps {
|
|
17
25
|
prefixCls?: string;
|
|
18
26
|
className?: string;
|
|
19
27
|
style?: CSSProperties;
|
|
20
28
|
noStyle?: boolean;
|
|
21
29
|
}
|
|
22
|
-
type TargetProps = {
|
|
23
|
-
target: {
|
|
24
|
-
value: RuleType;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
type SyntheticBaseEvent = {
|
|
28
|
-
target: EventTarget & {
|
|
29
|
-
value: RuleType;
|
|
30
|
-
};
|
|
31
|
-
nativeEvent?: Event & {
|
|
32
|
-
data?: string | null;
|
|
33
|
-
};
|
|
34
|
-
currentTarget: EventTarget;
|
|
35
|
-
};
|
|
36
30
|
|
|
37
31
|
declare type widthUnit = number | string;
|
|
38
32
|
interface SkeletonElementProps {
|
|
@@ -82,272 +76,6 @@ type SkeletonButtonProps = Omit<SkeletonElementProps, 'size'> & DefaultProps & {
|
|
|
82
76
|
applyElementStyle?: boolean;
|
|
83
77
|
};
|
|
84
78
|
|
|
85
|
-
interface OptionType {
|
|
86
|
-
value: RuleType;
|
|
87
|
-
disabled?: boolean;
|
|
88
|
-
children?: ReactNode;
|
|
89
|
-
className?: string;
|
|
90
|
-
style?: CSSProperties;
|
|
91
|
-
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
92
|
-
render?: (label: string) => ReactNode;
|
|
93
|
-
prefixCls?: string;
|
|
94
|
-
label?: RuleType;
|
|
95
|
-
}
|
|
96
|
-
type CustomTagProps = DefaultProps & {
|
|
97
|
-
label?: ReactNode;
|
|
98
|
-
value: string;
|
|
99
|
-
onClose: (e: MouseEvent<HTMLSpanElement> & TargetProps) => void;
|
|
100
|
-
onMouseDown?: MouseEventHandler | undefined;
|
|
101
|
-
onLoadCapture?: ReactEventHandler | undefined;
|
|
102
|
-
closable?: boolean;
|
|
103
|
-
isMaxTag?: boolean;
|
|
104
|
-
color?: string;
|
|
105
|
-
icon?: ReactNode;
|
|
106
|
-
};
|
|
107
|
-
interface DisplayValueType {
|
|
108
|
-
key?: Key;
|
|
109
|
-
value?: RuleType;
|
|
110
|
-
label?: ReactNode;
|
|
111
|
-
title?: string | number;
|
|
112
|
-
disabled?: boolean;
|
|
113
|
-
}
|
|
114
|
-
interface OptionProps {
|
|
115
|
-
value: RuleType;
|
|
116
|
-
disabled?: boolean;
|
|
117
|
-
children?: ReactNode;
|
|
118
|
-
className?: string;
|
|
119
|
-
style?: CSSProperties;
|
|
120
|
-
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
121
|
-
render?: (label: string) => ReactNode;
|
|
122
|
-
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
123
|
-
prefixCls?: string;
|
|
124
|
-
selected?: boolean;
|
|
125
|
-
title?: string;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
interface RadioGroupProps {
|
|
129
|
-
defaultValue?: RuleType;
|
|
130
|
-
value?: RuleType;
|
|
131
|
-
onChange?: (e: SyntheticBaseEvent) => void;
|
|
132
|
-
size?: SizeType;
|
|
133
|
-
disabled?: boolean;
|
|
134
|
-
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
135
|
-
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
|
|
136
|
-
name?: string;
|
|
137
|
-
children?: ReactNode;
|
|
138
|
-
id?: string;
|
|
139
|
-
optionType?: 'default' | 'button';
|
|
140
|
-
buttonStyle?: 'outline' | 'solid';
|
|
141
|
-
onFocus?: FocusEventHandler<HTMLDivElement>;
|
|
142
|
-
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
143
|
-
block?: boolean;
|
|
144
|
-
prefixCls?: string;
|
|
145
|
-
className?: string;
|
|
146
|
-
options?: Array<{
|
|
147
|
-
label: ReactNode;
|
|
148
|
-
value: RuleType;
|
|
149
|
-
disabled?: boolean;
|
|
150
|
-
}> | string[] | number[];
|
|
151
|
-
style?: CSSProperties;
|
|
152
|
-
}
|
|
153
|
-
type RadioProps = DefaultProps & {
|
|
154
|
-
defaultChecked?: boolean;
|
|
155
|
-
checked?: boolean;
|
|
156
|
-
disabled?: boolean;
|
|
157
|
-
title?: string;
|
|
158
|
-
onChange?: (e: SyntheticBaseEvent) => void;
|
|
159
|
-
onClick?: MouseEventHandler<HTMLElement>;
|
|
160
|
-
onMouseEnter?: MouseEventHandler<HTMLElement>;
|
|
161
|
-
onMouseLeave?: MouseEventHandler<HTMLElement>;
|
|
162
|
-
onKeyPress?: KeyboardEventHandler<HTMLElement>;
|
|
163
|
-
onKeyDown?: KeyboardEventHandler<HTMLElement>;
|
|
164
|
-
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
165
|
-
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
166
|
-
value?: RuleType;
|
|
167
|
-
tabIndex?: number;
|
|
168
|
-
name?: string;
|
|
169
|
-
children?: ReactNode;
|
|
170
|
-
id?: string;
|
|
171
|
-
autoFocus?: boolean;
|
|
172
|
-
type?: string;
|
|
173
|
-
skipGroup?: boolean;
|
|
174
|
-
required?: boolean;
|
|
175
|
-
button?: boolean;
|
|
176
|
-
error?: boolean;
|
|
177
|
-
};
|
|
178
|
-
type RadioButtonProps = RadioProps & {
|
|
179
|
-
children?: ReactNode;
|
|
180
|
-
size?: SizeType;
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
interface BaseInfo {
|
|
184
|
-
range?: 'start' | 'end';
|
|
185
|
-
source?: string;
|
|
186
|
-
}
|
|
187
|
-
type CustomFormat<RuleType> = (value: RuleType) => string;
|
|
188
|
-
type FormatType<DateType = RuleType> = string | CustomFormat<DateType>;
|
|
189
|
-
type PanelMode = 'time' | 'date' | 'week' | 'month' | 'quarter' | 'year' | 'decade';
|
|
190
|
-
type TDatePickerProps = DefaultProps & {
|
|
191
|
-
value?: Date;
|
|
192
|
-
disabled?: boolean;
|
|
193
|
-
placeholder?: string;
|
|
194
|
-
error?: boolean;
|
|
195
|
-
feedbackIcons?: boolean;
|
|
196
|
-
locale?: Locale;
|
|
197
|
-
placement?: string;
|
|
198
|
-
defaultOpen?: boolean;
|
|
199
|
-
allowClear?: boolean | {
|
|
200
|
-
clearIcon?: ReactNode;
|
|
201
|
-
};
|
|
202
|
-
defaultValue?: Date;
|
|
203
|
-
disabledDate?: (date: RuleType, info: {
|
|
204
|
-
to: RuleType;
|
|
205
|
-
from?: RuleType;
|
|
206
|
-
}) => boolean;
|
|
207
|
-
suffixIcon?: ReactNode;
|
|
208
|
-
prefix?: ReactNode;
|
|
209
|
-
size?: SizeType;
|
|
210
|
-
format?: FormatType<RuleType> | FormatType<RuleType>[] | {
|
|
211
|
-
format: string;
|
|
212
|
-
type?: 'mask';
|
|
213
|
-
};
|
|
214
|
-
onChange?: (date: RuleType | RuleType[], dateString: string | string[]) => void;
|
|
215
|
-
onCalendarChange?: (date: RuleType | RuleType[], dateString: string | string[], info: BaseInfo) => void;
|
|
216
|
-
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
217
|
-
showToday?: boolean;
|
|
218
|
-
inputReadOnly?: boolean;
|
|
219
|
-
picker?: PanelMode;
|
|
220
|
-
bordered?: boolean;
|
|
221
|
-
};
|
|
222
|
-
type TRangePickerProps = Omit<TDatePickerProps, 'placeholder' | 'value' | 'defaultValue'> & {
|
|
223
|
-
placeholder?: string[];
|
|
224
|
-
value?: Date[];
|
|
225
|
-
defaultValue?: Date[];
|
|
226
|
-
separator?: ReactNode;
|
|
227
|
-
};
|
|
228
|
-
type Locale = {
|
|
229
|
-
locale: string;
|
|
230
|
-
dateFormat?: string;
|
|
231
|
-
dateTimeFormat?: string;
|
|
232
|
-
fieldDateTimeFormat?: string;
|
|
233
|
-
fieldDateFormat?: string;
|
|
234
|
-
fieldTimeFormat?: string;
|
|
235
|
-
fieldMonthFormat?: string;
|
|
236
|
-
fieldYearFormat?: string;
|
|
237
|
-
fieldWeekFormat?: string;
|
|
238
|
-
fieldQuarterFormat?: string;
|
|
239
|
-
monthBeforeYear?: boolean;
|
|
240
|
-
yearFormat?: string;
|
|
241
|
-
monthFormat?: string;
|
|
242
|
-
cellYearFormat?: string;
|
|
243
|
-
cellQuarterFormat?: string;
|
|
244
|
-
dayFormat?: string;
|
|
245
|
-
cellDateFormat?: string;
|
|
246
|
-
cellMeridiemFormat?: string;
|
|
247
|
-
today: string;
|
|
248
|
-
now: string;
|
|
249
|
-
backToToday: string;
|
|
250
|
-
ok: string;
|
|
251
|
-
timeSelect: string;
|
|
252
|
-
dateSelect: string;
|
|
253
|
-
weekSelect?: string;
|
|
254
|
-
clear: string;
|
|
255
|
-
week: string;
|
|
256
|
-
month: string;
|
|
257
|
-
year: string;
|
|
258
|
-
previousMonth: string;
|
|
259
|
-
nextMonth: string;
|
|
260
|
-
monthSelect: string;
|
|
261
|
-
yearSelect: string;
|
|
262
|
-
decadeSelect: string;
|
|
263
|
-
previousYear: string;
|
|
264
|
-
nextYear: string;
|
|
265
|
-
previousDecade: string;
|
|
266
|
-
nextDecade: string;
|
|
267
|
-
previousCentury: string;
|
|
268
|
-
nextCentury: string;
|
|
269
|
-
shortWeekDays?: string[];
|
|
270
|
-
shortMonths?: string[];
|
|
271
|
-
};
|
|
272
|
-
interface DisabledTimes {
|
|
273
|
-
disabledHours?: () => number[];
|
|
274
|
-
disabledMinutes?: (hour: number) => number[];
|
|
275
|
-
disabledSeconds?: (hour: number, minute: number) => number[];
|
|
276
|
-
}
|
|
277
|
-
type PickerFocusEventHandler = (e: FocusEvent<HTMLElement>, info: BaseInfo) => void;
|
|
278
|
-
type TimePickerProps = DefaultProps & {
|
|
279
|
-
disabledTime?: (date: RuleType) => DisabledTimes;
|
|
280
|
-
inputReadOnly?: boolean;
|
|
281
|
-
format?: FormatType<RuleType> | FormatType<RuleType>[] | {
|
|
282
|
-
format: string;
|
|
283
|
-
type?: 'mask';
|
|
284
|
-
};
|
|
285
|
-
defaultValue?: RuleType | null;
|
|
286
|
-
value?: RuleType | null;
|
|
287
|
-
onChange?: (date: RuleType, dateString: string | string[]) => void;
|
|
288
|
-
onBlur?: PickerFocusEventHandler;
|
|
289
|
-
onSelect?: ((value: Date | null) => void) | undefined;
|
|
290
|
-
showNow?: boolean;
|
|
291
|
-
clearIcon?: ReactNode;
|
|
292
|
-
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
293
|
-
suffixIcon?: ReactNode;
|
|
294
|
-
placeholder?: string;
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
interface RcFile extends File {
|
|
298
|
-
uid: string;
|
|
299
|
-
lastModifiedDate: Date;
|
|
300
|
-
webkitRelativePath: string;
|
|
301
|
-
}
|
|
302
|
-
type UploadFile<RcFile> = {
|
|
303
|
-
originFileObj: RcFile;
|
|
304
|
-
uid: string;
|
|
305
|
-
name: string;
|
|
306
|
-
status?: 'uploading' | 'done' | 'error' | 'removed';
|
|
307
|
-
percent?: number;
|
|
308
|
-
url?: string;
|
|
309
|
-
file?: RcFile;
|
|
310
|
-
};
|
|
311
|
-
type UploadChangeParam = {
|
|
312
|
-
file: UploadFile<RuleType>;
|
|
313
|
-
fileList: UploadFile<RuleType>[];
|
|
314
|
-
};
|
|
315
|
-
type UploadProps = DefaultProps & {
|
|
316
|
-
type?: string;
|
|
317
|
-
name?: string;
|
|
318
|
-
defaultFileList?: UploadFile<RuleType>[];
|
|
319
|
-
fileList?: UploadFile<RuleType>[];
|
|
320
|
-
action?: string | ((file: RcFile) => string) | ((file: RcFile) => PromiseLike<string>);
|
|
321
|
-
directory?: boolean;
|
|
322
|
-
data?: Record<string, unknown> | ((file: UploadFile<RuleType>) => Record<string, unknown> | Promise<Record<string, unknown>>);
|
|
323
|
-
method?: 'POST' | 'PUT' | 'PATCH';
|
|
324
|
-
headers?: Record<string, string>;
|
|
325
|
-
showUploadList?: boolean;
|
|
326
|
-
multiple?: boolean;
|
|
327
|
-
accept?: string;
|
|
328
|
-
beforeUpload?: (file: RcFile, fileList: File[]) => boolean | Promise<boolean>;
|
|
329
|
-
onChange?: (info: UploadChangeParam) => void;
|
|
330
|
-
onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
331
|
-
listType?: string;
|
|
332
|
-
className?: string;
|
|
333
|
-
rootClassName?: string;
|
|
334
|
-
onPreview?: (file: UploadFile<RuleType>) => void;
|
|
335
|
-
onDownload?: (file: UploadFile<RuleType>) => void;
|
|
336
|
-
onRemove?: (file: UploadFile<RuleType>) => void | boolean | Promise<void | boolean>;
|
|
337
|
-
disabled?: boolean;
|
|
338
|
-
style?: React.CSSProperties;
|
|
339
|
-
customRequest?: (options: {
|
|
340
|
-
file: RcFile;
|
|
341
|
-
onSuccess: (response: RuleType) => void;
|
|
342
|
-
onError: (error: RuleType) => void;
|
|
343
|
-
onProgress: (event: ProgressEvent) => void;
|
|
344
|
-
}) => void;
|
|
345
|
-
withCredentials?: boolean;
|
|
346
|
-
openFileDialogOnClick?: boolean;
|
|
347
|
-
maxCount?: number;
|
|
348
|
-
children?: React.ReactNode;
|
|
349
|
-
};
|
|
350
|
-
|
|
351
79
|
type EmptyContentProps = DefaultProps & {
|
|
352
80
|
title?: string;
|
|
353
81
|
description?: string;
|
|
@@ -376,10 +104,10 @@ declare const Checkbox: react.ComponentType<__types.DefaultProps & {
|
|
|
376
104
|
checked?: boolean;
|
|
377
105
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
378
106
|
declare const Empty: react.ComponentType<EmptyContentProps>;
|
|
379
|
-
declare const Upload: react.ComponentType<UploadProps>;
|
|
380
|
-
declare const DatePicker: react.ComponentType<TDatePickerProps>;
|
|
381
|
-
declare const RangePicker: react.ComponentType<TRangePickerProps>;
|
|
382
|
-
declare const TimePicker: react.ComponentType<TimePickerProps>;
|
|
107
|
+
declare const Upload: react.ComponentType<__types_upload.UploadProps>;
|
|
108
|
+
declare const DatePicker: react.ComponentType<__types_datepicker.TDatePickerProps>;
|
|
109
|
+
declare const RangePicker: react.ComponentType<__types_datepicker.TRangePickerProps>;
|
|
110
|
+
declare const TimePicker: react.ComponentType<__types_datepicker.TimePickerProps>;
|
|
383
111
|
declare const Form: react.ComponentType<__types_form.FormProps>;
|
|
384
112
|
declare const FormItem: react.ComponentType<__types_form.FormItemProps>;
|
|
385
113
|
declare const Input: react.ComponentType<Omit<react.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & __types.DefaultProps & {
|
|
@@ -452,18 +180,18 @@ declare const Radio: react.ComponentType<__types.DefaultProps & {
|
|
|
452
180
|
button?: boolean;
|
|
453
181
|
error?: boolean;
|
|
454
182
|
} & react.RefAttributes<HTMLLabelElement>>;
|
|
455
|
-
declare const RadioButton: react.ComponentType<RadioButtonProps>;
|
|
456
|
-
declare const RadioGroup: react.ComponentType<RadioGroupProps>;
|
|
183
|
+
declare const RadioButton: react.ComponentType<__types_radio.RadioButtonProps>;
|
|
184
|
+
declare const RadioGroup: react.ComponentType<__types_radio.RadioGroupProps>;
|
|
457
185
|
declare const Select: react.ComponentType<__types.DefaultProps & {
|
|
458
186
|
id?: string;
|
|
459
187
|
searchValue?: string;
|
|
460
188
|
onSearch?: (value: string) => void;
|
|
461
189
|
autoClearSearchValue?: boolean;
|
|
462
|
-
onSelect?: (value: __types.RuleTypes, option?: OptionType) => void;
|
|
463
|
-
onDeselect?: (value: string, option?: OptionType) => void;
|
|
464
|
-
filterOption?: boolean | ((input: string, option: OptionType) => boolean);
|
|
190
|
+
onSelect?: (value: __types.RuleTypes, option?: __types_select.OptionType) => void;
|
|
191
|
+
onDeselect?: (value: string, option?: __types_select.OptionType) => void;
|
|
192
|
+
filterOption?: boolean | ((input: string, option: __types_select.OptionType) => boolean);
|
|
465
193
|
optionFilterProp?: string;
|
|
466
|
-
options?: OptionType[];
|
|
194
|
+
options?: __types_select.OptionType[];
|
|
467
195
|
children?: react.ReactNode;
|
|
468
196
|
defaultActiveFirstOption?: boolean;
|
|
469
197
|
listHeight?: number;
|
|
@@ -472,7 +200,7 @@ declare const Select: react.ComponentType<__types.DefaultProps & {
|
|
|
472
200
|
value?: __types.RuleTypes;
|
|
473
201
|
defaultValue?: __types.RuleTypes;
|
|
474
202
|
maxCount?: number;
|
|
475
|
-
onChange?: (e: __types.RuleTypes, option?: OptionType) => void;
|
|
203
|
+
onChange?: (e: __types.RuleTypes, option?: __types_select.OptionType) => void;
|
|
476
204
|
disabled?: boolean;
|
|
477
205
|
loading?: boolean;
|
|
478
206
|
placeholder?: string;
|
|
@@ -483,8 +211,8 @@ declare const Select: react.ComponentType<__types.DefaultProps & {
|
|
|
483
211
|
onClear?: () => void;
|
|
484
212
|
error?: boolean;
|
|
485
213
|
showSearch?: boolean;
|
|
486
|
-
tagRender?: ((props: CustomTagProps) => react.ReactElement) | undefined;
|
|
487
|
-
maxTagPlaceholder?: react.ReactNode | ((omittedValues: DisplayValueType[]) => react.ReactNode);
|
|
214
|
+
tagRender?: ((props: __types_select.CustomTagProps) => react.ReactElement) | undefined;
|
|
215
|
+
maxTagPlaceholder?: react.ReactNode | ((omittedValues: __types_select.DisplayValueType[]) => react.ReactNode);
|
|
488
216
|
dropdownClassName?: string;
|
|
489
217
|
showArrow?: boolean;
|
|
490
218
|
onBlur?: react.FocusEventHandler<HTMLElement> | undefined;
|
|
@@ -499,8 +227,8 @@ declare const Select: react.ComponentType<__types.DefaultProps & {
|
|
|
499
227
|
placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
|
|
500
228
|
removeIcon?: react.ReactNode;
|
|
501
229
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
502
|
-
declare const Option: react.ComponentType<OptionProps>;
|
|
503
|
-
declare const Tag: react.ComponentType<CustomTagProps>;
|
|
230
|
+
declare const Option: react.ComponentType<__types_select.OptionProps>;
|
|
231
|
+
declare const Tag: react.ComponentType<__types_select.CustomTagProps>;
|
|
504
232
|
declare const Skeleton: react.ComponentType<SkeletonProps>;
|
|
505
233
|
declare const SkeletonAvatar: react.ComponentType<SkeletonAvatarProps>;
|
|
506
234
|
declare const SkeletonButton: react.ComponentType<SkeletonButtonProps>;
|