x-ui-design 0.8.23 → 0.8.25
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/Popover/Popover.tsx +4 -11
- package/lib/hooks/usePosition.ts +11 -55
- package/package.json +1 -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 -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/Dropdown/Dropdown.d.ts +0 -5
- package/dist/esm/types/components/Dropdown/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 -19
- 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/Menu/Item/Item.d.ts +0 -4
- package/dist/esm/types/components/Menu/Menu.d.ts +0 -20
- package/dist/esm/types/components/Menu/SubMenu/SubMenu.d.ts +0 -4
- package/dist/esm/types/components/Menu/index.d.ts +0 -1
- package/dist/esm/types/components/Popover/Popover.d.ts +0 -5
- package/dist/esm/types/components/Popover/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/Result/Result.d.ts +0 -5
- package/dist/esm/types/components/Result/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 -8
- 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/usePosition.d.ts +0 -15
- 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 -50
- package/dist/esm/types/types/button.d.ts +0 -44
- package/dist/esm/types/types/checkbox.d.ts +0 -25
- package/dist/esm/types/types/datepicker.d.ts +0 -122
- package/dist/esm/types/types/dropdown.d.ts +0 -38
- 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 -27
- package/dist/esm/types/types/input.d.ts +0 -53
- package/dist/esm/types/types/menu.d.ts +0 -66
- package/dist/esm/types/types/popover.d.ts +0 -15
- package/dist/esm/types/types/radio.d.ts +0 -59
- package/dist/esm/types/types/result.d.ts +0 -13
- package/dist/esm/types/types/select.d.ts +0 -106
- package/dist/esm/types/types/skeleton.d.ts +0 -50
- package/dist/esm/types/types/switch.d.ts +0 -19
- package/dist/esm/types/types/upload.d.ts +0 -54
- package/dist/esm/types/utils/index.d.ts +0 -34
- package/dist/esm/types/utils/lazy.d.ts +0 -1
- package/dist/index.d.ts +0 -145
- package/dist/index.esm.js +0 -5690
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -5740
- package/dist/index.js.map +0 -1
|
@@ -29,7 +29,7 @@ const Popover = ({
|
|
|
29
29
|
|
|
30
30
|
const isOpen = visible !== undefined ? visible : open !== undefined ? open : innerOpen;
|
|
31
31
|
|
|
32
|
-
const { dropdownPosition,
|
|
32
|
+
const { dropdownPosition, shouldShowAbove } = usePosition({
|
|
33
33
|
isOpen,
|
|
34
34
|
offset: 10,
|
|
35
35
|
popupRef,
|
|
@@ -38,13 +38,6 @@ const Popover = ({
|
|
|
38
38
|
getPopupContainer: getPopupContainer?.(triggerRef.current as HTMLElement)
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
console.log({
|
|
42
|
-
isOpen,
|
|
43
|
-
popupRef,
|
|
44
|
-
placement,
|
|
45
|
-
triggerRef
|
|
46
|
-
});
|
|
47
|
-
|
|
48
41
|
useEffect(() => {
|
|
49
42
|
const handleClickOutside = (e: MouseEvent) => {
|
|
50
43
|
if (
|
|
@@ -100,10 +93,10 @@ const Popover = ({
|
|
|
100
93
|
|
|
101
94
|
return cloneElement(child, {
|
|
102
95
|
key: index,
|
|
103
|
-
...childProps,
|
|
104
96
|
...(index === 0 ? {
|
|
105
|
-
ref: triggerRef,
|
|
106
97
|
style,
|
|
98
|
+
...childProps,
|
|
99
|
+
ref: triggerRef,
|
|
107
100
|
className: `${prefixCls}-wrapper-content`,
|
|
108
101
|
} : {}),
|
|
109
102
|
})
|
|
@@ -131,7 +124,7 @@ const Popover = ({
|
|
|
131
124
|
>
|
|
132
125
|
{title && <div className={`${prefixCls}-title`}>{title}</div>}
|
|
133
126
|
<div className={`${prefixCls}-inner`}>{content}</div>
|
|
134
|
-
<div className={`${prefixCls}-arrow ${
|
|
127
|
+
<div className={`${prefixCls}-arrow ${shouldShowAbove}`} />
|
|
135
128
|
</div>
|
|
136
129
|
</ConditionalWrapper>
|
|
137
130
|
)}
|
package/lib/hooks/usePosition.ts
CHANGED
|
@@ -46,21 +46,6 @@ function getScrollParent(
|
|
|
46
46
|
return document.scrollingElement as HTMLElement;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const clampWithinContainer = (
|
|
50
|
-
left: number,
|
|
51
|
-
popupWidth: number,
|
|
52
|
-
containerRect: DOMRect
|
|
53
|
-
) => {
|
|
54
|
-
const minLeft = containerRect.left + document.documentElement.scrollLeft;
|
|
55
|
-
const maxLeft = containerRect.right + document.documentElement.scrollLeft - popupWidth;
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
minLeft,
|
|
59
|
-
maxLeft,
|
|
60
|
-
leftPosition: Math.min(Math.max(left, minLeft), maxLeft)
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
|
|
64
49
|
export const usePosition = ({
|
|
65
50
|
isOpen,
|
|
66
51
|
offset = 4,
|
|
@@ -69,10 +54,10 @@ export const usePosition = ({
|
|
|
69
54
|
triggerRef,
|
|
70
55
|
getPopupContainer
|
|
71
56
|
}: TPosition): {
|
|
72
|
-
|
|
57
|
+
shouldShowAbove: boolean;
|
|
73
58
|
dropdownPosition: CSSProperties
|
|
74
59
|
} => {
|
|
75
|
-
const [
|
|
60
|
+
const [shouldShowAbove, setShouldShowAbove] = useState(false);
|
|
76
61
|
const [_dropdownPosition, setDropdownPosition] = useState<CSSProperties>({});
|
|
77
62
|
|
|
78
63
|
const dropdownPosition = useCallback(() => {
|
|
@@ -90,17 +75,12 @@ export const usePosition = ({
|
|
|
90
75
|
const _shouldShowAbove = spaceBelow < dropdownHeight && spaceAbove > dropdownHeight;
|
|
91
76
|
const hasRight = placement?.includes('Right');
|
|
92
77
|
|
|
93
|
-
|
|
94
|
-
const { minLeft, maxLeft, leftPosition } = clampWithinContainer(
|
|
95
|
-
hasRight
|
|
96
|
-
? (inputRect.left || 0) + (triggerRef.current?.offsetWidth || 0) - (popupRef.current?.offsetWidth || 0)
|
|
97
|
-
: (inputRect.left || 0) + document.documentElement.scrollLeft,
|
|
98
|
-
popupRef.current?.offsetWidth || 0,
|
|
99
|
-
containerRect
|
|
100
|
-
);
|
|
78
|
+
setShouldShowAbove(_shouldShowAbove);
|
|
101
79
|
|
|
102
|
-
|
|
103
|
-
|
|
80
|
+
if (getPopupContainer) {
|
|
81
|
+
const leftPosition = hasRight
|
|
82
|
+
? (inputRect.left || 0) + (triggerRef.current?.offsetWidth || 0) - (popupRef.current?.offsetWidth || 0)
|
|
83
|
+
: (inputRect.left || 0) + document.documentElement.scrollLeft
|
|
104
84
|
|
|
105
85
|
const _top = (inputRect.top || 0) + document.documentElement.scrollTop;
|
|
106
86
|
|
|
@@ -123,33 +103,9 @@ export const usePosition = ({
|
|
|
123
103
|
(popupRef.current?.offsetHeight || dropdownHeight) - offset * 2
|
|
124
104
|
: triggerRef.current.offsetTop + triggerRef.current?.offsetHeight) + offset,
|
|
125
105
|
...(hasRight ? {
|
|
126
|
-
left: (
|
|
127
|
-
const { minLeft, maxLeft, leftPosition } = clampWithinContainer(
|
|
128
|
-
triggerRef.current.offsetLeft +
|
|
129
|
-
(triggerRef.current?.offsetWidth || 0) -
|
|
130
|
-
(popupRef.current?.offsetWidth || dropdownHeight),
|
|
131
|
-
popupRef.current?.offsetWidth || dropdownHeight,
|
|
132
|
-
containerRect
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
const _center = (minLeft + maxLeft) < (popupRef.current?.offsetWidth || 0) ? 'center' : ''
|
|
136
|
-
setShowPlacement(_shouldShowAbove ? `bottom ${_center}` : `${_center}`);
|
|
137
|
-
|
|
138
|
-
return leftPosition
|
|
139
|
-
})()
|
|
106
|
+
left: triggerRef.current.offsetLeft + (triggerRef.current?.offsetWidth || 0) - (popupRef.current?.offsetWidth || 0),
|
|
140
107
|
} : {
|
|
141
|
-
left:
|
|
142
|
-
const { minLeft, maxLeft, leftPosition } = clampWithinContainer(
|
|
143
|
-
triggerRef.current.offsetLeft,
|
|
144
|
-
popupRef.current?.offsetWidth || dropdownHeight,
|
|
145
|
-
containerRect
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
const _center = (minLeft + maxLeft) < (popupRef.current?.offsetWidth || 0) ? 'center' : ''
|
|
149
|
-
setShowPlacement(_shouldShowAbove ? `bottom ${_center}` : `${_center}`);
|
|
150
|
-
|
|
151
|
-
return leftPosition
|
|
152
|
-
})()
|
|
108
|
+
left: triggerRef.current.offsetLeft
|
|
153
109
|
})
|
|
154
110
|
});
|
|
155
111
|
}
|
|
@@ -197,10 +153,10 @@ export const usePosition = ({
|
|
|
197
153
|
]);
|
|
198
154
|
|
|
199
155
|
return {
|
|
200
|
-
|
|
156
|
+
shouldShowAbove,
|
|
201
157
|
dropdownPosition: {
|
|
202
158
|
..._dropdownPosition,
|
|
203
|
-
|
|
159
|
+
opacity: Object.keys(_dropdownPosition).length ? 1 : 0
|
|
204
160
|
}
|
|
205
161
|
}
|
|
206
162
|
}
|
package/package.json
CHANGED
|
@@ -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, prefixClsV3, 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, prefixClsV3, className, defaultChecked, checked, style, disabled, onChange, onClick, onMouseEnter, onMouseLeave, onKeyPress, onKeyDown, tabIndex, name, children, id, autoFocus, type, value, required, noStyle, titleClick, ref, controlled }: 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, className, placement, defaultValue, size, format, getPopupContainer, showToday, allowClear, disabledDate, suffixIcon, picker, prefix, defaultOpen, inputReadOnly, bordered, defaultPickerValue }: 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, onVisibleChange, onCalendarChange, style, className, separator, defaultValue, bordered, getPopupContainer, placement }: 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,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DropdownProps } from '../../types/dropdown';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Dropdown: ({ children, menu, open: controlledOpen, defaultOpen, onVisibleChange, trigger, placement, overlayClassName, overlayStyle, getPopupContainer, destroyOnHidden, disabled, arrow, autoFocus, popupRender, className, overlay, prefixCls, }: DropdownProps) => React.JSX.Element;
|
|
5
|
-
export default Dropdown;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Dropdown } from '../Dropdown/Dropdown';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EmptyContentProps } from '../../types/empty';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const EmptyContent: ({ icon, style, className, title, description, prefixCls, prefixClsV3 }: EmptyContentProps) => React.JSX.Element;
|
|
5
|
-
export default EmptyContent;
|
|
@@ -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, prefixClsV3, 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,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ResultStatusType } from '../../types/result';
|
|
3
|
-
declare const ClearIcon: () => React.JSX.Element;
|
|
4
|
-
declare const ArrowIcon: ({ isOpen }: {
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
}) => React.JSX.Element;
|
|
7
|
-
declare const LoadingIcon: () => React.JSX.Element;
|
|
8
|
-
declare const CheckIcon: () => React.JSX.Element;
|
|
9
|
-
declare const SearchIcon: () => React.JSX.Element;
|
|
10
|
-
declare const CalendarIcon: () => React.JSX.Element;
|
|
11
|
-
declare const SuccessIcon: () => React.JSX.Element;
|
|
12
|
-
declare const ErrorIcon: () => React.JSX.Element;
|
|
13
|
-
declare const DateDistanceIcon: () => React.JSX.Element;
|
|
14
|
-
declare const TimeIcon: () => React.JSX.Element;
|
|
15
|
-
declare const StampleIcon: () => React.JSX.Element;
|
|
16
|
-
declare const TrashIcon: () => React.JSX.Element;
|
|
17
|
-
declare const SpinerIcon: () => React.JSX.Element;
|
|
18
|
-
declare const renderDefaultIcon: (status: ResultStatusType) => React.JSX.Element | null;
|
|
19
|
-
export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, renderDefaultIcon };
|
|
@@ -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, prefixClsV3, 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, prefixClsV3, 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,20 +0,0 @@
|
|
|
1
|
-
import React, { FC, MouseEvent } from "react";
|
|
2
|
-
import { MenuMode, MenuProps } from "../../types/menu";
|
|
3
|
-
import MenuItem from "./Item/Item";
|
|
4
|
-
import SubMenu from "./SubMenu/SubMenu";
|
|
5
|
-
import "./index.css";
|
|
6
|
-
export declare const MenuContext: React.Context<{
|
|
7
|
-
mode: MenuMode;
|
|
8
|
-
inlineIndent: number;
|
|
9
|
-
inlineCollapsed: boolean;
|
|
10
|
-
selectedKeys: string[];
|
|
11
|
-
openKeys: string[];
|
|
12
|
-
toggleOpen: (key: string, level?: "1" | "2") => void;
|
|
13
|
-
onItemClick: (key: string, domEvent?: MouseEvent) => void;
|
|
14
|
-
triggerSubMenuAction?: "hover" | "click";
|
|
15
|
-
} | null>;
|
|
16
|
-
declare const Menu: FC<MenuProps> & {
|
|
17
|
-
Item: typeof MenuItem;
|
|
18
|
-
SubMenu: typeof SubMenu;
|
|
19
|
-
};
|
|
20
|
-
export default Menu;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Menu } from './Menu';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { PopoverProps } from "../../types/popover";
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Popover: ({ prefixCls, content, children, trigger, placement, open, visible, title, style, overlayClassName, overlayStyle, onVisibleChange, getPopupContainer }: PopoverProps) => React.JSX.Element;
|
|
5
|
-
export default Popover;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Popover } from '../Popover/Popover';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RadioButtonProps } from '../../../types/radio';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const RadioButton: ({ prefixCls, prefixClsV3, 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, prefixClsV3, 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 Result } from '../Result/Result';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Option } from '../../Select/Option/Option';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { SelectProps } from '../../types/select';
|
|
3
|
-
import './style.css';
|
|
4
|
-
declare const Select: {
|
|
5
|
-
({ prefixCls, prefixClsV3, 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, iconClickClear, onSearch, onSelect, onDeselect, onClear, onChange, onClose, tagRender, getPopupContainer, dropdownRender, onDropdownVisibleChange, iconClick, ref, controlled }: SelectProps): ReactElement;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
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,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SwitchProps } from '../../types/switch';
|
|
3
|
-
import './index.css';
|
|
4
|
-
declare const Switch: {
|
|
5
|
-
({ prefixCls, prefixClsV3, checked, onChange, onClick, disabled, className, style, defaultChecked, value, controlled }: 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, prefixClsV3, 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,7 +0,0 @@
|
|
|
1
|
-
export declare const MASK_CHAR = "_";
|
|
2
|
-
export declare const MASK_REGEX: RegExp;
|
|
3
|
-
export declare function stripMask(value: string, mask: string, maskChar?: string): string;
|
|
4
|
-
export declare function applyMask(raw: string, mask: string, maskChar?: string): {
|
|
5
|
-
masked: string;
|
|
6
|
-
rawIndex: number;
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RuleTypes } from '../types';
|
|
2
|
-
import type { FieldData, FieldError, 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, scrollToFirstError?: boolean, onFinish?: ((values: Record<string, RuleTypes>) => void) | undefined, onFinishFailed?: (errorInfo: {
|
|
4
|
-
values: Record<string, RuleTypes>;
|
|
5
|
-
errorFields: Pick<FieldError, "errors" | "name">[];
|
|
6
|
-
}) => void) => FormInstance;
|
|
7
|
-
export { useForm };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Placement } from "../types";
|
|
2
|
-
import { CSSProperties, RefObject } from "react";
|
|
3
|
-
type TPosition = {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
popupRef: RefObject<HTMLDivElement | null>;
|
|
6
|
-
triggerRef: RefObject<HTMLDivElement | null>;
|
|
7
|
-
getPopupContainer?: HTMLElement;
|
|
8
|
-
placement?: Placement;
|
|
9
|
-
offset?: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const usePosition: ({ isOpen, offset, popupRef, placement, triggerRef, getPopupContainer }: TPosition) => {
|
|
12
|
-
showPlacement: string;
|
|
13
|
-
dropdownPosition: CSSProperties;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -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 {};
|