@para-ui/core 3.0.28 → 3.0.30

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 (140) 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 +222 -349
  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 +38 -80
  33. package/FormItem/index.d.ts +1 -1
  34. package/FormItem/index.js +11 -11
  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 +44 -76
  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 +2 -2
  60. package/Pagination/index.js +79 -131
  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 +813 -800
  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 +285 -681
  76. package/SelectorPicker/index.js +62 -97
  77. package/SingleBox/index.js +30 -55
  78. package/Slider/index.d.ts +1 -1
  79. package/Slider/index.js +29 -41
  80. package/Slider/interface.d.ts +2 -2
  81. package/Split/index.js +10 -23
  82. package/Status/index.js +8 -7
  83. package/Stepper/index.d.ts +1 -1
  84. package/Stepper/index.js +20 -25
  85. package/Styles/form.scss +5 -5
  86. package/Styles/index.scss +37 -37
  87. package/Styles/normalize.scss +348 -348
  88. package/Styles/scrollbar.scss +223 -223
  89. package/Styles/theme.scss +74 -74
  90. package/Switch/index.d.ts +2 -2
  91. package/Switch/index.js +19 -20
  92. package/Table/index.js +568 -1019
  93. package/Table/interface.d.ts +5 -5
  94. package/Tabs/index.d.ts +3 -3
  95. package/Tabs/index.js +47 -65
  96. package/Tag/TagGroup.d.ts +1 -1
  97. package/Tag/index.d.ts +2 -2
  98. package/Tag/index.js +72 -107
  99. package/TextEditor/index.d.ts +2 -2
  100. package/TextEditor/index.js +81 -105
  101. package/TextField/index.js +141 -220
  102. package/TimePicker/index.d.ts +1 -1
  103. package/TimePicker/index.js +12 -15
  104. package/Timeline/index.js +42 -52
  105. package/Title/index.js +10 -9
  106. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  107. package/ToggleButton/index.js +50 -70
  108. package/Tooltip/index.js +64 -98
  109. package/Tooltip/interface.d.ts +1 -1
  110. package/Transfer/index.d.ts +1 -1
  111. package/Transfer/index.js +114 -137
  112. package/Transfer/useClick.d.ts +1 -1
  113. package/Tree/index.js +10 -10
  114. package/Tree/interface.d.ts +6 -6
  115. package/Upload/Dragger/index.d.ts +1 -1
  116. package/Upload/ImageUpload/index.d.ts +1 -1
  117. package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
  118. package/Upload/index.d.ts +1 -1
  119. package/Upload/index.js +283 -475
  120. package/Upload/interface.d.ts +2 -2
  121. package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
  122. package/_verture/defineProperty-62acccfc.js +34 -0
  123. package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
  124. package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
  125. package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
  126. package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
  127. package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
  128. package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
  129. package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
  130. package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
  131. package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
  132. package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
  133. package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
  134. package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
  135. package/index.d.ts +2 -4
  136. package/index.js +15 -16
  137. package/package.json +167 -168
  138. package/Test/index.d.ts +0 -3
  139. package/Test/index.js +0 -9
  140. package/_verture/defineProperty-0590dc61.js +0 -16
@@ -5,9 +5,9 @@
5
5
  */
6
6
  import React, { ReactNode } from 'react';
7
7
  /** 菜单类型 */
8
- export declare type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
8
+ export type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
9
9
  /** color类型 */
10
- export declare type ColorType = 'deep' | 'light';
10
+ export type ColorType = 'deep' | 'light';
11
11
  /** logo参数 */
12
12
  export interface LogoProps {
13
13
  /** 展开 / 收起 */
@@ -6,7 +6,7 @@
6
6
  import { FunctionComponent } from 'react';
7
7
  import { MenuListProps } from './interface';
8
8
  /** 上下箭头 */
9
- export declare type FlipDisable = {
9
+ export type FlipDisable = {
10
10
  prev: boolean;
11
11
  next: boolean;
12
12
  };
@@ -17,7 +17,7 @@ interface MsgGlobalConfig {
17
17
  }
18
18
  declare const _default: () => JSX.Element;
19
19
  export default _default;
20
- export declare type MsgTypeProps = {
20
+ export type MsgTypeProps = {
21
21
  /**是否启用html渲染内容*/
22
22
  html?: boolean;
23
23
  /**是否强制显示关闭按钮,默认自动当延迟关闭事件为0或null时自动显示*/
package/Message/index.js CHANGED
@@ -5,41 +5,41 @@ import WarningCircleF from '@para-ui/icons/WarningCircleF';
5
5
  import CompleteIcon from '@para-ui/icons/CheckCircleF';
6
6
  import CloseIcon from '@para-ui/icons/Close';
7
7
  import CloseCircleFilled from '@para-ui/icons/CloseCircleF';
8
- import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
8
+ import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
9
9
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
10
10
 
11
11
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/1 下午5:48\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-message-box {\n position: fixed;\n top: 3%;\n left: 0;\n z-index: 9999;\n text-align: center;\n width: 100%;\n pointer-events: none;\n /*从上到下进入*/\n /*从上到下*/\n}\n.paraui-v3-message-box .msg-item .msg-wrapper {\n position: relative;\n display: inline-block;\n margin: 10px auto;\n min-height: 44px;\n padding: 12px 16px;\n border-radius: 4px;\n font-size: 14px;\n text-align: left;\n}\n.paraui-v3-message-box .msg-item .msg-icon {\n position: absolute;\n top: 15px;\n left: 16px;\n line-height: 0;\n}\n.paraui-v3-message-box .msg-item .msg-icon svg {\n font-size: 14px;\n color: currentColor;\n}\n.paraui-v3-message-box .msg-item .msg-text {\n display: inline-block;\n max-width: 60vw;\n word-wrap: break-word;\n margin-right: 32px;\n margin-left: 22px;\n line-height: 20px;\n word-break: break-all;\n}\n.paraui-v3-message-box .msg-item .msg-text--title {\n font-weight: 700;\n}\n.paraui-v3-message-box .msg-item .msg-text--noicon {\n margin-left: 0;\n}\n.paraui-v3-message-box .msg-item .msg-text .msg-desc {\n display: block;\n margin-top: 8px;\n font-weight: 400;\n word-wrap: break-word;\n}\n.paraui-v3-message-box .msg-item .msg-close {\n position: absolute;\n right: 16px;\n top: 15px;\n cursor: pointer;\n line-height: 0;\n pointer-events: auto;\n}\n.paraui-v3-message-box .msg-item .msg-close svg {\n font-size: 14px;\n color: currentColor;\n}\n.paraui-v3-message-box .msg-info {\n background-color: rgb(243, 246, 252);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-message-box .msg-info .msg-close {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-message-box .msg-warn {\n background-color: rgb(254, 249, 245);\n color: rgb(255, 161, 80);\n}\n.paraui-v3-message-box .msg-warn .msg-close {\n color: rgb(255, 161, 80);\n}\n.paraui-v3-message-box .msg-error {\n background-color: rgb(253, 246, 245);\n color: rgb(235, 96, 84);\n}\n.paraui-v3-message-box .msg-error .msg-close {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-message-box .msg-success {\n background-color: rgb(245, 251, 242);\n color: rgb(83, 195, 27);\n}\n.paraui-v3-message-box .msg-success .msg-close {\n color: rgb(83, 195, 27);\n}\n.paraui-v3-message-box .message-fadeInDown {\n animation-duration: 0.5s;\n animation-name: messageFadeInDown;\n}\n@keyframes messageFadeInDown {\n from {\n opacity: 0;\n transform: translate(0, -50px); /* 标准语法 */\n }\n to {\n opacity: 1;\n transform: translate(0, 0); /* 标准语法 */\n }\n}";
12
12
  styleInject(css_248z);
13
13
 
14
+ //图标map
14
15
  var iconMapping = {
15
16
  'info': jsx(WarningCircleF, {}),
16
17
  'warn': jsx(WarningCircleF, {}),
17
18
  'error': jsx(CloseCircleFilled, {}),
18
19
  'success': jsx(CompleteIcon, {})
19
- }; //获取window
20
-
20
+ };
21
+ //获取window
21
22
  var getMsgWindow = function getMsgWindow() {
22
23
  return window === window.top ? window : window.top;
23
- }; //消息内容模板
24
-
25
-
24
+ };
25
+ //消息内容模板
26
26
  var template = function template(_ref) {
27
27
  var icon = _ref.icon,
28
- text = _ref.text,
29
- id = _ref.id,
30
- type = _ref.type,
31
- html = _ref.html,
32
- close = _ref.close,
33
- desc = _ref.desc,
34
- hideIcon = _ref.hideIcon;
28
+ text = _ref.text,
29
+ id = _ref.id,
30
+ type = _ref.type,
31
+ html = _ref.html,
32
+ close = _ref.close,
33
+ desc = _ref.desc,
34
+ hideIcon = _ref.hideIcon;
35
35
  var item = document.createElement('div');
36
36
  item.className = "msg-item";
37
37
  item.id = id;
38
38
  item.innerHTML = "<div class=\"msg-wrapper message-fadeInDown msg-".concat(type, "\">\n ").concat(icon ? "<div class=\"msg-icon\"></div>" : '', "\n <div class=\"msg-text\"></div>\n ").concat(close ? "<div class=\"msg-close\"></div>" : '', "\n </div>\n ");
39
39
  var msgBox = item.querySelector('.msg-text');
40
40
  if (!msgBox) return item;
41
- if (html) msgBox.innerHTML = text;else msgBox.textContent = text; //描述
42
-
41
+ if (html) msgBox.innerHTML = text;else msgBox.textContent = text;
42
+ //描述
43
43
  if (desc) {
44
44
  var span = document.createElement('span');
45
45
  span.className = 'msg-desc';
@@ -47,44 +47,39 @@ var template = function template(_ref) {
47
47
  msgBox.classList.add('msg-text--title');
48
48
  msgBox.appendChild(span);
49
49
  }
50
-
51
50
  if (hideIcon) {
52
51
  msgBox.classList.add('msg-text--noicon');
53
52
  }
54
-
55
53
  var msgClose = item.querySelector('.msg-close');
56
54
  if (msgClose) msgClose.addEventListener('click', function () {
57
55
  var _a;
58
-
59
56
  var hasNode = document.querySelector("#".concat(id));
60
-
61
57
  if (hasNode) {
62
58
  (_a = item === null || item === void 0 ? void 0 : item.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(item);
63
59
  item = null;
64
60
  }
65
61
  });
66
62
  return item;
67
- }; //消息box id
68
-
69
-
70
- var parentId = 'msgbox_' + String(Math.random() * 100000 | 0 + new Date().getTime()); //message mountNode
71
-
63
+ };
64
+ //消息box id
65
+ var parentId = 'msgbox_' + String(Math.random() * 100000 | 0 + new Date().getTime());
66
+ //message mountNode
72
67
  var index = (function () {
73
68
  return jsx("div", {
74
69
  className: "".concat($prefixCls, "-message-box"),
75
70
  id: parentId
76
71
  });
77
- }); //渲染msg 内容
78
-
72
+ });
73
+ //渲染msg 内容
79
74
  var renderContent = function renderContent(box, _ref2, removeTime, autoClose) {
80
75
  var icon = _ref2.icon,
81
- text = _ref2.text,
82
- id = _ref2.id,
83
- type = _ref2.type,
84
- html = _ref2.html,
85
- close = _ref2.close,
86
- desc = _ref2.desc,
87
- hideIcon = _ref2.hideIcon;
76
+ text = _ref2.text,
77
+ id = _ref2.id,
78
+ type = _ref2.type,
79
+ html = _ref2.html,
80
+ close = _ref2.close,
81
+ desc = _ref2.desc,
82
+ hideIcon = _ref2.hideIcon;
88
83
  var item = template({
89
84
  id: id,
90
85
  text: text,
@@ -105,26 +100,22 @@ var renderContent = function renderContent(box, _ref2, removeTime, autoClose) {
105
100
  var hasNode = document.querySelector("#".concat(item.id));
106
101
  if (hasNode) box === null || box === void 0 ? void 0 : box.removeChild(item);
107
102
  }, removeTime);
108
- }; //message 构造方法
109
-
110
-
103
+ };
104
+ //message 构造方法
111
105
  var Msg = function Msg(config, removeTime, type, parentId) {
112
106
  var _a, _b;
113
-
114
107
  var getMsgConf = function getMsgConf() {
115
108
  var _win = getMsgWindow();
116
-
117
109
  return _win['__msg_conf__'] || {};
118
110
  };
119
-
120
111
  var icon = iconMapping[type],
121
- text = '',
122
- desc = '',
123
- html = false,
124
- close,
125
- hideIcon = false,
126
- maxCount = (_a = getMsgConf().maxCount) !== null && _a !== void 0 ? _a : Infinity,
127
- duration = (_b = getMsgConf().duration) !== null && _b !== void 0 ? _b : removeTime;
112
+ text = '',
113
+ desc = '',
114
+ html = false,
115
+ close,
116
+ hideIcon = false,
117
+ maxCount = (_a = getMsgConf().maxCount) !== null && _a !== void 0 ? _a : Infinity,
118
+ duration = (_b = getMsgConf().duration) !== null && _b !== void 0 ? _b : removeTime;
128
119
  var autoClose = !isNaN(duration) && duration > 0;
129
120
  if (typeof config === "string") text = config;else if (_typeof(config) === "object") {
130
121
  text = config.text || '';
@@ -136,13 +127,11 @@ var Msg = function Msg(config, removeTime, type, parentId) {
136
127
  }
137
128
  if (_typeof(config) === "object" && typeof config.close === "boolean") close = config.close;else close = !autoClose;
138
129
  var parent = document.getElementById(parentId);
139
-
140
130
  if (!parent) {
141
131
  parent = document.createElement('div');
142
132
  parent.id = parentId;
143
133
  document.body.appendChild(parent);
144
134
  }
145
-
146
135
  parent.className = "".concat($prefixCls, "-message-box").concat('');
147
136
  var id = 'msgitem_' + String(Math.random() * 100000 | 0 + new Date().getTime());
148
137
  renderContent(parent, {
@@ -156,16 +145,13 @@ var Msg = function Msg(config, removeTime, type, parentId) {
156
145
  hideIcon: hideIcon
157
146
  }, duration, autoClose);
158
147
  dropEleWhenExceedLimit(parent, maxCount);
159
- }; //超出maxCount 删除之前元素
160
-
161
-
148
+ };
149
+ //超出maxCount 删除之前元素
162
150
  var dropEleWhenExceedLimit = function dropEleWhenExceedLimit(parent, maxCount) {
163
151
  var _a, _b;
164
-
165
152
  if (!parent || !((_a = parent.children) === null || _a === void 0 ? void 0 : _a.length)) return;
166
153
  var child = parent.children;
167
154
  var len = child.length;
168
-
169
155
  if (len > maxCount) {
170
156
  for (var i = 0; i < len; i++) {
171
157
  if (i < maxCount && child[i]) {
@@ -173,25 +159,20 @@ var dropEleWhenExceedLimit = function dropEleWhenExceedLimit(parent, maxCount) {
173
159
  }
174
160
  }
175
161
  }
176
- }; //清除所有msg
177
-
178
-
162
+ };
163
+ //清除所有msg
179
164
  var clearFunc = function clearFunc(parentId) {
180
165
  var parent = document.getElementById(parentId);
181
166
  if (!parent) return;
182
167
  parent.innerHTML = '';
183
- }; //msg 全局配置
184
-
185
-
168
+ };
169
+ //msg 全局配置
186
170
  var msgConfig = function msgConfig() {
187
171
  var conf = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
188
-
189
172
  var _win = getMsgWindow();
190
-
191
173
  _win.__msg_conf__ = conf;
192
- }; //message
193
-
194
-
174
+ };
175
+ //message
195
176
  var Message = {
196
177
  info: function info(config) {
197
178
  var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from "react";
2
2
  import { ButtonProps } from "../../Button";
3
3
  import './index.scss';
4
- declare type ConfirmType = "success" | "info" | "error" | "warn" | "warning";
4
+ type ConfirmType = "success" | "info" | "error" | "warn" | "warning";
5
5
  interface ConfirmDialogProps {
6
6
  /**图标类型*/
7
7
  type?: ConfirmType;
@@ -48,7 +48,7 @@ interface ConfirmDialogProps {
48
48
  /**销毁方法*/
49
49
  destroy?: Function;
50
50
  }
51
- declare type ConfirmProps = Omit<ConfirmDialogProps, 'open' | 'resolveFn' | 'destroy' | 'callback'> & {
51
+ type ConfirmProps = Omit<ConfirmDialogProps, 'open' | 'resolveFn' | 'destroy' | 'callback'> & {
52
52
  uuid?: string;
53
53
  };
54
54
  interface ConfirmFn {
package/Modal/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { ButtonProps } from '../Button';
3
3
  import { Confirm, ConfirmObject } from "./Confirm";
4
4
  import './index.scss';
5
- declare type ModalSize = 'sm' | 'md' | 'lg' | 'auto' | 'fullScreen';
5
+ type ModalSize = 'sm' | 'md' | 'lg' | 'auto' | 'fullScreen';
6
6
  export interface ModalProps {
7
7
  /** 对话框是否可见 */
8
8
  visible?: boolean;