@para-ui/core 3.0.27 → 3.0.29
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.js +48 -88
- package/AutoTips/index.js +25 -32
- package/Breadcrumbs/index.js +43 -63
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +88 -118
- package/ButtonGroup/index.js +27 -36
- package/Carousel/index.d.ts +2 -2
- package/Carousel/index.js +27 -28
- package/Cascader/index.js +52 -64
- package/Checkbox/index.js +23 -39
- package/CheckboxGroup/index.js +31 -48
- package/Collapse/collapsePanel.d.ts +1 -1
- package/Collapse/index.d.ts +1 -1
- package/Collapse/index.js +9 -29
- package/Collapse/util.d.ts +2 -2
- package/CollapseBox/index.js +45 -56
- package/CollapseLayout/index.js +35 -54
- package/ComboSelect/index.js +231 -358
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.js +17 -20
- package/DatePicker/generatePicker/index.d.ts +17 -17
- package/DatePicker/index.d.ts +4 -4
- package/DatePicker/index.js +111 -167
- package/Desktop/index.js +62 -173
- package/Drawer/index.js +65 -58
- package/Drawer/interface.d.ts +7 -3
- package/Dropdown/index.d.ts +1 -1
- package/Dropdown/index.js +3 -3
- package/Empty/index.js +17 -22
- package/Form/index.d.ts +1 -1
- package/Form/index.js +40 -82
- package/FormItem/index.d.ts +1 -1
- package/FormItem/index.js +13 -13
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/index.js +11 -11
- package/GlobalContext/index.js +3 -3
- package/GlobalContext/usePopupContainer.d.ts +1 -1
- package/Help/index.js +11 -11
- package/HelperText/index.js +11 -12
- package/InputLang/index.js +47 -80
- package/InputNumber/index.js +65 -100
- package/Label/index.js +15 -16
- package/Loading/index.js +6 -7
- package/Menu/index.js +148 -328
- package/Menu/interface.d.ts +2 -2
- package/Menu/verticalMenuList.d.ts +1 -1
- package/Message/index.d.ts +1 -1
- package/Message/index.js +45 -64
- package/Modal/Confirm/index.d.ts +2 -2
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +119 -152
- package/MultiBox/index.js +43 -75
- package/Notification/index.d.ts +2 -2
- package/Notification/index.js +51 -72
- package/OperateBtn/index.js +42 -70
- package/PageHeader/index.js +120 -286
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +16 -5
- package/Pagination/index.js +169 -188
- package/ParauiProvider/index.js +2 -3
- package/PasswordRules/index.js +12 -30
- package/PopConfirm/index.d.ts +1 -1
- package/PopConfirm/index.js +52 -59
- package/Popover/index.js +8 -9
- package/Progress/index.d.ts +6 -6
- package/Progress/index.js +50 -89
- package/Querying/index.js +14 -17
- package/README.md +16 -0
- package/Radio/index.js +21 -33
- package/RadioGroup/index.js +32 -47
- package/Search/index.js +44 -66
- package/Select/index.js +176 -343
- package/SelectInput/index.js +8 -9
- package/Selector/index.js +298 -686
- package/SelectorPicker/index.d.ts +2 -0
- package/SelectorPicker/index.js +64 -97
- package/SingleBox/index.js +29 -54
- package/Slider/index.d.ts +1 -1
- package/Slider/index.js +29 -41
- package/Slider/interface.d.ts +2 -2
- package/Split/index.js +10 -23
- package/Status/index.js +8 -7
- package/Stepper/index.d.ts +1 -1
- package/Stepper/index.js +20 -25
- package/Switch/index.d.ts +2 -2
- package/Switch/index.js +19 -20
- package/Table/index.js +590 -1028
- package/Table/interface.d.ts +15 -6
- package/Table/tableBodyInterface.d.ts +4 -0
- package/Table/tablePagination.d.ts +1 -1
- package/Table/{tablePaginationInterFace.d.ts → tablePaginationInterface.d.ts} +4 -1
- package/Tabs/index.d.ts +3 -3
- package/Tabs/index.js +47 -65
- package/Tag/TagGroup.d.ts +1 -1
- package/Tag/index.d.ts +2 -2
- package/Tag/index.js +72 -107
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +81 -105
- package/TextField/index.js +141 -220
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +12 -15
- package/Timeline/index.js +42 -52
- package/Title/index.js +10 -9
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.js +50 -70
- package/Tooltip/index.js +64 -98
- package/Tooltip/interface.d.ts +1 -1
- package/Transfer/index.d.ts +1 -1
- package/Transfer/index.js +89 -116
- package/Transfer/useClick.d.ts +1 -1
- package/Tree/index.js +10 -10
- package/Tree/interface.d.ts +6 -6
- package/Upload/Dragger/index.d.ts +1 -1
- package/Upload/ImageUpload/index.d.ts +1 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/index.d.ts +1 -1
- package/Upload/index.js +283 -475
- package/Upload/interface.d.ts +2 -2
- package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
- package/_verture/defineProperty-62acccfc.js +34 -0
- package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
- package/_verture/{index-c40bd040.js → index-131f8fe5.js} +80 -181
- package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
- package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
- package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
- package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
- package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
- package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
- package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
- package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
- package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
- package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
- package/index.js +15 -15
- package/package.json +4 -5
- package/_verture/defineProperty-0590dc61.js +0 -16
package/Search/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { TextField } from '../TextField/index.js';
|
|
5
5
|
import { Button } from '../Button/index.js';
|
|
6
6
|
import SearchIcon from '@para-ui/icons/Search';
|
|
7
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
9
|
import '../_verture/typeof-498dd2b1.js';
|
|
10
10
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -23,64 +23,62 @@ import '../AutoTips/index.js';
|
|
|
23
23
|
import '../Loading/index.js';
|
|
24
24
|
import '@para-ui/icons/LoadingF';
|
|
25
25
|
import '../HelperText/index.js';
|
|
26
|
-
import '../_verture/useGlobalProps-
|
|
26
|
+
import '../_verture/useGlobalProps-1b846a65.js';
|
|
27
27
|
import '@para-ui/core/GlobalContext';
|
|
28
|
-
import '../_verture/index-
|
|
28
|
+
import '../_verture/index-be4faaee.js';
|
|
29
29
|
import 'rc-dropdown';
|
|
30
|
-
import '../_verture/usePopupContainer-
|
|
30
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
31
31
|
import 'dayjs';
|
|
32
32
|
import '@para-ui/icons/Forbid';
|
|
33
33
|
import '@para-ui/icons/Down';
|
|
34
|
-
import '../_verture/useFormatMessage-
|
|
34
|
+
import '../_verture/useFormatMessage-703f8b20.js';
|
|
35
35
|
|
|
36
36
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-search {\n display: flex;\n width: 100%;\n}\n.paraui-v3-search > .search-text-field {\n padding: 0;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: none;\n margin-right: 8px;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 16px;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .right-icon:hover > svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 8px;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-after {\n padding: 0;\n background-color: white;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n border: 0;\n}\n.paraui-v3-search.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: flex;\n}\n.paraui-v3-search.paraui-v3-search-value > .search-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: flex;\n}\n.paraui-v3-search .search-button > .paraui-v3-button-icon {\n margin-right: 0;\n}\n.paraui-v3-search .search-button > .paraui-v3-button-icon > svg {\n font-size: 16px;\n}\n.paraui-v3-search .search-button > .paraui-v3-button-label {\n margin-left: 4px;\n}\n.paraui-v3-search.paraui-v3-search-outside > .search-button {\n margin-left: 16px;\n}\n.paraui-v3-search.paraui-v3-search-inside .search-button {\n padding: 0 8px;\n}\n.paraui-v3-search.paraui-v3-search-inside .search-button svg {\n font-size: 20px;\n}\n.paraui-v3-search.paraui-v3-search-inside.paraui-v3-search-no-btntext .search-button > span {\n margin-right: 0;\n}\n.paraui-v3-search.paraui-v3-search-btntext .search-button svg {\n font-size: 16px;\n}\n.paraui-v3-search.paraui-v3-search-small > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n height: 26px;\n}\n.paraui-v3-search.paraui-v3-search-small.paraui-v3-search-inside.paraui-v3-search-no-btntext .search-button svg {\n font-size: 16px;\n}\n.paraui-v3-search.paraui-v3-search-small.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 16px;\n}\n.paraui-v3-search.paraui-v3-search-small.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 4px;\n}\n.paraui-v3-search.paraui-v3-search-medium > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n height: 30px;\n}\n.paraui-v3-search.paraui-v3-search-medium.paraui-v3-search-inside.search-no-btntext .search-button svg {\n font-size: 18px;\n}\n.paraui-v3-search.paraui-v3-search-medium.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 18px;\n}\n.paraui-v3-search.paraui-v3-search-medium.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 6px;\n}\n.paraui-v3-search.paraui-v3-search-large > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n height: 34px;\n}\n.paraui-v3-search.paraui-v3-search-large.paraui-v3-search-inside.search-no-btntext .search-button svg {\n font-size: 20px;\n}\n.paraui-v3-search.paraui-v3-search-large.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 20px;\n}\n.paraui-v3-search.paraui-v3-search-large.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 8px;\n}";
|
|
37
37
|
styleInject(css_248z);
|
|
38
38
|
|
|
39
39
|
var Search = function Search(props) {
|
|
40
40
|
var _props$className = props.className,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
41
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
42
|
+
style = props.style,
|
|
43
|
+
_props$size = props.size,
|
|
44
|
+
size = _props$size === void 0 ? 'large' : _props$size,
|
|
45
|
+
_props$btnType = props.btnType,
|
|
46
|
+
btnType = _props$btnType === void 0 ? 'outside' : _props$btnType,
|
|
47
|
+
_props$showBtn = props.showBtn,
|
|
48
|
+
showBtn = _props$showBtn === void 0 ? true : _props$showBtn,
|
|
49
|
+
btnIcon = props.btnIcon,
|
|
50
|
+
_props$btnText = props.btnText,
|
|
51
|
+
btnText = _props$btnText === void 0 ? '' : _props$btnText,
|
|
52
|
+
_props$placeholder = props.placeholder,
|
|
53
|
+
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder;
|
|
54
|
+
props.defaultValue;
|
|
55
|
+
var value = props.value,
|
|
56
|
+
rightIcon = props.rightIcon,
|
|
57
|
+
_props$showRightIcon = props.showRightIcon,
|
|
58
|
+
showRightIcon = _props$showRightIcon === void 0 ? true : _props$showRightIcon,
|
|
59
|
+
_props$allowClear = props.allowClear,
|
|
60
|
+
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
61
|
+
_props$rightIconExist = props.rightIconExist,
|
|
62
|
+
rightIconExist = _props$rightIconExist === void 0 ? false : _props$rightIconExist,
|
|
63
|
+
onChange = props.onChange,
|
|
64
|
+
onBlur = props.onBlur,
|
|
65
|
+
onFocus = props.onFocus,
|
|
66
|
+
onKeydown = props.onKeydown,
|
|
67
|
+
onKeyUp = props.onKeyUp,
|
|
68
|
+
onClickBtn = props.onClickBtn,
|
|
69
|
+
onClickRightIcon = props.onClickRightIcon,
|
|
70
|
+
onEnter = props.onEnter,
|
|
71
|
+
onClear = props.onClear;
|
|
73
72
|
var _useState = useState(''),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
74
|
+
valueCom = _useState2[0],
|
|
75
|
+
setValueCom = _useState2[1];
|
|
78
76
|
useEffect(function () {
|
|
79
77
|
if (props.defaultValue !== undefined) {
|
|
80
78
|
setValueCom(props.defaultValue);
|
|
81
79
|
}
|
|
82
|
-
}, []);
|
|
83
|
-
|
|
80
|
+
}, []);
|
|
81
|
+
// 监听value
|
|
84
82
|
useEffect(function () {
|
|
85
83
|
if (value !== undefined) {
|
|
86
84
|
setValueCom(value);
|
|
@@ -90,7 +88,6 @@ var Search = function Search(props) {
|
|
|
90
88
|
* 输入框右侧按钮
|
|
91
89
|
* @return {ReactNode}
|
|
92
90
|
*/
|
|
93
|
-
|
|
94
91
|
var clearIcon = function clearIcon() {
|
|
95
92
|
if (!showRightIcon) return '';
|
|
96
93
|
if (rightIcon) return rightIcon;
|
|
@@ -99,8 +96,6 @@ var Search = function Search(props) {
|
|
|
99
96
|
* 搜索按钮图标
|
|
100
97
|
* @return {ReactNode}
|
|
101
98
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
99
|
var searchBtnIcon = function searchBtnIcon() {
|
|
105
100
|
if (btnIcon) return btnIcon;
|
|
106
101
|
return jsx(SearchIcon, {});
|
|
@@ -108,48 +103,37 @@ var Search = function Search(props) {
|
|
|
108
103
|
/**
|
|
109
104
|
* 点击输入框右侧按钮
|
|
110
105
|
*/
|
|
111
|
-
|
|
112
|
-
|
|
113
106
|
var clickRightIcon = function clickRightIcon() {
|
|
114
|
-
var val = valueCom;
|
|
115
|
-
|
|
107
|
+
var val = valueCom;
|
|
108
|
+
// 显示右侧图标 且 没有自定义右侧图标 为清空按钮
|
|
116
109
|
if (showRightIcon && !rightIcon) {
|
|
117
110
|
if (props.value === undefined) {
|
|
118
111
|
val = '';
|
|
119
112
|
setValueCom('');
|
|
120
113
|
}
|
|
121
114
|
}
|
|
122
|
-
|
|
123
115
|
onClickRightIcon && onClickRightIcon(val);
|
|
124
116
|
};
|
|
125
117
|
/**
|
|
126
118
|
* 改变输入框
|
|
127
119
|
* @param event {React.ChangeEvent<HTMLInputElement>} 元素
|
|
128
120
|
*/
|
|
129
|
-
|
|
130
|
-
|
|
131
121
|
var changeInput = function changeInput(event) {
|
|
132
122
|
var val = event.target.value;
|
|
133
|
-
|
|
134
123
|
if (props.value === undefined) {
|
|
135
124
|
setValueCom(val);
|
|
136
125
|
}
|
|
137
|
-
|
|
138
126
|
onChange && onChange(val, event);
|
|
139
127
|
};
|
|
140
128
|
/**
|
|
141
129
|
* 点击按钮
|
|
142
130
|
*/
|
|
143
|
-
|
|
144
|
-
|
|
145
131
|
var clickBtn = function clickBtn() {
|
|
146
132
|
onClickBtn && onClickBtn(valueCom);
|
|
147
133
|
};
|
|
148
134
|
/**
|
|
149
135
|
* 内置按钮
|
|
150
136
|
* */
|
|
151
|
-
|
|
152
|
-
|
|
153
137
|
var buttonDom = function buttonDom() {
|
|
154
138
|
if (showBtn && btnType === 'inside') {
|
|
155
139
|
return jsx(Button, Object.assign({
|
|
@@ -162,15 +146,12 @@ var Search = function Search(props) {
|
|
|
162
146
|
children: btnText
|
|
163
147
|
}));
|
|
164
148
|
}
|
|
165
|
-
|
|
166
149
|
return undefined;
|
|
167
150
|
};
|
|
168
151
|
/**
|
|
169
152
|
* 处理class
|
|
170
153
|
* @return {string}
|
|
171
154
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
174
155
|
var handClass = function handClass() {
|
|
175
156
|
var str = "".concat($prefixCls, "-search");
|
|
176
157
|
if (className) str += ' ' + className;
|
|
@@ -182,15 +163,12 @@ var Search = function Search(props) {
|
|
|
182
163
|
if (rightIconExist) str += " ".concat($prefixCls, "-search-right-icon-exist");
|
|
183
164
|
return str;
|
|
184
165
|
};
|
|
185
|
-
|
|
186
166
|
var handValue = function handValue() {
|
|
187
167
|
if (props.value === undefined) {
|
|
188
168
|
return valueCom;
|
|
189
169
|
}
|
|
190
|
-
|
|
191
170
|
return value;
|
|
192
171
|
};
|
|
193
|
-
|
|
194
172
|
return jsxs("div", Object.assign({
|
|
195
173
|
className: handClass(),
|
|
196
174
|
style: style
|