@para-ui/core 3.0.108 → 3.0.109-rc.1

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 (183) hide show
  1. package/AutoBox/index.js +5 -9
  2. package/AutoTips/index.js +5 -12
  3. package/Breadcrumbs/index.js +7 -11
  4. package/Button/index.js +8 -12
  5. package/ButtonGroup/index.js +8 -12
  6. package/Carousel/index.js +4 -8
  7. package/Cascader/index.js +7 -11
  8. package/Checkbox/index.js +4 -8
  9. package/CheckboxGroup/index.js +4 -8
  10. package/Collapse/index.js +1 -5
  11. package/CollapseBox/index.js +4 -8
  12. package/CollapseLayout/index.js +6 -10
  13. package/ColorPicker/index.js +0 -2
  14. package/ComboSelect/index.js +14 -18
  15. package/Container/index.js +1 -5
  16. package/DatePicker/index.js +10 -14
  17. package/Desktop/index.js +10 -14
  18. package/DragVerify/index.js +6 -10
  19. package/Drawer/index.js +8 -12
  20. package/Dropdown/index.js +3 -4
  21. package/DynamicMultiBox/index.js +15 -19
  22. package/Empty/index.js +3 -7
  23. package/Form/index.js +15 -16
  24. package/FormItem/index.js +15 -16
  25. package/FunctionModal/index.js +14 -15
  26. package/GlobalContext/index.js +3 -3
  27. package/Help/index.js +4 -8
  28. package/HelperText/index.js +1 -5
  29. package/InputLang/index.js +11 -15
  30. package/InputNumber/index.js +4 -8
  31. package/Label/index.js +4 -8
  32. package/Loading/index.js +1 -5
  33. package/Menu/index.js +5 -9
  34. package/Message/index.js +4 -8
  35. package/Modal/index.js +10 -17
  36. package/MultiBox/index.js +10 -14
  37. package/Notification/index.js +3 -7
  38. package/OperateBtn/index.js +9 -13
  39. package/PageHeader/index.js +9 -13
  40. package/Pagination/index.js +11 -15
  41. package/ParauiProvider/index.js +3 -7
  42. package/PasswordRules/index.js +3 -7
  43. package/PopConfirm/index.js +8 -12
  44. package/Popover/index.js +5 -9
  45. package/Progress/index.js +2 -6
  46. package/Querying/index.js +3 -7
  47. package/README.md +5 -0
  48. package/Radio/index.js +4 -8
  49. package/RadioGroup/index.js +4 -8
  50. package/Search/index.js +9 -13
  51. package/Select/index.js +11 -15
  52. package/SelectInput/index.js +11 -12
  53. package/Selector/index.js +11 -24
  54. package/SelectorPicker/index.js +12 -16
  55. package/SingleBox/index.js +10 -14
  56. package/Slider/index.js +6 -10
  57. package/Split/index.js +4 -8
  58. package/Status/index.js +1 -5
  59. package/Stepper/index.js +3 -7
  60. package/Styles/theme/theme-api.scss +75 -0
  61. package/Styles/theme/theme-default.scss +74 -0
  62. package/Styles/theme/theme-shrcb.scss +80 -0
  63. package/Styles/theme.scss +1 -69
  64. package/Switch/index.js +6 -10
  65. package/Table/index.js +12 -37
  66. package/Tabs/index.js +9 -13
  67. package/Tag/index.js +7 -11
  68. package/TextEditor/index.js +5 -12
  69. package/TextField/index.js +8 -12
  70. package/TimePicker/index.js +10 -11
  71. package/Timeline/index.js +4 -8
  72. package/Title/index.js +1 -5
  73. package/ToggleButton/index.js +9 -13
  74. package/Tooltip/index.js +4 -8
  75. package/Transfer/index.js +13 -17
  76. package/Tree/index.js +12 -13
  77. package/Upload/index.js +12 -28
  78. package/_verture/{index-519a9fdf.js → closestPolyfill-af1e3129.js} +8 -15
  79. package/_verture/closestPolyfill-c45cda78.js +1354 -0
  80. package/_verture/constant-60484ff1.js +10 -0
  81. package/_verture/{defineProperty-62acccfc.js → defineProperty-7aa4e7b0.js} +1 -1
  82. package/_verture/defineProperty-e2de1981.js +34 -0
  83. package/_verture/{index-77f9e0fb.js → index-0b16a77e.js} +2 -6
  84. package/_verture/{index-8bad96b3.js → index-76c48610.js} +4 -11
  85. package/_verture/index-7cb40909.js +757 -0
  86. package/_verture/index-a63894d0.js +232 -0
  87. package/_verture/index-c8575171.js +340 -0
  88. package/_verture/index-ef1e15e8.js +18 -0
  89. package/_verture/{intl-4a9f1b44.js → intl-4ad778ba.js} +1 -1
  90. package/_verture/intl-519338cb.js +81 -0
  91. package/_verture/{modalContext-da105e06.js → modalContext-2256753f.js} +4 -8
  92. package/_verture/modalContext-fc6309c5.js +197 -0
  93. package/_verture/{slicedToArray-76060636.js → slicedToArray-545d9fcd.js} +1 -1
  94. package/_verture/slicedToArray-94962ec5.js +43 -0
  95. package/_verture/sortable.esm-c0270144.js +3791 -0
  96. package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-295100d6.js} +1 -1
  97. package/_verture/toConsumableArray-a444c3ba.js +19 -0
  98. package/_verture/tslib.es6-b07fd47a.js +38 -0
  99. package/_verture/typeof-99c4c2af.js +11 -0
  100. package/_verture/unsupportedIterableToArray-e9a428c9.js +16 -0
  101. package/_verture/useFormatMessage-5777ad0a.js +20 -0
  102. package/_verture/useGlobalProps-fbb58670.js +11 -0
  103. package/_verture/usePopupContainer-b086ca46.js +68 -0
  104. package/_verture/util-d56ad080.js +18 -0
  105. package/_verture/{utils-1ffeadec.js → utils-2e9c05bc.js} +1 -1
  106. package/_verture/utils-5e4b0846.js +92 -0
  107. package/index.d.ts +0 -2
  108. package/index.js +20 -23
  109. package/package.json +4 -1
  110. package/theme/theme-shrcb.css +14600 -0
  111. package/theme/theme.css +14996 -0
  112. package/umd/AutoTips.js +1 -1
  113. package/umd/Breadcrumbs.js +1 -1
  114. package/umd/Button.js +1 -1
  115. package/umd/ButtonGroup.js +1 -1
  116. package/umd/Checkbox.js +1 -1
  117. package/umd/CheckboxGroup.js +1 -1
  118. package/umd/CollapseLayout.js +3 -3
  119. package/umd/ComboSelect.js +1 -1
  120. package/umd/DatePicker.js +1 -1
  121. package/umd/Desktop.js +1 -1
  122. package/umd/DragVerify.js +1 -1
  123. package/umd/Drawer.js +1 -1
  124. package/umd/DynamicMultiBox.js +1 -1
  125. package/umd/Empty.js +1 -1
  126. package/umd/Form.js +1 -1
  127. package/umd/FormItem.js +1 -1
  128. package/umd/FunctionModal.js +1 -1
  129. package/umd/Help.js +1 -1
  130. package/umd/InputLang.js +1 -1
  131. package/umd/InputNumber.js +1 -1
  132. package/umd/Label.js +1 -1
  133. package/umd/Menu.js +3 -3
  134. package/umd/Message.js +1 -1
  135. package/umd/Modal.js +1 -1
  136. package/umd/MultiBox.js +1 -1
  137. package/umd/Notification.js +1 -1
  138. package/umd/OperateBtn.js +1 -1
  139. package/umd/PageHeader.js +7 -7
  140. package/umd/Pagination.js +4 -4
  141. package/umd/PopConfirm.js +1 -1
  142. package/umd/Progress.js +1 -1
  143. package/umd/Radio.js +1 -1
  144. package/umd/RadioGroup.js +1 -1
  145. package/umd/Search.js +1 -1
  146. package/umd/Select.js +1 -1
  147. package/umd/SelectInput.js +1 -1
  148. package/umd/Selector.js +1 -1
  149. package/umd/SelectorPicker.js +1 -1
  150. package/umd/SingleBox.js +1 -1
  151. package/umd/Slider.js +1 -1
  152. package/umd/Stepper.js +4 -4
  153. package/umd/Switch.js +4 -4
  154. package/umd/Table.js +1 -1
  155. package/umd/Tabs.js +1 -1
  156. package/umd/Tag.js +1 -1
  157. package/umd/TextEditor.js +1 -1
  158. package/umd/TextField.js +1 -1
  159. package/umd/TimePicker.js +1 -1
  160. package/umd/Timeline.js +1 -1
  161. package/umd/Title.js +1 -1
  162. package/umd/ToggleButton.js +1 -1
  163. package/umd/Transfer.js +1 -1
  164. package/umd/Tree.js +1 -1
  165. package/umd/Upload.js +1 -1
  166. package/_verture/index-a369ca3f.js +0 -4
  167. package/_verture/style-inject.es-300983ab.js +0 -28
  168. package/locale/en-US.d.ts +0 -165
  169. package/locale/index.d.ts +0 -331
  170. package/locale/index.js +0 -336
  171. package/locale/zh-CN.d.ts +0 -165
  172. package/umd/locale.js +0 -1
  173. /package/_verture/{constant-66aa48a1.js → constant-4091d66f.js} +0 -0
  174. /package/_verture/{index-65bbd1e4.js → index-1fdf8def.js} +0 -0
  175. /package/_verture/{index-beef914f.js → index-6faec6b4.js} +0 -0
  176. /package/_verture/{sortable.esm-49896035.js → sortable.esm-2593ef9b.js} +0 -0
  177. /package/_verture/{tslib.es6-55ed4bd2.js → tslib.es6-24e733a1.js} +0 -0
  178. /package/_verture/{typeof-498dd2b1.js → typeof-3d6c2390.js} +0 -0
  179. /package/_verture/{unsupportedIterableToArray-cb478f24.js → unsupportedIterableToArray-2fb1516b.js} +0 -0
  180. /package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-45bb2ce2.js} +0 -0
  181. /package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-be263385.js} +0 -0
  182. /package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-09af2ab3.js} +0 -0
  183. /package/_verture/{util-7e1fb1e2.js → util-2a5a3b41.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { a as _arrayLikeToArray, _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-cb478f24.js';
1
+ import { a as _arrayLikeToArray, _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-e9a428c9.js';
2
2
 
3
3
  function _arrayWithoutHoles(arr) {
4
4
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
@@ -0,0 +1,19 @@
1
+ import { a as _arrayLikeToArray, _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-2fb1516b.js';
2
+
3
+ function _arrayWithoutHoles(arr) {
4
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
5
+ }
6
+
7
+ function _iterableToArray(iter) {
8
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
9
+ }
10
+
11
+ function _nonIterableSpread() {
12
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13
+ }
14
+
15
+ function _toConsumableArray(arr) {
16
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
17
+ }
18
+
19
+ export { _toConsumableArray as _ };
@@ -0,0 +1,38 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+
16
+ function __rest(s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ }
27
+
28
+ function __awaiter(thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ }
37
+
38
+ export { __rest as _, __awaiter as a };
@@ -0,0 +1,11 @@
1
+ function _typeof(obj) {
2
+ "@babel/helpers - typeof";
3
+
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
5
+ return typeof obj;
6
+ } : function (obj) {
7
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
+ }, _typeof(obj);
9
+ }
10
+
11
+ export { _typeof as _ };
@@ -0,0 +1,16 @@
1
+ function _arrayLikeToArray(arr, len) {
2
+ if (len == null || len > arr.length) len = arr.length;
3
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
4
+ return arr2;
5
+ }
6
+
7
+ function _unsupportedIterableToArray(o, minLen) {
8
+ if (!o) return;
9
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
10
+ var n = Object.prototype.toString.call(o).slice(8, -1);
11
+ if (n === "Object" && o.constructor) n = o.constructor.name;
12
+ if (n === "Map" || n === "Set") return Array.from(o);
13
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
14
+ }
15
+
16
+ export { _unsupportedIterableToArray as _, _arrayLikeToArray as a };
@@ -0,0 +1,20 @@
1
+ import React__default from 'react';
2
+ import GlobalContext from '@para-ui/core/GlobalContext';
3
+
4
+ /**
5
+ * @author linhd
6
+ * @date 2022/3/15 4:03 PM
7
+ * @description 国际化钩子
8
+ */
9
+ var useFormatMessage = function useFormatMessage(comName, defI18nData) {
10
+ var _React$useContext = React__default.useContext(GlobalContext),
11
+ intlFormat = _React$useContext.intlFormat;
12
+ defI18nData.zh_CN = defI18nData.zh;
13
+ defI18nData['zh-CN'] = defI18nData.zh;
14
+ defI18nData.en_US = defI18nData.en;
15
+ defI18nData['en-US'] = defI18nData.en;
16
+ var intl = intlFormat && intlFormat(comName, defI18nData);
17
+ return intl;
18
+ };
19
+
20
+ export { useFormatMessage as u };
@@ -0,0 +1,11 @@
1
+ import React__default from 'react';
2
+ import GlobalContext from '@para-ui/core/GlobalContext';
3
+
4
+ function useGlobalProps(comProps, comName) {
5
+ var _React$useContext = React__default.useContext(GlobalContext),
6
+ componentsProps = _React$useContext.componentsProps;
7
+ var globalProps = componentsProps && componentsProps[comName];
8
+ return Object.assign(Object.assign({}, globalProps), comProps);
9
+ }
10
+
11
+ export { useGlobalProps as u };
@@ -0,0 +1,68 @@
1
+ import React__default from 'react';
2
+
3
+ /**
4
+ * @author Hanz
5
+ * @date 2022/10/9 10:12 AM
6
+ * @description 查找最近的祖先滚动容器
7
+ */
8
+ //判断是否滚动元素
9
+ function isOverflowElement(element) {
10
+ var _window$getComputedSt = window.getComputedStyle(element),
11
+ overflow = _window$getComputedSt.overflow,
12
+ overflowX = _window$getComputedSt.overflowX,
13
+ overflowY = _window$getComputedSt.overflowY;
14
+ return /auto|scroll|overlay/.test(overflow + overflowY + overflowX);
15
+ }
16
+ //最近的祖先滚动元素
17
+ function getNearestOverflowAncestor(node) {
18
+ var _a, _b;
19
+ var parentNode = node.parentNode || node.ownerDocument;
20
+ var nodeName = ((_a = parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
21
+ if (['html', 'body', '#document'].includes(nodeName)) {
22
+ return (_b = node === null || node === void 0 ? void 0 : node.ownerDocument) === null || _b === void 0 ? void 0 : _b.body;
23
+ }
24
+ if (parentNode instanceof window.HTMLElement && isOverflowElement(parentNode)) {
25
+ return parentNode;
26
+ }
27
+ return getNearestOverflowAncestor(parentNode);
28
+ }
29
+ //渲染容器
30
+ function usePopupContainer(wrapRef, customizeContainer) {
31
+ var popupRef = React__default.useRef();
32
+ //浮层渲染容器
33
+ var getPopupContainer = function getPopupContainer(triggerNode) {
34
+ var _a, _b, _c, _d;
35
+ var container;
36
+ if (!customizeContainer) {
37
+ var rootNode = (_b = (_a = wrapRef.current) === null || _a === void 0 ? void 0 : _a.getRootDomNode) === null || _b === void 0 ? void 0 : _b.call(_a);
38
+ if (rootNode) {
39
+ container = getNearestOverflowAncestor(rootNode);
40
+ var scrollHeight = container.scrollHeight;
41
+ var clientHeight = container.clientHeight;
42
+ if (scrollHeight <= clientHeight) {
43
+ container = document.body;
44
+ }
45
+ } else {
46
+ container = document.body;
47
+ }
48
+ var nodeName = (_c = container.nodeName) === null || _c === void 0 ? void 0 : _c.toLowerCase();
49
+ if (nodeName !== 'body') {
50
+ if (((_d = window.getComputedStyle(container)) === null || _d === void 0 ? void 0 : _d.position) === 'static') {
51
+ container.style.position = 'relative';
52
+ }
53
+ }
54
+ popupRef.current = container;
55
+ } else {
56
+ container = customizeContainer(triggerNode) || document.body;
57
+ }
58
+ return container;
59
+ };
60
+ React__default.useEffect(function () {
61
+ return function () {
62
+ if (popupRef.current) popupRef.current.style.position = '';
63
+ };
64
+ }, []);
65
+ return getPopupContainer;
66
+ }
67
+
68
+ export { getNearestOverflowAncestor as g, usePopupContainer as u };
@@ -0,0 +1,18 @@
1
+ function getTransitionProps(props, options) {
2
+ var timeout = props.timeout,
3
+ _props$style = props.style,
4
+ style = _props$style === void 0 ? {} : _props$style;
5
+ return {
6
+ duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,
7
+ delay: style.transitionDelay
8
+ };
9
+ }
10
+ function getAutoHeightDuration(height) {
11
+ if (!height) {
12
+ return 0;
13
+ }
14
+ var constant = height / 36;
15
+ return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);
16
+ }
17
+
18
+ export { getAutoHeightDuration as a, getTransitionProps as g };
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty } from './defineProperty-62acccfc.js';
1
+ import { _ as _defineProperty } from './defineProperty-7aa4e7b0.js';
2
2
 
3
3
  //获取替换字段
4
4
  var getReplaceField = function getReplaceField(mode, repl, tableP, treeP) {
@@ -0,0 +1,92 @@
1
+ import { _ as _defineProperty } from './defineProperty-e2de1981.js';
2
+
3
+ //获取替换字段
4
+ var getReplaceField = function getReplaceField(mode, repl, tableP, treeP) {
5
+ var t = {};
6
+ if (mode === "tree") t = treeP === null || treeP === void 0 ? void 0 : treeP.replaceFields;else t = tableP === null || tableP === void 0 ? void 0 : tableP.replaceFields;
7
+ return Object.assign(Object.assign({}, repl), t);
8
+ };
9
+ //to array
10
+ var toArray = function toArray(list) {
11
+ if (!list) return [];
12
+ return Array.isArray(list) ? list : JSON.stringify(list) === "{}" ? [] : [list];
13
+ };
14
+ var isRemoteLoad = function isRemoteLoad(mode, props) {
15
+ if (mode === "table") {
16
+ return !(props && Array.isArray(props.data));
17
+ }
18
+ return !(props && Array.isArray(props.treeData));
19
+ };
20
+ var getOverlaySize = function getOverlaySize(mode) {
21
+ var isRemoteLoad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
22
+ var maxHeight = arguments.length > 2 ? arguments[2] : undefined;
23
+ var height = arguments.length > 3 ? arguments[3] : undefined;
24
+ var _a;
25
+ var screenH = 720;
26
+ var treeOverlay = "".concat(maxHeight || 254, "px");
27
+ var listOverlay = "".concat(maxHeight || 232, "px");
28
+ // let largeScreenH = 880;
29
+ var largeTreeOverlayH = "".concat(maxHeight || 338, "px");
30
+ var largeListOverlayH = "".concat(maxHeight || 304, "px");
31
+ var clientH = document.documentElement.clientHeight;
32
+ var fixHeight = height !== undefined ? "height" : "maxHeight";
33
+ if (mode === "tree") {
34
+ //tree
35
+ if (clientH <= screenH) {
36
+ //小屏幕
37
+ return isRemoteLoad ? {
38
+ height: treeOverlay
39
+ } : _defineProperty({}, fixHeight, treeOverlay);
40
+ }
41
+ //大屏幕
42
+ return isRemoteLoad ? {
43
+ height: largeTreeOverlayH
44
+ } : _defineProperty({}, fixHeight, largeTreeOverlayH);
45
+ } else if (mode === "list") {
46
+ //list
47
+ if (clientH <= screenH) {
48
+ return isRemoteLoad ? {
49
+ height: listOverlay
50
+ } : _defineProperty({}, fixHeight, listOverlay);
51
+ }
52
+ return isRemoteLoad ? {
53
+ height: largeListOverlayH
54
+ } : _defineProperty({}, fixHeight, largeListOverlayH);
55
+ } else {
56
+ //table
57
+ return {
58
+ height: "".concat((_a = maxHeight !== null && maxHeight !== void 0 ? maxHeight : height) !== null && _a !== void 0 ? _a : 360, "px")
59
+ };
60
+ }
61
+ };
62
+ // 实现一个防抖函数,debounce接受一个函数func和delay时间作为参数,返回一个防抖函数。使用泛型T保证返回防抖函数的类型与原func一致
63
+ function debounce(func, delay) {
64
+ var timer;
65
+ return function () {
66
+ var _this = this;
67
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
68
+ args[_key] = arguments[_key];
69
+ }
70
+ if (timer) clearTimeout(timer);
71
+ timer = setTimeout(function () {
72
+ func.apply(_this, args);
73
+ }, delay);
74
+ };
75
+ }
76
+ /**
77
+ * @description 查询元素是不是在父元素内
78
+ * @param {HTMLElement} el 当前元素
79
+ * @param {any} parent 父元素的匹配器
80
+ */
81
+ var closest = function closest(el, selector) {
82
+ var matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
83
+ while (el) {
84
+ if (matchesSelector.call(el, selector)) {
85
+ break;
86
+ }
87
+ el = el.parentElement;
88
+ }
89
+ return el;
90
+ };
91
+
92
+ export { getOverlaySize as a, closest as c, debounce as d, getReplaceField as g, isRemoteLoad as i, toArray as t };
package/index.d.ts CHANGED
@@ -142,5 +142,3 @@ export { default as Tree } from './Tree';
142
142
  export * from './Tree';
143
143
  export { default as Upload } from './Upload';
144
144
  export * from './Upload';
145
- export { default as locale } from './locale';
146
- export * from './locale';
package/index.js CHANGED
@@ -11,19 +11,18 @@ export { Collapse } from './Collapse/index.js';
11
11
  export { default as CollapseBox } from './CollapseBox/index.js';
12
12
  export { default as CollapseLayout } from './CollapseLayout/index.js';
13
13
  export { ChromePicker, SketchPicker as ColorPicker, CompactPicker, SwatchesPicker } from 'react-color';
14
- import './_verture/index-a369ca3f.js';
15
14
  export { ComboSelect } from './ComboSelect/index.js';
16
15
  export { Container } from './Container/index.js';
17
16
  export { default as DatePicker } from './DatePicker/index.js';
18
17
  export { Desktop } from './Desktop/index.js';
19
18
  export { DragVerify } from './DragVerify/index.js';
20
19
  export { Drawer } from './Drawer/index.js';
21
- export { D as Dropdown } from './_verture/index-77f9e0fb.js';
20
+ export { D as Dropdown } from './_verture/index-0b16a77e.js';
22
21
  export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
23
22
  export { default as Empty } from './Empty/index.js';
24
23
  export { default as Form } from './Form/index.js';
25
- export { F as FormItem } from './_verture/index-8bad96b3.js';
26
- export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-da105e06.js';
24
+ export { F as FormItem } from './_verture/index-7cb40909.js';
25
+ export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-fc6309c5.js';
27
26
  export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
28
27
  export { default as Help } from './Help/index.js';
29
28
  export { default as HelperText } from './HelperText/index.js';
@@ -69,44 +68,42 @@ export { Title } from './Title/index.js';
69
68
  export { ToggleButton, ToggleButtonGroup } from './ToggleButton/index.js';
70
69
  export { Tooltip } from './Tooltip/index.js';
71
70
  export { SSortablejs, Transfer } from './Transfer/index.js';
72
- export { T as Tree } from './_verture/index-519a9fdf.js';
71
+ export { T as Tree } from './_verture/closestPolyfill-af1e3129.js';
73
72
  export { default as Upload } from './Upload/index.js';
74
- export { default as locale } from './locale/index.js';
75
- import './_verture/slicedToArray-76060636.js';
76
- import './_verture/unsupportedIterableToArray-cb478f24.js';
73
+ import './_verture/slicedToArray-545d9fcd.js';
74
+ import './_verture/unsupportedIterableToArray-e9a428c9.js';
77
75
  import 'react/jsx-runtime';
78
76
  import 'react';
79
77
  import 'react-dom';
80
78
  import '@paraview/lib';
81
- import './_verture/constant-66aa48a1.js';
79
+ import './_verture/constant-60484ff1.js';
82
80
  import '@para-ui/icons/More';
83
- import './_verture/style-inject.es-300983ab.js';
84
- import './_verture/toConsumableArray-81040c9e.js';
81
+ import './_verture/toConsumableArray-295100d6.js';
85
82
  import '@para-ui/icons/Return';
86
- import './_verture/useFormatMessage-703f8b20.js';
83
+ import './_verture/useFormatMessage-45bb2ce2.js';
87
84
  import '@para-ui/core/GlobalContext';
88
- import './_verture/typeof-498dd2b1.js';
89
- import './_verture/tslib.es6-55ed4bd2.js';
85
+ import './_verture/typeof-99c4c2af.js';
86
+ import './_verture/tslib.es6-b07fd47a.js';
90
87
  import 'clsx';
91
88
  import '@para-ui/icons/LoadingF';
92
89
  import '@para-ui/icons/Forbid';
93
90
  import '@para-ui/icons/Down';
94
- import './_verture/defineProperty-62acccfc.js';
91
+ import './_verture/defineProperty-7aa4e7b0.js';
95
92
  import 'react-slick';
96
- import './_verture/index-beef914f.js';
93
+ import './_verture/index-6faec6b4.js';
97
94
  import 'rc-cascader';
98
95
  import '@para-ui/icons/Right';
99
96
  import '@para-ui/icons/Loading';
100
97
  import 'rc-collapse';
101
98
  import 'react-transition-group';
102
- import './_verture/util-7e1fb1e2.js';
99
+ import './_verture/util-2a5a3b41.js';
103
100
  import '@para-ui/icons/DoubleLeft';
104
101
  import '@para-ui/icons/DoubleRight';
105
102
  import '@para-ui/icons/Search';
106
103
  import '@para-ui/icons/Close';
107
104
  import '@para-ui/icons/CloseCircle';
108
- import './_verture/utils-1ffeadec.js';
109
- import './_verture/useGlobalProps-1b846a65.js';
105
+ import './_verture/utils-2e9c05bc.js';
106
+ import './_verture/useGlobalProps-be263385.js';
110
107
  import 'rc-picker/es/generate/dayjs';
111
108
  import 'rc-picker';
112
109
  import '@para-ui/icons/Calendar';
@@ -117,16 +114,16 @@ import '@para-ui/icons/SortRight';
117
114
  import '@para-ui/icons/Check';
118
115
  import 'rc-drawer';
119
116
  import 'rc-dropdown';
120
- import './_verture/usePopupContainer-87febeb9.js';
117
+ import './_verture/usePopupContainer-b086ca46.js';
121
118
  import 'dayjs';
122
119
  import '@para-ui/icons/Panel';
123
120
  import '@para-ui/icons/PlusCircleF';
124
121
  import '@para-ui/icons/Delete';
125
122
  import '@para-ui/icons/Drag';
126
- import './_verture/sortable.esm-49896035.js';
123
+ import './_verture/sortable.esm-c0270144.js';
127
124
  import '@para-ui/icons/LinkGroup';
128
- import './_verture/intl-4a9f1b44.js';
129
- import './_verture/index-65bbd1e4.js';
125
+ import './_verture/intl-519338cb.js';
126
+ import './_verture/index-ef1e15e8.js';
130
127
  import '@para-ui/icons/Help';
131
128
  import '@para-ui/icons/Application';
132
129
  import 'rc-input-number';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "3.0.108",
4
+ "version": "3.0.109-rc.1",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",
@@ -14,6 +14,7 @@
14
14
  "build:docs": "node run && webpack --config=./config/webpack.dev.config.js",
15
15
  "build": "npm run locale && rm -rf dist && rollup -c && npm run build:umd",
16
16
  "build:umd": "webpack --config=./config/webpack.umd.config.js",
17
+ "build:theme": "rm -rf dist && rollup -c rollup.config.css.js && npm run build:umd",
17
18
  "npm:publish": "./publish.sh"
18
19
  },
19
20
  "dependencies": {
@@ -65,6 +66,7 @@
65
66
  "@babel/preset-typescript": "^7.18.6",
66
67
  "@para-snack/core": "^2.1.0",
67
68
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
69
+ "@rollup/plugin-alias": "^5.1.0",
68
70
  "@rollup/plugin-babel": "^5.3.1",
69
71
  "@rollup/plugin-commonjs": "^22.0.1",
70
72
  "@rollup/plugin-json": "^4.1.0",
@@ -91,6 +93,7 @@
91
93
  "monaco-editor-webpack-plugin": "^7.1.0",
92
94
  "postcss": "^8.4.14",
93
95
  "postcss-import": "^14.1.0",
96
+ "postcss-prefix-selector": "^1.16.1",
94
97
  "prettier": "^2.6.0",
95
98
  "react-app-polyfill": "^3.0.0",
96
99
  "react-copy-to-clipboard": "^5.0.3",