@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.
Files changed (136) hide show
  1. package/AutoBox/index.js +48 -88
  2. package/AutoTips/index.js +25 -32
  3. package/Breadcrumbs/index.js +43 -63
  4. package/Button/SplitButton.d.ts +1 -1
  5. package/Button/index.d.ts +1 -1
  6. package/Button/index.js +88 -118
  7. package/ButtonGroup/index.js +27 -36
  8. package/Carousel/index.d.ts +2 -2
  9. package/Carousel/index.js +27 -28
  10. package/Cascader/index.js +52 -64
  11. package/Checkbox/index.js +23 -39
  12. package/CheckboxGroup/index.js +31 -48
  13. package/Collapse/collapsePanel.d.ts +1 -1
  14. package/Collapse/index.d.ts +1 -1
  15. package/Collapse/index.js +9 -29
  16. package/Collapse/util.d.ts +2 -2
  17. package/CollapseBox/index.js +45 -56
  18. package/CollapseLayout/index.js +35 -54
  19. package/ComboSelect/index.js +231 -358
  20. package/ComboSelect/interface.d.ts +3 -3
  21. package/Container/index.js +17 -20
  22. package/DatePicker/generatePicker/index.d.ts +17 -17
  23. package/DatePicker/index.d.ts +4 -4
  24. package/DatePicker/index.js +111 -167
  25. package/Desktop/index.js +62 -173
  26. package/Drawer/index.js +65 -58
  27. package/Drawer/interface.d.ts +7 -3
  28. package/Dropdown/index.d.ts +1 -1
  29. package/Dropdown/index.js +3 -3
  30. package/Empty/index.js +17 -22
  31. package/Form/index.d.ts +1 -1
  32. package/Form/index.js +40 -82
  33. package/FormItem/index.d.ts +1 -1
  34. package/FormItem/index.js +13 -13
  35. package/FormItem/validateFunction.d.ts +1 -1
  36. package/FunctionModal/index.js +11 -11
  37. package/GlobalContext/index.js +3 -3
  38. package/GlobalContext/usePopupContainer.d.ts +1 -1
  39. package/Help/index.js +11 -11
  40. package/HelperText/index.js +11 -12
  41. package/InputLang/index.js +47 -80
  42. package/InputNumber/index.js +65 -100
  43. package/Label/index.js +15 -16
  44. package/Loading/index.js +6 -7
  45. package/Menu/index.js +148 -328
  46. package/Menu/interface.d.ts +2 -2
  47. package/Menu/verticalMenuList.d.ts +1 -1
  48. package/Message/index.d.ts +1 -1
  49. package/Message/index.js +45 -64
  50. package/Modal/Confirm/index.d.ts +2 -2
  51. package/Modal/index.d.ts +1 -1
  52. package/Modal/index.js +119 -152
  53. package/MultiBox/index.js +43 -75
  54. package/Notification/index.d.ts +2 -2
  55. package/Notification/index.js +51 -72
  56. package/OperateBtn/index.js +42 -70
  57. package/PageHeader/index.js +120 -286
  58. package/PageHeader/interface.d.ts +1 -1
  59. package/Pagination/index.d.ts +16 -5
  60. package/Pagination/index.js +169 -188
  61. package/ParauiProvider/index.js +2 -3
  62. package/PasswordRules/index.js +12 -30
  63. package/PopConfirm/index.d.ts +1 -1
  64. package/PopConfirm/index.js +52 -59
  65. package/Popover/index.js +8 -9
  66. package/Progress/index.d.ts +6 -6
  67. package/Progress/index.js +50 -89
  68. package/Querying/index.js +14 -17
  69. package/README.md +16 -0
  70. package/Radio/index.js +21 -33
  71. package/RadioGroup/index.js +32 -47
  72. package/Search/index.js +44 -66
  73. package/Select/index.js +176 -343
  74. package/SelectInput/index.js +8 -9
  75. package/Selector/index.js +298 -686
  76. package/SelectorPicker/index.d.ts +2 -0
  77. package/SelectorPicker/index.js +64 -97
  78. package/SingleBox/index.js +29 -54
  79. package/Slider/index.d.ts +1 -1
  80. package/Slider/index.js +29 -41
  81. package/Slider/interface.d.ts +2 -2
  82. package/Split/index.js +10 -23
  83. package/Status/index.js +8 -7
  84. package/Stepper/index.d.ts +1 -1
  85. package/Stepper/index.js +20 -25
  86. package/Switch/index.d.ts +2 -2
  87. package/Switch/index.js +19 -20
  88. package/Table/index.js +590 -1028
  89. package/Table/interface.d.ts +15 -6
  90. package/Table/tableBodyInterface.d.ts +4 -0
  91. package/Table/tablePagination.d.ts +1 -1
  92. package/Table/{tablePaginationInterFace.d.ts → tablePaginationInterface.d.ts} +4 -1
  93. package/Tabs/index.d.ts +3 -3
  94. package/Tabs/index.js +47 -65
  95. package/Tag/TagGroup.d.ts +1 -1
  96. package/Tag/index.d.ts +2 -2
  97. package/Tag/index.js +72 -107
  98. package/TextEditor/index.d.ts +2 -2
  99. package/TextEditor/index.js +81 -105
  100. package/TextField/index.js +141 -220
  101. package/TimePicker/index.d.ts +1 -1
  102. package/TimePicker/index.js +12 -15
  103. package/Timeline/index.js +42 -52
  104. package/Title/index.js +10 -9
  105. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  106. package/ToggleButton/index.js +50 -70
  107. package/Tooltip/index.js +64 -98
  108. package/Tooltip/interface.d.ts +1 -1
  109. package/Transfer/index.d.ts +1 -1
  110. package/Transfer/index.js +89 -116
  111. package/Transfer/useClick.d.ts +1 -1
  112. package/Tree/index.js +10 -10
  113. package/Tree/interface.d.ts +6 -6
  114. package/Upload/Dragger/index.d.ts +1 -1
  115. package/Upload/ImageUpload/index.d.ts +1 -1
  116. package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
  117. package/Upload/index.d.ts +1 -1
  118. package/Upload/index.js +283 -475
  119. package/Upload/interface.d.ts +2 -2
  120. package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
  121. package/_verture/defineProperty-62acccfc.js +34 -0
  122. package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
  123. package/_verture/{index-c40bd040.js → index-131f8fe5.js} +80 -181
  124. package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
  125. package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
  126. package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
  127. package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
  128. package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
  129. package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
  130. package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
  131. package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
  132. package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
  133. package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
  134. package/index.js +15 -15
  135. package/package.json +4 -5
  136. package/_verture/defineProperty-0590dc61.js +0 -16
package/Search/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
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-bf34e6fa.js';
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-af9a2af6.js';
26
+ import '../_verture/useGlobalProps-1b846a65.js';
27
27
  import '@para-ui/core/GlobalContext';
28
- import '../_verture/index-bbed73a3.js';
28
+ import '../_verture/index-be4faaee.js';
29
29
  import 'rc-dropdown';
30
- import '../_verture/usePopupContainer-b8ab7cab.js';
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-f4452258.js';
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
- 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;
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
- _useState2 = _slicedToArray(_useState, 2),
75
- valueCom = _useState2[0],
76
- setValueCom = _useState2[1];
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
- }, []); // 监听value
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