@primer/react 0.0.0-20260403172558 → 0.0.0-20260403172816
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/CHANGELOG.md +1 -3
- package/dist/ActionBar/ActionBar-a41224b2.css +2 -0
- package/dist/ActionBar/ActionBar-a41224b2.css.map +1 -0
- package/dist/ActionBar/ActionBar.d.ts +1 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +367 -312
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/List.js +41 -41
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +3 -13
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +23 -23
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +5 -5
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +5 -7
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +8 -8
- package/dist/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/PageHeader/PageHeader.js +30 -31
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +5 -6
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +4 -4
- package/dist/experimental/Tabs/Tabs.d.ts +1 -1
- package/dist/experimental/Tabs/Tabs.d.ts.map +1 -1
- package/dist/experimental/Tabs/Tabs.js +16 -16
- package/dist/hooks/useMergedRefs.d.ts +1 -1
- package/dist/hooks/useMergedRefs.d.ts.map +1 -1
- package/dist/hooks/useMergedRefs.js +7 -1
- package/dist/hooks/useProvidedRefOrCreate.d.ts +7 -10
- package/dist/hooks/useProvidedRefOrCreate.d.ts.map +1 -1
- package/dist/hooks/useProvidedRefOrCreate.js +10 -10
- package/package.json +1 -1
- package/dist/ActionBar/ActionBar-94abaa40.css +0 -2
- package/dist/ActionBar/ActionBar-94abaa40.css.map +0 -1
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import React, { useRef,
|
|
2
|
+
import React, { useRef, useState, forwardRef, useMemo, useCallback } from 'react';
|
|
3
3
|
import { KebabHorizontalIcon } from '@primer/octicons-react';
|
|
4
4
|
import { ActionList } from '../ActionList/index.js';
|
|
5
|
+
import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
|
|
6
|
+
import { useResizeObserver } from '../hooks/useResizeObserver.js';
|
|
5
7
|
import { IconButton } from '../Button/IconButton.js';
|
|
6
8
|
import { useFocusZone } from '../hooks/useFocusZone.js';
|
|
7
9
|
import styles from './ActionBar.module.css.js';
|
|
8
10
|
import { clsx } from 'clsx';
|
|
9
11
|
import { createDescendantRegistry } from '../utils/descendant-registry.js';
|
|
10
|
-
import {
|
|
12
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
13
|
import { useMergedRefs } from '../hooks/useMergedRefs.js';
|
|
12
14
|
import { FocusKeys } from '@primer/behaviors';
|
|
13
15
|
import { ActionMenu } from '../ActionMenu/ActionMenu.js';
|
|
14
16
|
|
|
17
|
+
const ACTIONBAR_ITEM_GAP = 8;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Registry of descendants to render in the list or menu. To preserve insertion order across updates, children are
|
|
21
|
+
* set to `null` when unregistered rather than fully dropped from the map.
|
|
22
|
+
*/
|
|
23
|
+
|
|
15
24
|
const ActionBarContext = /*#__PURE__*/React.createContext({
|
|
16
25
|
size: 'medium',
|
|
26
|
+
isVisibleChild: () => true,
|
|
17
27
|
groupId: undefined
|
|
18
28
|
});
|
|
19
29
|
|
|
@@ -21,7 +31,23 @@ const ActionBarContext = /*#__PURE__*/React.createContext({
|
|
|
21
31
|
small (28px), medium (32px), large (40px)
|
|
22
32
|
*/
|
|
23
33
|
|
|
34
|
+
const MORE_BTN_WIDTH = 32;
|
|
24
35
|
const ActionBarItemsRegistry = createDescendantRegistry();
|
|
36
|
+
const calculatePossibleItems = (registryEntries, navWidth, gap, moreMenuWidth = 0) => {
|
|
37
|
+
const widthToFit = navWidth - moreMenuWidth;
|
|
38
|
+
let breakpoint = registryEntries.length; // assume all items will fit
|
|
39
|
+
let sumsOfChildWidth = 0;
|
|
40
|
+
for (const [index, [, child]] of registryEntries.entries()) {
|
|
41
|
+
sumsOfChildWidth += index > 0 ? child.width + gap : child.width;
|
|
42
|
+
if (sumsOfChildWidth > widthToFit) {
|
|
43
|
+
breakpoint = index;
|
|
44
|
+
break;
|
|
45
|
+
} else {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return breakpoint;
|
|
50
|
+
};
|
|
25
51
|
const renderMenuItem = (item, index) => {
|
|
26
52
|
if (item.type === 'divider') {
|
|
27
53
|
return /*#__PURE__*/jsx(ActionList.Divider, {}, index);
|
|
@@ -70,8 +96,44 @@ const renderMenuItem = (item, index) => {
|
|
|
70
96
|
}, label);
|
|
71
97
|
};
|
|
72
98
|
renderMenuItem.displayName = "renderMenuItem";
|
|
99
|
+
const getMenuItems = (navWidth, moreMenuWidth, childRegistry, hasActiveMenu, gap) => {
|
|
100
|
+
var _childRegistry$entrie;
|
|
101
|
+
const registryEntries = Array.from((_childRegistry$entrie = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.entries()) !== null && _childRegistry$entrie !== void 0 ? _childRegistry$entrie : []).filter(entry => entry[1] !== null && (entry[1].type !== 'action' || entry[1].groupId === undefined));
|
|
102
|
+
if (registryEntries.length === 0) return new Set();
|
|
103
|
+
const numberOfItemsPossible = calculatePossibleItems(registryEntries, navWidth, gap);
|
|
104
|
+
const numberOfItemsPossibleWithMoreMenu = calculatePossibleItems(registryEntries, navWidth, gap, moreMenuWidth || MORE_BTN_WIDTH);
|
|
105
|
+
const menuItems = new Set();
|
|
106
|
+
|
|
107
|
+
// First, we check if we can fit all the items with their icons
|
|
108
|
+
if (registryEntries.length >= numberOfItemsPossible) {
|
|
109
|
+
/* Below is an accessibility requirement. Never show only one item in the overflow menu.
|
|
110
|
+
* If there is only one item left to display in the overflow menu according to the calculation,
|
|
111
|
+
* we need to pull another item from the list into the overflow menu.
|
|
112
|
+
*/
|
|
113
|
+
const numberOfItemsInMenu = registryEntries.length - numberOfItemsPossibleWithMoreMenu;
|
|
114
|
+
const numberOfListItems = numberOfItemsInMenu === 1 ? numberOfItemsPossibleWithMoreMenu - 1 : numberOfItemsPossibleWithMoreMenu;
|
|
115
|
+
for (const [index, [id, child]] of registryEntries.entries()) {
|
|
116
|
+
if (index < numberOfListItems) {
|
|
117
|
+
continue;
|
|
118
|
+
//if the last item is a divider
|
|
119
|
+
} else if (child.type === 'divider') {
|
|
120
|
+
if (index === numberOfListItems - 1 || index === numberOfListItems) {
|
|
121
|
+
continue;
|
|
122
|
+
} else {
|
|
123
|
+
menuItems.add(id);
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
menuItems.add(id);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return menuItems;
|
|
130
|
+
} else if (numberOfItemsPossible > registryEntries.length && hasActiveMenu) {
|
|
131
|
+
/* If the items fit in the list and there are items in the overflow menu, we need to move them back to the list */
|
|
132
|
+
return new Set();
|
|
133
|
+
}
|
|
134
|
+
};
|
|
73
135
|
const ActionBar = props => {
|
|
74
|
-
const $ = c(
|
|
136
|
+
const $ = c(38);
|
|
75
137
|
const {
|
|
76
138
|
size: t0,
|
|
77
139
|
children,
|
|
@@ -85,273 +147,276 @@ const ActionBar = props => {
|
|
|
85
147
|
const flush = t1 === undefined ? false : t1;
|
|
86
148
|
const gap = t2 === undefined ? "condensed" : t2;
|
|
87
149
|
const listRef = useRef(null);
|
|
150
|
+
const [computedGap, setComputedGap] = useState(ACTIONBAR_ITEM_GAP);
|
|
88
151
|
const [childRegistry, setChildRegistry] = ActionBarItemsRegistry.useRegistryState();
|
|
152
|
+
const [menuItemIds, setMenuItemIds] = useState(_temp);
|
|
89
153
|
const navRef = useRef(null);
|
|
90
154
|
let t3;
|
|
91
|
-
if ($[0]
|
|
92
|
-
t3 =
|
|
93
|
-
|
|
94
|
-
|
|
155
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
156
|
+
t3 = () => {
|
|
157
|
+
if (!listRef.current) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const g = window.getComputedStyle(listRef.current).gap;
|
|
161
|
+
const parsed = parseFloat(g);
|
|
162
|
+
if (!Number.isNaN(parsed)) {
|
|
163
|
+
setComputedGap(parsed);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
$[0] = t3;
|
|
95
167
|
} else {
|
|
96
|
-
t3 = $[
|
|
168
|
+
t3 = $[0];
|
|
97
169
|
}
|
|
98
170
|
let t4;
|
|
99
|
-
if ($[
|
|
100
|
-
t4 =
|
|
101
|
-
|
|
102
|
-
const items = Array.from((_listRef$current$quer = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll(":is(button, a, input, [tabindex]):not(:disabled):not([data-overflowing]):not([data-more-button-inactive])")) !== null && _listRef$current$quer !== void 0 ? _listRef$current$quer : []);
|
|
103
|
-
const fromIndex = from ? items.indexOf(from) : -1;
|
|
104
|
-
switch (direction) {
|
|
105
|
-
case "start":
|
|
106
|
-
{
|
|
107
|
-
return items[0];
|
|
108
|
-
}
|
|
109
|
-
case "end":
|
|
110
|
-
{
|
|
111
|
-
return items.at(-1);
|
|
112
|
-
}
|
|
113
|
-
case "next":
|
|
114
|
-
{
|
|
115
|
-
var _items;
|
|
116
|
-
return (_items = items[fromIndex + 1]) !== null && _items !== void 0 ? _items : items[0];
|
|
117
|
-
}
|
|
118
|
-
case "previous":
|
|
119
|
-
{
|
|
120
|
-
var _items2;
|
|
121
|
-
return (_items2 = items[fromIndex - 1]) !== null && _items2 !== void 0 ? _items2 : items.at(-1);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
};
|
|
171
|
+
if ($[1] !== gap) {
|
|
172
|
+
t4 = [gap];
|
|
173
|
+
$[1] = gap;
|
|
125
174
|
$[2] = t4;
|
|
126
175
|
} else {
|
|
127
176
|
t4 = $[2];
|
|
128
177
|
}
|
|
178
|
+
useIsomorphicLayoutEffect(t3, t4);
|
|
179
|
+
const moreMenuRef = useRef(null);
|
|
129
180
|
let t5;
|
|
130
|
-
if ($[3] !==
|
|
131
|
-
t5 = {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
181
|
+
if ($[3] !== childRegistry || $[4] !== computedGap || $[5] !== menuItemIds.size) {
|
|
182
|
+
t5 = resizeObserverEntries => {
|
|
183
|
+
var _moreMenuRef$current$, _moreMenuRef$current;
|
|
184
|
+
const navWidth = resizeObserverEntries[0].contentRect.width;
|
|
185
|
+
const moreMenuWidth = (_moreMenuRef$current$ = (_moreMenuRef$current = moreMenuRef.current) === null || _moreMenuRef$current === void 0 ? void 0 : _moreMenuRef$current.getBoundingClientRect().width) !== null && _moreMenuRef$current$ !== void 0 ? _moreMenuRef$current$ : 0;
|
|
186
|
+
const hasActiveMenu = menuItemIds.size > 0;
|
|
187
|
+
if (navWidth > 0) {
|
|
188
|
+
const newMenuItemIds = getMenuItems(navWidth, moreMenuWidth, childRegistry, hasActiveMenu, computedGap);
|
|
189
|
+
if (newMenuItemIds) {
|
|
190
|
+
setMenuItemIds(newMenuItemIds);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
137
193
|
};
|
|
138
|
-
$[3] =
|
|
139
|
-
$[4] =
|
|
194
|
+
$[3] = childRegistry;
|
|
195
|
+
$[4] = computedGap;
|
|
196
|
+
$[5] = menuItemIds.size;
|
|
197
|
+
$[6] = t5;
|
|
140
198
|
} else {
|
|
141
|
-
t5 = $[
|
|
199
|
+
t5 = $[6];
|
|
142
200
|
}
|
|
143
|
-
|
|
201
|
+
useResizeObserver(t5, navRef);
|
|
144
202
|
let t6;
|
|
145
|
-
if ($[
|
|
146
|
-
t6 =
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
203
|
+
if ($[7] !== menuItemIds) {
|
|
204
|
+
t6 = id => !menuItemIds.has(id);
|
|
205
|
+
$[7] = menuItemIds;
|
|
206
|
+
$[8] = t6;
|
|
149
207
|
} else {
|
|
150
|
-
t6 = $[
|
|
208
|
+
t6 = $[8];
|
|
151
209
|
}
|
|
152
|
-
const
|
|
210
|
+
const isVisibleChild = t6;
|
|
153
211
|
let t7;
|
|
154
|
-
if ($[
|
|
212
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
155
213
|
t7 = {
|
|
156
|
-
|
|
214
|
+
containerRef: listRef,
|
|
215
|
+
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
216
|
+
focusOutBehavior: "wrap"
|
|
157
217
|
};
|
|
158
|
-
$[
|
|
159
|
-
|
|
218
|
+
$[9] = t7;
|
|
219
|
+
} else {
|
|
220
|
+
t7 = $[9];
|
|
221
|
+
}
|
|
222
|
+
useFocusZone(t7);
|
|
223
|
+
let groupedItemsMap;
|
|
224
|
+
if ($[10] !== childRegistry) {
|
|
225
|
+
groupedItemsMap = new Map();
|
|
226
|
+
for (const [key, childProps] of childRegistry !== null && childRegistry !== void 0 ? childRegistry : []) {
|
|
227
|
+
if (childProps.type === "action" && childProps.groupId) {
|
|
228
|
+
const existingGroup = groupedItemsMap.get(childProps.groupId) || [];
|
|
229
|
+
existingGroup.push([key, childProps]);
|
|
230
|
+
groupedItemsMap.set(childProps.groupId, existingGroup);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
$[10] = childRegistry;
|
|
234
|
+
$[11] = groupedItemsMap;
|
|
160
235
|
} else {
|
|
161
|
-
|
|
236
|
+
groupedItemsMap = $[11];
|
|
162
237
|
}
|
|
238
|
+
const groupedItems = groupedItemsMap;
|
|
163
239
|
let t8;
|
|
164
|
-
if ($[
|
|
165
|
-
t8 =
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
let t10;
|
|
173
|
-
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
-
t10 = /*#__PURE__*/jsx("div", {});
|
|
175
|
-
$[11] = t10;
|
|
176
|
-
} else {
|
|
177
|
-
t10 = $[11];
|
|
178
|
-
}
|
|
179
|
-
let t11;
|
|
180
|
-
if ($[12] !== children || $[13] !== setChildRegistry) {
|
|
181
|
-
t11 = /*#__PURE__*/jsxs("div", {
|
|
182
|
-
className: styles.OverflowContainer,
|
|
183
|
-
children: [t10, /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
|
|
184
|
-
setRegistry: setChildRegistry,
|
|
185
|
-
children: children
|
|
186
|
-
})]
|
|
187
|
-
});
|
|
188
|
-
$[12] = children;
|
|
189
|
-
$[13] = setChildRegistry;
|
|
190
|
-
$[14] = t11;
|
|
191
|
-
} else {
|
|
192
|
-
t11 = $[14];
|
|
193
|
-
}
|
|
194
|
-
const t12 = `More ${ariaLabel} items ${overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.length}`;
|
|
195
|
-
const t13 = overflowItems !== null && overflowItems !== void 0 && overflowItems.length ? undefined : true;
|
|
196
|
-
let t14;
|
|
197
|
-
if ($[15] !== size || $[16] !== t12 || $[17] !== t13) {
|
|
198
|
-
t14 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
199
|
-
children: /*#__PURE__*/jsx(IconButton, {
|
|
200
|
-
variant: "invisible",
|
|
201
|
-
"aria-label": t12,
|
|
202
|
-
icon: KebabHorizontalIcon,
|
|
203
|
-
className: styles.MoreButton,
|
|
204
|
-
"data-more-button-inactive": t13,
|
|
205
|
-
size: size
|
|
206
|
-
})
|
|
207
|
-
});
|
|
208
|
-
$[15] = size;
|
|
209
|
-
$[16] = t12;
|
|
210
|
-
$[17] = t13;
|
|
211
|
-
$[18] = t14;
|
|
240
|
+
if ($[12] !== isVisibleChild || $[13] !== size) {
|
|
241
|
+
t8 = {
|
|
242
|
+
size,
|
|
243
|
+
isVisibleChild
|
|
244
|
+
};
|
|
245
|
+
$[12] = isVisibleChild;
|
|
246
|
+
$[13] = size;
|
|
247
|
+
$[14] = t8;
|
|
212
248
|
} else {
|
|
213
|
-
|
|
249
|
+
t8 = $[14];
|
|
214
250
|
}
|
|
215
|
-
let
|
|
216
|
-
if ($[
|
|
217
|
-
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
251
|
+
let t9;
|
|
252
|
+
if ($[15] !== className) {
|
|
253
|
+
t9 = clsx(className, styles.Nav);
|
|
254
|
+
$[15] = className;
|
|
255
|
+
$[16] = t9;
|
|
220
256
|
} else {
|
|
221
|
-
|
|
257
|
+
t9 = $[16];
|
|
222
258
|
}
|
|
223
|
-
let
|
|
224
|
-
if ($[
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
})
|
|
259
|
+
let t10;
|
|
260
|
+
if ($[17] !== children || $[18] !== setChildRegistry) {
|
|
261
|
+
t10 = /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
|
|
262
|
+
setRegistry: setChildRegistry,
|
|
263
|
+
children: children
|
|
229
264
|
});
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
265
|
+
$[17] = children;
|
|
266
|
+
$[18] = setChildRegistry;
|
|
267
|
+
$[19] = t10;
|
|
232
268
|
} else {
|
|
233
|
-
|
|
269
|
+
t10 = $[19];
|
|
234
270
|
}
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
238
|
-
children: [
|
|
271
|
+
let t11;
|
|
272
|
+
if ($[20] !== ariaLabel || $[21] !== childRegistry || $[22] !== groupedItems || $[23] !== menuItemIds) {
|
|
273
|
+
t11 = menuItemIds.size > 0 && /*#__PURE__*/jsxs(ActionMenu, {
|
|
274
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
275
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
276
|
+
variant: "invisible",
|
|
277
|
+
"aria-label": `More ${ariaLabel} items`,
|
|
278
|
+
icon: KebabHorizontalIcon
|
|
279
|
+
})
|
|
280
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
281
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
282
|
+
children: Array.from(menuItemIds).map(id_0 => {
|
|
283
|
+
const menuItem = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.get(id_0);
|
|
284
|
+
if (!menuItem) {
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
if (menuItem.type === "divider") {
|
|
288
|
+
return /*#__PURE__*/jsx(ActionList.Divider, {}, id_0);
|
|
289
|
+
} else {
|
|
290
|
+
if (menuItem.type === "action") {
|
|
291
|
+
const {
|
|
292
|
+
onClick,
|
|
293
|
+
icon: Icon,
|
|
294
|
+
label,
|
|
295
|
+
disabled
|
|
296
|
+
} = menuItem;
|
|
297
|
+
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
298
|
+
onSelect: event => {
|
|
299
|
+
typeof onClick === "function" && onClick(event);
|
|
300
|
+
},
|
|
301
|
+
disabled: disabled,
|
|
302
|
+
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
303
|
+
children: /*#__PURE__*/jsx(Icon, {})
|
|
304
|
+
}), label]
|
|
305
|
+
}, label);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
if (menuItem.type === "menu") {
|
|
309
|
+
const menuItems = menuItem.items;
|
|
310
|
+
const {
|
|
311
|
+
icon: Icon_0,
|
|
312
|
+
label: label_0,
|
|
313
|
+
returnFocusRef
|
|
314
|
+
} = menuItem;
|
|
315
|
+
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
316
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
317
|
+
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
318
|
+
children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
319
|
+
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
320
|
+
}) : null, label_0]
|
|
321
|
+
})
|
|
322
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
323
|
+
...(returnFocusRef && {
|
|
324
|
+
returnFocusRef
|
|
325
|
+
}),
|
|
326
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
327
|
+
children: menuItems.map(_temp2)
|
|
328
|
+
})
|
|
329
|
+
})]
|
|
330
|
+
}, id_0);
|
|
331
|
+
}
|
|
332
|
+
const groupedMenuItems = groupedItems.get(id_0) || [];
|
|
333
|
+
if (menuItem.type === "group") {
|
|
334
|
+
return /*#__PURE__*/jsx(React.Fragment, {
|
|
335
|
+
children: groupedMenuItems.map(_temp3)
|
|
336
|
+
}, id_0);
|
|
337
|
+
}
|
|
338
|
+
})
|
|
339
|
+
})
|
|
340
|
+
})]
|
|
239
341
|
});
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
342
|
+
$[20] = ariaLabel;
|
|
343
|
+
$[21] = childRegistry;
|
|
344
|
+
$[22] = groupedItems;
|
|
345
|
+
$[23] = menuItemIds;
|
|
346
|
+
$[24] = t11;
|
|
243
347
|
} else {
|
|
244
|
-
|
|
348
|
+
t11 = $[24];
|
|
245
349
|
}
|
|
246
|
-
let
|
|
247
|
-
if ($[
|
|
248
|
-
|
|
350
|
+
let t12;
|
|
351
|
+
if ($[25] !== ariaLabel || $[26] !== ariaLabelledBy || $[27] !== gap || $[28] !== t10 || $[29] !== t11) {
|
|
352
|
+
t12 = /*#__PURE__*/jsxs("div", {
|
|
249
353
|
ref: listRef,
|
|
250
354
|
role: "toolbar",
|
|
251
355
|
className: styles.List,
|
|
252
356
|
"aria-label": ariaLabel,
|
|
253
357
|
"aria-labelledby": ariaLabelledBy,
|
|
254
358
|
"data-gap": gap,
|
|
255
|
-
|
|
256
|
-
"data-has-overflow": t9,
|
|
257
|
-
children: [t11, t17]
|
|
359
|
+
children: [t10, t11]
|
|
258
360
|
});
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
|
|
266
|
-
$[
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
if ($[34] !== flush || $[35] !== t18 || $[36] !== t8) {
|
|
272
|
-
t19 = /*#__PURE__*/jsx("div", {
|
|
361
|
+
$[25] = ariaLabel;
|
|
362
|
+
$[26] = ariaLabelledBy;
|
|
363
|
+
$[27] = gap;
|
|
364
|
+
$[28] = t10;
|
|
365
|
+
$[29] = t11;
|
|
366
|
+
$[30] = t12;
|
|
367
|
+
} else {
|
|
368
|
+
t12 = $[30];
|
|
369
|
+
}
|
|
370
|
+
let t13;
|
|
371
|
+
if ($[31] !== flush || $[32] !== t12 || $[33] !== t9) {
|
|
372
|
+
t13 = /*#__PURE__*/jsx("div", {
|
|
273
373
|
ref: navRef,
|
|
274
|
-
className:
|
|
374
|
+
className: t9,
|
|
275
375
|
"data-flush": flush,
|
|
276
|
-
children:
|
|
376
|
+
children: t12
|
|
277
377
|
});
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
378
|
+
$[31] = flush;
|
|
379
|
+
$[32] = t12;
|
|
380
|
+
$[33] = t9;
|
|
381
|
+
$[34] = t13;
|
|
282
382
|
} else {
|
|
283
|
-
|
|
383
|
+
t13 = $[34];
|
|
284
384
|
}
|
|
285
|
-
let
|
|
286
|
-
if ($[
|
|
287
|
-
|
|
288
|
-
value:
|
|
289
|
-
children:
|
|
385
|
+
let t14;
|
|
386
|
+
if ($[35] !== t13 || $[36] !== t8) {
|
|
387
|
+
t14 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
|
|
388
|
+
value: t8,
|
|
389
|
+
children: t13
|
|
290
390
|
});
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
391
|
+
$[35] = t13;
|
|
392
|
+
$[36] = t8;
|
|
393
|
+
$[37] = t14;
|
|
294
394
|
} else {
|
|
295
|
-
|
|
395
|
+
t14 = $[37];
|
|
296
396
|
}
|
|
297
|
-
return
|
|
397
|
+
return t14;
|
|
298
398
|
};
|
|
299
|
-
function
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
const isGroupOverflowing = (_useContext = useContext(ActionBarGroupContext)) === null || _useContext === void 0 ? void 0 : _useContext.isOverflowing;
|
|
303
|
-
const isInGroup = isGroupOverflowing !== undefined;
|
|
399
|
+
function useWidth(ref) {
|
|
400
|
+
const $ = c(3);
|
|
401
|
+
const [width, setWidth] = useState(-1);
|
|
304
402
|
let t0;
|
|
305
|
-
if ($[0] !== isInGroup || $[1] !== ref) {
|
|
306
|
-
t0 = onChange => {
|
|
307
|
-
if (isInGroup) {
|
|
308
|
-
return _temp5;
|
|
309
|
-
}
|
|
310
|
-
const observer = new IntersectionObserver(() => onChange(), {
|
|
311
|
-
threshold: 1
|
|
312
|
-
});
|
|
313
|
-
if (ref.current) {
|
|
314
|
-
observer.observe(ref.current);
|
|
315
|
-
}
|
|
316
|
-
return () => observer.disconnect();
|
|
317
|
-
};
|
|
318
|
-
$[0] = isInGroup;
|
|
319
|
-
$[1] = ref;
|
|
320
|
-
$[2] = t0;
|
|
321
|
-
} else {
|
|
322
|
-
t0 = $[2];
|
|
323
|
-
}
|
|
324
|
-
const subscribeIntersectionObserver = t0;
|
|
325
403
|
let t1;
|
|
326
|
-
if ($[
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
} else {
|
|
331
|
-
t1 = $[4];
|
|
332
|
-
}
|
|
333
|
-
const isItemOverflowing = useSyncExternalStore(subscribeIntersectionObserver, t1, _temp6);
|
|
334
|
-
const isOverflowing = isGroupOverflowing || isItemOverflowing;
|
|
335
|
-
ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
|
|
336
|
-
const t2 = isOverflowing ? "" : undefined;
|
|
337
|
-
let t3;
|
|
338
|
-
if ($[5] !== isOverflowing || $[6] !== t2) {
|
|
339
|
-
t3 = {
|
|
340
|
-
isOverflowing,
|
|
341
|
-
dataOverflowingAttr: t2
|
|
404
|
+
if ($[0] !== ref) {
|
|
405
|
+
t0 = () => {
|
|
406
|
+
var _ref$current$getBound, _ref$current;
|
|
407
|
+
return setWidth((_ref$current$getBound = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect().width) !== null && _ref$current$getBound !== void 0 ? _ref$current$getBound : -1);
|
|
342
408
|
};
|
|
343
|
-
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
409
|
+
t1 = [ref];
|
|
410
|
+
$[0] = ref;
|
|
411
|
+
$[1] = t0;
|
|
412
|
+
$[2] = t1;
|
|
346
413
|
} else {
|
|
347
|
-
|
|
414
|
+
t0 = $[1];
|
|
415
|
+
t1 = $[2];
|
|
348
416
|
}
|
|
349
|
-
|
|
417
|
+
useIsomorphicLayoutEffect(t0, t1);
|
|
418
|
+
return width;
|
|
350
419
|
}
|
|
351
|
-
function _temp6() {
|
|
352
|
-
return false;
|
|
353
|
-
}
|
|
354
|
-
function _temp5() {}
|
|
355
420
|
const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
356
421
|
disabled,
|
|
357
422
|
onClick,
|
|
@@ -360,36 +425,44 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
|
360
425
|
const ref = useRef(null);
|
|
361
426
|
const mergedRef = useMergedRefs(ref, forwardedRef);
|
|
362
427
|
const {
|
|
363
|
-
size
|
|
428
|
+
size,
|
|
429
|
+
isVisibleChild
|
|
364
430
|
} = React.useContext(ActionBarContext);
|
|
431
|
+
const {
|
|
432
|
+
groupId
|
|
433
|
+
} = React.useContext(ActionBarGroupContext);
|
|
434
|
+
const width = useWidth(ref);
|
|
365
435
|
const {
|
|
366
436
|
['aria-label']: ariaLabel,
|
|
367
437
|
icon
|
|
368
438
|
} = props;
|
|
369
|
-
const {
|
|
370
|
-
dataOverflowingAttr
|
|
371
|
-
} = useActionBarItem(ref, useMemo(() => ({
|
|
439
|
+
const registryProps = useMemo(() => ({
|
|
372
440
|
type: 'action',
|
|
373
441
|
label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : '',
|
|
374
442
|
icon,
|
|
375
443
|
disabled: !!disabled,
|
|
376
|
-
onClick: onClick
|
|
377
|
-
|
|
444
|
+
onClick: onClick,
|
|
445
|
+
width,
|
|
446
|
+
groupId: groupId !== null && groupId !== void 0 ? groupId : undefined
|
|
447
|
+
}), [ariaLabel, icon, disabled, onClick, groupId, width]);
|
|
448
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
378
449
|
const clickHandler = useCallback(event => {
|
|
379
450
|
if (disabled) return;
|
|
380
451
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
381
452
|
}, [disabled, onClick]);
|
|
453
|
+
if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
|
|
382
454
|
return /*#__PURE__*/jsx(IconButton, {
|
|
383
455
|
"aria-disabled": disabled,
|
|
384
456
|
ref: mergedRef,
|
|
385
457
|
size: size,
|
|
386
458
|
onClick: clickHandler,
|
|
387
459
|
...props,
|
|
388
|
-
variant: "invisible"
|
|
389
|
-
"data-overflowing": dataOverflowingAttr
|
|
460
|
+
variant: "invisible"
|
|
390
461
|
});
|
|
391
462
|
});
|
|
392
|
-
const ActionBarGroupContext = /*#__PURE__*/React.createContext(
|
|
463
|
+
const ActionBarGroupContext = /*#__PURE__*/React.createContext({
|
|
464
|
+
groupId: null
|
|
465
|
+
});
|
|
393
466
|
const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
394
467
|
const $ = c(10);
|
|
395
468
|
const {
|
|
@@ -397,39 +470,38 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
397
470
|
} = t0;
|
|
398
471
|
const backupRef = useRef(null);
|
|
399
472
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
473
|
+
const width = useWidth(ref);
|
|
400
474
|
let t1;
|
|
401
|
-
if ($[0]
|
|
475
|
+
if ($[0] !== width) {
|
|
402
476
|
t1 = {
|
|
403
|
-
type: "group"
|
|
477
|
+
type: "group",
|
|
478
|
+
width
|
|
404
479
|
};
|
|
405
|
-
$[0] =
|
|
480
|
+
$[0] = width;
|
|
481
|
+
$[1] = t1;
|
|
406
482
|
} else {
|
|
407
|
-
t1 = $[
|
|
483
|
+
t1 = $[1];
|
|
408
484
|
}
|
|
409
|
-
const
|
|
410
|
-
|
|
411
|
-
isOverflowing
|
|
412
|
-
} = useActionBarItem(ref, t1);
|
|
485
|
+
const registryProps = t1;
|
|
486
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
413
487
|
let t2;
|
|
414
|
-
if ($[
|
|
488
|
+
if ($[2] !== id) {
|
|
415
489
|
t2 = {
|
|
416
|
-
|
|
490
|
+
groupId: id
|
|
417
491
|
};
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
492
|
+
$[2] = id;
|
|
493
|
+
$[3] = t2;
|
|
420
494
|
} else {
|
|
421
|
-
t2 = $[
|
|
495
|
+
t2 = $[3];
|
|
422
496
|
}
|
|
423
497
|
let t3;
|
|
424
|
-
if ($[
|
|
498
|
+
if ($[4] !== children || $[5] !== ref) {
|
|
425
499
|
t3 = /*#__PURE__*/jsx("div", {
|
|
426
500
|
className: styles.Group,
|
|
427
501
|
ref: ref,
|
|
428
|
-
"data-overflowing": dataOverflowingAttr,
|
|
429
502
|
children: children
|
|
430
503
|
});
|
|
431
|
-
$[
|
|
432
|
-
$[4] = dataOverflowingAttr;
|
|
504
|
+
$[4] = children;
|
|
433
505
|
$[5] = ref;
|
|
434
506
|
$[6] = t3;
|
|
435
507
|
} else {
|
|
@@ -483,12 +555,17 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
483
555
|
}
|
|
484
556
|
const backupRef = useRef(null);
|
|
485
557
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
558
|
+
const {
|
|
559
|
+
isVisibleChild
|
|
560
|
+
} = React.useContext(ActionBarContext);
|
|
486
561
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
562
|
+
const width = useWidth(ref);
|
|
487
563
|
const t1 = overflowIcon ? overflowIcon : icon;
|
|
488
564
|
let t2;
|
|
489
|
-
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1) {
|
|
565
|
+
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1 || $[11] !== width) {
|
|
490
566
|
t2 = {
|
|
491
567
|
type: "menu",
|
|
568
|
+
width,
|
|
492
569
|
label: ariaLabel,
|
|
493
570
|
icon: t1,
|
|
494
571
|
returnFocusRef,
|
|
@@ -498,26 +575,27 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
498
575
|
$[8] = items;
|
|
499
576
|
$[9] = returnFocusRef;
|
|
500
577
|
$[10] = t1;
|
|
501
|
-
$[11] =
|
|
578
|
+
$[11] = width;
|
|
579
|
+
$[12] = t2;
|
|
502
580
|
} else {
|
|
503
|
-
t2 = $[
|
|
581
|
+
t2 = $[12];
|
|
582
|
+
}
|
|
583
|
+
const registryProps = t2;
|
|
584
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
585
|
+
if (!isVisibleChild(id)) {
|
|
586
|
+
return null;
|
|
504
587
|
}
|
|
505
|
-
const {
|
|
506
|
-
dataOverflowingAttr
|
|
507
|
-
} = useActionBarItem(ref, t2);
|
|
508
588
|
let t3;
|
|
509
|
-
if ($[
|
|
589
|
+
if ($[13] !== ariaLabel || $[14] !== icon || $[15] !== props) {
|
|
510
590
|
t3 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
511
591
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
512
592
|
variant: "invisible",
|
|
513
593
|
"aria-label": ariaLabel,
|
|
514
594
|
icon: icon,
|
|
515
|
-
...props
|
|
516
|
-
"data-overflowing": dataOverflowingAttr
|
|
595
|
+
...props
|
|
517
596
|
})
|
|
518
597
|
});
|
|
519
|
-
$[
|
|
520
|
-
$[13] = dataOverflowingAttr;
|
|
598
|
+
$[13] = ariaLabel;
|
|
521
599
|
$[14] = icon;
|
|
522
600
|
$[15] = props;
|
|
523
601
|
$[16] = t3;
|
|
@@ -536,7 +614,7 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
536
614
|
}
|
|
537
615
|
let t5;
|
|
538
616
|
if ($[19] !== items) {
|
|
539
|
-
t5 = items.map(
|
|
617
|
+
t5 = items.map(_temp4);
|
|
540
618
|
$[19] = items;
|
|
541
619
|
$[20] = t5;
|
|
542
620
|
} else {
|
|
@@ -585,91 +663,68 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
585
663
|
const VerticalDivider = () => {
|
|
586
664
|
const $ = c(3);
|
|
587
665
|
const ref = useRef(null);
|
|
666
|
+
const {
|
|
667
|
+
isVisibleChild
|
|
668
|
+
} = React.useContext(ActionBarContext);
|
|
669
|
+
const width = useWidth(ref);
|
|
588
670
|
let t0;
|
|
589
|
-
if ($[0]
|
|
671
|
+
if ($[0] !== width) {
|
|
590
672
|
t0 = {
|
|
591
|
-
type: "divider"
|
|
673
|
+
type: "divider",
|
|
674
|
+
width
|
|
592
675
|
};
|
|
593
|
-
$[0] =
|
|
676
|
+
$[0] = width;
|
|
677
|
+
$[1] = t0;
|
|
594
678
|
} else {
|
|
595
|
-
t0 = $[
|
|
679
|
+
t0 = $[1];
|
|
680
|
+
}
|
|
681
|
+
const registryProps = t0;
|
|
682
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
683
|
+
if (!isVisibleChild(id)) {
|
|
684
|
+
return null;
|
|
596
685
|
}
|
|
597
|
-
const {
|
|
598
|
-
dataOverflowingAttr
|
|
599
|
-
} = useActionBarItem(ref, t0);
|
|
600
686
|
let t1;
|
|
601
|
-
if ($[
|
|
687
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
602
688
|
t1 = /*#__PURE__*/jsx("div", {
|
|
603
689
|
ref: ref,
|
|
604
690
|
"data-component": "ActionBar.VerticalDivider",
|
|
605
691
|
"aria-hidden": "true",
|
|
606
|
-
className: styles.Divider
|
|
607
|
-
"data-overflowing": dataOverflowingAttr
|
|
692
|
+
className: styles.Divider
|
|
608
693
|
});
|
|
609
|
-
$[1] = dataOverflowingAttr;
|
|
610
694
|
$[2] = t1;
|
|
611
695
|
} else {
|
|
612
696
|
t1 = $[2];
|
|
613
697
|
}
|
|
614
698
|
return t1;
|
|
615
699
|
};
|
|
616
|
-
function _temp(
|
|
617
|
-
return
|
|
700
|
+
function _temp() {
|
|
701
|
+
return new Set();
|
|
618
702
|
}
|
|
619
|
-
function _temp2(
|
|
620
|
-
return entry[1] !== null;
|
|
621
|
-
}
|
|
622
|
-
function _temp3(item, index) {
|
|
703
|
+
function _temp2(item, index) {
|
|
623
704
|
return renderMenuItem(item, index);
|
|
624
705
|
}
|
|
625
|
-
function
|
|
626
|
-
const [
|
|
627
|
-
if (
|
|
628
|
-
return /*#__PURE__*/jsx(ActionList.Divider, {}, id);
|
|
629
|
-
}
|
|
630
|
-
if (menuItem.type === "action") {
|
|
706
|
+
function _temp3(t0) {
|
|
707
|
+
const [key_0, childProps_0] = t0;
|
|
708
|
+
if (childProps_0.type === "action") {
|
|
631
709
|
const {
|
|
632
|
-
onClick,
|
|
633
|
-
icon:
|
|
634
|
-
label,
|
|
635
|
-
disabled
|
|
636
|
-
} =
|
|
710
|
+
onClick: onClick_0,
|
|
711
|
+
icon: Icon_1,
|
|
712
|
+
label: label_1,
|
|
713
|
+
disabled: disabled_0
|
|
714
|
+
} = childProps_0;
|
|
637
715
|
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
638
|
-
onSelect:
|
|
639
|
-
typeof
|
|
716
|
+
onSelect: event_0 => {
|
|
717
|
+
typeof onClick_0 === "function" && onClick_0(event_0);
|
|
640
718
|
},
|
|
641
|
-
disabled:
|
|
719
|
+
disabled: disabled_0,
|
|
642
720
|
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
643
|
-
children: /*#__PURE__*/jsx(
|
|
644
|
-
}),
|
|
645
|
-
},
|
|
646
|
-
}
|
|
647
|
-
if (menuItem.type === "menu") {
|
|
648
|
-
const menuItems = menuItem.items;
|
|
649
|
-
const {
|
|
650
|
-
icon: Icon_0,
|
|
651
|
-
label: label_0,
|
|
652
|
-
returnFocusRef
|
|
653
|
-
} = menuItem;
|
|
654
|
-
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
655
|
-
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
656
|
-
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
657
|
-
children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
658
|
-
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
659
|
-
}) : null, label_0]
|
|
660
|
-
})
|
|
661
|
-
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
662
|
-
...(returnFocusRef && {
|
|
663
|
-
returnFocusRef
|
|
664
|
-
}),
|
|
665
|
-
children: /*#__PURE__*/jsx(ActionList, {
|
|
666
|
-
children: menuItems.map(_temp3)
|
|
667
|
-
})
|
|
668
|
-
})]
|
|
669
|
-
}, id);
|
|
721
|
+
children: /*#__PURE__*/jsx(Icon_1, {})
|
|
722
|
+
}), label_1]
|
|
723
|
+
}, key_0);
|
|
670
724
|
}
|
|
725
|
+
return null;
|
|
671
726
|
}
|
|
672
|
-
function
|
|
727
|
+
function _temp4(item, index) {
|
|
673
728
|
return renderMenuItem(item, index);
|
|
674
729
|
}
|
|
675
730
|
|