@para-ui/core 2.2.6 → 2.2.7-beta
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/AutoBox/index.js +203 -15
- package/AutoTips/index.d.ts +27 -27
- package/AutoTips/index.js +84 -15
- package/Breadcrumbs/index.d.ts +39 -39
- package/Breadcrumbs/index.js +227 -15
- package/Button/SplitButton.d.ts +62 -61
- package/Button/index.d.ts +71 -56
- package/Button/index.js +348 -14
- 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 +128 -14
- package/Carousel/index.d.ts +30 -30
- package/Carousel/index.js +74 -15
- package/Cascader/index.d.ts +52 -52
- package/Cascader/index.js +166 -15
- 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/Checkbox/index.js +105 -14
- package/CheckboxGroup/index.d.ts +46 -46
- package/CheckboxGroup/index.js +138 -14
- package/Collapse/collapsePanel.d.ts +30 -30
- package/Collapse/index.d.ts +57 -57
- package/Collapse/index.js +171 -15
- package/Collapse/motion.d.ts +5 -5
- package/Collapse/util.d.ts +11 -11
- package/CollapseBox/index.d.ts +27 -27
- package/CollapseBox/index.js +164 -15
- package/CollapseBox/util.d.ts +5 -5
- package/ColorPicker/index.d.ts +4 -4
- package/ColorPicker/index.js +4 -1
- 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 +1803 -14
- package/ComboSelect/interface.d.ts +140 -143
- package/ComboSelect/lang/en_US.d.ts +8 -8
- package/ComboSelect/lang/index.d.ts +17 -17
- package/ComboSelect/lang/zh_CN.d.ts +8 -8
- package/ComboSelect/utils.d.ts +12 -12
- package/Container/index.d.ts +77 -77
- package/Container/index.js +239 -15
- 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/index.js +733 -14
- 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 +57 -55
- package/Desktop/index.js +853 -14
- package/Drawer/index.d.ts +11 -11
- package/Drawer/index.js +186 -14
- 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 +25 -0
- package/Dropdown/index.js +67 -0
- package/Empty/images/index.d.ts +3 -2
- package/Empty/index.d.ts +30 -30
- package/Empty/index.js +644 -14
- 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 +384 -14
- 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 +81 -14
- 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/index.js +39 -14
- package/FunctionModal/modalContext.d.ts +15 -14
- package/GlobalContext/componentsProps.d.ts +19 -19
- package/GlobalContext/confirmLocale.d.ts +7 -7
- package/GlobalContext/index.d.ts +28 -28
- package/GlobalContext/index.js +41 -16
- package/GlobalContext/intl.d.ts +34 -34
- package/GlobalContext/useFormatMessage.d.ts +3 -3
- package/Help/index.d.ts +18 -20
- package/Help/index.js +39 -15
- package/HelperText/index.d.ts +19 -19
- package/HelperText/index.js +29 -15
- package/Hooks/useGlobalProps.d.ts +1 -1
- package/InputLang/index.d.ts +49 -49
- package/InputLang/index.js +270 -14
- package/InputNumber/index.d.ts +74 -74
- package/InputNumber/index.js +308 -14
- package/Label/index.d.ts +35 -35
- package/Label/index.js +81 -14
- package/Loading/index.d.ts +17 -17
- package/Loading/index.js +47 -15
- package/Menu/footerExpansion.d.ts +9 -9
- package/Menu/index.d.ts +10 -10
- package/Menu/index.js +1232 -14
- 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/Message/index.js +222 -15
- package/Modal/Confirm/index.d.ts +65 -66
- package/Modal/index.d.ts +90 -61
- package/Modal/index.js +443 -14
- 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 +231 -14
- package/Notification/index.d.ts +52 -52
- package/Notification/index.js +266 -15
- package/OperateBtn/index.d.ts +59 -59
- package/OperateBtn/index.js +260 -14
- 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/index.js +1171 -14
- package/PageHeader/interface.d.ts +167 -167
- package/Pagination/index.d.ts +33 -33
- package/Pagination/index.js +469 -14
- 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 +8 -12
- package/ParauiProvider/index.js +53 -15
- package/PopConfirm/index.d.ts +58 -56
- package/PopConfirm/index.js +189 -14
- 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/Popover/index.js +66 -15
- package/Progress/Line.d.ts +47 -47
- package/Progress/Steps.d.ts +17 -17
- package/Progress/index.d.ts +81 -81
- package/Progress/index.js +358 -20
- package/Progress/utils.d.ts +6 -6
- package/Querying/images/index.d.ts +3 -2
- package/Querying/index.d.ts +26 -26
- package/Querying/index.js +762 -14
- 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/Radio/index.d.ts +38 -38
- package/Radio/index.js +94 -14
- package/RadioGroup/index.d.ts +47 -47
- package/RadioGroup/index.js +128 -14
- package/Search/index.d.ts +56 -56
- package/Search/index.js +220 -14
- package/Select/index.d.ts +86 -86
- package/Select/index.js +1288 -14
- 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 +51 -14
- package/SingleBox/index.d.ts +42 -42
- package/SingleBox/index.js +194 -14
- package/Slider/index.d.ts +14 -14
- package/Slider/index.js +125 -15
- package/Slider/interface.d.ts +102 -102
- package/Split/index.d.ts +7 -7
- package/Split/index.js +134 -15
- package/Stepper/icons.d.ts +5 -5
- package/Stepper/index.d.ts +49 -39
- package/Stepper/index.js +99 -15
- package/Switch/index.d.ts +78 -78
- package/Switch/index.js +73 -14
- package/Table/index.d.ts +10 -10
- package/Table/index.js +2725 -14
- package/Table/interface.d.ts +202 -202
- package/Table/lang/en_US.d.ts +6 -6
- package/Table/lang/index.d.ts +13 -13
- package/Table/lang/zh_CN.d.ts +6 -6
- 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 +17 -17
- package/Table/tableHead.d.ts +9 -9
- package/Table/tableHeadElement/index.d.ts +15 -15
- package/Table/tableHeadInterface.d.ts +26 -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 +16 -16
- package/Tabs/index.d.ts +69 -48
- package/Tabs/index.js +218 -14
- package/Tabs/lang/en_US.d.ts +4 -0
- package/Tabs/lang/index.d.ts +9 -0
- package/Tabs/lang/zh_CN.d.ts +4 -0
- package/Tag/TagGroup.d.ts +66 -66
- package/Tag/index.d.ts +34 -34
- package/Tag/index.js +286 -14
- package/Test/index.d.ts +3 -2
- package/Test/index.js +9 -16
- package/TextField/index.d.ts +93 -93
- package/TextField/index.js +686 -14
- package/TimePicker/index.d.ts +22 -22
- package/TimePicker/index.js +77 -14
- 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/TimelineItem.d.ts +23 -0
- package/Timeline/index.d.ts +31 -22
- package/Timeline/index.js +150 -15
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -49
- package/ToggleButton/index.d.ts +49 -49
- package/ToggleButton/index.js +200 -14
- package/Tooltip/index.d.ts +11 -14
- package/Tooltip/index.js +335 -15
- package/Tooltip/interface.d.ts +21 -0
- package/Tooltip/utils.d.ts +22 -0
- package/Transfer/index.d.ts +18 -17
- package/Transfer/index.js +343 -14
- package/Transfer/lang/en_US.d.ts +6 -6
- package/Transfer/lang/index.d.ts +13 -13
- package/Transfer/lang/zh_CN.d.ts +6 -6
- 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 +35 -14
- package/Tree/interface.d.ts +209 -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 +24 -24
- package/Upload/UploadList/index.d.ts +5 -5
- package/Upload/index.d.ts +15 -15
- package/Upload/index.js +1542 -14
- 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/_verture/defineProperty-0590dc61.js +16 -0
- package/_verture/index-2c0ecd8d.js +778 -0
- package/_verture/index-342379c6.js +391 -0
- package/_verture/index-a369ca3f.js +4 -0
- package/_verture/index-e2881a53.js +16 -0
- package/_verture/index-ee85b1cd.js +1555 -0
- package/_verture/intl-336570e4.js +65 -0
- package/_verture/modalContext-e7cc8067.js +228 -0
- package/_verture/slicedToArray-d7722f4b.js +62 -0
- package/_verture/style-inject.es-300983ab.js +28 -0
- package/_verture/toConsumableArray-f8047a75.js +19 -0
- package/_verture/tslib.es6-55ed4bd2.js +38 -0
- package/_verture/typeof-498dd2b1.js +11 -0
- package/_verture/useFormatMessage-ac9d6acf.js +20 -0
- package/_verture/useGlobalProps-af9a2af6.js +12 -0
- package/index.d.ts +128 -128
- package/index.js +160 -19
- package/package.json +54 -21
- package/Popper/index.d.ts +0 -13
- package/Popper/index.js +0 -16
- package/README.md +0 -501
- package/cdn/AutoBox/index.js +0 -29
- package/cdn/AutoTips/index.js +0 -40
- package/cdn/Breadcrumbs/index.js +0 -53
- package/cdn/Button/index.js +0 -79
- package/cdn/ButtonGroup/index.js +0 -79
- package/cdn/Carousel/index.js +0 -6
- package/cdn/Cascader/index.js +0 -42
- package/cdn/Checkbox/index.js +0 -53
- package/cdn/CheckboxGroup/index.js +0 -53
- package/cdn/Collapse/index.js +0 -27
- package/cdn/CollapseBox/index.js +0 -1
- package/cdn/ColorPicker/index.js +0 -1
- package/cdn/ComboSelect/index.js +0 -438
- package/cdn/Container/index.js +0 -1
- package/cdn/DatePicker/index.js +0 -185
- package/cdn/Desktop/index.js +0 -24
- package/cdn/Drawer/index.js +0 -84
- package/cdn/Empty/index.js +0 -1
- package/cdn/Form/index.js +0 -477
- package/cdn/FormItem/index.js +0 -477
- package/cdn/FunctionModal/index.js +0 -144
- package/cdn/GlobalContext/index.js +0 -1
- package/cdn/Help/index.js +0 -53
- package/cdn/HelperText/index.js +0 -1
- package/cdn/InputLang/index.js +0 -144
- package/cdn/InputNumber/index.js +0 -118
- package/cdn/Label/index.js +0 -53
- package/cdn/Loading/index.js +0 -14
- package/cdn/Menu/index.js +0 -40
- package/cdn/Message/index.js +0 -53
- package/cdn/Modal/index.js +0 -144
- package/cdn/MultiBox/index.js +0 -131
- package/cdn/Notification/index.js +0 -66
- package/cdn/OperateBtn/index.js +0 -92
- package/cdn/PageHeader/index.js +0 -92
- package/cdn/Pagination/index.js +0 -214
- package/cdn/ParauiProvider/index.js +0 -9
- package/cdn/PopConfirm/index.js +0 -131
- package/cdn/Popover/index.js +0 -16
- package/cdn/Popper/index.js +0 -26
- package/cdn/Progress/index.js +0 -58
- package/cdn/Querying/index.js +0 -1
- package/cdn/Radio/index.js +0 -53
- package/cdn/RadioGroup/index.js +0 -53
- package/cdn/Search/index.js +0 -144
- package/cdn/Select/index.js +0 -131
- package/cdn/SelectInput/index.js +0 -131
- package/cdn/SingleBox/index.js +0 -131
- package/cdn/Slider/index.js +0 -16
- package/cdn/Split/index.js +0 -1
- package/cdn/Stepper/index.js +0 -154
- package/cdn/Switch/index.js +0 -71
- package/cdn/Table/index.js +0 -292
- package/cdn/Tabs/index.js +0 -165
- package/cdn/Tag/index.js +0 -27
- package/cdn/Test/index.js +0 -1
- package/cdn/TextField/index.js +0 -105
- package/cdn/TimePicker/index.js +0 -185
- package/cdn/Timeline/index.js +0 -16
- package/cdn/ToggleButton/index.js +0 -79
- package/cdn/Tooltip/index.js +0 -40
- package/cdn/Transfer/index.js +0 -170
- package/cdn/Tree/index.js +0 -170
- package/cdn/Upload/index.js +0 -252
- package/style.css +0 -72
package/Search/index.d.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/11 16:10
|
|
4
|
-
* @description 搜索框
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import './index.scss';
|
|
8
|
-
export interface SearchProps {
|
|
9
|
-
className?: string;
|
|
10
|
-
/** style */
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
/** 尺寸 小/中/大 */
|
|
13
|
-
size?: 'small' | 'medium' | 'large';
|
|
14
|
-
/** 输入框placeholder */
|
|
15
|
-
placeholder?: ReactNode;
|
|
16
|
-
/** 默认值 不受控 */
|
|
17
|
-
defaultValue?: string;
|
|
18
|
-
/** 输入框值 */
|
|
19
|
-
value?: string;
|
|
20
|
-
/** 是否显示按钮 */
|
|
21
|
-
showBtn?: boolean;
|
|
22
|
-
/** 按钮位置 分离/内置 */
|
|
23
|
-
btnType?: 'outside' | 'inside';
|
|
24
|
-
/** 按钮文本 */
|
|
25
|
-
btnText?: ReactNode;
|
|
26
|
-
/** 按钮图标 */
|
|
27
|
-
btnIcon?: ReactNode;
|
|
28
|
-
/** 输入框右侧图标 */
|
|
29
|
-
rightIcon?: ReactNode;
|
|
30
|
-
/** 一直存在右侧图标 */
|
|
31
|
-
rightIconExist?: boolean;
|
|
32
|
-
/** 是否显示输入框右侧图标 */
|
|
33
|
-
showRightIcon?: boolean;
|
|
34
|
-
/** 是否显示清空按钮 */
|
|
35
|
-
allowClear?: boolean;
|
|
36
|
-
/** 改变值 */
|
|
37
|
-
onChange?: (val: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
38
|
-
/** 失去焦点 */
|
|
39
|
-
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
40
|
-
/** 得到焦点 */
|
|
41
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
42
|
-
/** 键盘按下 */
|
|
43
|
-
onKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
44
|
-
/** 键盘抬起 */
|
|
45
|
-
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
46
|
-
/** 点击按钮 */
|
|
47
|
-
onClickBtn?: (val: string) => void;
|
|
48
|
-
/** 点击输入框右侧按钮 */
|
|
49
|
-
onClickRightIcon?: (val: string) => void;
|
|
50
|
-
/** 点击清空内容回调 */
|
|
51
|
-
onClear?: () => void;
|
|
52
|
-
/** 回车事件 */
|
|
53
|
-
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
54
|
-
}
|
|
55
|
-
export declare const Search: FunctionComponent<SearchProps>;
|
|
56
|
-
export default Search;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/11 16:10
|
|
4
|
+
* @description 搜索框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import './index.scss';
|
|
8
|
+
export interface SearchProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
/** style */
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
/** 尺寸 小/中/大 */
|
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
|
+
/** 输入框placeholder */
|
|
15
|
+
placeholder?: ReactNode;
|
|
16
|
+
/** 默认值 不受控 */
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
/** 输入框值 */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** 是否显示按钮 */
|
|
21
|
+
showBtn?: boolean;
|
|
22
|
+
/** 按钮位置 分离/内置 */
|
|
23
|
+
btnType?: 'outside' | 'inside';
|
|
24
|
+
/** 按钮文本 */
|
|
25
|
+
btnText?: ReactNode;
|
|
26
|
+
/** 按钮图标 */
|
|
27
|
+
btnIcon?: ReactNode;
|
|
28
|
+
/** 输入框右侧图标 */
|
|
29
|
+
rightIcon?: ReactNode;
|
|
30
|
+
/** 一直存在右侧图标 */
|
|
31
|
+
rightIconExist?: boolean;
|
|
32
|
+
/** 是否显示输入框右侧图标 */
|
|
33
|
+
showRightIcon?: boolean;
|
|
34
|
+
/** 是否显示清空按钮 */
|
|
35
|
+
allowClear?: boolean;
|
|
36
|
+
/** 改变值 */
|
|
37
|
+
onChange?: (val: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
38
|
+
/** 失去焦点 */
|
|
39
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
40
|
+
/** 得到焦点 */
|
|
41
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
42
|
+
/** 键盘按下 */
|
|
43
|
+
onKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
44
|
+
/** 键盘抬起 */
|
|
45
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
46
|
+
/** 点击按钮 */
|
|
47
|
+
onClickBtn?: (val: string) => void;
|
|
48
|
+
/** 点击输入框右侧按钮 */
|
|
49
|
+
onClickRightIcon?: (val: string) => void;
|
|
50
|
+
/** 点击清空内容回调 */
|
|
51
|
+
onClear?: () => void;
|
|
52
|
+
/** 回车事件 */
|
|
53
|
+
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
54
|
+
}
|
|
55
|
+
export declare const Search: FunctionComponent<SearchProps>;
|
|
56
|
+
export default Search;
|
package/Search/index.js
CHANGED
|
@@ -1,14 +1,220 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help"),require("@paraview/lib"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/LoadingF"),require("@para-ui/core/GlobalContext"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","clsx","@para-ui/icons/Help","@paraview/lib","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/CloseCircle","@para-ui/icons/LoadingF","@para-ui/core/GlobalContext","@para-ui/icons/Forbid","@para-ui/icons/Down","@para-ui/icons/Search"],e):"object"==typeof exports?exports.ParaUI=e(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help"),require("@paraview/lib"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/LoadingF"),require("@para-ui/core/GlobalContext"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search")):t.ParaUI=e(t.react,t["@material-ui/core"],t.clsx,t["@para-ui/icons/Help"],t["@paraview/lib"],t["@para-ui/icons/PreviewClose"],t["@para-ui/icons/PreviewOpen"],t["@para-ui/icons/CloseCircle"],t["@para-ui/icons/LoadingF"],t["@para-ui/core/GlobalContext"],t["@para-ui/icons/Forbid"],t["@para-ui/icons/Down"],t["@para-ui/icons/Search"])}(self,(function(t,e,i,n,o,r,a,l,c,u,s,d,p){return function(){var f={2565:function(t,e,i){(e=i(3645)(!1)).push([t.id,".paraui-auto-tips{max-width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-auto-tips>.auto-tips-content{display:inline;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-auto-tips-tooltip>div{max-height:calc(100vh - 25px);overflow:auto}",""]),t.exports=e},8313:function(t,e,i){(e=i(3645)(!1)).push([t.id,'@keyframes loadingSpin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.paraui-button{min-width:auto;padding:0 16px;line-height:0;text-transform:none;border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;white-space:nowrap}.paraui-button-label{height:100%}.paraui-button-loading{pointer-events:none}.paraui-button-contained{color:#fff;background-color:#3666d6;box-shadow:none}.paraui-button-contained:hover{background-color:rgba(54,102,214,.8);box-shadow:none}.paraui-button-contained[disabled]{color:rgba(46,55,67,.4);background-color:rgba(171,176,185,.12);border:1px solid rgba(171,176,185,.4);box-shadow:none}.paraui-button-contained[disabled]:hover{background-color:rgba(171,176,185,.12)}.paraui-button-contained .btn-icon{display:inline-flex;color:inherit}.paraui-button-contained .btn-icon svg{color:inherit;font-size:16px}.paraui-button-contained .btn-icon.start-icon{margin-left:3px}.paraui-button-contained .btn-icon.end-icon{margin-right:3px}.paraui-button-contained .btn-icon.loading-icon{margin-left:3px;animation:loadingSpin 1s infinite linear}.paraui-button-contained.paraui-button-dangerous{background-color:#eb6054}.paraui-button-contained.paraui-button-dangerous:hover{background-color:rgba(235,96,84,.8)}.paraui-button-outlined{color:rgba(46,55,67,.7);background-color:#fff;border:1px solid rgba(171,176,185,.4);box-shadow:none}.paraui-button-outlined:hover{color:#3666d6;border-color:rgba(54,102,214,.2);background-color:#fff;box-shadow:none}.paraui-button-outlined[disabled]{color:rgba(46,55,67,.4);background-color:rgba(171,176,185,.12);border:1px solid rgba(171,176,185,.4);box-shadow:none}.paraui-button-outlined[disabled]:hover{background-color:rgba(171,176,185,.12)}.paraui-button-outlined .btn-icon{display:inline-flex;color:inherit}.paraui-button-outlined .btn-icon svg{color:inherit;font-size:16px}.paraui-button-outlined .btn-icon.start-icon{margin-left:3px}.paraui-button-outlined .btn-icon.end-icon{margin-right:3px}.paraui-button-outlined .btn-icon.loading-icon{margin-left:3px;animation:loadingSpin 1s infinite linear}.paraui-button-outlined.paraui-button-dangerous{color:#eb6054;border-color:#eb6054}.paraui-button-outlined.paraui-button-dangerous:hover{color:rgba(235,96,84,.8);border-color:rgba(235,96,84,.8)}.paraui-button-text{color:rgba(46,55,67,.7);background-color:#fff;border:1px solid rgba(171,176,185,.4);box-shadow:none;color:#3666d6;background-color:rgba(0,0,0,0);border:none}.paraui-button-text:hover{color:rgba(54,102,214,.8);background-color:rgba(0,0,0,0);box-shadow:none}.paraui-button-text[disabled]{color:rgba(46,55,67,.4);background-color:rgba(0,0,0,0);border:none}.paraui-button-text[disabled]:hover{background-color:rgba(0,0,0,0)}.paraui-button-text .btn-icon{display:inline-flex;color:inherit}.paraui-button-text .btn-icon svg{color:inherit;font-size:16px}.paraui-button-text .btn-icon.start-icon{margin-left:3px}.paraui-button-text .btn-icon.end-icon{margin-right:3px}.paraui-button-text .btn-icon.loading-icon{margin-left:3px;animation:loadingSpin 1s infinite linear}.paraui-button-text.paraui-button-dangerous{color:#eb6054}.paraui-button-text.paraui-button-dangerous:hover{color:rgba(235,96,84,.8)}.paraui-button-large{height:36px}.paraui-button-medium{height:32px}.paraui-button-small{height:28px}.paraui-button--disabled{display:inline-block}.paraui-icon-button{padding:0;border-radius:4px}.paraui-icon-button-loading{pointer-events:none}.paraui-icon-button-loading .loading-icon{display:inline-flex;animation:loadingSpin 1s infinite linear}.paraui-icon-button-contained{color:#fff;background-color:#3666d6;box-shadow:none}.paraui-icon-button-contained:hover{background-color:rgba(54,102,214,.8);box-shadow:none}.paraui-icon-button-contained[disabled]{color:rgba(46,55,67,.4);background-color:rgba(171,176,185,.12);border:1px solid rgba(171,176,185,.4);box-shadow:none}.paraui-icon-button-contained[disabled]:hover{background-color:rgba(171,176,185,.12)}.paraui-icon-button-contained svg{color:inherit;font-size:16px}.paraui-icon-button-contained.paraui-icon-button-dangerous{background-color:#eb6054}.paraui-icon-button-contained.paraui-icon-button-dangerous:hover{background-color:rgba(235,96,84,.8)}.paraui-icon-button-outlined{color:rgba(46,55,67,.7);background-color:#fff;border:1px solid rgba(171,176,185,.4);box-shadow:none}.paraui-icon-button-outlined:hover{color:#3666d6;border-color:rgba(54,102,214,.2);box-shadow:none;background-color:#fff}.paraui-icon-button-outlined[disabled]{color:rgba(46,55,67,.4);background-color:rgba(171,176,185,.12);border:1px solid rgba(171,176,185,.4);box-shadow:none}.paraui-icon-button-outlined[disabled]:hover{background-color:rgba(171,176,185,.12)}.paraui-icon-button-outlined svg{color:inherit;font-size:16px}.paraui-icon-button-outlined.paraui-icon-button-dangerous{color:#eb6054;border-color:#eb6054}.paraui-icon-button-outlined.paraui-icon-button-dangerous:hover{color:rgba(235,96,84,.8);border-color:rgba(235,96,84,.8)}.paraui-icon-button-text{color:#3666d6}.paraui-icon-button-text:hover{color:rgba(54,102,214,.8);background-color:rgba(0,0,0,0)}.paraui-icon-button-text[disabled]{color:rgba(46,55,67,.4)}.paraui-icon-button-text[disabled]:hover{background-color:rgba(0,0,0,0)}.paraui-icon-button-text svg{color:inherit}.paraui-icon-button-text.paraui-icon-button-dangerous{color:#eb6054}.paraui-icon-button-text.paraui-icon-button-dangerous:hover{color:rgba(235,96,84,.8)}.paraui-icon-button-text.paraui-icon-button-large{width:auto;height:auto}.paraui-icon-button-text.paraui-icon-button-large svg{font-size:28px}.paraui-icon-button-text.paraui-icon-button-medium{width:auto;height:auto}.paraui-icon-button-text.paraui-icon-button-medium svg{font-size:24px}.paraui-icon-button-text.paraui-icon-button-small{width:auto;height:auto}.paraui-icon-button-text.paraui-icon-button-small svg{font-size:20px}.paraui-icon-button-large{width:36px;height:36px}.paraui-icon-button-medium{width:32px;height:32px}.paraui-icon-button-small{width:28px;height:28px}.paraui-button-split{display:inline-block}.paraui-button-split .paraui-button-split--active{color:#3666d6;box-shadow:none;background-color:#fff}.paraui-button-split-list{padding:8px 0;margin:8px 0;border-radius:4px;box-shadow:0px 2px 8px 0px rgba(171,176,185,.4);background-color:#fff}.paraui-button-split-list ul .split-li{min-width:140px;padding:11px 12px;color:#2e3743;font-size:14px;line-height:1;cursor:pointer;transition:background-color .3s,color .3s}.paraui-button-split-list ul .split-li:hover{background-color:rgba(171,176,185,.12)}.paraui-button-split-list ul .split-li.split-li--active{color:#3666d6}.paraui-button-split-list ul .split-li.split-li--active:hover{background-color:rgba(171,176,185,.12)}.paraui-button-split-list ul .split-li.split-li--disabled{color:rgba(46,55,67,.4);cursor:not-allowed}.paraui-button-split-list ul .split-li.split-li--disabled:hover{background-color:#fff}.paraui-button-split-list ul .split-li-group:not(:first-child){position:relative;margin-top:16px}.paraui-button-split-list ul .split-li-group:not(:first-child):before{content:"";position:absolute;top:-8px;left:8px;right:8px;border-top:1px solid rgba(171,176,185,.2)}',""]),t.exports=e},7381:function(t,e,i){(e=i(3645)(!1)).push([t.id,".paraui-help{display:inline-block;font-size:16px;color:rgba(46,55,67,.7)}.paraui-help:hover{color:#3666d6}.paraui-help .paraui-icon{font-size:inherit;color:inherit}",""]),t.exports=e},9916:function(t,e,i){(e=i(3645)(!1)).push([t.id,".paraui-helper-text{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:12px;font-weight:400;padding-left:12px;line-height:20px;color:rgba(46,55,67,.7)}.paraui-helper-text.paraui-helper-text-error{color:#eb6054}",""]),t.exports=e},4928:function(t,e,i){(e=i(3645)(!1)).push([t.id,".paraui-label{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;color:rgba(46,55,67,.7);margin-bottom:8px;display:inline-block;line-height:1.43;word-break:break-all}.paraui-label>.paraui-label-required{margin-left:2px;color:#eb6054}.paraui-label>.paraui-help{vertical-align:top;margin-left:4px}.paraui-label>.paraui-help svg{color:rgba(46,55,67,.4);vertical-align:top;position:relative;top:2px}.paraui-label.paraui-label-line.paraui-label-tooltip{border-bottom:1px dashed rgba(46,55,67,.4);padding-bottom:2px}",""]),t.exports=e},5714:function(t,e,i){(e=i(3645)(!1)).push([t.id,"@keyframes rotateLoading{0%{transformOrigin:50% 50%}100%{transform:rotate(360deg)}}.paraui-loading{position:absolute;left:0;top:0;width:100%;height:100%}.paraui-loading .paraui-loading-mask{position:absolute;width:100%;height:100%;background-color:#fff;z-index:1}.paraui-loading .paraui-loading-box{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:2}.paraui-loading .paraui-loading-box>svg{transition:all .3s ease-in-out;animation:rotateLoading 1s infinite linear;font-size:20px}",""]),t.exports=e},4447:function(t,e,i){(e=i(3645)(!1)).push([t.id,".paraui-search{display:flex;width:100%}.paraui-search>.paraui-text-field{padding:0}.paraui-search>.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon{display:none;margin-right:8px}.paraui-search>.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon>svg{font-size:16px}.paraui-search>.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon:hover>svg{color:rgba(54,102,214,.8)}.paraui-search>.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon{margin-right:8px}.paraui-search>.paraui-text-field>.text-field-content>.text-field-content-after{padding:0;background-color:#fff}.paraui-search>.paraui-text-field>.text-field-content>.text-field-content-after .paraui-button{border:0}.paraui-search>.paraui-text-field>.paraui-helper-text{display:none}.paraui-search.paraui-search-right-icon-exist>.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon{display:flex}.paraui-search.paraui-search-value>.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon{display:flex}.paraui-search .paraui-button>span{white-space:nowrap}.paraui-search .paraui-button>span>span{margin-right:0}.paraui-search .paraui-button>span>span>span>svg{font-size:20px}.paraui-search.search-outside>.paraui-button{margin-left:16px}.paraui-search.search-inside .paraui-button{padding:0 8px}.paraui-search.search-small>.paraui-text-field>.text-field-content>.text-field-content-after .paraui-button{height:26px}.paraui-search.search-small .paraui-button>span>span>span>svg{font-size:16px}.paraui-search.search-small.search-btntext .paraui-button>span>span{margin-right:4px}.paraui-search.search-small.search-btntext .paraui-button>span>span>span>svg{font-size:16px}.paraui-search.search-medium>.paraui-text-field>.text-field-content>.text-field-content-after .paraui-button{height:30px}.paraui-search.search-medium .paraui-button>span>span>span>svg{font-size:18px}.paraui-search.search-medium.search-btntext .paraui-button>span>span{margin-right:4px}.paraui-search.search-medium.search-btntext .paraui-button>span>span>span>svg{font-size:16px}.paraui-search.search-large>.paraui-text-field>.text-field-content>.text-field-content-after .paraui-button{height:34px}.paraui-search.search-large .paraui-button>span>span>span>svg{font-size:20px}.paraui-search.search-large.search-btntext .paraui-button>span>span{margin-right:4px}.paraui-search.search-large.search-btntext .paraui-button>span>span>span>svg{font-size:16px}",""]),t.exports=e},3637:function(t,e,i){(e=i(3645)(!1)).push([t.id,".paraui-text-field{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;display:inline-block;width:100%}.paraui-text-field>.text-field-content{border:1px solid;border-radius:4px;border-color:rgba(171,176,185,.4);display:flex;width:100%;position:relative;background-color:#fff}.paraui-text-field>.text-field-content:hover{border-color:#3666d6}.paraui-text-field>.text-field-content>.text-field-content-before{color:#2e3743;padding:0 12px;border-right:1px solid rgba(171,176,185,.4);background-color:rgba(171,176,185,.12);border-bottom-left-radius:4px;border-top-left-radius:4px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-before svg{font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within{position:relative;display:flex;flex-grow:1}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon{display:flex;height:100%;align-items:center;margin-right:12px;cursor:pointer}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon svg{color:rgba(46,55,67,.7);font-size:16px}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon:hover svg{color:rgba(54,102,214,.8)}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon{display:flex;height:100%;align-items:center;margin-right:12px;cursor:pointer;color:rgba(46,55,67,.7);position:relative;z-index:1}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon.right-icon-password:hover svg{color:rgba(54,102,214,.8)}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon svg{color:rgba(46,55,67,.7);font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within>.length-limit{display:flex;height:100%;align-items:center;margin-right:12px;color:rgba(46,55,67,.7)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input{width:100%;line-height:0;position:relative}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-outer-spin-button,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-inner-spin-button{-webkit-appearance:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input[type=number]{-moz-appearance:textfield}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{width:100%;height:100%}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{width:100% !important;padding:12px;resize:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{font-size:14px;color:#2e3743;border:0;border-radius:4px;background:rgba(0,0,0,0)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-clear,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-clear{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-reveal,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-reveal{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input:disabled,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea:disabled{background-color:rgba(0,0,0,0)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{width:100%;position:absolute;left:0;top:0;height:100%;padding:0 12px;color:rgba(46,55,67,.4);cursor:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder>.text-field-required{margin-left:2px;color:#eb6054}.paraui-text-field>.text-field-content>.text-field-content-after{color:#2e3743;padding:0 12px;border-left:1px solid rgba(171,176,185,.4);background-color:rgba(171,176,185,.12);border-bottom-right-radius:4px;border-top-right-radius:4px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-after svg{font-size:20px}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.clean-up-icon{display:none}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.length-limit{position:absolute;height:22px;bottom:0;border-radius:4px;width:calc(100% - 12px);background:#fff;justify-content:flex-end;padding-bottom:8px;margin-right:0}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{padding-top:12px;line-height:1;height:calc(100% - 24px)}.paraui-text-field.text-field-disabled>.text-field-content{background-color:rgba(171,176,185,.12)}.paraui-text-field.text-field-disabled>.text-field-content:hover{border-color:rgba(171,176,185,.4)}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-before{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-after{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-disabled.text-field-multiline>.text-field-content .text-field-content-within>.length-limit{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-error>.text-field-content{border-color:#eb6054 !important}.paraui-text-field.text-field-error>.text-field-content:hover{border-color:#eb6054}.paraui-text-field.text-field-limit>.text-field-content{border-color:#eb6054 !important}.paraui-text-field.text-field-limit>.text-field-content:hover{border-color:#eb6054 !important}.paraui-text-field.text-field-limit-length>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{padding-bottom:25px}.paraui-text-field.text-field-focus>.text-field-content{border-color:#3666d6}.paraui-text-field.text-field-small>.text-field-content{height:28px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-before{line-height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:6px 12px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:26px}.paraui-text-field.text-field-small>.text-field-content .text-field-content-after{line-height:26px}.paraui-text-field.text-field-medium>.text-field-content{height:32px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-before{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:8px 12px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content .text-field-content-after{line-height:30px}.paraui-text-field.text-field-large>.text-field-content{height:36px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-before{line-height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:10px 12px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:34px}.paraui-text-field.text-field-large>.text-field-content .text-field-content-after{line-height:34px}.paraui-text-field.text-field-resize>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{resize:both}.paraui-text-field-select.paraui-tooltip>div{max-width:none;padding:0;background-color:#fff;box-shadow:0px 2px 8px 0px rgba(171,176,185,.4);border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400}.paraui-text-field-select.paraui-tooltip>div>span{color:#fff}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content{max-height:300px;overflow:auto}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item{display:flex;cursor:pointer;color:#2e3743;padding:0 12px}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item:hover{background-color:rgba(171,176,185,.12);color:#3666d6}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item.text-field-select-content-item-keydown{background-color:rgba(171,176,185,.12);color:#3666d6}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content.text-field-select-content-loading{height:100px;position:relative;overflow:hidden}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-small>div .text-field-select-content>.text-field-select-content-item{line-height:28px}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-medium>div .text-field-select-content>.text-field-select-content-item{line-height:32px}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-large>div .text-field-select-content>.text-field-select-content-item{line-height:36px}.paraui-text-field-select.paraui-text-field-select-data.paraui-tooltip{padding:8px 0}",""]),t.exports=e},9929:function(t,e,i){(e=i(3645)(!1)).push([t.id,".paraui-tooltip>div{padding-left:12px;padding-right:12px;font-size:14px;font-weight:400;color:#fff;background-color:rgba(46,55,67,.7)}.paraui-tooltip-left-right>div{margin:0 8px}.paraui-tooltip-top-bottom>div{margin:8px 0}",""]),t.exports=e},3645:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var o=(a=n,l=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(c," */")),r=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[i].concat(r).concat([o]).join("\n")}var a,l,c;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&o[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),e.push(c))}},e}},7418:function(t){"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/i(7418);var n=i(8156),o=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),e.Fragment=r("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(t,e,i){var n,r={},u=null,s=null;for(n in void 0!==i&&(u=""+i),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(s=e.ref),e)l.call(e,n)&&!c.hasOwnProperty(n)&&(r[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===r[n]&&(r[n]=e[n]);return{$$typeof:o,type:t,key:u,ref:s,props:r,_owner:a.current}}e.jsx=u,e.jsxs=u},5893:function(t,e,i){"use strict";t.exports=i(5251)},9271:function(t,e,i){var n=i(3379),o=i(2565);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},5822:function(t,e,i){var n=i(3379),o=i(8313);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},2113:function(t,e,i){var n=i(3379),o=i(7381);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},3936:function(t,e,i){var n=i(3379),o=i(9916);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},9663:function(t,e,i){var n=i(3379),o=i(4928);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},3492:function(t,e,i){var n=i(3379),o=i(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},9750:function(t,e,i){var n=i(3379),o=i(4447);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},6202:function(t,e,i){var n=i(3379),o=i(3637);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},2310:function(t,e,i){var n=i(3379),o=i(9929);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);t.exports=o.locals||{}},3379:function(t,e,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),a=[];function l(t){for(var e=-1,i=0;i<a.length;i++)if(a[i].identifier===t){e=i;break}return e}function c(t,e){for(var i={},n=[],o=0;o<t.length;o++){var r=t[o],c=e.base?r[0]+e.base:r[0],u=i[c]||0,s="".concat(c," ").concat(u);i[c]=u+1;var d=l(s),p={css:r[1],media:r[2],sourceMap:r[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:s,updater:h(p,e),references:1}),n.push(s)}return n}function u(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var s,d=(s=[],function(t,e){return s[t]=e,s.filter(Boolean).join("\n")});function p(t,e,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=d(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function f(t,e,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var x=null,b=0;function h(t,e){var i,n,o;if(e.singleton){var r=b++;i=x||(x=u(e)),n=p.bind(null,i,r,!1),o=p.bind(null,i,r,!0)}else i=u(e),n=f.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var i=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<i.length;n++){var o=l(i[n]);a[o].references--}for(var r=c(t,e),u=0;u<i.length;u++){var s=l(i[u]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}i=r}}}},7839:function(t,e,i){"use strict";var n=i(5893),o=i(8156),r=i(7371),a=(i(9271),function(){return a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)});e.default=function(t){var e=t.children,i=t.arrow,l=void 0!==i&&i,c=t.placement,u=void 0===c?"bottom-start":c,s=t.tips,d=void 0===s?"":s,p=t.className,f=void 0===p?"":p,x=t.beyondText,b=void 0===x||x,h=t.interactive,g=void 0===h||h,v=t.style,m=(0,o.useRef)(),w=(0,o.useState)(""),y=w[0],j=w[1];(0,o.useEffect)((function(){j(d)}),[d]);var S;return(0,n.jsx)("div",a({ref:m,className:(S="paraui-auto-tips",f&&(S+=" "+f),S),onMouseOver:function(){var t="";m.current&&m.current.scrollWidth>m.current.offsetWidth&&(t=d||(b?m.current.innerText:e)),j(t)},style:v},{children:(0,n.jsx)(r.default,a({arrow:l,title:y,placement:u,interactive:g,boundariesElement:"viewport",className:"paraui-auto-tips-tooltip"},{children:(0,n.jsx)("div",a({className:"auto-tips-content"},{children:e}))}))}))}},7896:function(t,e,i){"use strict";i.d(e,{default:function(){return y}});var n=i(5893),o=i(8156),r=i(670),a=i(5744),l=i.n(a),c=i(2788),u=i.n(c),s=i(3835),d=i.n(s),p=i(7371),f=i(2396),x=i.n(f),b=i(3054),h={zh:{moreActions:"更多操作"},en:{moreActions:"More actions"}},g=function(){return g=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},g.apply(this,arguments)};i(5822);var v=function(){return v=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},v.apply(this,arguments)},m=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i},w=function(t){var e=t.variant,i=void 0===e?"contained":e,a=t.size,c=void 0===a?"large":a,s=t.className,f=t.disabled,x=void 0!==f&&f,b=t.children,h=t.startIcon,g=t.endIcon,w=t.loading,y=void 0!==w&&w,j=t.toolTipTitle,S=void 0===j?"":j,k=t.TooltipProps,O=t.danger,C=void 0!==O&&O,N=m(t,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","TooltipProps","danger"]),P=(0,o.useState)(!1),z=P[0],T=P[1],M=function(t){if(!z)return"start"===t&&h?(0,n.jsx)("span",v({className:l()("btn-icon","start-icon")},{children:h})):"end"===t&&g?(0,n.jsx)("span",v({className:l()("btn-icon","end-icon")},{children:g})):null;if("object"==typeof y){var e=y.delay||0;setTimeout((function(){return T(!1)}),e)}return"start"===t?(0,n.jsx)("span",v({className:"btn-icon loading-icon"},{children:(0,n.jsx)(u(),{})})):null},E=(0,n.jsx)(r.Button,v({},N,{color:"default",variant:"contained",disabled:x,disableRipple:!0,disableElevation:!0,className:l()("paraui-button",s,"paraui-button-".concat(i),"paraui-button-".concat(c),z&&"paraui-button-loading",C&&!x&&"paraui-button-dangerous"),classes:{label:"paraui-button-label"},startIcon:M("start"),endIcon:M("end")},{children:b}));return(0,o.useEffect)((function(){T(!!y)}),[y]),x&&S?(0,n.jsx)(p.default,v({},k,{title:function(){if(x&&S){return(0,n.jsxs)("span",{children:[(0,n.jsx)(d(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}}),S]})}return S}()},{children:(0,n.jsx)("span",v({className:"paraui-button--disabled"},{children:E}))})):E};w.IconButton=function(t){var e=t.variant,i=void 0===e?"contained":e,a=t.size,c=void 0===a?"large":a,s=t.toolTipTitle,f=void 0===s?"":s,x=t.children,b=t.className,h=t.disabled,g=void 0!==h&&h,w=t.loading,y=void 0!==w&&w,j=t.TooltipProps,S=t.danger,k=void 0!==S&&S,O=m(t,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),C=(0,o.useState)(!1),N=C[0],P=C[1],z=(0,n.jsx)(r.IconButton,v({},O,{disabled:g,disableRipple:!0,className:l()("paraui-icon-button",b,"paraui-icon-button-".concat(i),"paraui-icon-button-".concat(c),N&&"paraui-icon-button-loading",k&&!g&&"paraui-icon-button-dangerous")},{children:function(){if(!N)return x;if("object"==typeof y){var t=y.delay||0;setTimeout((function(){return P(!1)}),t)}return(0,n.jsx)("span",v({className:"loading-icon"},{children:(0,n.jsx)(u(),{})}))}()}));return(0,o.useEffect)((function(){P(!!y)}),[y]),f?(0,n.jsx)(p.default,v({},j,{title:function(){if(g&&f){return(0,n.jsxs)("span",{children:[(0,n.jsx)(d(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}}),f]})}return f}()},{children:g?(0,n.jsx)("span",v({className:"paraui-button--disabled"},{children:z})):z}),+N):z},w.SplitButton=function(t){var e=t.buttonText,i=t.options,a=void 0===i?[]:i,c=t.className,u=t.popperClassName,s=t.style,d=t.popperStyle,p=t.disabled,f=void 0!==p&&p,v=t.onClick,m=t.optionRender,w=t.placement,j=void 0===w?"bottom-end":w,S=t.buttonProps,k=t.iconButton,O=void 0!==k&&k,C=(0,b.Z)("Button",h),N=(0,o.useState)(!1),P=N[0],z=N[1],T=(0,o.useRef)(null),M=(0,o.useRef)(),E=(0,o.useRef)(),I=(0,o.useState)(),q=I[0],F=I[1],_=function(t,e,i){var n;t.disabled?i.stopPropagation():(F(e),z(!1),null===(n=M.current)||void 0===n||n.classList.remove("paraui-button-split--active"),null==v||v(t,i))},L=function(t){t.stopPropagation(),B();var e=t.currentTarget;E.current=window.setTimeout((function(){M.current=e,e.classList.add("paraui-button-split--active"),z(!0)}),150)},B=function(){E.current&&(clearTimeout(E.current),E.current=null)},H=function(t){var e,i;(null===(e=T.current)||void 0===e?void 0:e.contains(t.target))||(z(!1),null===(i=M.current)||void 0===i||i.classList.remove("paraui-button-split--active"))},R=function(){return(0,n.jsx)("div",g({className:"paraui-button-split-list"},{children:(0,n.jsx)("ul",{children:a.map((function(t,e){return Array.isArray(t)?function(t,e){return(0,n.jsx)("li",g({className:"split-li-group"},{children:t.map((function(t,i){var o="".concat(e,"-").concat(i);return(0,n.jsx)("div",g({className:l()("split-li",o===q&&"split-li--active",t.disabled&&"split-li--disabled"),onClick:function(e){return _(t,o,e)}},{children:(null==m?void 0:m(t))||t.label}),o)}))}),e)}(t,e):(0,n.jsx)("li",g({className:l()("split-li",e===q&&"split-li--active",t.disabled&&"split-li--disabled"),onClick:function(i){return _(t,e,i)}},{children:(null==m?void 0:m(t))||t.label}),e)}))})}))};return(0,n.jsxs)("div",g({className:l()("paraui-button-split",c),ref:T,style:s,onMouseLeave:function(t){var e;t.stopPropagation(),B(),null===(e=t.currentTarget.firstElementChild)||void 0===e||e.classList.remove("paraui-button-split--active"),z(!1)}},{children:[O?(0,n.jsx)(y.IconButton,g({variant:"text",size:"small",disabled:f},S,{onMouseEnter:L},{children:null!=e?e:C({id:"moreActions"})})):(0,n.jsx)(y,g({variant:"outlined",size:"large",startIcon:(0,n.jsx)(x(),{}),disabled:f},S,{onMouseEnter:L},{children:null!=e?e:C({id:"moreActions"})})),(0,n.jsx)(r.Popper,g({open:P,anchorEl:T.current,transition:!0,placement:j,style:g({zIndex:1500},d),className:l()("paraui-button-split-popper",u)},{children:function(t){var e=t.TransitionProps;t.placement;return(0,n.jsx)(r.Grow,g({},e,{children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(r.ClickAwayListener,g({onClickAway:H},{children:R()}))})}))}}))]}))};var y=w},3054:function(t,e,i){"use strict";var n=i(8156),o=i.n(n),r=i(5395),a=i.n(r);e.Z=function(t,e){var i=o().useContext(a()).intlFormat;return e.zh_CN=e.zh,e.en_US=e.en,i&&i(t,e)}},3566:function(t,e,i){"use strict";var n=i(5893),o=i(7371),r=i(8076),a=i.n(r),l=i(5744),c=i.n(l),u=(i(2113),function(){return u=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},u.apply(this,arguments)}),s=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i};e.default=function(t){var e=t.title,i=void 0===e?"":e,r=t.children,l=t.arrow,d=void 0===l||l,p=t.interactive,f=void 0===p||p,x=t.className,b=t.placement,h=void 0===b?"top-start":b,g=s(t,["title","children","arrow","interactive","className","placement"]);return(0,n.jsx)(o.default,u({title:i,arrow:d,interactive:f,placement:h},g,{children:(0,n.jsx)("span",u({className:c()("paraui-help",x)},{children:r||(0,n.jsx)(a(),{})}))}))}},4254:function(t,e,i){"use strict";var n=i(5893),o=(i(3936),function(){return o=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)});e.default=function(t){var e,i=t.className,r=t.style,a=t.error,l=void 0!==a&&a,c=t.helperText;return(0,n.jsx)("p",o({className:(e="paraui-helper-text",i&&(e+=" "+i),l&&(e+=" paraui-helper-text-error"),e),style:r},{children:c}))}},6010:function(t,e,i){"use strict";i.d(e,{Z:function(){return c}});var n=i(8156),o=i.n(n),r=i(5395),a=i.n(r),l=function(){return l=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},l.apply(this,arguments)};function c(t,e){var i=o().useContext(a()).componentsProps,n=i&&i[e];return l(l({},n),t)}},8767:function(t,e,i){"use strict";var n=i(5893),o=i(3566),r=(i(9663),function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)});e.default=function(t){var e=t.className,i=t.style,a=t.label,l=t.labelSign,c=t.required,u=void 0!==c&&c,s=t.tooltip,d=t.tooltipType,p=void 0===d?"icon":d,f=t.placement,x=t.arrow,b=t.tooltipIcon,h=function(){var t="paraui-label";return p&&(t+=" paraui-label-"+p),s&&(t+=" paraui-label-tooltip"),e&&(t+=" "+e),t};return(0,n.jsxs)(n.Fragment,{children:["icon"===p&&(0,n.jsxs)("label",r({className:h(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:a}),u&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),l&&(0,n.jsx)("span",{children:l}),s&&(0,n.jsx)(o.default,r({title:s,placement:f,arrow:x},{children:b}))]})),"line"===p&&(0,n.jsx)(o.default,r({title:s||"",placement:f,arrow:x},{children:(0,n.jsxs)("label",r({className:h(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:a}),u&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),l&&(0,n.jsx)("span",{children:l})]}))}))]})}},7502:function(t,e,i){"use strict";var n=i(5893),o=i(8156),r=i(2788),a=i.n(r),l=(i(3492),function(){return l=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},l.apply(this,arguments)});e.default=function(t){var e=t.className,i=t.style,r=t.opacity,c=void 0===r?.7:r,u=(0,o.useRef)(null);(0,o.useEffect)((function(){u&&u.current&&u.current.parentNode&&(u.current.parentNode.style.position||(u.current.parentNode.style.position="relative"))}),[]);var s;return(0,n.jsxs)("div",l({className:(s="paraui-loading",e&&(s+=" "+e),s),style:i,ref:u},{children:[(0,n.jsx)("div",l({className:"paraui-loading-box"},{children:(0,n.jsx)(a(),{})})),(0,n.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7320:function(t,e,i){"use strict";var n=i(5893),o=i(8156),r=i(8767),a=i(8543),l=i(5428),c=i.n(l),u=i(9979),s=i.n(u),d=i(6788),p=i.n(d),f=i(7839),x=i(7502),b=i(7371),h=i(4254),g=i(6010),v=(i(6202),function(){return v=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},v.apply(this,arguments)}),m=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i},w=function(t){return"number"==typeof t&&!isNaN(t)};e.default=function(t){var e=(0,g.Z)(t,"TextField"),i=e.className,l=e.style,u=e.size,d=void 0===u?"large":u,y=e.labelMode,j=void 0===y?"outside":y,S=e.placeholder,k=void 0===S?"":S,O=e.label,C=void 0===O?"":O,N=e.labelTooltip,P=e.disabled,z=void 0!==P&&P,T=e.multiline,M=void 0!==T&&T,E=e.required,I=void 0!==E&&E,q=e.labelSign,F=e.rows,_=void 0===F?2:F,L=e.error,B=void 0!==L&&L,H=e.helperText,R=void 0===H?"":H,A=e.addonBefore,D=void 0===A?"":A,U=e.addonAfter,K=void 0===U?"":U,Y=(e.defaultValue,e.value),J=e.autoFocus,W=void 0!==J&&J,V=e.type,G=void 0===V?"text":V,Q=e.onClickIcon,Z=e.rightIcon,$=e.showRightIcon,X=void 0===$||$,tt=e.allowClear,et=void 0!==tt&&tt,it=e.limitLength,nt=e.fetchSuggestions,ot=e.selectPopoverClass,rt=e.renderSelectItem,at=e.showSelectName,lt=void 0===at?"value":at,ct=e.resize,ut=void 0===ct||ct,st=e.onBlur,dt=e.onFocus,pt=e.onChange,ft=e.onKeydown,xt=e.onKeyUp,bt=e.onEnter,ht=e.onClickAddonBefore,gt=e.onClickAddonAfter,vt=e.onSelect,mt=e.onClear,wt=m(e,["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","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect","onClear"]),yt=(0,o.useState)("text-field-select-content-"+(0,a.UUID)())[0],jt=(0,o.useState)(!0),St=jt[0],kt=jt[1],Ot=(0,o.useState)(""),Ct=Ot[0],Nt=Ot[1],Pt=(0,o.useState)(!1),zt=Pt[0],Tt=Pt[1],Mt=(0,o.useState)("text"),Et=Mt[0],It=Mt[1],qt=(0,o.useState)(!1),Ft=qt[0],_t=qt[1],Lt=(0,o.useState)(!1),Bt=Lt[0],Ht=Lt[1],Rt=(0,o.useState)([]),At=Rt[0],Dt=Rt[1],Ut=(0,o.useRef)(null),Kt=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==t.defaultValue&&Nt(t.defaultValue)}),[]),(0,o.useEffect)((function(){G!==Et&&It(G)}),[G]),(0,o.useEffect)((function(){void 0!==Y&&Nt(Y)}),[Y]),(0,o.useEffect)((function(){kt(""===Ct||void 0===Ct)}),[Ct]),(0,o.useEffect)((function(){nt&&_t(zt)}),[zt,nt]),(0,o.useEffect)((function(){return Ft?window.addEventListener("keydown",Qt):window.removeEventListener("keydown",Qt),function(){window.removeEventListener("keydown",Qt)}}),[Ft]),(0,o.useEffect)((function(){if(!zt&&Ct){var e=Jt(Ct);if(e!==Ct){var i={};i.target=Ut.current,i.target.value=e,void 0===t.value&&Nt(e),t.onChange&&t.onChange(i)}}}),[Ct,zt]);var Yt,Jt=function(e){var i=e;return w(t.limitLength)&&e.toString().length>Number(t.limitLength)&&(i=i.toString().substr(0,t.limitLength)),i},Wt=function(){z||(kt(!1),(Ut&&Ut.current).focus())},Vt=function(t){var e=t.selectDom,i=t.keyCode,n=t.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=e.querySelector(r)):n=e.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Gt(n,e))},Gt=function(t,e){var i=e.clientHeight,n=t.offsetTop+t.clientHeight-i;e.scrollTop=n>0?n:0},Qt=function(t){var e=document.querySelector("."+yt),i=null,n=e.querySelector(".text-field-select-content-item-keydown");if(13===t.keyCode&&n){var o=n.dataset.val;ae(JSON.parse(o))(t),(Ut&&Ut.current).blur()}n&&(i=n,n.classList.remove("text-field-select-content-item-keydown")),40===t.keyCode&&Vt({selectDom:e,keyCode:t.keyCode,currentDom:i}),38===t.keyCode&&Vt({selectDom:e,keyCode:t.keyCode,currentDom:i})},Zt=function(t){Tt(!1),""===t.target.value&&kt(!0),st&&st(t)},$t=function(t){nt&&(Ht(!0),nt(t,(function(t){Dt(t||[]),Ht(!1)})))},Xt=function(t){Tt(!0),dt&&dt(t),$t(t.target.value)},te=function(e){var i=e.target.value;i&&kt(!1),void 0===t.value&&Nt(i),pt&&pt(e),$t(e.target.value)},ee=function(t){13===t.keyCode&&bt&&bt(t),ft&&ft(t)},ie=function(t){xt&&xt(t)},ne=function(t){"password"===G&&("text"===Et&&It("password"),"password"===Et&&It("text")),Q&&Q(t)},oe=function(){return void 0===t.value?Ct:Y},re=function(){_t(!1)},ae=function(t){return function(e){vt&&vt(t)}},le=(0,o.useMemo)((function(){return(0,n.jsx)(n.Fragment,{children:w(it)&&(0,n.jsx)("span",v({className:"length-limit"},{children:(Ct?Ct.toString().length:0)+"/"+it}))})}),[it,Ct]),ce=(0,o.useMemo)((function(){var t=Z||("password"===G?"password"===Et?(0,n.jsx)(c(),{}):(0,n.jsx)(s(),{}):null);return(0,n.jsx)(n.Fragment,{children:X&&t&&(0,n.jsx)("span",v({className:"password"===G?"right-icon right-icon-password":"right-icon",onClick:ne},{children:t}))})}),[X,Z,G,Et,Q]),ue=function(){var e=Ut.current;e.value="",void 0===t.value&&Nt(""),pt&&pt({target:e}),$t(""),mt&&mt()},se=function(){if(oe()&&!z&&et)return(0,n.jsx)("span",v({className:"clean-up-icon",onClick:ue},{children:(0,n.jsx)(p(),{})}))},de=(0,o.useMemo)((function(){return(0,n.jsxs)("div",v({className:"text-field-content-within",ref:Kt},{children:[(0,n.jsxs)("div",v({className:"text-field-content-within-input"},{children:[M?(0,n.jsx)("textarea",v({ref:Ut,rows:_,value:oe(),onBlur:Zt,onFocus:Xt,onChange:te,onKeyDown:ee,onKeyUp:ie,disabled:z},wt)):(0,n.jsx)("input",v({ref:Ut,type:Et,value:oe(),onBlur:Zt,onFocus:Xt,onChange:te,onKeyDown:ee,onKeyUp:ie,disabled:z},wt)),St&&!zt&&(0,n.jsx)("span",v({className:"text-field-label-placeholder",onClick:Wt},{children:"outside"===j?k:(0,n.jsxs)(n.Fragment,{children:[C||k,I&&(0,n.jsx)("span",v({className:"text-field-required"},{children:"*"})),q&&(0,n.jsx)("span",{children:q})]})}))]})),se(),le,ce]}))}),[St,zt,W,Et,Ct,le,ce,j,k,C,z,M,_,wt,pt,nt,Q,et,mt]),pe=(0,o.useMemo)((function(){var t,e=function(t){return"object"==typeof t&&null!==t?t[lt]:t};return(0,n.jsxs)("div",v({className:(t="text-field-select-content",Bt&&(t+=" text-field-select-content-loading"),yt&&(t+=" "+yt),t),style:{width:(Kt&&Kt.current?Kt.current.offsetWidth:0)+"px"}},{children:[At&&At.map((function(t,i){return(0,n.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:ae(t),"data-val":JSON.stringify(t)},{children:rt?rt(t):(0,n.jsx)(f.default,{children:e(t)})}),i)})),Bt&&(0,n.jsx)(x.default,{})]}))}),[Kt,Ft,At,rt,lt,vt,Bt,yt]),fe=(0,o.useMemo)((function(){return(0,n.jsx)(b.default,v({open:Ft,title:pe,onClose:re,arrow:!1,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:"bottom-start",classes:{popper:(t="paraui-text-field-select paraui-scrollbar-small",d&&(t+=" paraui-text-field-select-"+d),ot&&(t+=" "+ot),At.length>0&&(t+=" paraui-text-field-select-data"),t)}},{children:de}));var t}),[St,zt,W,Et,Ct,le,ce,j,k,C,z,M,_,wt,pt,nt,vt,Kt,Ft,ot,d,Q,At,et,mt]),xe=(0,o.useMemo)((function(){var t,e=Boolean(I||q||C);if("outside"===j&&e){return(0,n.jsx)(r.default,v({label:C,required:I,labelSign:q},N,{className:(t="text-field-label",N&&N.className&&(t+=" "+N.className),t)}))}return null}),[j,C,q,I,N]);return(0,n.jsxs)("div",v({className:(Yt="paraui-text-field",Yt+=" text-field",d&&!M&&(Yt+=" text-field-"+d),i&&(Yt+=" "+i),B&&(Yt+=" text-field-error"),zt&&(Yt+=" text-field-focus"),z&&(Yt+=" text-field-disabled"),M&&(Yt+=" text-field-multiline"),w(t.limitLength)&&(Yt+=" text-field-limit-length"),w(t.limitLength)&&Ct&&Ct.toString().length>Number(t.limitLength)&&(Yt+=" text-field-limit"),ut&&(Yt+=" text-field-resize"),oe()&&(Yt+=" text-field-value"),et&&(Yt+=" text-field-allow-clear"),Yt),style:l},{children:[xe,(0,n.jsxs)("div",v({className:"text-field-content"},{children:[D&&(0,n.jsx)("div",v({className:"text-field-content-before",onClick:function(t){ht&&ht(t)}},{children:D})),nt?fe:de,K&&(0,n.jsx)("div",v({className:"text-field-content-after",onClick:function(t){gt&>(t)}},{children:K}))]})),(0,n.jsx)(h.default,{className:"text-field-error-text",error:B,helperText:R})]}))}},7371:function(t,e,i){"use strict";var n=i(5893),o=i(670),r=i(5744),a=i.n(r),l=(i(2310),function(){return l=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},l.apply(this,arguments)}),c=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i};e.default=function(t){var e,i=t.placement,r=void 0===i?"top-start":i,u=t.className,s=t.arrow,d=void 0===s||s,p=t.PopperProps,f=t.boundariesElement,x=void 0===f?"scrollParent":f,b=c(t,["placement","className","arrow","PopperProps","boundariesElement"]),h=l(l({},t.classes),{popper:a()("paraui-tooltip",u,null===(e=t.classes)||void 0===e?void 0:e.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,l({},b,{enterTouchDelay:0,arrow:d,placement:r,classes:h,PopperProps:l(l({},p),{modifiers:{preventOverflow:{boundariesElement:x}}})}))}},670:function(t){"use strict";t.exports=e},5395:function(t){"use strict";t.exports=u},6788:function(t){"use strict";t.exports=l},2396:function(t){"use strict";t.exports=d},3835:function(t){"use strict";t.exports=s},8076:function(t){"use strict";t.exports=n},2788:function(t){"use strict";t.exports=c},5428:function(t){"use strict";t.exports=r},9979:function(t){"use strict";t.exports=a},6839:function(t){"use strict";t.exports=p},8543:function(t){"use strict";t.exports=o},5744:function(t){"use strict";t.exports=i},8156:function(e){"use strict";e.exports=t}},x={};function b(t){var e=x[t];if(void 0!==e)return e.exports;var i=x[t]={id:t,exports:{}};return f[t](i,i.exports,b),i.exports}b.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return b.d(e,{a:e}),e},b.d=function(t,e){for(var i in e)b.o(e,i)&&!b.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},b.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},b.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},b.nc=void 0;var h={};return function(){"use strict";b.r(h),b.d(h,{Search:function(){return l}});var t=b(5893),e=b(8156),i=b(7320),n=b(7896),o=b(6839),r=b.n(o),a=(b(9750),function(){return a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)}),l=function(o){var l=o.className,c=void 0===l?"":l,u=o.style,s=o.size,d=void 0===s?"large":s,p=o.btnType,f=void 0===p?"outside":p,x=o.showBtn,b=void 0===x||x,h=o.btnIcon,g=o.btnText,v=void 0===g?"":g,m=o.placeholder,w=void 0===m?"":m,y=(o.defaultValue,o.value),j=o.rightIcon,S=o.showRightIcon,k=void 0===S||S,O=o.allowClear,C=void 0===O||O,N=o.rightIconExist,P=void 0!==N&&N,z=o.onChange,T=o.onBlur,M=o.onFocus,E=o.onKeydown,I=o.onKeyUp,q=o.onClickBtn,F=o.onClickRightIcon,_=o.onEnter,L=o.onClear,B=(0,e.useState)(""),H=B[0],R=B[1];(0,e.useEffect)((function(){void 0!==o.defaultValue&&R(o.defaultValue)}),[]),(0,e.useEffect)((function(){void 0!==y&&R(y)}),[y]);var A,D=function(){return h||(0,t.jsx)(r(),{})},U=function(){q&&q(H)};return(0,t.jsxs)("div",a({className:(A="paraui-search",c&&(A+=" "+c),d&&(A+=" search-"+d),f&&(A+=" search-"+f),b&&(A+=" search-showbtn"),v&&(A+=" search-btntext"),H&&(A+=" paraui-search-value"),P&&(A+=" paraui-search-right-icon-exist"),A),style:u},{children:[(0,t.jsx)(i.default,{size:d,placeholder:w,value:void 0===o.value?H:y,rightIcon:k?j||void 0:"",onClickIcon:function(){var t=H;k&&!j&&void 0===o.value&&(t="",R("")),F&&F(t)},onChange:function(t){var e=t.target.value;void 0===o.value&&R(e),z&&z(e,t)},onBlur:T,onFocus:M,onKeydown:E,onKeyUp:I,onEnter:_,addonAfter:function(){if(b&&"inside"===f)return(0,t.jsx)(n.default,a({size:d,startIcon:D(),variant:"outlined",onClick:U},{children:v}))}(),allowClear:C,onClear:L}),b&&"outside"===f&&(0,t.jsx)(n.default,a({size:d,startIcon:D(),variant:"contained",onClick:U},{children:v}))]}))};h.default=l}(),h}()}));
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { TextField } from '../TextField/index.js';
|
|
5
|
+
import { Button } from '../Button/index.js';
|
|
6
|
+
import SearchIcon from '@para-ui/icons/Search';
|
|
7
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
|
+
import '../_verture/typeof-498dd2b1.js';
|
|
9
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
10
|
+
import '../Label/index.js';
|
|
11
|
+
import '../Help/index.js';
|
|
12
|
+
import '../Tooltip/index.js';
|
|
13
|
+
import 'rc-tooltip';
|
|
14
|
+
import 'rc-tooltip/lib/placements';
|
|
15
|
+
import 'clsx';
|
|
16
|
+
import '@para-ui/icons/Help';
|
|
17
|
+
import '@paraview/lib';
|
|
18
|
+
import '@para-ui/icons/PreviewClose';
|
|
19
|
+
import '@para-ui/icons/PreviewOpen';
|
|
20
|
+
import '@para-ui/icons/CloseCircle';
|
|
21
|
+
import '../AutoTips/index.js';
|
|
22
|
+
import '../Loading/index.js';
|
|
23
|
+
import '@para-ui/icons/LoadingF';
|
|
24
|
+
import '../HelperText/index.js';
|
|
25
|
+
import '../_verture/useGlobalProps-af9a2af6.js';
|
|
26
|
+
import '@para-ui/core/GlobalContext';
|
|
27
|
+
import '../Dropdown/index.js';
|
|
28
|
+
import 'rc-dropdown';
|
|
29
|
+
import '@para-ui/icons/Forbid';
|
|
30
|
+
import '@para-ui/icons/Down';
|
|
31
|
+
import '../_verture/useFormatMessage-ac9d6acf.js';
|
|
32
|
+
|
|
33
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-search {\n display: flex;\n width: 100%;\n}\n.paraui-search > .paraui-text-field {\n padding: 0;\n}\n.paraui-search > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: none;\n margin-right: 8px;\n}\n.paraui-search > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 16px;\n}\n.paraui-search > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon:hover > svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-search > .paraui-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 8px;\n}\n.paraui-search > .paraui-text-field > .text-field-content > .text-field-content-after {\n padding: 0;\n background-color: white;\n}\n.paraui-search > .paraui-text-field > .text-field-content > .text-field-content-after .paraui-button {\n border: 0;\n}\n.paraui-search > .paraui-text-field > .paraui-helper-text {\n display: none;\n}\n.paraui-search.paraui-search-right-icon-exist > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: flex;\n}\n.paraui-search.paraui-search-value > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: flex;\n}\n.paraui-search .paraui-button > .paraui-button-icon {\n margin-right: 0;\n}\n.paraui-search .paraui-button > .paraui-button-icon > svg {\n font-size: 16px;\n}\n.paraui-search .paraui-button > .paraui-button-label {\n margin-left: 4px;\n}\n.paraui-search.search-outside > .paraui-button {\n margin-left: 16px;\n}\n.paraui-search.search-inside .paraui-button {\n padding: 0 8px;\n}\n.paraui-search.search-inside .paraui-button svg {\n font-size: 20px;\n}\n.paraui-search.search-btntext .paraui-button svg {\n font-size: 16px;\n}\n.paraui-search.search-small > .paraui-text-field > .text-field-content > .text-field-content-after .paraui-button {\n height: 26px;\n}\n.paraui-search.search-small.search-inside.no-search-btntext .paraui-button svg {\n font-size: 16px;\n}\n.paraui-search.search-small.paraui-search-right-icon-exist > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 16px;\n}\n.paraui-search.search-small.paraui-search-right-icon-exist > .paraui-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 4px;\n}\n.paraui-search.search-medium > .paraui-text-field > .text-field-content > .text-field-content-after .paraui-button {\n height: 30px;\n}\n.paraui-search.search-medium.search-inside.no-search-btntext .paraui-button svg {\n font-size: 18px;\n}\n.paraui-search.search-medium.paraui-search-right-icon-exist > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 18px;\n}\n.paraui-search.search-medium.paraui-search-right-icon-exist > .paraui-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 6px;\n}\n.paraui-search.search-large > .paraui-text-field > .text-field-content > .text-field-content-after .paraui-button {\n height: 34px;\n}\n.paraui-search.search-large.search-inside.no-search-btntext .paraui-button svg {\n font-size: 20px;\n}\n.paraui-search.search-large.paraui-search-right-icon-exist > .paraui-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 20px;\n}\n.paraui-search.search-large.paraui-search-right-icon-exist > .paraui-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 8px;\n}";
|
|
34
|
+
styleInject(css_248z);
|
|
35
|
+
|
|
36
|
+
var Search = function Search(props) {
|
|
37
|
+
var _props$className = props.className,
|
|
38
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
39
|
+
style = props.style,
|
|
40
|
+
_props$size = props.size,
|
|
41
|
+
size = _props$size === void 0 ? 'large' : _props$size,
|
|
42
|
+
_props$btnType = props.btnType,
|
|
43
|
+
btnType = _props$btnType === void 0 ? 'outside' : _props$btnType,
|
|
44
|
+
_props$showBtn = props.showBtn,
|
|
45
|
+
showBtn = _props$showBtn === void 0 ? true : _props$showBtn,
|
|
46
|
+
btnIcon = props.btnIcon,
|
|
47
|
+
_props$btnText = props.btnText,
|
|
48
|
+
btnText = _props$btnText === void 0 ? '' : _props$btnText,
|
|
49
|
+
_props$placeholder = props.placeholder,
|
|
50
|
+
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder;
|
|
51
|
+
props.defaultValue;
|
|
52
|
+
var value = props.value,
|
|
53
|
+
rightIcon = props.rightIcon,
|
|
54
|
+
_props$showRightIcon = props.showRightIcon,
|
|
55
|
+
showRightIcon = _props$showRightIcon === void 0 ? true : _props$showRightIcon,
|
|
56
|
+
_props$allowClear = props.allowClear,
|
|
57
|
+
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
58
|
+
_props$rightIconExist = props.rightIconExist,
|
|
59
|
+
rightIconExist = _props$rightIconExist === void 0 ? false : _props$rightIconExist,
|
|
60
|
+
onChange = props.onChange,
|
|
61
|
+
onBlur = props.onBlur,
|
|
62
|
+
onFocus = props.onFocus,
|
|
63
|
+
onKeydown = props.onKeydown,
|
|
64
|
+
onKeyUp = props.onKeyUp,
|
|
65
|
+
onClickBtn = props.onClickBtn,
|
|
66
|
+
onClickRightIcon = props.onClickRightIcon,
|
|
67
|
+
onEnter = props.onEnter,
|
|
68
|
+
onClear = props.onClear;
|
|
69
|
+
|
|
70
|
+
var _useState = useState(''),
|
|
71
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
72
|
+
valueCom = _useState2[0],
|
|
73
|
+
setValueCom = _useState2[1];
|
|
74
|
+
|
|
75
|
+
useEffect(function () {
|
|
76
|
+
if (props.defaultValue !== undefined) {
|
|
77
|
+
setValueCom(props.defaultValue);
|
|
78
|
+
}
|
|
79
|
+
}, []); // 监听value
|
|
80
|
+
|
|
81
|
+
useEffect(function () {
|
|
82
|
+
if (value !== undefined) {
|
|
83
|
+
setValueCom(value);
|
|
84
|
+
}
|
|
85
|
+
}, [value]);
|
|
86
|
+
/**
|
|
87
|
+
* 输入框右侧按钮
|
|
88
|
+
* @return {ReactNode}
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
var clearIcon = function clearIcon() {
|
|
92
|
+
if (!showRightIcon) return '';
|
|
93
|
+
if (rightIcon) return rightIcon;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 搜索按钮图标
|
|
97
|
+
* @return {ReactNode}
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
var searchBtnIcon = function searchBtnIcon() {
|
|
102
|
+
if (btnIcon) return btnIcon;
|
|
103
|
+
return jsx(SearchIcon, {});
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* 点击输入框右侧按钮
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
var clickRightIcon = function clickRightIcon() {
|
|
111
|
+
var val = valueCom; // 显示右侧图标 且 没有自定义右侧图标 为清空按钮
|
|
112
|
+
|
|
113
|
+
if (showRightIcon && !rightIcon) {
|
|
114
|
+
if (props.value === undefined) {
|
|
115
|
+
val = '';
|
|
116
|
+
setValueCom('');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
onClickRightIcon && onClickRightIcon(val);
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* 改变输入框
|
|
124
|
+
* @param event {React.ChangeEvent<HTMLInputElement>} 元素
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
var changeInput = function changeInput(event) {
|
|
129
|
+
var val = event.target.value;
|
|
130
|
+
|
|
131
|
+
if (props.value === undefined) {
|
|
132
|
+
setValueCom(val);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
onChange && onChange(val, event);
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* 点击按钮
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
var clickBtn = function clickBtn() {
|
|
143
|
+
onClickBtn && onClickBtn(valueCom);
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* 内置按钮
|
|
147
|
+
* */
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
var buttonDom = function buttonDom() {
|
|
151
|
+
if (showBtn && btnType === 'inside') {
|
|
152
|
+
return jsx(Button, Object.assign({
|
|
153
|
+
size: size,
|
|
154
|
+
startIcon: searchBtnIcon(),
|
|
155
|
+
variant: 'outlined',
|
|
156
|
+
onClick: clickBtn
|
|
157
|
+
}, {
|
|
158
|
+
children: btnText
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return undefined;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* 处理class
|
|
166
|
+
* @return {string}
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
var handClass = function handClass() {
|
|
171
|
+
var str = 'paraui-search';
|
|
172
|
+
if (className) str += ' ' + className;
|
|
173
|
+
if (size) str += ' search-' + size;
|
|
174
|
+
if (btnType) str += ' search-' + btnType;
|
|
175
|
+
if (showBtn) str += ' search-showbtn';
|
|
176
|
+
if (btnText) str += ' search-btntext';else str += ' no-search-btntext';
|
|
177
|
+
if (valueCom) str += ' paraui-search-value';
|
|
178
|
+
if (rightIconExist) str += ' paraui-search-right-icon-exist';
|
|
179
|
+
return str;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var handValue = function handValue() {
|
|
183
|
+
if (props.value === undefined) {
|
|
184
|
+
return valueCom;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return value;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
return jsxs("div", Object.assign({
|
|
191
|
+
className: handClass(),
|
|
192
|
+
style: style
|
|
193
|
+
}, {
|
|
194
|
+
children: [jsx(TextField, {
|
|
195
|
+
size: size,
|
|
196
|
+
placeholder: placeholder,
|
|
197
|
+
value: handValue(),
|
|
198
|
+
rightIcon: clearIcon(),
|
|
199
|
+
onClickIcon: clickRightIcon,
|
|
200
|
+
onChange: changeInput,
|
|
201
|
+
onBlur: onBlur,
|
|
202
|
+
onFocus: onFocus,
|
|
203
|
+
onKeydown: onKeydown,
|
|
204
|
+
onKeyUp: onKeyUp,
|
|
205
|
+
onEnter: onEnter,
|
|
206
|
+
addonAfter: buttonDom(),
|
|
207
|
+
allowClear: allowClear,
|
|
208
|
+
onClear: onClear
|
|
209
|
+
}), showBtn && btnType === 'outside' && jsx(Button, Object.assign({
|
|
210
|
+
size: size,
|
|
211
|
+
startIcon: searchBtnIcon(),
|
|
212
|
+
variant: 'contained',
|
|
213
|
+
onClick: clickBtn
|
|
214
|
+
}, {
|
|
215
|
+
children: btnText
|
|
216
|
+
}))]
|
|
217
|
+
}));
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export { Search, Search as default };
|