@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.
- package/dist/Button/Button.js +5 -3
- package/dist/Button/typings.d.ts +3 -1
- package/dist/ColorPicker/AlphaSlider.d.ts +0 -7
- package/dist/ColorPicker/AlphaSlider.js +0 -7
- package/dist/ColorPicker/HueSlider.d.ts +0 -7
- package/dist/ColorPicker/HueSlider.js +0 -7
- package/dist/ColorPicker/Predefine.d.ts +0 -7
- package/dist/ColorPicker/Predefine.js +0 -7
- package/dist/ColorPicker/SvPanel.d.ts +0 -7
- package/dist/ColorPicker/SvPanel.js +0 -7
- package/dist/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/dist/Descriptions/Descriptions.d.ts +2 -2
- package/dist/Descriptions/Descriptions.js +7 -6
- package/dist/Descriptions/DescriptionsCell.d.ts +11 -12
- package/dist/Descriptions/DescriptionsCell.js +13 -6
- package/dist/Descriptions/DescriptionsItem.js +1 -1
- package/dist/Descriptions/DescriptionsRow.d.ts +2 -5
- package/dist/Descriptions/DescriptionsRow.js +11 -4
- package/dist/Dialog/Dialog.js +3 -1
- package/dist/Drawer/typings.d.ts +10 -10
- package/dist/Dropdown/Dropdown.js +7 -7
- package/dist/Dropdown/DropdownItem.js +1 -1
- package/dist/Dropdown/DropdownMenu.d.ts +5 -2
- package/dist/Dropdown/DropdownMenu.js +5 -3
- package/dist/Dropdown/typings.d.ts +3 -1
- package/dist/Empty/Empty.js +1 -1
- package/dist/Empty/ImgEmpty.js +5 -5
- package/dist/Form/Form.d.ts +9 -4
- package/dist/Form/Form.js +6 -4
- package/dist/Form/typings.d.ts +2 -2
- package/dist/MessageBox/MessageBox.js +6 -1
- package/dist/Notification/Notification.js +6 -3
- package/dist/Notification/index.d.ts +0 -8
- package/dist/Notification/index.js +0 -9
- package/dist/Notification/typings.d.ts +0 -2
- package/dist/Pagination/Options.js +2 -1
- package/dist/Popconfirm/Popconfirm.d.ts +3 -2
- package/dist/Popconfirm/Popconfirm.js +15 -8
- package/dist/Popconfirm/typings.d.ts +2 -1
- package/dist/Popover/Popover.js +7 -5
- package/dist/Popover/typings.d.ts +1 -1
- package/dist/Select/Option.js +1 -1
- package/dist/Select/OptionGroup.js +1 -1
- package/dist/Select/Select.d.ts +3 -15
- package/dist/Select/Select.js +3 -9
- package/dist/Select/SelectCore.js +52 -27
- package/dist/Select/index.d.ts +1 -0
- package/dist/Select/index.js +1 -0
- package/dist/Select/typings.d.ts +13 -1
- package/dist/Skeleton/typings.d.ts +2 -2
- package/dist/Table/TableColumn.js +2 -2
- package/dist/Table/TableHeaderCell.js +16 -16
- package/dist/Table/hooks/useSelection.d.ts +1 -1
- package/dist/Table/hooks/useTable.d.ts +0 -7
- package/dist/Table/hooks/useTable.js +1 -9
- package/dist/Table/typings.d.ts +1 -1
- package/dist/Tabs/TabPane.js +1 -1
- package/dist/Tabs/Tabs.d.ts +2 -2
- package/dist/Tabs/Tabs.js +8 -4
- package/dist/Tabs/typings.d.ts +2 -0
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +5 -5
- package/dist/Tag/typings.d.ts +1 -1
- package/dist/TimeLine/TimeLine.js +1 -0
- package/dist/TimeLine/TimeLineItem.js +1 -0
- package/dist/TimeLine/typings.d.ts +2 -2
- package/dist/TimePicker/useTimePicker.d.ts +0 -7
- package/dist/TimePicker/useTimePicker.js +1 -8
- package/dist/hooks/animationPropsUtils.d.ts +0 -4
- package/dist/hooks/animationPropsUtils.js +0 -4
- package/dist/hooks/popperPropsUtils.d.ts +0 -4
- package/dist/hooks/popperPropsUtils.js +0 -4
- package/dist/hooks/useChildrenInstance.d.ts +0 -4
- package/dist/hooks/useChildrenInstance.js +0 -4
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.scss +1 -1
- package/theme-chalk/skeleton/index.scss +120 -0
- package/theme-chalk/tabs/index.scss +3 -3
- package/theme-chalk/tag/index.scss +5 -162
- package/theme-chalk/time-line/_timeline-item.scss +1 -1
package/dist/Button/Button.js
CHANGED
|
@@ -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;
|
package/dist/Button/typings.d.ts
CHANGED
|
@@ -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, "
|
|
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
|
|
4
|
-
export 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('
|
|
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 = '
|
|
112
|
-
export default
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
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 = '
|
|
72
|
-
export default
|
|
77
|
+
});
|
|
78
|
+
DescriptionsCell.displayName = 'ElDescriptionsCell';
|
|
79
|
+
export default DescriptionsCell;
|
|
@@ -3,8 +3,5 @@ import { DescriptionsItemProps } from './typings';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
row: React.ReactElement<DescriptionsItemProps>[];
|
|
5
5
|
}
|
|
6
|
-
declare const
|
|
7
|
-
|
|
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
|
|
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 = '
|
|
43
|
-
export default
|
|
48
|
+
});
|
|
49
|
+
DescriptionsRow.displayName = 'ElDescriptionsRow';
|
|
50
|
+
export default DescriptionsRow;
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -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));
|
package/dist/Drawer/typings.d.ts
CHANGED
|
@@ -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 关闭
|
|
10
|
+
/** 是否可以通过点击 modal 关闭 Drawer */
|
|
11
11
|
closeOnClickModal?: boolean;
|
|
12
|
-
/** 是否在
|
|
12
|
+
/** 是否在 Drawer 出现时将 body 滚动锁定 */
|
|
13
13
|
lockScroll?: boolean;
|
|
14
14
|
/** 应用于 backdrop DOM 节点的 css class */
|
|
15
15
|
modalClassName?: string;
|
|
16
|
-
/**
|
|
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
|
-
/**
|
|
28
|
+
/** Drawer 打开的回调 */
|
|
29
29
|
onOpen?: () => void;
|
|
30
|
-
/**
|
|
30
|
+
/** Drawer 打开动画结束时的回调 */
|
|
31
31
|
onOpened?: () => void;
|
|
32
|
-
/**
|
|
32
|
+
/** Drawer 关闭的回调 */
|
|
33
33
|
onClose?: () => void;
|
|
34
|
-
/**
|
|
34
|
+
/** Drawer 关闭动画结束时的回调 */
|
|
35
35
|
onClosed?: () => void;
|
|
36
36
|
/** 关闭弹窗函数 */
|
|
37
37
|
close: () => void;
|
|
38
|
-
/** 关闭前的回调,会暂停
|
|
39
|
-
beforeClose?:
|
|
38
|
+
/** 关闭前的回调,会暂停 Drawer 的关闭. 回调函数内执行 done 参数方法的时候才是真正关闭对话框的时候. */
|
|
39
|
+
beforeClose?: DrawerBeforeCloseFn;
|
|
40
40
|
}
|
|
41
41
|
type DoneFn = (cancel?: boolean) => void;
|
|
42
|
-
export type
|
|
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", "
|
|
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
|
-
|
|
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
|
-
|
|
63
|
-
}, [onMouseEnter,
|
|
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
|
-
|
|
69
|
-
}, [onMouseLeave,
|
|
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 = '
|
|
104
|
+
Dropdown.displayName = 'ElDropdown';
|
|
105
105
|
export default Dropdown;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DropdownMenuProps } from './typings';
|
|
3
|
-
declare const DropdownMenu:
|
|
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 = '
|
|
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
|
-
|
|
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 {
|
package/dist/Empty/Empty.js
CHANGED
package/dist/Empty/ImgEmpty.js
CHANGED
|
@@ -16,10 +16,10 @@ var ImgEmpty = function ImgEmpty() {
|
|
|
16
16
|
x2: "61.1496914%",
|
|
17
17
|
y2: "100%"
|
|
18
18
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
19
|
-
|
|
19
|
+
stopColor: "var(--el-empty-fill-color-1)",
|
|
20
20
|
offset: "0%"
|
|
21
21
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
22
|
-
|
|
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
|
-
|
|
31
|
+
stopColor: "var(--el-empty-fill-color-1)",
|
|
32
32
|
offset: "0%"
|
|
33
33
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
34
|
-
|
|
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
|
-
|
|
45
|
+
strokeWidth: "1",
|
|
46
46
|
fill: "none",
|
|
47
47
|
fillRule: "evenodd"
|
|
48
48
|
}, /*#__PURE__*/React.createElement("g", {
|
package/dist/Form/Form.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
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:
|
|
20
|
+
declare const Form: FormInterface;
|
|
16
21
|
export default Form;
|