@qsxy/element-plus-react 1.0.0-next.13 → 1.0.0-next.16

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 (104) hide show
  1. package/dist/Button/Button.js +5 -3
  2. package/dist/Button/typings.d.ts +3 -1
  3. package/dist/ColorPicker/AlphaSlider.d.ts +0 -7
  4. package/dist/ColorPicker/AlphaSlider.js +0 -7
  5. package/dist/ColorPicker/HueSlider.d.ts +0 -7
  6. package/dist/ColorPicker/HueSlider.js +0 -7
  7. package/dist/ColorPicker/Predefine.d.ts +0 -7
  8. package/dist/ColorPicker/Predefine.js +0 -7
  9. package/dist/ColorPicker/SvPanel.d.ts +0 -7
  10. package/dist/ColorPicker/SvPanel.js +0 -7
  11. package/dist/DateTimePicker/DateTimePicker.d.ts +1 -1
  12. package/dist/Descriptions/Descriptions.d.ts +2 -2
  13. package/dist/Descriptions/Descriptions.js +7 -6
  14. package/dist/Descriptions/DescriptionsCell.d.ts +11 -12
  15. package/dist/Descriptions/DescriptionsCell.js +13 -6
  16. package/dist/Descriptions/DescriptionsItem.js +1 -1
  17. package/dist/Descriptions/DescriptionsRow.d.ts +2 -5
  18. package/dist/Descriptions/DescriptionsRow.js +11 -4
  19. package/dist/Dialog/Dialog.js +5 -6
  20. package/dist/Dialog/DialogContext.d.ts +1 -1
  21. package/dist/Dialog/DialogContext.js +1 -1
  22. package/dist/Drawer/Drawer.d.ts +2 -5
  23. package/dist/Drawer/Drawer.js +98 -35
  24. package/dist/Drawer/DrawerBody.js +6 -12
  25. package/dist/Drawer/DrawerContext.d.ts +1 -13
  26. package/dist/Drawer/DrawerContext.js +1 -11
  27. package/dist/Drawer/DrawerHeader.js +5 -18
  28. package/dist/Drawer/typings.d.ts +31 -10
  29. package/dist/Dropdown/Dropdown.js +7 -7
  30. package/dist/Dropdown/DropdownItem.js +1 -1
  31. package/dist/Dropdown/DropdownMenu.d.ts +5 -2
  32. package/dist/Dropdown/DropdownMenu.js +5 -3
  33. package/dist/Dropdown/typings.d.ts +3 -1
  34. package/dist/MessageBox/MessageBox.js +6 -1
  35. package/dist/MessageBox/index.d.ts +3 -3
  36. package/dist/Notification/Notification.js +6 -3
  37. package/dist/Notification/index.d.ts +0 -8
  38. package/dist/Notification/index.js +0 -9
  39. package/dist/Notification/typings.d.ts +0 -2
  40. package/dist/Pagination/Options.js +2 -1
  41. package/dist/Popconfirm/Popconfirm.d.ts +3 -2
  42. package/dist/Popconfirm/Popconfirm.js +15 -8
  43. package/dist/Popconfirm/typings.d.ts +2 -1
  44. package/dist/Popover/Popover.js +7 -5
  45. package/dist/Popover/typings.d.ts +1 -1
  46. package/dist/Select/Option.js +1 -1
  47. package/dist/Select/OptionGroup.js +1 -1
  48. package/dist/Select/Select.d.ts +3 -15
  49. package/dist/Select/Select.js +3 -9
  50. package/dist/Select/SelectCore.js +52 -27
  51. package/dist/Select/index.d.ts +1 -0
  52. package/dist/Select/index.js +1 -0
  53. package/dist/Select/typings.d.ts +13 -1
  54. package/dist/Skeleton/PlaceholderGraph.d.ts +1 -1
  55. package/dist/Skeleton/PlaceholderGraph.js +3 -3
  56. package/dist/Skeleton/PlaceholderGrid.d.ts +1 -1
  57. package/dist/Skeleton/PlaceholderGrid.js +3 -3
  58. package/dist/Skeleton/PlaceholderParagraph.d.ts +2 -2
  59. package/dist/Skeleton/PlaceholderParagraph.js +13 -8
  60. package/dist/Skeleton/Skeleton.d.ts +2 -9
  61. package/dist/Skeleton/Skeleton.js +94 -7
  62. package/dist/Skeleton/SkeletonContext.d.ts +17 -0
  63. package/dist/Skeleton/SkeletonContext.js +5 -0
  64. package/dist/Skeleton/SkeletonItem.d.ts +4 -0
  65. package/dist/Skeleton/SkeletonItem.js +47 -0
  66. package/dist/Skeleton/index.d.ts +2 -3
  67. package/dist/Skeleton/index.js +2 -1
  68. package/dist/Skeleton/typings.d.ts +29 -0
  69. package/dist/Skeleton/typings.js +1 -0
  70. package/dist/Table/TableColumn.js +2 -2
  71. package/dist/Table/TableHeaderCell.js +16 -16
  72. package/dist/Table/hooks/useTable.d.ts +0 -7
  73. package/dist/Table/hooks/useTable.js +1 -9
  74. package/dist/Table/typings.d.ts +1 -1
  75. package/dist/Tabs/TabPane.js +1 -1
  76. package/dist/Tabs/Tabs.d.ts +2 -2
  77. package/dist/Tabs/Tabs.js +8 -4
  78. package/dist/Tabs/typings.d.ts +2 -0
  79. package/dist/Tag/Tag.d.ts +1 -1
  80. package/dist/Tag/Tag.js +5 -5
  81. package/dist/Tag/typings.d.ts +1 -1
  82. package/dist/TimeLine/TimeLine.js +1 -0
  83. package/dist/TimeLine/TimeLineItem.js +1 -0
  84. package/dist/TimeLine/typings.d.ts +2 -2
  85. package/dist/TimePicker/useTimePicker.d.ts +0 -7
  86. package/dist/TimePicker/useTimePicker.js +1 -8
  87. package/dist/Upload/use-handlers.d.ts +1 -1
  88. package/dist/hooks/animationPropsUtils.d.ts +0 -4
  89. package/dist/hooks/animationPropsUtils.js +0 -4
  90. package/dist/hooks/popperPropsUtils.d.ts +0 -4
  91. package/dist/hooks/popperPropsUtils.js +0 -4
  92. package/dist/hooks/useChildrenInstance.d.ts +0 -4
  93. package/dist/hooks/useChildrenInstance.js +0 -4
  94. package/dist/index.css +1 -1
  95. package/dist/index.d.ts +3 -3
  96. package/dist/index.js +2 -2
  97. package/package.json +1 -1
  98. package/theme-chalk/drawer/index.scss +61 -65
  99. package/theme-chalk/index.scss +1 -1
  100. package/theme-chalk/placeholder/index.scss +22 -37
  101. package/theme-chalk/skeleton/index.scss +120 -0
  102. package/theme-chalk/tabs/index.scss +3 -3
  103. package/theme-chalk/tag/index.scss +5 -162
  104. package/theme-chalk/time-line/_timeline-item.scss +1 -1
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["active", "block", "plain", "round", "circle", "link", "text", "bg", "dashed", "className", "loading", "loadingIcon", "loadingSlot", "nativeType", "icon", "onClick"];
2
+ var _excluded = ["active", "block", "plain", "round", "circle", "link", "text", "bg", "dashed", "className", "loading", "loadingIcon", "loadingSlot", "nativeType", "icon", "iconProps", "onClick"];
3
3
  var _this = this,
4
4
  _templateObject,
5
5
  _templateObject2;
@@ -54,6 +54,8 @@ var InternalButton = function InternalButton(props, ref) {
54
54
  nativeType = _props$nativeType === void 0 ? 'button' : _props$nativeType,
55
55
  _props$icon = props.icon,
56
56
  icon = _props$icon === void 0 ? false : _props$icon,
57
+ _props$iconProps = props.iconProps,
58
+ iconProps = _props$iconProps === void 0 ? {} : _props$iconProps,
57
59
  _onClick = props.onClick,
58
60
  rest = _objectWithoutProperties(props, _excluded);
59
61
  var disabled = useDisabled(groupDisabled !== null && groupDisabled !== void 0 ? groupDisabled : props.disabled);
@@ -127,9 +129,9 @@ var InternalButton = function InternalButton(props, ref) {
127
129
  }
128
130
  (_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || _e$currentTarget.blur();
129
131
  }
130
- }), loading && spin, icon && !loading && typeof icon === 'string' ? /*#__PURE__*/React.createElement(Icon, {
132
+ }), loading && spin, icon && !loading && typeof icon === 'string' ? /*#__PURE__*/React.createElement(Icon, _extends({
131
133
  name: icon
132
- }) : null, children);
134
+ }, iconProps)) : null, children);
133
135
  };
134
136
  var Comp = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(InternalButton));
135
137
  var Button = Comp;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IconName } from '../Icon';
2
+ import { IconName, IconProps } from '../Icon';
3
3
  import { BaseProps, NativeProps, TypeAttributes } from '../types/common';
4
4
  export interface ButtonProps extends Omit<React.AllHTMLAttributes<HTMLElement>, 'loading' | 'size' | 'icon' | 'style' | 'children'>, BaseProps, NativeProps<'--el-button-bg-color' | '--el-button-border-style' | '--el-button-text-color' | '--el-button-border-color' | '--el-button-hover-bg-color' | '--el-button-active-border-color' | '--el-button-active-bg-color' | '--el-button-active-color' | '--el-button-hover-text-color' | '--el-button-hover-border-color' | '--el-button-hover-link-text-color' | '--el-button-active-text-color' | '--el-button-disabled-text-color' | '--el-button-disabled-bg-color' | '--el-button-disabled-border-color' | '--el-button-divide-border-color' | '--el-button-outline-color' | '--el-button-border-radius-round'> {
5
5
  /** 尺寸 */
@@ -34,6 +34,8 @@ export interface ButtonProps extends Omit<React.AllHTMLAttributes<HTMLElement>,
34
34
  dark?: boolean;
35
35
  /** 自定义图标 */
36
36
  icon?: IconName | boolean;
37
+ /** 自定义图标设置 */
38
+ iconProps?: Omit<IconProps, 'name'>;
37
39
  /** 自定义颜色 */
38
40
  color?: string;
39
41
  /** Format button to appear inside a content bloc */
@@ -8,12 +8,5 @@ interface Props {
8
8
  export interface AlphaSliderRef {
9
9
  update: () => void;
10
10
  }
11
- /**
12
- * @author Parker
13
- * @CreateTime 2022/5/14 18:16:52
14
- * @LastEditor Parker
15
- * @ModifyTime 2022/5/14 22:17:13
16
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
17
- */
18
11
  declare const AlphaSlider: React.ForwardRefExoticComponent<Props & React.RefAttributes<AlphaSliderRef>>;
19
12
  export default AlphaSlider;
@@ -12,13 +12,6 @@ import React, { forwardRef, useCallback, useImperativeHandle, useRef, useState }
12
12
  import { useClassNames } from "../hooks";
13
13
  import draggable from "./draggable";
14
14
  import { getClientXY } from "./util";
15
- /**
16
- * @author Parker
17
- * @CreateTime 2022/5/14 18:16:52
18
- * @LastEditor Parker
19
- * @ModifyTime 2022/5/14 22:17:13
20
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
21
- */
22
15
  var AlphaSlider = /*#__PURE__*/forwardRef(function (props, ref) {
23
16
  var color = props.color,
24
17
  vertical = props.vertical,
@@ -8,12 +8,5 @@ interface Props {
8
8
  export interface HueSliderRef {
9
9
  update: () => void;
10
10
  }
11
- /**
12
- * @author Parker
13
- * @CreateTime 2022/5/14 16:16:37
14
- * @LastEditor Parker
15
- * @ModifyTime 2022/11/20 11:55:00
16
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
17
- */
18
11
  declare const HueSlider: React.ForwardRefExoticComponent<Props & React.RefAttributes<HueSliderRef>>;
19
12
  export default HueSlider;
@@ -12,13 +12,6 @@ import React, { forwardRef, useCallback, useImperativeHandle, useRef, useState }
12
12
  import { useClassNames } from "../hooks";
13
13
  import draggable from "./draggable";
14
14
  import { getClientXY } from "./util";
15
- /**
16
- * @author Parker
17
- * @CreateTime 2022/5/14 16:16:37
18
- * @LastEditor Parker
19
- * @ModifyTime 2022/11/20 11:55:00
20
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
21
- */
22
15
  var HueSlider = /*#__PURE__*/forwardRef(function (props, ref) {
23
16
  var color = props.color,
24
17
  vertical = props.vertical,
@@ -8,12 +8,5 @@ interface Props {
8
8
  export interface PredefineRef {
9
9
  update: () => void;
10
10
  }
11
- /**
12
- * @author Parker
13
- * @CreateTime 2022/5/14 19:24:19
14
- * @LastEditor Parker
15
- * @ModifyTime 2025/2/22 19:59:12
16
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
17
- */
18
11
  declare const Predefine: React.ForwardRefExoticComponent<Props & React.RefAttributes<PredefineRef>>;
19
12
  export default Predefine;
@@ -11,13 +11,6 @@ import classNames from 'classnames';
11
11
  import React, { forwardRef, useCallback, useImperativeHandle, useState } from 'react';
12
12
  import { useClassNames } from "../hooks";
13
13
  import { parseColors } from "./util";
14
- /**
15
- * @author Parker
16
- * @CreateTime 2022/5/14 19:24:19
17
- * @LastEditor Parker
18
- * @ModifyTime 2025/2/22 19:59:12
19
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
20
- */
21
14
  var Predefine = /*#__PURE__*/forwardRef(function (props, ref) {
22
15
  var color = props.color,
23
16
  colors = props.colors,
@@ -7,12 +7,5 @@ interface Props {
7
7
  export interface SvPanelRef {
8
8
  update: () => void;
9
9
  }
10
- /**
11
- * @author Parker
12
- * @CreateTime 2022/5/14 16:16:37
13
- * @LastEditor Parker
14
- * @ModifyTime 2022/11/20 11:54:52
15
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
16
- */
17
10
  declare const SvPanel: React.ForwardRefExoticComponent<Props & React.RefAttributes<SvPanelRef>>;
18
11
  export default SvPanel;
@@ -11,13 +11,6 @@ import React, { forwardRef, useCallback, useImperativeHandle, useRef, useState }
11
11
  import { useClassNames } from "../hooks";
12
12
  import draggable from "./draggable";
13
13
  import { getClientXY } from "./util";
14
- /**
15
- * @author Parker
16
- * @CreateTime 2022/5/14 16:16:37
17
- * @LastEditor Parker
18
- * @ModifyTime 2022/11/20 11:54:52
19
- * @Description Element Plus 颜色选择器组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
20
- */
21
14
  var SvPanel = /*#__PURE__*/forwardRef(function (props, ref) {
22
15
  var color = props.color,
23
16
  onChange = props.onChange;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DateTimePickerRef } from './typings';
3
- declare const DateTimePicker: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<import("..").DatePickerProps, "name" | "type"> & {
3
+ declare const DateTimePicker: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<import("..").DatePickerProps, "type" | "name"> & {
4
4
  name?: string;
5
5
  onClear?: (event?: any) => void;
6
6
  defaultTime?: Date;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { DescriptionsProps } from './typings';
3
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<DescriptionsProps & React.RefAttributes<any>>>;
4
- export default _default;
3
+ declare const Descriptions: React.MemoExoticComponent<React.ForwardRefExoticComponent<DescriptionsProps & React.RefAttributes<any>>>;
4
+ export default Descriptions;
@@ -11,7 +11,7 @@ import React, { cloneElement, forwardRef, memo, useCallback, useMemo } from 'rea
11
11
  import { useChildrenInstance, useClassNames } from "../hooks";
12
12
  import { DescriptionsContext } from "./DescriptionsContext";
13
13
  import DescriptionsRow from "./DescriptionsRow";
14
- var Descriptions = /*#__PURE__*/forwardRef(function (props, ref) {
14
+ var Descriptions = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
15
15
  var border = props.border,
16
16
  _props$column = props.column,
17
17
  column = _props$column === void 0 ? 3 : _props$column,
@@ -31,7 +31,7 @@ var Descriptions = /*#__PURE__*/forwardRef(function (props, ref) {
31
31
  is = _useClassNames.is;
32
32
 
33
33
  /** 获取子组件 */
34
- var getChildInstance = useChildrenInstance('DescriptionsItem');
34
+ var getChildInstance = useChildrenInstance('ElDescriptionsItem');
35
35
  var filledNode = useCallback(function (node, span, count) {
36
36
  var isLast = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
37
37
  if (span > count) {
@@ -102,11 +102,12 @@ var Descriptions = /*#__PURE__*/forwardRef(function (props, ref) {
102
102
  className: classNames(e(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["table"]))), is({
103
103
  bordered: border
104
104
  }))
105
- }, /*#__PURE__*/React.createElement("tbody", null, rows.map(function (row) {
105
+ }, /*#__PURE__*/React.createElement("tbody", null, rows.map(function (row, index) {
106
106
  return /*#__PURE__*/React.createElement(DescriptionsRow, {
107
+ key: index,
107
108
  row: row
108
109
  });
109
110
  }))))));
110
- });
111
- Descriptions.displayName = 'Descriptions';
112
- export default /*#__PURE__*/memo(Descriptions);
111
+ }));
112
+ Descriptions.displayName = 'ElDescriptions';
113
+ export default Descriptions;
@@ -4,16 +4,15 @@ interface Props {
4
4
  cell: React.ReactElement<DescriptionsItemProps>;
5
5
  tag: string;
6
6
  type: string;
7
+ _key: string;
7
8
  }
8
- declare const _default: React.MemoExoticComponent<{
9
- ({ cell, tag, type }: Props): React.ReactElement<{
10
- style: {
11
- width: string | number;
12
- minWidth: string | number;
13
- };
14
- className: string;
15
- colSpan: number;
16
- }, string | React.JSXElementConstructor<any>>;
17
- displayName: string;
18
- }>;
19
- export default _default;
9
+ declare const DescriptionsCell: React.MemoExoticComponent<({ cell, tag, type, _key }: Props) => React.ReactElement<{
10
+ key: string;
11
+ style: {
12
+ width: string | number;
13
+ minWidth: string | number;
14
+ };
15
+ className: string;
16
+ colSpan: number;
17
+ }, string | React.JSXElementConstructor<any>>>;
18
+ export default DescriptionsCell;
@@ -8,13 +8,15 @@ import classNames from 'classnames';
8
8
  import { createElement, memo, useContext, useMemo } from 'react';
9
9
  import { useClassNames } from "../hooks";
10
10
  import { DescriptionsContext } from "./DescriptionsContext";
11
- var DescriptionsCell = function DescriptionsCell(_ref) {
11
+ var DescriptionsCell = /*#__PURE__*/memo(function (_ref) {
12
12
  var cell = _ref.cell,
13
13
  tag = _ref.tag,
14
- type = _ref.type;
14
+ type = _ref.type,
15
+ _key = _ref._key;
15
16
  var _cell$props = cell.props,
16
17
  label = _cell$props.label,
17
- span = _cell$props.span,
18
+ _cell$props$span = _cell$props.span,
19
+ span = _cell$props$span === void 0 ? 1 : _cell$props$span,
18
20
  align = _cell$props.align,
19
21
  labelAlign = _cell$props.labelAlign,
20
22
  className = _cell$props.className,
@@ -40,6 +42,7 @@ var DescriptionsCell = function DescriptionsCell(_ref) {
40
42
  switch (type) {
41
43
  case 'label':
42
44
  return /*#__PURE__*/createElement(tag, {
45
+ key: _key,
43
46
  style: style,
44
47
  className: classNames(e(_templateObject || (_templateObject = _taggedTemplateLiteral(["cell"]))), e(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["label"]))), is(_defineProperty({
45
48
  'bordered-label': border,
@@ -49,6 +52,7 @@ var DescriptionsCell = function DescriptionsCell(_ref) {
49
52
  }, label);
50
53
  case 'content':
51
54
  return /*#__PURE__*/createElement(tag, {
55
+ key: _key,
52
56
  style: style,
53
57
  className: classNames(e(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["cell"]))), e(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["content"]))), is(_defineProperty({
54
58
  'bordered-label': border,
@@ -58,15 +62,18 @@ var DescriptionsCell = function DescriptionsCell(_ref) {
58
62
  }, children);
59
63
  default:
60
64
  return /*#__PURE__*/createElement('td', {
65
+ key: _key,
61
66
  style: style,
62
67
  className: classNames(e(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["cell"]))), is(_defineProperty({}, align, align))),
63
68
  colSpan: span
64
69
  }, [/*#__PURE__*/createElement('span', {
70
+ key: _key + '1',
65
71
  className: classNames(e(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["label"]))), labelClassName)
66
72
  }, label), /*#__PURE__*/createElement('span', {
73
+ key: _key + '2',
67
74
  className: classNames(e(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["content"]))), className)
68
75
  }, children)]);
69
76
  }
70
- };
71
- DescriptionsCell.displayName = 'DescriptionsCell';
72
- export default /*#__PURE__*/memo(DescriptionsCell);
77
+ });
78
+ DescriptionsCell.displayName = 'ElDescriptionsCell';
79
+ export default DescriptionsCell;
@@ -2,5 +2,5 @@
2
2
  var DescriptionsItem = function DescriptionsItem(props) {
3
3
  return null;
4
4
  };
5
- DescriptionsItem.displayName = 'DescriptionsItem';
5
+ DescriptionsItem.displayName = 'ElDescriptionsItem';
6
6
  export default DescriptionsItem;
@@ -3,8 +3,5 @@ import { DescriptionsItemProps } from './typings';
3
3
  interface Props {
4
4
  row: React.ReactElement<DescriptionsItemProps>[];
5
5
  }
6
- declare const _default: React.MemoExoticComponent<{
7
- ({ row }: Props): React.JSX.Element;
8
- displayName: string;
9
- }>;
10
- export default _default;
6
+ declare const DescriptionsRow: React.MemoExoticComponent<({ row }: Props) => React.JSX.Element>;
7
+ export default DescriptionsRow;
@@ -1,7 +1,7 @@
1
1
  import React, { Fragment, memo, useContext } from 'react';
2
2
  import DescriptionsCell from "./DescriptionsCell";
3
3
  import { DescriptionsContext } from "./DescriptionsContext";
4
- var DescriptionsRow = function DescriptionsRow(_ref) {
4
+ var DescriptionsRow = /*#__PURE__*/memo(function (_ref) {
5
5
  var row = _ref.row;
6
6
  var _useContext = useContext(DescriptionsContext),
7
7
  direction = _useContext.direction,
@@ -9,6 +9,7 @@ var DescriptionsRow = function DescriptionsRow(_ref) {
9
9
  return direction === 'vertical' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("tr", null, row.map(function (cell, index) {
10
10
  return /*#__PURE__*/React.createElement(DescriptionsCell, {
11
11
  key: "tr1-".concat(index),
12
+ _key: "tr1-".concat(index),
12
13
  cell: cell,
13
14
  tag: "th",
14
15
  type: "label"
@@ -16,6 +17,7 @@ var DescriptionsRow = function DescriptionsRow(_ref) {
16
17
  })), /*#__PURE__*/React.createElement("tr", null, row.map(function (cell, index) {
17
18
  return /*#__PURE__*/React.createElement(DescriptionsCell, {
18
19
  key: "tr2-".concat(index),
20
+ _key: "tr2-".concat(index),
19
21
  cell: cell,
20
22
  tag: "td",
21
23
  type: "content"
@@ -24,20 +26,25 @@ var DescriptionsRow = function DescriptionsRow(_ref) {
24
26
  return border ? /*#__PURE__*/React.createElement(Fragment, {
25
27
  key: "tr1-".concat(index)
26
28
  }, /*#__PURE__*/React.createElement(DescriptionsCell, {
29
+ key: "tr1-".concat(index, "-label"),
30
+ _key: "tr1-".concat(index, "-label"),
27
31
  cell: cell,
28
32
  tag: "th",
29
33
  type: "label"
30
34
  }), /*#__PURE__*/React.createElement(DescriptionsCell, {
35
+ key: "tr1-".concat(index, "-content"),
36
+ _key: "tr1-".concat(index, "-content"),
31
37
  cell: cell,
32
38
  tag: "th",
33
39
  type: "content"
34
40
  })) : /*#__PURE__*/React.createElement(DescriptionsCell, {
35
41
  key: "tr3-".concat(index),
42
+ _key: "tr3-".concat(index),
36
43
  cell: cell,
37
44
  tag: "th",
38
45
  type: "both"
39
46
  });
40
47
  }));
41
- };
42
- DescriptionsRow.displayName = 'DescriptionsRow';
43
- export default /*#__PURE__*/memo(DescriptionsRow);
48
+ });
49
+ DescriptionsRow.displayName = 'ElDescriptionsRow';
50
+ export default DescriptionsRow;
@@ -19,7 +19,6 @@ import { createPortal } from 'react-dom';
19
19
  import Transition from "../Transition/Transition";
20
20
  import { PopupManager, addUnit } from "../Util";
21
21
  import { useClassNames, useControlled } from "../hooks";
22
- import { namespace } from "../hooks/prefix";
23
22
  import DialogBody from "./DialogBody";
24
23
  import { DialogContext } from "./DialogContext";
25
24
  import DialogFooter from "./DialogFooter";
@@ -135,13 +134,13 @@ function InternalElDialog(props, ref) {
135
134
  if (isTargetExists || isContainedByPopper) {
136
135
  return;
137
136
  }
138
- if (!closeOnClickModal) {
137
+ if (closeOnClickModal) {
138
+ doClose();
139
+ } else {
139
140
  addClass(dialogRef.current, b('dialog-shake', false));
140
141
  setTimeout(function () {
141
142
  removeClass(dialogRef.current, b('dialog-shake', false));
142
143
  }, 300);
143
- } else if (modal === true) {
144
- doClose();
145
144
  }
146
145
  });
147
146
  }
@@ -165,7 +164,7 @@ function InternalElDialog(props, ref) {
165
164
  });
166
165
  return /*#__PURE__*/React.createElement(DialogContext.Provider, {
167
166
  value: {
168
- backdrop: modal,
167
+ modal: modal,
169
168
  setVisible: setVisible,
170
169
  isControlled: isControlled,
171
170
  doClose: doClose,
@@ -240,7 +239,7 @@ function InternalElDialog(props, ref) {
240
239
  'align-center': alignCenter,
241
240
  fullscreen: fullscreen
242
241
  }), _defineProperty({}, m(_templateObject || (_templateObject = _taggedTemplateLiteral(["center"]))), center)),
243
- style: _objectSpread(_objectSpread({}, props.style), {}, _defineProperty(_defineProperty({}, "--".concat(namespace, "-dialog-width"), fullscreen || classPrefix !== 'dialog' ? '' : addUnit(width)), "--".concat(namespace, "-dialog-margin-top"), addUnit(top))),
242
+ style: _objectSpread(_objectSpread({}, props.style), {}, _defineProperty(_defineProperty({}, '--el-dialog-width', fullscreen || classPrefix !== 'dialog' ? '' : addUnit(width)), '--el-dialog-margin-top', addUnit(top))),
244
243
  ref: dialogRef
245
244
  }, /*#__PURE__*/React.createElement(DialogHeader, {
246
245
  ref: headerRef,
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  interface DialogContentProps {
3
3
  /** 当设置为 true,Dialog 打开时会显示背景,点击背景会关闭 Dialog,如果不想关闭 Dialog,可以设置为 'static' */
4
- backdrop: boolean | 'static';
4
+ modal: boolean;
5
5
  setVisible: (visible: boolean) => void;
6
6
  /** 隐藏时的回调函数 */
7
7
  doClose: () => void;
@@ -1,7 +1,7 @@
1
1
  import noop from 'lodash/noop';
2
2
  import { createContext } from 'react';
3
3
  export var DialogContext = /*#__PURE__*/createContext({
4
- backdrop: true,
4
+ modal: true,
5
5
  setVisible: noop,
6
6
  doClose: noop,
7
7
  isControlled: false,
@@ -1,7 +1,6 @@
1
1
  import React, { RefObject } from 'react';
2
2
  import DrawerBody from './DrawerBody';
3
3
  import DrawerFooter from './DrawerFooter';
4
- import DrawerHeader from './DrawerHeader';
5
4
  import { DrawerProps } from './typings';
6
5
  declare const Comp: (props: DrawerProps & {
7
6
  ref?: RefObject<HTMLDivElement> | React.ForwardedRef<HTMLDivElement>;
@@ -9,10 +8,8 @@ declare const Comp: (props: DrawerProps & {
9
8
  type InternalType = typeof Comp;
10
9
  interface CompInterface extends InternalType {
11
10
  displayName?: string;
12
- defaultProps?: Partial<DrawerProps>;
13
- Header: typeof DrawerHeader;
14
- Body: typeof DrawerBody;
15
- Footer: typeof DrawerFooter;
11
+ body: typeof DrawerBody;
12
+ footer: typeof DrawerFooter;
16
13
  }
17
14
  declare const Drawer: CompInterface;
18
15
  export default Drawer;