@para-ui/core 2.2.40 → 2.2.42
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/AutoBox/index.d.ts +34 -34
- package/AutoTips/index.d.ts +27 -27
- package/AutoTips/index.js +1 -1
- package/Breadcrumbs/index.d.ts +39 -39
- package/Breadcrumbs/index.js +1 -1
- package/Button/SplitButton.d.ts +61 -61
- package/Button/index.d.ts +56 -56
- package/Button/lang/en_US.d.ts +4 -4
- package/Button/lang/index.d.ts +9 -9
- package/Button/lang/zh_CN.d.ts +4 -4
- package/ButtonGroup/index.d.ts +33 -33
- package/ButtonGroup/index.js +2 -2
- package/Carousel/index.d.ts +30 -30
- package/Cascader/index.d.ts +54 -54
- package/Cascader/lang/en_US.d.ts +4 -4
- package/Cascader/lang/index.d.ts +9 -9
- package/Cascader/lang/zh_CN.d.ts +4 -4
- package/Checkbox/index.d.ts +40 -40
- package/CheckboxGroup/index.d.ts +46 -46
- package/CheckboxGroup/index.js +2 -2
- package/Collapse/collapsePanel.d.ts +30 -30
- package/Collapse/index.d.ts +57 -57
- package/Collapse/motion.d.ts +5 -5
- package/Collapse/util.d.ts +11 -11
- package/CollapseBox/index.d.ts +27 -27
- package/CollapseBox/util.d.ts +5 -5
- package/CollapseLayout/index.d.ts +51 -51
- package/ColorPicker/index.d.ts +4 -4
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -11
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -141
- package/ComboSelect/index.d.ts +11 -11
- package/ComboSelect/index.js +1 -1
- package/ComboSelect/interface.d.ts +149 -149
- package/ComboSelect/lang/en_US.d.ts +9 -9
- package/ComboSelect/lang/index.d.ts +19 -19
- package/ComboSelect/lang/zh_CN.d.ts +9 -9
- package/ComboSelect/utils.d.ts +12 -12
- package/Container/index.d.ts +77 -77
- package/DatePicker/PickerButton.d.ts +3 -3
- package/DatePicker/PickerTag.d.ts +3 -3
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -4
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -11
- package/DatePicker/generatePicker/index.d.ts +77 -77
- package/DatePicker/index.d.ts +18 -18
- package/DatePicker/lang/en_US.d.ts +3 -3
- package/DatePicker/lang/index.d.ts +7 -7
- package/DatePicker/lang/zh_CN.d.ts +3 -3
- package/DatePicker/util.d.ts +20 -20
- package/Desktop/index.d.ts +55 -55
- package/Drawer/index.d.ts +11 -11
- package/Drawer/interface.d.ts +83 -83
- package/Drawer/lang/en_US.d.ts +5 -5
- package/Drawer/lang/index.d.ts +11 -11
- package/Drawer/lang/zh_CN.d.ts +5 -5
- package/Dropdown/index.d.ts +39 -39
- package/DynamicMultiBox/formItem.d.ts +13 -13
- package/DynamicMultiBox/index.d.ts +4 -4
- package/DynamicMultiBox/index.js +2 -2
- package/DynamicMultiBox/interface.d.ts +161 -161
- package/DynamicMultiBox/rowForm.d.ts +24 -24
- package/Empty/images/index.d.ts +2 -2
- package/Empty/index.d.ts +30 -30
- package/Empty/lang/en_US.d.ts +6 -6
- package/Empty/lang/index.d.ts +13 -13
- package/Empty/lang/zh_CN.d.ts +6 -6
- package/Form/index.d.ts +181 -181
- package/Form/index.js +2 -2
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -19
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -8
- package/FormItem/compoments/formFile/index.d.ts +38 -38
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -8
- package/FormItem/compoments/formSelect/index.d.ts +18 -18
- package/FormItem/errorTips.d.ts +12 -12
- package/FormItem/index.d.ts +152 -152
- package/FormItem/index.js +2 -2
- package/FormItem/itemType.d.ts +42 -42
- package/FormItem/validateFunction.d.ts +15 -15
- package/FunctionModal/dialog.d.ts +58 -58
- package/FunctionModal/index.d.ts +8 -8
- package/FunctionModal/modalContext.d.ts +14 -14
- package/GlobalContext/componentsProps.d.ts +21 -21
- package/GlobalContext/confirmLocale.d.ts +7 -7
- package/GlobalContext/constant.d.ts +7 -7
- package/GlobalContext/index.d.ts +28 -28
- package/GlobalContext/intl.d.ts +34 -34
- package/GlobalContext/useFormatMessage.d.ts +3 -3
- package/Help/index.d.ts +20 -20
- package/HelperText/index.d.ts +19 -19
- package/Hooks/useGlobalProps.d.ts +1 -1
- package/InputLang/index.d.ts +49 -49
- package/InputLang/index.js +1 -1
- package/InputNumber/index.d.ts +74 -74
- package/Label/index.d.ts +35 -35
- package/Loading/index.d.ts +17 -17
- package/Menu/footerExpansion.d.ts +9 -9
- package/Menu/index.d.ts +10 -10
- package/Menu/interface.d.ts +139 -139
- package/Menu/logo.d.ts +9 -9
- package/Menu/verticalMenuList.d.ts +14 -14
- package/Message/index.d.ts +73 -73
- package/Modal/Confirm/index.d.ts +66 -66
- package/Modal/index.d.ts +61 -61
- package/Modal/lang/en_US.d.ts +5 -5
- package/Modal/lang/index.d.ts +11 -11
- package/Modal/lang/zh_CN.d.ts +5 -5
- package/MultiBox/index.d.ts +54 -54
- package/MultiBox/index.js +3 -3
- package/Notification/index.d.ts +52 -52
- package/OperateBtn/index.d.ts +59 -59
- package/OperateBtn/index.js +1 -1
- package/OperateBtn/lang/en_US.d.ts +4 -4
- package/OperateBtn/lang/index.d.ts +9 -9
- package/OperateBtn/lang/zh_CN.d.ts +4 -4
- package/PageHeader/horizontalMeun.d.ts +9 -9
- package/PageHeader/horizontalMeunRight.d.ts +9 -9
- package/PageHeader/index.d.ts +10 -10
- package/PageHeader/interface.d.ts +167 -167
- package/Pagination/index.d.ts +33 -33
- package/Pagination/index.js +1 -1
- package/Pagination/lang/en_US.d.ts +8 -8
- package/Pagination/lang/index.d.ts +17 -17
- package/Pagination/lang/zh_CN.d.ts +8 -8
- package/ParauiProvider/index.d.ts +12 -12
- package/PasswordRules/index.d.ts +46 -46
- package/PopConfirm/index.d.ts +56 -56
- package/PopConfirm/lang/en_US.d.ts +5 -5
- package/PopConfirm/lang/index.d.ts +11 -11
- package/PopConfirm/lang/zh_CN.d.ts +5 -5
- package/Popover/index.d.ts +14 -14
- package/PopoverNew/TooltipNew/index.d.ts +11 -11
- package/PopoverNew/TooltipNew/interface.d.ts +31 -31
- package/PopoverNew/TooltipNew/utils.d.ts +18 -18
- package/PopoverNew/index.d.ts +16 -16
- package/Popper/index.d.ts +13 -13
- package/Progress/Line.d.ts +47 -47
- package/Progress/Steps.d.ts +17 -17
- package/Progress/index.d.ts +81 -81
- package/Progress/utils.d.ts +6 -6
- package/Querying/images/index.d.ts +2 -2
- package/Querying/index.d.ts +26 -26
- package/Querying/lang/en_US.d.ts +4 -4
- package/Querying/lang/index.d.ts +9 -9
- package/Querying/lang/zh_CN.d.ts +4 -4
- package/README.md +750 -739
- package/Radio/index.d.ts +38 -38
- package/RadioGroup/index.d.ts +47 -47
- package/RadioGroup/index.js +2 -2
- package/Search/index.d.ts +56 -56
- package/Search/index.js +1 -1
- package/Select/index.d.ts +96 -96
- package/Select/index.js +1 -1
- package/Select/lang/en_US.d.ts +5 -5
- package/Select/lang/index.d.ts +11 -11
- package/Select/lang/zh_CN.d.ts +5 -5
- package/SelectInput/index.d.ts +11 -11
- package/SelectInput/index.js +1 -1
- package/Selector/index.d.ts +11 -11
- package/Selector/index.js +2 -2
- package/Selector/interface.d.ts +428 -428
- package/Selector/lang/en_US.d.ts +11 -11
- package/Selector/lang/index.d.ts +23 -23
- package/Selector/lang/zh_CN.d.ts +11 -11
- package/Selector/selectorData/index.d.ts +10 -10
- package/Selector/selectorMain/index.d.ts +10 -10
- package/Selector/selectorNode/index.d.ts +10 -10
- package/Selector/util.d.ts +15 -15
- package/SelectorPicker/index.d.ts +53 -53
- package/SelectorPicker/index.js +2 -2
- package/SingleBox/index.d.ts +42 -42
- package/SingleBox/index.js +1 -1
- package/Slider/index.d.ts +14 -14
- package/Slider/interface.d.ts +102 -102
- package/Split/index.d.ts +7 -7
- package/Stepper/icons.d.ts +5 -5
- package/Stepper/index.d.ts +39 -39
- package/Switch/index.d.ts +78 -78
- package/Table/index.d.ts +10 -10
- package/Table/index.js +1 -1
- package/Table/interface.d.ts +271 -271
- package/Table/lang/en_US.d.ts +8 -8
- package/Table/lang/index.d.ts +17 -17
- package/Table/lang/zh_CN.d.ts +8 -8
- package/Table/tableBody.d.ts +9 -9
- package/Table/tableBodyElement/index.d.ts +15 -15
- package/Table/tableBodyInterface.d.ts +67 -67
- package/Table/tableContainer/index.d.ts +16 -16
- package/Table/tableElement/index.d.ts +15 -15
- package/Table/tableHead.d.ts +9 -9
- package/Table/tableHeadElement/index.d.ts +15 -15
- package/Table/tableHeadInterface.d.ts +30 -30
- package/Table/tablePagination.d.ts +9 -9
- package/Table/tablePaginationInterFace.d.ts +24 -24
- package/Table/tdElement/index.d.ts +15 -15
- package/Table/thElement/index.d.ts +15 -15
- package/Table/trElement/index.d.ts +15 -15
- package/Table/util.d.ts +28 -28
- package/Tabs/index.d.ts +48 -48
- package/Tag/TagGroup.d.ts +66 -66
- package/Tag/index.d.ts +34 -34
- package/TextField/index.d.ts +95 -95
- package/TextField/index.js +1 -1
- package/TimePicker/index.d.ts +22 -22
- package/TimePicker/locale/en_US.d.ts +3 -3
- package/TimePicker/locale/zh_CN.d.ts +3 -3
- package/TimePicker/style/index.d.ts +1 -1
- package/Timeline/index.d.ts +22 -22
- package/Title/index.d.ts +30 -30
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -49
- package/ToggleButton/index.d.ts +49 -49
- package/Tooltip/index.d.ts +14 -14
- package/Transfer/index.d.ts +37 -37
- package/Transfer/index.js +1 -1
- package/Transfer/lang/en_US.d.ts +8 -8
- package/Transfer/lang/index.d.ts +17 -17
- package/Transfer/lang/zh_CN.d.ts +8 -8
- package/Tree/OperateBar/index.d.ts +13 -13
- package/Tree/Tree.d.ts +4 -4
- package/Tree/index.d.ts +5 -5
- package/Tree/index.js +1 -1
- package/Tree/interface.d.ts +207 -207
- package/Tree/lang/en_US.d.ts +8 -8
- package/Tree/lang/index.d.ts +17 -17
- package/Tree/lang/zh_CN.d.ts +8 -8
- package/Tree/utils/tools.d.ts +26 -26
- package/Tree/utils/treeUtil.d.ts +15 -15
- package/Upload/Dragger/index.d.ts +10 -10
- package/Upload/ErroTip/index.d.ts +13 -13
- package/Upload/ImageUpload/index.d.ts +14 -14
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -17
- package/Upload/ImgCrop/constants.d.ts +7 -7
- package/Upload/ImgCrop/index.d.ts +6 -6
- package/Upload/ImgCrop/interface.d.ts +48 -48
- package/Upload/UploadList/index.d.ts +5 -5
- package/Upload/index.d.ts +15 -15
- package/Upload/interface.d.ts +134 -134
- package/Upload/lang/en_US.d.ts +12 -12
- package/Upload/lang/index.d.ts +25 -25
- package/Upload/lang/zh_CN.d.ts +12 -12
- package/cdn/AutoTips/index.js +1 -1
- package/cdn/Breadcrumbs/index.js +1 -1
- package/cdn/ButtonGroup/index.js +2 -2
- package/cdn/Cascader/index.js +6 -6
- package/cdn/CheckboxGroup/index.js +2 -2
- package/cdn/ColorPicker/index.js +1 -1
- package/cdn/ComboSelect/index.js +2 -2
- package/cdn/DatePicker/index.js +8 -8
- package/cdn/Dropdown/index.js +3 -3
- package/cdn/DynamicMultiBox/index.js +7 -7
- package/cdn/Form/index.js +3 -3
- package/cdn/FormItem/index.js +3 -3
- package/cdn/InputLang/index.js +1 -1
- package/cdn/MultiBox/index.js +1 -1
- package/cdn/OperateBtn/index.js +1 -1
- package/cdn/Pagination/index.js +2 -2
- package/cdn/PopoverNew/index.js +3 -3
- package/cdn/RadioGroup/index.js +2 -2
- package/cdn/Search/index.js +5 -5
- package/cdn/Select/index.js +2 -2
- package/cdn/SelectInput/index.js +2 -2
- package/cdn/Selector/index.js +10 -10
- package/cdn/SelectorPicker/index.js +10 -10
- package/cdn/SingleBox/index.js +1 -1
- package/cdn/Slider/index.js +3 -3
- package/cdn/Table/index.js +2 -2
- package/cdn/Tabs/index.js +1 -1
- package/cdn/TextField/index.js +1 -1
- package/cdn/TimePicker/index.js +10 -10
- package/cdn/Transfer/index.js +1 -1
- package/cdn/Tree/index.js +1 -1
- package/cdn/Upload/index.js +10 -10
- package/index.d.ts +142 -142
- package/index.js +2 -2
- package/package.json +131 -131
- package/style.css +1 -1
package/Tag/TagGroup.d.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Hanz
|
|
3
|
-
* @date 2022/1/12 下午1:16
|
|
4
|
-
* @description tag group
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent } from "react";
|
|
7
|
-
import { TagProps } from "./index";
|
|
8
|
-
import './index.scss';
|
|
9
|
-
interface TagItem extends Omit<TagProps, 'visible' | 'size' | 'bordered'> {
|
|
10
|
-
/**
|
|
11
|
-
* label
|
|
12
|
-
*/
|
|
13
|
-
label: string;
|
|
14
|
-
/**
|
|
15
|
-
* value
|
|
16
|
-
*/
|
|
17
|
-
value: string;
|
|
18
|
-
}
|
|
19
|
-
type Item = string | number;
|
|
20
|
-
export interface TagGroupProps {
|
|
21
|
-
/**
|
|
22
|
-
* cls
|
|
23
|
-
*/
|
|
24
|
-
className?: string;
|
|
25
|
-
/**
|
|
26
|
-
* 样式
|
|
27
|
-
*/
|
|
28
|
-
style?: React.CSSProperties;
|
|
29
|
-
/**
|
|
30
|
-
* 大小
|
|
31
|
-
*/
|
|
32
|
-
size?: 'small' | 'large';
|
|
33
|
-
/**
|
|
34
|
-
* 显示边框
|
|
35
|
-
*/
|
|
36
|
-
bordered?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* input 默认值
|
|
39
|
-
*/
|
|
40
|
-
defaultInputValue?: string;
|
|
41
|
-
/**
|
|
42
|
-
* 动态添加
|
|
43
|
-
*/
|
|
44
|
-
increased?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* 动态添加按钮 increased 为true 有效
|
|
47
|
-
*/
|
|
48
|
-
increasedTag?: {
|
|
49
|
-
/** 图标 */
|
|
50
|
-
icon?: React.ReactNode;
|
|
51
|
-
/** 文字 */
|
|
52
|
-
text?: string;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* 组数据源
|
|
56
|
-
*/
|
|
57
|
-
data?: TagItem[] | Item[];
|
|
58
|
-
/**
|
|
59
|
-
* onchange
|
|
60
|
-
* @param tagData
|
|
61
|
-
* @param value
|
|
62
|
-
*/
|
|
63
|
-
onChange?: (tagData: TagItem[], value: string[]) => void;
|
|
64
|
-
}
|
|
65
|
-
declare const TagGroup: FunctionComponent<TagGroupProps>;
|
|
66
|
-
export default TagGroup;
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2022/1/12 下午1:16
|
|
4
|
+
* @description tag group
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent } from "react";
|
|
7
|
+
import { TagProps } from "./index";
|
|
8
|
+
import './index.scss';
|
|
9
|
+
interface TagItem extends Omit<TagProps, 'visible' | 'size' | 'bordered'> {
|
|
10
|
+
/**
|
|
11
|
+
* label
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* value
|
|
16
|
+
*/
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
19
|
+
type Item = string | number;
|
|
20
|
+
export interface TagGroupProps {
|
|
21
|
+
/**
|
|
22
|
+
* cls
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 样式
|
|
27
|
+
*/
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
/**
|
|
30
|
+
* 大小
|
|
31
|
+
*/
|
|
32
|
+
size?: 'small' | 'large';
|
|
33
|
+
/**
|
|
34
|
+
* 显示边框
|
|
35
|
+
*/
|
|
36
|
+
bordered?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* input 默认值
|
|
39
|
+
*/
|
|
40
|
+
defaultInputValue?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 动态添加
|
|
43
|
+
*/
|
|
44
|
+
increased?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 动态添加按钮 increased 为true 有效
|
|
47
|
+
*/
|
|
48
|
+
increasedTag?: {
|
|
49
|
+
/** 图标 */
|
|
50
|
+
icon?: React.ReactNode;
|
|
51
|
+
/** 文字 */
|
|
52
|
+
text?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* 组数据源
|
|
56
|
+
*/
|
|
57
|
+
data?: TagItem[] | Item[];
|
|
58
|
+
/**
|
|
59
|
+
* onchange
|
|
60
|
+
* @param tagData
|
|
61
|
+
* @param value
|
|
62
|
+
*/
|
|
63
|
+
onChange?: (tagData: TagItem[], value: string[]) => void;
|
|
64
|
+
}
|
|
65
|
+
declare const TagGroup: FunctionComponent<TagGroupProps>;
|
|
66
|
+
export default TagGroup;
|
package/Tag/index.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Hanz
|
|
3
|
-
* @date 2022/1/11 上午10:15
|
|
4
|
-
* @description tag
|
|
5
|
-
*/
|
|
6
|
-
import React, { PropsWithChildren } from 'react';
|
|
7
|
-
import TagGroup, { TagGroupProps } from './TagGroup';
|
|
8
|
-
import './index.scss';
|
|
9
|
-
type PresetColorTypes = 'blue' | 'green' | 'yellow' | 'red';
|
|
10
|
-
export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
11
|
-
/** 颜色 */
|
|
12
|
-
color?: string | PresetColorTypes;
|
|
13
|
-
/** 可关闭 */
|
|
14
|
-
closable?: boolean;
|
|
15
|
-
/** 关闭图标 */
|
|
16
|
-
closeIcon?: React.ReactNode;
|
|
17
|
-
/** 是否显示 */
|
|
18
|
-
visible?: boolean;
|
|
19
|
-
/** onclose */
|
|
20
|
-
onClose?: (event: React.MouseEvent) => void;
|
|
21
|
-
/** 图标 */
|
|
22
|
-
icon?: React.ReactNode;
|
|
23
|
-
/** cls */
|
|
24
|
-
className?: string;
|
|
25
|
-
/** 显示边框 */
|
|
26
|
-
bordered?: boolean;
|
|
27
|
-
/** 大小 */
|
|
28
|
-
size?: 'small' | 'large';
|
|
29
|
-
}
|
|
30
|
-
export type TagPropsWithChild = PropsWithChildren<TagProps>;
|
|
31
|
-
export type { TagGroupProps };
|
|
32
|
-
export { TagGroup };
|
|
33
|
-
export declare const Tag: React.FC<TagPropsWithChild>;
|
|
34
|
-
export default Tag;
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2022/1/11 上午10:15
|
|
4
|
+
* @description tag
|
|
5
|
+
*/
|
|
6
|
+
import React, { PropsWithChildren } from 'react';
|
|
7
|
+
import TagGroup, { TagGroupProps } from './TagGroup';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
type PresetColorTypes = 'blue' | 'green' | 'yellow' | 'red';
|
|
10
|
+
export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
11
|
+
/** 颜色 */
|
|
12
|
+
color?: string | PresetColorTypes;
|
|
13
|
+
/** 可关闭 */
|
|
14
|
+
closable?: boolean;
|
|
15
|
+
/** 关闭图标 */
|
|
16
|
+
closeIcon?: React.ReactNode;
|
|
17
|
+
/** 是否显示 */
|
|
18
|
+
visible?: boolean;
|
|
19
|
+
/** onclose */
|
|
20
|
+
onClose?: (event: React.MouseEvent) => void;
|
|
21
|
+
/** 图标 */
|
|
22
|
+
icon?: React.ReactNode;
|
|
23
|
+
/** cls */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** 显示边框 */
|
|
26
|
+
bordered?: boolean;
|
|
27
|
+
/** 大小 */
|
|
28
|
+
size?: 'small' | 'large';
|
|
29
|
+
}
|
|
30
|
+
export type TagPropsWithChild = PropsWithChildren<TagProps>;
|
|
31
|
+
export type { TagGroupProps };
|
|
32
|
+
export { TagGroup };
|
|
33
|
+
export declare const Tag: React.FC<TagPropsWithChild>;
|
|
34
|
+
export default Tag;
|
package/TextField/index.d.ts
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/5 15:05
|
|
4
|
-
* @description 输入框
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { LabelTooltipProps } from '../Label';
|
|
8
|
-
import './index.scss';
|
|
9
|
-
export interface TextFieldProps {
|
|
10
|
-
/** 样式class */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** style */
|
|
13
|
-
style?: React.CSSProperties;
|
|
14
|
-
/** 大小 */
|
|
15
|
-
size?: 'small' | 'medium' | 'large';
|
|
16
|
-
/** 标题在外,还是在内 */
|
|
17
|
-
labelMode?: 'outside' | 'inside';
|
|
18
|
-
/** 标题 */
|
|
19
|
-
label?: ReactNode;
|
|
20
|
-
/** 标题提示 */
|
|
21
|
-
labelSign?: ReactNode;
|
|
22
|
-
/** 是否必填 */
|
|
23
|
-
required?: boolean;
|
|
24
|
-
/** 帮组提示信息 */
|
|
25
|
-
labelTooltip?: LabelTooltipProps;
|
|
26
|
-
/** 提示语 */
|
|
27
|
-
placeholder?: ReactNode;
|
|
28
|
-
/** 是否禁用 */
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/** 多行 */
|
|
31
|
-
multiline?: boolean;
|
|
32
|
-
/** 是否显示错误 */
|
|
33
|
-
error?: boolean;
|
|
34
|
-
/** 错误提示 */
|
|
35
|
-
helperText?: ReactNode;
|
|
36
|
-
/** 前缀 */
|
|
37
|
-
addonBefore?: ReactNode;
|
|
38
|
-
/** 后缀 */
|
|
39
|
-
addonAfter?: ReactNode;
|
|
40
|
-
/** 默认值 不受控 */
|
|
41
|
-
defaultValue?: string | number;
|
|
42
|
-
/** 默认值 受控 */
|
|
43
|
-
value?: string | number;
|
|
44
|
-
/** 是否得到焦点 */
|
|
45
|
-
autoFocus?: boolean;
|
|
46
|
-
/** 文本类型 */
|
|
47
|
-
type?: 'text' | 'number' | 'password';
|
|
48
|
-
/** 多行文本行 */
|
|
49
|
-
rows?: number;
|
|
50
|
-
/** 多行文本是否可拖动 */
|
|
51
|
-
resize?: boolean;
|
|
52
|
-
/** 右侧图标 */
|
|
53
|
-
rightIcon?: ReactNode;
|
|
54
|
-
/** 是否显示右边图标 */
|
|
55
|
-
showRightIcon?: boolean;
|
|
56
|
-
/** 是否显示清空按钮 */
|
|
57
|
-
allowClear?: boolean;
|
|
58
|
-
/** 长度限制 */
|
|
59
|
-
limitLength?: number;
|
|
60
|
-
/** 下拉框class */
|
|
61
|
-
selectPopoverClass?: string;
|
|
62
|
-
/** 下拉框显示字段 */
|
|
63
|
-
showSelectName?: string;
|
|
64
|
-
/** 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 */
|
|
65
|
-
fetchSuggestions?: (val: string, cb: (data: any[]) => void) => void;
|
|
66
|
-
/** 下拉搜索空状态 */
|
|
67
|
-
searchEmpty?: ReactNode;
|
|
68
|
-
/** 渲染下拉子节点 */
|
|
69
|
-
renderSelectItem?: (item: any) => ReactNode;
|
|
70
|
-
/** 失去焦点 */
|
|
71
|
-
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
72
|
-
/** 得到焦点 */
|
|
73
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
74
|
-
/** 改变输入框 */
|
|
75
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
76
|
-
/** 点击图标 */
|
|
77
|
-
onClickIcon?: (event: React.PointerEvent<HTMLSpanElement>) => void;
|
|
78
|
-
/** 键盘按下 */
|
|
79
|
-
onKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
80
|
-
/** 键盘抬起 */
|
|
81
|
-
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
82
|
-
/** 回车事件 */
|
|
83
|
-
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
84
|
-
/** 点击前缀 */
|
|
85
|
-
onClickAddonBefore?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
86
|
-
/** 点击后缀 */
|
|
87
|
-
onClickAddonAfter?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
88
|
-
/** 点击清空内容回调 */
|
|
89
|
-
onClear?: () => void;
|
|
90
|
-
/** 选着下拉框 */
|
|
91
|
-
onSelect?: (item: any) => void;
|
|
92
|
-
[name: string]: any;
|
|
93
|
-
}
|
|
94
|
-
export declare const TextField: FunctionComponent<TextFieldProps>;
|
|
95
|
-
export default TextField;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/5 15:05
|
|
4
|
+
* @description 输入框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { LabelTooltipProps } from '../Label';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
export interface TextFieldProps {
|
|
10
|
+
/** 样式class */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** style */
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
/** 大小 */
|
|
15
|
+
size?: 'small' | 'medium' | 'large';
|
|
16
|
+
/** 标题在外,还是在内 */
|
|
17
|
+
labelMode?: 'outside' | 'inside';
|
|
18
|
+
/** 标题 */
|
|
19
|
+
label?: ReactNode;
|
|
20
|
+
/** 标题提示 */
|
|
21
|
+
labelSign?: ReactNode;
|
|
22
|
+
/** 是否必填 */
|
|
23
|
+
required?: boolean;
|
|
24
|
+
/** 帮组提示信息 */
|
|
25
|
+
labelTooltip?: LabelTooltipProps;
|
|
26
|
+
/** 提示语 */
|
|
27
|
+
placeholder?: ReactNode;
|
|
28
|
+
/** 是否禁用 */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** 多行 */
|
|
31
|
+
multiline?: boolean;
|
|
32
|
+
/** 是否显示错误 */
|
|
33
|
+
error?: boolean;
|
|
34
|
+
/** 错误提示 */
|
|
35
|
+
helperText?: ReactNode;
|
|
36
|
+
/** 前缀 */
|
|
37
|
+
addonBefore?: ReactNode;
|
|
38
|
+
/** 后缀 */
|
|
39
|
+
addonAfter?: ReactNode;
|
|
40
|
+
/** 默认值 不受控 */
|
|
41
|
+
defaultValue?: string | number;
|
|
42
|
+
/** 默认值 受控 */
|
|
43
|
+
value?: string | number;
|
|
44
|
+
/** 是否得到焦点 */
|
|
45
|
+
autoFocus?: boolean;
|
|
46
|
+
/** 文本类型 */
|
|
47
|
+
type?: 'text' | 'number' | 'password';
|
|
48
|
+
/** 多行文本行 */
|
|
49
|
+
rows?: number;
|
|
50
|
+
/** 多行文本是否可拖动 */
|
|
51
|
+
resize?: boolean;
|
|
52
|
+
/** 右侧图标 */
|
|
53
|
+
rightIcon?: ReactNode;
|
|
54
|
+
/** 是否显示右边图标 */
|
|
55
|
+
showRightIcon?: boolean;
|
|
56
|
+
/** 是否显示清空按钮 */
|
|
57
|
+
allowClear?: boolean;
|
|
58
|
+
/** 长度限制 */
|
|
59
|
+
limitLength?: number;
|
|
60
|
+
/** 下拉框class */
|
|
61
|
+
selectPopoverClass?: string;
|
|
62
|
+
/** 下拉框显示字段 */
|
|
63
|
+
showSelectName?: string;
|
|
64
|
+
/** 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 */
|
|
65
|
+
fetchSuggestions?: (val: string, cb: (data: any[]) => void) => void;
|
|
66
|
+
/** 下拉搜索空状态 */
|
|
67
|
+
searchEmpty?: ReactNode;
|
|
68
|
+
/** 渲染下拉子节点 */
|
|
69
|
+
renderSelectItem?: (item: any) => ReactNode;
|
|
70
|
+
/** 失去焦点 */
|
|
71
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
72
|
+
/** 得到焦点 */
|
|
73
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
74
|
+
/** 改变输入框 */
|
|
75
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
76
|
+
/** 点击图标 */
|
|
77
|
+
onClickIcon?: (event: React.PointerEvent<HTMLSpanElement>) => void;
|
|
78
|
+
/** 键盘按下 */
|
|
79
|
+
onKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
80
|
+
/** 键盘抬起 */
|
|
81
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
82
|
+
/** 回车事件 */
|
|
83
|
+
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
84
|
+
/** 点击前缀 */
|
|
85
|
+
onClickAddonBefore?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
86
|
+
/** 点击后缀 */
|
|
87
|
+
onClickAddonAfter?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
88
|
+
/** 点击清空内容回调 */
|
|
89
|
+
onClear?: () => void;
|
|
90
|
+
/** 选着下拉框 */
|
|
91
|
+
onSelect?: (item: any) => void;
|
|
92
|
+
[name: string]: any;
|
|
93
|
+
}
|
|
94
|
+
export declare const TextField: FunctionComponent<TextFieldProps>;
|
|
95
|
+
export default TextField;
|
package/TextField/index.js
CHANGED
|
@@ -11,4 +11,4 @@ object-assign
|
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/i(7418);var n=i(8156),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function d(e,t,i){var n,r={},d=null,s=null;for(n in void 0!==i&&(d=""+i),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===r[n]&&(r[n]=t[n]);return{$$typeof:o,type:e,key:d,ref:s,props:r,_owner:l.current}}t.jsx=d,t.jsxs=d},5893:function(e,t,i){"use strict";e.exports=i(5251)},9271:function(e,t,i){var n=i(3379),o=i(2565);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2113:function(e,t,i){var n=i(3379),o=i(7381);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3936:function(e,t,i){var n=i(3379),o=i(9916);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},9663:function(e,t,i){var n=i(3379),o=i(4928);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3492:function(e,t,i){var n=i(3379),o=i(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},6202:function(e,t,i){var n=i(3379),o=i(3637);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2310:function(e,t,i){var n=i(3379),o=i(9929);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3379:function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),l=[];function a(e){for(var t=-1,i=0;i<l.length;i++)if(l[i].identifier===e){t=i;break}return t}function c(e,t){for(var i={},n=[],o=0;o<e.length;o++){var r=e[o],c=t.base?r[0]+t.base:r[0],d=i[c]||0,s="".concat(c," ").concat(d);i[c]=d+1;var u=a(s),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(l[u].references++,l[u].updater(f)):l.push({identifier:s,updater:g(f,t),references:1}),n.push(s)}return n}function d(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var l=r(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var s,u=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function f(e,t,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var r=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(r,l[t]):e.appendChild(r)}}function p(e,t,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var x=null,h=0;function g(e,t){var i,n,o;if(t.singleton){var r=h++;i=x||(x=d(t)),n=f.bind(null,i,r,!1),o=f.bind(null,i,r,!0)}else i=d(t),n=p.bind(null,i,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var i=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var o=a(i[n]);l[o].references--}for(var r=c(e,t),d=0;d<i.length;d++){var s=a(i[d]);0===l[s].references&&(l[s].updater(),l.splice(s,1))}i=r}}}},7839:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(7371),l=(i(9271),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.children,i=e.arrow,a=void 0!==i&&i,c=e.placement,d=void 0===c?"bottom-start":c,s=e.tips,u=void 0===s?"":s,f=e.className,p=void 0===f?"":f,x=e.beyondText,h=void 0===x||x,g=e.interactive,v=void 0===g||g,b=e.style,m=(0,o.useRef)(),w=(0,o.useRef)(),y=(0,o.useState)(""),j=y[0],O=y[1];(0,o.useEffect)((function(){O(u)}),[u]);var S;return(0,n.jsx)("div",l({ref:m,className:(S="paraui-auto-tips",p&&(S+=" "+p),S),onMouseOver:function(){var e="",i=m.current.getBoundingClientRect(),n=w.current.getBoundingClientRect();m.current&&n.width>i.width&&(e=u||(h?m.current.innerText:t)),O(e)},style:b},{children:(0,n.jsx)(r.default,l({arrow:a,title:j,placement:d,interactive:v,boundariesElement:"viewport",className:"paraui-auto-tips-tooltip"},{children:(0,n.jsx)("div",l({className:"auto-tips-content",ref:w},{children:t}))}))}))}},3566:function(e,t,i){"use strict";var n=i(5893),o=i(7371),r=i(8076),l=i.n(r),a=i(5744),c=i.n(a),d=(i(2113),function(){return d=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)}),s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t=e.title,i=void 0===t?"":t,r=e.children,a=e.arrow,u=void 0===a||a,f=e.interactive,p=void 0===f||f,x=e.className,h=e.placement,g=void 0===h?"top-start":h,v=s(e,["title","children","arrow","interactive","className","placement"]);return(0,n.jsx)(o.default,d({title:i,arrow:u,interactive:p,placement:g},v,{children:(0,n.jsx)("span",d({className:c()("paraui-help",x)},{children:r||(0,n.jsx)(l(),{})}))}))}},4254:function(e,t,i){"use strict";var n=i(5893),o=(i(3936),function(){return o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)});t.default=function(e){var t,i=e.className,r=e.style,l=e.error,a=void 0!==l&&l,c=e.helperText;return(0,n.jsx)("p",o({className:(t="paraui-helper-text",i&&(t+=" "+i),a&&(t+=" paraui-helper-text-error"),t),style:r},{children:c}))}},6010:function(e,t,i){"use strict";i.d(t,{Z:function(){return c}});var n=i(8156),o=i.n(n),r=i(5395),l=i.n(r),a=function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function c(e,t){var i=o().useContext(l()).componentsProps,n=i&&i[t];return a(a({},n),e)}},8767:function(e,t,i){"use strict";var n=i(5893),o=i(3566),r=(i(9663),function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,l=e.label,a=e.labelSign,c=e.required,d=void 0!==c&&c,s=e.tooltip,u=e.tooltipType,f=void 0===u?"icon":u,p=e.placement,x=e.arrow,h=e.tooltipIcon,g=function(){var e="paraui-label";return f&&(e+=" paraui-label-"+f),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,n.jsxs)(n.Fragment,{children:["icon"===f&&(0,n.jsxs)("label",r({className:g(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:l}),d&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),a&&(0,n.jsx)("span",{children:a}),s&&(0,n.jsx)(o.default,r({title:s,placement:p,arrow:x},{children:h}))]})),"line"===f&&(0,n.jsx)(o.default,r({title:s||"",placement:p,arrow:x},{children:(0,n.jsxs)("label",r({className:g(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:l}),d&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),a&&(0,n.jsx)("span",{children:a})]}))}))]})}},7502:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(2788),l=i.n(r),a=(i(3492),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,r=e.opacity,c=void 0===r?.7:r,d=(0,o.useRef)(null);(0,o.useEffect)((function(){d&&d.current&&d.current.parentNode&&(d.current.parentNode.style.position||(d.current.parentNode.style.position="relative"))}),[]);var s;return(0,n.jsxs)("div",a({className:(s="paraui-loading",t&&(s+=" "+t),s),style:i,ref:d},{children:[(0,n.jsx)("div",a({className:"paraui-loading-box"},{children:(0,n.jsx)(l(),{})})),(0,n.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7371:function(e,t,i){"use strict";var n=i(5893),o=i(670),r=i(5744),l=i.n(r),a=(i(2310),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)}),c=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t,i=e.placement,r=void 0===i?"top-start":i,d=e.className,s=e.arrow,u=void 0===s||s,f=e.PopperProps,p=e.boundariesElement,x=void 0===p?"scrollParent":p,h=c(e,["placement","className","arrow","PopperProps","boundariesElement"]),g=a(a({},e.classes),{popper:l()("paraui-tooltip",d,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==r?void 0:r.includes("left"))||(null==r?void 0:r.includes("right")),"paraui-tooltip-top-bottom":(null==r?void 0:r.includes("top"))||(null==r?void 0:r.includes("bottom"))})});return(0,n.jsx)(o.Tooltip,a({},h,{enterTouchDelay:0,arrow:u,placement:r,classes:g,PopperProps:a(a({},f),{modifiers:{preventOverflow:{boundariesElement:x}}})}))}},670:function(e){"use strict";e.exports=t},5395:function(e){"use strict";e.exports=d},6788:function(e){"use strict";e.exports=a},8076:function(e){"use strict";e.exports=n},2788:function(e){"use strict";e.exports=c},5428:function(e){"use strict";e.exports=r},9979:function(e){"use strict";e.exports=l},8543:function(e){"use strict";e.exports=o},5744:function(e){"use strict";e.exports=i},8156:function(t){"use strict";t.exports=e}},u={};function f(e){var t=u[e];if(void 0!==t)return t.exports;var i=u[e]={id:e,exports:{}};return s[e](i,i.exports,f),i.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var i in t)f.o(t,i)&&!f.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nc=void 0;var p={};return function(){"use strict";f.r(p),f.d(p,{TextField:function(){return w}});var e=f(5893),t=f(8156),i=f(8767),n=f(8543),o=f(5428),r=f.n(o),l=f(9979),a=f.n(l),c=f(6788),d=f.n(c),s=f(7839),u=f(7502),x=f(7371),h=f(4254),g=f(6010),v=(f(6202),function(){return v=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)}),b=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},m=function(e){return"number"==typeof e&&!isNaN(e)},w=function(o){var l=(0,g.Z)(o,"TextField"),c=l.className,f=l.style,p=l.size,w=void 0===p?"large":p,y=l.labelMode,j=void 0===y?"outside":y,O=l.placeholder,S=void 0===O?"":O,C=l.label,N=void 0===C?"":C,k=l.labelTooltip,P=l.disabled,M=void 0!==P&&P,E=l.multiline,q=void 0!==E&&E,_=l.required,F=void 0!==_&&_,L=l.labelSign,T=l.rows,z=void 0===T?2:T,H=l.error,I=void 0!==H&&H,R=l.helperText,B=void 0===R?"":R,U=l.addonBefore,D=void 0===U?"":U,A=l.addonAfter,K=void 0===A?"":A,Y=(l.defaultValue,l.value),J=l.autoFocus,W=void 0!==J&&J,G=l.type,Q=void 0===G?"text":G,V=l.onClickIcon,Z=l.rightIcon,$=l.showRightIcon,X=void 0===$||$,ee=l.allowClear,te=void 0!==ee&&ee,ie=l.limitLength,ne=l.fetchSuggestions,oe=l.selectPopoverClass,re=l.renderSelectItem,le=l.showSelectName,ae=void 0===le?"value":le,ce=l.resize,de=void 0===ce||ce,se=l.searchEmpty,ue=l.onBlur,fe=l.onFocus,pe=l.onChange,xe=l.onKeydown,he=l.onKeyUp,ge=l.onEnter,ve=l.onClickAddonBefore,be=l.onClickAddonAfter,me=l.onSelect,we=l.onClear,ye=b(l,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","allowClear","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","searchEmpty","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect","onClear"]),je=(0,t.useState)("text-field-select-content-"+(0,n.UUID)())[0],Oe=(0,t.useState)(!0),Se=Oe[0],Ce=Oe[1],Ne=(0,t.useState)(""),ke=Ne[0],Pe=Ne[1],Me=(0,t.useState)(!1),Ee=Me[0],qe=Me[1],_e=(0,t.useState)("text"),Fe=_e[0],Le=_e[1],Te=(0,t.useState)(!1),ze=Te[0],He=Te[1],Ie=(0,t.useState)(!1),Re=Ie[0],Be=Ie[1],Ue=(0,t.useState)([]),De=Ue[0],Ae=Ue[1],Ke=(0,t.useRef)(null),Ye=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==o.defaultValue&&Pe(o.defaultValue)}),[]),(0,t.useEffect)((function(){Q!==Fe&&Le(Q)}),[Q]),(0,t.useEffect)((function(){void 0!==Y&&Pe(Y)}),[Y]),(0,t.useEffect)((function(){Ce(""===ke||void 0===ke)}),[ke]),(0,t.useEffect)((function(){ne&&He(Ee)}),[Ee,ne]),(0,t.useEffect)((function(){return ze?window.addEventListener("keydown",Ze):window.removeEventListener("keydown",Ze),function(){window.removeEventListener("keydown",Ze)}}),[ze]),(0,t.useEffect)((function(){if(!Ee&&ke){var e=We(ke);if(e!==ke){var t={};t.target=Ke.current,t.target.value=e,void 0===o.value&&Pe(e),o.onChange&&o.onChange(t)}}}),[ke,Ee]);var Je,We=function(e){var t=e;return m(o.limitLength)&&e.toString().length>Number(o.limitLength)&&(t=t.toString().substr(0,o.limitLength)),t},Ge=function(){M||(Ce(!1),(Ke&&Ke.current).focus())},Qe=function(e){var t=e.selectDom,i=e.keyCode,n=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===i&&(o="previousSibling",r=".text-field-select-content-item:last-child"),n?(n=n[o])||(n=t.querySelector(r)):n=t.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Ve(n,t))},Ve=function(e,t){var i=t.clientHeight,n=e.offsetTop+e.clientHeight-i;t.scrollTop=n>0?n:0},Ze=function(e){var t=document.querySelector("."+je),i=null,n=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&n){var o=n.dataset.val;at(JSON.parse(o))(e),(Ke&&Ke.current).blur()}n&&(i=n,n.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Qe({selectDom:t,keyCode:e.keyCode,currentDom:i}),38===e.keyCode&&Qe({selectDom:t,keyCode:e.keyCode,currentDom:i})},$e=function(e){qe(!1),""===e.target.value&&Ce(!0),ue&&ue(e)},Xe=function(e){ne&&(Be(!0),ne(e,(function(e){Ae(e||[]),Be(!1)})))},et=function(e){qe(!0),fe&&fe(e),Xe(e.target.value)},tt=function(e){var t=e.target.value;t&&Ce(!1),void 0===o.value&&Pe(t),pe&&pe(e),Xe(e.target.value)},it=function(e){13===e.keyCode&&ge&&ge(e),xe&&xe(e)},nt=function(e){he&&he(e)},ot=function(e){"password"===Q&&("text"===Fe&&Le("password"),"password"===Fe&&Le("text")),V&&V(e)},rt=function(){return void 0===o.value?ke:Y},lt=function(){He(!1)},at=function(e){return function(t){me&&me(e)}},ct=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:m(ie)&&(0,e.jsx)("span",v({className:"length-limit"},{children:(ke?ke.toString().length:0)+"/"+ie}))})}),[ie,ke]),dt=(0,t.useMemo)((function(){var t=Z||("password"===Q?"password"===Fe?(0,e.jsx)(r(),{}):(0,e.jsx)(a(),{}):null);return(0,e.jsx)(e.Fragment,{children:X&&t&&(0,e.jsx)("span",v({className:"password"===Q?"right-icon right-icon-password":"right-icon",onClick:ot},{children:t}))})}),[X,Z,Q,Fe,V]),st=function(){var e=Ke.current;e.value="",void 0===o.value&&Pe(""),pe&&pe({target:e}),Xe(""),we&&we()},ut=function(){if(rt()&&!M&&te)return(0,e.jsx)("span",v({className:"clean-up-icon",onClick:st},{children:(0,e.jsx)(d(),{})}))},ft=(0,t.useMemo)((function(){return(0,e.jsxs)("div",v({className:"text-field-content-within",ref:Ye},{children:[(0,e.jsxs)("div",v({className:"text-field-content-within-input"},{children:[q?(0,e.jsx)("textarea",v({ref:Ke,rows:z,value:rt(),onBlur:$e,onFocus:et,onChange:tt,onKeyDown:it,onKeyUp:nt,disabled:M},ye)):(0,e.jsx)("input",v({ref:Ke,type:Fe,value:rt(),onBlur:$e,onFocus:et,onChange:tt,onKeyDown:it,onKeyUp:nt,disabled:M},ye)),Se&&!Ee&&(0,e.jsx)("span",v({className:"text-field-label-placeholder",onClick:Ge},{children:"outside"===j?S:(0,e.jsxs)(e.Fragment,{children:[N||S,F&&(0,e.jsx)("span",v({className:"text-field-required"},{children:"*"})),L&&(0,e.jsx)("span",{children:L})]})}))]})),ut(),ct,dt]}))}),[Se,Ee,W,Fe,ke,ct,dt,j,S,N,M,q,z,ye,pe,ne,V,te,we]),pt=(0,t.useMemo)((function(){var t,i=function(e){return"object"==typeof e&&null!==e?e[ae]:e};return(0,e.jsxs)("div",v({className:(t="text-field-select-content",Re&&(t+=" text-field-select-content-loading"),je&&(t+=" "+je),t),style:{width:(Ye&&Ye.current?Ye.current.offsetWidth:0)+"px"}},{children:[De&&De.map((function(t,n){return(0,e.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:at(t),"data-val":JSON.stringify(t)},{children:re?re(t):(0,e.jsx)(s.default,{children:i(t)})}),n)})),0===De.length&&se,Re&&(0,e.jsx)(u.default,{})]}))}),[Ye,ze,De,re,ae,me,Re,je,se]),xt=(0,t.useMemo)((function(){return(0,e.jsx)(x.default,v({open:ze,title:pt,onClose:lt,arrow:!1,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:"bottom-start",classes:{popper:(t="paraui-text-field-select paraui-scrollbar-small",w&&(t+=" paraui-text-field-select-"+w),oe&&(t+=" "+oe),De.length>0&&(t+=" paraui-text-field-select-data"),t)}},{children:ft}));var t}),[Se,Ee,W,Fe,ke,ct,dt,j,S,N,M,q,z,ye,pe,ne,me,Ye,ze,oe,w,V,De,te,we,se]),ht=(0,t.useMemo)((function(){var t,n=Boolean(F||L||N);if("outside"===j&&n){return(0,e.jsx)(i.default,v({label:N,required:F,labelSign:L},k,{className:(t="text-field-label",k&&k.className&&(t+=" "+k.className),t)}))}return null}),[j,N,L,F,k]);return(0,e.jsxs)("div",v({className:(Je="paraui-text-field",Je+=" text-field",w&&!q&&(Je+=" text-field-"+w),c&&(Je+=" "+c),I&&(Je+=" text-field-error"),Ee&&(Je+=" text-field-focus"),M&&(Je+=" text-field-disabled"),q&&(Je+=" text-field-multiline"),m(o.limitLength)&&(Je+=" text-field-limit-length"),m(o.limitLength)&&ke&&ke.toString().length>Number(o.limitLength)&&(Je+=" text-field-limit"),de&&(Je+=" text-field-resize"),rt()&&(Je+=" text-field-value"),te&&(Je+=" text-field-allow-clear"),Je),style:f},{children:[ht,(0,e.jsxs)("div",v({className:"text-field-content"},{children:[D&&(0,e.jsx)("div",v({className:"text-field-content-before",onClick:function(e){ve&&ve(e)}},{children:D})),ne?xt:ft,K&&(0,e.jsx)("div",v({className:"text-field-content-after",onClick:function(e){be&&be(e)}},{children:K}))]})),(0,e.jsx)(h.default,{className:"text-field-error-text",error:I,helperText:B})]}))};p.default=w}(),p}()}));
|
|
14
|
+
*/i(7418);var n=i(8156),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function d(e,t,i){var n,r={},d=null,s=null;for(n in void 0!==i&&(d=""+i),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===r[n]&&(r[n]=t[n]);return{$$typeof:o,type:e,key:d,ref:s,props:r,_owner:l.current}}t.jsx=d,t.jsxs=d},5893:function(e,t,i){"use strict";e.exports=i(5251)},9271:function(e,t,i){var n=i(3379),o=i(2565);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2113:function(e,t,i){var n=i(3379),o=i(7381);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3936:function(e,t,i){var n=i(3379),o=i(9916);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},9663:function(e,t,i){var n=i(3379),o=i(4928);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3492:function(e,t,i){var n=i(3379),o=i(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},6202:function(e,t,i){var n=i(3379),o=i(3637);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2310:function(e,t,i){var n=i(3379),o=i(9929);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3379:function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),l=[];function a(e){for(var t=-1,i=0;i<l.length;i++)if(l[i].identifier===e){t=i;break}return t}function c(e,t){for(var i={},n=[],o=0;o<e.length;o++){var r=e[o],c=t.base?r[0]+t.base:r[0],d=i[c]||0,s="".concat(c," ").concat(d);i[c]=d+1;var u=a(s),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(l[u].references++,l[u].updater(f)):l.push({identifier:s,updater:g(f,t),references:1}),n.push(s)}return n}function d(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var l=r(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var s,u=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function f(e,t,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var r=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(r,l[t]):e.appendChild(r)}}function p(e,t,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var x=null,h=0;function g(e,t){var i,n,o;if(t.singleton){var r=h++;i=x||(x=d(t)),n=f.bind(null,i,r,!1),o=f.bind(null,i,r,!0)}else i=d(t),n=p.bind(null,i,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var i=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var o=a(i[n]);l[o].references--}for(var r=c(e,t),d=0;d<i.length;d++){var s=a(i[d]);0===l[s].references&&(l[s].updater(),l.splice(s,1))}i=r}}}},7839:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(7371),l=(i(9271),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.children,i=e.arrow,a=void 0!==i&&i,c=e.placement,d=void 0===c?"bottom-start":c,s=e.tips,u=void 0===s?"":s,f=e.className,p=void 0===f?"":f,x=e.beyondText,h=void 0===x||x,g=e.interactive,v=void 0===g||g,b=e.style,m=(0,o.useRef)(),w=(0,o.useRef)(),y=(0,o.useState)(""),j=y[0],O=y[1];(0,o.useEffect)((function(){O(u)}),[u]);var S;return(0,n.jsx)("div",l({ref:m,className:(S="paraui-auto-tips",p&&(S+=" "+p),S),onMouseOver:function(){var e="",i=m.current,n=i.getBoundingClientRect();m.current&&i.scrollWidth>n.width&&(e=u||(h?i.innerText:t)),O(e)},style:b},{children:(0,n.jsx)(r.default,l({arrow:a,title:j,placement:d,interactive:v,boundariesElement:"viewport",className:"paraui-auto-tips-tooltip"},{children:(0,n.jsx)("div",l({className:"auto-tips-content",ref:w},{children:t}))}))}))}},3566:function(e,t,i){"use strict";var n=i(5893),o=i(7371),r=i(8076),l=i.n(r),a=i(5744),c=i.n(a),d=(i(2113),function(){return d=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)}),s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t=e.title,i=void 0===t?"":t,r=e.children,a=e.arrow,u=void 0===a||a,f=e.interactive,p=void 0===f||f,x=e.className,h=e.placement,g=void 0===h?"top-start":h,v=s(e,["title","children","arrow","interactive","className","placement"]);return(0,n.jsx)(o.default,d({title:i,arrow:u,interactive:p,placement:g},v,{children:(0,n.jsx)("span",d({className:c()("paraui-help",x)},{children:r||(0,n.jsx)(l(),{})}))}))}},4254:function(e,t,i){"use strict";var n=i(5893),o=(i(3936),function(){return o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)});t.default=function(e){var t,i=e.className,r=e.style,l=e.error,a=void 0!==l&&l,c=e.helperText;return(0,n.jsx)("p",o({className:(t="paraui-helper-text",i&&(t+=" "+i),a&&(t+=" paraui-helper-text-error"),t),style:r},{children:c}))}},6010:function(e,t,i){"use strict";i.d(t,{Z:function(){return c}});var n=i(8156),o=i.n(n),r=i(5395),l=i.n(r),a=function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function c(e,t){var i=o().useContext(l()).componentsProps,n=i&&i[t];return a(a({},n),e)}},8767:function(e,t,i){"use strict";var n=i(5893),o=i(3566),r=(i(9663),function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,l=e.label,a=e.labelSign,c=e.required,d=void 0!==c&&c,s=e.tooltip,u=e.tooltipType,f=void 0===u?"icon":u,p=e.placement,x=e.arrow,h=e.tooltipIcon,g=function(){var e="paraui-label";return f&&(e+=" paraui-label-"+f),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,n.jsxs)(n.Fragment,{children:["icon"===f&&(0,n.jsxs)("label",r({className:g(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:l}),d&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),a&&(0,n.jsx)("span",{children:a}),s&&(0,n.jsx)(o.default,r({title:s,placement:p,arrow:x},{children:h}))]})),"line"===f&&(0,n.jsx)(o.default,r({title:s||"",placement:p,arrow:x},{children:(0,n.jsxs)("label",r({className:g(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:l}),d&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),a&&(0,n.jsx)("span",{children:a})]}))}))]})}},7502:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(2788),l=i.n(r),a=(i(3492),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,r=e.opacity,c=void 0===r?.7:r,d=(0,o.useRef)(null);(0,o.useEffect)((function(){d&&d.current&&d.current.parentNode&&(d.current.parentNode.style.position||(d.current.parentNode.style.position="relative"))}),[]);var s;return(0,n.jsxs)("div",a({className:(s="paraui-loading",t&&(s+=" "+t),s),style:i,ref:d},{children:[(0,n.jsx)("div",a({className:"paraui-loading-box"},{children:(0,n.jsx)(l(),{})})),(0,n.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7371:function(e,t,i){"use strict";var n=i(5893),o=i(670),r=i(5744),l=i.n(r),a=(i(2310),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)}),c=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t,i=e.placement,r=void 0===i?"top-start":i,d=e.className,s=e.arrow,u=void 0===s||s,f=e.PopperProps,p=e.boundariesElement,x=void 0===p?"scrollParent":p,h=c(e,["placement","className","arrow","PopperProps","boundariesElement"]),g=a(a({},e.classes),{popper:l()("paraui-tooltip",d,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==r?void 0:r.includes("left"))||(null==r?void 0:r.includes("right")),"paraui-tooltip-top-bottom":(null==r?void 0:r.includes("top"))||(null==r?void 0:r.includes("bottom"))})});return(0,n.jsx)(o.Tooltip,a({},h,{enterTouchDelay:0,arrow:u,placement:r,classes:g,PopperProps:a(a({},f),{modifiers:{preventOverflow:{boundariesElement:x}}})}))}},670:function(e){"use strict";e.exports=t},5395:function(e){"use strict";e.exports=d},6788:function(e){"use strict";e.exports=a},8076:function(e){"use strict";e.exports=n},2788:function(e){"use strict";e.exports=c},5428:function(e){"use strict";e.exports=r},9979:function(e){"use strict";e.exports=l},8543:function(e){"use strict";e.exports=o},5744:function(e){"use strict";e.exports=i},8156:function(t){"use strict";t.exports=e}},u={};function f(e){var t=u[e];if(void 0!==t)return t.exports;var i=u[e]={id:e,exports:{}};return s[e](i,i.exports,f),i.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var i in t)f.o(t,i)&&!f.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nc=void 0;var p={};return function(){"use strict";f.r(p),f.d(p,{TextField:function(){return w}});var e=f(5893),t=f(8156),i=f(8767),n=f(8543),o=f(5428),r=f.n(o),l=f(9979),a=f.n(l),c=f(6788),d=f.n(c),s=f(7839),u=f(7502),x=f(7371),h=f(4254),g=f(6010),v=(f(6202),function(){return v=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)}),b=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},m=function(e){return"number"==typeof e&&!isNaN(e)},w=function(o){var l=(0,g.Z)(o,"TextField"),c=l.className,f=l.style,p=l.size,w=void 0===p?"large":p,y=l.labelMode,j=void 0===y?"outside":y,O=l.placeholder,S=void 0===O?"":O,C=l.label,N=void 0===C?"":C,k=l.labelTooltip,P=l.disabled,M=void 0!==P&&P,E=l.multiline,q=void 0!==E&&E,_=l.required,F=void 0!==_&&_,L=l.labelSign,T=l.rows,z=void 0===T?2:T,H=l.error,I=void 0!==H&&H,R=l.helperText,B=void 0===R?"":R,U=l.addonBefore,D=void 0===U?"":U,A=l.addonAfter,K=void 0===A?"":A,Y=(l.defaultValue,l.value),J=l.autoFocus,W=void 0!==J&&J,G=l.type,Q=void 0===G?"text":G,V=l.onClickIcon,Z=l.rightIcon,$=l.showRightIcon,X=void 0===$||$,ee=l.allowClear,te=void 0!==ee&&ee,ie=l.limitLength,ne=l.fetchSuggestions,oe=l.selectPopoverClass,re=l.renderSelectItem,le=l.showSelectName,ae=void 0===le?"value":le,ce=l.resize,de=void 0===ce||ce,se=l.searchEmpty,ue=l.onBlur,fe=l.onFocus,pe=l.onChange,xe=l.onKeydown,he=l.onKeyUp,ge=l.onEnter,ve=l.onClickAddonBefore,be=l.onClickAddonAfter,me=l.onSelect,we=l.onClear,ye=b(l,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","allowClear","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","searchEmpty","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect","onClear"]),je=(0,t.useState)("text-field-select-content-"+(0,n.UUID)())[0],Oe=(0,t.useState)(!0),Se=Oe[0],Ce=Oe[1],Ne=(0,t.useState)(""),ke=Ne[0],Pe=Ne[1],Me=(0,t.useState)(!1),Ee=Me[0],qe=Me[1],_e=(0,t.useState)("text"),Fe=_e[0],Le=_e[1],Te=(0,t.useState)(!1),ze=Te[0],He=Te[1],Ie=(0,t.useState)(!1),Re=Ie[0],Be=Ie[1],Ue=(0,t.useState)([]),De=Ue[0],Ae=Ue[1],Ke=(0,t.useRef)(null),Ye=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==o.defaultValue&&Pe(o.defaultValue)}),[]),(0,t.useEffect)((function(){Q!==Fe&&Le(Q)}),[Q]),(0,t.useEffect)((function(){void 0!==Y&&Pe(Y)}),[Y]),(0,t.useEffect)((function(){Ce(""===ke||void 0===ke)}),[ke]),(0,t.useEffect)((function(){ne&&He(Ee)}),[Ee,ne]),(0,t.useEffect)((function(){return ze?window.addEventListener("keydown",Ze):window.removeEventListener("keydown",Ze),function(){window.removeEventListener("keydown",Ze)}}),[ze]),(0,t.useEffect)((function(){if(!Ee&&ke){var e=We(ke);if(e!==ke){var t={};t.target=Ke.current,t.target.value=e,void 0===o.value&&Pe(e),o.onChange&&o.onChange(t)}}}),[ke,Ee]);var Je,We=function(e){var t=e;return m(o.limitLength)&&e.toString().length>Number(o.limitLength)&&(t=t.toString().substr(0,o.limitLength)),t},Ge=function(){M||(Ce(!1),(Ke&&Ke.current).focus())},Qe=function(e){var t=e.selectDom,i=e.keyCode,n=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===i&&(o="previousSibling",r=".text-field-select-content-item:last-child"),n?(n=n[o])||(n=t.querySelector(r)):n=t.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Ve(n,t))},Ve=function(e,t){var i=t.clientHeight,n=e.offsetTop+e.clientHeight-i;t.scrollTop=n>0?n:0},Ze=function(e){var t=document.querySelector("."+je),i=null,n=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&n){var o=n.dataset.val;at(JSON.parse(o))(e),(Ke&&Ke.current).blur()}n&&(i=n,n.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Qe({selectDom:t,keyCode:e.keyCode,currentDom:i}),38===e.keyCode&&Qe({selectDom:t,keyCode:e.keyCode,currentDom:i})},$e=function(e){qe(!1),""===e.target.value&&Ce(!0),ue&&ue(e)},Xe=function(e){ne&&(Be(!0),ne(e,(function(e){Ae(e||[]),Be(!1)})))},et=function(e){qe(!0),fe&&fe(e),Xe(e.target.value)},tt=function(e){var t=e.target.value;t&&Ce(!1),void 0===o.value&&Pe(t),pe&&pe(e),Xe(e.target.value)},it=function(e){13===e.keyCode&&ge&&ge(e),xe&&xe(e)},nt=function(e){he&&he(e)},ot=function(e){"password"===Q&&("text"===Fe&&Le("password"),"password"===Fe&&Le("text")),V&&V(e)},rt=function(){return void 0===o.value?ke:Y},lt=function(){He(!1)},at=function(e){return function(t){me&&me(e)}},ct=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:m(ie)&&(0,e.jsx)("span",v({className:"length-limit"},{children:(ke?ke.toString().length:0)+"/"+ie}))})}),[ie,ke]),dt=(0,t.useMemo)((function(){var t=Z||("password"===Q?"password"===Fe?(0,e.jsx)(r(),{}):(0,e.jsx)(a(),{}):null);return(0,e.jsx)(e.Fragment,{children:X&&t&&(0,e.jsx)("span",v({className:"password"===Q?"right-icon right-icon-password":"right-icon",onClick:ot},{children:t}))})}),[X,Z,Q,Fe,V]),st=function(){var e=Ke.current;e.value="",void 0===o.value&&Pe(""),pe&&pe({target:e}),Xe(""),we&&we()},ut=function(){if(rt()&&!M&&te)return(0,e.jsx)("span",v({className:"clean-up-icon",onClick:st},{children:(0,e.jsx)(d(),{})}))},ft=(0,t.useMemo)((function(){return(0,e.jsxs)("div",v({className:"text-field-content-within",ref:Ye},{children:[(0,e.jsxs)("div",v({className:"text-field-content-within-input"},{children:[q?(0,e.jsx)("textarea",v({ref:Ke,rows:z,value:rt(),onBlur:$e,onFocus:et,onChange:tt,onKeyDown:it,onKeyUp:nt,disabled:M},ye)):(0,e.jsx)("input",v({ref:Ke,type:Fe,value:rt(),onBlur:$e,onFocus:et,onChange:tt,onKeyDown:it,onKeyUp:nt,disabled:M},ye)),Se&&!Ee&&(0,e.jsx)("span",v({className:"text-field-label-placeholder",onClick:Ge},{children:"outside"===j?S:(0,e.jsxs)(e.Fragment,{children:[N||S,F&&(0,e.jsx)("span",v({className:"text-field-required"},{children:"*"})),L&&(0,e.jsx)("span",{children:L})]})}))]})),ut(),ct,dt]}))}),[Se,Ee,W,Fe,ke,ct,dt,j,S,N,M,q,z,ye,pe,ne,V,te,we]),pt=(0,t.useMemo)((function(){var t,i=function(e){return"object"==typeof e&&null!==e?e[ae]:e};return(0,e.jsxs)("div",v({className:(t="text-field-select-content",Re&&(t+=" text-field-select-content-loading"),je&&(t+=" "+je),t),style:{width:(Ye&&Ye.current?Ye.current.offsetWidth:0)+"px"}},{children:[De&&De.map((function(t,n){return(0,e.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:at(t),"data-val":JSON.stringify(t)},{children:re?re(t):(0,e.jsx)(s.default,{children:i(t)})}),n)})),0===De.length&&se,Re&&(0,e.jsx)(u.default,{})]}))}),[Ye,ze,De,re,ae,me,Re,je,se]),xt=(0,t.useMemo)((function(){return(0,e.jsx)(x.default,v({open:ze,title:pt,onClose:lt,arrow:!1,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:"bottom-start",classes:{popper:(t="paraui-text-field-select paraui-scrollbar-small",w&&(t+=" paraui-text-field-select-"+w),oe&&(t+=" "+oe),De.length>0&&(t+=" paraui-text-field-select-data"),t)}},{children:ft}));var t}),[Se,Ee,W,Fe,ke,ct,dt,j,S,N,M,q,z,ye,pe,ne,me,Ye,ze,oe,w,V,De,te,we,se]),ht=(0,t.useMemo)((function(){var t,n=Boolean(F||L||N);if("outside"===j&&n){return(0,e.jsx)(i.default,v({label:N,required:F,labelSign:L},k,{className:(t="text-field-label",k&&k.className&&(t+=" "+k.className),t)}))}return null}),[j,N,L,F,k]);return(0,e.jsxs)("div",v({className:(Je="paraui-text-field",Je+=" text-field",w&&!q&&(Je+=" text-field-"+w),c&&(Je+=" "+c),I&&(Je+=" text-field-error"),Ee&&(Je+=" text-field-focus"),M&&(Je+=" text-field-disabled"),q&&(Je+=" text-field-multiline"),m(o.limitLength)&&(Je+=" text-field-limit-length"),m(o.limitLength)&&ke&&ke.toString().length>Number(o.limitLength)&&(Je+=" text-field-limit"),de&&(Je+=" text-field-resize"),rt()&&(Je+=" text-field-value"),te&&(Je+=" text-field-allow-clear"),Je),style:f},{children:[ht,(0,e.jsxs)("div",v({className:"text-field-content"},{children:[D&&(0,e.jsx)("div",v({className:"text-field-content-before",onClick:function(e){ve&&ve(e)}},{children:D})),ne?xt:ft,K&&(0,e.jsx)("div",v({className:"text-field-content-after",onClick:function(e){be&&be(e)}},{children:K}))]})),(0,e.jsx)(h.default,{className:"text-field-error-text",error:I,helperText:B})]}))};p.default=w}(),p}()}));
|
package/TimePicker/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Moment } from 'moment';
|
|
3
|
-
import { PickerTimeProps, RangePickerTimeProps } from '../DatePicker/generatePicker';
|
|
4
|
-
export interface TimePickerLocale {
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
rangePlaceholder?: [string, string];
|
|
7
|
-
}
|
|
8
|
-
export interface TimeRangePickerProps extends Omit<RangePickerTimeProps<Moment>, 'picker'> {
|
|
9
|
-
popupClassName?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const RangePicker: React.ForwardRefExoticComponent<TimeRangePickerProps & React.RefAttributes<any>>;
|
|
12
|
-
export interface TimePickerProps extends Omit<PickerTimeProps<Moment>, 'picker'> {
|
|
13
|
-
addon?: () => React.ReactNode;
|
|
14
|
-
popupClassName?: string;
|
|
15
|
-
}
|
|
16
|
-
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<any>>;
|
|
17
|
-
type MergedTimePicker = typeof TimePicker & {
|
|
18
|
-
TimeRangePicker: typeof RangePicker;
|
|
19
|
-
RangePicker: typeof RangePicker;
|
|
20
|
-
};
|
|
21
|
-
declare const _default: MergedTimePicker;
|
|
22
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Moment } from 'moment';
|
|
3
|
+
import { PickerTimeProps, RangePickerTimeProps } from '../DatePicker/generatePicker';
|
|
4
|
+
export interface TimePickerLocale {
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
rangePlaceholder?: [string, string];
|
|
7
|
+
}
|
|
8
|
+
export interface TimeRangePickerProps extends Omit<RangePickerTimeProps<Moment>, 'picker'> {
|
|
9
|
+
popupClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const RangePicker: React.ForwardRefExoticComponent<TimeRangePickerProps & React.RefAttributes<any>>;
|
|
12
|
+
export interface TimePickerProps extends Omit<PickerTimeProps<Moment>, 'picker'> {
|
|
13
|
+
addon?: () => React.ReactNode;
|
|
14
|
+
popupClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<any>>;
|
|
17
|
+
type MergedTimePicker = typeof TimePicker & {
|
|
18
|
+
TimeRangePicker: typeof RangePicker;
|
|
19
|
+
RangePicker: typeof RangePicker;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: MergedTimePicker;
|
|
22
|
+
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TimePickerLocale } from '../index';
|
|
2
|
-
declare const locale: TimePickerLocale;
|
|
3
|
-
export default locale;
|
|
1
|
+
import { TimePickerLocale } from '../index';
|
|
2
|
+
declare const locale: TimePickerLocale;
|
|
3
|
+
export default locale;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TimePickerLocale } from '../index';
|
|
2
|
-
declare const locale: TimePickerLocale;
|
|
3
|
-
export default locale;
|
|
1
|
+
import { TimePickerLocale } from '../index';
|
|
2
|
+
declare const locale: TimePickerLocale;
|
|
3
|
+
export default locale;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '../../DatePicker/style';
|
|
1
|
+
import '../../DatePicker/style';
|
package/Timeline/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
interface DataItem {
|
|
4
|
-
/** 时间轴点图标 */
|
|
5
|
-
dotIcon?: ReactNode;
|
|
6
|
-
/** 时间轴内容 */
|
|
7
|
-
content: ReactNode;
|
|
8
|
-
/** 是否禁用 */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface TimelineProps {
|
|
12
|
-
/** 排列方向 */
|
|
13
|
-
align?: 'alternate' | 'left' | 'right';
|
|
14
|
-
/** 数据列表 */
|
|
15
|
-
data: DataItem[];
|
|
16
|
-
/** 类名 */
|
|
17
|
-
className?: string;
|
|
18
|
-
/** style */
|
|
19
|
-
style?: React.CSSProperties;
|
|
20
|
-
}
|
|
21
|
-
export declare const Timeline: FunctionComponent<TimelineProps>;
|
|
22
|
-
export default Timeline;
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
interface DataItem {
|
|
4
|
+
/** 时间轴点图标 */
|
|
5
|
+
dotIcon?: ReactNode;
|
|
6
|
+
/** 时间轴内容 */
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
/** 是否禁用 */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface TimelineProps {
|
|
12
|
+
/** 排列方向 */
|
|
13
|
+
align?: 'alternate' | 'left' | 'right';
|
|
14
|
+
/** 数据列表 */
|
|
15
|
+
data: DataItem[];
|
|
16
|
+
/** 类名 */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** style */
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
export declare const Timeline: FunctionComponent<TimelineProps>;
|
|
22
|
+
export default Timeline;
|