@primer/react 38.21.1 → 38.22.0-rc.984eec337
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 +14 -0
- package/dist/ActionBar/ActionBar-3f7b52a3.css +2 -0
- package/dist/ActionBar/ActionBar-3f7b52a3.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 +292 -379
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionList/{ActionList-53389912.css → ActionList-2a35a40c.css} +1 -1
- package/dist/ActionList/ActionList-2a35a40c.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +1 -1
- package/dist/ActionList/{Group-2c8b5711.css → Group-743ff5c8.css} +1 -1
- package/dist/ActionList/Group-743ff5c8.css.map +1 -0
- package/dist/ActionList/Group.module.css.js +1 -1
- package/dist/AvatarStack/{AvatarStack-8526f38a.css → AvatarStack-9bb5649f.css} +1 -1
- package/dist/AvatarStack/{AvatarStack-8526f38a.css.map → AvatarStack-9bb5649f.css.map} +1 -1
- package/dist/AvatarStack/AvatarStack.module.css.js +1 -1
- package/dist/Breadcrumbs/{Breadcrumbs-dbfc9d95.css → Breadcrumbs-54395fc6.css} +1 -1
- package/dist/Breadcrumbs/{Breadcrumbs-dbfc9d95.css.map → Breadcrumbs-54395fc6.css.map} +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.module.css.js +1 -1
- package/dist/Button/{ButtonBase-4da3fa22.css → ButtonBase-713ecf3d.css} +1 -1
- package/dist/Button/ButtonBase-713ecf3d.css.map +1 -0
- package/dist/Button/ButtonBase.module.css.js +1 -1
- package/dist/ButtonGroup/{ButtonGroup-10292330.css → ButtonGroup-54ba293b.css} +1 -1
- package/dist/ButtonGroup/ButtonGroup-54ba293b.css.map +1 -0
- package/dist/ButtonGroup/ButtonGroup.module.css.js +1 -1
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +4 -0
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +103 -81
- package/dist/PageHeader/{PageHeader-9f4a690a.css → PageHeader-5e969745.css} +1 -1
- package/dist/PageHeader/PageHeader-5e969745.css.map +1 -0
- package/dist/PageHeader/PageHeader.module.css.js +1 -1
- package/dist/SegmentedControl/{SegmentedControl-6389d0da.css → SegmentedControl-622e61a4.css} +1 -1
- package/dist/SegmentedControl/SegmentedControl-622e61a4.css.map +1 -0
- package/dist/SegmentedControl/SegmentedControl.module.css.js +1 -1
- package/dist/Timeline/{Timeline-d1c91434.css → Timeline-ad31a7fb.css} +1 -1
- package/dist/Timeline/{Timeline-d1c91434.css.map → Timeline-ad31a7fb.css.map} +1 -1
- package/dist/Timeline/Timeline.module.css.js +1 -1
- package/dist/TreeView/{TreeView-70baca82.css → TreeView-0fe09f34.css} +1 -1
- package/dist/TreeView/TreeView-0fe09f34.css.map +1 -0
- package/dist/TreeView/TreeView.module.css.js +1 -1
- package/dist/experimental/SelectPanel2/{SelectPanel-40b4ba73.css → SelectPanel-608e207e.css} +1 -1
- package/dist/experimental/SelectPanel2/{SelectPanel-40b4ba73.css.map → SelectPanel-608e207e.css.map} +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.module.css.js +1 -1
- package/generated/components.json +1 -1
- package/package.json +1 -1
- package/dist/ActionBar/ActionBar-a41224b2.css +0 -2
- package/dist/ActionBar/ActionBar-a41224b2.css.map +0 -1
- package/dist/ActionList/ActionList-53389912.css.map +0 -1
- package/dist/ActionList/Group-2c8b5711.css.map +0 -1
- package/dist/Button/ButtonBase-4da3fa22.css.map +0 -1
- package/dist/ButtonGroup/ButtonGroup-10292330.css.map +0 -1
- package/dist/PageHeader/PageHeader-9f4a690a.css.map +0 -1
- package/dist/SegmentedControl/SegmentedControl-6389d0da.css.map +0 -1
- package/dist/TreeView/TreeView-70baca82.css.map +0 -1
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import React, { useRef, useState,
|
|
2
|
+
import React, { forwardRef, useRef, useState, useMemo, useCallback, useContext, useSyncExternalStore } 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';
|
|
7
5
|
import { IconButton } from '../Button/IconButton.js';
|
|
8
6
|
import { useFocusZone } from '../hooks/useFocusZone.js';
|
|
9
7
|
import styles from './ActionBar.module.css.js';
|
|
10
8
|
import { clsx } from 'clsx';
|
|
11
9
|
import { createDescendantRegistry } from '../utils/descendant-registry.js';
|
|
12
|
-
import {
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
11
|
import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
|
|
14
12
|
import { FocusKeys } from '@primer/behaviors';
|
|
15
13
|
import { ActionMenu } from '../ActionMenu/ActionMenu.js';
|
|
16
14
|
|
|
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
|
-
|
|
24
15
|
const ActionBarContext = /*#__PURE__*/React.createContext({
|
|
25
16
|
size: 'medium',
|
|
26
|
-
isVisibleChild: () => true,
|
|
27
17
|
groupId: undefined
|
|
28
18
|
});
|
|
29
19
|
|
|
@@ -31,23 +21,8 @@ const ActionBarContext = /*#__PURE__*/React.createContext({
|
|
|
31
21
|
small (28px), medium (32px), large (40px)
|
|
32
22
|
*/
|
|
33
23
|
|
|
34
|
-
const MORE_BTN_WIDTH = 32;
|
|
35
24
|
const ActionBarItemsRegistry = createDescendantRegistry();
|
|
36
|
-
const
|
|
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
|
+
const FOCUSABLE_ITEM_SELECTOR = ':is(button, a, input, [tabindex]):not(:disabled):not([data-overflowing]):not([data-more-button-inactive])';
|
|
51
26
|
const renderMenuItem = (item, index) => {
|
|
52
27
|
if (item.type === 'divider') {
|
|
53
28
|
return /*#__PURE__*/jsx(ActionList.Divider, {}, index);
|
|
@@ -96,328 +71,256 @@ const renderMenuItem = (item, index) => {
|
|
|
96
71
|
}, label);
|
|
97
72
|
};
|
|
98
73
|
renderMenuItem.displayName = "renderMenuItem";
|
|
99
|
-
const
|
|
100
|
-
|
|
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
|
-
};
|
|
135
|
-
const ActionBar = props => {
|
|
136
|
-
const $ = c(38);
|
|
74
|
+
const ActionBar = t0 => {
|
|
75
|
+
const $ = c(40);
|
|
137
76
|
const {
|
|
138
|
-
size:
|
|
77
|
+
size: t1,
|
|
139
78
|
children,
|
|
140
79
|
"aria-label": ariaLabel,
|
|
141
80
|
"aria-labelledby": ariaLabelledBy,
|
|
142
|
-
flush:
|
|
81
|
+
flush: t2,
|
|
143
82
|
className,
|
|
144
|
-
gap:
|
|
145
|
-
} =
|
|
146
|
-
const size =
|
|
147
|
-
const flush =
|
|
148
|
-
const gap =
|
|
149
|
-
const listRef = useRef(null);
|
|
150
|
-
const [computedGap, setComputedGap] = useState(ACTIONBAR_ITEM_GAP);
|
|
83
|
+
gap: t3
|
|
84
|
+
} = t0;
|
|
85
|
+
const size = t1 === undefined ? "medium" : t1;
|
|
86
|
+
const flush = t2 === undefined ? false : t2;
|
|
87
|
+
const gap = t3 === undefined ? "condensed" : t3;
|
|
151
88
|
const [childRegistry, setChildRegistry] = ActionBarItemsRegistry.useRegistryState();
|
|
152
|
-
const [menuItemIds, setMenuItemIds] = useState(_temp);
|
|
153
|
-
const navRef = useRef(null);
|
|
154
|
-
let t3;
|
|
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;
|
|
167
|
-
} else {
|
|
168
|
-
t3 = $[0];
|
|
169
|
-
}
|
|
170
89
|
let t4;
|
|
171
|
-
if ($[
|
|
172
|
-
t4 =
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
90
|
+
if ($[0] !== childRegistry) {
|
|
91
|
+
t4 = childRegistry && Array.from(childRegistry.entries()).filter(_temp);
|
|
92
|
+
$[0] = childRegistry;
|
|
93
|
+
$[1] = t4;
|
|
175
94
|
} else {
|
|
176
|
-
t4 = $[
|
|
95
|
+
t4 = $[1];
|
|
177
96
|
}
|
|
178
|
-
|
|
179
|
-
const moreMenuRef = useRef(null);
|
|
97
|
+
const overflowItems = t4;
|
|
180
98
|
let t5;
|
|
181
|
-
if ($[
|
|
182
|
-
t5 =
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
}
|
|
99
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
+
t5 = {
|
|
101
|
+
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
102
|
+
focusOutBehavior: "wrap",
|
|
103
|
+
focusableElementFilter: _temp2
|
|
193
104
|
};
|
|
194
|
-
$[
|
|
195
|
-
$[4] = computedGap;
|
|
196
|
-
$[5] = menuItemIds.size;
|
|
197
|
-
$[6] = t5;
|
|
105
|
+
$[2] = t5;
|
|
198
106
|
} else {
|
|
199
|
-
t5 = $[
|
|
107
|
+
t5 = $[2];
|
|
200
108
|
}
|
|
201
|
-
useResizeObserver(t5, navRef);
|
|
202
109
|
let t6;
|
|
203
|
-
if ($[
|
|
204
|
-
t6 =
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
110
|
+
if ($[3] !== overflowItems) {
|
|
111
|
+
t6 = [overflowItems];
|
|
112
|
+
$[3] = overflowItems;
|
|
113
|
+
$[4] = t6;
|
|
207
114
|
} else {
|
|
208
|
-
t6 = $[
|
|
115
|
+
t6 = $[4];
|
|
209
116
|
}
|
|
210
|
-
const
|
|
117
|
+
const {
|
|
118
|
+
containerRef
|
|
119
|
+
} = useFocusZone(t5, t6);
|
|
211
120
|
let t7;
|
|
212
|
-
if ($[
|
|
121
|
+
if ($[5] !== size) {
|
|
213
122
|
t7 = {
|
|
214
|
-
|
|
215
|
-
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
216
|
-
focusOutBehavior: "wrap"
|
|
123
|
+
size
|
|
217
124
|
};
|
|
218
|
-
$[
|
|
219
|
-
|
|
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;
|
|
125
|
+
$[5] = size;
|
|
126
|
+
$[6] = t7;
|
|
235
127
|
} else {
|
|
236
|
-
|
|
128
|
+
t7 = $[6];
|
|
237
129
|
}
|
|
238
|
-
const groupedItems = groupedItemsMap;
|
|
239
130
|
let t8;
|
|
240
|
-
if ($[
|
|
241
|
-
t8 =
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
$[
|
|
131
|
+
if ($[7] !== className) {
|
|
132
|
+
t8 = clsx(className, styles.Nav);
|
|
133
|
+
$[7] = className;
|
|
134
|
+
$[8] = t8;
|
|
135
|
+
} else {
|
|
136
|
+
t8 = $[8];
|
|
137
|
+
}
|
|
138
|
+
const t9 = containerRef;
|
|
139
|
+
const t10 = overflowItems ? overflowItems.length > 0 : undefined;
|
|
140
|
+
let t11;
|
|
141
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
142
|
+
t11 = /*#__PURE__*/jsx("div", {});
|
|
143
|
+
$[9] = t11;
|
|
144
|
+
} else {
|
|
145
|
+
t11 = $[9];
|
|
146
|
+
}
|
|
147
|
+
let t12;
|
|
148
|
+
if ($[10] !== children || $[11] !== setChildRegistry) {
|
|
149
|
+
t12 = /*#__PURE__*/jsxs("div", {
|
|
150
|
+
className: styles.OverflowContainer,
|
|
151
|
+
children: [t11, /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
|
|
152
|
+
setRegistry: setChildRegistry,
|
|
153
|
+
children: children
|
|
154
|
+
})]
|
|
155
|
+
});
|
|
156
|
+
$[10] = children;
|
|
157
|
+
$[11] = setChildRegistry;
|
|
158
|
+
$[12] = t12;
|
|
159
|
+
} else {
|
|
160
|
+
t12 = $[12];
|
|
161
|
+
}
|
|
162
|
+
const t13 = `More ${ariaLabel} items ${overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.length}`;
|
|
163
|
+
const t14 = overflowItems !== null && overflowItems !== void 0 && overflowItems.length ? undefined : true;
|
|
164
|
+
let t15;
|
|
165
|
+
if ($[13] !== size || $[14] !== t13 || $[15] !== t14) {
|
|
166
|
+
t15 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
167
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
168
|
+
variant: "invisible",
|
|
169
|
+
"aria-label": t13,
|
|
170
|
+
icon: KebabHorizontalIcon,
|
|
171
|
+
className: styles.MoreButton,
|
|
172
|
+
"data-more-button-inactive": t14,
|
|
173
|
+
size: size
|
|
174
|
+
})
|
|
175
|
+
});
|
|
246
176
|
$[13] = size;
|
|
247
|
-
$[14] =
|
|
177
|
+
$[14] = t13;
|
|
178
|
+
$[15] = t14;
|
|
179
|
+
$[16] = t15;
|
|
248
180
|
} else {
|
|
249
|
-
|
|
181
|
+
t15 = $[16];
|
|
250
182
|
}
|
|
251
|
-
let
|
|
252
|
-
if ($[
|
|
253
|
-
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
183
|
+
let t16;
|
|
184
|
+
if ($[17] !== overflowItems) {
|
|
185
|
+
t16 = overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.map(_temp4);
|
|
186
|
+
$[17] = overflowItems;
|
|
187
|
+
$[18] = t16;
|
|
256
188
|
} else {
|
|
257
|
-
|
|
189
|
+
t16 = $[18];
|
|
258
190
|
}
|
|
259
|
-
let
|
|
260
|
-
if ($[
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
191
|
+
let t17;
|
|
192
|
+
if ($[19] !== t16) {
|
|
193
|
+
t17 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
194
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
195
|
+
children: t16
|
|
196
|
+
})
|
|
264
197
|
});
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[19] = t10;
|
|
198
|
+
$[19] = t16;
|
|
199
|
+
$[20] = t17;
|
|
268
200
|
} else {
|
|
269
|
-
|
|
201
|
+
t17 = $[20];
|
|
270
202
|
}
|
|
271
|
-
let
|
|
272
|
-
if ($[
|
|
273
|
-
|
|
274
|
-
children: [
|
|
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
|
-
})]
|
|
203
|
+
let t18;
|
|
204
|
+
if ($[21] !== t15 || $[22] !== t17) {
|
|
205
|
+
t18 = /*#__PURE__*/jsxs(ActionMenu, {
|
|
206
|
+
children: [t15, t17]
|
|
341
207
|
});
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[23] = menuItemIds;
|
|
346
|
-
$[24] = t11;
|
|
208
|
+
$[21] = t15;
|
|
209
|
+
$[22] = t17;
|
|
210
|
+
$[23] = t18;
|
|
347
211
|
} else {
|
|
348
|
-
|
|
212
|
+
t18 = $[23];
|
|
349
213
|
}
|
|
350
|
-
let
|
|
351
|
-
if ($[
|
|
352
|
-
|
|
353
|
-
ref:
|
|
214
|
+
let t19;
|
|
215
|
+
if ($[24] !== ariaLabel || $[25] !== ariaLabelledBy || $[26] !== gap || $[27] !== size || $[28] !== t10 || $[29] !== t12 || $[30] !== t18 || $[31] !== t9) {
|
|
216
|
+
t19 = /*#__PURE__*/jsxs("div", {
|
|
217
|
+
ref: t9,
|
|
354
218
|
role: "toolbar",
|
|
355
219
|
className: styles.List,
|
|
356
220
|
"aria-label": ariaLabel,
|
|
357
221
|
"aria-labelledby": ariaLabelledBy,
|
|
358
222
|
"data-gap": gap,
|
|
359
|
-
|
|
223
|
+
"data-size": size,
|
|
224
|
+
"data-has-overflow": t10,
|
|
225
|
+
children: [t12, t18]
|
|
360
226
|
});
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
227
|
+
$[24] = ariaLabel;
|
|
228
|
+
$[25] = ariaLabelledBy;
|
|
229
|
+
$[26] = gap;
|
|
230
|
+
$[27] = size;
|
|
364
231
|
$[28] = t10;
|
|
365
|
-
$[29] =
|
|
366
|
-
$[30] =
|
|
232
|
+
$[29] = t12;
|
|
233
|
+
$[30] = t18;
|
|
234
|
+
$[31] = t9;
|
|
235
|
+
$[32] = t19;
|
|
367
236
|
} else {
|
|
368
|
-
|
|
237
|
+
t19 = $[32];
|
|
369
238
|
}
|
|
370
|
-
let
|
|
371
|
-
if ($[
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
className: t9,
|
|
239
|
+
let t20;
|
|
240
|
+
if ($[33] !== flush || $[34] !== t19 || $[35] !== t8) {
|
|
241
|
+
t20 = /*#__PURE__*/jsx("div", {
|
|
242
|
+
className: t8,
|
|
375
243
|
"data-component": "ActionBar",
|
|
376
244
|
"data-flush": flush,
|
|
377
|
-
children:
|
|
245
|
+
children: t19
|
|
378
246
|
});
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
247
|
+
$[33] = flush;
|
|
248
|
+
$[34] = t19;
|
|
249
|
+
$[35] = t8;
|
|
250
|
+
$[36] = t20;
|
|
383
251
|
} else {
|
|
384
|
-
|
|
252
|
+
t20 = $[36];
|
|
385
253
|
}
|
|
386
|
-
let
|
|
387
|
-
if ($[
|
|
388
|
-
|
|
389
|
-
value:
|
|
390
|
-
children:
|
|
254
|
+
let t21;
|
|
255
|
+
if ($[37] !== t20 || $[38] !== t7) {
|
|
256
|
+
t21 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
|
|
257
|
+
value: t7,
|
|
258
|
+
children: t20
|
|
391
259
|
});
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
260
|
+
$[37] = t20;
|
|
261
|
+
$[38] = t7;
|
|
262
|
+
$[39] = t21;
|
|
395
263
|
} else {
|
|
396
|
-
|
|
264
|
+
t21 = $[39];
|
|
397
265
|
}
|
|
398
|
-
return
|
|
266
|
+
return t21;
|
|
399
267
|
};
|
|
400
|
-
function
|
|
401
|
-
|
|
402
|
-
const
|
|
268
|
+
function useActionBarItem(ref, registryProps) {
|
|
269
|
+
var _useContext;
|
|
270
|
+
const $ = c(8);
|
|
271
|
+
const isGroupOverflowing = (_useContext = useContext(ActionBarGroupContext)) === null || _useContext === void 0 ? void 0 : _useContext.isOverflowing;
|
|
272
|
+
const isInGroup = isGroupOverflowing !== undefined;
|
|
403
273
|
let t0;
|
|
274
|
+
if ($[0] !== isInGroup || $[1] !== ref) {
|
|
275
|
+
t0 = onChange => {
|
|
276
|
+
if (isInGroup) {
|
|
277
|
+
return _temp5;
|
|
278
|
+
}
|
|
279
|
+
const observer = new IntersectionObserver(() => onChange(), {
|
|
280
|
+
threshold: 1
|
|
281
|
+
});
|
|
282
|
+
if (ref.current) {
|
|
283
|
+
observer.observe(ref.current);
|
|
284
|
+
}
|
|
285
|
+
return () => observer.disconnect();
|
|
286
|
+
};
|
|
287
|
+
$[0] = isInGroup;
|
|
288
|
+
$[1] = ref;
|
|
289
|
+
$[2] = t0;
|
|
290
|
+
} else {
|
|
291
|
+
t0 = $[2];
|
|
292
|
+
}
|
|
293
|
+
const subscribeIntersectionObserver = t0;
|
|
404
294
|
let t1;
|
|
405
|
-
if ($[
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
295
|
+
if ($[3] !== ref) {
|
|
296
|
+
t1 = () => ref.current ? ref.current.offsetTop > 0 : false;
|
|
297
|
+
$[3] = ref;
|
|
298
|
+
$[4] = t1;
|
|
299
|
+
} else {
|
|
300
|
+
t1 = $[4];
|
|
301
|
+
}
|
|
302
|
+
const isItemOverflowing = useSyncExternalStore(subscribeIntersectionObserver, t1, _temp6);
|
|
303
|
+
const isOverflowing = isGroupOverflowing || isItemOverflowing;
|
|
304
|
+
ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
|
|
305
|
+
const t2 = isOverflowing ? "" : undefined;
|
|
306
|
+
let t3;
|
|
307
|
+
if ($[5] !== isOverflowing || $[6] !== t2) {
|
|
308
|
+
t3 = {
|
|
309
|
+
isOverflowing,
|
|
310
|
+
dataOverflowingAttr: t2
|
|
409
311
|
};
|
|
410
|
-
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[2] = t1;
|
|
312
|
+
$[5] = isOverflowing;
|
|
313
|
+
$[6] = t2;
|
|
314
|
+
$[7] = t3;
|
|
414
315
|
} else {
|
|
415
|
-
|
|
416
|
-
t1 = $[2];
|
|
316
|
+
t3 = $[7];
|
|
417
317
|
}
|
|
418
|
-
|
|
419
|
-
|
|
318
|
+
return t3;
|
|
319
|
+
}
|
|
320
|
+
function _temp6() {
|
|
321
|
+
return false;
|
|
420
322
|
}
|
|
323
|
+
function _temp5() {}
|
|
421
324
|
const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
422
325
|
disabled,
|
|
423
326
|
onClick,
|
|
@@ -426,44 +329,36 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
|
426
329
|
const ref = useRef(null);
|
|
427
330
|
useRefObjectAsForwardedRef(forwardedRef, ref);
|
|
428
331
|
const {
|
|
429
|
-
size
|
|
430
|
-
isVisibleChild
|
|
332
|
+
size
|
|
431
333
|
} = React.useContext(ActionBarContext);
|
|
432
|
-
const {
|
|
433
|
-
groupId
|
|
434
|
-
} = React.useContext(ActionBarGroupContext);
|
|
435
|
-
const width = useWidth(ref);
|
|
436
334
|
const {
|
|
437
335
|
['aria-label']: ariaLabel,
|
|
438
336
|
icon
|
|
439
337
|
} = props;
|
|
440
|
-
const
|
|
338
|
+
const {
|
|
339
|
+
dataOverflowingAttr
|
|
340
|
+
} = useActionBarItem(ref, useMemo(() => ({
|
|
441
341
|
type: 'action',
|
|
442
342
|
label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : '',
|
|
443
343
|
icon,
|
|
444
344
|
disabled: !!disabled,
|
|
445
|
-
onClick: onClick
|
|
446
|
-
|
|
447
|
-
groupId: groupId !== null && groupId !== void 0 ? groupId : undefined
|
|
448
|
-
}), [ariaLabel, icon, disabled, onClick, groupId, width]);
|
|
449
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
345
|
+
onClick: onClick
|
|
346
|
+
}), [ariaLabel, icon, disabled, onClick]));
|
|
450
347
|
const clickHandler = useCallback(event => {
|
|
451
348
|
if (disabled) return;
|
|
452
349
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
453
350
|
}, [disabled, onClick]);
|
|
454
|
-
if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
|
|
455
351
|
return /*#__PURE__*/jsx(IconButton, {
|
|
456
352
|
"aria-disabled": disabled,
|
|
457
353
|
ref: ref,
|
|
458
354
|
size: size,
|
|
459
355
|
onClick: clickHandler,
|
|
460
356
|
...props,
|
|
461
|
-
variant: "invisible"
|
|
357
|
+
variant: "invisible",
|
|
358
|
+
"data-overflowing": dataOverflowingAttr
|
|
462
359
|
});
|
|
463
360
|
});
|
|
464
|
-
const ActionBarGroupContext = /*#__PURE__*/React.createContext(
|
|
465
|
-
groupId: null
|
|
466
|
-
});
|
|
361
|
+
const ActionBarGroupContext = /*#__PURE__*/React.createContext(null);
|
|
467
362
|
const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
468
363
|
const $ = c(10);
|
|
469
364
|
const {
|
|
@@ -471,39 +366,40 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
471
366
|
} = t0;
|
|
472
367
|
const backupRef = useRef(null);
|
|
473
368
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
474
|
-
const width = useWidth(ref);
|
|
475
369
|
let t1;
|
|
476
|
-
if ($[0]
|
|
370
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
477
371
|
t1 = {
|
|
478
|
-
type: "group"
|
|
479
|
-
width
|
|
372
|
+
type: "group"
|
|
480
373
|
};
|
|
481
|
-
$[0] =
|
|
482
|
-
$[1] = t1;
|
|
374
|
+
$[0] = t1;
|
|
483
375
|
} else {
|
|
484
|
-
t1 = $[
|
|
376
|
+
t1 = $[0];
|
|
485
377
|
}
|
|
486
|
-
const
|
|
487
|
-
|
|
378
|
+
const {
|
|
379
|
+
dataOverflowingAttr,
|
|
380
|
+
isOverflowing
|
|
381
|
+
} = useActionBarItem(ref, t1);
|
|
488
382
|
let t2;
|
|
489
|
-
if ($[
|
|
383
|
+
if ($[1] !== isOverflowing) {
|
|
490
384
|
t2 = {
|
|
491
|
-
|
|
385
|
+
isOverflowing
|
|
492
386
|
};
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
387
|
+
$[1] = isOverflowing;
|
|
388
|
+
$[2] = t2;
|
|
495
389
|
} else {
|
|
496
|
-
t2 = $[
|
|
390
|
+
t2 = $[2];
|
|
497
391
|
}
|
|
498
392
|
let t3;
|
|
499
|
-
if ($[
|
|
393
|
+
if ($[3] !== children || $[4] !== dataOverflowingAttr || $[5] !== ref) {
|
|
500
394
|
t3 = /*#__PURE__*/jsx("div", {
|
|
501
395
|
className: styles.Group,
|
|
502
396
|
"data-component": "ActionBar.Group",
|
|
503
397
|
ref: ref,
|
|
398
|
+
"data-overflowing": dataOverflowingAttr,
|
|
504
399
|
children: children
|
|
505
400
|
});
|
|
506
|
-
$[
|
|
401
|
+
$[3] = children;
|
|
402
|
+
$[4] = dataOverflowingAttr;
|
|
507
403
|
$[5] = ref;
|
|
508
404
|
$[6] = t3;
|
|
509
405
|
} else {
|
|
@@ -557,17 +453,12 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
557
453
|
}
|
|
558
454
|
const backupRef = useRef(null);
|
|
559
455
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
560
|
-
const {
|
|
561
|
-
isVisibleChild
|
|
562
|
-
} = React.useContext(ActionBarContext);
|
|
563
456
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
564
|
-
const width = useWidth(ref);
|
|
565
457
|
const t1 = overflowIcon ? overflowIcon : icon;
|
|
566
458
|
let t2;
|
|
567
|
-
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1
|
|
459
|
+
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1) {
|
|
568
460
|
t2 = {
|
|
569
461
|
type: "menu",
|
|
570
|
-
width,
|
|
571
462
|
label: ariaLabel,
|
|
572
463
|
icon: t1,
|
|
573
464
|
returnFocusRef,
|
|
@@ -577,28 +468,27 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
577
468
|
$[8] = items;
|
|
578
469
|
$[9] = returnFocusRef;
|
|
579
470
|
$[10] = t1;
|
|
580
|
-
$[11] =
|
|
581
|
-
$[12] = t2;
|
|
471
|
+
$[11] = t2;
|
|
582
472
|
} else {
|
|
583
|
-
t2 = $[
|
|
584
|
-
}
|
|
585
|
-
const registryProps = t2;
|
|
586
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
587
|
-
if (!isVisibleChild(id)) {
|
|
588
|
-
return null;
|
|
473
|
+
t2 = $[11];
|
|
589
474
|
}
|
|
475
|
+
const {
|
|
476
|
+
dataOverflowingAttr
|
|
477
|
+
} = useActionBarItem(ref, t2);
|
|
590
478
|
let t3;
|
|
591
|
-
if ($[
|
|
479
|
+
if ($[12] !== ariaLabel || $[13] !== dataOverflowingAttr || $[14] !== icon || $[15] !== props) {
|
|
592
480
|
t3 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
593
481
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
594
482
|
variant: "invisible",
|
|
595
483
|
"aria-label": ariaLabel,
|
|
596
484
|
icon: icon,
|
|
597
485
|
...props,
|
|
486
|
+
"data-overflowing": dataOverflowingAttr,
|
|
598
487
|
"data-component": "ActionBar.Menu.IconButton"
|
|
599
488
|
})
|
|
600
489
|
});
|
|
601
|
-
$[
|
|
490
|
+
$[12] = ariaLabel;
|
|
491
|
+
$[13] = dataOverflowingAttr;
|
|
602
492
|
$[14] = icon;
|
|
603
493
|
$[15] = props;
|
|
604
494
|
$[16] = t3;
|
|
@@ -617,7 +507,7 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
617
507
|
}
|
|
618
508
|
let t5;
|
|
619
509
|
if ($[19] !== items) {
|
|
620
|
-
t5 = items.map(
|
|
510
|
+
t5 = items.map(_temp7);
|
|
621
511
|
$[19] = items;
|
|
622
512
|
$[20] = t5;
|
|
623
513
|
} else {
|
|
@@ -666,68 +556,91 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
666
556
|
const VerticalDivider = () => {
|
|
667
557
|
const $ = c(3);
|
|
668
558
|
const ref = useRef(null);
|
|
669
|
-
const {
|
|
670
|
-
isVisibleChild
|
|
671
|
-
} = React.useContext(ActionBarContext);
|
|
672
|
-
const width = useWidth(ref);
|
|
673
559
|
let t0;
|
|
674
|
-
if ($[0]
|
|
560
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
675
561
|
t0 = {
|
|
676
|
-
type: "divider"
|
|
677
|
-
width
|
|
562
|
+
type: "divider"
|
|
678
563
|
};
|
|
679
|
-
$[0] =
|
|
680
|
-
$[1] = t0;
|
|
564
|
+
$[0] = t0;
|
|
681
565
|
} else {
|
|
682
|
-
t0 = $[
|
|
683
|
-
}
|
|
684
|
-
const registryProps = t0;
|
|
685
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
686
|
-
if (!isVisibleChild(id)) {
|
|
687
|
-
return null;
|
|
566
|
+
t0 = $[0];
|
|
688
567
|
}
|
|
568
|
+
const {
|
|
569
|
+
dataOverflowingAttr
|
|
570
|
+
} = useActionBarItem(ref, t0);
|
|
689
571
|
let t1;
|
|
690
|
-
if ($[
|
|
572
|
+
if ($[1] !== dataOverflowingAttr) {
|
|
691
573
|
t1 = /*#__PURE__*/jsx("div", {
|
|
692
574
|
ref: ref,
|
|
693
575
|
"data-component": "ActionBar.VerticalDivider",
|
|
694
576
|
"aria-hidden": "true",
|
|
695
|
-
className: styles.Divider
|
|
577
|
+
className: styles.Divider,
|
|
578
|
+
"data-overflowing": dataOverflowingAttr
|
|
696
579
|
});
|
|
580
|
+
$[1] = dataOverflowingAttr;
|
|
697
581
|
$[2] = t1;
|
|
698
582
|
} else {
|
|
699
583
|
t1 = $[2];
|
|
700
584
|
}
|
|
701
585
|
return t1;
|
|
702
586
|
};
|
|
703
|
-
function _temp() {
|
|
704
|
-
return
|
|
587
|
+
function _temp(entry) {
|
|
588
|
+
return entry[1] !== null;
|
|
705
589
|
}
|
|
706
|
-
function _temp2(
|
|
590
|
+
function _temp2(element) {
|
|
591
|
+
return element.matches(FOCUSABLE_ITEM_SELECTOR);
|
|
592
|
+
}
|
|
593
|
+
function _temp3(item, index) {
|
|
707
594
|
return renderMenuItem(item, index);
|
|
708
595
|
}
|
|
709
|
-
function
|
|
710
|
-
const [
|
|
711
|
-
if (
|
|
596
|
+
function _temp4(t0) {
|
|
597
|
+
const [id, menuItem] = t0;
|
|
598
|
+
if (menuItem.type === "divider") {
|
|
599
|
+
return /*#__PURE__*/jsx(ActionList.Divider, {}, id);
|
|
600
|
+
}
|
|
601
|
+
if (menuItem.type === "action") {
|
|
712
602
|
const {
|
|
713
|
-
onClick
|
|
714
|
-
icon:
|
|
715
|
-
label
|
|
716
|
-
disabled
|
|
717
|
-
} =
|
|
603
|
+
onClick,
|
|
604
|
+
icon: Icon,
|
|
605
|
+
label,
|
|
606
|
+
disabled
|
|
607
|
+
} = menuItem;
|
|
718
608
|
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
719
|
-
onSelect:
|
|
720
|
-
typeof
|
|
609
|
+
onSelect: event => {
|
|
610
|
+
typeof onClick === "function" && onClick(event);
|
|
721
611
|
},
|
|
722
|
-
disabled:
|
|
612
|
+
disabled: disabled,
|
|
723
613
|
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
724
|
-
children: /*#__PURE__*/jsx(
|
|
725
|
-
}),
|
|
726
|
-
},
|
|
614
|
+
children: /*#__PURE__*/jsx(Icon, {})
|
|
615
|
+
}), label]
|
|
616
|
+
}, label);
|
|
617
|
+
}
|
|
618
|
+
if (menuItem.type === "menu") {
|
|
619
|
+
const menuItems = menuItem.items;
|
|
620
|
+
const {
|
|
621
|
+
icon: Icon_0,
|
|
622
|
+
label: label_0,
|
|
623
|
+
returnFocusRef
|
|
624
|
+
} = menuItem;
|
|
625
|
+
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
626
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
627
|
+
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
628
|
+
children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
629
|
+
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
630
|
+
}) : null, label_0]
|
|
631
|
+
})
|
|
632
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
633
|
+
...(returnFocusRef && {
|
|
634
|
+
returnFocusRef
|
|
635
|
+
}),
|
|
636
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
637
|
+
children: menuItems.map(_temp3)
|
|
638
|
+
})
|
|
639
|
+
})]
|
|
640
|
+
}, id);
|
|
727
641
|
}
|
|
728
|
-
return null;
|
|
729
642
|
}
|
|
730
|
-
function
|
|
643
|
+
function _temp7(item, index) {
|
|
731
644
|
return renderMenuItem(item, index);
|
|
732
645
|
}
|
|
733
646
|
|