x-ui-design 0.3.47 → 0.3.48
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 +2 -4
- package/lib/components/Form/Item/Item.tsx +2 -4
- package/lib/helpers/flatten.ts +19 -0
- package/package.json +1 -1
- package/src/app/page.tsx +4 -1
- 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 -23
- package/dist/esm/types/components/Checkbox/index.d.ts +0 -1
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +0 -10
- 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 -28
- package/dist/esm/types/components/Input/Textarea/Textarea.d.ts +0 -28
- 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 -4
- 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 -31
- 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 -51
- 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/Upload/Upload.d.ts +0 -5
- package/dist/esm/types/components/Upload/index.d.ts +0 -1
- package/dist/esm/types/helpers/index.d.ts +0 -4
- package/dist/esm/types/hooks/useForm.d.ts +0 -4
- package/dist/esm/types/hooks/useWatch.d.ts +0 -9
- package/dist/esm/types/index.d.ts +0 -168
- package/dist/esm/types/types/button.d.ts +0 -42
- package/dist/esm/types/types/checkbox.d.ts +0 -22
- package/dist/esm/types/types/datepicker.d.ts +0 -119
- package/dist/esm/types/types/empty.d.ts +0 -7
- package/dist/esm/types/types/form.d.ts +0 -108
- package/dist/esm/types/types/index.d.ts +0 -25
- package/dist/esm/types/types/input.d.ts +0 -47
- package/dist/esm/types/types/radio.d.ts +0 -57
- package/dist/esm/types/types/select.d.ts +0 -97
- package/dist/esm/types/types/skeleton.d.ts +0 -50
- package/dist/esm/types/types/upload.d.ts +0 -54
- package/dist/esm/types/utils/index.d.ts +0 -14
- package/dist/index.d.ts +0 -239
- package/dist/index.esm.js +0 -3661
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -3703
- package/dist/index.js.map +0 -1
|
@@ -15,6 +15,7 @@ import { useForm } from '../../hooks/useForm';
|
|
|
15
15
|
import { FormInstance, FormItemProps, FormProps } from '../../types/form';
|
|
16
16
|
import { prefixClsForm } from '../../utils';
|
|
17
17
|
import FormItem from './Item/Item';
|
|
18
|
+
import { flattenChildren } from '@/helpers/flatten';
|
|
18
19
|
|
|
19
20
|
export const FormContext = createContext<FormInstance | null>(null);
|
|
20
21
|
|
|
@@ -47,10 +48,7 @@ const Form: FC<FormProps> & { Item: FC<FormItemProps> } = ({
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
|
|
50
|
-
const childrenList = useMemo(
|
|
51
|
-
() => (Array.isArray(children) ? children : [children]).filter(Boolean),
|
|
52
|
-
[children]
|
|
53
|
-
);
|
|
51
|
+
const childrenList = useMemo(() => flattenChildren(children), [children]);
|
|
54
52
|
|
|
55
53
|
useEffect(() => {
|
|
56
54
|
if (onFieldsChange) {
|
|
@@ -12,6 +12,7 @@ import React, {
|
|
|
12
12
|
} from 'react';
|
|
13
13
|
import { clsx } from '../../../helpers';
|
|
14
14
|
import { RuleType, SyntheticBaseEvent } from '../../../types';
|
|
15
|
+
import { flattenChildren } from '../../../helpers/flatten';
|
|
15
16
|
import {
|
|
16
17
|
FormItemChildComponentProps,
|
|
17
18
|
FormItemProps
|
|
@@ -57,10 +58,7 @@ const FormItem = ({
|
|
|
57
58
|
validateFields
|
|
58
59
|
} = formContext;
|
|
59
60
|
|
|
60
|
-
const childrenList = useMemo(
|
|
61
|
-
() => (Array.isArray(children) ? children : [children]).filter(Boolean),
|
|
62
|
-
[children]
|
|
63
|
-
);
|
|
61
|
+
const childrenList = useMemo(() => flattenChildren(children), [children]);
|
|
64
62
|
|
|
65
63
|
useEffect(() => {
|
|
66
64
|
if (name && !getFieldInstance(name)) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Children, Fragment, isValidElement, Suspense } from 'react';
|
|
2
|
+
|
|
3
|
+
export function flattenChildren(children: React.ReactNode): React.ReactElement[] {
|
|
4
|
+
const result: React.ReactElement[] = [];
|
|
5
|
+
|
|
6
|
+
Children.forEach(children, child => {
|
|
7
|
+
if (!isValidElement(child)) return;
|
|
8
|
+
|
|
9
|
+
if (child.type === Fragment || child.type === Suspense) {
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
result.push(...flattenChildren(child.props.children));
|
|
13
|
+
} else {
|
|
14
|
+
result.push(child);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return result;
|
|
19
|
+
}
|
package/package.json
CHANGED
package/src/app/page.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { Checkbox } from "../../lib/components/Checkbox";
|
|
|
6
6
|
import { Item } from "../../lib/components/Form/Item";
|
|
7
7
|
import { useForm } from "../../lib/hooks/useForm";
|
|
8
8
|
import { Select } from "../../lib/components/Select";
|
|
9
|
+
import { Suspense } from "react";
|
|
9
10
|
// import Option from "../../lib/components/Select/Option/Option";
|
|
10
11
|
|
|
11
12
|
// import { Form as AntForm, Radio } from 'antd'
|
|
@@ -1882,7 +1883,9 @@ export default function Home() {
|
|
|
1882
1883
|
</Item>
|
|
1883
1884
|
|
|
1884
1885
|
<Item rules={[{ required: true, validateBooleanFalse: true }]} name="dsfds" label="dzfdsfdsffdsf">
|
|
1885
|
-
<
|
|
1886
|
+
<Suspense fallback={null}>
|
|
1887
|
+
<Checkbox>sdvcdsv</Checkbox>
|
|
1888
|
+
</Suspense>
|
|
1886
1889
|
</Item>
|
|
1887
1890
|
</div>
|
|
1888
1891
|
{/* <Item label={'dsfdsf'} name="sdfdsf">
|
|
@@ -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, ...restProps }: ButtonProps) => ReactElement;
|
|
5
|
-
export default ButtonComponent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { MouseEvent } from 'react';
|
|
2
|
-
import './style.css';
|
|
3
|
-
declare const Checkbox: React.ForwardRefExoticComponent<import("../../types").DefaultProps & {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
onChange?: (e: MouseEvent<HTMLInputElement> & import("../../types").TargetProps) => void;
|
|
6
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
7
|
-
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
8
|
-
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
9
|
-
onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
|
|
10
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
11
|
-
value?: boolean;
|
|
12
|
-
tabIndex?: number;
|
|
13
|
-
name?: string;
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
id?: string;
|
|
16
|
-
autoFocus?: boolean;
|
|
17
|
-
type?: string;
|
|
18
|
-
skipGroup?: boolean;
|
|
19
|
-
required?: boolean;
|
|
20
|
-
defaultChecked?: boolean;
|
|
21
|
-
checked?: boolean;
|
|
22
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export default Checkbox;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Checkbox } from './Checkbox';
|
|
@@ -1,10 +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
|
-
RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, style, className, separator, defaultValue, bordered }: import("../../types/datepicker").TRangePickerProps) => React.JSX.Element;
|
|
9
|
-
};
|
|
10
|
-
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, 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, valuePropName, dependencies, initialValue, feedbackIcons, ...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,28 +0,0 @@
|
|
|
1
|
-
import React, { KeyboardEvent } from 'react';
|
|
2
|
-
import { SyntheticBaseEvent } from '../../types';
|
|
3
|
-
import './style.css';
|
|
4
|
-
import Textarea from './Textarea/Textarea';
|
|
5
|
-
declare const InputComponent: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & import("../../types").DefaultProps & {
|
|
6
|
-
addonBefore?: React.ReactNode;
|
|
7
|
-
addonAfter?: React.ReactNode;
|
|
8
|
-
size?: import("../../types").SizeType;
|
|
9
|
-
prefix?: React.ReactNode;
|
|
10
|
-
suffix?: React.ReactNode;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
allowClear?: boolean;
|
|
13
|
-
error?: boolean;
|
|
14
|
-
bordered?: boolean;
|
|
15
|
-
iconRender?: (visible: boolean) => React.ReactElement;
|
|
16
|
-
onChange?: (event: SyntheticBaseEvent) => void;
|
|
17
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
18
|
-
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
19
|
-
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
20
|
-
onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
|
|
21
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
22
|
-
onPressEnter?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
23
|
-
feedbackIcons?: boolean;
|
|
24
|
-
} & React.RefAttributes<HTMLInputElement>>;
|
|
25
|
-
declare const Input: typeof InputComponent & {
|
|
26
|
-
TextArea: typeof Textarea;
|
|
27
|
-
};
|
|
28
|
-
export default Input;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './style.css';
|
|
3
|
-
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onResize"> & import("../../..").DefaultProps & {
|
|
4
|
-
value?: string;
|
|
5
|
-
className?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
autoSize?: boolean | {
|
|
8
|
-
minRows?: number;
|
|
9
|
-
maxRows?: number;
|
|
10
|
-
};
|
|
11
|
-
onPressEnter?: React.KeyboardEventHandler<HTMLTextAreaElement>;
|
|
12
|
-
onResize?: (size: {
|
|
13
|
-
width: number;
|
|
14
|
-
height: number;
|
|
15
|
-
}) => void;
|
|
16
|
-
styles?: {
|
|
17
|
-
textarea?: React.CSSProperties;
|
|
18
|
-
count?: React.CSSProperties;
|
|
19
|
-
};
|
|
20
|
-
bordered?: boolean;
|
|
21
|
-
size?: import("../../../types").SizeType;
|
|
22
|
-
status?: "success" | "error";
|
|
23
|
-
rootClassName?: string;
|
|
24
|
-
variant?: "outlined" | "borderless" | "filled" | "underlined";
|
|
25
|
-
error?: boolean;
|
|
26
|
-
allowClear?: boolean;
|
|
27
|
-
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
28
|
-
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 +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,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './style.css';
|
|
3
|
-
declare const Radio: React.ForwardRefExoticComponent<import("../..").DefaultProps & {
|
|
4
|
-
defaultChecked?: boolean;
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
onChange?: (e: import("../..").SyntheticBaseEvent) => void;
|
|
9
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
10
|
-
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
11
|
-
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
12
|
-
onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
|
|
13
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
14
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
15
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
16
|
-
value?: import("../..").RuleType;
|
|
17
|
-
tabIndex?: number;
|
|
18
|
-
name?: string;
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
id?: string;
|
|
21
|
-
autoFocus?: boolean;
|
|
22
|
-
type?: string;
|
|
23
|
-
skipGroup?: boolean;
|
|
24
|
-
required?: boolean;
|
|
25
|
-
button?: boolean;
|
|
26
|
-
error?: boolean;
|
|
27
|
-
} & React.RefAttributes<HTMLLabelElement>> & {
|
|
28
|
-
Group: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, className, options, children, ...props }: import("../../types/radio").RadioGroupProps) => React.JSX.Element;
|
|
29
|
-
Button: ({ prefixCls, className, checked, disabled, children, size, ...props }: import("../../types/radio").RadioButtonProps) => React.JSX.Element;
|
|
30
|
-
};
|
|
31
|
-
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,51 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { OptionType } from '../../types/select';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Select: React.ForwardRefExoticComponent<import("../../types").DefaultProps & {
|
|
5
|
-
id?: string;
|
|
6
|
-
searchValue?: string;
|
|
7
|
-
onSearch?: (value: string) => void;
|
|
8
|
-
autoClearSearchValue?: boolean;
|
|
9
|
-
onSelect?: (value: import("../../types").RuleTypes, option?: OptionType) => void;
|
|
10
|
-
onDeselect?: (value: string, option?: OptionType) => void;
|
|
11
|
-
filterOption?: boolean | ((input: string, option: OptionType) => boolean);
|
|
12
|
-
optionFilterProp?: string;
|
|
13
|
-
options?: OptionType[];
|
|
14
|
-
children?: ReactNode;
|
|
15
|
-
defaultActiveFirstOption?: boolean;
|
|
16
|
-
listHeight?: number;
|
|
17
|
-
menuItemSelectedIcon?: ReactNode;
|
|
18
|
-
mode?: "default" | "multiple" | "tags";
|
|
19
|
-
value?: import("../../types").RuleTypes;
|
|
20
|
-
defaultValue?: import("../../types").RuleTypes;
|
|
21
|
-
maxCount?: number;
|
|
22
|
-
onChange?: (e: import("../../types").RuleTypes, option?: OptionType) => void;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
placeholder?: string;
|
|
26
|
-
allowClear?: boolean;
|
|
27
|
-
filterable?: boolean;
|
|
28
|
-
defaultOpen?: boolean;
|
|
29
|
-
size?: "small" | "middle" | "large";
|
|
30
|
-
onClear?: () => void;
|
|
31
|
-
error?: boolean;
|
|
32
|
-
showSearch?: boolean;
|
|
33
|
-
tagRender?: ((props: import("../../types/select").CustomTagProps) => ReactElement) | undefined;
|
|
34
|
-
maxTagPlaceholder?: ReactNode | ((omittedValues: import("../../types/select").DisplayValueType[]) => ReactNode);
|
|
35
|
-
dropdownClassName?: string;
|
|
36
|
-
showArrow?: boolean;
|
|
37
|
-
onBlur?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
38
|
-
onDropdownVisibleChange?: ((open: boolean) => void) | undefined;
|
|
39
|
-
showAction?: ("click" | "focus")[] | undefined;
|
|
40
|
-
suffixIcon?: ReactNode;
|
|
41
|
-
open?: boolean;
|
|
42
|
-
notFoundContent?: ReactNode;
|
|
43
|
-
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
44
|
-
dropdownRender?: (menu: ReactNode) => ReactNode;
|
|
45
|
-
feedbackIcons?: boolean;
|
|
46
|
-
placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
|
|
47
|
-
removeIcon?: ReactNode;
|
|
48
|
-
} & React.RefAttributes<HTMLDivElement>> & {
|
|
49
|
-
Option: React.FC<import("../../types/select").OptionProps>;
|
|
50
|
-
};
|
|
51
|
-
export default Select;
|
|
@@ -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,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';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RuleTypes } from '../types';
|
|
2
|
-
import type { FieldData, FormInstance } from '../types/form';
|
|
3
|
-
declare const useForm: (initialValues?: Record<string, RuleTypes>, onFieldsChange?: (changedFields: FieldData[]) => void, onValuesChange?: (changedValues: Record<string, RuleTypes>, allValues: Record<string, RuleTypes>) => void) => FormInstance;
|
|
4
|
-
export { useForm };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { RuleType } from '../types';
|
|
2
|
-
import { FormInstance } from '../types/form';
|
|
3
|
-
type UseWatchProps = {
|
|
4
|
-
name?: string;
|
|
5
|
-
defaultValue?: RuleType;
|
|
6
|
-
form?: FormInstance;
|
|
7
|
-
};
|
|
8
|
-
export declare const useWatch: ({ name, defaultValue, form }: UseWatchProps) => any;
|
|
9
|
-
export {};
|