@para-ui/core 4.0.85 → 4.0.88
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 +6 -7
- package/Checkbox/index.d.ts +1 -0
- package/Checkbox/index.js +37 -12
- package/ComboSelect/index.js +3 -4
- package/CycleSelector/index.js +1 -4
- package/DatePicker/index.js +1 -4
- package/DynamicMultiBox/index.js +3 -4
- package/FieldForm/index.js +4 -5
- package/Form/index.js +3 -4
- package/FormItem/index.js +3 -4
- package/Image/index.js +16 -16
- package/Menu/index.js +296 -348
- package/Message/index.js +5 -1
- package/OperateBtn/index.js +2 -2
- package/README.md +13 -0
- package/Radio/index.d.ts +1 -0
- package/Radio/index.js +31 -9
- package/Selector/index.js +280 -222
- package/SelectorPicker/index.js +2 -2
- package/Table/index.js +432 -497
- package/Tabs/index.js +2 -2
- package/Tag/index.js +55 -87
- package/TextEditor/index.js +3 -3
- package/TimePicker/index.js +1 -4
- package/Timeline/index.js +1 -2
- package/ToggleButton/index.js +1 -2
- package/Tree/index.js +3 -4
- package/Upload/index.js +4 -5
- package/_verture/{Portal-502bb85e.js → Portal-274c5bd8.js} +2 -2
- package/_verture/{defineProperty-6f62bb2a.js → defineProperty-f0e15205.js} +10 -2
- package/_verture/{index-d068959c.js → index-62845506.js} +1 -2
- package/_verture/{index-78f0f0e7.js → index-99b02582.js} +4 -5
- package/_verture/{index-1856bbeb.js → index-9e4b0e32.js} +1 -1
- package/_verture/{isEqual-30b6f859.js → isEqual-38aa74f9.js} +2 -2
- package/_verture/{useState-f2419d68.js → useState-05fc6660.js} +2 -3
- package/index.js +8 -9
- package/package.json +1 -1
- package/umd/Argv.js +1 -1
- package/umd/Checkbox.js +1 -1
- package/umd/CheckboxGroup.js +1 -1
- package/umd/ComboSelect.js +1 -1
- package/umd/DynamicMultiBox.js +1 -1
- package/umd/Form.js +3 -3
- package/umd/FormItem.js +1 -1
- package/umd/Menu.js +1 -1
- package/umd/Message.js +1 -1
- package/umd/QuickReply.js +1 -1
- package/umd/Radio.js +3 -3
- package/umd/RadioGroup.js +1 -1
- package/umd/Selector.js +3 -3
- package/umd/SelectorPicker.js +1 -1
- package/umd/Table.js +1 -1
- package/umd/Tabs.js +1 -1
- package/umd/Tree.js +1 -1
- package/_verture/typeof-adeedc13.js +0 -11
- /package/_verture/{index-73a11529.js → index-32a8f7db.js} +0 -0
package/Cascader/index.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { C as Cascader } from '../_verture/index-
|
|
2
|
-
export { C as default } from '../_verture/index-
|
|
1
|
+
import { C as Cascader } from '../_verture/index-99b02582.js';
|
|
2
|
+
export { C as default } from '../_verture/index-99b02582.js';
|
|
3
3
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
|
-
import '../_verture/index-
|
|
6
|
-
import '../_verture/defineProperty-
|
|
7
|
-
import '../_verture/typeof-adeedc13.js';
|
|
5
|
+
import '../_verture/index-9e4b0e32.js';
|
|
6
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
8
7
|
import '../_verture/toConsumableArray-599cd94a.js';
|
|
9
8
|
import '../_verture/slicedToArray-61604a6c.js';
|
|
10
|
-
import '../_verture/Portal-
|
|
9
|
+
import '../_verture/Portal-274c5bd8.js';
|
|
11
10
|
import 'react';
|
|
12
11
|
import 'react-dom';
|
|
13
|
-
import '../_verture/useState-
|
|
12
|
+
import '../_verture/useState-05fc6660.js';
|
|
14
13
|
import '../_verture/typeof-6ec38efd.js';
|
|
15
14
|
import 'rc-motion';
|
|
16
15
|
import 'clsx';
|
package/Checkbox/index.d.ts
CHANGED
package/Checkbox/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import Label from '../Label/index.js';
|
|
4
4
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
5
5
|
import { Tooltip } from '../Tooltip/index.js';
|
|
@@ -29,27 +29,48 @@ const Checkbox = props => {
|
|
|
29
29
|
style
|
|
30
30
|
} = props;
|
|
31
31
|
const [checkedCom, setCheckedCom] = useState(false); // 复选框状态
|
|
32
|
+
const inputRef = useRef(null);
|
|
32
33
|
useEffect(() => {
|
|
33
34
|
if (props.defaultChecked !== undefined) setCheckedCom(props.defaultChecked);
|
|
34
35
|
}, []);
|
|
35
36
|
useEffect(() => {
|
|
36
37
|
if (props.checked !== undefined) setCheckedCom(props.checked);
|
|
37
38
|
}, [props.checked]);
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
// 半选态只有 class,没有原生属性,需要通过 ref 同步 input.indeterminate
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (inputRef.current) inputRef.current.indeterminate = indeterminate;
|
|
42
|
+
}, [indeterminate]);
|
|
43
|
+
// 原生 change 事件:浏览器已经完成真实的 checked 切换,e.target.checked 是准确的新值。
|
|
44
|
+
// 之前挂在外层 label 上、靠 e.preventDefault() 拦截原生切换再手动置反的写法,
|
|
45
|
+
// 在真实浏览器里会和原生「取消激活」时序打架,导致原生 checked 与组件状态各算各的、彼此不同步;
|
|
46
|
+
// 交给 input 自己的 onChange 处理不存在这个问题。
|
|
47
|
+
const handleChange = e => {
|
|
41
48
|
if (disabled) return;
|
|
42
49
|
if (indeterminate) {
|
|
43
|
-
//
|
|
50
|
+
// 半选态点击后固定进入全选,不看这次原生切换的结果
|
|
44
51
|
if (props.checked === undefined) setCheckedCom(true);
|
|
45
52
|
onChange && onChange(e, true);
|
|
46
53
|
return;
|
|
47
54
|
}
|
|
55
|
+
const next = e.target.checked;
|
|
48
56
|
// 不可受控组件
|
|
49
|
-
if (props.checked === undefined) setCheckedCom(
|
|
50
|
-
e
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
if (props.checked === undefined) setCheckedCom(next);
|
|
58
|
+
onChange && onChange(e, next);
|
|
59
|
+
};
|
|
60
|
+
// <Label> 内部渲染的标题/提示文字本身也是一个 <label> 标签(嵌套 label,非法但既有结构不改)。
|
|
61
|
+
// 原生「点击 label 转发到关联控件」的规则里,点击目标本身若是 label 元素,只有离它最近的
|
|
62
|
+
// 祖先 label 会尝试转发,而这层内层 label 没有关联的表单控件,到此为止,不会继续冒泡去找外层
|
|
63
|
+
// label——点标题文字因此不会触发任何变化。这里手动补一次 input.click():它和用户真实点击走的
|
|
64
|
+
// 是完全相同的原生激活流程(不是 preventDefault + 手动置反),只是 isTrusted 为 false。
|
|
65
|
+
const handleLabelClick = e => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (disabled) return;
|
|
68
|
+
const target = e.target;
|
|
69
|
+
if (target === inputRef.current) return; // 点在 input 本身上,原生行为已经处理
|
|
70
|
+
const nestedLabel = target.closest('label');
|
|
71
|
+
if (nestedLabel && nestedLabel !== e.currentTarget) {
|
|
72
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
73
|
+
}
|
|
53
74
|
};
|
|
54
75
|
// 处理class
|
|
55
76
|
const handClass = () => {
|
|
@@ -87,15 +108,19 @@ const Checkbox = props => {
|
|
|
87
108
|
const contentRender = () => {
|
|
88
109
|
return jsxs("label", Object.assign({
|
|
89
110
|
className: handClass(),
|
|
90
|
-
|
|
91
|
-
|
|
111
|
+
style: handStyle(),
|
|
112
|
+
onClick: handleLabelClick
|
|
92
113
|
}, {
|
|
93
114
|
children: [jsxs("span", Object.assign({
|
|
94
115
|
className: "checkbox-box"
|
|
95
116
|
}, {
|
|
96
117
|
children: [jsx("input", Object.assign({
|
|
97
118
|
type: "checkbox",
|
|
98
|
-
|
|
119
|
+
ref: inputRef,
|
|
120
|
+
checked: checkedCom,
|
|
121
|
+
disabled: disabled,
|
|
122
|
+
onChange: handleChange,
|
|
123
|
+
"aria-checked": indeterminate ? 'mixed' : checkedCom
|
|
99
124
|
}, props.inputProps)), jsx("span", {
|
|
100
125
|
className: "checkbox-box-inner"
|
|
101
126
|
})]
|
package/ComboSelect/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import SearchIcon from '@para-ui/icons/Search';
|
|
|
6
6
|
import Close from '@para-ui/icons/Close';
|
|
7
7
|
import CloseCircleF from '@para-ui/icons/CloseCircleF';
|
|
8
8
|
import Table from '../Table/index.js';
|
|
9
|
-
import { T as Tree } from '../_verture/index-
|
|
9
|
+
import { T as Tree } from '../_verture/index-62845506.js';
|
|
10
10
|
import { B as Button } from '../_verture/index-98ae8a30.js';
|
|
11
11
|
import { D as Dropdown } from '../_verture/index-bde7aabe.js';
|
|
12
12
|
import { Popover } from '../Popover/index.js';
|
|
@@ -24,8 +24,6 @@ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
|
24
24
|
import { Search } from '../Search/index.js';
|
|
25
25
|
import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
26
26
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
27
|
-
import '../_verture/typeof-adeedc13.js';
|
|
28
|
-
import '../_verture/slicedToArray-61604a6c.js';
|
|
29
27
|
import '../Checkbox/index.js';
|
|
30
28
|
import '../Help/index.js';
|
|
31
29
|
import '@para-ui/icons/Help';
|
|
@@ -37,7 +35,6 @@ import '@para-ui/icons/UpTriangleF';
|
|
|
37
35
|
import '@para-ui/icons/DownTriangleF';
|
|
38
36
|
import '@para-ui/icons/Panel';
|
|
39
37
|
import '../Empty/index.js';
|
|
40
|
-
import '../_verture/defineProperty-6f62bb2a.js';
|
|
41
38
|
import '../_verture/index-0f5ee6f7.js';
|
|
42
39
|
import '../_verture/sortable.esm-76fe46a4.js';
|
|
43
40
|
import '../Radio/index.js';
|
|
@@ -60,6 +57,8 @@ import '@para-ui/icons/DoubleRight';
|
|
|
60
57
|
import '../ScrollBar/index.js';
|
|
61
58
|
import '../_verture/useResizeObserver-edda059a.js';
|
|
62
59
|
import '../_verture/toConsumableArray-599cd94a.js';
|
|
60
|
+
import '../_verture/slicedToArray-61604a6c.js';
|
|
61
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
63
62
|
import '../_verture/index-8ac46bd9.js';
|
|
64
63
|
import '../_verture/typeof-6ec38efd.js';
|
|
65
64
|
import 'rc-tree';
|
package/CycleSelector/index.js
CHANGED
|
@@ -19,9 +19,6 @@ import 'rc-picker/es/generate/dayjs';
|
|
|
19
19
|
import '../Tag/index.js';
|
|
20
20
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
21
21
|
import '@para-ui/icons/EditOutline';
|
|
22
|
-
import '../_verture/toConsumableArray-599cd94a.js';
|
|
23
|
-
import '../_verture/slicedToArray-61604a6c.js';
|
|
24
|
-
import '../_verture/typeof-adeedc13.js';
|
|
25
22
|
import '../AutoTips/index.js';
|
|
26
23
|
import '../Tooltip/index.js';
|
|
27
24
|
import 'rc-tooltip';
|
|
@@ -32,7 +29,7 @@ import '../_verture/useResizeObserver-edda059a.js';
|
|
|
32
29
|
import '../_verture/tinycolor-ece3542d.js';
|
|
33
30
|
import '../_verture/useGlobalProps-4ae1a007.js';
|
|
34
31
|
import '@para-ui/icons/Plus';
|
|
35
|
-
import '../_verture/defineProperty-
|
|
32
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
36
33
|
import 'rc-picker';
|
|
37
34
|
import '@para-ui/icons/CloseCircleF';
|
|
38
35
|
import '@para-ui/icons/Calendar';
|
package/DatePicker/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import dayjsGenerateConfig from 'rc-picker/es/generate/dayjs';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { B as Button } from '../_verture/index-98ae8a30.js';
|
|
4
4
|
import { Tag } from '../Tag/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { a as _defineProperty } from '../_verture/defineProperty-f0e15205.js';
|
|
6
6
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
7
7
|
import React__default, { forwardRef, useImperativeHandle } from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -35,9 +35,6 @@ import '@para-ui/icons/WarningCircleF';
|
|
|
35
35
|
import '../_verture/usePopupContainer-635f66f4.js';
|
|
36
36
|
import '@para-ui/icons/Close';
|
|
37
37
|
import '@para-ui/icons/EditOutline';
|
|
38
|
-
import '../_verture/toConsumableArray-599cd94a.js';
|
|
39
|
-
import '../_verture/slicedToArray-61604a6c.js';
|
|
40
|
-
import '../_verture/typeof-adeedc13.js';
|
|
41
38
|
import '../_verture/tinycolor-ece3542d.js';
|
|
42
39
|
import '../_verture/useGlobalProps-4ae1a007.js';
|
|
43
40
|
import '@para-ui/icons/Plus';
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -53,8 +53,6 @@ import '@para-ui/icons/Up';
|
|
|
53
53
|
import '../MultiBox/index.js';
|
|
54
54
|
import '@para-ui/icons/Internet';
|
|
55
55
|
import '../Table/index.js';
|
|
56
|
-
import '../_verture/typeof-adeedc13.js';
|
|
57
|
-
import '../_verture/slicedToArray-61604a6c.js';
|
|
58
56
|
import '../_verture/index-98ae8a30.js';
|
|
59
57
|
import '@para-ui/icons/CheckCircleF';
|
|
60
58
|
import '@para-ui/icons/WarningCircle';
|
|
@@ -62,7 +60,6 @@ import '@para-ui/icons/WarningCircleF';
|
|
|
62
60
|
import '@para-ui/icons/ScreenF';
|
|
63
61
|
import '@para-ui/icons/UpTriangleF';
|
|
64
62
|
import '@para-ui/icons/DownTriangleF';
|
|
65
|
-
import '../_verture/defineProperty-6f62bb2a.js';
|
|
66
63
|
import '../Radio/index.js';
|
|
67
64
|
import '../OperateBtn/index.js';
|
|
68
65
|
import '@para-ui/icons/More';
|
|
@@ -75,8 +72,10 @@ import '@para-ui/icons/DoubleLeft';
|
|
|
75
72
|
import '@para-ui/icons/DoubleRight';
|
|
76
73
|
import '../ScrollBar/index.js';
|
|
77
74
|
import '../_verture/useResizeObserver-edda059a.js';
|
|
78
|
-
import '../_verture/index-
|
|
75
|
+
import '../_verture/index-62845506.js';
|
|
79
76
|
import '../_verture/toConsumableArray-599cd94a.js';
|
|
77
|
+
import '../_verture/slicedToArray-61604a6c.js';
|
|
78
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
80
79
|
import '../_verture/index-8ac46bd9.js';
|
|
81
80
|
import '../_verture/typeof-6ec38efd.js';
|
|
82
81
|
import 'rc-tree';
|
package/FieldForm/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { useRef, useState, useMemo as useMemo$2, useContext, useEffect, createContext, isValidElement, forwardRef, useImperativeHandle, memo, useLayoutEffect, Children, cloneElement } from 'react';
|
|
4
|
-
import { _ as _objectSpread2, d as warningOnce, b as _objectWithoutProperties, a as _extends, c as clsx, r as reactIs } from '../_verture/index-
|
|
5
|
-
import { _ as _typeof } from '../_verture/
|
|
4
|
+
import { _ as _objectSpread2, d as warningOnce, b as _objectWithoutProperties, a as _extends, c as clsx, r as reactIs } from '../_verture/index-9e4b0e32.js';
|
|
5
|
+
import { _ as _typeof, a as _defineProperty } from '../_verture/defineProperty-f0e15205.js';
|
|
6
6
|
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-599cd94a.js';
|
|
7
|
-
import { d as _toArray, g as _isNativeReflectConstruct, h as _setPrototypeOf, j as _getPrototypeOf, _ as _inherits, a as _createSuper, b as _classCallCheck, k as _assertThisInitialized, c as _createClass, t as toArray$4, e as interopRequireWildcard, i as interopRequireDefault, l as default_1$2, m as _default$2 } from '../_verture/useState-
|
|
8
|
-
import {
|
|
9
|
-
import { i as isEqual } from '../_verture/isEqual-30b6f859.js';
|
|
7
|
+
import { d as _toArray, g as _isNativeReflectConstruct, h as _setPrototypeOf, j as _getPrototypeOf, _ as _inherits, a as _createSuper, b as _classCallCheck, k as _assertThisInitialized, c as _createClass, t as toArray$4, e as interopRequireWildcard, i as interopRequireDefault, l as default_1$2, m as _default$2 } from '../_verture/useState-05fc6660.js';
|
|
8
|
+
import { i as isEqual } from '../_verture/isEqual-38aa74f9.js';
|
|
10
9
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-61604a6c.js';
|
|
11
10
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
12
11
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
package/Form/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { DeepClone } from '@paraview/lib';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-
|
|
4
|
+
import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-32a8f7db.js';
|
|
5
5
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
6
6
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
7
7
|
import '../TextField/index.js';
|
|
@@ -56,12 +56,10 @@ import 'rc-input-number';
|
|
|
56
56
|
import '@para-ui/icons/Up';
|
|
57
57
|
import '../ComboSelect/index.js';
|
|
58
58
|
import '../Table/index.js';
|
|
59
|
-
import '../_verture/typeof-adeedc13.js';
|
|
60
59
|
import '@para-ui/icons/ScreenF';
|
|
61
60
|
import '@para-ui/icons/UpTriangleF';
|
|
62
61
|
import '@para-ui/icons/DownTriangleF';
|
|
63
62
|
import '@para-ui/icons/Panel';
|
|
64
|
-
import '../_verture/defineProperty-6f62bb2a.js';
|
|
65
63
|
import '../_verture/index-0f5ee6f7.js';
|
|
66
64
|
import '../_verture/sortable.esm-76fe46a4.js';
|
|
67
65
|
import '../OperateBtn/index.js';
|
|
@@ -75,8 +73,9 @@ import '@para-ui/icons/Right';
|
|
|
75
73
|
import '@para-ui/icons/DoubleLeft';
|
|
76
74
|
import '@para-ui/icons/DoubleRight';
|
|
77
75
|
import '../ScrollBar/index.js';
|
|
78
|
-
import '../_verture/index-
|
|
76
|
+
import '../_verture/index-62845506.js';
|
|
79
77
|
import '../_verture/toConsumableArray-599cd94a.js';
|
|
78
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
80
79
|
import '../_verture/index-8ac46bd9.js';
|
|
81
80
|
import '../_verture/typeof-6ec38efd.js';
|
|
82
81
|
import 'rc-tree';
|
package/FormItem/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { F as default } from '../_verture/index-
|
|
3
|
+
export { F as default } from '../_verture/index-32a8f7db.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
6
|
import '../_verture/constant-5317fc89.js';
|
|
@@ -56,12 +56,10 @@ import 'rc-input-number';
|
|
|
56
56
|
import '@para-ui/icons/Up';
|
|
57
57
|
import '../ComboSelect/index.js';
|
|
58
58
|
import '../Table/index.js';
|
|
59
|
-
import '../_verture/typeof-adeedc13.js';
|
|
60
59
|
import '@para-ui/icons/ScreenF';
|
|
61
60
|
import '@para-ui/icons/UpTriangleF';
|
|
62
61
|
import '@para-ui/icons/DownTriangleF';
|
|
63
62
|
import '@para-ui/icons/Panel';
|
|
64
|
-
import '../_verture/defineProperty-6f62bb2a.js';
|
|
65
63
|
import '../_verture/index-0f5ee6f7.js';
|
|
66
64
|
import '../_verture/sortable.esm-76fe46a4.js';
|
|
67
65
|
import '../OperateBtn/index.js';
|
|
@@ -75,8 +73,9 @@ import '@para-ui/icons/Right';
|
|
|
75
73
|
import '@para-ui/icons/DoubleLeft';
|
|
76
74
|
import '@para-ui/icons/DoubleRight';
|
|
77
75
|
import '../ScrollBar/index.js';
|
|
78
|
-
import '../_verture/index-
|
|
76
|
+
import '../_verture/index-62845506.js';
|
|
79
77
|
import '../_verture/toConsumableArray-599cd94a.js';
|
|
78
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
80
79
|
import '../_verture/index-8ac46bd9.js';
|
|
81
80
|
import '../_verture/typeof-6ec38efd.js';
|
|
82
81
|
import 'rc-tree';
|
package/Image/index.js
CHANGED
|
@@ -2,14 +2,13 @@ import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useState, useRef, useEffect, useContext, useMemo } from 'react';
|
|
5
|
-
import { _ as _objectSpread2, w as warning, c as clsx, b as _objectWithoutProperties, a as _extends } from '../_verture/index-
|
|
6
|
-
import {
|
|
5
|
+
import { _ as _objectSpread2, w as warning, c as clsx, b as _objectWithoutProperties, a as _extends } from '../_verture/index-9e4b0e32.js';
|
|
6
|
+
import { a as _defineProperty, _ as _typeof } from '../_verture/defineProperty-f0e15205.js';
|
|
7
7
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-61604a6c.js';
|
|
8
|
-
import {
|
|
9
|
-
import { w as wrapperRaf, P as Portal, K as KeyCode, d as useMergedState } from '../_verture/Portal-502bb85e.js';
|
|
8
|
+
import { w as wrapperRaf, P as Portal, K as KeyCode, d as useMergedState } from '../_verture/Portal-274c5bd8.js';
|
|
10
9
|
import Dialog from 'rc-dialog';
|
|
11
10
|
import ReactDOM from 'react-dom';
|
|
12
|
-
import { i as isEqual } from '../_verture/isEqual-
|
|
11
|
+
import { i as isEqual } from '../_verture/isEqual-38aa74f9.js';
|
|
13
12
|
import CSSMotion from 'rc-motion';
|
|
14
13
|
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-599cd94a.js';
|
|
15
14
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
@@ -1330,7 +1329,7 @@ var ImageInternal = function ImageInternal(props) {
|
|
|
1330
1329
|
ImageInternal.PreviewGroup = Group;
|
|
1331
1330
|
ImageInternal.displayName = 'Image';
|
|
1332
1331
|
|
|
1333
|
-
|
|
1332
|
+
const icons = {
|
|
1334
1333
|
rotateLeft: jsx(TurnLeft, {
|
|
1335
1334
|
size: 'large'
|
|
1336
1335
|
}),
|
|
@@ -1355,21 +1354,22 @@ var icons = {
|
|
|
1355
1354
|
size: 'large'
|
|
1356
1355
|
})
|
|
1357
1356
|
};
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1357
|
+
const InternalPreviewGroup = _a => {
|
|
1358
|
+
var {
|
|
1359
|
+
previewPrefixCls: customizePrefixCls,
|
|
1360
|
+
preview,
|
|
1361
|
+
children = null
|
|
1362
|
+
} = _a,
|
|
1363
1363
|
props = __rest(_a, ["previewPrefixCls", "preview", "children"]);
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1364
|
+
const imagePrefixCls = "".concat($prefixCls, "-image");
|
|
1365
|
+
const previewPrefixCls = "".concat(imagePrefixCls, "-preview");
|
|
1366
|
+
const mergedPreview = React.useMemo(() => {
|
|
1367
1367
|
var _a;
|
|
1368
1368
|
if (preview === false) {
|
|
1369
1369
|
return preview;
|
|
1370
1370
|
}
|
|
1371
|
-
|
|
1372
|
-
|
|
1371
|
+
const _preview = typeof preview === 'object' ? preview : {};
|
|
1372
|
+
const mergedRootClassName = clsx((_a = _preview.rootClassName) !== null && _a !== void 0 ? _a : '');
|
|
1373
1373
|
return Object.assign(Object.assign({}, _preview), {
|
|
1374
1374
|
rootClassName: mergedRootClassName
|
|
1375
1375
|
});
|