@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.
- 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/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/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/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/Tabs/Tabs.js
CHANGED
|
@@ -28,6 +28,7 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
28
28
|
classPrefix = _props$classPrefix === void 0 ? 'tabs' : _props$classPrefix,
|
|
29
29
|
children = props.children,
|
|
30
30
|
onTabClick = props.onTabClick,
|
|
31
|
+
onTabChange = props.onTabChange,
|
|
31
32
|
beforeLeave = props.beforeLeave,
|
|
32
33
|
center = props.center,
|
|
33
34
|
editable = props.editable,
|
|
@@ -82,7 +83,7 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
82
83
|
// const [barStyle, setBarStyle] = useState<JSX.CSSProperties>({});
|
|
83
84
|
|
|
84
85
|
/** 获取子组件 */
|
|
85
|
-
var getTabPaneInstance = useChildrenInstance('
|
|
86
|
+
var getTabPaneInstance = useChildrenInstance('ElTabPane');
|
|
86
87
|
|
|
87
88
|
/** 获取TabPane组件中的配置数据 */
|
|
88
89
|
var navs = useMemo(function () {
|
|
@@ -229,12 +230,15 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
229
230
|
// [sizeName === 'offsetWidth' ? 'width' : 'height']: `${tabSize}px`,
|
|
230
231
|
// transform: `translate${sizeDir}(${offset}px)`,
|
|
231
232
|
// });
|
|
232
|
-
}, [sizeName, children]);
|
|
233
|
+
}, [sizeName, e, children]);
|
|
233
234
|
|
|
234
235
|
/** 激活标签页 */
|
|
235
236
|
var changeCurrentName = useCallback(function (item) {
|
|
236
237
|
var _item$closable;
|
|
237
238
|
setActiveName(item === null || item === void 0 ? void 0 : item.name);
|
|
239
|
+
if (item !== null && item !== void 0 && item.name && activeName !== item.name) {
|
|
240
|
+
onTabChange === null || onTabChange === void 0 || onTabChange(item.name);
|
|
241
|
+
}
|
|
238
242
|
onTabClick === null || onTabClick === void 0 || onTabClick({
|
|
239
243
|
paneName: item === null || item === void 0 ? void 0 : item.name,
|
|
240
244
|
active: item === null || item === void 0 ? void 0 : item.active,
|
|
@@ -242,7 +246,7 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
242
246
|
isClosable: (_item$closable = item === null || item === void 0 ? void 0 : item.closable) !== null && _item$closable !== void 0 ? _item$closable : false,
|
|
243
247
|
props: item.props
|
|
244
248
|
});
|
|
245
|
-
}, [onTabClick, setActiveName]);
|
|
249
|
+
}, [activeName, onTabChange, onTabClick, setActiveName]);
|
|
246
250
|
|
|
247
251
|
/**
|
|
248
252
|
* 点击标签页方法
|
|
@@ -371,5 +375,5 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
371
375
|
ref: ref
|
|
372
376
|
}, tabPosition === 'bottom' ? content : header, tabPosition === 'bottom' ? header : content));
|
|
373
377
|
});
|
|
374
|
-
Tabs.displayName = '
|
|
378
|
+
Tabs.displayName = 'ElTabs';
|
|
375
379
|
export default Tabs;
|
package/dist/Tabs/typings.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface TabsProps extends BaseProps, NativeProps<'--el-tabs-header-heig
|
|
|
35
35
|
onTabAdd?: () => void;
|
|
36
36
|
/** 点击 tab 移除按钮时触发 */
|
|
37
37
|
onTabRemove?: (name: TabPaneName | undefined) => void;
|
|
38
|
+
/** `activeName` 改变时触发 */
|
|
39
|
+
onTabChange?: (name: TabPaneName | undefined) => void;
|
|
38
40
|
/** 鼠标右键点击 tab 时触发 */
|
|
39
41
|
formatter?: (name: TabPaneName | undefined) => void;
|
|
40
42
|
}
|
package/dist/Tag/Tag.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TagProps } from './typings';
|
|
3
|
-
declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLElement
|
|
3
|
+
declare const Tag: React.MemoExoticComponent<React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLElement>>>;
|
|
4
4
|
export default Tag;
|
package/dist/Tag/Tag.js
CHANGED
|
@@ -15,18 +15,18 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import { useComposeRef } from 'rc-util/lib/ref';
|
|
18
|
-
import React, { forwardRef, useCallback, useRef } from 'react';
|
|
18
|
+
import React, { forwardRef, memo, useCallback, useRef } from 'react';
|
|
19
19
|
import Icon from "../Icon/Icon";
|
|
20
20
|
import Transition from "../Transition/Transition";
|
|
21
21
|
import { partitionHTMLProps, useClassNames } from "../hooks";
|
|
22
|
-
var Tag = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
22
|
+
var Tag = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
23
23
|
var _props$type = props.type,
|
|
24
24
|
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
25
25
|
closable = props.closable,
|
|
26
26
|
size = props.size,
|
|
27
27
|
color = props.color,
|
|
28
|
-
_props$
|
|
29
|
-
theme = _props$
|
|
28
|
+
_props$effect = props.effect,
|
|
29
|
+
theme = _props$effect === void 0 ? 'light' : _props$effect,
|
|
30
30
|
round = props.round,
|
|
31
31
|
hit = props.hit,
|
|
32
32
|
_props$classPrefix = props.classPrefix,
|
|
@@ -82,6 +82,6 @@ var Tag = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
82
82
|
className: e(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["close"]))),
|
|
83
83
|
onClick: onCloseTag
|
|
84
84
|
})));
|
|
85
|
-
});
|
|
85
|
+
}));
|
|
86
86
|
Tag.displayName = 'ElTag';
|
|
87
87
|
export default Tag;
|
package/dist/Tag/typings.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface TagProps extends Omit<TooltipBaseProps<HTMLSpanElement>, 'onCli
|
|
|
16
16
|
/** 尺寸 */
|
|
17
17
|
size?: TypeAttributes.Size;
|
|
18
18
|
/** 主题 */
|
|
19
|
-
|
|
19
|
+
effect?: 'dark' | 'light' | 'plain';
|
|
20
20
|
/** 点击 Tag 时触发的事件 */
|
|
21
21
|
onClick?: (e?: React.MouseEvent<HTMLSpanElement>) => void;
|
|
22
22
|
/** 关闭 Tag 时触发的事件 */
|
|
@@ -67,4 +67,5 @@ var TimeLineItem = function TimeLineItem(props) {
|
|
|
67
67
|
className: classNames(e(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["timestamp"]))), is(placement))
|
|
68
68
|
}, timestamp)));
|
|
69
69
|
};
|
|
70
|
+
TimeLineItem.displayName = 'ElTimeLineItem';
|
|
70
71
|
export default TimeLineItem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconName } from '../Icon';
|
|
3
|
-
import { BaseProps, NativeProps } from '../types/common';
|
|
3
|
+
import { BaseProps, NativeProps, TypeAttributes } from '../types/common';
|
|
4
4
|
export type TimeLineProps = BaseProps & NativeProps<'--el-timeline-node-size-normal' | '--el-timeline-node-size-large' | '--el-timeline-timestamp-color' | '--el-timeline-content-color' | '--el-timeline-content-font-size-small' | '--el-timeline-content-font-size-large' | '--el-timeline-node-color'>;
|
|
5
5
|
export type TimeLineItemProps = BaseProps & NativeProps & {
|
|
6
6
|
/** 时间戳 */
|
|
@@ -12,7 +12,7 @@ export type TimeLineItemProps = BaseProps & NativeProps & {
|
|
|
12
12
|
/** 时间戳位置 */
|
|
13
13
|
placement?: 'top' | 'bottom';
|
|
14
14
|
/** 节点类型 */
|
|
15
|
-
type?:
|
|
15
|
+
type?: TypeAttributes.Appearance;
|
|
16
16
|
/** 节点颜色 */
|
|
17
17
|
color?: string;
|
|
18
18
|
/** 节点尺寸 */
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Element Plus
|
|
3
|
-
* @CreateTime 2022/4/1 09:09:12
|
|
4
|
-
* @LastEditor Parker
|
|
5
|
-
* @ModifyTime 2022/4/6 14:44:01
|
|
6
|
-
* @Description Element Plus 时间选择面板工具类,见https://github.com/element-plus/element-plus
|
|
7
|
-
*/
|
|
8
1
|
import { Compare, DisabledHours, DisabledMinutes, DisabledSeconds, RoleType } from './typings';
|
|
9
2
|
export declare const getTimeLists: (disabledHours: DisabledHours, disabledMinutes: DisabledMinutes, disabledSeconds: DisabledSeconds) => {
|
|
10
3
|
getHoursList: (role: RoleType, compare?: Compare) => boolean[];
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @author Element Plus
|
|
3
|
-
* @CreateTime 2022/4/1 09:09:12
|
|
4
|
-
* @LastEditor Parker
|
|
5
|
-
* @ModifyTime 2022/4/6 14:44:01
|
|
6
|
-
* @Description Element Plus 时间选择面板工具类,见https://github.com/element-plus/element-plus
|
|
7
|
-
*/
|
|
8
|
-
|
|
1
|
+
// Element Plus 时间选择面板工具类
|
|
9
2
|
import filter from 'lodash/filter';
|
|
10
3
|
var makeList = function makeList(total, method, methodFunc) {
|
|
11
4
|
var arr = [];
|
|
@@ -2,10 +2,6 @@ import { TransitionProps } from '../Transition';
|
|
|
2
2
|
export declare const animationAllProps: string[];
|
|
3
3
|
/**
|
|
4
4
|
* Returns an array of objects consisting of: props of html input element and rest.
|
|
5
|
-
* @author Parker
|
|
6
|
-
* @CreateTime 2022/4/8 17:46:40
|
|
7
|
-
* @LastEditor Parker
|
|
8
|
-
* @ModifyTime 2022/4/22 15:38:45
|
|
9
5
|
* @param {object} props A ReactElement props object
|
|
10
6
|
* @param {Object} [options={}]
|
|
11
7
|
* @param {Array} [options.htmlProps] An array of html input props
|
|
@@ -5,10 +5,6 @@ export var animationAllProps = ['transitionAppear', 'unmountOnExit', 'beforeEnte
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns an array of objects consisting of: props of html input element and rest.
|
|
8
|
-
* @author Parker
|
|
9
|
-
* @CreateTime 2022/4/8 17:46:40
|
|
10
|
-
* @LastEditor Parker
|
|
11
|
-
* @ModifyTime 2022/4/22 15:38:45
|
|
12
8
|
* @param {object} props A ReactElement props object
|
|
13
9
|
* @param {Object} [options={}]
|
|
14
10
|
* @param {Array} [options.htmlProps] An array of html input props
|
|
@@ -2,10 +2,6 @@ import { PopperProps } from '../Popper';
|
|
|
2
2
|
export declare const popperAllProps: string[];
|
|
3
3
|
/**
|
|
4
4
|
* Returns an array of objects consisting of: props of html input element and rest.
|
|
5
|
-
* @author Parker
|
|
6
|
-
* @CreateTime 2022/4/8 17:46:40
|
|
7
|
-
* @LastEditor Parker
|
|
8
|
-
* @ModifyTime 2025/2/22 11:48:08
|
|
9
5
|
* @param {object} props A ReactElement props object
|
|
10
6
|
* @param {Object} [options={}]
|
|
11
7
|
* @param {Array} [options.htmlProps] An array of html input props
|
|
@@ -5,10 +5,6 @@ export var popperAllProps = ['popperInstRef', 'offset', 'placement', 'arrowOffse
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns an array of objects consisting of: props of html input element and rest.
|
|
8
|
-
* @author Parker
|
|
9
|
-
* @CreateTime 2022/4/8 17:46:40
|
|
10
|
-
* @LastEditor Parker
|
|
11
|
-
* @ModifyTime 2025/2/22 11:48:08
|
|
12
8
|
* @param {object} props A ReactElement props object
|
|
13
9
|
* @param {Object} [options={}]
|
|
14
10
|
* @param {Array} [options.htmlProps] An array of html input props
|
|
@@ -2,10 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { ComponentChildren } from '../types/common';
|
|
3
3
|
/**
|
|
4
4
|
* 获取特定名称的子组件
|
|
5
|
-
* @author Parker
|
|
6
|
-
* @CreateTime 2022/3/30下午2:08:36
|
|
7
|
-
* @LastEditor Parker
|
|
8
|
-
* @ModifyTime 2022/9/23 14:44:20
|
|
9
5
|
* @param componentChildren 子组件
|
|
10
6
|
* @param compName 目标组件名称 (`displayName`属性)
|
|
11
7
|
* @param virtualCompName 子组件中的需要继续乡下递归查找的组件名称(`displayName`属性)
|
|
@@ -7,10 +7,6 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
7
7
|
import { Children, Fragment, useCallback, useRef } from 'react';
|
|
8
8
|
/**
|
|
9
9
|
* 获取特定名称的子组件
|
|
10
|
-
* @author Parker
|
|
11
|
-
* @CreateTime 2022/3/30下午2:08:36
|
|
12
|
-
* @LastEditor Parker
|
|
13
|
-
* @ModifyTime 2022/9/23 14:44:20
|
|
14
10
|
* @param componentChildren 子组件
|
|
15
11
|
* @param compName 目标组件名称 (`displayName`属性)
|
|
16
12
|
* @param virtualCompName 子组件中的需要继续乡下递归查找的组件名称(`displayName`属性)
|