@qsxy/element-plus-react 1.0.0-next.3 → 1.0.0-next.5
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/README.md +5 -7
- package/dist/Badge/Badge.js +1 -1
- package/dist/Carousel/Carousel.d.ts +4 -0
- package/dist/Carousel/Carousel.js +168 -0
- package/dist/Carousel/CarouselContext.d.ts +4 -0
- package/dist/Carousel/CarouselContext.js +52 -0
- package/dist/Carousel/CarouselItem.d.ts +4 -0
- package/dist/Carousel/CarouselItem.js +75 -0
- package/dist/Carousel/hooks/useCarousel.d.ts +37 -0
- package/dist/Carousel/hooks/useCarousel.js +348 -0
- package/dist/Carousel/hooks/useCarouselItem.d.ts +8 -0
- package/dist/Carousel/hooks/useCarouselItem.js +161 -0
- package/dist/Carousel/index.d.ts +3 -0
- package/dist/Carousel/index.js +42 -0
- package/dist/Carousel/typings.d.ts +83 -0
- package/dist/Carousel/typings.js +17 -0
- package/dist/Collapse/CollapseItem.js +1 -1
- package/dist/DatePicker/DatePicker.js +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +3 -3
- package/dist/Dialog/Dialog.js +2 -2
- package/dist/Dialog/typings.d.ts +2 -2
- package/dist/Drawer/Drawer.js +18 -9
- package/dist/Dropdown/Dropdown.js +1 -1
- package/dist/Dropdown/typings.d.ts +1 -1
- package/dist/Form/utils/classUtil.js +2 -2
- package/dist/Input/Input.js +2 -1
- package/dist/Input/InputRange.js +3 -3
- package/dist/MessageBox/MessageBox.js +1 -1
- package/dist/Popconfirm/Popconfirm.js +1 -1
- package/dist/Popconfirm/typings.d.ts +2 -1
- package/dist/Popover/Popover.js +1 -1
- package/dist/Popover/typings.d.ts +1 -1
- package/dist/Popper/Popper.js +7 -7
- package/dist/Progress/Progress.js +1 -1
- package/dist/Table/hooks/useSelection.d.ts +0 -7
- package/dist/Table/util.js +2 -2
- package/dist/Tabs/Tabs.js +1 -1
- package/dist/TimePicker/TimePicker.js +2 -1
- package/dist/TimePicker/TimeSpinnerPanel.js +2 -1
- package/dist/hooks/prefix.d.ts +1 -1
- package/dist/hooks/prefix.js +4 -4
- package/dist/hooks/useClassNames.js +1 -1
- package/dist/index.css +222 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/theme-chalk/carousel/index.scss +237 -0
- package/dist/theme-chalk/dev.scss +2 -0
- package/dist/theme-chalk/index.scss +1 -1
- package/package.json +1 -1
- package/dist/theme-chalk/build.scss +0 -64
|
@@ -71,7 +71,7 @@ var DateTimePicker = (0, import_react.forwardRef)((props, ref) => {
|
|
|
71
71
|
formatter,
|
|
72
72
|
...rest
|
|
73
73
|
} = props;
|
|
74
|
-
const { e, is } = (0, import_hooks.useClassNames)(classPrefix);
|
|
74
|
+
const { b, e, is } = (0, import_hooks.useClassNames)(classPrefix);
|
|
75
75
|
const [value, setValue] = (0, import_hooks.useControlled)(props.value, props.defaultValue);
|
|
76
76
|
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
77
77
|
const [showTime, setShowTime] = (0, import_react.useState)(false);
|
|
@@ -129,7 +129,7 @@ var DateTimePicker = (0, import_react.forwardRef)((props, ref) => {
|
|
|
129
129
|
onClick: onActive,
|
|
130
130
|
value,
|
|
131
131
|
onClear: () => handleChange(null, {}),
|
|
132
|
-
className: (0, import_classnames.default)({ "
|
|
132
|
+
className: (0, import_classnames.default)({ [b("date", false)]: readonly }, is({ active: visible })),
|
|
133
133
|
style: props.style,
|
|
134
134
|
error,
|
|
135
135
|
warning,
|
|
@@ -192,7 +192,7 @@ var DateTimePicker = (0, import_react.forwardRef)((props, ref) => {
|
|
|
192
192
|
{
|
|
193
193
|
nodeRef: () => ({ current: timePanelRef.current.ref }),
|
|
194
194
|
visible: showTime,
|
|
195
|
-
name: "
|
|
195
|
+
name: b("slide-up", false),
|
|
196
196
|
transitionAppear: true,
|
|
197
197
|
unmountOnExit: true,
|
|
198
198
|
display: "",
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -189,8 +189,8 @@ function InternalElDialog(props, ref) {
|
|
|
189
189
|
style: {
|
|
190
190
|
...props.style,
|
|
191
191
|
// @ts-ignore
|
|
192
|
-
[`--${import_prefix.
|
|
193
|
-
[`--${import_prefix.
|
|
192
|
+
[`--${import_prefix.namespace}-dialog-width`]: fullscreen || classPrefix !== "dialog" ? "" : (0, import_Util.addUnit)(width),
|
|
193
|
+
[`--${import_prefix.namespace}-dialog-margin-top`]: (0, import_Util.addUnit)(top)
|
|
194
194
|
},
|
|
195
195
|
ref: dialogRef
|
|
196
196
|
},
|
package/dist/Dialog/typings.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { TransitionProps } from '../Transition';
|
|
|
3
3
|
import { AnimationEventProps, BaseProps, NativeProps } from '../types/common';
|
|
4
4
|
export interface DialogProps extends AnimationEventProps, BaseProps, NativeProps, TransitionProps {
|
|
5
5
|
/** 是否显示模态框(可控) */
|
|
6
|
-
visible
|
|
6
|
+
visible: boolean;
|
|
7
7
|
/** 默认是否显示模态框 */
|
|
8
8
|
defaultVisible?: boolean;
|
|
9
9
|
/** 是否需要遮罩层 */
|
|
@@ -50,7 +50,7 @@ export interface DialogProps extends AnimationEventProps, BaseProps, NativeProps
|
|
|
50
50
|
/** Dialog 关闭动画结束时的回调 */
|
|
51
51
|
onClosed?: () => void;
|
|
52
52
|
/** 关闭弹窗函数 */
|
|
53
|
-
close
|
|
53
|
+
close: () => void;
|
|
54
54
|
/** 关闭前的回调,会暂停 Dialog 的关闭. 回调函数内执行 done 参数方法的时候才是真正关闭对话框的时候. */
|
|
55
55
|
beforeClose?: DialogBeforeCloseFn;
|
|
56
56
|
}
|
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -39,6 +39,7 @@ var import_react_dom = require("react-dom");
|
|
|
39
39
|
var import_Transition = require("../Transition");
|
|
40
40
|
var import_Util = require("../Util");
|
|
41
41
|
var import_hooks = require("../hooks");
|
|
42
|
+
var import_prefix = require("../hooks/prefix");
|
|
42
43
|
var import_DrawerBody = __toESM(require("./DrawerBody"));
|
|
43
44
|
var import_DrawerContext = require("./DrawerContext");
|
|
44
45
|
var import_DrawerFooter = __toESM(require("./DrawerFooter"));
|
|
@@ -76,14 +77,14 @@ function InternalComp(props, ref) {
|
|
|
76
77
|
setVisible(false);
|
|
77
78
|
onClose == null ? void 0 : onClose();
|
|
78
79
|
} else if (backdrop === "static") {
|
|
79
|
-
(0, import_dom_lib.addClass)(drawerRef.current,
|
|
80
|
+
(0, import_dom_lib.addClass)(drawerRef.current, `${import_prefix.namespace}-drawer-shake`);
|
|
80
81
|
setTimeout(() => {
|
|
81
|
-
(0, import_dom_lib.removeClass)(drawerRef.current,
|
|
82
|
+
(0, import_dom_lib.removeClass)(drawerRef.current, `${import_prefix.namespace}-drawer-shake`);
|
|
82
83
|
}, 300);
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
|
-
}, [backdrop, onClose, ref, setVisible, visible]);
|
|
87
|
+
}, [b, backdrop, onClose, ref, setVisible, visible]);
|
|
87
88
|
return /* @__PURE__ */ import_react.default.createElement(import_DrawerContext.DrawerContext.Provider, { value: { backdrop, setVisible, isControlled, onClose } }, backdrop && (0, import_react_dom.createPortal)(
|
|
88
89
|
/* @__PURE__ */ import_react.default.createElement(
|
|
89
90
|
import_Transition.Transition,
|
|
@@ -95,12 +96,12 @@ function InternalComp(props, ref) {
|
|
|
95
96
|
duration: 300,
|
|
96
97
|
onEnter: () => {
|
|
97
98
|
setTimeout(() => {
|
|
98
|
-
(0, import_dom_lib.addClass)(backdropRef.current,
|
|
99
|
+
(0, import_dom_lib.addClass)(backdropRef.current, `${import_prefix.namespace}-anim-in`);
|
|
99
100
|
}, 10);
|
|
100
101
|
},
|
|
101
|
-
beforeLeave: () => (0, import_dom_lib.removeClass)(backdropRef.current,
|
|
102
|
+
beforeLeave: () => (0, import_dom_lib.removeClass)(backdropRef.current, `${import_prefix.namespace}-anim-in`)
|
|
102
103
|
},
|
|
103
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(b`backdrop`,
|
|
104
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(b`backdrop`, `${import_prefix.namespace}-anim-fade`), style: { zIndex: import_Util.PopupManager.nextZIndex() }, ref: backdropRef })
|
|
104
105
|
),
|
|
105
106
|
document.body
|
|
106
107
|
), (0, import_react_dom.createPortal)(
|
|
@@ -119,15 +120,23 @@ function InternalComp(props, ref) {
|
|
|
119
120
|
},
|
|
120
121
|
beforeLeave: () => {
|
|
121
122
|
var _a;
|
|
122
|
-
(0, import_dom_lib.removeClass)(drawerRef.current,
|
|
123
|
-
(0, import_dom_lib.addClass)(drawerRef.current,
|
|
123
|
+
(0, import_dom_lib.removeClass)(drawerRef.current, `${import_prefix.namespace}-anim-slide-in`);
|
|
124
|
+
(0, import_dom_lib.addClass)(drawerRef.current, `${import_prefix.namespace}-anim-slide-out`);
|
|
124
125
|
(_a = props.beforeLeave) == null ? void 0 : _a.call(props);
|
|
125
126
|
},
|
|
126
127
|
onLeave: props.onLeave,
|
|
127
128
|
afterLeave: props.afterLeave,
|
|
128
129
|
duration: 300
|
|
129
130
|
},
|
|
130
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(b`wrapper`, props.className), style: { ...props.style, zIndex: import_Util.PopupManager.nextZIndex() }, ref: ref || wrapperRef }, /* @__PURE__ */ import_react.default.createElement(
|
|
131
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(b`wrapper`, props.className), style: { ...props.style, zIndex: import_Util.PopupManager.nextZIndex() }, ref: ref || wrapperRef }, /* @__PURE__ */ import_react.default.createElement(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: (0, import_classnames.default)(wb(size, placement), `${import_prefix.namespace}-anim-slide-in`, `${import_prefix.namespace}-anim-${placement}`),
|
|
135
|
+
style: { display: "block" },
|
|
136
|
+
ref: drawerRef
|
|
137
|
+
},
|
|
138
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: b`dialog` }, /* @__PURE__ */ import_react.default.createElement("div", { className: b`content` }, children))
|
|
139
|
+
))
|
|
131
140
|
),
|
|
132
141
|
document.body
|
|
133
142
|
));
|
|
@@ -86,7 +86,7 @@ var Dropdown = (props) => {
|
|
|
86
86
|
import_Tooltip.default,
|
|
87
87
|
{
|
|
88
88
|
classPrefix,
|
|
89
|
-
triggerRef:
|
|
89
|
+
triggerRef: props.children,
|
|
90
90
|
popperClass: e`popper`,
|
|
91
91
|
disabled,
|
|
92
92
|
enterable: true,
|
|
@@ -3,7 +3,7 @@ import { PopperOptions } from '../Popper';
|
|
|
3
3
|
import { TransitionProps } from '../Transition';
|
|
4
4
|
import { AnimationEventProps, BaseProps, NativeProps } from '../types/common';
|
|
5
5
|
/** Dropdown 属性 */
|
|
6
|
-
export interface DropdownProps extends BaseProps
|
|
6
|
+
export interface DropdownProps extends BaseProps<React.ReactElement>, NativeProps, PopperOptions, AnimationEventProps, Omit<TransitionProps, 'children'> {
|
|
7
7
|
menu: React.ReactElement<DropdownMenuProps>;
|
|
8
8
|
/** 触发下拉的行为 */
|
|
9
9
|
trigger?: 'hover' | 'click' | 'contextmenu';
|
|
@@ -37,10 +37,10 @@ module.exports = __toCommonJS(classUtil_exports);
|
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_prefix = require("../../hooks/prefix");
|
|
39
39
|
var prefixSplit = (splitCode, ...classes) => {
|
|
40
|
-
const mergeClasses = classes.length ? (0, import_classnames.default)(...classes).split(" ").map((item) => (0, import_prefix.prefix)(`${import_prefix.
|
|
40
|
+
const mergeClasses = classes.length ? (0, import_classnames.default)(...classes).split(" ").map((item) => (0, import_prefix.prefix)(`${import_prefix.namespace}-form-item`, item, splitCode)) : [];
|
|
41
41
|
return mergeClasses.filter((cls) => cls).join(" ");
|
|
42
42
|
};
|
|
43
|
-
var b = (name) => `${import_prefix.
|
|
43
|
+
var b = (name) => `${import_prefix.namespace}-${name}`;
|
|
44
44
|
var e = (...classes) => prefixSplit("__", ...classes);
|
|
45
45
|
var m = (...classes) => prefixSplit("--", ...classes);
|
|
46
46
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/Input/Input.js
CHANGED
|
@@ -316,7 +316,7 @@ function InternalInput(props, ref) {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
))),
|
|
319
|
-
suffixSlot && /* @__PURE__ */ import_react.default.createElement("span", { ref: suffixRef, key: "suffixSlot", className: (0, import_classnames.default)(e`suffix`, { "
|
|
319
|
+
suffixSlot && /* @__PURE__ */ import_react.default.createElement("span", { ref: suffixRef, key: "suffixSlot", className: (0, import_classnames.default)(e`suffix`, { [b("click", false)]: suffixCanClick }), onClick: onClickSuffix }, /* @__PURE__ */ import_react.default.createElement("span", { className: e`suffix-inner` }, suffixSlot))
|
|
320
320
|
);
|
|
321
321
|
}, [
|
|
322
322
|
type,
|
|
@@ -342,6 +342,7 @@ function InternalInput(props, ref) {
|
|
|
342
342
|
maxLength,
|
|
343
343
|
handelClear,
|
|
344
344
|
suffixSlot,
|
|
345
|
+
b,
|
|
345
346
|
suffixCanClick,
|
|
346
347
|
onClickSuffix,
|
|
347
348
|
showClear,
|
package/dist/Input/InputRange.js
CHANGED
|
@@ -214,7 +214,7 @@ var InputRange = (0, import_react.forwardRef)((props, ref) => {
|
|
|
214
214
|
if (nodeType === "ElIcon") {
|
|
215
215
|
return (0, import_react.cloneElement)(prefix, {
|
|
216
216
|
...prefix.props,
|
|
217
|
-
className: (0, import_classnames.default)((_a = prefix.props) == null ? void 0 : _a.className, `${import_prefix.
|
|
217
|
+
className: (0, import_classnames.default)((_a = prefix.props) == null ? void 0 : _a.className, `${import_prefix.namespace}-range__icon`)
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
}
|
|
@@ -229,11 +229,11 @@ var InputRange = (0, import_react.forwardRef)((props, ref) => {
|
|
|
229
229
|
if (nodeType === "ElIcon") {
|
|
230
230
|
return (0, import_react.cloneElement)(suffix, {
|
|
231
231
|
...suffix.props,
|
|
232
|
-
className: (0, import_classnames.default)((_a = suffix.props) == null ? void 0 : _a.className, `${import_prefix.
|
|
232
|
+
className: (0, import_classnames.default)((_a = suffix.props) == null ? void 0 : _a.className, `${import_prefix.namespace}-input__icon ${import_prefix.namespace}-range__close-icon`)
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
} else {
|
|
236
|
-
return /* @__PURE__ */ import_react.default.createElement("span", { className: `${import_prefix.
|
|
236
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { className: `${import_prefix.namespace}-range__end-icon` }, suffix);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
return null;
|
|
@@ -189,7 +189,7 @@ var MessageBox = (0, import_react.memo)(
|
|
|
189
189
|
classPrefix,
|
|
190
190
|
visible,
|
|
191
191
|
className: (0, import_classnames.default)("is-message-box", className),
|
|
192
|
-
style: { ...style, [`--${import_prefix.
|
|
192
|
+
style: { ...style, [`--${import_prefix.namespace}-messagebox-width`]: (0, import_Util.addUnit)(width) },
|
|
193
193
|
modal: true,
|
|
194
194
|
overflow,
|
|
195
195
|
showClose,
|
|
@@ -77,7 +77,7 @@ var Popconfirm = (props) => {
|
|
|
77
77
|
classPrefix,
|
|
78
78
|
popperClass: b("popover", false),
|
|
79
79
|
popperStyle: { minWidth: 200 },
|
|
80
|
-
triggerRef:
|
|
80
|
+
triggerRef: props.children,
|
|
81
81
|
enterable: true,
|
|
82
82
|
effect: "light",
|
|
83
83
|
trigger: "click",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IconName } from '../Icon';
|
|
2
3
|
import { PopperOptions } from '../Popper';
|
|
3
4
|
import { BaseProps, NativeProps, TypeAttributes } from '../types/common';
|
|
4
|
-
export interface PopconfirmProps extends BaseProps
|
|
5
|
+
export interface PopconfirmProps extends BaseProps<React.ReactElement>, NativeProps, PopperOptions {
|
|
5
6
|
classPrefix?: string;
|
|
6
7
|
/** 显示的内容 */
|
|
7
8
|
title: string;
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -71,7 +71,7 @@ var Popover = (props) => {
|
|
|
71
71
|
classPrefix,
|
|
72
72
|
popperClass: (0, import_classnames.default)(b(), { [m`plain`]: plain }),
|
|
73
73
|
popperStyle: { width },
|
|
74
|
-
triggerRef:
|
|
74
|
+
triggerRef: props.children,
|
|
75
75
|
enterable: true,
|
|
76
76
|
effect: "light",
|
|
77
77
|
placement,
|
|
@@ -3,7 +3,7 @@ import { PopperOptions } from '../Popper';
|
|
|
3
3
|
import { TransitionProps } from '../Transition';
|
|
4
4
|
import { AnimationEventProps, BaseProps, NativeProps } from '../types/common';
|
|
5
5
|
/** Dropdown 属性 */
|
|
6
|
-
export interface PopoverProps extends BaseProps
|
|
6
|
+
export interface PopoverProps extends BaseProps<React.ReactElement>, NativeProps, PopperOptions, AnimationEventProps, Omit<TransitionProps, 'children'> {
|
|
7
7
|
/** 触发下拉的行为 */
|
|
8
8
|
trigger?: 'hover' | 'click' | 'contextmenu';
|
|
9
9
|
/** 标题 */
|
package/dist/Popper/Popper.js
CHANGED
|
@@ -87,13 +87,13 @@ var Popper = (0, import_react.forwardRef)((props, ref) => {
|
|
|
87
87
|
const animation = (0, import_react.useMemo)(() => {
|
|
88
88
|
var _a2, _b, _c, _d;
|
|
89
89
|
if ((0, import_startsWith.default)(((_a2 = popperInstance == null ? void 0 : popperInstance.state) == null ? void 0 : _a2.placement) || (props == null ? void 0 : props.placement), "top")) {
|
|
90
|
-
return `${import_prefix.
|
|
90
|
+
return `${import_prefix.namespace}-slide-down`;
|
|
91
91
|
} else if ((0, import_startsWith.default)(((_b = popperInstance == null ? void 0 : popperInstance.state) == null ? void 0 : _b.placement) || (props == null ? void 0 : props.placement), "bottom")) {
|
|
92
|
-
return `${import_prefix.
|
|
92
|
+
return `${import_prefix.namespace}-slide-up`;
|
|
93
93
|
} else if ((0, import_startsWith.default)(((_c = popperInstance == null ? void 0 : popperInstance.state) == null ? void 0 : _c.placement) || (props == null ? void 0 : props.placement), "left")) {
|
|
94
|
-
return `${import_prefix.
|
|
94
|
+
return `${import_prefix.namespace}-slide-right`;
|
|
95
95
|
} else if ((0, import_startsWith.default)(((_d = popperInstance == null ? void 0 : popperInstance.state) == null ? void 0 : _d.placement) || (props == null ? void 0 : props.placement), "right")) {
|
|
96
|
-
return `${import_prefix.
|
|
96
|
+
return `${import_prefix.namespace}-slide-left`;
|
|
97
97
|
}
|
|
98
98
|
}, [(_a = popperInstance == null ? void 0 : popperInstance.state) == null ? void 0 : _a.placement, props == null ? void 0 : props.placement]);
|
|
99
99
|
const afterLeave = (0, import_react.useCallback)(() => {
|
|
@@ -115,8 +115,8 @@ var Popper = (0, import_react.forwardRef)((props, ref) => {
|
|
|
115
115
|
}
|
|
116
116
|
}, [popperInstance]);
|
|
117
117
|
(0, import_hooks.useComponentWillMount)(() => {
|
|
118
|
-
if (!transitionProps.unmountOnExit && document.getElementById(`${import_prefix.
|
|
119
|
-
document.getElementById(`${import_prefix.
|
|
118
|
+
if (!transitionProps.unmountOnExit && document.getElementById(`${import_prefix.namespace}-popper-${id}`)) {
|
|
119
|
+
document.getElementById(`${import_prefix.namespace}-popper-${id}`).parentNode.removeChild(document.getElementById(`${import_prefix.namespace}-popper-${id}`));
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
@@ -126,7 +126,7 @@ var Popper = (0, import_react.forwardRef)((props, ref) => {
|
|
|
126
126
|
() => /* @__PURE__ */ import_react.default.createElement(import_Transition.Transition, { nodeRef: { current: popperElement }, visible, name: animation, className, afterLeave, ...transitionProps }, /* @__PURE__ */ import_react.default.createElement(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
|
-
id: `${import_prefix.
|
|
129
|
+
id: `${import_prefix.namespace}-popper-${id}`,
|
|
130
130
|
className: (0, import_classnames.default)(b(), is(effect), popperClass),
|
|
131
131
|
onMouseEnter,
|
|
132
132
|
onMouseLeave,
|
|
@@ -173,7 +173,7 @@ var Progress = (props) => {
|
|
|
173
173
|
{
|
|
174
174
|
className: be("circle", "track"),
|
|
175
175
|
d: trackPath,
|
|
176
|
-
stroke: `var(--${import_prefix.
|
|
176
|
+
stroke: `var(--${import_prefix.namespace}-fill-color-light, #e5e9f2)`,
|
|
177
177
|
strokeWidth: relativeStrokeWidth,
|
|
178
178
|
fill: "none",
|
|
179
179
|
style: trailPathStyle
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TableProps } from '../typings';
|
|
3
|
-
/**
|
|
4
|
-
* @author Parker
|
|
5
|
-
* @CreateTime 2022/9/17 19:39:22
|
|
6
|
-
* @LastEditor Parker
|
|
7
|
-
* @ModifyTime 2022/11/7 19:38:04
|
|
8
|
-
* @Description
|
|
9
|
-
*/
|
|
10
3
|
export declare const useSelection: <T>(props: TableProps<T>, data: T[]) => {
|
|
11
4
|
state: {
|
|
12
5
|
isIndeterminate: any;
|
package/dist/Table/util.js
CHANGED
|
@@ -36,7 +36,7 @@ var import_prefix = require("../hooks/prefix");
|
|
|
36
36
|
var TableIdManager = {
|
|
37
37
|
tableId: 0,
|
|
38
38
|
columnId: 0,
|
|
39
|
-
nextTableId: () =>
|
|
39
|
+
nextTableId: () => `${import_prefix.namespace}-table_${++TableIdManager.tableId}`,
|
|
40
40
|
nextColumnId: (start) => `column_${start ? ++start : ++TableIdManager.columnId}`
|
|
41
41
|
};
|
|
42
42
|
var cacheStringFunction = (fn) => {
|
|
@@ -73,7 +73,7 @@ var getStyle = (element, styleName) => {
|
|
|
73
73
|
var removePopper;
|
|
74
74
|
function createTablePopper(parentNode, trigger, popperContent, tooltipRef) {
|
|
75
75
|
var _a;
|
|
76
|
-
const ns = import_prefix.
|
|
76
|
+
const ns = import_prefix.namespace || "r";
|
|
77
77
|
const scrollContainer = parentNode == null ? void 0 : parentNode.querySelector(`.${ns}-scrollbar__wrap`);
|
|
78
78
|
removePopper == null ? void 0 : removePopper();
|
|
79
79
|
const renderDom = document.createDocumentFragment();
|
package/dist/Tabs/Tabs.js
CHANGED
|
@@ -171,7 +171,7 @@ var Tabs = (0, import_react.forwardRef)((props, ref) => {
|
|
|
171
171
|
let offset = 0;
|
|
172
172
|
let tabSize = 0;
|
|
173
173
|
const sizeDir = sizeName === "offsetWidth" ? "X" : "Y";
|
|
174
|
-
(0, import_forEach.default)((_a = elRef.current) == null ? void 0 : _a.querySelectorAll(".
|
|
174
|
+
(0, import_forEach.default)((_a = elRef.current) == null ? void 0 : _a.querySelectorAll("." + e`item`), (el) => {
|
|
175
175
|
var _a2;
|
|
176
176
|
if ((0, import_dom_lib.hasClass)(el, "is-active")) {
|
|
177
177
|
tabSize = el[sizeName === "offsetWidth" ? "clientWidth" : "clientHeight"];
|
|
@@ -178,7 +178,7 @@ var TimePicker = (0, import_react.forwardRef)((props, ref) => {
|
|
|
178
178
|
handleChange(null);
|
|
179
179
|
initialValue.current = "";
|
|
180
180
|
},
|
|
181
|
-
className: (0, import_classnames.default)({ [`${import_prefix.
|
|
181
|
+
className: (0, import_classnames.default)({ [`${import_prefix.namespace}-date`]: readonly, "is-active": visible }),
|
|
182
182
|
style: props.style,
|
|
183
183
|
error,
|
|
184
184
|
warning,
|
|
@@ -199,6 +199,7 @@ var TimePicker = (0, import_react.forwardRef)((props, ref) => {
|
|
|
199
199
|
setVisible(false);
|
|
200
200
|
setValue(initialValue.current);
|
|
201
201
|
},
|
|
202
|
+
onEnter: () => timePanelRef.current.adjustSpinners(),
|
|
202
203
|
...animationInputProps,
|
|
203
204
|
transitionAppear: true,
|
|
204
205
|
unmountOnExit: true
|
|
@@ -186,8 +186,9 @@ var TimeSpinnerPanel = (0, import_react.memo)(
|
|
|
186
186
|
),
|
|
187
187
|
type === "hours" ? 23 : 59
|
|
188
188
|
);
|
|
189
|
-
debouncedResetScroll(type);
|
|
190
189
|
modifyDateField(type, value);
|
|
190
|
+
debouncedResetScroll(type);
|
|
191
|
+
isScrolling.current = false;
|
|
191
192
|
},
|
|
192
193
|
[debouncedResetScroll, listRefsMap, modifyDateField, scrollBarHeight, typeItemHeight]
|
|
193
194
|
);
|
package/dist/hooks/prefix.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const namespace = "el";
|
|
3
3
|
export declare const getClassNamePrefix: () => string;
|
|
4
4
|
export declare const defaultClassPrefix: (name: string) => string;
|
|
5
5
|
export type ISplitCode = '-' | '__' | '--';
|
package/dist/hooks/prefix.js
CHANGED
|
@@ -32,15 +32,15 @@ __export(prefix_exports, {
|
|
|
32
32
|
default: () => prefix_default,
|
|
33
33
|
defaultClassPrefix: () => defaultClassPrefix,
|
|
34
34
|
getClassNamePrefix: () => getClassNamePrefix,
|
|
35
|
-
|
|
35
|
+
namespace: () => namespace,
|
|
36
36
|
prefix: () => prefix
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(prefix_exports);
|
|
39
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
40
|
var import_curry = __toESM(require("lodash/curry"));
|
|
41
|
-
var
|
|
41
|
+
var namespace = "el";
|
|
42
42
|
var getClassNamePrefix = () => {
|
|
43
|
-
return
|
|
43
|
+
return namespace + "-";
|
|
44
44
|
};
|
|
45
45
|
var defaultClassPrefix = (name) => `${getClassNamePrefix()}${name}`;
|
|
46
46
|
function prefix(pre, className, split = "-") {
|
|
@@ -57,6 +57,6 @@ var prefix_default = (0, import_curry.default)(prefix);
|
|
|
57
57
|
0 && (module.exports = {
|
|
58
58
|
defaultClassPrefix,
|
|
59
59
|
getClassNamePrefix,
|
|
60
|
-
|
|
60
|
+
namespace,
|
|
61
61
|
prefix
|
|
62
62
|
});
|
|
@@ -37,7 +37,7 @@ var import_isBoolean = __toESM(require("lodash/isBoolean"));
|
|
|
37
37
|
var import_last = __toESM(require("lodash/last"));
|
|
38
38
|
var import_react = require("react");
|
|
39
39
|
var import_prefix = require("./prefix");
|
|
40
|
-
function useClassNames(str, classPrefix = import_prefix.
|
|
40
|
+
function useClassNames(str, classPrefix = import_prefix.namespace) {
|
|
41
41
|
const componentName = (0, import_prefix.prefix)(classPrefix, str);
|
|
42
42
|
const prefixSplit = (0, import_react.useCallback)(
|
|
43
43
|
(splitCode, ...classes) => {
|
package/dist/index.css
CHANGED
|
@@ -4721,6 +4721,228 @@
|
|
|
4721
4721
|
background: transparent;
|
|
4722
4722
|
}
|
|
4723
4723
|
|
|
4724
|
+
.el-carousel__item {
|
|
4725
|
+
position: absolute;
|
|
4726
|
+
top: 0;
|
|
4727
|
+
left: 0;
|
|
4728
|
+
width: 100%;
|
|
4729
|
+
height: 100%;
|
|
4730
|
+
display: inline-block;
|
|
4731
|
+
overflow: hidden;
|
|
4732
|
+
z-index: calc(var(--el-index-normal) - 1);
|
|
4733
|
+
}
|
|
4734
|
+
.el-carousel__item.is-active {
|
|
4735
|
+
z-index: calc(var(--el-index-normal) - 1);
|
|
4736
|
+
}
|
|
4737
|
+
.el-carousel__item.is-animating {
|
|
4738
|
+
transition: transform 0.4s ease-in-out;
|
|
4739
|
+
}
|
|
4740
|
+
|
|
4741
|
+
.el-carousel__item--card {
|
|
4742
|
+
width: 50%;
|
|
4743
|
+
transition: transform 0.4s ease-in-out;
|
|
4744
|
+
}
|
|
4745
|
+
.el-carousel__item--card.is-in-stage {
|
|
4746
|
+
cursor: pointer;
|
|
4747
|
+
z-index: var(--el-index-normal);
|
|
4748
|
+
}
|
|
4749
|
+
.el-carousel__item--card.is-in-stage:hover .el-carousel__mask, .el-carousel__item--card.is-in-stage.is-hover .el-carousel__mask {
|
|
4750
|
+
opacity: 0.12;
|
|
4751
|
+
}
|
|
4752
|
+
.el-carousel__item--card.is-active {
|
|
4753
|
+
z-index: calc(var(--el-index-normal) + 1);
|
|
4754
|
+
}
|
|
4755
|
+
|
|
4756
|
+
.el-carousel__item--card-vertical {
|
|
4757
|
+
width: 100%;
|
|
4758
|
+
height: 50%;
|
|
4759
|
+
}
|
|
4760
|
+
|
|
4761
|
+
.el-carousel__mask {
|
|
4762
|
+
position: absolute;
|
|
4763
|
+
width: 100%;
|
|
4764
|
+
height: 100%;
|
|
4765
|
+
top: 0;
|
|
4766
|
+
left: 0;
|
|
4767
|
+
background-color: var(--el-color-white);
|
|
4768
|
+
opacity: 0.24;
|
|
4769
|
+
transition: var(--el-transition-duration-fast);
|
|
4770
|
+
}
|
|
4771
|
+
|
|
4772
|
+
.el-carousel {
|
|
4773
|
+
--el-carousel-arrow-font-size: 12px;
|
|
4774
|
+
--el-carousel-arrow-size: 36px;
|
|
4775
|
+
--el-carousel-arrow-background: rgba(31, 45, 61, 0.11);
|
|
4776
|
+
--el-carousel-arrow-hover-background: rgba(31, 45, 61, 0.23);
|
|
4777
|
+
--el-carousel-indicator-width: 30px;
|
|
4778
|
+
--el-carousel-indicator-height: 2px;
|
|
4779
|
+
--el-carousel-indicator-padding-horizontal: 4px;
|
|
4780
|
+
--el-carousel-indicator-padding-vertical: 12px;
|
|
4781
|
+
--el-carousel-indicator-out-color: var(--el-border-color-hover);
|
|
4782
|
+
position: relative;
|
|
4783
|
+
}
|
|
4784
|
+
|
|
4785
|
+
.el-carousel--horizontal,
|
|
4786
|
+
.el-carousel--vertical {
|
|
4787
|
+
overflow: hidden;
|
|
4788
|
+
}
|
|
4789
|
+
|
|
4790
|
+
.el-carousel__container {
|
|
4791
|
+
position: relative;
|
|
4792
|
+
height: 300px;
|
|
4793
|
+
}
|
|
4794
|
+
|
|
4795
|
+
.el-carousel__arrow {
|
|
4796
|
+
border: none;
|
|
4797
|
+
outline: none;
|
|
4798
|
+
padding: 0;
|
|
4799
|
+
margin: 0;
|
|
4800
|
+
height: var(--el-carousel-arrow-size);
|
|
4801
|
+
width: var(--el-carousel-arrow-size);
|
|
4802
|
+
cursor: pointer;
|
|
4803
|
+
transition: var(--el-transition-duration);
|
|
4804
|
+
border-radius: 50%;
|
|
4805
|
+
background-color: var(--el-carousel-arrow-background);
|
|
4806
|
+
color: #fff;
|
|
4807
|
+
position: absolute;
|
|
4808
|
+
top: 50%;
|
|
4809
|
+
z-index: 10;
|
|
4810
|
+
transform: translateY(-50%);
|
|
4811
|
+
text-align: center;
|
|
4812
|
+
font-size: var(--el-carousel-arrow-font-size);
|
|
4813
|
+
display: inline-flex;
|
|
4814
|
+
justify-content: center;
|
|
4815
|
+
align-items: center;
|
|
4816
|
+
}
|
|
4817
|
+
.el-carousel__arrow:hover {
|
|
4818
|
+
background-color: var(--el-carousel-arrow-hover-background);
|
|
4819
|
+
}
|
|
4820
|
+
.el-carousel__arrow i {
|
|
4821
|
+
cursor: pointer;
|
|
4822
|
+
}
|
|
4823
|
+
|
|
4824
|
+
.el-carousel__arrow--left {
|
|
4825
|
+
left: 16px;
|
|
4826
|
+
}
|
|
4827
|
+
|
|
4828
|
+
.el-carousel__arrow--right {
|
|
4829
|
+
right: 16px;
|
|
4830
|
+
}
|
|
4831
|
+
|
|
4832
|
+
.el-carousel__indicators {
|
|
4833
|
+
position: absolute;
|
|
4834
|
+
list-style: none;
|
|
4835
|
+
margin: 0;
|
|
4836
|
+
padding: 0;
|
|
4837
|
+
z-index: calc(var(--el-index-normal) + 1);
|
|
4838
|
+
}
|
|
4839
|
+
|
|
4840
|
+
.el-carousel__indicators--horizontal {
|
|
4841
|
+
bottom: 0;
|
|
4842
|
+
left: 50%;
|
|
4843
|
+
transform: translate(-50%);
|
|
4844
|
+
}
|
|
4845
|
+
|
|
4846
|
+
.el-carousel__indicators--vertical {
|
|
4847
|
+
right: 0;
|
|
4848
|
+
top: 50%;
|
|
4849
|
+
transform: translateY(-50%);
|
|
4850
|
+
}
|
|
4851
|
+
|
|
4852
|
+
.el-carousel__indicators--outside {
|
|
4853
|
+
bottom: calc(var(--el-carousel-indicator-height) + var(--el-carousel-indicator-padding-vertical) * 2);
|
|
4854
|
+
text-align: center;
|
|
4855
|
+
position: static;
|
|
4856
|
+
transform: none;
|
|
4857
|
+
}
|
|
4858
|
+
.el-carousel__indicators--outside .el-carousel__indicator:hover button {
|
|
4859
|
+
opacity: 0.64;
|
|
4860
|
+
}
|
|
4861
|
+
.el-carousel__indicators--outside button {
|
|
4862
|
+
background-color: var(--el-carousel-indicator-out-color);
|
|
4863
|
+
opacity: 0.24;
|
|
4864
|
+
}
|
|
4865
|
+
|
|
4866
|
+
.el-carousel__indicators--right {
|
|
4867
|
+
right: 0;
|
|
4868
|
+
}
|
|
4869
|
+
|
|
4870
|
+
.el-carousel__indicators--labels {
|
|
4871
|
+
left: 0;
|
|
4872
|
+
right: 0;
|
|
4873
|
+
transform: none;
|
|
4874
|
+
text-align: center;
|
|
4875
|
+
}
|
|
4876
|
+
.el-carousel__indicators--labels .el-carousel__button {
|
|
4877
|
+
height: auto;
|
|
4878
|
+
width: auto;
|
|
4879
|
+
padding: 2px 18px;
|
|
4880
|
+
font-size: 12px;
|
|
4881
|
+
color: #000;
|
|
4882
|
+
}
|
|
4883
|
+
.el-carousel__indicators--labels .el-carousel__indicator {
|
|
4884
|
+
padding: 6px 4px;
|
|
4885
|
+
}
|
|
4886
|
+
|
|
4887
|
+
.el-carousel__indicator {
|
|
4888
|
+
background-color: transparent;
|
|
4889
|
+
cursor: pointer;
|
|
4890
|
+
}
|
|
4891
|
+
.el-carousel__indicator:hover button {
|
|
4892
|
+
opacity: 0.72;
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4895
|
+
.el-carousel__indicator--horizontal {
|
|
4896
|
+
display: inline-block;
|
|
4897
|
+
padding: var(--el-carousel-indicator-padding-vertical) var(--el-carousel-indicator-padding-horizontal);
|
|
4898
|
+
}
|
|
4899
|
+
|
|
4900
|
+
.el-carousel__indicator--vertical {
|
|
4901
|
+
padding: var(--el-carousel-indicator-padding-horizontal) var(--el-carousel-indicator-padding-vertical);
|
|
4902
|
+
}
|
|
4903
|
+
.el-carousel__indicator--vertical .el-carousel__button {
|
|
4904
|
+
width: var(--el-carousel-indicator-height);
|
|
4905
|
+
height: calc(var(--el-carousel-indicator-width) / 2);
|
|
4906
|
+
}
|
|
4907
|
+
|
|
4908
|
+
.el-carousel__indicator.is-active button {
|
|
4909
|
+
opacity: 1;
|
|
4910
|
+
}
|
|
4911
|
+
|
|
4912
|
+
.el-carousel__button {
|
|
4913
|
+
display: block;
|
|
4914
|
+
opacity: 0.48;
|
|
4915
|
+
width: var(--el-carousel-indicator-width);
|
|
4916
|
+
height: var(--el-carousel-indicator-height);
|
|
4917
|
+
background-color: #fff;
|
|
4918
|
+
border: none;
|
|
4919
|
+
outline: none;
|
|
4920
|
+
padding: 0;
|
|
4921
|
+
margin: 0;
|
|
4922
|
+
cursor: pointer;
|
|
4923
|
+
transition: var(--el-transition-duration);
|
|
4924
|
+
}
|
|
4925
|
+
|
|
4926
|
+
.carousel-arrow-left-enter-from,
|
|
4927
|
+
.carousel-arrow-left-leave-active {
|
|
4928
|
+
transform: translateY(-50%) translate(-10px);
|
|
4929
|
+
opacity: 0;
|
|
4930
|
+
}
|
|
4931
|
+
|
|
4932
|
+
.carousel-arrow-right-enter-from,
|
|
4933
|
+
.carousel-arrow-right-leave-active {
|
|
4934
|
+
transform: translateY(-50%) translate(10px);
|
|
4935
|
+
opacity: 0;
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4938
|
+
.el-transitioning {
|
|
4939
|
+
filter: url(#elCarouselHorizontal);
|
|
4940
|
+
}
|
|
4941
|
+
|
|
4942
|
+
.el-transitioning-vertical {
|
|
4943
|
+
filter: url(#elCarouselVertical);
|
|
4944
|
+
}
|
|
4945
|
+
|
|
4724
4946
|
.el-checkbox {
|
|
4725
4947
|
--el-checkbox-text-color: var(--el-text-color-regular);
|
|
4726
4948
|
--el-checkbox-input-width: 16px;
|