@qsxy/element-plus-react 1.0.0-next.13 → 1.0.0-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +5 -6
- package/dist/Dialog/DialogContext.d.ts +1 -1
- package/dist/Dialog/DialogContext.js +1 -1
- package/dist/Drawer/Drawer.d.ts +2 -5
- package/dist/Drawer/Drawer.js +98 -35
- package/dist/Drawer/DrawerBody.js +6 -12
- package/dist/Drawer/DrawerContext.d.ts +1 -13
- package/dist/Drawer/DrawerContext.js +1 -11
- package/dist/Drawer/DrawerHeader.js +5 -18
- package/dist/Drawer/typings.d.ts +31 -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/MessageBox/MessageBox.js +6 -1
- package/dist/MessageBox/index.d.ts +3 -3
- 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/PlaceholderGraph.d.ts +1 -1
- package/dist/Skeleton/PlaceholderGraph.js +3 -3
- package/dist/Skeleton/PlaceholderGrid.d.ts +1 -1
- package/dist/Skeleton/PlaceholderGrid.js +3 -3
- package/dist/Skeleton/PlaceholderParagraph.d.ts +2 -2
- package/dist/Skeleton/PlaceholderParagraph.js +13 -8
- package/dist/Skeleton/Skeleton.d.ts +2 -9
- package/dist/Skeleton/Skeleton.js +94 -7
- package/dist/Skeleton/SkeletonContext.d.ts +17 -0
- package/dist/Skeleton/SkeletonContext.js +5 -0
- package/dist/Skeleton/SkeletonItem.d.ts +4 -0
- package/dist/Skeleton/SkeletonItem.js +47 -0
- package/dist/Skeleton/index.d.ts +2 -3
- package/dist/Skeleton/index.js +2 -1
- package/dist/Skeleton/typings.d.ts +29 -0
- package/dist/Skeleton/typings.js +1 -0
- package/dist/Table/TableColumn.js +2 -2
- package/dist/Table/TableHeaderCell.js +16 -16
- 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/Upload/use-handlers.d.ts +1 -1
- 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 +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/theme-chalk/drawer/index.scss +61 -65
- package/theme-chalk/index.scss +1 -1
- package/theme-chalk/placeholder/index.scss +22 -37
- 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
|
@@ -19,7 +19,6 @@ import { createPortal } from 'react-dom';
|
|
|
19
19
|
import Transition from "../Transition/Transition";
|
|
20
20
|
import { PopupManager, addUnit } from "../Util";
|
|
21
21
|
import { useClassNames, useControlled } from "../hooks";
|
|
22
|
-
import { namespace } from "../hooks/prefix";
|
|
23
22
|
import DialogBody from "./DialogBody";
|
|
24
23
|
import { DialogContext } from "./DialogContext";
|
|
25
24
|
import DialogFooter from "./DialogFooter";
|
|
@@ -135,13 +134,13 @@ function InternalElDialog(props, ref) {
|
|
|
135
134
|
if (isTargetExists || isContainedByPopper) {
|
|
136
135
|
return;
|
|
137
136
|
}
|
|
138
|
-
if (
|
|
137
|
+
if (closeOnClickModal) {
|
|
138
|
+
doClose();
|
|
139
|
+
} else {
|
|
139
140
|
addClass(dialogRef.current, b('dialog-shake', false));
|
|
140
141
|
setTimeout(function () {
|
|
141
142
|
removeClass(dialogRef.current, b('dialog-shake', false));
|
|
142
143
|
}, 300);
|
|
143
|
-
} else if (modal === true) {
|
|
144
|
-
doClose();
|
|
145
144
|
}
|
|
146
145
|
});
|
|
147
146
|
}
|
|
@@ -165,7 +164,7 @@ function InternalElDialog(props, ref) {
|
|
|
165
164
|
});
|
|
166
165
|
return /*#__PURE__*/React.createElement(DialogContext.Provider, {
|
|
167
166
|
value: {
|
|
168
|
-
|
|
167
|
+
modal: modal,
|
|
169
168
|
setVisible: setVisible,
|
|
170
169
|
isControlled: isControlled,
|
|
171
170
|
doClose: doClose,
|
|
@@ -240,7 +239,7 @@ function InternalElDialog(props, ref) {
|
|
|
240
239
|
'align-center': alignCenter,
|
|
241
240
|
fullscreen: fullscreen
|
|
242
241
|
}), _defineProperty({}, m(_templateObject || (_templateObject = _taggedTemplateLiteral(["center"]))), center)),
|
|
243
|
-
style: _objectSpread(_objectSpread({}, props.style), {}, _defineProperty(_defineProperty({},
|
|
242
|
+
style: _objectSpread(_objectSpread({}, props.style), {}, _defineProperty(_defineProperty({}, '--el-dialog-width', fullscreen || classPrefix !== 'dialog' ? '' : addUnit(width)), '--el-dialog-margin-top', addUnit(top))),
|
|
244
243
|
ref: dialogRef
|
|
245
244
|
}, /*#__PURE__*/React.createElement(DialogHeader, {
|
|
246
245
|
ref: headerRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface DialogContentProps {
|
|
3
3
|
/** 当设置为 true,Dialog 打开时会显示背景,点击背景会关闭 Dialog,如果不想关闭 Dialog,可以设置为 'static' */
|
|
4
|
-
|
|
4
|
+
modal: boolean;
|
|
5
5
|
setVisible: (visible: boolean) => void;
|
|
6
6
|
/** 隐藏时的回调函数 */
|
|
7
7
|
doClose: () => void;
|
package/dist/Drawer/Drawer.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { RefObject } from 'react';
|
|
2
2
|
import DrawerBody from './DrawerBody';
|
|
3
3
|
import DrawerFooter from './DrawerFooter';
|
|
4
|
-
import DrawerHeader from './DrawerHeader';
|
|
5
4
|
import { DrawerProps } from './typings';
|
|
6
5
|
declare const Comp: (props: DrawerProps & {
|
|
7
6
|
ref?: RefObject<HTMLDivElement> | React.ForwardedRef<HTMLDivElement>;
|
|
@@ -9,10 +8,8 @@ declare const Comp: (props: DrawerProps & {
|
|
|
9
8
|
type InternalType = typeof Comp;
|
|
10
9
|
interface CompInterface extends InternalType {
|
|
11
10
|
displayName?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Body: typeof DrawerBody;
|
|
15
|
-
Footer: typeof DrawerFooter;
|
|
11
|
+
body: typeof DrawerBody;
|
|
12
|
+
footer: typeof DrawerFooter;
|
|
16
13
|
}
|
|
17
14
|
declare const Drawer: CompInterface;
|
|
18
15
|
export default Drawer;
|