@qsxy/element-plus-react 1.0.0-next.15 → 1.0.0-next.17

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 (83) 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 +3 -1
  20. package/dist/Drawer/typings.d.ts +10 -10
  21. package/dist/Dropdown/Dropdown.js +7 -7
  22. package/dist/Dropdown/DropdownItem.js +1 -1
  23. package/dist/Dropdown/DropdownMenu.d.ts +5 -2
  24. package/dist/Dropdown/DropdownMenu.js +5 -3
  25. package/dist/Dropdown/typings.d.ts +3 -1
  26. package/dist/Empty/Empty.js +1 -1
  27. package/dist/Empty/ImgEmpty.js +5 -5
  28. package/dist/Form/Form.d.ts +9 -4
  29. package/dist/Form/Form.js +6 -4
  30. package/dist/Form/typings.d.ts +2 -2
  31. package/dist/MessageBox/MessageBox.js +6 -1
  32. package/dist/Notification/Notification.js +6 -3
  33. package/dist/Notification/index.d.ts +0 -8
  34. package/dist/Notification/index.js +0 -9
  35. package/dist/Notification/typings.d.ts +0 -2
  36. package/dist/Pagination/Options.js +2 -1
  37. package/dist/Popconfirm/Popconfirm.d.ts +3 -2
  38. package/dist/Popconfirm/Popconfirm.js +15 -8
  39. package/dist/Popconfirm/typings.d.ts +2 -1
  40. package/dist/Popover/Popover.js +7 -5
  41. package/dist/Popover/typings.d.ts +1 -1
  42. package/dist/Select/Option.js +1 -1
  43. package/dist/Select/OptionGroup.js +1 -1
  44. package/dist/Select/Select.d.ts +3 -15
  45. package/dist/Select/Select.js +3 -9
  46. package/dist/Select/SelectCore.js +52 -27
  47. package/dist/Select/index.d.ts +1 -0
  48. package/dist/Select/index.js +1 -0
  49. package/dist/Select/typings.d.ts +13 -1
  50. package/dist/Skeleton/typings.d.ts +2 -2
  51. package/dist/Table/TableColumn.js +2 -2
  52. package/dist/Table/TableHeaderCell.js +16 -16
  53. package/dist/Table/hooks/useSelection.d.ts +1 -1
  54. package/dist/Table/hooks/useTable.d.ts +0 -7
  55. package/dist/Table/hooks/useTable.js +1 -9
  56. package/dist/Table/typings.d.ts +1 -1
  57. package/dist/Tabs/TabPane.js +1 -1
  58. package/dist/Tabs/Tabs.d.ts +2 -2
  59. package/dist/Tabs/Tabs.js +8 -4
  60. package/dist/Tabs/typings.d.ts +2 -0
  61. package/dist/Tag/Tag.d.ts +1 -1
  62. package/dist/Tag/Tag.js +5 -5
  63. package/dist/Tag/typings.d.ts +1 -1
  64. package/dist/TimeLine/TimeLine.js +1 -0
  65. package/dist/TimeLine/TimeLineItem.js +1 -0
  66. package/dist/TimeLine/typings.d.ts +2 -2
  67. package/dist/TimePicker/useTimePicker.d.ts +0 -7
  68. package/dist/TimePicker/useTimePicker.js +1 -8
  69. package/dist/hooks/animationPropsUtils.d.ts +0 -4
  70. package/dist/hooks/animationPropsUtils.js +0 -4
  71. package/dist/hooks/popperPropsUtils.d.ts +0 -4
  72. package/dist/hooks/popperPropsUtils.js +0 -4
  73. package/dist/hooks/useChildrenInstance.d.ts +0 -4
  74. package/dist/hooks/useChildrenInstance.js +0 -4
  75. package/dist/index.css +1 -1
  76. package/dist/index.d.ts +1 -1
  77. package/dist/index.js +1 -1
  78. package/package.json +1 -1
  79. package/theme-chalk/index.scss +1 -1
  80. package/theme-chalk/skeleton/index.scss +120 -0
  81. package/theme-chalk/tabs/index.scss +3 -3
  82. package/theme-chalk/tag/index.scss +5 -162
  83. 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;
@@ -41,6 +41,7 @@ function InternalElDialog(props, ref) {
41
41
  alignCenter = props.alignCenter,
42
42
  draggable = props.draggable,
43
43
  fullscreen = props.fullscreen,
44
+ headerClass = props.headerClass,
44
45
  top = props.top,
45
46
  close = props.close,
46
47
  beforeClose = props.beforeClose,
@@ -245,7 +246,8 @@ function InternalElDialog(props, ref) {
245
246
  ref: headerRef,
246
247
  classPrefix: classPrefix,
247
248
  showClose: showClose,
248
- border: border
249
+ border: border,
250
+ headerClass: headerClass
249
251
  }, title), children)))), document.body));
250
252
  }
251
253
  var Comp = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(InternalElDialog));
@@ -7,13 +7,13 @@ export interface DrawerProps extends AnimationEventProps, BaseProps, NativeProps
7
7
  defaultVisible?: boolean;
8
8
  /** 当设置为 true,Drawer 打开时会显示背景,点击背景会关闭 Drawer,如果不想关闭 Drawer,可以设置为 'static' */
9
9
  modal?: boolean;
10
- /** 是否可以通过点击 modal 关闭 Dialog */
10
+ /** 是否可以通过点击 modal 关闭 Drawer */
11
11
  closeOnClickModal?: boolean;
12
- /** 是否在 Dialog 出现时将 body 滚动锁定 */
12
+ /** 是否在 Drawer 出现时将 body 滚动锁定 */
13
13
  lockScroll?: boolean;
14
14
  /** 应用于 backdrop DOM 节点的 css class */
15
15
  modalClassName?: string;
16
- /** Dialog 对话框 Dialog 的标题, 也可通过ElDialog.header传入 */
16
+ /** Drawer 对话框 Drawer 的标题 */
17
17
  title?: string | React.ReactElement;
18
18
  /** 控制是否显示 header 栏, 默认为 true, 当此项为 false 时, title 属性不生效 */
19
19
  withHeader?: boolean;
@@ -25,21 +25,21 @@ export interface DrawerProps extends AnimationEventProps, BaseProps, NativeProps
25
25
  size?: number | string;
26
26
  /** 设置 Drawer 显示的位置 */
27
27
  direction?: 'top' | 'bottom' | 'right' | 'left';
28
- /** Dialog 打开的回调 */
28
+ /** Drawer 打开的回调 */
29
29
  onOpen?: () => void;
30
- /** Dialog 打开动画结束时的回调 */
30
+ /** Drawer 打开动画结束时的回调 */
31
31
  onOpened?: () => void;
32
- /** Dialog 关闭的回调 */
32
+ /** Drawer 关闭的回调 */
33
33
  onClose?: () => void;
34
- /** Dialog 关闭动画结束时的回调 */
34
+ /** Drawer 关闭动画结束时的回调 */
35
35
  onClosed?: () => void;
36
36
  /** 关闭弹窗函数 */
37
37
  close: () => void;
38
- /** 关闭前的回调,会暂停 Dialog 的关闭. 回调函数内执行 done 参数方法的时候才是真正关闭对话框的时候. */
39
- beforeClose?: DialogBeforeCloseFn;
38
+ /** 关闭前的回调,会暂停 Drawer 的关闭. 回调函数内执行 done 参数方法的时候才是真正关闭对话框的时候. */
39
+ beforeClose?: DrawerBeforeCloseFn;
40
40
  }
41
41
  type DoneFn = (cancel?: boolean) => void;
42
- export type DialogBeforeCloseFn = (done: DoneFn) => void;
42
+ export type DrawerBeforeCloseFn = (done: DoneFn) => void;
43
43
  export interface DrawerHeaderProps extends BaseProps, NativeProps {
44
44
  /** 当设置为 true, 显示关闭按钮 */
45
45
  showClose?: boolean;
@@ -1,5 +1,5 @@
1
1
  var _templateObject;
2
- var _excluded = ["menu", "classPrefix", "showTimeout", "hideTimeout", "offset", "trigger", "hideOnClick", "onClick", "visiblechange", "onEnter", "onMouseEnter", "onMouseLeave", "disabled"];
2
+ var _excluded = ["menu", "classPrefix", "showTimeout", "hideTimeout", "offset", "trigger", "hideOnClick", "onClick", "onVisiblechange", "onEnter", "onMouseEnter", "onMouseLeave", "disabled"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
5
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -34,7 +34,7 @@ var Dropdown = /*#__PURE__*/forwardRef(function (props, ref) {
34
34
  trigger = _props.trigger,
35
35
  hideOnClick = _props.hideOnClick,
36
36
  onClick = _props.onClick,
37
- visiblechange = _props.visiblechange,
37
+ onVisiblechange = _props.onVisiblechange,
38
38
  onEnter = _props.onEnter,
39
39
  onMouseEnter = _props.onMouseEnter,
40
40
  onMouseLeave = _props.onMouseLeave,
@@ -59,14 +59,14 @@ var Dropdown = /*#__PURE__*/forwardRef(function (props, ref) {
59
59
  /** 显示 */
60
60
  var handleMouseEnter = useCallback(function (event) {
61
61
  onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter(event);
62
- visiblechange === null || visiblechange === void 0 || visiblechange(true);
63
- }, [onMouseEnter, visiblechange]);
62
+ onVisiblechange === null || onVisiblechange === void 0 || onVisiblechange(true);
63
+ }, [onMouseEnter, onVisiblechange]);
64
64
 
65
65
  /** 隐藏 */
66
66
  var handleMouseLeave = useCallback(function (event) {
67
67
  onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(event);
68
- visiblechange === null || visiblechange === void 0 || visiblechange(false);
69
- }, [onMouseLeave, visiblechange]);
68
+ onVisiblechange === null || onVisiblechange === void 0 || onVisiblechange(false);
69
+ }, [onMouseLeave, onVisiblechange]);
70
70
  useImperativeHandle(ref, function () {
71
71
  return {
72
72
  ref: containerRef,
@@ -101,5 +101,5 @@ var Dropdown = /*#__PURE__*/forwardRef(function (props, ref) {
101
101
  unmountOnExit: true
102
102
  }, popperProps, transitionProps)));
103
103
  });
104
- Dropdown.displayName = 'Dropdown';
104
+ Dropdown.displayName = 'ElDropdown';
105
105
  export default Dropdown;
@@ -38,5 +38,5 @@ var DropdownItem = function DropdownItem(props) {
38
38
  }
39
39
  }, props.children));
40
40
  };
41
- DropdownItem.displayName = 'DropdownItem';
41
+ DropdownItem.displayName = 'ElDropdownItem';
42
42
  export default DropdownItem;
@@ -1,4 +1,7 @@
1
- import { FC } from 'react';
1
+ import React from 'react';
2
2
  import { DropdownMenuProps } from './typings';
3
- declare const DropdownMenu: FC<DropdownMenuProps>;
3
+ declare const DropdownMenu: {
4
+ (props: DropdownMenuProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
4
7
  export default DropdownMenu;
@@ -8,7 +8,8 @@ import { TooltipContext } from "../Tooltip/TooltipContext";
8
8
  import { useClassNames } from "../hooks";
9
9
  var DropdownMenu = function DropdownMenu(props) {
10
10
  var _props$classPrefix = props.classPrefix,
11
- classPrefix = _props$classPrefix === void 0 ? 'dropdown' : _props$classPrefix;
11
+ classPrefix = _props$classPrefix === void 0 ? 'dropdown' : _props$classPrefix,
12
+ maxHeight = props.maxHeight;
12
13
  var _useClassNames = useClassNames(classPrefix),
13
14
  b = _useClassNames.b,
14
15
  e = _useClassNames.e;
@@ -17,7 +18,8 @@ var DropdownMenu = function DropdownMenu(props) {
17
18
  onMouseLeave = _useContext.onMouseLeave,
18
19
  trigger = _useContext.trigger;
19
20
  return /*#__PURE__*/React.createElement(Scrollbar, {
20
- viewClass: e(_templateObject || (_templateObject = _taggedTemplateLiteral(["list"])))
21
+ viewClass: e(_templateObject || (_templateObject = _taggedTemplateLiteral(["list"]))),
22
+ height: maxHeight
21
23
  }, /*#__PURE__*/React.createElement("ul", {
22
24
  onMouseEnter: trigger === 'hover' ? onMouseEnter : noop,
23
25
  onMouseLeave: trigger === 'hover' ? onMouseLeave : noop,
@@ -25,5 +27,5 @@ var DropdownMenu = function DropdownMenu(props) {
25
27
  style: props.style
26
28
  }, props.children));
27
29
  };
28
- DropdownMenu.displayName = 'DropdownMenu';
30
+ DropdownMenu.displayName = 'ElDropdownMenu';
29
31
  export default DropdownMenu;
@@ -24,10 +24,12 @@ export interface DropdownProps extends BaseProps<React.ReactElement>, NativeProp
24
24
  /** 点击菜单项触发的事件回调 */
25
25
  onClick?: (command: string | number | object) => void;
26
26
  /** 下拉框出现/隐藏时触发: 出现则为 true,隐藏则为 false */
27
- visiblechange?: (visible: boolean) => void;
27
+ onVisiblechange?: (visible: boolean) => void;
28
28
  }
29
29
  export interface DropdownMenuProps extends BaseProps, NativeProps {
30
30
  classPrefix?: string;
31
+ /** 菜单最大高度 */
32
+ maxHeight?: number;
31
33
  }
32
34
  /** Dropdown-Item 属性 */
33
35
  export interface DropdownItemProps extends BaseProps, NativeProps {
@@ -33,5 +33,5 @@ var Empty = function Empty(props) {
33
33
  className: e(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["bottom"])))
34
34
  }, props.children) : null);
35
35
  };
36
- Empty.displayName = 'Empty';
36
+ Empty.displayName = 'ElEmpty';
37
37
  export default Empty;
@@ -16,10 +16,10 @@ var ImgEmpty = function ImgEmpty() {
16
16
  x2: "61.1496914%",
17
17
  y2: "100%"
18
18
  }, /*#__PURE__*/React.createElement("stop", {
19
- "stop-color": "var(--el-empty-fill-color-1)",
19
+ stopColor: "var(--el-empty-fill-color-1)",
20
20
  offset: "0%"
21
21
  }), /*#__PURE__*/React.createElement("stop", {
22
- "stop-color": "var(--el-empty-fill-color-4)",
22
+ stopColor: "var(--el-empty-fill-color-4)",
23
23
  offset: "100%"
24
24
  })), /*#__PURE__*/React.createElement("linearGradient", {
25
25
  id: ids[1],
@@ -28,10 +28,10 @@ var ImgEmpty = function ImgEmpty() {
28
28
  x2: "100%",
29
29
  y2: "90.5%"
30
30
  }, /*#__PURE__*/React.createElement("stop", {
31
- "stop-color": "var(--el-empty-fill-color-1)",
31
+ stopColor: "var(--el-empty-fill-color-1)",
32
32
  offset: "0%"
33
33
  }), /*#__PURE__*/React.createElement("stop", {
34
- "stop-color": "var(--el-empty-fill-color-6)",
34
+ stopColor: "var(--el-empty-fill-color-6)",
35
35
  offset: "100%"
36
36
  })), /*#__PURE__*/React.createElement("rect", {
37
37
  id: "path-3-1",
@@ -42,7 +42,7 @@ var ImgEmpty = function ImgEmpty() {
42
42
  })), /*#__PURE__*/React.createElement("g", {
43
43
  id: "Illustrations",
44
44
  stroke: "none",
45
- "stroke-width": "1",
45
+ strokeWidth: "1",
46
46
  fill: "none",
47
47
  fillRule: "evenodd"
48
48
  }, /*#__PURE__*/React.createElement("g", {
@@ -1,16 +1,21 @@
1
- import { FC } from 'react';
1
+ import React, { ForwardedRef } from 'react';
2
2
  import { FormProvider } from './FormContext';
3
3
  import Field from './FormItem';
4
4
  import List from './List';
5
- import { FormProps } from './typings';
5
+ import { FormInstance, FormProps, Store } from './typings';
6
6
  import useForm from './useForm';
7
7
  import useWatch from './useWatch';
8
- interface FormComponent extends FC<FormProps> {
8
+ declare const ForwardForm: <RecordType = Store>(props: FormProps<RecordType> & {
9
+ ref?: React.ForwardedRef<FormInstance<RecordType>>;
10
+ }) => React.ReactElement;
11
+ type InternalFormType = typeof ForwardForm;
12
+ interface FormInterface extends InternalFormType {
13
+ displayName?: string;
9
14
  FormProvider: typeof FormProvider;
10
15
  Item: typeof Field;
11
16
  List: typeof List;
12
17
  useForm: typeof useForm;
13
18
  useWatch: typeof useWatch;
14
19
  }
15
- declare const Form: FormComponent;
20
+ declare const Form: FormInterface;
16
21
  export default Form;