@qsxy/element-plus-react 1.0.0-next.22 → 1.0.0-next.23
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/Breadcrumb/Breadcrumb.js +9 -0
- package/dist/Button/Button.js +3 -3
- package/dist/ColorPicker/ColorPicker.js +12 -2
- package/dist/ConfigProvider/ConfigProvider.d.ts +6 -22
- package/dist/ConfigProvider/ConfigProvider.js +22 -13
- package/dist/ConfigProvider/ConfigProviderContext.d.ts +5 -0
- package/dist/ConfigProvider/ConfigProviderContext.js +13 -0
- package/dist/ConfigProvider/index.d.ts +2 -2
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/ConfigProvider/typings.d.ts +22 -0
- package/dist/ConfigProvider/typings.js +1 -0
- package/dist/Container/Aside.d.ts +5 -0
- package/dist/Container/Aside.js +26 -0
- package/dist/Container/Container.d.ts +5 -0
- package/dist/Container/Container.js +37 -0
- package/dist/Container/Footer.d.ts +5 -0
- package/dist/Container/Footer.js +26 -0
- package/dist/Container/Header.d.ts +5 -0
- package/dist/Container/Header.js +26 -0
- package/dist/Container/Main.d.ts +3 -0
- package/dist/Container/Main.js +14 -0
- package/dist/Container/index.d.ts +6 -0
- package/dist/Container/index.js +5 -0
- package/dist/Container/typings.d.ts +30 -0
- package/dist/Container/typings.js +1 -0
- package/dist/InputNumber/InputNumber.js +4 -4
- package/dist/Menu/Menu.js +84 -34
- package/dist/Menu/MenuContext.d.ts +4 -2
- package/dist/Menu/MenuContext.js +2 -0
- package/dist/Menu/MenuItem.d.ts +4 -1
- package/dist/Menu/MenuItem.js +7 -6
- package/dist/Menu/MenuItemGroup.d.ts +4 -1
- package/dist/Menu/MenuItemGroup.js +1 -0
- package/dist/Menu/SubMenu.d.ts +4 -1
- package/dist/Menu/SubMenu.js +86 -41
- package/dist/Message/Message.js +1 -1
- package/dist/Pagination/Options.js +1 -1
- package/dist/Pagination/Pagination.js +1 -1
- package/dist/Popper/Popper.js +1 -1
- package/dist/Popper/popperOptions.d.ts +5 -4
- package/dist/Popper/popperOptions.js +15 -6
- package/dist/Popper/typings.d.ts +1 -0
- package/dist/Table/Table.js +9 -1
- package/dist/Tooltip/Tooltip.js +1 -2
- package/dist/hooks/popperPropsUtils.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/theme-chalk/aside.scss +8 -0
- package/theme-chalk/container.scss +14 -0
- package/theme-chalk/footer.scss +12 -0
- package/theme-chalk/header.scss +12 -0
- package/theme-chalk/index.scss +5 -0
- package/theme-chalk/main.scss +14 -0
- package/theme-chalk/menu.scss +1 -0
package/dist/Menu/Menu.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
3
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
9
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
10
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
11
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
14
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import { addClass, removeClass } from 'dom-lib';
|
|
21
21
|
import { pick } from 'lodash';
|
|
22
|
-
import React, { Children, forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
|
|
22
|
+
import React, { Children, forwardRef, useCallback, useImperativeHandle, useRef, useState } from 'react';
|
|
23
23
|
import { More } from "../Icon/IconList/More";
|
|
24
24
|
import { mergeDefaultProps } from "../Util";
|
|
25
25
|
import { useClassNames, useControlled } from "../hooks";
|
|
@@ -32,10 +32,10 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
32
32
|
var _props$style;
|
|
33
33
|
props = mergeDefaultProps({
|
|
34
34
|
mode: 'vertical',
|
|
35
|
-
showTimeout:
|
|
35
|
+
showTimeout: 150,
|
|
36
36
|
hideTimeout: 300,
|
|
37
37
|
uniqueOpened: false,
|
|
38
|
-
collapseTransition:
|
|
38
|
+
collapseTransition: true,
|
|
39
39
|
defaultOpeneds: [],
|
|
40
40
|
ellipsis: false,
|
|
41
41
|
router: false
|
|
@@ -52,6 +52,7 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
52
52
|
defaultOpeneds = _props.defaultOpeneds,
|
|
53
53
|
collapseTransition = _props.collapseTransition,
|
|
54
54
|
onSelect = _props.onSelect,
|
|
55
|
+
onOpen = _props.onOpen,
|
|
55
56
|
onClose = _props.onClose,
|
|
56
57
|
menuTrigger = _props.menuTrigger,
|
|
57
58
|
popperOffset = _props.popperOffset,
|
|
@@ -64,12 +65,16 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
64
65
|
_useControlled2 = _slicedToArray(_useControlled, 2),
|
|
65
66
|
active = _useControlled2[0],
|
|
66
67
|
setActive = _useControlled2[1];
|
|
67
|
-
|
|
68
|
+
var _useState = useState(collapse),
|
|
69
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
70
|
+
_collapse = _useState2[0],
|
|
71
|
+
setCollapse = _useState2[1];
|
|
68
72
|
// const [, setItems] = useState<MenuItemRegistered[]>([]);
|
|
69
73
|
|
|
70
74
|
var menuRef = useRef(null);
|
|
71
75
|
var menuItemsRef = useRef([]);
|
|
72
76
|
var subMenuRef = useRef([]);
|
|
77
|
+
var openedMenus = useRef({});
|
|
73
78
|
useCssTransiton({
|
|
74
79
|
nodeRef: menuRef,
|
|
75
80
|
visible: collapse,
|
|
@@ -82,34 +87,70 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
82
87
|
onEnter: onEnter,
|
|
83
88
|
afterEnter: afterEnter,
|
|
84
89
|
done: function done() {
|
|
90
|
+
setCollapse(collapse);
|
|
85
91
|
if (collapse) {
|
|
86
|
-
subMenuRef.current.forEach(function (sub) {
|
|
87
|
-
sub.closeMenu(sub.index, sub.indexPath);
|
|
88
|
-
});
|
|
89
92
|
addClass(menuRef.current, m(_templateObject || (_templateObject = _taggedTemplateLiteral(["collapse"]))));
|
|
90
93
|
} else {
|
|
91
94
|
removeClass(menuRef.current, m(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["collapse"]))));
|
|
95
|
+
subMenuRef.current.forEach(function (sub) {
|
|
96
|
+
sub.closeMenu(sub.index, sub.indexPath);
|
|
97
|
+
});
|
|
98
|
+
for (var key in openedMenus.current) {
|
|
99
|
+
if (Object.prototype.hasOwnProperty.call(openedMenus.current, key)) {
|
|
100
|
+
var item = openedMenus.current[key];
|
|
101
|
+
item.openMenu(item.index, item.indexPath);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
92
104
|
}
|
|
93
105
|
}
|
|
94
106
|
});
|
|
95
107
|
var _useEllipsis = useEllipsis(menuRef, props),
|
|
96
108
|
sliceIndex = _useEllipsis.sliceIndex;
|
|
97
|
-
var
|
|
98
|
-
|
|
109
|
+
var addItem = useCallback(function (menu) {
|
|
110
|
+
openedMenus.current = _objectSpread(_objectSpread({}, openedMenus.current), {}, _defineProperty({}, menu.index, menu));
|
|
111
|
+
}, []);
|
|
112
|
+
var removeItem = useCallback(function (menu) {
|
|
113
|
+
delete openedMenus.current[menu.index];
|
|
114
|
+
}, []);
|
|
115
|
+
var handleOpenMenu = useCallback(function (index, indexPath, item) {
|
|
99
116
|
if (mode === 'vertical') {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
sub.openMenu(index, indexPath);
|
|
103
|
-
}
|
|
117
|
+
// 折叠模式下,index为子菜单,只能向上逐层打开父菜单
|
|
118
|
+
if (collapse) {
|
|
104
119
|
if (uniqueOpened) {
|
|
105
|
-
|
|
120
|
+
subMenuRef.current.forEach(function (sub) {
|
|
106
121
|
sub.closeMenu(index, indexPath);
|
|
107
|
-
|
|
122
|
+
removeItem(sub);
|
|
123
|
+
});
|
|
108
124
|
}
|
|
109
|
-
|
|
125
|
+
indexPath.reduce(function (prev, e) {
|
|
126
|
+
subMenuRef.current.forEach(function (sub) {
|
|
127
|
+
if (sub.index === e) {
|
|
128
|
+
sub.openMenu(e, [].concat(_toConsumableArray(prev), [e]));
|
|
129
|
+
addItem(sub);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return [].concat(_toConsumableArray(prev), [e]);
|
|
133
|
+
}, []);
|
|
134
|
+
} else {
|
|
135
|
+
// 正常模式,index为父菜单的index
|
|
136
|
+
subMenuRef.current.forEach(function (sub) {
|
|
137
|
+
if (sub.index === index) {
|
|
138
|
+
sub.openMenu(index, indexPath);
|
|
139
|
+
addItem(sub);
|
|
140
|
+
}
|
|
141
|
+
if (uniqueOpened) {
|
|
142
|
+
if (sub.index !== index && !indexPath.includes(sub.index)) {
|
|
143
|
+
sub.closeMenu(index, indexPath);
|
|
144
|
+
removeItem(sub);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
110
149
|
}
|
|
111
|
-
|
|
112
|
-
}, [mode,
|
|
150
|
+
onOpen === null || onOpen === void 0 || onOpen(index, indexPath, item);
|
|
151
|
+
}, [addItem, collapse, mode, onOpen, removeItem, uniqueOpened]);
|
|
152
|
+
|
|
153
|
+
/** 激活菜单项 */
|
|
113
154
|
var activeMenus = useCallback(function () {
|
|
114
155
|
if (defaultActive) {
|
|
115
156
|
var menu = menuItemsRef.current.find(function (item) {
|
|
@@ -118,7 +159,7 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
118
159
|
if (menu && menu.indexPath.length > 1) {
|
|
119
160
|
setActive(menu.indexPath);
|
|
120
161
|
menu.indexPath.reduce(function (prev, item) {
|
|
121
|
-
|
|
162
|
+
handleOpenMenu(item, [].concat(_toConsumableArray(prev), [item]), {
|
|
122
163
|
index: item,
|
|
123
164
|
indexPath: [].concat(_toConsumableArray(prev), [item])
|
|
124
165
|
});
|
|
@@ -133,11 +174,14 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
133
174
|
});
|
|
134
175
|
if (sub) {
|
|
135
176
|
sub.openMenu(sub.index, sub.indexPath);
|
|
177
|
+
addItem(sub);
|
|
136
178
|
}
|
|
137
179
|
});
|
|
138
180
|
}
|
|
139
|
-
}, [defaultActive, defaultOpeneds,
|
|
140
|
-
|
|
181
|
+
}, [addItem, defaultActive, defaultOpeneds, handleOpenMenu, setActive]);
|
|
182
|
+
|
|
183
|
+
/** 添加子菜单 */
|
|
184
|
+
var addMenuItem = useCallback(function (menu) {
|
|
141
185
|
var prev = menuItemsRef.current;
|
|
142
186
|
if (!prev.some(function (item) {
|
|
143
187
|
return item.index === menu.index;
|
|
@@ -151,6 +195,8 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
151
195
|
menuItemsRef.current = prev.splice(idx, 1, menu);
|
|
152
196
|
}
|
|
153
197
|
}, [activeMenus]);
|
|
198
|
+
|
|
199
|
+
/** 添加父菜单 */
|
|
154
200
|
var addSubMenu = useCallback(function (sub) {
|
|
155
201
|
var prev = subMenuRef.current;
|
|
156
202
|
if (!prev.some(function (item) {
|
|
@@ -160,6 +206,8 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
160
206
|
activeMenus();
|
|
161
207
|
}
|
|
162
208
|
}, [activeMenus]);
|
|
209
|
+
|
|
210
|
+
/** 展开菜单 */
|
|
163
211
|
var open = useCallback(function (index) {
|
|
164
212
|
var menu = subMenuRef.current.find(function (item) {
|
|
165
213
|
return item.index === index;
|
|
@@ -167,27 +215,25 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
167
215
|
if (menu && menu.indexPath.length > 1) {
|
|
168
216
|
// setActive(menu.indexPath);
|
|
169
217
|
menu.indexPath.reduce(function (prev, item) {
|
|
170
|
-
|
|
218
|
+
handleOpenMenu(item, [].concat(_toConsumableArray(prev), [item]), {
|
|
171
219
|
index: item,
|
|
172
220
|
indexPath: [].concat(_toConsumableArray(prev), [item])
|
|
173
221
|
});
|
|
174
222
|
return [].concat(_toConsumableArray(prev), [item]);
|
|
175
223
|
}, []);
|
|
176
224
|
}
|
|
225
|
+
}, [handleOpenMenu]);
|
|
177
226
|
|
|
178
|
-
|
|
179
|
-
// if (sub) {
|
|
180
|
-
// sub.openMenu(sub.index, sub.indexPath);
|
|
181
|
-
// }
|
|
182
|
-
}, [onOpen]);
|
|
227
|
+
/** 折叠菜单 */
|
|
183
228
|
var close = useCallback(function (index) {
|
|
184
229
|
var sub = subMenuRef.current.find(function (item) {
|
|
185
230
|
return item.index === index;
|
|
186
231
|
});
|
|
187
232
|
if (sub) {
|
|
188
233
|
sub.closeMenu(sub.index, sub.indexPath);
|
|
234
|
+
removeItem(sub);
|
|
189
235
|
}
|
|
190
|
-
}, []);
|
|
236
|
+
}, [removeItem]);
|
|
191
237
|
useImperativeHandle(ref, function () {
|
|
192
238
|
return {
|
|
193
239
|
open: open,
|
|
@@ -212,13 +258,16 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
212
258
|
showTimeout: showTimeout,
|
|
213
259
|
hideTimeout: hideTimeout,
|
|
214
260
|
onSelect: onSelect,
|
|
215
|
-
onOpen:
|
|
261
|
+
onOpen: handleOpenMenu,
|
|
216
262
|
onClose: onClose,
|
|
217
|
-
|
|
263
|
+
addMenuItem: addMenuItem,
|
|
218
264
|
addSubMenu: addSubMenu,
|
|
265
|
+
addItem: addItem,
|
|
266
|
+
removeItem: removeItem,
|
|
219
267
|
menuTrigger: menuTrigger,
|
|
220
268
|
popperOffset: popperOffset,
|
|
221
269
|
router: router,
|
|
270
|
+
collapse: _collapse,
|
|
222
271
|
themeStyle: pick((_props$style = props.style) !== null && _props$style !== void 0 ? _props$style : {}, ['--el-menu-active-color', '--el-menu-text-color', '--el-menu-hover-text-color', '--el-menu-bg-color', '--el-menu-hover-bg-color', '--el-menu-item-height', '--el-menu-sub-item-height', '--el-menu-horizontal-height', '--el-menu-horizontal-sub-item-height', '--el-menu-item-font-size', '--el-menu-item-hover-fill', '--el-menu-border-color', '--el-menu-base-level-padding', '--el-menu-level-padding', '--el-menu-icon-width'])
|
|
223
272
|
}
|
|
224
273
|
}, sliceIndex > 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, Children.toArray(props.children).slice(0, sliceIndex), /*#__PURE__*/React.createElement(SubMenu, {
|
|
@@ -228,4 +277,5 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
228
277
|
}, Children.toArray(props.children).slice(sliceIndex))) : props.children))
|
|
229
278
|
);
|
|
230
279
|
});
|
|
280
|
+
Menu.displayName = 'ElMenu';
|
|
231
281
|
export default Menu;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemRegistered, MenuProps, SubMenuProvider } from './typings';
|
|
3
|
-
interface MenuContextProps extends Pick<MenuProps, 'menuTrigger' | 'onSelect' | 'onOpen' | 'onClose' | 'showTimeout' | 'hideTimeout' | 'popperOffset' | 'router'> {
|
|
3
|
+
interface MenuContextProps extends Pick<MenuProps, 'menuTrigger' | 'onSelect' | 'onOpen' | 'onClose' | 'showTimeout' | 'hideTimeout' | 'popperOffset' | 'router' | 'collapse'> {
|
|
4
4
|
activeIndex?: string[];
|
|
5
5
|
setActiveIndex?: (value: string[]) => void;
|
|
6
6
|
handleSubMenuClick?: () => void;
|
|
7
7
|
parentIndex?: string[];
|
|
8
|
-
|
|
8
|
+
addMenuItem?: (menu: MenuItemRegistered) => void;
|
|
9
9
|
addSubMenu?: (sub: SubMenuProvider) => void;
|
|
10
10
|
/** 菜单展示模式 */
|
|
11
11
|
mode?: 'horizontal' | 'vertical';
|
|
12
|
+
addItem?: (menu: SubMenuProvider) => void;
|
|
13
|
+
removeItem?: (menu: SubMenuProvider) => void;
|
|
12
14
|
themeStyle?: React.CSSProperties & Partial<Record<'--el-menu-active-color' | '--el-menu-text-color' | '--el-menu-hover-text-color' | '--el-menu-bg-color' | '--el-menu-hover-bg-color' | '--el-menu-item-height' | '--el-menu-sub-item-height' | '--el-menu-horizontal-height' | '--el-menu-horizontal-sub-item-height' | '--el-menu-item-font-size' | '--el-menu-item-hover-fill' | '--el-menu-border-color' | '--el-menu-base-level-padding' | '--el-menu-level-padding' | '--el-menu-icon-width', string>>;
|
|
13
15
|
}
|
|
14
16
|
export declare const MenuContext: React.Context<MenuContextProps>;
|
package/dist/Menu/MenuContext.js
CHANGED
package/dist/Menu/MenuItem.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemProps } from './typings';
|
|
3
|
-
declare const MenuItem:
|
|
3
|
+
declare const MenuItem: {
|
|
4
|
+
(props: MenuItemProps): React.JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
4
7
|
export default MenuItem;
|
package/dist/Menu/MenuItem.js
CHANGED
|
@@ -4,8 +4,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
import { useMount } from 'ahooks';
|
|
7
8
|
import classNames from 'classnames';
|
|
8
|
-
import React, { useCallback,
|
|
9
|
+
import React, { useCallback, useMemo } from 'react';
|
|
9
10
|
import { useNavigate } from 'react-router-dom';
|
|
10
11
|
import { useClassNames } from "../hooks";
|
|
11
12
|
import { useMenuContext } from "./MenuContext";
|
|
@@ -24,7 +25,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
24
25
|
activeIndex = _useMenuContext.activeIndex,
|
|
25
26
|
setActiveIndex = _useMenuContext.setActiveIndex,
|
|
26
27
|
parentIndex = _useMenuContext.parentIndex,
|
|
27
|
-
|
|
28
|
+
addMenuItem = _useMenuContext.addMenuItem,
|
|
28
29
|
onOpen = _useMenuContext.onOpen,
|
|
29
30
|
onSelect = _useMenuContext.onSelect,
|
|
30
31
|
router = _useMenuContext.router;
|
|
@@ -56,13 +57,12 @@ var MenuItem = function MenuItem(props) {
|
|
|
56
57
|
navigate === null || navigate === void 0 || navigate(route !== null && route !== void 0 ? route : index);
|
|
57
58
|
}
|
|
58
59
|
}, [activeIndex, disabled, handleSubMenuClick, index, indexPath, navigate, onClick, onOpen, onSelect, route, router, setActiveIndex]);
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
useMount(function () {
|
|
61
|
+
addMenuItem({
|
|
61
62
|
index: index,
|
|
62
63
|
indexPath: indexPath
|
|
63
64
|
});
|
|
64
|
-
|
|
65
|
-
}, []);
|
|
65
|
+
});
|
|
66
66
|
return /*#__PURE__*/React.createElement("li", {
|
|
67
67
|
className: classNames(b(), is({
|
|
68
68
|
disabled: disabled,
|
|
@@ -73,4 +73,5 @@ var MenuItem = function MenuItem(props) {
|
|
|
73
73
|
onClick: handleMenuItemClick
|
|
74
74
|
}, props.children);
|
|
75
75
|
};
|
|
76
|
+
MenuItem.displayName = 'ElMenuItem';
|
|
76
77
|
export default MenuItem;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemGroupProps } from './typings';
|
|
3
|
-
declare const MenuItemGroup:
|
|
3
|
+
declare const MenuItemGroup: {
|
|
4
|
+
(props: MenuItemGroupProps): React.JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
4
7
|
export default MenuItemGroup;
|
|
@@ -41,4 +41,5 @@ var MenuItemGroup = function MenuItemGroup(props) {
|
|
|
41
41
|
className: e(_templateObject || (_templateObject = _taggedTemplateLiteral(["title"])))
|
|
42
42
|
}, title), /*#__PURE__*/React.createElement("ul", null, props.children));
|
|
43
43
|
};
|
|
44
|
+
MenuItemGroup.displayName = 'ElMenuItemGroup';
|
|
44
45
|
export default MenuItemGroup;
|
package/dist/Menu/SubMenu.d.ts
CHANGED
package/dist/Menu/SubMenu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7
|
|
3
|
-
var _excluded = ["activeIndex", "parentIndex", "mode", "menuTrigger", "onOpen", "onClose", "
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
3
|
+
var _excluded = ["activeIndex", "parentIndex", "mode", "menuTrigger", "onOpen", "onClose", "addMenuItem", "addSubMenu", "handleSubMenuClick", "addItem", "removeItem", "showTimeout", "hideTimeout", "themeStyle", "popperOffset", "collapse"];
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -19,8 +19,9 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
21
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
|
+
import { useMount } from 'ahooks';
|
|
22
23
|
import classNames from 'classnames';
|
|
23
|
-
import React, { useCallback,
|
|
24
|
+
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
24
25
|
import Icon from "../Icon/Icon";
|
|
25
26
|
import Tooltip from "../Tooltip/Tooltip";
|
|
26
27
|
import Transition from "../Transition/Transition";
|
|
@@ -53,24 +54,45 @@ var SubMenu = function SubMenu(props) {
|
|
|
53
54
|
menuTrigger = _useMenuContext.menuTrigger,
|
|
54
55
|
onOpen = _useMenuContext.onOpen,
|
|
55
56
|
onClose = _useMenuContext.onClose,
|
|
56
|
-
|
|
57
|
+
addMenuItem = _useMenuContext.addMenuItem,
|
|
57
58
|
addSubMenu = _useMenuContext.addSubMenu,
|
|
58
59
|
handleSubMenuClick = _useMenuContext.handleSubMenuClick,
|
|
60
|
+
addItem = _useMenuContext.addItem,
|
|
61
|
+
removeItem = _useMenuContext.removeItem,
|
|
59
62
|
showTimeout = _useMenuContext.showTimeout,
|
|
60
63
|
hideTimeout = _useMenuContext.hideTimeout,
|
|
61
64
|
themeStyle = _useMenuContext.themeStyle,
|
|
62
65
|
popperOffset = _useMenuContext.popperOffset,
|
|
66
|
+
collapse = _useMenuContext.collapse,
|
|
63
67
|
ohter = _objectWithoutProperties(_useMenuContext, _excluded);
|
|
64
68
|
var _useState = useState(false),
|
|
65
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
66
70
|
open = _useState2[0],
|
|
67
71
|
setOpen = _useState2[1];
|
|
72
|
+
var _useState3 = useState(false),
|
|
73
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
74
|
+
expand = _useState4[0],
|
|
75
|
+
setExpand = _useState4[1];
|
|
68
76
|
var indexPath = useMemo(function () {
|
|
69
77
|
return [].concat(_toConsumableArray(parentIndex), [index]);
|
|
70
78
|
}, [index, parentIndex]);
|
|
71
79
|
var level = useMemo(function () {
|
|
72
80
|
return indexPath.length;
|
|
73
81
|
}, [indexPath.length]);
|
|
82
|
+
var self = useMemo(function () {
|
|
83
|
+
return {
|
|
84
|
+
index: index,
|
|
85
|
+
indexPath: indexPath,
|
|
86
|
+
openMenu: function openMenu() {
|
|
87
|
+
setOpen(true);
|
|
88
|
+
setExpand(true);
|
|
89
|
+
},
|
|
90
|
+
closeMenu: function closeMenu() {
|
|
91
|
+
setOpen(false);
|
|
92
|
+
setExpand(false);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}, [index, indexPath]);
|
|
74
96
|
var tooltipRef = useRef();
|
|
75
97
|
var ulRef = useRef(null);
|
|
76
98
|
var inited = useRef(false);
|
|
@@ -94,15 +116,29 @@ var SubMenu = function SubMenu(props) {
|
|
|
94
116
|
var _tooltipRef$current;
|
|
95
117
|
(_tooltipRef$current = tooltipRef.current) === null || _tooltipRef$current === void 0 || _tooltipRef$current.hide();
|
|
96
118
|
handleSubMenuClick === null || handleSubMenuClick === void 0 || handleSubMenuClick();
|
|
97
|
-
|
|
119
|
+
// 折叠模式下,index为子菜单,只能向上逐层打开父菜单
|
|
120
|
+
if (mode === 'vertical' && collapse) {
|
|
121
|
+
onOpen === null || onOpen === void 0 || onOpen(index, indexPath, {
|
|
122
|
+
index: index,
|
|
123
|
+
indexPath: indexPath
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}, [collapse, handleSubMenuClick, index, indexPath, mode, onOpen]);
|
|
127
|
+
|
|
128
|
+
/** 点击submenu事件 */
|
|
98
129
|
var handleSubMenuItemClick = useCallback(function (evt) {
|
|
99
130
|
evt.stopPropagation();
|
|
100
131
|
if (disabled) {
|
|
101
132
|
return;
|
|
102
133
|
}
|
|
103
134
|
if (mode === 'vertical') {
|
|
104
|
-
|
|
105
|
-
if (!
|
|
135
|
+
setExpand(!expand);
|
|
136
|
+
if (!expand) {
|
|
137
|
+
addItem(self);
|
|
138
|
+
} else {
|
|
139
|
+
removeItem(self);
|
|
140
|
+
}
|
|
141
|
+
if (!expand) {
|
|
106
142
|
onOpen === null || onOpen === void 0 || onOpen(index, indexPath, {
|
|
107
143
|
index: index,
|
|
108
144
|
indexPath: indexPath
|
|
@@ -114,42 +150,41 @@ var SubMenu = function SubMenu(props) {
|
|
|
114
150
|
});
|
|
115
151
|
}
|
|
116
152
|
}
|
|
117
|
-
}, [disabled, index, indexPath, mode, onClose, onOpen,
|
|
118
|
-
|
|
153
|
+
}, [addItem, disabled, expand, index, indexPath, mode, onClose, onOpen, removeItem, self]);
|
|
154
|
+
var placement = useMemo(function () {
|
|
155
|
+
if (mode === 'horizontal') {
|
|
156
|
+
return level > 1 ? 'right-start' : 'bottom-start';
|
|
157
|
+
}
|
|
158
|
+
return 'right-start';
|
|
159
|
+
}, [level, mode]);
|
|
160
|
+
var fallbackPlacements = useCallback(function () {
|
|
161
|
+
if (mode === 'horizontal') {
|
|
162
|
+
return level > 1 ? ['right-end', 'right', 'left-start', 'left-end', 'left'] : ['bottom-end', 'bottom', 'top-start', 'top-end', 'top'];
|
|
163
|
+
} else {
|
|
164
|
+
return ['right-end', 'right', 'left-start', 'left-end', 'left'];
|
|
165
|
+
}
|
|
166
|
+
}, [level, mode]);
|
|
167
|
+
useMount(function () {
|
|
119
168
|
if (!inited.current) {
|
|
120
169
|
inited.current = true;
|
|
121
|
-
|
|
170
|
+
addMenuItem({
|
|
122
171
|
index: index,
|
|
123
172
|
indexPath: indexPath
|
|
124
173
|
});
|
|
125
|
-
addSubMenu(
|
|
126
|
-
index: index,
|
|
127
|
-
indexPath: indexPath,
|
|
128
|
-
openMenu: function openMenu(index, indexPath) {
|
|
129
|
-
// if (mode === 'horizontal') {
|
|
130
|
-
// tooltipRef.current?.onOpen();
|
|
131
|
-
// }
|
|
132
|
-
setOpen(true);
|
|
133
|
-
},
|
|
134
|
-
closeMenu: function closeMenu(index, indexPath) {
|
|
135
|
-
// if (mode === 'horizontal') {
|
|
136
|
-
// tooltipRef.current?.hide();
|
|
137
|
-
// }
|
|
138
|
-
setOpen(false);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
174
|
+
addSubMenu(self);
|
|
141
175
|
}
|
|
142
176
|
});
|
|
143
177
|
return /*#__PURE__*/React.createElement("li", {
|
|
178
|
+
key: index,
|
|
144
179
|
className: classNames(b(), is({
|
|
145
180
|
disabled: disabled,
|
|
146
|
-
opened: open,
|
|
181
|
+
opened: open || expand,
|
|
147
182
|
active: activeIndex.includes(index)
|
|
148
183
|
}), _defineProperty({}, e(_templateObject || (_templateObject = _taggedTemplateLiteral(["hide-arrow"]))), index === '__el__more'), props.className),
|
|
149
184
|
onClick: handleSubMenuItemClick,
|
|
150
185
|
style: props.style,
|
|
151
186
|
role: "menuitem"
|
|
152
|
-
}, mode === 'horizontal' ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
187
|
+
}, mode === 'horizontal' || collapse ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
153
188
|
ref: tooltipRef,
|
|
154
189
|
disabled: disabled,
|
|
155
190
|
className: e(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["title"]))),
|
|
@@ -157,11 +192,12 @@ var SubMenu = function SubMenu(props) {
|
|
|
157
192
|
popperClass: classNames(is('pure'), popperClass),
|
|
158
193
|
popperStyle: themeStyle,
|
|
159
194
|
offset: popperOffset !== null && popperOffset !== void 0 ? popperOffset : props.popperOffset,
|
|
160
|
-
showAfter: level > 1 ? 0 : showTimeout !== null && showTimeout !== void 0 ? showTimeout : props.showTimeout,
|
|
195
|
+
showAfter: level > 1 || mode === 'vertical' ? 0 : showTimeout !== null && showTimeout !== void 0 ? showTimeout : props.showTimeout,
|
|
161
196
|
hideAfter: hideTimeout !== null && hideTimeout !== void 0 ? hideTimeout : props.hideTimeout,
|
|
162
197
|
unmountOnExit: false,
|
|
163
198
|
onMouseEnter: handleMouseEnter,
|
|
164
199
|
onMouseLeave: handleMouseLeave,
|
|
200
|
+
fallbackPlacements: fallbackPlacements,
|
|
165
201
|
content: /*#__PURE__*/React.createElement(MenuContext.Provider, {
|
|
166
202
|
value: _objectSpread({
|
|
167
203
|
activeIndex: activeIndex,
|
|
@@ -169,15 +205,20 @@ var SubMenu = function SubMenu(props) {
|
|
|
169
205
|
mode: mode,
|
|
170
206
|
menuTrigger: menuTrigger,
|
|
171
207
|
handleSubMenuClick: hideSubMenu,
|
|
172
|
-
|
|
208
|
+
addMenuItem: addMenuItem,
|
|
173
209
|
addSubMenu: addSubMenu,
|
|
210
|
+
addItem: addItem,
|
|
211
|
+
removeItem: removeItem,
|
|
174
212
|
showTimeout: showTimeout,
|
|
175
213
|
hideTimeout: hideTimeout,
|
|
176
214
|
themeStyle: themeStyle,
|
|
177
|
-
popperOffset: popperOffset
|
|
215
|
+
popperOffset: popperOffset,
|
|
216
|
+
collapse: collapse,
|
|
217
|
+
onOpen: onOpen,
|
|
218
|
+
onClose: onClose
|
|
178
219
|
}, ohter)
|
|
179
220
|
}, /*#__PURE__*/React.createElement("div", {
|
|
180
|
-
className: classNames(mm(
|
|
221
|
+
className: classNames(mm(mode), mm(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["popup-container"]))))
|
|
181
222
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
182
223
|
className: "el-menu el-menu--popup el-menu--popup-bottom-start",
|
|
183
224
|
style: {
|
|
@@ -185,30 +226,30 @@ var SubMenu = function SubMenu(props) {
|
|
|
185
226
|
}
|
|
186
227
|
}, props.children))),
|
|
187
228
|
showArrow: false,
|
|
188
|
-
placement:
|
|
229
|
+
placement: placement,
|
|
189
230
|
effect: "light"
|
|
190
231
|
}, /*#__PURE__*/React.createElement("div", null, title, /*#__PURE__*/React.createElement(Icon, {
|
|
191
|
-
className: e(
|
|
232
|
+
className: e(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["icon-arrow"]))),
|
|
192
233
|
name: level > 1 ? 'angle-right' : 'angle-down',
|
|
193
234
|
prefix: "fal",
|
|
194
235
|
style: {
|
|
195
236
|
transform: open ? 'rotateZ(180deg)' : 'none'
|
|
196
237
|
}
|
|
197
238
|
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
198
|
-
className: classNames(e(
|
|
239
|
+
className: classNames(e(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["title"]))))
|
|
199
240
|
}, title, /*#__PURE__*/React.createElement(Icon, {
|
|
200
|
-
className: e(
|
|
241
|
+
className: e(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["icon-arrow"]))),
|
|
201
242
|
name: "angle-down",
|
|
202
243
|
prefix: "fal",
|
|
203
244
|
style: {
|
|
204
|
-
transform:
|
|
245
|
+
transform: expand ? 'rotateZ(180deg)' : 'none'
|
|
205
246
|
}
|
|
206
247
|
})), /*#__PURE__*/React.createElement(Transition, {
|
|
207
248
|
name: "el-menu-collapse",
|
|
208
249
|
nodeRef: ulRef,
|
|
209
250
|
disabled: disabled,
|
|
210
251
|
duration: 300,
|
|
211
|
-
visible:
|
|
252
|
+
visible: expand,
|
|
212
253
|
beforeEnter: beforeEnter,
|
|
213
254
|
onEnter: onEnter,
|
|
214
255
|
afterEnter: afterEnter,
|
|
@@ -217,7 +258,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
217
258
|
afterLeave: afterLeave
|
|
218
259
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
219
260
|
ref: ulRef,
|
|
220
|
-
className: classNames(mb(), mm(
|
|
261
|
+
className: classNames(mb(), mm(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["inline"])))),
|
|
221
262
|
style: {
|
|
222
263
|
'--el-menu-level': level
|
|
223
264
|
}
|
|
@@ -229,14 +270,18 @@ var SubMenu = function SubMenu(props) {
|
|
|
229
270
|
menuTrigger: menuTrigger,
|
|
230
271
|
onOpen: onOpen,
|
|
231
272
|
onClose: onClose,
|
|
232
|
-
|
|
273
|
+
addMenuItem: addMenuItem,
|
|
233
274
|
addSubMenu: addSubMenu,
|
|
234
275
|
handleSubMenuClick: hideSubMenu,
|
|
276
|
+
addItem: addItem,
|
|
277
|
+
removeItem: removeItem,
|
|
235
278
|
showTimeout: showTimeout,
|
|
236
279
|
hideTimeout: hideTimeout,
|
|
237
280
|
themeStyle: themeStyle,
|
|
238
|
-
popperOffset: popperOffset
|
|
281
|
+
popperOffset: popperOffset,
|
|
282
|
+
collapse: collapse
|
|
239
283
|
}, ohter)
|
|
240
284
|
}, props.children)))));
|
|
241
285
|
};
|
|
286
|
+
SubMenu.displayName = 'ElSubMenu';
|
|
242
287
|
export default SubMenu;
|
package/dist/Message/Message.js
CHANGED
|
@@ -24,7 +24,7 @@ import Transition from "../Transition/Transition";
|
|
|
24
24
|
import { PopupManager, mergeDefaultProps } from "../Util";
|
|
25
25
|
import { EVENT_CODE, TypeMap } from "../config/Constants";
|
|
26
26
|
import { useClassNames } from "../hooks";
|
|
27
|
-
// import {
|
|
27
|
+
// import { useConfigProvider } from '../ConfigProvider/ConfigProviderContext';
|
|
28
28
|
|
|
29
29
|
var Message = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
30
30
|
var _props2;
|
|
@@ -10,7 +10,7 @@ import classNames from 'classnames';
|
|
|
10
10
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import { ElInput } from '..';
|
|
13
|
-
import { useConfigProvider } from "../ConfigProvider";
|
|
13
|
+
import { useConfigProvider } from "../ConfigProvider/ConfigProviderContext";
|
|
14
14
|
import ElOption from "../Select/Option";
|
|
15
15
|
import Select from "../Select/Select";
|
|
16
16
|
import { useClassNames } from "../hooks";
|
|
@@ -14,7 +14,7 @@ import { useMount } from 'ahooks';
|
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import React, { forwardRef, isValidElement, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
|
-
import { useConfigProvider } from "../ConfigProvider";
|
|
17
|
+
import { useConfigProvider } from "../ConfigProvider/ConfigProviderContext";
|
|
18
18
|
import Icon from "../Icon/Icon";
|
|
19
19
|
import { isNotEmpty, mergeDefaultProps } from "../Util";
|
|
20
20
|
import { useClassNames, useControlled } from "../hooks";
|