@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.
Files changed (56) hide show
  1. package/Cascader/index.js +6 -7
  2. package/Checkbox/index.d.ts +1 -0
  3. package/Checkbox/index.js +37 -12
  4. package/ComboSelect/index.js +3 -4
  5. package/CycleSelector/index.js +1 -4
  6. package/DatePicker/index.js +1 -4
  7. package/DynamicMultiBox/index.js +3 -4
  8. package/FieldForm/index.js +4 -5
  9. package/Form/index.js +3 -4
  10. package/FormItem/index.js +3 -4
  11. package/Image/index.js +16 -16
  12. package/Menu/index.js +296 -348
  13. package/Message/index.js +5 -1
  14. package/OperateBtn/index.js +2 -2
  15. package/README.md +13 -0
  16. package/Radio/index.d.ts +1 -0
  17. package/Radio/index.js +31 -9
  18. package/Selector/index.js +280 -222
  19. package/SelectorPicker/index.js +2 -2
  20. package/Table/index.js +432 -497
  21. package/Tabs/index.js +2 -2
  22. package/Tag/index.js +55 -87
  23. package/TextEditor/index.js +3 -3
  24. package/TimePicker/index.js +1 -4
  25. package/Timeline/index.js +1 -2
  26. package/ToggleButton/index.js +1 -2
  27. package/Tree/index.js +3 -4
  28. package/Upload/index.js +4 -5
  29. package/_verture/{Portal-502bb85e.js → Portal-274c5bd8.js} +2 -2
  30. package/_verture/{defineProperty-6f62bb2a.js → defineProperty-f0e15205.js} +10 -2
  31. package/_verture/{index-d068959c.js → index-62845506.js} +1 -2
  32. package/_verture/{index-78f0f0e7.js → index-99b02582.js} +4 -5
  33. package/_verture/{index-1856bbeb.js → index-9e4b0e32.js} +1 -1
  34. package/_verture/{isEqual-30b6f859.js → isEqual-38aa74f9.js} +2 -2
  35. package/_verture/{useState-f2419d68.js → useState-05fc6660.js} +2 -3
  36. package/index.js +8 -9
  37. package/package.json +1 -1
  38. package/umd/Argv.js +1 -1
  39. package/umd/Checkbox.js +1 -1
  40. package/umd/CheckboxGroup.js +1 -1
  41. package/umd/ComboSelect.js +1 -1
  42. package/umd/DynamicMultiBox.js +1 -1
  43. package/umd/Form.js +3 -3
  44. package/umd/FormItem.js +1 -1
  45. package/umd/Menu.js +1 -1
  46. package/umd/Message.js +1 -1
  47. package/umd/QuickReply.js +1 -1
  48. package/umd/Radio.js +3 -3
  49. package/umd/RadioGroup.js +1 -1
  50. package/umd/Selector.js +3 -3
  51. package/umd/SelectorPicker.js +1 -1
  52. package/umd/Table.js +1 -1
  53. package/umd/Tabs.js +1 -1
  54. package/umd/Tree.js +1 -1
  55. package/_verture/typeof-adeedc13.js +0 -11
  56. /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-78f0f0e7.js';
2
- export { C as default } from '../_verture/index-78f0f0e7.js';
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-1856bbeb.js';
6
- import '../_verture/defineProperty-6f62bb2a.js';
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-502bb85e.js';
9
+ import '../_verture/Portal-274c5bd8.js';
11
10
  import 'react';
12
11
  import 'react-dom';
13
- import '../_verture/useState-f2419d68.js';
12
+ import '../_verture/useState-05fc6660.js';
14
13
  import '../_verture/typeof-6ec38efd.js';
15
14
  import 'rc-motion';
16
15
  import 'clsx';
@@ -37,6 +37,7 @@ export interface CheckboxProps {
37
37
  type?: string;
38
38
  value?: any;
39
39
  checked?: any;
40
+ readOnly?: boolean;
40
41
  [name: string]: any;
41
42
  };
42
43
  /** 改变时间 */
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
- const clickCheck = e => {
40
- e.preventDefault();
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(!checkedCom);
50
- e.target.checked = !checkedCom;
51
- e.target.value = !checkedCom;
52
- onChange && onChange(e, !checkedCom);
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
- onClick: clickCheck,
91
- style: handStyle()
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
- value: checkedCom
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
  })]
@@ -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-d068959c.js';
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';
@@ -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-6f62bb2a.js';
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';
@@ -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 { _ as _defineProperty } from '../_verture/defineProperty-6f62bb2a.js';
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';
@@ -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-d068959c.js';
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';
@@ -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-1856bbeb.js';
5
- import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
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-f2419d68.js';
8
- import { _ as _defineProperty } from '../_verture/defineProperty-6f62bb2a.js';
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-73a11529.js';
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-d068959c.js';
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-73a11529.js';
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-d068959c.js';
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-1856bbeb.js';
6
- import { _ as _defineProperty } from '../_verture/defineProperty-6f62bb2a.js';
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 { _ as _typeof } from '../_verture/typeof-adeedc13.js';
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-30b6f859.js';
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
- var icons = {
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
- var InternalPreviewGroup = function InternalPreviewGroup(_a) {
1359
- _a.previewPrefixCls;
1360
- var preview = _a.preview,
1361
- _a$children = _a.children,
1362
- children = _a$children === void 0 ? null : _a$children,
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
- var imagePrefixCls = "".concat($prefixCls, "-image");
1365
- var previewPrefixCls = "".concat(imagePrefixCls, "-preview");
1366
- var mergedPreview = React.useMemo(function () {
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
- var _preview = _typeof(preview) === 'object' ? preview : {};
1372
- var mergedRootClassName = clsx((_a = _preview.rootClassName) !== null && _a !== void 0 ? _a : '');
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
  });