@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
@@ -1,5 +1,3 @@
1
- import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
2
- import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
3
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
2
  import { useState, useEffect, Fragment as Fragment$1 } from 'react';
5
3
  import { Title } from '../Title/index.js';
@@ -7,11 +5,9 @@ import AutoTips from '../AutoTips/index.js';
7
5
  import CollapseBox from '../CollapseBox/index.js';
8
6
  import { Button } from '../Button/index.js';
9
7
  import clsx from 'clsx';
10
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
11
- import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
8
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
9
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
12
10
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
13
- import '../_verture/typeof-adeedc13.js';
14
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
15
11
  import '../Help/index.js';
16
12
  import '../_verture/tslib.es6-55ed4bd2.js';
17
13
  import '../Tooltip/index.js';
@@ -24,12 +20,12 @@ import 'rc-collapse';
24
20
  import '@para-ui/icons/Right';
25
21
  import '@paraview/lib';
26
22
  import 'react-transition-group';
27
- import '../_verture/util-7e1fb1e2.js';
23
+ import '../_verture/util-82646c4f.js';
28
24
  import '@para-ui/icons/LoadingF';
29
25
  import '@para-ui/icons/Down';
30
- import '../_verture/index-e9007d6a.js';
26
+ import '../_verture/index-da9097d3.js';
31
27
  import 'rc-dropdown';
32
- import '../_verture/usePopupContainer-87febeb9.js';
28
+ import '../_verture/usePopupContainer-635f66f4.js';
33
29
  import 'dayjs';
34
30
  import '@para-ui/core/GlobalContext';
35
31
 
@@ -44,52 +40,45 @@ var zh = {
44
40
  };
45
41
 
46
42
  var localeJson = {
47
- zh: zh,
48
- en: en
43
+ zh,
44
+ en
49
45
  };
50
46
 
51
47
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/11/9 14:21\n* @description 样式\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-descriptions .paraui-v4-title {\n margin-bottom: 20px;\n}\n.paraui-v4-descriptions .table-box {\n display: inline-flex;\n}\n.paraui-v4-descriptions .table-box > table {\n table-layout: fixed;\n width: 100%;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr {\n text-align: left;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr th, .paraui-v4-descriptions .table-box > table > tbody > tr .title {\n color: rgb(92, 101, 115);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v4-descriptions .table-box > table > tbody > tr td, .paraui-v4-descriptions .table-box > table > tbody > tr .content {\n color: rgb(29, 33, 38);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v4-descriptions .collapse-btn {\n margin: 0;\n height: 20px;\n line-height: 20px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box {\n border: 1px solid rgb(212, 218, 227);\n overflow: hidden;\n border-radius: 4px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table {\n border-collapse: collapse;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr:last-child {\n border-bottom: none;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th, .paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > td {\n height: 40px;\n border-right: 1px solid rgb(212, 218, 227);\n padding: 0 10px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > th:last-child, .paraui-v4-descriptions.paraui-v4-descriptions-border .table-box > table > tbody > tr > td:last-child {\n border-right: none;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container {\n display: flex;\n padding-bottom: 10px;\n padding-right: 40px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container > .title {\n display: flex;\n overflow: hidden;\n max-width: 50%;\n margin-right: 10px;\n}\n.paraui-v4-descriptions.paraui-v4-descriptions-horizontal .table-box > table > tbody > tr > td > .item-container > .content {\n flex: 1;\n overflow: hidden;\n}";
52
48
  styleInject(css_248z);
53
49
 
54
- var Descriptions = function Descriptions(props) {
55
- var className = props.className,
56
- style = props.style,
57
- _props$layout = props.layout,
58
- layout = _props$layout === void 0 ? 'horizontal' : _props$layout,
59
- border = props.border,
60
- title = props.title,
61
- list = props.list,
62
- column = props.column,
63
- collapse = props.collapse,
64
- _props$defaultOpen = props.defaultOpen,
65
- defaultOpen = _props$defaultOpen === void 0 ? false : _props$defaultOpen,
66
- open = props.open,
67
- _props$collapsedHeigh = props.collapsedHeight,
68
- collapsedHeight = _props$collapsedHeigh === void 0 ? 60 : _props$collapsedHeigh,
69
- onCollapse = props.onCollapse;
70
- var intl = useFormatMessage('Descriptions', localeJson);
71
- var _useState = useState(false),
72
- _useState2 = _slicedToArray(_useState, 2),
73
- openCom = _useState2[0],
74
- setOpenCom = _useState2[1];
75
- var _useState3 = useState([]),
76
- _useState4 = _slicedToArray(_useState3, 2),
77
- rowConfig = _useState4[0],
78
- setRowConfig = _useState4[1]; // 二维数组,每一行配置信息
79
- useEffect(function () {
50
+ const Descriptions = props => {
51
+ const {
52
+ className,
53
+ style,
54
+ layout = 'horizontal',
55
+ border,
56
+ title,
57
+ list,
58
+ column,
59
+ collapse,
60
+ defaultOpen = false,
61
+ open,
62
+ collapsedHeight = 60,
63
+ onCollapse
64
+ } = props;
65
+ const intl = useFormatMessage('Descriptions', localeJson);
66
+ const [openCom, setOpenCom] = useState(false);
67
+ const [rowConfig, setRowConfig] = useState([]); // 二维数组,每一行配置信息
68
+ useEffect(() => {
80
69
  if (defaultOpen !== undefined) setOpenCom(defaultOpen);
81
70
  }, [defaultOpen]);
82
- useEffect(function () {
71
+ useEffect(() => {
83
72
  if (open !== undefined) setOpenCom(open);
84
73
  }, [open]);
85
- useEffect(function () {
86
- var listCom = list ? list : [];
87
- var rowCount = handleRowCount();
88
- var accumulate = 0;
89
- var arr = [];
90
- var arrChild = [];
91
- for (var i = 0, l = listCom.length; i < l; i++) {
92
- var item = listCom[i];
74
+ useEffect(() => {
75
+ const listCom = list ? list : [];
76
+ const rowCount = handleRowCount();
77
+ let accumulate = 0;
78
+ const arr = [];
79
+ let arrChild = [];
80
+ for (let i = 0, l = listCom.length; i < l; i++) {
81
+ const item = listCom[i];
93
82
  accumulate += item.column || 1;
94
83
  arrChild.push(item);
95
84
  if (accumulate >= rowCount) {
@@ -103,7 +92,7 @@ var Descriptions = function Descriptions(props) {
103
92
  setRowConfig(arr);
104
93
  }, [list, layout, column]);
105
94
  /** 处理行个数 */
106
- var handleRowCount = function handleRowCount() {
95
+ const handleRowCount = () => {
107
96
  if (column) return column;
108
97
  if (layout === 'horizontal' && !border) {
109
98
  return 4;
@@ -111,9 +100,9 @@ var Descriptions = function Descriptions(props) {
111
100
  return layout === 'horizontal' ? 3 : 4;
112
101
  };
113
102
  /** 处理横向展示 */
114
- var handleContentHorizontal = function handleContentHorizontal(item, index) {
103
+ const handleContentHorizontal = (item, index) => {
115
104
  return jsx("tr", {
116
- children: item.map(function (itemChild, indexChild) {
105
+ children: item.map((itemChild, indexChild) => {
117
106
  return jsx(Fragment$1, {
118
107
  children: border ? jsxs(Fragment, {
119
108
  children: [jsx("th", Object.assign({
@@ -151,10 +140,10 @@ var Descriptions = function Descriptions(props) {
151
140
  }, index);
152
141
  };
153
142
  /** 处理纵向展示 */
154
- var handleContentVertical = function handleContentVertical(item, index) {
143
+ const handleContentVertical = (item, index) => {
155
144
  return jsxs(Fragment$1, {
156
145
  children: [jsx("tr", {
157
- children: item.map(function (itemChild, indexChild) {
146
+ children: item.map((itemChild, indexChild) => {
158
147
  return jsx("th", Object.assign({
159
148
  colSpan: itemChild.column || 1
160
149
  }, {
@@ -162,7 +151,7 @@ var Descriptions = function Descriptions(props) {
162
151
  }), indexChild);
163
152
  })
164
153
  }), jsx("tr", {
165
- children: item.map(function (itemChild, indexChild) {
154
+ children: item.map((itemChild, indexChild) => {
166
155
  return jsx("td", Object.assign({
167
156
  colSpan: itemChild.column || 1
168
157
  }, {
@@ -173,13 +162,13 @@ var Descriptions = function Descriptions(props) {
173
162
  }, index);
174
163
  };
175
164
  /** 处理内容 */
176
- var handleContent = function handleContent() {
165
+ const handleContent = () => {
177
166
  return jsx("div", Object.assign({
178
167
  className: 'table-box'
179
168
  }, {
180
169
  children: jsx("table", {
181
170
  children: jsx("tbody", {
182
- children: rowConfig.map(function (item, index) {
171
+ children: rowConfig.map((item, index) => {
183
172
  if (layout === 'horizontal') return handleContentHorizontal(item, index);
184
173
  return handleContentVertical(item, index);
185
174
  })
@@ -188,21 +177,21 @@ var Descriptions = function Descriptions(props) {
188
177
  }));
189
178
  };
190
179
  /** 处理标题 */
191
- var handleLabel = function handleLabel() {
180
+ const handleLabel = () => {
192
181
  if (title) {
193
- var titleProps = {
182
+ let titleProps = {
194
183
  title: ''
195
184
  };
196
185
  if (typeof title === 'string') titleProps.title = title;else titleProps = title;
197
186
  return jsx(Title, Object.assign({}, titleProps));
198
187
  }
199
188
  };
200
- var onClickCollapse = function onClickCollapse() {
189
+ const onClickCollapse = () => {
201
190
  onCollapse && onCollapse(!openCom);
202
191
  if (open === undefined) setOpenCom(!openCom);
203
192
  };
204
193
  /** 处理是否折叠 */
205
- var handleContentCollapse = function handleContentCollapse() {
194
+ const handleContentCollapse = () => {
206
195
  if (collapse && !border) {
207
196
  return jsxs(Fragment, {
208
197
  children: [jsx(CollapseBox, Object.assign({
@@ -223,7 +212,9 @@ var Descriptions = function Descriptions(props) {
223
212
  };
224
213
  return jsxs("div", Object.assign({
225
214
  style: style,
226
- className: clsx("".concat($prefixCls, "-descriptions"), className, "".concat($prefixCls, "-descriptions-").concat(layout), _defineProperty({}, "".concat($prefixCls, "-descriptions-border"), border))
215
+ className: clsx("".concat($prefixCls, "-descriptions"), className, "".concat($prefixCls, "-descriptions-").concat(layout), {
216
+ ["".concat($prefixCls, "-descriptions-border")]: border
217
+ })
227
218
  }, {
228
219
  children: [handleLabel(), handleContentCollapse()]
229
220
  }));