@para-ui/core 4.0.0-rc.3 → 4.0.0-rc.5

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 (180) hide show
  1. package/AutoBox/index.js +72 -85
  2. package/AutoTips/index.js +72 -95
  3. package/Badge/index.js +18 -17
  4. package/Breadcrumbs/index.js +57 -73
  5. package/Button/index.js +89 -117
  6. package/ButtonGroup/index.js +30 -33
  7. package/Carousel/index.js +29 -33
  8. package/Cascader/index.js +7 -9
  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 +242 -330
  16. package/ComboSelect/utils.d.ts +0 -5
  17. package/Container/index.js +17 -21
  18. package/CopyText/index.js +50 -83
  19. package/DatePicker/index.js +22 -27
  20. package/Descriptions/index.js +50 -59
  21. package/Desktop/index.js +161 -180
  22. package/DragVerify/index.js +77 -113
  23. package/Drawer/index.js +82 -97
  24. package/Dropdown/index.js +3 -3
  25. package/DynamicMultiBox/index.js +219 -224
  26. package/DynamicMultiBox/interface.d.ts +7 -0
  27. package/Empty/index.js +26 -28
  28. package/Form/index.js +66 -74
  29. package/FormItem/index.js +14 -15
  30. package/FunctionModal/index.js +7 -14
  31. package/GlobalContext/index.js +17 -20
  32. package/Help/index.js +9 -12
  33. package/HelperText/index.js +11 -11
  34. package/InputLang/index.js +104 -124
  35. package/InputNumber/index.js +62 -81
  36. package/Label/index.js +19 -21
  37. package/Loading/index.js +11 -10
  38. package/Menu/index.js +302 -371
  39. package/Message/index.js +105 -114
  40. package/Modal/index.js +122 -148
  41. package/MultiBox/index.d.ts +5 -0
  42. package/MultiBox/index.js +111 -115
  43. package/Notification/index.js +105 -103
  44. package/OperateBtn/index.d.ts +3 -0
  45. package/OperateBtn/index.js +77 -107
  46. package/PageHeader/index.js +327 -406
  47. package/Pagination/index.js +107 -137
  48. package/ParauiProvider/index.js +20 -22
  49. package/PasswordRules/index.js +36 -40
  50. package/PopConfirm/index.js +62 -79
  51. package/Popover/index.js +12 -12
  52. package/Progress/index.js +72 -74
  53. package/Querying/index.js +52 -59
  54. package/README.md +2 -0
  55. package/Radio/index.js +27 -34
  56. package/RadioGroup/index.js +38 -52
  57. package/Search/index.js +35 -44
  58. package/Select/index.js +323 -364
  59. package/SelectInput/index.js +8 -13
  60. package/Selector/index.js +905 -796
  61. package/SelectorPicker/index.js +111 -133
  62. package/SingleBox/index.d.ts +5 -0
  63. package/SingleBox/index.js +92 -88
  64. package/Slider/index.js +46 -57
  65. package/Status/index.js +14 -13
  66. package/Stepper/index.js +25 -26
  67. package/Styles/theme.scss +9 -9
  68. package/Switch/index.js +32 -35
  69. package/Table/index.js +767 -963
  70. package/Tabs/index.js +102 -102
  71. package/Tag/index.js +115 -162
  72. package/TextEditor/index.js +81 -103
  73. package/TextField/index.js +142 -183
  74. package/TimePicker/index.js +27 -28
  75. package/Timeline/index.js +67 -58
  76. package/Title/index.js +32 -34
  77. package/ToggleButton/index.js +53 -52
  78. package/Tooltip/index.js +79 -82
  79. package/Transfer/index.js +160 -203
  80. package/Tree/index.js +7 -12
  81. package/Upload/index.js +527 -759
  82. package/Upload/interface.d.ts +5 -0
  83. package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
  84. package/_verture/{index-f48d5ce6.js → index-0ced30f7.js} +1128 -1080
  85. package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
  86. package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
  87. package/_verture/index-da9097d3.js +239 -0
  88. package/_verture/{index-56601c94.js → index-ef1235fb.js} +125 -134
  89. package/_verture/{index-de8f4428.js → index-f186b5e8.js} +315 -399
  90. package/_verture/intl-f2f27722.js +69 -0
  91. package/_verture/{modalContext-736ff215.js → modalContext-5df08980.js} +36 -64
  92. package/_verture/{slicedToArray-a8206399.js → slicedToArray-8223a2ef.js} +15 -2
  93. package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
  94. package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
  95. package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
  96. package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
  97. package/_verture/{utils-06d86594.js → utils-46e99c9a.js} +34 -26
  98. package/index.js +21 -22
  99. package/locale/index.js +10 -10
  100. package/package.json +1 -1
  101. package/umd/AutoBox.js +9 -8
  102. package/umd/AutoTips.js +9 -8
  103. package/umd/Badge.js +1 -1
  104. package/umd/Breadcrumbs.js +9 -8
  105. package/umd/Button.js +9 -8
  106. package/umd/ButtonGroup.js +9 -8
  107. package/umd/Carousel.js +5 -5
  108. package/umd/Cascader.js +9 -8
  109. package/umd/Checkbox.js +9 -8
  110. package/umd/CheckboxGroup.js +9 -8
  111. package/umd/Collapse.js +8 -7
  112. package/umd/CollapseBox.js +1 -1
  113. package/umd/CollapseLayout.js +4 -4
  114. package/umd/ColorPicker.js +1 -1
  115. package/umd/ComboSelect.js +9 -8
  116. package/umd/Container.js +1 -1
  117. package/umd/CopyText.js +9 -8
  118. package/umd/DatePicker.js +9 -8
  119. package/umd/Descriptions.js +9 -8
  120. package/umd/Desktop.js +9 -8
  121. package/umd/DragVerify.js +4 -4
  122. package/umd/Drawer.js +9 -8
  123. package/umd/Dropdown.js +6 -5
  124. package/umd/DynamicMultiBox.js +11 -10
  125. package/umd/Empty.js +1 -1
  126. package/umd/Form.js +9 -8
  127. package/umd/FormItem.js +9 -8
  128. package/umd/FunctionModal.js +9 -8
  129. package/umd/GlobalContext.js +1 -1
  130. package/umd/Help.js +9 -8
  131. package/umd/HelperText.js +1 -1
  132. package/umd/InputLang.js +9 -8
  133. package/umd/InputNumber.js +9 -8
  134. package/umd/Label.js +9 -8
  135. package/umd/Loading.js +4 -4
  136. package/umd/Menu.js +4 -4
  137. package/umd/Message.js +4 -4
  138. package/umd/Modal.js +9 -8
  139. package/umd/MultiBox.js +9 -8
  140. package/umd/Notification.js +8 -7
  141. package/umd/OperateBtn.js +9 -8
  142. package/umd/PageHeader.js +9 -8
  143. package/umd/Pagination.js +9 -8
  144. package/umd/ParauiProvider.js +1 -1
  145. package/umd/PasswordRules.js +4 -4
  146. package/umd/PopConfirm.js +9 -8
  147. package/umd/Popover.js +9 -8
  148. package/umd/Progress.js +5 -5
  149. package/umd/Querying.js +1 -1
  150. package/umd/Radio.js +9 -8
  151. package/umd/RadioGroup.js +9 -8
  152. package/umd/Search.js +9 -8
  153. package/umd/Select.js +9 -8
  154. package/umd/SelectInput.js +9 -8
  155. package/umd/Selector.js +9 -8
  156. package/umd/SelectorPicker.js +9 -8
  157. package/umd/SingleBox.js +9 -8
  158. package/umd/Slider.js +6 -5
  159. package/umd/Status.js +4 -4
  160. package/umd/Stepper.js +9 -8
  161. package/umd/Switch.js +9 -8
  162. package/umd/Table.js +9 -8
  163. package/umd/Tabs.js +9 -8
  164. package/umd/Tag.js +9 -8
  165. package/umd/TextEditor.js +22 -21
  166. package/umd/TextField.js +9 -8
  167. package/umd/TimePicker.js +9 -8
  168. package/umd/Timeline.js +1 -1
  169. package/umd/Title.js +9 -8
  170. package/umd/ToggleButton.js +9 -8
  171. package/umd/Tooltip.js +9 -8
  172. package/umd/Transfer.js +10 -9
  173. package/umd/Tree.js +9 -8
  174. package/umd/Upload.js +10 -9
  175. package/umd/locale.js +1 -1
  176. package/_verture/index-232d890b.js +0 -327
  177. package/_verture/index-e9007d6a.js +0 -236
  178. package/_verture/intl-5c1ec055.js +0 -81
  179. package/_verture/toConsumableArray-8f4c9589.js +0 -19
  180. package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
package/Radio/index.js CHANGED
@@ -1,11 +1,9 @@
1
- import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
2
1
  import { jsx, jsxs } from 'react/jsx-runtime';
3
2
  import { useState, useEffect } from 'react';
4
3
  import Label from '../Label/index.js';
5
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
4
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
6
5
  import { Tooltip } from '../Tooltip/index.js';
7
6
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
8
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
9
7
  import '../_verture/tslib.es6-55ed4bd2.js';
10
8
  import '../Help/index.js';
11
9
  import '@para-ui/icons/Help';
@@ -17,32 +15,27 @@ import '@para-ui/icons/Forbid';
17
15
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-radio {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n line-height: 16px;\n}\n.paraui-v4-radio:hover {\n /*& > .radio-label {\n color: $NP1;\n cursor: pointer;\n\n svg {\n color: $NP1;\n }\n }*/\n /*& > .radio-help {\n & > .radio-label {\n color: $NP1;\n cursor: pointer;\n\n svg {\n color: $NP1;\n }\n }\n }*/\n}\n.paraui-v4-radio:hover > .radio-box > .radio-box-inner {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-radio > .radio-box {\n position: relative;\n}\n.paraui-v4-radio > .radio-box > input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n background-color: white;\n border: 1px solid rgb(212, 218, 227);\n border-radius: 50%;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner:after {\n position: absolute;\n display: table;\n content: \" \";\n transform: scale(1) translate(-50%, -50%);\n background-color: white;\n border-radius: 50%;\n left: 50%;\n top: 50%;\n}\n.paraui-v4-radio > .radio-label {\n color: rgb(29, 33, 38);\n padding: 0 8px;\n margin: 0;\n display: inline-flex;\n align-items: flex-start;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-label > .radio-help > svg {\n top: 0;\n}\n.paraui-v4-radio .radio-label {\n line-height: 16px;\n}\n.paraui-v4-radio > .radio-help {\n padding: 0 8px;\n position: relative;\n top: -1px;\n overflow: hidden;\n}\n.paraui-v4-radio > .radio-help > .radio-label {\n width: 100%;\n color: rgb(29, 33, 38);\n margin: 0;\n display: inline-flex;\n align-items: center;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio.paraui-v4-radio-checked > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-radio.paraui-v4-radio-checked:hover > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(87, 131, 235);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled:hover > .radio-box > .radio-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-label svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > input {\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > .radio-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > .radio-box-inner:after {\n background-color: rgb(234, 236, 241);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner {\n background-color: rgb(212, 218, 227);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner:hover > .radio-box > .radio-box-inner {\n background-color: rgb(212, 218, 227);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner:after {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-help {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-help > .radio-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}";
18
16
  styleInject(css_248z);
19
17
 
20
- var Radio = function Radio(props) {
21
- var _props$className = props.className,
22
- className = _props$className === void 0 ? '' : _props$className,
23
- labelTooltip = props.labelTooltip,
24
- _props$label = props.label,
25
- label = _props$label === void 0 ? '' : _props$label,
26
- _props$size = props.size,
27
- size = _props$size === void 0 ? 'large' : _props$size,
28
- _props$disabled = props.disabled,
29
- disabled = _props$disabled === void 0 ? false : _props$disabled,
30
- disabledTooltip = props.disabledTooltip,
31
- width = props.width,
32
- onChange = props.onChange,
33
- style = props.style;
34
- var _useState = useState(false),
35
- _useState2 = _slicedToArray(_useState, 2),
36
- checkedCom = _useState2[0],
37
- setCheckedCom = _useState2[1]; // 复选框状态
38
- useEffect(function () {
18
+ const Radio = props => {
19
+ const {
20
+ className = '',
21
+ labelTooltip,
22
+ label = '',
23
+ size = 'large',
24
+ disabled = false,
25
+ disabledTooltip,
26
+ width,
27
+ onChange,
28
+ style
29
+ } = props;
30
+ const [checkedCom, setCheckedCom] = useState(false); // 复选框状态
31
+ useEffect(() => {
39
32
  if (props.defaultChecked !== undefined) setCheckedCom(props.defaultChecked);
40
33
  }, []);
41
- useEffect(function () {
34
+ useEffect(() => {
42
35
  if (props.checked !== undefined) setCheckedCom(props.checked);
43
36
  }, [props.checked]);
44
37
  // 点击选择
45
- var clickCheck = function clickCheck(e) {
38
+ const clickCheck = e => {
46
39
  e.preventDefault();
47
40
  if (disabled) return;
48
41
  // 不可受控组件
@@ -51,36 +44,36 @@ var Radio = function Radio(props) {
51
44
  onChange && onChange(e, !checkedCom);
52
45
  };
53
46
  // 处理className
54
- var handClass = function handClass() {
55
- var str = "".concat($prefixCls, "-radio");
47
+ const handClass = () => {
48
+ let str = "".concat($prefixCls, "-radio");
56
49
  if (className) str += " ".concat(className);
57
50
  if (size) str += " ".concat($prefixCls, "-radio-").concat(size);
58
51
  if (disabled) str += " ".concat($prefixCls, "-radio-disabled");
59
52
  if (checkedCom) str += " ".concat($prefixCls, "-radio-checked");
60
53
  return str;
61
54
  };
62
- var handLabelClass = function handLabelClass() {
63
- var str = 'radio-label';
55
+ const handLabelClass = () => {
56
+ let str = 'radio-label';
64
57
  if (labelTooltip && labelTooltip.className) {
65
58
  str += " ".concat(labelTooltip.className);
66
59
  }
67
60
  return str;
68
61
  };
69
62
  /** 处理帮组classNaem */
70
- var handHelpClassName = function handHelpClassName() {
71
- var str = ' radio-help';
63
+ const handHelpClassName = () => {
64
+ let str = ' radio-help';
72
65
  if (labelTooltip && labelTooltip.helpClassName) {
73
66
  str += " ".concat(labelTooltip.helpClassName);
74
67
  }
75
68
  return str;
76
69
  };
77
70
  /** 处理样式 */
78
- var handStyle = function handStyle() {
79
- var obj = Object.assign({}, style);
71
+ const handStyle = () => {
72
+ const obj = Object.assign({}, style);
80
73
  if (width) obj.width = width;
81
74
  return obj;
82
75
  };
83
- var contentRender = function contentRender() {
76
+ const contentRender = () => {
84
77
  return jsxs("label", Object.assign({
85
78
  className: handClass(),
86
79
  style: handStyle(),
@@ -103,7 +96,7 @@ var Radio = function Radio(props) {
103
96
  })) : null]
104
97
  }));
105
98
  };
106
- var handleContentRender = function handleContentRender() {
99
+ const handleContentRender = () => {
107
100
  if (disabledTooltip) {
108
101
  return jsx(Tooltip, Object.assign({
109
102
  disabled: true
@@ -1,12 +1,10 @@
1
- import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
2
1
  import { jsxs, jsx } from 'react/jsx-runtime';
3
2
  import { useState, useEffect } from 'react';
4
3
  import { Radio } from '../Radio/index.js';
5
4
  import Label from '../Label/index.js';
6
5
  import HelperText from '../HelperText/index.js';
7
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
6
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
8
7
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
9
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
10
8
  import '../Tooltip/index.js';
11
9
  import '../_verture/tslib.es6-55ed4bd2.js';
12
10
  import 'rc-tooltip';
@@ -19,59 +17,47 @@ import '@para-ui/icons/Help';
19
17
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-radio-group {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 100%;\n}\n.paraui-v4-radio-group > .radio-group-label {\n margin-bottom: 6px;\n}\n.paraui-v4-radio-group > .radio-group-content {\n line-height: 0;\n}\n.paraui-v4-radio-group > .radio-group-content .radio-item-box {\n margin-bottom: 4px;\n}\n.paraui-v4-radio-group > .radio-group-content > .radio-group-content-item {\n margin-bottom: 6px;\n}\n.paraui-v4-radio-group > .radio-group-content > .radio-group-content-item:last-child {\n margin-bottom: 0;\n}\n.paraui-v4-radio-group.paraui-v4-radio-group-column > .radio-group-content {\n display: flex;\n flex-direction: column;\n}\n.paraui-v4-radio-group.paraui-v4-radio-group-column > .radio-group-content > span {\n margin-bottom: 10px;\n}\n.paraui-v4-radio-group.paraui-v4-radio-group-column > .radio-group-content > span:last-child {\n margin-bottom: 0;\n}";
20
18
  styleInject(css_248z);
21
19
 
22
- var RadioGroup = function RadioGroup(props) {
23
- var _props$className = props.className,
24
- className = _props$className === void 0 ? '' : _props$className,
25
- style = props.style,
26
- label = props.label,
27
- labelTooltip = props.labelTooltip,
28
- _props$spacing = props.spacing,
29
- spacing = _props$spacing === void 0 ? '32px' : _props$spacing,
30
- itemWidth = props.itemWidth,
31
- _props$size = props.size,
32
- size = _props$size === void 0 ? 'large' : _props$size,
33
- _props$row = props.row,
34
- row = _props$row === void 0 ? true : _props$row,
35
- _props$disabled = props.disabled,
36
- disabled = _props$disabled === void 0 ? false : _props$disabled,
37
- _props$required = props.required,
38
- required = _props$required === void 0 ? false : _props$required,
39
- _props$error = props.error,
40
- error = _props$error === void 0 ? false : _props$error,
41
- hideErrorDom = props.hideErrorDom,
42
- _props$helperText = props.helperText,
43
- helperText = _props$helperText === void 0 ? '' : _props$helperText,
44
- _props$id = props.id,
45
- id = _props$id === void 0 ? 'name' : _props$id,
46
- value = props.value,
47
- list = props.list,
48
- onChange = props.onChange;
49
- var _useState = useState(),
50
- _useState2 = _slicedToArray(_useState, 2),
51
- valueCom = _useState2[0],
52
- setValueCom = _useState2[1];
53
- useEffect(function () {
20
+ const RadioGroup = props => {
21
+ const {
22
+ className = '',
23
+ style,
24
+ label,
25
+ labelTooltip,
26
+ spacing = '32px',
27
+ itemWidth,
28
+ size = 'large',
29
+ row = true,
30
+ disabled = false,
31
+ required = false,
32
+ error = false,
33
+ hideErrorDom,
34
+ helperText = '',
35
+ id = 'name',
36
+ value,
37
+ list,
38
+ onChange
39
+ } = props;
40
+ const [valueCom, setValueCom] = useState();
41
+ useEffect(() => {
54
42
  if (props.defaultValue !== undefined) setValueCom(props.defaultValue);
55
43
  }, []);
56
- useEffect(function () {
44
+ useEffect(() => {
57
45
  if (value !== undefined) setValueCom(value);
58
46
  }, [value]);
59
47
  /**
60
48
  * 改变值
61
49
  * @param item 点击当前项数据
62
50
  */
63
- var onchangeCom = function onchangeCom(item) {
64
- return function () {
65
- var name = item[id]; // 值
66
- if (value === name) return;
67
- if (props.value === undefined) setValueCom(name);
68
- onChange && onChange(name, item);
69
- };
51
+ const onchangeCom = item => () => {
52
+ const name = item[id]; // 值
53
+ if (value === name) return;
54
+ if (props.value === undefined) setValueCom(name);
55
+ onChange && onChange(name, item);
70
56
  };
71
- var handLabel = function handLabel() {
57
+ const handLabel = () => {
72
58
  if (label || required) {
73
- var handLabelClass = function handLabelClass() {
74
- var str = 'radio-group-label';
59
+ const handLabelClass = () => {
60
+ let str = 'radio-group-label';
75
61
  if (labelTooltip && labelTooltip.className) {
76
62
  str += " ".concat(labelTooltip.className);
77
63
  }
@@ -88,8 +74,8 @@ var RadioGroup = function RadioGroup(props) {
88
74
  /**
89
75
  * @description 处理单选框每一项样式
90
76
  * */
91
- var handStyleItem = function handStyleItem(item, index, arr) {
92
- var obj = Object.assign({
77
+ const handStyleItem = (item, index, arr) => {
78
+ const obj = Object.assign({
93
79
  display: 'inline-block'
94
80
  }, item.style);
95
81
  if (spacing && row && arr.length !== index + 1) {
@@ -101,8 +87,8 @@ var RadioGroup = function RadioGroup(props) {
101
87
  return obj;
102
88
  };
103
89
  // 处理class
104
- var handClass = function handClass() {
105
- var str = "".concat($prefixCls, "-radio-group");
90
+ const handClass = () => {
91
+ let str = "".concat($prefixCls, "-radio-group");
106
92
  if (className) str += " ".concat(className);
107
93
  if (size) str += " ".concat($prefixCls, "-radio-group-size");
108
94
  if (error) str += " ".concat($prefixCls, "-radio-group-error");
@@ -117,12 +103,12 @@ var RadioGroup = function RadioGroup(props) {
117
103
  children: [handLabel(), jsx("div", Object.assign({
118
104
  className: "radio-group-content"
119
105
  }, {
120
- children: list.map(function (item, index) {
106
+ children: list.map((item, index) => {
121
107
  if (Array.isArray(item)) {
122
108
  return jsx("div", Object.assign({
123
109
  className: "radio-group-content-item"
124
110
  }, {
125
- children: item.map(function (itemChild, inx) {
111
+ children: item.map((itemChild, inx) => {
126
112
  return jsx("span", Object.assign({
127
113
  className: 'radio-item-box',
128
114
  style: handStyleItem(itemChild, inx, item)
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
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\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}";
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
  }