@qsxy/element-plus-react 1.0.0-next.15 → 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 (76) 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/Drawer/typings.d.ts +10 -10
  20. package/dist/Dropdown/Dropdown.js +7 -7
  21. package/dist/Dropdown/DropdownItem.js +1 -1
  22. package/dist/Dropdown/DropdownMenu.d.ts +5 -2
  23. package/dist/Dropdown/DropdownMenu.js +5 -3
  24. package/dist/Dropdown/typings.d.ts +3 -1
  25. package/dist/MessageBox/MessageBox.js +6 -1
  26. package/dist/Notification/Notification.js +6 -3
  27. package/dist/Notification/index.d.ts +0 -8
  28. package/dist/Notification/index.js +0 -9
  29. package/dist/Notification/typings.d.ts +0 -2
  30. package/dist/Pagination/Options.js +2 -1
  31. package/dist/Popconfirm/Popconfirm.d.ts +3 -2
  32. package/dist/Popconfirm/Popconfirm.js +15 -8
  33. package/dist/Popconfirm/typings.d.ts +2 -1
  34. package/dist/Popover/Popover.js +7 -5
  35. package/dist/Popover/typings.d.ts +1 -1
  36. package/dist/Select/Option.js +1 -1
  37. package/dist/Select/OptionGroup.js +1 -1
  38. package/dist/Select/Select.d.ts +3 -15
  39. package/dist/Select/Select.js +3 -9
  40. package/dist/Select/SelectCore.js +52 -27
  41. package/dist/Select/index.d.ts +1 -0
  42. package/dist/Select/index.js +1 -0
  43. package/dist/Select/typings.d.ts +13 -1
  44. package/dist/Skeleton/typings.d.ts +2 -2
  45. package/dist/Table/TableColumn.js +2 -2
  46. package/dist/Table/TableHeaderCell.js +16 -16
  47. package/dist/Table/hooks/useTable.d.ts +0 -7
  48. package/dist/Table/hooks/useTable.js +1 -9
  49. package/dist/Table/typings.d.ts +1 -1
  50. package/dist/Tabs/TabPane.js +1 -1
  51. package/dist/Tabs/Tabs.d.ts +2 -2
  52. package/dist/Tabs/Tabs.js +8 -4
  53. package/dist/Tabs/typings.d.ts +2 -0
  54. package/dist/Tag/Tag.d.ts +1 -1
  55. package/dist/Tag/Tag.js +5 -5
  56. package/dist/Tag/typings.d.ts +1 -1
  57. package/dist/TimeLine/TimeLine.js +1 -0
  58. package/dist/TimeLine/TimeLineItem.js +1 -0
  59. package/dist/TimeLine/typings.d.ts +2 -2
  60. package/dist/TimePicker/useTimePicker.d.ts +0 -7
  61. package/dist/TimePicker/useTimePicker.js +1 -8
  62. package/dist/hooks/animationPropsUtils.d.ts +0 -4
  63. package/dist/hooks/animationPropsUtils.js +0 -4
  64. package/dist/hooks/popperPropsUtils.d.ts +0 -4
  65. package/dist/hooks/popperPropsUtils.js +0 -4
  66. package/dist/hooks/useChildrenInstance.d.ts +0 -4
  67. package/dist/hooks/useChildrenInstance.js +0 -4
  68. package/dist/index.css +1 -1
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.js +1 -1
  71. package/package.json +1 -1
  72. package/theme-chalk/index.scss +1 -1
  73. package/theme-chalk/skeleton/index.scss +120 -0
  74. package/theme-chalk/tabs/index.scss +3 -3
  75. package/theme-chalk/tag/index.scss +5 -162
  76. 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;
@@ -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 {
@@ -1,6 +1,6 @@
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
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
3
- var _excluded = ["title", "message", "type", "icon", "width", "callback", "showClose", "beforeClose", "showCancelButton", "showConfirmButton", "cancelButtonText", "cancelButtonClass", "confirmButtonClass", "buttonSize", "buttonPosition", "overflow", "showInput", "inputType", "inputPlaceholder", "inputPattern", "inputErrorMessage", "inputValidator", "distinguishCancelAndClose", "classPrefix", "className", "style", "padding"];
3
+ var _excluded = ["title", "message", "type", "icon", "width", "callback", "showClose", "beforeClose", "showCancelButton", "showConfirmButton", "cancelButtonText", "cancelButtonClass", "confirmButtonClass", "buttonSize", "buttonPosition", "draggable", "overflow", "showInput", "inputType", "inputPlaceholder", "inputPattern", "inputErrorMessage", "inputValidator", "distinguishCancelAndClose", "classPrefix", "className", "style", "padding", "roundButton"];
4
4
  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); }
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -51,6 +51,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
51
51
  buttonSize = options.buttonSize,
52
52
  _options$buttonPositi = options.buttonPosition,
53
53
  buttonPosition = _options$buttonPositi === void 0 ? 'right' : _options$buttonPositi,
54
+ draggable = options.draggable,
54
55
  overflow = options.overflow,
55
56
  showInput = options.showInput,
56
57
  inputType = options.inputType,
@@ -64,6 +65,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
64
65
  className = options.className,
65
66
  style = options.style,
66
67
  padding = options.padding,
68
+ roundButton = options.roundButton,
67
69
  rest = _objectWithoutProperties(options, _excluded);
68
70
  var _useClassNames = useClassNames(classPrefix),
69
71
  e = _useClassNames.e,
@@ -220,6 +222,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
220
222
  ,
221
223
  style: _objectSpread(_objectSpread({}, style), {}, _defineProperty({}, "--".concat(namespace, "-messagebox-width"), addUnit(width))),
222
224
  modal: true,
225
+ draggable: draggable,
223
226
  overflow: overflow,
224
227
  showClose: showClose,
225
228
  title: title,
@@ -252,6 +255,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
252
255
  }, showCancelButton && /*#__PURE__*/React.createElement(Button, {
253
256
  className: cancelButtonClass,
254
257
  size: buttonSize,
258
+ round: roundButton,
255
259
  onClick: function onClick() {
256
260
  return handleAction('cancel');
257
261
  }
@@ -259,6 +263,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
259
263
  className: confirmButtonClass,
260
264
  type: "primary",
261
265
  size: buttonSize,
266
+ round: roundButton,
262
267
  loading: confirmButtonLoading,
263
268
  onClick: function onClick() {
264
269
  return handleAction('confirm');
@@ -1,5 +1,7 @@
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
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -144,12 +146,13 @@ var Notification = /*#__PURE__*/forwardRef(function (props, ref) {
144
146
  afterLeave: afterLeave
145
147
  }, /*#__PURE__*/React.createElement("div", {
146
148
  ref: notificationRef,
147
- className: classNames(b(), position.indexOf('right') > 1 ? 'right' : 'left'),
148
- style: _defineProperty(_defineProperty({}, verticalProperty, offset), "zIndex", PopupManager.nextZIndex())
149
+ className: classNames(b(), position.indexOf('right') > 1 ? 'right' : 'left', props.className),
150
+ style: _objectSpread(_defineProperty(_defineProperty({}, verticalProperty, offset), "zIndex", PopupManager.nextZIndex()), props.style)
149
151
  // 鼠标悬浮停止自动关闭
150
152
  ,
151
153
  onMouseEnter: clearTimer,
152
- onMouseLeave: startTimer
154
+ onMouseLeave: startTimer,
155
+ onClick: props.onClick
153
156
  }, (type || iconClass) && /*#__PURE__*/React.createElement("i", {
154
157
  className: classNames(e(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["icon"]))), typeClass, iconClass)
155
158
  }), /*#__PURE__*/React.createElement("div", {
@@ -1,12 +1,4 @@
1
1
  import type { INotification, NotificationRef, Position } from './typings';
2
- /**
3
- * 通知组件
4
- * @author Parker
5
- * @CreateTime 2022/3/10 12:45:48
6
- * @LastEditor Parker
7
- * @ModifyTime 2022/5/3 13:43:28
8
- * @Description Element Plus 通知组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
9
- */
10
2
  export declare const Notification: INotification;
11
3
  /**
12
4
  *
@@ -16,15 +16,6 @@ var notifications = {
16
16
  // the gap size between each notification
17
17
  var GAP_SIZE = 16;
18
18
  var seed = 1;
19
-
20
- /**
21
- * 通知组件
22
- * @author Parker
23
- * @CreateTime 2022/3/10 12:45:48
24
- * @LastEditor Parker
25
- * @ModifyTime 2022/5/3 13:43:28
26
- * @Description Element Plus 通知组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
27
- */
28
19
  export var Notification = function Notification(options) {
29
20
  var _ref$current, _ref$current2;
30
21
  var position = options.position || 'top-right';