@para-ui/core 4.0.0-rc.4 → 4.0.0-rc.6

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 (188) hide show
  1. package/AutoBox/index.js +72 -85
  2. package/AutoTips/index.js +72 -95
  3. package/Badge/index.js +17 -16
  4. package/Breadcrumbs/index.js +57 -73
  5. package/Button/index.js +90 -118
  6. package/ButtonGroup/index.js +30 -33
  7. package/Carousel/index.js +29 -33
  8. package/Cascader/index.js +9 -10
  9. package/Checkbox/index.js +28 -35
  10. package/CheckboxGroup/index.js +43 -58
  11. package/Collapse/index.js +52 -49
  12. package/CollapseBox/index.js +65 -70
  13. package/CollapseLayout/index.js +106 -101
  14. package/ColorPicker/index.js +3 -3
  15. package/ComboSelect/index.js +260 -337
  16. package/ComboSelect/lang/en_US.d.ts +1 -0
  17. package/ComboSelect/lang/index.d.ts +2 -0
  18. package/ComboSelect/lang/zh_CN.d.ts +1 -0
  19. package/ComboSelect/utils.d.ts +6 -0
  20. package/Container/index.js +17 -21
  21. package/CopyText/index.js +50 -83
  22. package/DatePicker/index.js +24 -27
  23. package/Descriptions/index.js +50 -59
  24. package/Desktop/index.js +161 -180
  25. package/DragVerify/index.js +77 -113
  26. package/Drawer/index.js +80 -95
  27. package/Dropdown/index.js +3 -3
  28. package/DynamicMultiBox/index.js +222 -224
  29. package/DynamicMultiBox/interface.d.ts +7 -0
  30. package/Empty/index.js +26 -28
  31. package/Form/index.js +70 -74
  32. package/FormItem/index.js +18 -15
  33. package/FunctionModal/index.js +7 -14
  34. package/GlobalContext/index.js +17 -20
  35. package/Help/index.js +9 -12
  36. package/HelperText/index.js +11 -11
  37. package/InputLang/index.js +104 -124
  38. package/InputNumber/index.js +62 -81
  39. package/Label/index.js +19 -21
  40. package/Loading/index.js +11 -10
  41. package/Menu/index.js +302 -371
  42. package/Message/index.js +104 -113
  43. package/Modal/index.js +122 -148
  44. package/MultiBox/index.d.ts +5 -0
  45. package/MultiBox/index.js +111 -115
  46. package/Notification/index.js +105 -103
  47. package/OperateBtn/index.d.ts +3 -0
  48. package/OperateBtn/index.js +77 -107
  49. package/PageHeader/index.js +327 -406
  50. package/Pagination/index.js +107 -137
  51. package/ParauiProvider/index.js +20 -22
  52. package/PasswordRules/index.js +36 -40
  53. package/PopConfirm/index.js +60 -77
  54. package/Popover/index.js +12 -12
  55. package/Progress/index.js +72 -74
  56. package/Querying/index.js +22 -23
  57. package/README.md +2 -0
  58. package/Radio/index.js +27 -34
  59. package/RadioGroup/index.js +38 -52
  60. package/Search/index.js +34 -43
  61. package/Select/index.js +281 -345
  62. package/SelectInput/index.js +8 -13
  63. package/Selector/index.js +582 -796
  64. package/SelectorPicker/index.js +113 -134
  65. package/SingleBox/index.d.ts +5 -0
  66. package/SingleBox/index.js +92 -88
  67. package/Slider/index.js +46 -57
  68. package/Status/index.js +14 -13
  69. package/Stepper/index.js +24 -25
  70. package/Styles/theme.scss +9 -9
  71. package/Switch/index.js +32 -35
  72. package/Table/index.js +360 -494
  73. package/Tabs/index.js +100 -100
  74. package/Tag/index.js +64 -82
  75. package/TextEditor/index.js +78 -100
  76. package/TextField/index.js +142 -183
  77. package/TimePicker/index.js +29 -28
  78. package/Timeline/index.js +50 -47
  79. package/Title/index.js +32 -34
  80. package/ToggleButton/index.js +29 -29
  81. package/Tooltip/index.js +52 -56
  82. package/Transfer/index.js +117 -154
  83. package/Tree/index.js +9 -10
  84. package/Upload/index.js +125 -143
  85. package/Upload/interface.d.ts +2 -0
  86. package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
  87. package/_verture/{index-5a7e2438.js → index-3cdaba96.js} +967 -934
  88. package/_verture/{index-b1f80962.js → index-4fafd0a0.js} +6 -8
  89. package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
  90. package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
  91. package/_verture/{index-232d890b.js → index-d63bd287.js} +1 -1
  92. package/_verture/index-da9097d3.js +239 -0
  93. package/_verture/{index-9331b116.js → index-e0f9064d.js} +125 -134
  94. package/_verture/intl-f2f27722.js +69 -0
  95. package/_verture/{modalContext-736ff215.js → modalContext-8534f23d.js} +36 -64
  96. package/_verture/{slicedToArray-a8206399.js → slicedToArray-75fa4188.js} +15 -2
  97. package/_verture/{toConsumableArray-8f4c9589.js → toConsumableArray-c7a8028f.js} +1 -1
  98. package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
  99. package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
  100. package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
  101. package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
  102. package/_verture/utils-c17b5265.js +97 -0
  103. package/index.js +24 -23
  104. package/locale/en-US.d.ts +1 -0
  105. package/locale/index.d.ts +2 -0
  106. package/locale/index.js +10 -8
  107. package/locale/zh-CN.d.ts +1 -0
  108. package/package.json +11 -10
  109. package/umd/AutoBox.js +9 -8
  110. package/umd/AutoTips.js +9 -8
  111. package/umd/Badge.js +1 -1
  112. package/umd/Breadcrumbs.js +9 -8
  113. package/umd/Button.js +9 -8
  114. package/umd/ButtonGroup.js +9 -8
  115. package/umd/Carousel.js +5 -5
  116. package/umd/Cascader.js +9 -8
  117. package/umd/Checkbox.js +9 -8
  118. package/umd/CheckboxGroup.js +9 -8
  119. package/umd/Collapse.js +8 -7
  120. package/umd/CollapseBox.js +1 -1
  121. package/umd/CollapseLayout.js +4 -4
  122. package/umd/ColorPicker.js +1 -1
  123. package/umd/ComboSelect.js +9 -8
  124. package/umd/Container.js +1 -1
  125. package/umd/CopyText.js +9 -8
  126. package/umd/DatePicker.js +9 -8
  127. package/umd/Descriptions.js +9 -8
  128. package/umd/Desktop.js +9 -8
  129. package/umd/DragVerify.js +4 -4
  130. package/umd/Drawer.js +9 -8
  131. package/umd/Dropdown.js +6 -5
  132. package/umd/DynamicMultiBox.js +11 -10
  133. package/umd/Empty.js +1 -1
  134. package/umd/Form.js +9 -8
  135. package/umd/FormItem.js +9 -8
  136. package/umd/FunctionModal.js +9 -8
  137. package/umd/GlobalContext.js +1 -1
  138. package/umd/Help.js +9 -8
  139. package/umd/HelperText.js +1 -1
  140. package/umd/InputLang.js +9 -8
  141. package/umd/InputNumber.js +9 -8
  142. package/umd/Label.js +9 -8
  143. package/umd/Loading.js +4 -4
  144. package/umd/Menu.js +4 -4
  145. package/umd/Message.js +4 -4
  146. package/umd/Modal.js +9 -8
  147. package/umd/MultiBox.js +9 -8
  148. package/umd/Notification.js +8 -7
  149. package/umd/OperateBtn.js +9 -8
  150. package/umd/PageHeader.js +9 -8
  151. package/umd/Pagination.js +9 -8
  152. package/umd/ParauiProvider.js +1 -1
  153. package/umd/PasswordRules.js +4 -4
  154. package/umd/PopConfirm.js +9 -8
  155. package/umd/Popover.js +9 -8
  156. package/umd/Progress.js +5 -5
  157. package/umd/Querying.js +1 -1
  158. package/umd/Radio.js +9 -8
  159. package/umd/RadioGroup.js +9 -8
  160. package/umd/Search.js +9 -8
  161. package/umd/Select.js +9 -8
  162. package/umd/SelectInput.js +9 -8
  163. package/umd/Selector.js +9 -8
  164. package/umd/SelectorPicker.js +9 -8
  165. package/umd/SingleBox.js +9 -8
  166. package/umd/Slider.js +6 -5
  167. package/umd/Status.js +4 -4
  168. package/umd/Stepper.js +9 -8
  169. package/umd/Switch.js +9 -8
  170. package/umd/Table.js +9 -8
  171. package/umd/Tabs.js +9 -8
  172. package/umd/Tag.js +9 -8
  173. package/umd/TextEditor.js +22 -21
  174. package/umd/TextField.js +9 -8
  175. package/umd/TimePicker.js +9 -8
  176. package/umd/Timeline.js +1 -1
  177. package/umd/Title.js +9 -8
  178. package/umd/ToggleButton.js +9 -8
  179. package/umd/Tooltip.js +9 -8
  180. package/umd/Transfer.js +10 -9
  181. package/umd/Tree.js +9 -8
  182. package/umd/Upload.js +10 -9
  183. package/umd/locale.js +1 -1
  184. package/_verture/index-e9007d6a.js +0 -236
  185. package/_verture/intl-5c1ec055.js +0 -81
  186. package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
  187. package/_verture/utils-418da0a4.js +0 -73
  188. /package/_verture/{typeof-c310ee4a.js → typeof-b240b062.js} +0 -0
package/Search/index.js CHANGED
@@ -1,12 +1,9 @@
1
- import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
2
1
  import { jsx } from 'react/jsx-runtime';
3
2
  import { useState, useEffect } from 'react';
4
3
  import { TextField } from '../TextField/index.js';
5
4
  import SearchIcon from '@para-ui/icons/Search';
6
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
5
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
7
6
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
8
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
9
- import '../_verture/typeof-adeedc13.js';
10
7
  import '../_verture/tslib.es6-55ed4bd2.js';
11
8
  import '../Label/index.js';
12
9
  import '../Help/index.js';
@@ -24,50 +21,44 @@ import '../AutoTips/index.js';
24
21
  import '../Loading/index.js';
25
22
  import '@para-ui/icons/LoadingF';
26
23
  import '../HelperText/index.js';
27
- import '../_verture/useGlobalProps-1b846a65.js';
24
+ import '../_verture/useGlobalProps-1e416658.js';
28
25
  import '@para-ui/core/GlobalContext';
29
- import '../_verture/index-e9007d6a.js';
26
+ import '../_verture/index-da9097d3.js';
30
27
  import 'rc-dropdown';
31
- import '../_verture/usePopupContainer-87febeb9.js';
28
+ import '../_verture/usePopupContainer-635f66f4.js';
32
29
  import 'dayjs';
33
30
 
34
31
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-search {\n display: flex;\n width: 100%;\n}\n.paraui-v4-search .search-text-field .text-field-content .text-field-content-within .right-icon svg {\n font-size: 18px;\n}\n.paraui-v4-search .search-text-field .text-field-content .text-field-content-within .right-icon:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content {\n border-radius: 14px;\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .right-icon {\n margin-right: 16px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content {\n border-radius: 14px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .right-icon {\n margin-right: 16px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content {\n border-radius: 16px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .right-icon {\n margin-right: 16px;\n}";
35
32
  styleInject(css_248z);
36
33
 
37
- var Search = function Search(props) {
38
- var _props$className = props.className,
39
- className = _props$className === void 0 ? '' : _props$className,
40
- style = props.style,
41
- _props$size = props.size,
42
- size = _props$size === void 0 ? 'large' : _props$size,
43
- _props$radius = props.radius,
44
- radius = _props$radius === void 0 ? false : _props$radius,
45
- _props$placeholder = props.placeholder,
46
- placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
47
- value = props.value,
48
- rightIcon = props.rightIcon,
49
- _props$allowClear = props.allowClear,
50
- allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
51
- onChange = props.onChange,
52
- onBlur = props.onBlur,
53
- onFocus = props.onFocus,
54
- onKeydown = props.onKeydown,
55
- onKeyUp = props.onKeyUp,
56
- onClickBtn = props.onClickBtn,
57
- onEnter = props.onEnter,
58
- onClear = props.onClear,
59
- otherProps = props.otherProps;
60
- var _useState = useState(''),
61
- _useState2 = _slicedToArray(_useState, 2),
62
- valueCom = _useState2[0],
63
- setValueCom = _useState2[1];
64
- useEffect(function () {
34
+ const Search = props => {
35
+ const {
36
+ className = '',
37
+ style,
38
+ size = 'large',
39
+ radius = false,
40
+ placeholder = '',
41
+ value,
42
+ rightIcon,
43
+ allowClear = true,
44
+ onChange,
45
+ onBlur,
46
+ onFocus,
47
+ onKeydown,
48
+ onKeyUp,
49
+ onClickBtn,
50
+ onEnter,
51
+ onClear,
52
+ otherProps
53
+ } = props;
54
+ const [valueCom, setValueCom] = useState('');
55
+ useEffect(() => {
65
56
  if (props.defaultValue !== undefined) {
66
57
  setValueCom(props.defaultValue);
67
58
  }
68
59
  }, []);
69
60
  // 监听value
70
- useEffect(function () {
61
+ useEffect(() => {
71
62
  if (value !== undefined) {
72
63
  setValueCom(value);
73
64
  }
@@ -76,14 +67,14 @@ var Search = function Search(props) {
76
67
  * 输入框右侧按钮
77
68
  * @return {ReactNode}
78
69
  */
79
- var clearIcon = function clearIcon() {
70
+ const clearIcon = () => {
80
71
  if (rightIcon) return rightIcon;
81
72
  return jsx(SearchIcon, {});
82
73
  };
83
74
  /**
84
75
  * 点击输入框右侧按钮
85
76
  */
86
- var clickRightIcon = function clickRightIcon() {
77
+ const clickRightIcon = () => {
87
78
  if (onClickBtn) {
88
79
  onClickBtn(valueCom);
89
80
  return;
@@ -94,8 +85,8 @@ var Search = function Search(props) {
94
85
  * 改变输入框
95
86
  * @param event {React.ChangeEvent<HTMLInputElement>} 元素
96
87
  */
97
- var changeInput = function changeInput(event) {
98
- var val = event.target.value;
88
+ const changeInput = event => {
89
+ const val = event.target.value;
99
90
  if (props.value === undefined) {
100
91
  setValueCom(val);
101
92
  }
@@ -105,14 +96,14 @@ var Search = function Search(props) {
105
96
  * 处理class
106
97
  * @return {string}
107
98
  */
108
- var handClass = function handClass() {
109
- var str = "".concat($prefixCls, "-search");
99
+ const handClass = () => {
100
+ let str = "".concat($prefixCls, "-search");
110
101
  if (className) str += " ".concat(className);
111
102
  if (size) str += " ".concat($prefixCls, "-search-").concat(size);
112
103
  if (radius) str += " ".concat($prefixCls, "-search-radius");
113
104
  return str;
114
105
  };
115
- var handValue = function handValue() {
106
+ const handValue = () => {
116
107
  if (props.value === undefined) {
117
108
  return valueCom;
118
109
  }