@v-c/menu 0.0.1 → 0.0.3
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/Divider.cjs +33 -36
- package/dist/Divider.js +28 -34
- package/dist/Icon.cjs +39 -38
- package/dist/Icon.js +36 -38
- package/dist/Menu.cjs +506 -575
- package/dist/Menu.d.ts +2 -0
- package/dist/Menu.js +495 -570
- package/dist/MenuItem.cjs +314 -344
- package/dist/MenuItem.js +303 -339
- package/dist/MenuItemGroup.cjs +98 -116
- package/dist/MenuItemGroup.js +91 -113
- package/dist/SubMenu/InlineSubMenuList.cjs +58 -82
- package/dist/SubMenu/InlineSubMenuList.js +54 -81
- package/dist/SubMenu/PopupTrigger.cjs +133 -167
- package/dist/SubMenu/PopupTrigger.d.ts +2 -2
- package/dist/SubMenu/PopupTrigger.js +126 -165
- package/dist/SubMenu/SubMenuList.cjs +18 -26
- package/dist/SubMenu/SubMenuList.js +14 -25
- package/dist/SubMenu/index.cjs +479 -526
- package/dist/SubMenu/index.js +469 -521
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/context/IdContext.cjs +15 -23
- package/dist/context/IdContext.js +15 -27
- package/dist/context/MenuContext.cjs +183 -174
- package/dist/context/MenuContext.js +180 -177
- package/dist/context/PathContext.cjs +54 -79
- package/dist/context/PathContext.js +54 -90
- package/dist/context/PrivateContext.cjs +11 -17
- package/dist/context/PrivateContext.js +11 -20
- package/dist/hooks/useAccessibility.cjs +171 -191
- package/dist/hooks/useAccessibility.js +168 -193
- package/dist/hooks/useActive.cjs +25 -28
- package/dist/hooks/useActive.js +23 -28
- package/dist/hooks/useDirectionStyle.cjs +11 -17
- package/dist/hooks/useDirectionStyle.js +9 -17
- package/dist/hooks/useKeyRecords.cjs +70 -88
- package/dist/hooks/useKeyRecords.js +68 -89
- package/dist/hooks/useMemoCallback.cjs +9 -9
- package/dist/hooks/useMemoCallback.js +7 -9
- package/dist/index.cjs +21 -21
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -20
- package/dist/interface.cjs +0 -1
- package/dist/interface.js +0 -1
- package/dist/placements.cjs +70 -70
- package/dist/placements.js +69 -72
- package/dist/utils/commonUtil.cjs +24 -26
- package/dist/utils/commonUtil.js +23 -26
- package/dist/utils/motionUtil.cjs +2 -9
- package/dist/utils/motionUtil.js +3 -10
- package/dist/utils/nodeUtil.cjs +49 -77
- package/dist/utils/nodeUtil.d.ts +4 -1
- package/dist/utils/nodeUtil.js +48 -77
- package/dist/utils/timeUtil.cjs +2 -3
- package/dist/utils/timeUtil.js +3 -4
- package/dist/utils/warnUtil.cjs +8 -14
- package/dist/utils/warnUtil.js +7 -14
- package/package.json +2 -2
package/dist/Menu.js
CHANGED
|
@@ -1,580 +1,505 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { classNames } from "@v-c/util";
|
|
4
|
-
import useId from "@v-c/util/dist/hooks/useId.ts";
|
|
5
|
-
import isEqual from "@v-c/util/dist/isEqual.ts";
|
|
6
|
-
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
1
|
+
import MenuContext_default, { useMenuContextProvider } from "./context/MenuContext.js";
|
|
2
|
+
import { MeasureProvider, PathUserProvider } from "./context/PathContext.js";
|
|
7
3
|
import { useIdContextProvide } from "./context/IdContext.js";
|
|
8
|
-
import InheritableContextProvider, { useMenuContextProvider } from "./context/MenuContext.js";
|
|
9
|
-
import { PathUserProvider, MeasureProvider } from "./context/PathContext.js";
|
|
10
4
|
import { PrivateContextProvider } from "./context/PrivateContext.js";
|
|
11
|
-
import useAccessibility, {
|
|
5
|
+
import useAccessibility, { getFocusableElements, refreshElements } from "./hooks/useAccessibility.js";
|
|
12
6
|
import useKeyRecords, { OVERFLOW_KEY } from "./hooks/useKeyRecords.js";
|
|
13
7
|
import useMemoCallback from "./hooks/useMemoCallback.js";
|
|
14
|
-
import MenuItem from "./MenuItem.js";
|
|
15
|
-
import SubMenu from "./SubMenu/index.js";
|
|
16
|
-
import { parseItems } from "./utils/nodeUtil.js";
|
|
17
8
|
import { warnItemProp } from "./utils/warnUtil.js";
|
|
9
|
+
import MenuItem_default from "./MenuItem.js";
|
|
10
|
+
import SubMenu_default from "./SubMenu/index.js";
|
|
11
|
+
import { parseItems } from "./utils/nodeUtil.js";
|
|
12
|
+
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, nextTick, onMounted, onUnmounted, ref, shallowRef, watch } from "vue";
|
|
13
|
+
import { classNames } from "@v-c/util";
|
|
14
|
+
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
15
|
+
import Overflow from "@v-c/overflow";
|
|
16
|
+
import useId from "@v-c/util/dist/hooks/useId";
|
|
17
|
+
import isEqual from "@v-c/util/dist/isEqual";
|
|
18
18
|
function _isSlot(s) {
|
|
19
|
-
|
|
19
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
var EMPTY_LIST = [];
|
|
22
|
+
var defaults = {
|
|
23
|
+
prefixCls: "vc-menu",
|
|
24
|
+
mode: "vertical",
|
|
25
|
+
subMenuOpenDelay: .1,
|
|
26
|
+
subMenuCloseDelay: .1,
|
|
27
|
+
selectable: true,
|
|
28
|
+
multiple: false,
|
|
29
|
+
inlineIndent: 24,
|
|
30
|
+
triggerSubMenuAction: "hover",
|
|
31
|
+
overflowedIndicator: "..."
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
focus: (options) => {
|
|
275
|
-
const keys = getKeys();
|
|
276
|
-
const {
|
|
277
|
-
elements,
|
|
278
|
-
key2element,
|
|
279
|
-
element2key
|
|
280
|
-
} = refreshElements(keys, uuid);
|
|
281
|
-
const focusableElements = getFocusableElements(containerRef.value, elements);
|
|
282
|
-
let shouldFocusKey;
|
|
283
|
-
if (mergedActiveKey.value && keys.includes(mergedActiveKey.value)) {
|
|
284
|
-
shouldFocusKey = mergedActiveKey.value;
|
|
285
|
-
} else {
|
|
286
|
-
shouldFocusKey = focusableElements[0] ? element2key.get(focusableElements[0]) : childList.value.find((node) => !node.props.disabled)?.key;
|
|
287
|
-
}
|
|
288
|
-
const elementToFocus = key2element.get(shouldFocusKey);
|
|
289
|
-
if (shouldFocusKey && elementToFocus) {
|
|
290
|
-
elementToFocus?.focus?.(options);
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
findItem: ({
|
|
294
|
-
key: itemKey
|
|
295
|
-
}) => {
|
|
296
|
-
const keys = getKeys();
|
|
297
|
-
const {
|
|
298
|
-
key2element
|
|
299
|
-
} = refreshElements(keys, uuid);
|
|
300
|
-
return key2element.get(itemKey) || null;
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
return () => {
|
|
304
|
-
const children = filterEmpty(slots.default?.());
|
|
305
|
-
const parsedChildList = parseItems(children, props?.items, EMPTY_LIST, props?._internalComponents || {}, props?.prefixCls || defaults.prefixCls);
|
|
306
|
-
const shouldUpdate = childList.value.length !== parsedChildList.length || !isEqual(childList.value.map((n) => n?.key), parsedChildList.map((n) => n?.key));
|
|
307
|
-
if (shouldUpdate) {
|
|
308
|
-
childList.value = parsedChildList;
|
|
309
|
-
}
|
|
310
|
-
const measureChildList = parseItems(children, props?.items, EMPTY_LIST, {}, props?.prefixCls || defaults.prefixCls);
|
|
311
|
-
const wrappedChildList = internalMode.value !== "horizontal" || props?.disabledOverflow ? childList.value : childList.value.map((child, index) => (
|
|
312
|
-
// Always wrap provider to avoid sub node re-mount
|
|
313
|
-
createVNode(InheritableContextProvider, {
|
|
314
|
-
"key": child.key,
|
|
315
|
-
"overflowDisabled": index > lastVisibleIndex.value,
|
|
316
|
-
"classNames": props.classNames,
|
|
317
|
-
"styles": props.styles
|
|
318
|
-
}, _isSlot(child) ? child : {
|
|
319
|
-
default: () => [child]
|
|
320
|
-
})
|
|
321
|
-
));
|
|
322
|
-
const container = createVNode(Overflow, mergeProps({
|
|
323
|
-
"ref": containerRef,
|
|
324
|
-
"prefixCls": `${props.prefixCls || defaults.prefixCls}-overflow`,
|
|
325
|
-
"component": "ul",
|
|
326
|
-
"itemComponent": MenuItem,
|
|
327
|
-
"class": classNames(props.prefixCls || defaults.prefixCls, `${props.prefixCls || defaults.prefixCls}-root`, `${props.prefixCls || defaults.prefixCls}-${internalMode.value}`, _attrs.class || "", {
|
|
328
|
-
[`${props.prefixCls || defaults.prefixCls}-inline-collapsed`]: internalInlineCollapsed.value,
|
|
329
|
-
[`${props.prefixCls || defaults.prefixCls}-rtl`]: isRtl.value
|
|
330
|
-
}, props.rootClassName),
|
|
331
|
-
"style": _attrs.style,
|
|
332
|
-
"data": wrappedChildList,
|
|
333
|
-
"renderRawItem": (node) => {
|
|
334
|
-
return node;
|
|
335
|
-
},
|
|
336
|
-
"renderRawRest": (omitItems) => {
|
|
337
|
-
const len = omitItems.length;
|
|
338
|
-
const originOmitItems = len ? childList.value.slice(-len) : null;
|
|
339
|
-
return createVNode(SubMenu, {
|
|
340
|
-
"eventKey": OVERFLOW_KEY,
|
|
341
|
-
"title": mergedOverflowIndicator.value,
|
|
342
|
-
"disabled": allVisible.value,
|
|
343
|
-
"internalPopupClose": len === 0,
|
|
344
|
-
"popupClassName": props.overflowedIndicatorPopupClassName
|
|
345
|
-
}, _isSlot(originOmitItems) ? originOmitItems : {
|
|
346
|
-
default: () => [originOmitItems]
|
|
347
|
-
});
|
|
348
|
-
},
|
|
349
|
-
"maxCount": internalMode.value !== "horizontal" || props?.disabledOverflow ? Overflow.INVALIDATE : Overflow.RESPONSIVE,
|
|
350
|
-
"ssr": "full",
|
|
351
|
-
"data-menu-list": true,
|
|
352
|
-
"onVisibleChange": (newLastIndex) => {
|
|
353
|
-
lastVisibleIndex.value = newLastIndex;
|
|
354
|
-
}
|
|
355
|
-
}, {
|
|
356
|
-
onKeydown: onInternalKeyDown
|
|
357
|
-
}), null);
|
|
358
|
-
return createVNode(PrivateContextProvider, privateContext.value, {
|
|
359
|
-
default: () => [createVNode(PathUserProvider, pathUserContext.value, _isSlot(container) ? container : {
|
|
360
|
-
default: () => [container]
|
|
361
|
-
}), createVNode("div", {
|
|
362
|
-
"style": {
|
|
363
|
-
display: "none"
|
|
364
|
-
},
|
|
365
|
-
"aria-hidden": true
|
|
366
|
-
}, [createVNode(MeasureProvider, registerPathContext.value, _isSlot(measureChildList) ? measureChildList : {
|
|
367
|
-
default: () => [measureChildList]
|
|
368
|
-
})])]
|
|
369
|
-
});
|
|
370
|
-
};
|
|
33
|
+
var Menu_default = /* @__PURE__ */ defineComponent((props, { slots, expose, attrs: _attrs }) => {
|
|
34
|
+
const containerRef = shallowRef();
|
|
35
|
+
const uuid = useId(props?.id ? `rc-menu-uuid-${props.id}` : "rc-menu-uuid");
|
|
36
|
+
const isRtl = computed(() => props?.direction === "rtl");
|
|
37
|
+
const childList = shallowRef([]);
|
|
38
|
+
const mergedOverflowIndicator = computed(() => props.overflowedIndicator ?? defaults.overflowedIndicator);
|
|
39
|
+
const overflowIndicatorVersion = ref(0);
|
|
40
|
+
watch(mergedOverflowIndicator, () => {
|
|
41
|
+
overflowIndicatorVersion.value += 1;
|
|
42
|
+
}, { immediate: true });
|
|
43
|
+
useIdContextProvide(computed(() => uuid));
|
|
44
|
+
const innerOpenKeys = ref(props?.openKeys ?? props?.defaultOpenKeys);
|
|
45
|
+
watch(() => props.openKeys, () => {
|
|
46
|
+
innerOpenKeys.value = props?.openKeys;
|
|
47
|
+
});
|
|
48
|
+
const mergedOpenKeys = computed({
|
|
49
|
+
get() {
|
|
50
|
+
if (props.openKeys) return props.openKeys;
|
|
51
|
+
return innerOpenKeys.value ?? EMPTY_LIST;
|
|
52
|
+
},
|
|
53
|
+
set(value) {
|
|
54
|
+
innerOpenKeys.value = value;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const triggerOpenKeys = (keys, forceFlush = false) => {
|
|
58
|
+
function doUpdate() {
|
|
59
|
+
mergedOpenKeys.value = keys;
|
|
60
|
+
props?.onOpenChange?.(keys);
|
|
61
|
+
}
|
|
62
|
+
if (forceFlush) nextTick(doUpdate);
|
|
63
|
+
else doUpdate();
|
|
64
|
+
};
|
|
65
|
+
const inlineCacheOpenKeys = shallowRef(mergedOpenKeys.value);
|
|
66
|
+
const mountRef = shallowRef(false);
|
|
67
|
+
const modeMerged = computed(() => {
|
|
68
|
+
const { mode, inlineCollapsed } = props;
|
|
69
|
+
if ((mode === "inline" || mode === "vertical") && inlineCollapsed) return ["vertical", inlineCollapsed];
|
|
70
|
+
return [mode, false];
|
|
71
|
+
});
|
|
72
|
+
const mergedMode = computed(() => modeMerged.value[0]);
|
|
73
|
+
const mergedInlineCollapsed = computed(() => modeMerged.value[1]);
|
|
74
|
+
const isInlineMode = computed(() => mergedMode.value === "inline");
|
|
75
|
+
const internalMode = shallowRef(mergedMode.value);
|
|
76
|
+
const internalInlineCollapsed = shallowRef(mergedInlineCollapsed.value);
|
|
77
|
+
watch([mergedMode, mergedInlineCollapsed], () => {
|
|
78
|
+
internalMode.value = mergedMode.value;
|
|
79
|
+
internalInlineCollapsed.value = mergedInlineCollapsed.value;
|
|
80
|
+
if (!mountRef.value) return;
|
|
81
|
+
if (isInlineMode.value) mergedOpenKeys.value = inlineCacheOpenKeys.value;
|
|
82
|
+
else triggerOpenKeys(EMPTY_LIST);
|
|
83
|
+
});
|
|
84
|
+
const lastVisibleIndex = shallowRef(0);
|
|
85
|
+
watch(mergedOpenKeys, () => {
|
|
86
|
+
if (isInlineMode.value) inlineCacheOpenKeys.value = mergedOpenKeys.value;
|
|
87
|
+
});
|
|
88
|
+
onMounted(() => {
|
|
89
|
+
mountRef.value = true;
|
|
90
|
+
});
|
|
91
|
+
onUnmounted(() => {
|
|
92
|
+
mountRef.value = false;
|
|
93
|
+
});
|
|
94
|
+
const { registerPath, unregisterPath, refreshOverflowKeys, isSubPathKey, getKeyPath, getKeys, getSubPathKeys } = useKeyRecords();
|
|
95
|
+
const registerPathContext = computed(() => ({
|
|
96
|
+
registerPath,
|
|
97
|
+
unregisterPath
|
|
98
|
+
}));
|
|
99
|
+
const pathUserContext = computed(() => ({ isSubPathKey }));
|
|
100
|
+
const mergedActiveKey = shallowRef(props?.activeKey);
|
|
101
|
+
watch(() => props.activeKey, () => {
|
|
102
|
+
mergedActiveKey.value = props?.activeKey;
|
|
103
|
+
});
|
|
104
|
+
const onActive = useMemoCallback((key) => {
|
|
105
|
+
mergedActiveKey.value = key;
|
|
106
|
+
});
|
|
107
|
+
const onInactive = useMemoCallback(() => {
|
|
108
|
+
mergedActiveKey.value = void 0;
|
|
109
|
+
});
|
|
110
|
+
const innerSelectKeys = ref(props?.selectedKeys ?? props?.defaultSelectedKeys ?? EMPTY_LIST);
|
|
111
|
+
watch(() => props.selectedKeys, () => {
|
|
112
|
+
if (props.selectedKeys) innerSelectKeys.value = props.selectedKeys;
|
|
113
|
+
});
|
|
114
|
+
const mergedSelectKeys = computed(() => {
|
|
115
|
+
const keys = innerSelectKeys.value;
|
|
116
|
+
if (Array.isArray(keys)) return keys;
|
|
117
|
+
if (keys === null || keys === void 0) return EMPTY_LIST;
|
|
118
|
+
return [keys];
|
|
119
|
+
});
|
|
120
|
+
const triggerSelection = (info) => {
|
|
121
|
+
if (props.selectable) {
|
|
122
|
+
const { key: targetKey } = info;
|
|
123
|
+
const exist = mergedSelectKeys.value.includes(targetKey);
|
|
124
|
+
let newSelectKeys;
|
|
125
|
+
if (props.multiple) if (exist) newSelectKeys = mergedSelectKeys.value.filter((key) => key !== targetKey);
|
|
126
|
+
else newSelectKeys = [...mergedSelectKeys.value, targetKey];
|
|
127
|
+
else newSelectKeys = [targetKey];
|
|
128
|
+
innerSelectKeys.value = newSelectKeys;
|
|
129
|
+
const selectInfo = {
|
|
130
|
+
...info,
|
|
131
|
+
selectedKeys: newSelectKeys
|
|
132
|
+
};
|
|
133
|
+
if (exist) props.onDeselect?.(selectInfo);
|
|
134
|
+
else props.onSelect?.(selectInfo);
|
|
135
|
+
}
|
|
136
|
+
if (!props.multiple && mergedOpenKeys.value.length && internalMode.value !== "inline") triggerOpenKeys(EMPTY_LIST);
|
|
137
|
+
};
|
|
138
|
+
const onInternalClick = useMemoCallback((info) => {
|
|
139
|
+
props.onClick?.(warnItemProp(info));
|
|
140
|
+
triggerSelection(info);
|
|
141
|
+
});
|
|
142
|
+
const onInternalOpenChange = useMemoCallback((key, open) => {
|
|
143
|
+
let newOpenKeys = mergedOpenKeys.value.filter((k) => k !== key);
|
|
144
|
+
if (open) newOpenKeys.push(key);
|
|
145
|
+
else if (internalMode.value !== "inline") {
|
|
146
|
+
const subPathKeys = getSubPathKeys(key);
|
|
147
|
+
newOpenKeys = newOpenKeys.filter((k) => !subPathKeys.has(k));
|
|
148
|
+
}
|
|
149
|
+
if (!isEqual(mergedOpenKeys.value, newOpenKeys, true)) triggerOpenKeys(newOpenKeys, true);
|
|
150
|
+
});
|
|
151
|
+
const triggerAccessibilityOpen = (key, open) => {
|
|
152
|
+
onInternalOpenChange(key, open ?? !mergedOpenKeys.value.includes(key));
|
|
153
|
+
};
|
|
154
|
+
const setMergedActiveKey = (key) => {
|
|
155
|
+
mergedActiveKey.value = key;
|
|
156
|
+
};
|
|
157
|
+
const onInternalKeyDown = useAccessibility(internalMode, mergedActiveKey, isRtl, uuid, containerRef, getKeys, getKeyPath, setMergedActiveKey, triggerAccessibilityOpen, (...args) => {
|
|
158
|
+
_attrs?.onKeydown?.(...args);
|
|
159
|
+
});
|
|
160
|
+
watch(() => [
|
|
161
|
+
props.activeKey,
|
|
162
|
+
() => props.defaultActiveFirst,
|
|
163
|
+
childList.value
|
|
164
|
+
], () => {
|
|
165
|
+
if (props.activeKey !== void 0) mergedActiveKey.value = props.activeKey;
|
|
166
|
+
else if (props.defaultActiveFirst && childList.value[0]) mergedActiveKey.value = childList.value[0]?.key;
|
|
167
|
+
}, { immediate: true });
|
|
168
|
+
const allVisible = computed(() => lastVisibleIndex.value >= childList.value.length - 1 || internalMode.value !== "horizontal" || props?.disabledOverflow);
|
|
169
|
+
watch(allVisible, () => {
|
|
170
|
+
refreshOverflowKeys(allVisible.value ? EMPTY_LIST : childList.value.slice(lastVisibleIndex.value + 1).map((child) => child.key));
|
|
171
|
+
});
|
|
172
|
+
const privateContext = computed(() => ({
|
|
173
|
+
_internalRenderMenuItem: props._internalRenderMenuItem,
|
|
174
|
+
_internalRenderSubMenuItem: props._internalRenderSubMenuItem
|
|
175
|
+
}));
|
|
176
|
+
useMenuContextProvider(computed(() => {
|
|
177
|
+
return {
|
|
178
|
+
prefixCls: props.prefixCls || defaults.prefixCls,
|
|
179
|
+
rootClassName: props.rootClassName,
|
|
180
|
+
classNames: props.classNames,
|
|
181
|
+
styles: props.styles,
|
|
182
|
+
mode: internalMode.value,
|
|
183
|
+
openKeys: mergedOpenKeys.value,
|
|
184
|
+
rtl: isRtl.value,
|
|
185
|
+
disabled: props.disabled,
|
|
186
|
+
motion: props.motion,
|
|
187
|
+
defaultMotions: props.defaultMotions,
|
|
188
|
+
activeKey: mergedActiveKey.value,
|
|
189
|
+
onActive,
|
|
190
|
+
onInactive,
|
|
191
|
+
selectedKeys: mergedSelectKeys.value,
|
|
192
|
+
inlineIndent: props.inlineIndent || defaults.inlineIndent,
|
|
193
|
+
subMenuOpenDelay: props.subMenuOpenDelay || defaults.subMenuOpenDelay,
|
|
194
|
+
subMenuCloseDelay: props.subMenuCloseDelay || defaults.subMenuCloseDelay,
|
|
195
|
+
forceSubMenuRender: props.forceSubMenuRender,
|
|
196
|
+
builtinPlacements: props.builtinPlacements,
|
|
197
|
+
triggerSubMenuAction: props.triggerSubMenuAction || defaults.triggerSubMenuAction,
|
|
198
|
+
getPopupContainer: props.getPopupContainer,
|
|
199
|
+
itemIcon: props.itemIcon,
|
|
200
|
+
expandIcon: props.expandIcon,
|
|
201
|
+
onItemClick: onInternalClick,
|
|
202
|
+
onOpenChange: onInternalOpenChange,
|
|
203
|
+
popupRender: props.popupRender
|
|
204
|
+
};
|
|
205
|
+
}));
|
|
206
|
+
expose({
|
|
207
|
+
list: containerRef,
|
|
208
|
+
focus: (options) => {
|
|
209
|
+
const keys = getKeys();
|
|
210
|
+
const { elements, key2element, element2key } = refreshElements(keys, uuid);
|
|
211
|
+
const focusableElements = getFocusableElements(containerRef.value, elements);
|
|
212
|
+
let shouldFocusKey;
|
|
213
|
+
if (mergedActiveKey.value && keys.includes(mergedActiveKey.value)) shouldFocusKey = mergedActiveKey.value;
|
|
214
|
+
else shouldFocusKey = focusableElements[0] ? element2key.get(focusableElements[0]) : childList.value.find((node) => !node.props.disabled)?.key;
|
|
215
|
+
const elementToFocus = key2element.get(shouldFocusKey);
|
|
216
|
+
if (shouldFocusKey && elementToFocus) elementToFocus?.focus?.(options);
|
|
217
|
+
},
|
|
218
|
+
findItem: ({ key: itemKey }) => {
|
|
219
|
+
const { key2element } = refreshElements(getKeys(), uuid);
|
|
220
|
+
return key2element.get(itemKey) || null;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
return () => {
|
|
224
|
+
const children = filterEmpty(slots.default?.());
|
|
225
|
+
const parsedChildList = parseItems(children, props?.items, EMPTY_LIST, props?._internalComponents || {}, props?.prefixCls || defaults.prefixCls, {
|
|
226
|
+
labelRender: props?.labelRender,
|
|
227
|
+
extraRender: props?.extraRender
|
|
228
|
+
});
|
|
229
|
+
if (childList.value.length !== parsedChildList.length || !isEqual(childList.value.map((n) => n?.key), parsedChildList.map((n) => n?.key))) childList.value = parsedChildList;
|
|
230
|
+
const measureChildList = parseItems(children, props?.items, EMPTY_LIST, {}, props?.prefixCls || defaults.prefixCls);
|
|
231
|
+
const wrappedChildList = internalMode.value !== "horizontal" || props?.disabledOverflow ? childList.value : childList.value.map((child, index) => createVNode(MenuContext_default, {
|
|
232
|
+
"key": child.key,
|
|
233
|
+
"overflowDisabled": index > lastVisibleIndex.value,
|
|
234
|
+
"classNames": props.classNames,
|
|
235
|
+
"styles": props.styles
|
|
236
|
+
}, _isSlot(child) ? child : { default: () => [child] }));
|
|
237
|
+
const container = createVNode(Overflow, mergeProps({
|
|
238
|
+
"ref": containerRef,
|
|
239
|
+
"prefixCls": `${props.prefixCls || defaults.prefixCls}-overflow`,
|
|
240
|
+
"component": "ul",
|
|
241
|
+
"itemComponent": MenuItem_default,
|
|
242
|
+
"class": classNames(props.prefixCls || defaults.prefixCls, `${props.prefixCls || defaults.prefixCls}-root`, `${props.prefixCls || defaults.prefixCls}-${internalMode.value}`, _attrs.class || "", {
|
|
243
|
+
[`${props.prefixCls || defaults.prefixCls}-inline-collapsed`]: internalInlineCollapsed.value,
|
|
244
|
+
[`${props.prefixCls || defaults.prefixCls}-rtl`]: isRtl.value
|
|
245
|
+
}, props.rootClassName),
|
|
246
|
+
"style": _attrs.style,
|
|
247
|
+
"data": wrappedChildList,
|
|
248
|
+
"renderRawItem": (node) => {
|
|
249
|
+
return node;
|
|
250
|
+
},
|
|
251
|
+
"renderRawRest": (omitItems) => {
|
|
252
|
+
const len = omitItems.length;
|
|
253
|
+
const originOmitItems = len ? childList.value.slice(-len) : null;
|
|
254
|
+
return createVNode(SubMenu_default, {
|
|
255
|
+
"eventKey": OVERFLOW_KEY,
|
|
256
|
+
"title": mergedOverflowIndicator.value,
|
|
257
|
+
"disabled": allVisible.value,
|
|
258
|
+
"internalPopupClose": len === 0,
|
|
259
|
+
"popupClassName": props.overflowedIndicatorPopupClassName
|
|
260
|
+
}, _isSlot(originOmitItems) ? originOmitItems : { default: () => [originOmitItems] });
|
|
261
|
+
},
|
|
262
|
+
"maxCount": internalMode.value !== "horizontal" || props?.disabledOverflow ? Overflow.INVALIDATE : Overflow.RESPONSIVE,
|
|
263
|
+
"ssr": "full",
|
|
264
|
+
"data-menu-list": true,
|
|
265
|
+
"onVisibleChange": (newLastIndex) => {
|
|
266
|
+
lastVisibleIndex.value = newLastIndex;
|
|
267
|
+
}
|
|
268
|
+
}, { onKeydown: onInternalKeyDown }), null);
|
|
269
|
+
return createVNode(PrivateContextProvider, privateContext.value, { default: () => [createVNode(PathUserProvider, pathUserContext.value, _isSlot(container) ? container : { default: () => [container] }), createVNode("div", {
|
|
270
|
+
"style": { display: "none" },
|
|
271
|
+
"aria-hidden": true
|
|
272
|
+
}, [createVNode(MeasureProvider, registerPathContext.value, _isSlot(measureChildList) ? measureChildList : { default: () => [measureChildList] })])] });
|
|
273
|
+
};
|
|
371
274
|
}, {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
275
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
276
|
+
prefixCls: {
|
|
277
|
+
type: String,
|
|
278
|
+
required: false,
|
|
279
|
+
default: void 0
|
|
280
|
+
},
|
|
281
|
+
rootClassName: {
|
|
282
|
+
type: String,
|
|
283
|
+
required: false,
|
|
284
|
+
default: void 0
|
|
285
|
+
},
|
|
286
|
+
classNames: {
|
|
287
|
+
type: Object,
|
|
288
|
+
required: false,
|
|
289
|
+
default: void 0
|
|
290
|
+
},
|
|
291
|
+
styles: {
|
|
292
|
+
type: Object,
|
|
293
|
+
required: false,
|
|
294
|
+
default: void 0
|
|
295
|
+
},
|
|
296
|
+
items: {
|
|
297
|
+
type: Array,
|
|
298
|
+
required: false,
|
|
299
|
+
default: void 0
|
|
300
|
+
},
|
|
301
|
+
disabled: {
|
|
302
|
+
type: Boolean,
|
|
303
|
+
required: false,
|
|
304
|
+
default: void 0
|
|
305
|
+
},
|
|
306
|
+
disabledOverflow: {
|
|
307
|
+
type: Boolean,
|
|
308
|
+
required: false,
|
|
309
|
+
default: void 0
|
|
310
|
+
},
|
|
311
|
+
direction: {
|
|
312
|
+
type: String,
|
|
313
|
+
required: false,
|
|
314
|
+
default: void 0
|
|
315
|
+
},
|
|
316
|
+
mode: {
|
|
317
|
+
type: String,
|
|
318
|
+
required: false,
|
|
319
|
+
default: void 0
|
|
320
|
+
},
|
|
321
|
+
inlineCollapsed: {
|
|
322
|
+
type: Boolean,
|
|
323
|
+
required: false,
|
|
324
|
+
default: void 0
|
|
325
|
+
},
|
|
326
|
+
defaultOpenKeys: {
|
|
327
|
+
type: Array,
|
|
328
|
+
required: false,
|
|
329
|
+
default: void 0
|
|
330
|
+
},
|
|
331
|
+
openKeys: {
|
|
332
|
+
type: Array,
|
|
333
|
+
required: false,
|
|
334
|
+
default: void 0
|
|
335
|
+
},
|
|
336
|
+
activeKey: {
|
|
337
|
+
type: String,
|
|
338
|
+
required: false,
|
|
339
|
+
default: void 0
|
|
340
|
+
},
|
|
341
|
+
defaultActiveFirst: {
|
|
342
|
+
type: Boolean,
|
|
343
|
+
required: false,
|
|
344
|
+
default: void 0
|
|
345
|
+
},
|
|
346
|
+
selectable: {
|
|
347
|
+
type: Boolean,
|
|
348
|
+
required: false,
|
|
349
|
+
default: void 0
|
|
350
|
+
},
|
|
351
|
+
multiple: {
|
|
352
|
+
type: Boolean,
|
|
353
|
+
required: false,
|
|
354
|
+
default: void 0
|
|
355
|
+
},
|
|
356
|
+
defaultSelectedKeys: {
|
|
357
|
+
type: Array,
|
|
358
|
+
required: false,
|
|
359
|
+
default: void 0
|
|
360
|
+
},
|
|
361
|
+
selectedKeys: {
|
|
362
|
+
type: Array,
|
|
363
|
+
required: false,
|
|
364
|
+
default: void 0
|
|
365
|
+
},
|
|
366
|
+
onSelect: {
|
|
367
|
+
type: Function,
|
|
368
|
+
required: false,
|
|
369
|
+
default: void 0
|
|
370
|
+
},
|
|
371
|
+
onDeselect: {
|
|
372
|
+
type: Function,
|
|
373
|
+
required: false,
|
|
374
|
+
default: void 0
|
|
375
|
+
},
|
|
376
|
+
inlineIndent: {
|
|
377
|
+
type: Number,
|
|
378
|
+
required: false,
|
|
379
|
+
default: void 0
|
|
380
|
+
},
|
|
381
|
+
motion: {
|
|
382
|
+
type: Object,
|
|
383
|
+
required: false,
|
|
384
|
+
default: void 0
|
|
385
|
+
},
|
|
386
|
+
defaultMotions: {
|
|
387
|
+
type: Object,
|
|
388
|
+
required: false,
|
|
389
|
+
default: void 0
|
|
390
|
+
},
|
|
391
|
+
subMenuOpenDelay: {
|
|
392
|
+
type: Number,
|
|
393
|
+
required: false,
|
|
394
|
+
default: void 0
|
|
395
|
+
},
|
|
396
|
+
subMenuCloseDelay: {
|
|
397
|
+
type: Number,
|
|
398
|
+
required: false,
|
|
399
|
+
default: void 0
|
|
400
|
+
},
|
|
401
|
+
forceSubMenuRender: {
|
|
402
|
+
type: Boolean,
|
|
403
|
+
required: false,
|
|
404
|
+
default: void 0
|
|
405
|
+
},
|
|
406
|
+
triggerSubMenuAction: {
|
|
407
|
+
type: String,
|
|
408
|
+
required: false,
|
|
409
|
+
default: void 0
|
|
410
|
+
},
|
|
411
|
+
builtinPlacements: {
|
|
412
|
+
type: Object,
|
|
413
|
+
required: false,
|
|
414
|
+
default: void 0
|
|
415
|
+
},
|
|
416
|
+
itemIcon: {
|
|
417
|
+
type: [
|
|
418
|
+
String,
|
|
419
|
+
Number,
|
|
420
|
+
null,
|
|
421
|
+
Array,
|
|
422
|
+
Function,
|
|
423
|
+
Boolean
|
|
424
|
+
],
|
|
425
|
+
required: false,
|
|
426
|
+
skipCheck: true,
|
|
427
|
+
default: void 0
|
|
428
|
+
},
|
|
429
|
+
expandIcon: {
|
|
430
|
+
type: [
|
|
431
|
+
String,
|
|
432
|
+
Number,
|
|
433
|
+
null,
|
|
434
|
+
Array,
|
|
435
|
+
Function,
|
|
436
|
+
Boolean
|
|
437
|
+
],
|
|
438
|
+
required: false,
|
|
439
|
+
skipCheck: true,
|
|
440
|
+
default: void 0
|
|
441
|
+
},
|
|
442
|
+
overflowedIndicator: {
|
|
443
|
+
type: null,
|
|
444
|
+
required: false,
|
|
445
|
+
default: void 0
|
|
446
|
+
},
|
|
447
|
+
overflowedIndicatorPopupClassName: {
|
|
448
|
+
type: String,
|
|
449
|
+
required: false,
|
|
450
|
+
default: void 0
|
|
451
|
+
},
|
|
452
|
+
getPopupContainer: {
|
|
453
|
+
type: Function,
|
|
454
|
+
required: false,
|
|
455
|
+
default: void 0
|
|
456
|
+
},
|
|
457
|
+
onClick: {
|
|
458
|
+
type: Function,
|
|
459
|
+
required: false,
|
|
460
|
+
default: void 0
|
|
461
|
+
},
|
|
462
|
+
onOpenChange: {
|
|
463
|
+
type: Function,
|
|
464
|
+
required: false,
|
|
465
|
+
default: void 0
|
|
466
|
+
},
|
|
467
|
+
_internalRenderMenuItem: {
|
|
468
|
+
type: Function,
|
|
469
|
+
required: false,
|
|
470
|
+
default: void 0
|
|
471
|
+
},
|
|
472
|
+
_internalRenderSubMenuItem: {
|
|
473
|
+
type: Function,
|
|
474
|
+
required: false,
|
|
475
|
+
default: void 0
|
|
476
|
+
},
|
|
477
|
+
_internalComponents: {
|
|
478
|
+
type: Object,
|
|
479
|
+
required: false,
|
|
480
|
+
default: void 0
|
|
481
|
+
},
|
|
482
|
+
popupRender: {
|
|
483
|
+
type: Function,
|
|
484
|
+
required: false,
|
|
485
|
+
default: void 0
|
|
486
|
+
},
|
|
487
|
+
id: {
|
|
488
|
+
type: String,
|
|
489
|
+
required: false,
|
|
490
|
+
default: void 0
|
|
491
|
+
},
|
|
492
|
+
labelRender: {
|
|
493
|
+
type: Function,
|
|
494
|
+
required: false,
|
|
495
|
+
default: void 0
|
|
496
|
+
},
|
|
497
|
+
extraRender: {
|
|
498
|
+
type: Function,
|
|
499
|
+
required: false,
|
|
500
|
+
default: void 0
|
|
501
|
+
}
|
|
502
|
+
}, defaults),
|
|
503
|
+
name: "VcMenu"
|
|
577
504
|
});
|
|
578
|
-
export {
|
|
579
|
-
Menu as default
|
|
580
|
-
};
|
|
505
|
+
export { Menu_default as default };
|