x-ui-design 0.6.51 → 0.6.53
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/lib/components/Form/Form.tsx +7 -7
- package/lib/components/Form/Item/Item.tsx +10 -7
- package/lib/components/Select/Select.tsx +11 -12
- package/lib/hooks/useForm.ts +8 -1
- package/package.json +1 -1
- package/src/app/page.tsx +35 -33
- package/dist/esm/types/components/Button/Button.d.ts +0 -5
- package/dist/esm/types/components/Button/index.d.ts +0 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +0 -8
- package/dist/esm/types/components/Checkbox/index.d.ts +0 -1
- package/dist/esm/types/components/ConditionalWrapper/index.d.ts +0 -7
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +0 -8
- package/dist/esm/types/components/DatePicker/RangePicker/RangePicker.d.ts +0 -5
- package/dist/esm/types/components/DatePicker/RangePicker/index.d.ts +0 -1
- package/dist/esm/types/components/DatePicker/TimePicker/TimePicker.d.ts +0 -5
- package/dist/esm/types/components/DatePicker/TimePicker/index.d.ts +0 -1
- package/dist/esm/types/components/DatePicker/index.d.ts +0 -1
- package/dist/esm/types/components/Empty/Empty.d.ts +0 -5
- package/dist/esm/types/components/Empty/index.d.ts +0 -1
- package/dist/esm/types/components/Form/Form.d.ts +0 -7
- package/dist/esm/types/components/Form/Item/Item.d.ts +0 -8
- package/dist/esm/types/components/Form/Item/index.d.ts +0 -1
- package/dist/esm/types/components/Form/index.d.ts +0 -1
- package/dist/esm/types/components/Icons/Icons.d.ts +0 -17
- package/dist/esm/types/components/Icons/index.d.ts +0 -1
- package/dist/esm/types/components/Input/Input.d.ts +0 -12
- package/dist/esm/types/components/Input/Textarea/Textarea.d.ts +0 -8
- package/dist/esm/types/components/Input/Textarea/index.d.ts +0 -1
- package/dist/esm/types/components/Input/index.d.ts +0 -1
- package/dist/esm/types/components/Radio/Button/Button.d.ts +0 -5
- package/dist/esm/types/components/Radio/Button/index.d.ts +0 -1
- package/dist/esm/types/components/Radio/Group/Group.d.ts +0 -5
- package/dist/esm/types/components/Radio/Group/index.d.ts +0 -1
- package/dist/esm/types/components/Radio/Radio.d.ts +0 -8
- package/dist/esm/types/components/Radio/index.d.ts +0 -1
- package/dist/esm/types/components/Select/Option/Option.d.ts +0 -5
- package/dist/esm/types/components/Select/Option/index.d.ts +0 -1
- package/dist/esm/types/components/Select/Select.d.ts +0 -10
- package/dist/esm/types/components/Select/Tag/Tag.d.ts +0 -5
- package/dist/esm/types/components/Select/Tag/index.d.ts +0 -1
- package/dist/esm/types/components/Select/index.d.ts +0 -1
- package/dist/esm/types/components/Skeleton/Avatar/Avatar.d.ts +0 -8
- package/dist/esm/types/components/Skeleton/Avatar/index.d.ts +0 -1
- package/dist/esm/types/components/Skeleton/Button/Button.d.ts +0 -5
- package/dist/esm/types/components/Skeleton/Button/index.d.ts +0 -1
- package/dist/esm/types/components/Skeleton/Image/Image.d.ts +0 -5
- package/dist/esm/types/components/Skeleton/Image/index.d.ts +0 -1
- package/dist/esm/types/components/Skeleton/Input/Input.d.ts +0 -5
- package/dist/esm/types/components/Skeleton/Input/index.d.ts +0 -1
- package/dist/esm/types/components/Skeleton/Skeleton.d.ts +0 -10
- package/dist/esm/types/components/Skeleton/index.d.ts +0 -1
- package/dist/esm/types/components/Switch/Switch.d.ts +0 -8
- package/dist/esm/types/components/Switch/index.d.ts +0 -1
- package/dist/esm/types/components/Upload/Upload.d.ts +0 -5
- package/dist/esm/types/components/Upload/index.d.ts +0 -1
- package/dist/esm/types/helpers/flatten.d.ts +0 -2
- package/dist/esm/types/helpers/index.d.ts +0 -4
- package/dist/esm/types/helpers/mask.d.ts +0 -7
- package/dist/esm/types/hooks/useForm.d.ts +0 -7
- package/dist/esm/types/hooks/useWatch.d.ts +0 -9
- package/dist/esm/types/hooks/useWatchError.d.ts +0 -2
- package/dist/esm/types/index.d.ts +0 -89
- package/dist/esm/types/types/button.d.ts +0 -43
- package/dist/esm/types/types/checkbox.d.ts +0 -24
- package/dist/esm/types/types/datepicker.d.ts +0 -120
- package/dist/esm/types/types/empty.d.ts +0 -7
- package/dist/esm/types/types/form.d.ts +0 -122
- package/dist/esm/types/types/index.d.ts +0 -25
- package/dist/esm/types/types/input.d.ts +0 -53
- package/dist/esm/types/types/radio.d.ts +0 -58
- package/dist/esm/types/types/select.d.ts +0 -102
- package/dist/esm/types/types/skeleton.d.ts +0 -50
- package/dist/esm/types/types/switch.d.ts +0 -18
- package/dist/esm/types/types/upload.d.ts +0 -54
- package/dist/esm/types/utils/index.d.ts +0 -15
- package/dist/esm/types/utils/lazy.d.ts +0 -1
- package/dist/index.d.ts +0 -179
- package/dist/index.esm.js +0 -4170
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -4214
- package/dist/index.js.map +0 -1
|
@@ -8,6 +8,7 @@ import React, {
|
|
|
8
8
|
ReactElement,
|
|
9
9
|
ReactNode,
|
|
10
10
|
SyntheticEvent,
|
|
11
|
+
useCallback,
|
|
11
12
|
useEffect,
|
|
12
13
|
useMemo,
|
|
13
14
|
useRef
|
|
@@ -40,15 +41,14 @@ const Form: FC<FormProps> & { Item: FC<FormItemProps> } = ({
|
|
|
40
41
|
const formRef = useRef<HTMLFormElement>(null);
|
|
41
42
|
|
|
42
43
|
const formInstance = useMemo(() => form || internalForm, [form, internalForm]);
|
|
44
|
+
const childrenList = useMemo(() => flattenChildren(children), [children])
|
|
43
45
|
|
|
44
|
-
const handleSubmit = async (e: SyntheticEvent) => {
|
|
46
|
+
const handleSubmit = useCallback(async (e: SyntheticEvent) => {
|
|
45
47
|
e.preventDefault();
|
|
46
48
|
e.stopPropagation();
|
|
47
49
|
|
|
48
50
|
await formInstance.submit();
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const childrenList = useMemo(() => flattenChildren(children), [children]);
|
|
51
|
+
}, []);
|
|
52
52
|
|
|
53
53
|
useEffect(() => {
|
|
54
54
|
if (onFinish) { formInstance.setOnFinish?.(onFinish) }
|
|
@@ -59,7 +59,7 @@ const Form: FC<FormProps> & { Item: FC<FormItemProps> } = ({
|
|
|
59
59
|
if (scrollToFirstError) { formInstance.setScrollToFirstError(scrollToFirstError) }
|
|
60
60
|
}, [formInstance, onFieldsChange, onValuesChange, onFinishFailed, onFinish, scrollToFirstError]);
|
|
61
61
|
|
|
62
|
-
const injectPropsIntoFinalLeaf = (child: ReactNode): ReactNode => {
|
|
62
|
+
const injectPropsIntoFinalLeaf = useCallback((child: ReactNode): ReactNode => {
|
|
63
63
|
if (!isValidElement(child)) {
|
|
64
64
|
return child;
|
|
65
65
|
}
|
|
@@ -96,7 +96,7 @@ const Form: FC<FormProps> & { Item: FC<FormItemProps> } = ({
|
|
|
96
96
|
size={childProps.size || rest.size}
|
|
97
97
|
layout={childProps.layout || layout}
|
|
98
98
|
/>
|
|
99
|
-
};
|
|
99
|
+
}, [rest.size, layout]);
|
|
100
100
|
|
|
101
101
|
return (
|
|
102
102
|
<FormContext.Provider value={formInstance}>
|
|
@@ -106,7 +106,7 @@ const Form: FC<FormProps> & { Item: FC<FormItemProps> } = ({
|
|
|
106
106
|
onSubmit={handleSubmit}
|
|
107
107
|
className={`${prefixCls} ${className}`}
|
|
108
108
|
>
|
|
109
|
-
{Children.map(childrenList,
|
|
109
|
+
{Children.map(childrenList, injectPropsIntoFinalLeaf)}
|
|
110
110
|
</form>
|
|
111
111
|
</FormContext.Provider>
|
|
112
112
|
);
|
|
@@ -4,6 +4,7 @@ import React, {
|
|
|
4
4
|
Children,
|
|
5
5
|
isValidElement,
|
|
6
6
|
ReactElement,
|
|
7
|
+
useCallback,
|
|
7
8
|
useContext,
|
|
8
9
|
useEffect,
|
|
9
10
|
useMemo,
|
|
@@ -200,7 +201,7 @@ const FormItemChildComponent = ({
|
|
|
200
201
|
const [wasNormalize, setWasNormalize] = useState(false);
|
|
201
202
|
|
|
202
203
|
const { getFieldsValue } = formContext || {};
|
|
203
|
-
|
|
204
|
+
|
|
204
205
|
const handleChange = (e: SyntheticBaseEvent) => {
|
|
205
206
|
let rawValue: RuleType | SyntheticBaseEvent = e?.target
|
|
206
207
|
? e.target.value
|
|
@@ -255,10 +256,16 @@ const FormItemChildComponent = ({
|
|
|
255
256
|
)
|
|
256
257
|
}
|
|
257
258
|
|
|
259
|
+
const _onChange = useCallback((e: SyntheticBaseEvent, option?: OptionProps) => {
|
|
260
|
+
handleChange(e);
|
|
261
|
+
|
|
262
|
+
childProps?.onChange?.(e, option)
|
|
263
|
+
}, [handleChange, childProps?.onChange])
|
|
264
|
+
|
|
258
265
|
if (childProps?.__injected) {
|
|
259
266
|
return child;
|
|
260
267
|
}
|
|
261
|
-
|
|
268
|
+
|
|
262
269
|
return <child.type
|
|
263
270
|
{...props}
|
|
264
271
|
ref={ref}
|
|
@@ -267,11 +274,7 @@ const FormItemChildComponent = ({
|
|
|
267
274
|
{...child.props}
|
|
268
275
|
name={name}
|
|
269
276
|
child={child}
|
|
270
|
-
onChange={
|
|
271
|
-
handleChange(e);
|
|
272
|
-
|
|
273
|
-
childProps?.onChange?.(e, option)
|
|
274
|
-
}}
|
|
277
|
+
onChange={_onChange}
|
|
275
278
|
key={`${name}_${wasNormalize}`}
|
|
276
279
|
value={fieldValue ?? props.value}
|
|
277
280
|
{...('dangerouslySetInnerHTML' in childProps ? {} : {
|
|
@@ -56,7 +56,7 @@ function getTextFromNode(node: ReactNode): string {
|
|
|
56
56
|
return '';
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
const
|
|
59
|
+
const Select = ({
|
|
60
60
|
prefixCls = prefixClsSelect,
|
|
61
61
|
id,
|
|
62
62
|
searchValue = '',
|
|
@@ -154,10 +154,10 @@ const SelectComponent = ({
|
|
|
154
154
|
nativeElement: selectRef.current
|
|
155
155
|
}), []);
|
|
156
156
|
|
|
157
|
-
const handleMouseEnter = () =>
|
|
158
|
-
!disabled && selected?.length && setIsHover(true);
|
|
157
|
+
const handleMouseEnter = useCallback(() =>
|
|
158
|
+
!disabled && selected?.length && setIsHover(true), [disabled, selected?.length]);
|
|
159
159
|
|
|
160
|
-
const handleMouseLeave = () => !disabled && setIsHover(false);
|
|
160
|
+
const handleMouseLeave = useCallback(() => !disabled && setIsHover(false), [disabled]);
|
|
161
161
|
|
|
162
162
|
const handleClearInputValue = useCallback(() => {
|
|
163
163
|
if (!autoClearSearchValue) {
|
|
@@ -185,7 +185,7 @@ const SelectComponent = ({
|
|
|
185
185
|
setSelected(hasMode ? checkModeInitialValue : initialValue)
|
|
186
186
|
}, [checkModeInitialValue, hasMode, initialValue])
|
|
187
187
|
|
|
188
|
-
const handleClickOutside = (event?: MouseEvent): void => {
|
|
188
|
+
const handleClickOutside = useCallback((event?: MouseEvent): void => {
|
|
189
189
|
if (!selectRef.current) return;
|
|
190
190
|
|
|
191
191
|
const dropdown = document.querySelector(`.${prefixCls}-dropdown`);
|
|
@@ -200,7 +200,7 @@ const SelectComponent = ({
|
|
|
200
200
|
onClose?.();
|
|
201
201
|
onDropdownVisibleChange?.(false, selected)
|
|
202
202
|
}
|
|
203
|
-
};
|
|
203
|
+
}, [selectRef.current, prefixCls, selected]);
|
|
204
204
|
|
|
205
205
|
useEffect(() => {
|
|
206
206
|
document.addEventListener('mousedown', handleClickOutside);
|
|
@@ -312,7 +312,7 @@ const SelectComponent = ({
|
|
|
312
312
|
updateDropdownPosition(true);
|
|
313
313
|
}, [searchQuery.length]);
|
|
314
314
|
|
|
315
|
-
const getScrollParents = (element: HTMLElement): HTMLElement[] => {
|
|
315
|
+
const getScrollParents = useCallback((element: HTMLElement): HTMLElement[] => {
|
|
316
316
|
const parents: HTMLElement[] = [];
|
|
317
317
|
let current = element.parentElement;
|
|
318
318
|
|
|
@@ -324,7 +324,7 @@ const SelectComponent = ({
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
return parents;
|
|
327
|
-
};
|
|
327
|
+
}, []);
|
|
328
328
|
|
|
329
329
|
const handleSearch = (e: SyntheticBaseEvent) => {
|
|
330
330
|
setSearchQuery(e.target.value as string);
|
|
@@ -525,7 +525,7 @@ const SelectComponent = ({
|
|
|
525
525
|
return children
|
|
526
526
|
? extractOptions(children)
|
|
527
527
|
: Array.isArray(options) ? options : []
|
|
528
|
-
}, [children,
|
|
528
|
+
}, [children, options]);
|
|
529
529
|
|
|
530
530
|
const triggerNode = useMemo(() => {
|
|
531
531
|
return selectRef.current?.querySelector(`.${prefixCls}-trigger`) as HTMLElement
|
|
@@ -915,7 +915,6 @@ const SelectComponent = ({
|
|
|
915
915
|
);
|
|
916
916
|
};
|
|
917
917
|
|
|
918
|
-
|
|
919
|
-
const Select = Object.assign(SelectComponent, { Option });
|
|
918
|
+
Select.displayName = 'Select';
|
|
920
919
|
|
|
921
|
-
export default
|
|
920
|
+
export default Select;
|
package/lib/hooks/useForm.ts
CHANGED
|
@@ -457,6 +457,7 @@ const useForm = (
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
|
|
460
|
+
const formInstanceRef = useRef<FormInstance>(null);
|
|
460
461
|
const formInstance: FormInstance = {
|
|
461
462
|
submit,
|
|
462
463
|
setFields,
|
|
@@ -491,7 +492,13 @@ const useForm = (
|
|
|
491
492
|
changeStep,
|
|
492
493
|
};
|
|
493
494
|
|
|
494
|
-
|
|
495
|
+
if (formInstanceRef.current) {
|
|
496
|
+
return formInstanceRef.current
|
|
497
|
+
} else {
|
|
498
|
+
formInstanceRef.current = formInstance;
|
|
499
|
+
|
|
500
|
+
return formInstanceRef.current
|
|
501
|
+
}
|
|
495
502
|
};
|
|
496
503
|
|
|
497
504
|
export { useForm };
|
package/package.json
CHANGED
package/src/app/page.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import { Select } from "../../lib/components/Select";
|
|
|
13
13
|
// import { Upload } from '../../lib/components/Upload'
|
|
14
14
|
import { Button } from "../../lib/components/Button";
|
|
15
15
|
import { useCallback, useEffect, useState } from "react";
|
|
16
|
-
import dayjs from 'dayjs';
|
|
16
|
+
// import dayjs from 'dayjs';
|
|
17
17
|
import { useForm } from "../../lib/hooks/useForm";
|
|
18
18
|
import { RadioGroup } from "../../lib/components/Radio/Group";
|
|
19
19
|
import { useWatch } from '../../lib/hooks/useWatch';
|
|
@@ -1863,56 +1863,58 @@ export default function Home() {
|
|
|
1863
1863
|
|
|
1864
1864
|
const fields = useWatch({ form });
|
|
1865
1865
|
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1866
|
+
console.log(fields);
|
|
1867
|
+
|
|
1868
|
+
// const disableDate = useCallback(
|
|
1869
|
+
// (date: any) => {
|
|
1870
|
+
// date = dayjs(date);
|
|
1869
1871
|
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1872
|
+
// if (date > dayjs().endOf('day')) {
|
|
1873
|
+
// return true;
|
|
1874
|
+
// }
|
|
1873
1875
|
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1876
|
+
// if (!period || !dates || dates.length === 0) {
|
|
1877
|
+
// return false;
|
|
1878
|
+
// }
|
|
1877
1879
|
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1880
|
+
// const tooLate =
|
|
1881
|
+
// dates[0] &&
|
|
1882
|
+
// date.add(-1, 'd').diff(dates[0], period.unit) >=
|
|
1883
|
+
// period.value;
|
|
1882
1884
|
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1885
|
+
// const tooEarly =
|
|
1886
|
+
// dates[0] &&
|
|
1887
|
+
// date.add(-1, 'd').diff(dates[0], 0) <= -period.value;
|
|
1886
1888
|
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
);
|
|
1889
|
+
// return tooLate || tooEarly;
|
|
1890
|
+
// },
|
|
1891
|
+
// [dates, period]
|
|
1892
|
+
// );
|
|
1891
1893
|
|
|
1892
|
-
const onOpenChange = useCallback((open: boolean) => {
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
}, []);
|
|
1894
|
+
// const onOpenChange = useCallback((open: boolean) => {
|
|
1895
|
+
// if (open) {
|
|
1896
|
+
// setDates([]);
|
|
1897
|
+
// }
|
|
1898
|
+
// }, []);
|
|
1897
1899
|
|
|
1898
1900
|
return (
|
|
1899
1901
|
<>
|
|
1900
1902
|
<Form
|
|
1901
1903
|
form={form}
|
|
1902
1904
|
layout="vertical"
|
|
1903
|
-
style={{ width: 400 }}
|
|
1905
|
+
// style={{ width: 400 }}
|
|
1904
1906
|
scrollToFirstError={true}
|
|
1905
1907
|
// onValuesChange={(values) => {
|
|
1906
1908
|
// console.log(values, form.isFieldsTouched());
|
|
1907
1909
|
// }}
|
|
1908
|
-
onFinishFailed={(errors) => {
|
|
1909
|
-
|
|
1910
|
-
}}
|
|
1911
|
-
onFinish={(values) => console.log('onFinish', values)}
|
|
1910
|
+
// onFinishFailed={(errors) => {
|
|
1911
|
+
// console.log('errors', errors);
|
|
1912
|
+
// }}
|
|
1913
|
+
// onFinish={(values) => console.log('onFinish', values)}
|
|
1912
1914
|
>
|
|
1913
1915
|
{current === 0
|
|
1914
1916
|
? <>
|
|
1915
|
-
{
|
|
1917
|
+
{true ? <Item rules={[{ required: true }]} name="email" label="Email">
|
|
1916
1918
|
<div>
|
|
1917
1919
|
<Input placeholder="Email" value={value} onChange={(e) => setValue(e.target.value)} />
|
|
1918
1920
|
</div>
|
|
@@ -1928,7 +1930,7 @@ export default function Home() {
|
|
|
1928
1930
|
<Item rules={[{ required: true }]} name="country" label="Country">
|
|
1929
1931
|
<Select
|
|
1930
1932
|
showSearch
|
|
1931
|
-
style={{ width: 400 }}
|
|
1933
|
+
// style={{ width: 400 }}
|
|
1932
1934
|
placeholder="Select..."
|
|
1933
1935
|
options={CountryCodes}
|
|
1934
1936
|
/>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { ButtonProps } from '../../types/button';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const ButtonComponent: ({ type, variant, color, shape, size, htmlType, className, rootClassName, classNames: customClassNames, styles, prefixCls, icon, iconPosition, loading, disabled, ghost, danger, block, children, href, __injected, child, ...restProps }: ButtonProps) => ReactElement;
|
|
5
|
-
export default ButtonComponent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { CheckboxProps } from '../../types/checkbox';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Checkbox: {
|
|
5
|
-
({ prefixCls, className, defaultChecked, checked, style, disabled, onChange, onClick, onMouseEnter, onMouseLeave, onKeyPress, onKeyDown, tabIndex, name, children, id, autoFocus, type, value, required, noStyle, titleClick, ref }: CheckboxProps): ReactElement;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
export default Checkbox;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Checkbox } from './Checkbox';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TDatePickerProps } from '../../types/datepicker';
|
|
3
|
-
import './style.css';
|
|
4
|
-
export declare const NUMBER_SIX = 6;
|
|
5
|
-
export declare const MONTH_LENGTH = 11;
|
|
6
|
-
export declare const NEXT_DAYS_COUNT_AS_CURRENT_MUNTH = 35;
|
|
7
|
-
declare const DatePicker: ({ value, onChange, onCalendarChange, disabled, error, placeholder, prefixCls, noStyle, feedbackIcons, locale, placement, defaultValue, size, format, getPopupContainer, showToday, allowClear, disabledDate, suffixIcon, picker, prefix, defaultOpen, inputReadOnly, bordered }: TDatePickerProps) => React.JSX.Element;
|
|
8
|
-
export default DatePicker;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TRangePickerProps } from '../../../types/datepicker';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, onOpenChange, onCalendarChange, style, className, separator, defaultValue, bordered }: TRangePickerProps) => React.JSX.Element;
|
|
5
|
-
export default RangePicker;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RangePicker } from '../RangePicker/RangePicker';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TimePicker } from '../TimePicker/TimePicker';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as DatePicker } from '../DatePicker/DatePicker';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Empty } from '../Empty/Empty';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { FormInstance, FormItemProps, FormProps } from '../../types/form';
|
|
3
|
-
export declare const FormContext: React.Context<FormInstance | null>;
|
|
4
|
-
declare const Form: FC<FormProps> & {
|
|
5
|
-
Item: FC<FormItemProps>;
|
|
6
|
-
};
|
|
7
|
-
export default Form;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormItemProps } from '../../../types/form';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const FormItem: {
|
|
5
|
-
({ prefixCls, name, label, rules, children, className, layout, style, dependencies, initialValue, feedbackIcons, extra, hideLabel, removeErrorMessageHeight, ...props }: FormItemProps): React.JSX.Element;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
export default FormItem;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Item } from './Item';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Form } from './Form';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const ClearIcon: () => React.JSX.Element;
|
|
3
|
-
declare const ArrowIcon: ({ isOpen }: {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
}) => React.JSX.Element;
|
|
6
|
-
declare const LoadingIcon: () => React.JSX.Element;
|
|
7
|
-
declare const CheckIcon: () => React.JSX.Element;
|
|
8
|
-
declare const SearchIcon: () => React.JSX.Element;
|
|
9
|
-
declare const CalendarIcon: () => React.JSX.Element;
|
|
10
|
-
declare const SuccessIcon: () => React.JSX.Element;
|
|
11
|
-
declare const ErrorIcon: () => React.JSX.Element;
|
|
12
|
-
declare const DateDistanceIcon: () => React.JSX.Element;
|
|
13
|
-
declare const TimeIcon: () => React.JSX.Element;
|
|
14
|
-
declare const StampleIcon: () => React.JSX.Element;
|
|
15
|
-
declare const TrashIcon: () => React.JSX.Element;
|
|
16
|
-
declare const SpinerIcon: () => React.JSX.Element;
|
|
17
|
-
export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon } from './Icons';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputProps } from '../../types/input';
|
|
3
|
-
import Textarea from './Textarea/Textarea';
|
|
4
|
-
import './style.css';
|
|
5
|
-
declare const InputComponent: {
|
|
6
|
-
({ size, error, suffix, prefix, addonAfter, addonBefore, onPressEnter, disabled, allowClear, prefixCls, className, value, iconRender, noStyle, feedbackIcons, mask, maskChar, maskRegex, __injected, defaultValue, child, ref, ...props }: InputProps): React.JSX.Element;
|
|
7
|
-
displayName: string;
|
|
8
|
-
};
|
|
9
|
-
declare const Input: typeof InputComponent & {
|
|
10
|
-
TextArea: typeof Textarea;
|
|
11
|
-
};
|
|
12
|
-
export default Input;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextareaProps } from '../../../types/input';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Textarea: {
|
|
5
|
-
({ prefixCls, value, className, style, autoSize, onPressEnter, onResize, styles, bordered, size, status, rootClassName, variant, error, allowClear, ref, ...props }: TextareaProps): React.JSX.Element;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
export default Textarea;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Textarea } from '../Textarea/Textarea';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Input } from '../Input/Input';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioButtonProps } from '../../../types/radio';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const RadioButton: ({ prefixCls, className, checked, disabled, children, size, ...props }: RadioButtonProps) => React.JSX.Element;
|
|
5
|
-
export default RadioButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RadioButton } from '../../Radio/Button/Button';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioGroupProps } from '../../../types/radio';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const RadioGroup: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, className, options, children, ...props }: RadioGroupProps) => React.JSX.Element;
|
|
5
|
-
export default RadioGroup;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RadioGroup } from '../../Radio/Group/Group';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioProps } from '../../types/radio';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Radio: {
|
|
5
|
-
({ prefixCls, className, value, onChange, onClick, disabled, children, name, title, defaultChecked, checked, onBlur, onFocus, onMouseEnter, onMouseLeave, noStyle, ref }: RadioProps): React.JSX.Element;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
export default Radio;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Radio } from '../Radio/Radio';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Option } from '../../Select/Option/Option';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
import { SelectProps } from '../../types/select';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const _default: React.MemoExoticComponent<{
|
|
5
|
-
({ prefixCls, id, searchValue, autoClearSearchValue, filterOption, optionFilterProp, children, options, listHeight, menuItemSelectedIcon, mode, value, defaultValue, maxCount, disabled, loading, placeholder, allowClear, filterable, defaultOpen, size, error, dropdownClassName, className, suffixIcon, searchIcon, style, showSearch, open, closeFromParent, showArrow, notFoundContent, noStyle, feedbackIcons, placement, removeIcon, maxTagCount, onSearch, onSelect, onDeselect, onClear, onChange, onClose, tagRender, getPopupContainer, dropdownRender, onDropdownVisibleChange, ref }: SelectProps): ReactElement;
|
|
6
|
-
displayName: string;
|
|
7
|
-
} & {
|
|
8
|
-
Option: React.FC<import("../../types/select").OptionProps>;
|
|
9
|
-
}>;
|
|
10
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Tag } from '../../Select/Tag/Tag';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Select } from '../Select/Select';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { SkeletonAvatarProps } from '../../../types/skeleton';
|
|
3
|
-
import './style.css';
|
|
4
|
-
export declare const AVATAR_DEFAULT_SIZE = 32;
|
|
5
|
-
export declare const AVATAR_GLOBAL_SIZE = 40;
|
|
6
|
-
export declare const GET_AVATAR_SKELETON_PROPS: (avatar: SkeletonAvatarProps | boolean) => SkeletonAvatarProps;
|
|
7
|
-
declare const SkeletonAvatar: FC<SkeletonAvatarProps>;
|
|
8
|
-
export default SkeletonAvatar;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonAvatar } from './Avatar';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonButton } from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonImage } from './Image';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonInput } from './Input';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
import { SkeletonProps } from '../../types/skeleton';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Skeleton: (({ prefixCls, active, className, style, avatar, paragraph, round, title, teamLogo }: SkeletonProps) => ReactElement) & {
|
|
5
|
-
Image: React.FC<import("../../types/skeleton").SkeletonImageProps>;
|
|
6
|
-
Input: React.FC<import("../../types/skeleton").SkeletonInputProps>;
|
|
7
|
-
Avatar: React.FC<import("../../types/skeleton").SkeletonAvatarProps>;
|
|
8
|
-
Button: React.FC<import("../../types/skeleton").SkeletonButtonProps>;
|
|
9
|
-
};
|
|
10
|
-
export default Skeleton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Skeleton } from './Skeleton';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SwitchProps } from '../../types/switch';
|
|
3
|
-
import './index.css';
|
|
4
|
-
declare const Switch: {
|
|
5
|
-
({ prefixCls, checked, onChange, onClick, disabled, className, style, defaultChecked, value }: SwitchProps): React.JSX.Element;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
export default Switch;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Switch } from './Switch';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { UploadProps } from '../../types/upload';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Upload: ({ prefixCls, multiple, style, className, onChange, action, name, method, headers, directory, beforeUpload, rootClassName, onRemove, disabled, withCredentials, openFileDialogOnClick, maxCount, fileList: controlledFileList, customRequest, accept, listType, showUploadList, children, noStyle, defaultFileList }: UploadProps) => React.JSX.Element;
|
|
5
|
-
export default Upload;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Upload } from '../Upload/Upload';
|