@para-ui/core 4.0.28 → 4.0.29
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.
- package/Cascader/index.js +5 -4
- package/ComboSelect/index.js +4 -7
- package/ContentBox/index.d.ts +33 -0
- package/ContentBox/index.js +89 -0
- package/CycleSelector/index.js +2 -1
- package/DatePicker/index.js +2 -1
- package/DynamicMultiBox/index.js +5 -7
- package/Form/index.js +3 -6
- package/FormItem/index.js +3 -6
- package/FunctionModal/index.js +2 -2
- package/Image/index.js +3 -2
- package/README.md +3 -0
- package/Selector/index.js +325 -2
- package/SelectorPicker/index.js +0 -1
- package/TimePicker/index.js +2 -1
- package/Tooltip/index.js +26 -27
- package/Tree/index.js +5 -8
- package/Upload/index.js +3 -2
- package/_verture/{Portal-5bf66fed.js → Portal-5bd49559.js} +2 -1
- package/_verture/{defineProperty-f0e15205.js → defineProperty-6f62bb2a.js} +2 -10
- package/_verture/{index-8ec857b4.js → index-68f0506c.js} +3 -2
- package/_verture/{index-28edf318.js → index-e9405e35.js} +314 -395
- package/_verture/typeof-adeedc13.js +11 -0
- package/index.d.ts +2 -0
- package/index.js +8 -7
- package/package.json +2 -1
- package/umd/ContentBox.js +28 -0
- package/_verture/index-8ac46bd9.js +0 -327
- /package/_verture/{index-33866394.js → index-15a0b6a6.js} +0 -0
- /package/_verture/{modalContext-c57b51b7.js → modalContext-10f0c5aa.js} +0 -0
package/TimePicker/index.js
CHANGED
|
@@ -26,7 +26,8 @@ import '@para-ui/icons/Close';
|
|
|
26
26
|
import '@para-ui/icons/EditOutline';
|
|
27
27
|
import '../_verture/tinycolor-ece3542d.js';
|
|
28
28
|
import '@para-ui/icons/Plus';
|
|
29
|
-
import '../_verture/defineProperty-
|
|
29
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
30
|
+
import '../_verture/typeof-adeedc13.js';
|
|
30
31
|
import 'rc-picker';
|
|
31
32
|
import '@para-ui/icons/CloseCircleF';
|
|
32
33
|
import '@para-ui/icons/Calendar';
|
package/Tooltip/index.js
CHANGED
|
@@ -9,12 +9,12 @@ import Forbid from '@para-ui/icons/Forbid';
|
|
|
9
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
10
|
|
|
11
11
|
//自动调整位置
|
|
12
|
-
|
|
12
|
+
var autoAdjustOverflowEnabled = {
|
|
13
13
|
adjustX: 1,
|
|
14
14
|
adjustY: 1
|
|
15
15
|
};
|
|
16
16
|
//非自动调整位置
|
|
17
|
-
|
|
17
|
+
var autoAdjustOverflowDisabled = {
|
|
18
18
|
adjustX: 0,
|
|
19
19
|
adjustY: 0
|
|
20
20
|
};
|
|
@@ -27,12 +27,12 @@ function getOverflowOptions(autoAdjustOverflow) {
|
|
|
27
27
|
}
|
|
28
28
|
//tooltip placement
|
|
29
29
|
function getPlacements(config) {
|
|
30
|
-
|
|
31
|
-
horizontalArrowShift = 16,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
var _config$horizontalArr = config.horizontalArrowShift,
|
|
31
|
+
horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr,
|
|
32
|
+
_config$verticalArrow = config.verticalArrowShift,
|
|
33
|
+
verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow,
|
|
34
|
+
autoAdjustOverflow = config.autoAdjustOverflow;
|
|
35
|
+
var placementMap = {
|
|
36
36
|
left: {
|
|
37
37
|
points: ['cr', 'cl'],
|
|
38
38
|
offset: [-8, 0]
|
|
@@ -82,7 +82,7 @@ function getPlacements(config) {
|
|
|
82
82
|
offset: [-8, verticalArrowShift]
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
Object.keys(placementMap).forEach(key
|
|
85
|
+
Object.keys(placementMap).forEach(function (key) {
|
|
86
86
|
placementMap[key] = Object.assign(Object.assign({}, placements[key]), {
|
|
87
87
|
offset: getAlignOffset(key).offset,
|
|
88
88
|
overflow: getOverflowOptions(autoAdjustOverflow)
|
|
@@ -91,40 +91,39 @@ function getPlacements(config) {
|
|
|
91
91
|
});
|
|
92
92
|
return placementMap;
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
keys.forEach(key
|
|
94
|
+
var splitObject = function splitObject(obj, keys) {
|
|
95
|
+
var picked = {};
|
|
96
|
+
var omitted = Object.assign({}, obj);
|
|
97
|
+
keys.forEach(function (key) {
|
|
98
98
|
if (obj && key in obj) {
|
|
99
99
|
picked[key] = obj[key];
|
|
100
100
|
delete omitted[key];
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
return {
|
|
104
|
-
picked,
|
|
105
|
-
omitted
|
|
104
|
+
picked: picked,
|
|
105
|
+
omitted: omitted
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
108
|
//兼容禁用title
|
|
109
109
|
function getDisabledCompatibleChildren(child) {
|
|
110
|
-
|
|
110
|
+
var element = /*#__PURE__*/React__default.isValidElement(child) ? child : jsx("span", {
|
|
111
111
|
children: child
|
|
112
112
|
});
|
|
113
113
|
if (element.type === 'button' && element.props.disabled) {
|
|
114
|
-
|
|
115
|
-
picked,
|
|
116
|
-
omitted
|
|
117
|
-
|
|
118
|
-
const spanStyle = Object.assign(Object.assign({
|
|
114
|
+
var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']),
|
|
115
|
+
picked = _splitObject.picked,
|
|
116
|
+
omitted = _splitObject.omitted;
|
|
117
|
+
var spanStyle = Object.assign(Object.assign({
|
|
119
118
|
display: 'inline-block'
|
|
120
119
|
}, picked), {
|
|
121
120
|
cursor: 'not-allowed',
|
|
122
121
|
width: element.props.block ? '100%' : null
|
|
123
122
|
});
|
|
124
|
-
|
|
123
|
+
var buttonStyle = Object.assign(Object.assign({}, omitted), {
|
|
125
124
|
pointerEvents: 'none'
|
|
126
125
|
});
|
|
127
|
-
|
|
126
|
+
var _child = /*#__PURE__*/React__default.cloneElement(element, {
|
|
128
127
|
style: buttonStyle,
|
|
129
128
|
className: null
|
|
130
129
|
});
|
|
@@ -132,14 +131,14 @@ function getDisabledCompatibleChildren(child) {
|
|
|
132
131
|
style: spanStyle,
|
|
133
132
|
className: clsx(element.props.className, "".concat($rcPrefixCls, "-tooltip-disabled-compatible-wrapper"))
|
|
134
133
|
}, {
|
|
135
|
-
children:
|
|
134
|
+
children: _child
|
|
136
135
|
}));
|
|
137
136
|
}
|
|
138
137
|
return element;
|
|
139
138
|
}
|
|
140
139
|
//映射placement
|
|
141
140
|
function mapLegacyPlacement(place) {
|
|
142
|
-
|
|
141
|
+
var legacyPlacement = {
|
|
143
142
|
'bottom-end': 'bottomRight',
|
|
144
143
|
'bottom-start': 'bottomLeft',
|
|
145
144
|
'left-end': 'leftBottom',
|
|
@@ -153,8 +152,8 @@ function mapLegacyPlacement(place) {
|
|
|
153
152
|
}
|
|
154
153
|
//浮层偏移量
|
|
155
154
|
function getAlignOffset(place) {
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
var mPlace = mapLegacyPlacement(place);
|
|
156
|
+
var offsetMap = {
|
|
158
157
|
left: {
|
|
159
158
|
offset: [-8, 0]
|
|
160
159
|
},
|
package/Tree/index.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
3
|
-
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
4
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
5
|
-
import '../_verture/defineProperty-f0e15205.js';
|
|
6
|
-
import '../_verture/slicedToArray-a8206399.js';
|
|
7
|
-
import '../_verture/index-8ac46bd9.js';
|
|
8
|
-
import '../_verture/typeof-6ec38efd.js';
|
|
1
|
+
import { T as Tree } from '../_verture/index-e9405e35.js';
|
|
2
|
+
export { T as default } from '../_verture/index-e9405e35.js';
|
|
9
3
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
10
4
|
import 'react/jsx-runtime';
|
|
11
5
|
import 'react';
|
|
12
6
|
import 'rc-tree';
|
|
13
7
|
import 'clsx';
|
|
8
|
+
import '../_verture/typeof-adeedc13.js';
|
|
14
9
|
import '@para-ui/icons/LoadingF';
|
|
15
10
|
import '@para-ui/icons/Document';
|
|
16
11
|
import '@para-ui/icons/DownTriangleF';
|
|
@@ -24,6 +19,8 @@ import '../_verture/constant-5317fc89.js';
|
|
|
24
19
|
import '@para-ui/icons/Forbid';
|
|
25
20
|
import '../_verture/style-inject.es-300983ab.js';
|
|
26
21
|
import '@para-ui/icons/Help';
|
|
22
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
23
|
+
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
27
24
|
import 'react-dom';
|
|
28
25
|
import '@para-ui/icons/EditFile';
|
|
29
26
|
import '@para-ui/icons/PlusCircle';
|
package/Upload/index.js
CHANGED
|
@@ -31,11 +31,12 @@ import { Modal } from '../Modal/index.js';
|
|
|
31
31
|
import 'rc-tooltip';
|
|
32
32
|
import 'rc-tooltip/lib/placements';
|
|
33
33
|
import '@paraview/lib';
|
|
34
|
-
import '../_verture/Portal-
|
|
34
|
+
import '../_verture/Portal-5bd49559.js';
|
|
35
35
|
import 'react-dom';
|
|
36
|
-
import '../_verture/
|
|
36
|
+
import '../_verture/typeof-adeedc13.js';
|
|
37
37
|
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
38
38
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
39
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
39
40
|
import 'rc-dialog';
|
|
40
41
|
import 'rc-motion';
|
|
41
42
|
import '@para-ui/icons/Sort';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { _ as _slicedToArray } from './slicedToArray-a8206399.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import {
|
|
4
|
+
import { _ as _typeof } from './typeof-adeedc13.js';
|
|
5
5
|
import { _ as _toConsumableArray } from './toConsumableArray-8f4c9589.js';
|
|
6
|
+
import { _ as _defineProperty } from './defineProperty-6f62bb2a.js';
|
|
6
7
|
|
|
7
8
|
function _extends() {
|
|
8
9
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
"@babel/helpers - typeof";
|
|
3
|
-
|
|
4
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
5
|
-
return typeof o;
|
|
6
|
-
} : function (o) {
|
|
7
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
8
|
-
}, _typeof(o);
|
|
9
|
-
}
|
|
1
|
+
import { _ as _typeof } from './typeof-adeedc13.js';
|
|
10
2
|
|
|
11
3
|
function toPrimitive(t, r) {
|
|
12
4
|
if ("object" != _typeof(t) || !t) return t;
|
|
@@ -39,4 +31,4 @@ function _defineProperty(obj, key, value) {
|
|
|
39
31
|
return obj;
|
|
40
32
|
}
|
|
41
33
|
|
|
42
|
-
export {
|
|
34
|
+
export { _defineProperty as _, toPropertyKey as t };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { _ as __rest } from './tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { c as clsx, _ as _objectSpread2, r as reactIs, s as supportRef, u as useComposeRef, w as warning, a as _extends, b as _objectWithoutProperties, d as wrapperRaf, e as useEvent$2, f as useLayoutEffect$3, g as composeRef, K as KeyCode, h as fillRef, P as Portal, i as warningOnce, j as useMergedState$2, k as canUseDom$1, l as useMemo$1, n as noteOnce } from './Portal-
|
|
3
|
+
import { c as clsx, _ as _objectSpread2, r as reactIs, s as supportRef, u as useComposeRef, w as warning, a as _extends, b as _objectWithoutProperties, d as wrapperRaf, e as useEvent$2, f as useLayoutEffect$3, g as composeRef, K as KeyCode, h as fillRef, P as Portal, i as warningOnce, j as useMergedState$2, k as canUseDom$1, l as useMemo$1, n as noteOnce } from './Portal-5bd49559.js';
|
|
4
4
|
import { _ as _toConsumableArray, a as _iterableToArray } from './toConsumableArray-8f4c9589.js';
|
|
5
|
-
import {
|
|
5
|
+
import { t as toPropertyKey, _ as _defineProperty } from './defineProperty-6f62bb2a.js';
|
|
6
6
|
import { _ as _slicedToArray, a as _arrayWithHoles, b as _nonIterableRest } from './slicedToArray-a8206399.js';
|
|
7
|
+
import { _ as _typeof$1 } from './typeof-adeedc13.js';
|
|
7
8
|
import * as React$4 from 'react';
|
|
8
9
|
import React__default, { useState as useState$1, useMemo, useCallback, useRef, useEffect } from 'react';
|
|
9
10
|
import ReactDOM, { unstable_batchedUpdates, flushSync } from 'react-dom';
|