@primer/react 0.0.0-20260303165933 → 0.0.0-20260303170335
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 +5 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +281 -431
- package/dist/UnderlineNav/UnderlineNav-f506fb23.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-f506fb23.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +77 -325
- package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts +1 -11
- package/dist/UnderlineNav/UnderlineNavContext.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavContext.js +1 -4
- package/dist/UnderlineNav/UnderlineNavItem-db9dc5d0.css +2 -0
- package/dist/UnderlineNav/UnderlineNavItem-db9dc5d0.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNavItem.d.ts +6 -0
- package/dist/UnderlineNav/UnderlineNavItem.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavItem.js +28 -36
- package/dist/UnderlineNav/UnderlineNavItem.module.css.js +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +1 -1
- package/dist/internal/components/UnderlineTabbedInterface-be1a162c.css +2 -0
- package/dist/internal/components/UnderlineTabbedInterface-be1a162c.css.map +1 -0
- package/dist/internal/components/UnderlineTabbedInterface.d.ts +0 -1
- package/dist/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.js +66 -60
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
- package/dist/utils/descendant-registry.d.ts +32 -0
- package/dist/utils/descendant-registry.d.ts.map +1 -0
- package/dist/utils/descendant-registry.js +222 -0
- package/generated/components.json +1 -1
- package/package.json +1 -1
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css +0 -2
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css.map +0 -1
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css +0 -2
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css.map +0 -1
- package/dist/UnderlineNav/styles.d.ts +0 -16
- package/dist/UnderlineNav/styles.d.ts.map +0 -1
- package/dist/UnderlineNav/styles.js +0 -19
- package/dist/internal/components/UnderlineTabbedInterface-4197ee28.css +0 -2
- package/dist/internal/components/UnderlineTabbedInterface-4197ee28.css.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import React, { useRef, useState, forwardRef,
|
|
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
5
|
import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
|
|
@@ -8,6 +8,7 @@ import { IconButton } from '../Button/IconButton.js';
|
|
|
8
8
|
import { useFocusZone } from '../hooks/useFocusZone.js';
|
|
9
9
|
import styles from './ActionBar.module.css.js';
|
|
10
10
|
import { clsx } from 'clsx';
|
|
11
|
+
import { createDescendantRegistry } from '../utils/descendant-registry.js';
|
|
11
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
13
|
import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
|
|
13
14
|
import { FocusKeys } from '@primer/behaviors';
|
|
@@ -22,8 +23,6 @@ const ACTIONBAR_ITEM_GAP = 8;
|
|
|
22
23
|
|
|
23
24
|
const ActionBarContext = /*#__PURE__*/React.createContext({
|
|
24
25
|
size: 'medium',
|
|
25
|
-
registerChild: () => {},
|
|
26
|
-
unregisterChild: () => {},
|
|
27
26
|
isVisibleChild: () => true,
|
|
28
27
|
groupId: undefined
|
|
29
28
|
});
|
|
@@ -33,6 +32,7 @@ small (28px), medium (32px), large (40px)
|
|
|
33
32
|
*/
|
|
34
33
|
|
|
35
34
|
const MORE_BTN_WIDTH = 32;
|
|
35
|
+
const ActionBarItemsRegistry = createDescendantRegistry();
|
|
36
36
|
const calculatePossibleItems = (registryEntries, navWidth, gap, moreMenuWidth = 0) => {
|
|
37
37
|
const widthToFit = navWidth - moreMenuWidth;
|
|
38
38
|
let breakpoint = registryEntries.length; // assume all items will fit
|
|
@@ -97,7 +97,8 @@ const renderMenuItem = (item, index) => {
|
|
|
97
97
|
};
|
|
98
98
|
renderMenuItem.displayName = "renderMenuItem";
|
|
99
99
|
const getMenuItems = (navWidth, moreMenuWidth, childRegistry, hasActiveMenu, gap) => {
|
|
100
|
-
|
|
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));
|
|
101
102
|
if (registryEntries.length === 0) return new Set();
|
|
102
103
|
const numberOfItemsPossible = calculatePossibleItems(registryEntries, navWidth, gap);
|
|
103
104
|
const numberOfItemsPossibleWithMoreMenu = calculatePossibleItems(registryEntries, navWidth, gap, moreMenuWidth || MORE_BTN_WIDTH);
|
|
@@ -132,7 +133,7 @@ const getMenuItems = (navWidth, moreMenuWidth, childRegistry, hasActiveMenu, gap
|
|
|
132
133
|
}
|
|
133
134
|
};
|
|
134
135
|
const ActionBar = props => {
|
|
135
|
-
const $ = c(
|
|
136
|
+
const $ = c(38);
|
|
136
137
|
const {
|
|
137
138
|
size: t0,
|
|
138
139
|
children,
|
|
@@ -147,28 +148,12 @@ const ActionBar = props => {
|
|
|
147
148
|
const gap = t2 === undefined ? "condensed" : t2;
|
|
148
149
|
const listRef = useRef(null);
|
|
149
150
|
const [computedGap, setComputedGap] = useState(ACTIONBAR_ITEM_GAP);
|
|
150
|
-
const [childRegistry, setChildRegistry] =
|
|
151
|
+
const [childRegistry, setChildRegistry] = ActionBarItemsRegistry.useRegistryState();
|
|
152
|
+
const [menuItemIds, setMenuItemIds] = useState(_temp);
|
|
153
|
+
const navRef = useRef(null);
|
|
151
154
|
let t3;
|
|
152
155
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
153
|
-
t3 = (
|
|
154
|
-
$[0] = t3;
|
|
155
|
-
} else {
|
|
156
|
-
t3 = $[0];
|
|
157
|
-
}
|
|
158
|
-
const registerChild = t3;
|
|
159
|
-
let t4;
|
|
160
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
161
|
-
t4 = id_0 => setChildRegistry(prev_0 => new Map(prev_0).set(id_0, null));
|
|
162
|
-
$[1] = t4;
|
|
163
|
-
} else {
|
|
164
|
-
t4 = $[1];
|
|
165
|
-
}
|
|
166
|
-
const unregisterChild = t4;
|
|
167
|
-
const [menuItemIds, setMenuItemIds] = useState(_temp2);
|
|
168
|
-
const navRef = useRef(null);
|
|
169
|
-
let t5;
|
|
170
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
171
|
-
t5 = () => {
|
|
156
|
+
t3 = () => {
|
|
172
157
|
if (!listRef.current) {
|
|
173
158
|
return;
|
|
174
159
|
}
|
|
@@ -178,23 +163,23 @@ const ActionBar = props => {
|
|
|
178
163
|
setComputedGap(parsed);
|
|
179
164
|
}
|
|
180
165
|
};
|
|
181
|
-
$[
|
|
166
|
+
$[0] = t3;
|
|
182
167
|
} else {
|
|
183
|
-
|
|
168
|
+
t3 = $[0];
|
|
184
169
|
}
|
|
185
|
-
let
|
|
186
|
-
if ($[
|
|
187
|
-
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
170
|
+
let t4;
|
|
171
|
+
if ($[1] !== gap) {
|
|
172
|
+
t4 = [gap];
|
|
173
|
+
$[1] = gap;
|
|
174
|
+
$[2] = t4;
|
|
190
175
|
} else {
|
|
191
|
-
|
|
176
|
+
t4 = $[2];
|
|
192
177
|
}
|
|
193
|
-
useIsomorphicLayoutEffect(
|
|
178
|
+
useIsomorphicLayoutEffect(t3, t4);
|
|
194
179
|
const moreMenuRef = useRef(null);
|
|
195
|
-
let
|
|
196
|
-
if ($[
|
|
197
|
-
|
|
180
|
+
let t5;
|
|
181
|
+
if ($[3] !== childRegistry || $[4] !== computedGap || $[5] !== menuItemIds.size) {
|
|
182
|
+
t5 = resizeObserverEntries => {
|
|
198
183
|
var _moreMenuRef$current$, _moreMenuRef$current;
|
|
199
184
|
const navWidth = resizeObserverEntries[0].contentRect.width;
|
|
200
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;
|
|
@@ -206,76 +191,86 @@ const ActionBar = props => {
|
|
|
206
191
|
}
|
|
207
192
|
}
|
|
208
193
|
};
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
194
|
+
$[3] = childRegistry;
|
|
195
|
+
$[4] = computedGap;
|
|
196
|
+
$[5] = menuItemIds.size;
|
|
197
|
+
$[6] = t5;
|
|
213
198
|
} else {
|
|
214
|
-
|
|
199
|
+
t5 = $[6];
|
|
215
200
|
}
|
|
216
|
-
useResizeObserver(
|
|
217
|
-
let
|
|
218
|
-
if ($[
|
|
219
|
-
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
201
|
+
useResizeObserver(t5, navRef);
|
|
202
|
+
let t6;
|
|
203
|
+
if ($[7] !== menuItemIds) {
|
|
204
|
+
t6 = id => !menuItemIds.has(id);
|
|
205
|
+
$[7] = menuItemIds;
|
|
206
|
+
$[8] = t6;
|
|
222
207
|
} else {
|
|
223
|
-
|
|
208
|
+
t6 = $[8];
|
|
224
209
|
}
|
|
225
|
-
const isVisibleChild =
|
|
226
|
-
let
|
|
227
|
-
if ($[
|
|
228
|
-
|
|
210
|
+
const isVisibleChild = t6;
|
|
211
|
+
let t7;
|
|
212
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
213
|
+
t7 = {
|
|
229
214
|
containerRef: listRef,
|
|
230
215
|
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
231
216
|
focusOutBehavior: "wrap"
|
|
232
217
|
};
|
|
233
|
-
$[
|
|
218
|
+
$[9] = t7;
|
|
234
219
|
} else {
|
|
235
|
-
|
|
220
|
+
t7 = $[9];
|
|
236
221
|
}
|
|
237
|
-
useFocusZone(
|
|
222
|
+
useFocusZone(t7);
|
|
238
223
|
let groupedItemsMap;
|
|
239
|
-
if ($[
|
|
224
|
+
if ($[10] !== childRegistry) {
|
|
240
225
|
groupedItemsMap = new Map();
|
|
241
|
-
for (const [key,
|
|
242
|
-
if (
|
|
243
|
-
const existingGroup = groupedItemsMap.get(
|
|
244
|
-
existingGroup.push([key,
|
|
245
|
-
groupedItemsMap.set(
|
|
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);
|
|
246
231
|
}
|
|
247
232
|
}
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
233
|
+
$[10] = childRegistry;
|
|
234
|
+
$[11] = groupedItemsMap;
|
|
250
235
|
} else {
|
|
251
|
-
groupedItemsMap = $[
|
|
236
|
+
groupedItemsMap = $[11];
|
|
252
237
|
}
|
|
253
238
|
const groupedItems = groupedItemsMap;
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
239
|
+
let t8;
|
|
240
|
+
if ($[12] !== isVisibleChild || $[13] !== size) {
|
|
241
|
+
t8 = {
|
|
257
242
|
size,
|
|
258
|
-
registerChild,
|
|
259
|
-
unregisterChild,
|
|
260
243
|
isVisibleChild
|
|
261
244
|
};
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
245
|
+
$[12] = isVisibleChild;
|
|
246
|
+
$[13] = size;
|
|
247
|
+
$[14] = t8;
|
|
265
248
|
} else {
|
|
266
|
-
|
|
249
|
+
t8 = $[14];
|
|
267
250
|
}
|
|
268
|
-
let
|
|
269
|
-
if ($[
|
|
270
|
-
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
251
|
+
let t9;
|
|
252
|
+
if ($[15] !== className) {
|
|
253
|
+
t9 = clsx(className, styles.Nav);
|
|
254
|
+
$[15] = className;
|
|
255
|
+
$[16] = t9;
|
|
273
256
|
} else {
|
|
274
|
-
|
|
257
|
+
t9 = $[16];
|
|
275
258
|
}
|
|
276
|
-
let
|
|
277
|
-
if ($[
|
|
278
|
-
|
|
259
|
+
let t10;
|
|
260
|
+
if ($[17] !== children || $[18] !== setChildRegistry) {
|
|
261
|
+
t10 = /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
|
|
262
|
+
setRegistry: setChildRegistry,
|
|
263
|
+
children: children
|
|
264
|
+
});
|
|
265
|
+
$[17] = children;
|
|
266
|
+
$[18] = setChildRegistry;
|
|
267
|
+
$[19] = t10;
|
|
268
|
+
} else {
|
|
269
|
+
t10 = $[19];
|
|
270
|
+
}
|
|
271
|
+
let t11;
|
|
272
|
+
if ($[20] !== ariaLabel || $[21] !== childRegistry || $[22] !== groupedItems || $[23] !== menuItemIds) {
|
|
273
|
+
t11 = menuItemIds.size > 0 && /*#__PURE__*/jsxs(ActionMenu, {
|
|
279
274
|
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
280
275
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
281
276
|
variant: "invisible",
|
|
@@ -284,13 +279,13 @@ const ActionBar = props => {
|
|
|
284
279
|
})
|
|
285
280
|
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
286
281
|
children: /*#__PURE__*/jsx(ActionList, {
|
|
287
|
-
children: Array.from(menuItemIds).map(
|
|
288
|
-
const menuItem = childRegistry.get(
|
|
282
|
+
children: Array.from(menuItemIds).map(id_0 => {
|
|
283
|
+
const menuItem = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.get(id_0);
|
|
289
284
|
if (!menuItem) {
|
|
290
285
|
return null;
|
|
291
286
|
}
|
|
292
287
|
if (menuItem.type === "divider") {
|
|
293
|
-
return /*#__PURE__*/jsx(ActionList.Divider, {},
|
|
288
|
+
return /*#__PURE__*/jsx(ActionList.Divider, {}, id_0);
|
|
294
289
|
} else {
|
|
295
290
|
if (menuItem.type === "action") {
|
|
296
291
|
const {
|
|
@@ -329,292 +324,205 @@ const ActionBar = props => {
|
|
|
329
324
|
returnFocusRef
|
|
330
325
|
}),
|
|
331
326
|
children: /*#__PURE__*/jsx(ActionList, {
|
|
332
|
-
children: menuItems.map(
|
|
327
|
+
children: menuItems.map(_temp2)
|
|
333
328
|
})
|
|
334
329
|
})]
|
|
335
|
-
},
|
|
330
|
+
}, id_0);
|
|
336
331
|
}
|
|
337
|
-
const groupedMenuItems = groupedItems.get(
|
|
332
|
+
const groupedMenuItems = groupedItems.get(id_0) || [];
|
|
338
333
|
if (menuItem.type === "group") {
|
|
339
334
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
340
|
-
children: groupedMenuItems.map(
|
|
341
|
-
},
|
|
335
|
+
children: groupedMenuItems.map(_temp3)
|
|
336
|
+
}, id_0);
|
|
342
337
|
}
|
|
343
338
|
})
|
|
344
339
|
})
|
|
345
340
|
})]
|
|
346
341
|
});
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
342
|
+
$[20] = ariaLabel;
|
|
343
|
+
$[21] = childRegistry;
|
|
344
|
+
$[22] = groupedItems;
|
|
345
|
+
$[23] = menuItemIds;
|
|
346
|
+
$[24] = t11;
|
|
352
347
|
} else {
|
|
353
|
-
|
|
348
|
+
t11 = $[24];
|
|
354
349
|
}
|
|
355
|
-
let
|
|
356
|
-
if ($[
|
|
357
|
-
|
|
350
|
+
let t12;
|
|
351
|
+
if ($[25] !== ariaLabel || $[26] !== ariaLabelledBy || $[27] !== gap || $[28] !== t10 || $[29] !== t11) {
|
|
352
|
+
t12 = /*#__PURE__*/jsxs("div", {
|
|
358
353
|
ref: listRef,
|
|
359
354
|
role: "toolbar",
|
|
360
355
|
className: styles.List,
|
|
361
356
|
"aria-label": ariaLabel,
|
|
362
357
|
"aria-labelledby": ariaLabelledBy,
|
|
363
358
|
"data-gap": gap,
|
|
364
|
-
children: [
|
|
359
|
+
children: [t10, t11]
|
|
365
360
|
});
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[26] = children;
|
|
361
|
+
$[25] = ariaLabel;
|
|
362
|
+
$[26] = ariaLabelledBy;
|
|
369
363
|
$[27] = gap;
|
|
370
|
-
$[28] =
|
|
371
|
-
$[29] =
|
|
364
|
+
$[28] = t10;
|
|
365
|
+
$[29] = t11;
|
|
366
|
+
$[30] = t12;
|
|
372
367
|
} else {
|
|
373
|
-
|
|
368
|
+
t12 = $[30];
|
|
374
369
|
}
|
|
375
|
-
let
|
|
376
|
-
if ($[
|
|
377
|
-
|
|
370
|
+
let t13;
|
|
371
|
+
if ($[31] !== flush || $[32] !== t12 || $[33] !== t9) {
|
|
372
|
+
t13 = /*#__PURE__*/jsx("div", {
|
|
378
373
|
ref: navRef,
|
|
379
|
-
className:
|
|
374
|
+
className: t9,
|
|
380
375
|
"data-flush": flush,
|
|
381
|
-
children:
|
|
376
|
+
children: t12
|
|
382
377
|
});
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
378
|
+
$[31] = flush;
|
|
379
|
+
$[32] = t12;
|
|
380
|
+
$[33] = t9;
|
|
381
|
+
$[34] = t13;
|
|
387
382
|
} else {
|
|
388
|
-
|
|
383
|
+
t13 = $[34];
|
|
389
384
|
}
|
|
390
|
-
let
|
|
391
|
-
if ($[
|
|
392
|
-
|
|
393
|
-
value:
|
|
394
|
-
children:
|
|
385
|
+
let t14;
|
|
386
|
+
if ($[35] !== t13 || $[36] !== t8) {
|
|
387
|
+
t14 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
|
|
388
|
+
value: t8,
|
|
389
|
+
children: t13
|
|
395
390
|
});
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
391
|
+
$[35] = t13;
|
|
392
|
+
$[36] = t8;
|
|
393
|
+
$[37] = t14;
|
|
399
394
|
} else {
|
|
400
|
-
|
|
395
|
+
t14 = $[37];
|
|
401
396
|
}
|
|
402
|
-
return
|
|
397
|
+
return t14;
|
|
403
398
|
};
|
|
404
|
-
|
|
405
|
-
const $ = c(
|
|
406
|
-
|
|
407
|
-
let
|
|
408
|
-
let
|
|
409
|
-
if ($[0] !==
|
|
410
|
-
({
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
$[0] =
|
|
416
|
-
$[1] =
|
|
417
|
-
$[2] =
|
|
418
|
-
$[3] = props;
|
|
399
|
+
function useWidth(ref) {
|
|
400
|
+
const $ = c(3);
|
|
401
|
+
const [width, setWidth] = useState(-1);
|
|
402
|
+
let t0;
|
|
403
|
+
let t1;
|
|
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);
|
|
408
|
+
};
|
|
409
|
+
t1 = [ref];
|
|
410
|
+
$[0] = ref;
|
|
411
|
+
$[1] = t0;
|
|
412
|
+
$[2] = t1;
|
|
419
413
|
} else {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
props = $[3];
|
|
414
|
+
t0 = $[1];
|
|
415
|
+
t1 = $[2];
|
|
423
416
|
}
|
|
417
|
+
useIsomorphicLayoutEffect(t0, t1);
|
|
418
|
+
return width;
|
|
419
|
+
}
|
|
420
|
+
const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
421
|
+
disabled,
|
|
422
|
+
onClick,
|
|
423
|
+
...props
|
|
424
|
+
}, forwardedRef) => {
|
|
424
425
|
const ref = useRef(null);
|
|
425
426
|
useRefObjectAsForwardedRef(forwardedRef, ref);
|
|
426
|
-
const id = useId();
|
|
427
427
|
const {
|
|
428
428
|
size,
|
|
429
|
-
registerChild,
|
|
430
|
-
unregisterChild,
|
|
431
429
|
isVisibleChild
|
|
432
430
|
} = React.useContext(ActionBarContext);
|
|
433
431
|
const {
|
|
434
432
|
groupId
|
|
435
433
|
} = React.useContext(ActionBarGroupContext);
|
|
436
|
-
const
|
|
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
|
-
$[7] = onClick;
|
|
465
|
-
$[8] = props;
|
|
466
|
-
$[9] = registerChild;
|
|
467
|
-
$[10] = unregisterChild;
|
|
468
|
-
$[11] = t1;
|
|
469
|
-
} else {
|
|
470
|
-
t1 = $[11];
|
|
471
|
-
}
|
|
472
|
-
const t2 = props["aria-label"];
|
|
473
|
-
let t3;
|
|
474
|
-
if ($[12] !== disabled || $[13] !== onClick || $[14] !== props.icon || $[15] !== registerChild || $[16] !== t2 || $[17] !== unregisterChild) {
|
|
475
|
-
t3 = [registerChild, unregisterChild, t2, props.icon, disabled, onClick];
|
|
476
|
-
$[12] = disabled;
|
|
477
|
-
$[13] = onClick;
|
|
478
|
-
$[14] = props.icon;
|
|
479
|
-
$[15] = registerChild;
|
|
480
|
-
$[16] = t2;
|
|
481
|
-
$[17] = unregisterChild;
|
|
482
|
-
$[18] = t3;
|
|
483
|
-
} else {
|
|
484
|
-
t3 = $[18];
|
|
485
|
-
}
|
|
486
|
-
useIsomorphicLayoutEffect(t1, t3);
|
|
487
|
-
let t4;
|
|
488
|
-
if ($[19] !== disabled || $[20] !== onClick) {
|
|
489
|
-
t4 = event => {
|
|
490
|
-
var _onClick;
|
|
491
|
-
if (disabled) {
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
(_onClick = onClick) === null || _onClick === void 0 ? void 0 : _onClick(event);
|
|
495
|
-
};
|
|
496
|
-
$[19] = disabled;
|
|
497
|
-
$[20] = onClick;
|
|
498
|
-
$[21] = t4;
|
|
499
|
-
} else {
|
|
500
|
-
t4 = $[21];
|
|
501
|
-
}
|
|
502
|
-
const clickHandler = t4;
|
|
503
|
-
if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) {
|
|
504
|
-
return null;
|
|
505
|
-
}
|
|
506
|
-
let t5;
|
|
507
|
-
if ($[22] !== clickHandler || $[23] !== disabled || $[24] !== props || $[25] !== size) {
|
|
508
|
-
t5 = /*#__PURE__*/jsx(IconButton, {
|
|
509
|
-
"aria-disabled": disabled,
|
|
510
|
-
ref: ref,
|
|
511
|
-
size: size,
|
|
512
|
-
onClick: clickHandler,
|
|
513
|
-
...props,
|
|
514
|
-
variant: "invisible"
|
|
515
|
-
});
|
|
516
|
-
$[22] = clickHandler;
|
|
517
|
-
$[23] = disabled;
|
|
518
|
-
$[24] = props;
|
|
519
|
-
$[25] = size;
|
|
520
|
-
$[26] = t5;
|
|
521
|
-
} else {
|
|
522
|
-
t5 = $[26];
|
|
523
|
-
}
|
|
524
|
-
return t5;
|
|
434
|
+
const width = useWidth(ref);
|
|
435
|
+
const {
|
|
436
|
+
['aria-label']: ariaLabel,
|
|
437
|
+
icon
|
|
438
|
+
} = props;
|
|
439
|
+
const registryProps = useMemo(() => ({
|
|
440
|
+
type: 'action',
|
|
441
|
+
label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : '',
|
|
442
|
+
icon,
|
|
443
|
+
disabled: !!disabled,
|
|
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);
|
|
449
|
+
const clickHandler = useCallback(event => {
|
|
450
|
+
if (disabled) return;
|
|
451
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
452
|
+
}, [disabled, onClick]);
|
|
453
|
+
if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
|
|
454
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
455
|
+
"aria-disabled": disabled,
|
|
456
|
+
ref: ref,
|
|
457
|
+
size: size,
|
|
458
|
+
onClick: clickHandler,
|
|
459
|
+
...props,
|
|
460
|
+
variant: "invisible"
|
|
461
|
+
});
|
|
525
462
|
});
|
|
526
463
|
const ActionBarGroupContext = /*#__PURE__*/React.createContext({
|
|
527
464
|
groupId: null
|
|
528
465
|
});
|
|
529
466
|
const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
530
|
-
const $ = c(
|
|
467
|
+
const $ = c(10);
|
|
531
468
|
const {
|
|
532
469
|
children
|
|
533
470
|
} = t0;
|
|
534
471
|
const backupRef = useRef(null);
|
|
535
472
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
536
|
-
const
|
|
537
|
-
const {
|
|
538
|
-
registerChild,
|
|
539
|
-
unregisterChild
|
|
540
|
-
} = React.useContext(ActionBarContext);
|
|
541
|
-
const widthRef = useRef();
|
|
473
|
+
const width = useWidth(ref);
|
|
542
474
|
let t1;
|
|
543
|
-
if ($[0] !==
|
|
544
|
-
t1 =
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
if (width) {
|
|
548
|
-
widthRef.current = width;
|
|
549
|
-
}
|
|
550
|
-
if (!widthRef.current) {
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
registerChild(id, {
|
|
554
|
-
type: "group",
|
|
555
|
-
width: widthRef.current
|
|
556
|
-
});
|
|
557
|
-
return () => {
|
|
558
|
-
unregisterChild(id);
|
|
559
|
-
};
|
|
475
|
+
if ($[0] !== width) {
|
|
476
|
+
t1 = {
|
|
477
|
+
type: "group",
|
|
478
|
+
width
|
|
560
479
|
};
|
|
561
|
-
$[0] =
|
|
562
|
-
$[1] =
|
|
563
|
-
$[2] = registerChild;
|
|
564
|
-
$[3] = unregisterChild;
|
|
565
|
-
$[4] = t1;
|
|
480
|
+
$[0] = width;
|
|
481
|
+
$[1] = t1;
|
|
566
482
|
} else {
|
|
567
|
-
t1 = $[
|
|
483
|
+
t1 = $[1];
|
|
568
484
|
}
|
|
485
|
+
const registryProps = t1;
|
|
486
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
569
487
|
let t2;
|
|
570
|
-
if ($[
|
|
571
|
-
t2 =
|
|
572
|
-
$[5] = registerChild;
|
|
573
|
-
$[6] = unregisterChild;
|
|
574
|
-
$[7] = t2;
|
|
575
|
-
} else {
|
|
576
|
-
t2 = $[7];
|
|
577
|
-
}
|
|
578
|
-
useIsomorphicLayoutEffect(t1, t2);
|
|
579
|
-
let t3;
|
|
580
|
-
if ($[8] !== id) {
|
|
581
|
-
t3 = {
|
|
488
|
+
if ($[2] !== id) {
|
|
489
|
+
t2 = {
|
|
582
490
|
groupId: id
|
|
583
491
|
};
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
492
|
+
$[2] = id;
|
|
493
|
+
$[3] = t2;
|
|
586
494
|
} else {
|
|
587
|
-
|
|
495
|
+
t2 = $[3];
|
|
588
496
|
}
|
|
589
|
-
let
|
|
590
|
-
if ($[
|
|
591
|
-
|
|
497
|
+
let t3;
|
|
498
|
+
if ($[4] !== children || $[5] !== ref) {
|
|
499
|
+
t3 = /*#__PURE__*/jsx("div", {
|
|
592
500
|
className: styles.Group,
|
|
593
501
|
ref: ref,
|
|
594
502
|
children: children
|
|
595
503
|
});
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
504
|
+
$[4] = children;
|
|
505
|
+
$[5] = ref;
|
|
506
|
+
$[6] = t3;
|
|
599
507
|
} else {
|
|
600
|
-
|
|
508
|
+
t3 = $[6];
|
|
601
509
|
}
|
|
602
|
-
let
|
|
603
|
-
if ($[
|
|
604
|
-
|
|
605
|
-
value:
|
|
606
|
-
children:
|
|
510
|
+
let t4;
|
|
511
|
+
if ($[7] !== t2 || $[8] !== t3) {
|
|
512
|
+
t4 = /*#__PURE__*/jsx(ActionBarGroupContext.Provider, {
|
|
513
|
+
value: t2,
|
|
514
|
+
children: t3
|
|
607
515
|
});
|
|
608
|
-
$[
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
516
|
+
$[7] = t2;
|
|
517
|
+
$[8] = t3;
|
|
518
|
+
$[9] = t4;
|
|
611
519
|
} else {
|
|
612
|
-
|
|
520
|
+
t4 = $[9];
|
|
613
521
|
}
|
|
614
|
-
return
|
|
522
|
+
return t4;
|
|
615
523
|
});
|
|
616
524
|
const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
617
|
-
const $ = c(
|
|
525
|
+
const $ = c(31);
|
|
618
526
|
let ariaLabel;
|
|
619
527
|
let icon;
|
|
620
528
|
let items;
|
|
@@ -647,69 +555,38 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
647
555
|
}
|
|
648
556
|
const backupRef = useRef(null);
|
|
649
557
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
650
|
-
const id = useId();
|
|
651
558
|
const {
|
|
652
|
-
registerChild,
|
|
653
|
-
unregisterChild,
|
|
654
559
|
isVisibleChild
|
|
655
560
|
} = React.useContext(ActionBarContext);
|
|
656
561
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
}
|
|
669
|
-
registerChild(id, {
|
|
670
|
-
type: "menu",
|
|
671
|
-
width: widthRef.current,
|
|
672
|
-
label: ariaLabel,
|
|
673
|
-
icon: overflowIcon ? overflowIcon : icon,
|
|
674
|
-
returnFocusRef,
|
|
675
|
-
items
|
|
676
|
-
});
|
|
677
|
-
return () => {
|
|
678
|
-
unregisterChild(id);
|
|
679
|
-
};
|
|
562
|
+
const width = useWidth(ref);
|
|
563
|
+
const t1 = overflowIcon ? overflowIcon : icon;
|
|
564
|
+
let t2;
|
|
565
|
+
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1 || $[11] !== width) {
|
|
566
|
+
t2 = {
|
|
567
|
+
type: "menu",
|
|
568
|
+
width,
|
|
569
|
+
label: ariaLabel,
|
|
570
|
+
icon: t1,
|
|
571
|
+
returnFocusRef,
|
|
572
|
+
items
|
|
680
573
|
};
|
|
681
574
|
$[7] = ariaLabel;
|
|
682
|
-
$[8] =
|
|
683
|
-
$[9] =
|
|
684
|
-
$[10] =
|
|
685
|
-
$[11] =
|
|
686
|
-
$[12] =
|
|
687
|
-
$[13] = registerChild;
|
|
688
|
-
$[14] = returnFocusRef;
|
|
689
|
-
$[15] = unregisterChild;
|
|
690
|
-
$[16] = t1;
|
|
691
|
-
} else {
|
|
692
|
-
t1 = $[16];
|
|
693
|
-
}
|
|
694
|
-
let t2;
|
|
695
|
-
if ($[17] !== ariaLabel || $[18] !== icon || $[19] !== items || $[20] !== overflowIcon || $[21] !== registerChild || $[22] !== unregisterChild) {
|
|
696
|
-
t2 = [registerChild, unregisterChild, ariaLabel, overflowIcon, icon, items];
|
|
697
|
-
$[17] = ariaLabel;
|
|
698
|
-
$[18] = icon;
|
|
699
|
-
$[19] = items;
|
|
700
|
-
$[20] = overflowIcon;
|
|
701
|
-
$[21] = registerChild;
|
|
702
|
-
$[22] = unregisterChild;
|
|
703
|
-
$[23] = t2;
|
|
575
|
+
$[8] = items;
|
|
576
|
+
$[9] = returnFocusRef;
|
|
577
|
+
$[10] = t1;
|
|
578
|
+
$[11] = width;
|
|
579
|
+
$[12] = t2;
|
|
704
580
|
} else {
|
|
705
|
-
t2 = $[
|
|
581
|
+
t2 = $[12];
|
|
706
582
|
}
|
|
707
|
-
|
|
583
|
+
const registryProps = t2;
|
|
584
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
708
585
|
if (!isVisibleChild(id)) {
|
|
709
586
|
return null;
|
|
710
587
|
}
|
|
711
588
|
let t3;
|
|
712
|
-
if ($[
|
|
589
|
+
if ($[13] !== ariaLabel || $[14] !== icon || $[15] !== props) {
|
|
713
590
|
t3 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
714
591
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
715
592
|
variant: "invisible",
|
|
@@ -718,150 +595,123 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
718
595
|
...props
|
|
719
596
|
})
|
|
720
597
|
});
|
|
721
|
-
$[
|
|
722
|
-
$[
|
|
723
|
-
$[
|
|
724
|
-
$[
|
|
598
|
+
$[13] = ariaLabel;
|
|
599
|
+
$[14] = icon;
|
|
600
|
+
$[15] = props;
|
|
601
|
+
$[16] = t3;
|
|
725
602
|
} else {
|
|
726
|
-
t3 = $[
|
|
603
|
+
t3 = $[16];
|
|
727
604
|
}
|
|
728
605
|
let t4;
|
|
729
|
-
if ($[
|
|
606
|
+
if ($[17] !== returnFocusRef) {
|
|
730
607
|
t4 = returnFocusRef && {
|
|
731
608
|
returnFocusRef
|
|
732
609
|
};
|
|
733
|
-
$[
|
|
734
|
-
$[
|
|
610
|
+
$[17] = returnFocusRef;
|
|
611
|
+
$[18] = t4;
|
|
735
612
|
} else {
|
|
736
|
-
t4 = $[
|
|
613
|
+
t4 = $[18];
|
|
737
614
|
}
|
|
738
615
|
let t5;
|
|
739
|
-
if ($[
|
|
740
|
-
t5 = items.map(
|
|
741
|
-
$[
|
|
742
|
-
$[
|
|
616
|
+
if ($[19] !== items) {
|
|
617
|
+
t5 = items.map(_temp4);
|
|
618
|
+
$[19] = items;
|
|
619
|
+
$[20] = t5;
|
|
743
620
|
} else {
|
|
744
|
-
t5 = $[
|
|
621
|
+
t5 = $[20];
|
|
745
622
|
}
|
|
746
623
|
let t6;
|
|
747
|
-
if ($[
|
|
624
|
+
if ($[21] !== t5) {
|
|
748
625
|
t6 = /*#__PURE__*/jsx(ActionList, {
|
|
749
626
|
children: t5
|
|
750
627
|
});
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
628
|
+
$[21] = t5;
|
|
629
|
+
$[22] = t6;
|
|
753
630
|
} else {
|
|
754
|
-
t6 = $[
|
|
631
|
+
t6 = $[22];
|
|
755
632
|
}
|
|
756
633
|
let t7;
|
|
757
|
-
if ($[
|
|
634
|
+
if ($[23] !== t4 || $[24] !== t6) {
|
|
758
635
|
t7 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
759
636
|
...t4,
|
|
760
637
|
children: t6
|
|
761
638
|
});
|
|
762
|
-
$[
|
|
763
|
-
$[
|
|
764
|
-
$[
|
|
639
|
+
$[23] = t4;
|
|
640
|
+
$[24] = t6;
|
|
641
|
+
$[25] = t7;
|
|
765
642
|
} else {
|
|
766
|
-
t7 = $[
|
|
643
|
+
t7 = $[25];
|
|
767
644
|
}
|
|
768
645
|
let t8;
|
|
769
|
-
if ($[
|
|
646
|
+
if ($[26] !== menuOpen || $[27] !== ref || $[28] !== t3 || $[29] !== t7) {
|
|
770
647
|
t8 = /*#__PURE__*/jsxs(ActionMenu, {
|
|
771
648
|
anchorRef: ref,
|
|
772
649
|
open: menuOpen,
|
|
773
650
|
onOpenChange: setMenuOpen,
|
|
774
651
|
children: [t3, t7]
|
|
775
652
|
});
|
|
776
|
-
$[
|
|
777
|
-
$[
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
653
|
+
$[26] = menuOpen;
|
|
654
|
+
$[27] = ref;
|
|
655
|
+
$[28] = t3;
|
|
656
|
+
$[29] = t7;
|
|
657
|
+
$[30] = t8;
|
|
781
658
|
} else {
|
|
782
|
-
t8 = $[
|
|
659
|
+
t8 = $[30];
|
|
783
660
|
}
|
|
784
661
|
return t8;
|
|
785
662
|
});
|
|
786
663
|
const VerticalDivider = () => {
|
|
787
|
-
const $ = c(
|
|
664
|
+
const $ = c(3);
|
|
788
665
|
const ref = useRef(null);
|
|
789
|
-
const id = useId();
|
|
790
666
|
const {
|
|
791
|
-
registerChild,
|
|
792
|
-
unregisterChild,
|
|
793
667
|
isVisibleChild
|
|
794
668
|
} = React.useContext(ActionBarContext);
|
|
795
|
-
const
|
|
669
|
+
const width = useWidth(ref);
|
|
796
670
|
let t0;
|
|
797
|
-
if ($[0] !==
|
|
798
|
-
t0 =
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
if (width) {
|
|
802
|
-
widthRef.current = width;
|
|
803
|
-
}
|
|
804
|
-
if (!widthRef.current) {
|
|
805
|
-
return;
|
|
806
|
-
}
|
|
807
|
-
registerChild(id, {
|
|
808
|
-
type: "divider",
|
|
809
|
-
width: widthRef.current
|
|
810
|
-
});
|
|
811
|
-
return () => unregisterChild(id);
|
|
671
|
+
if ($[0] !== width) {
|
|
672
|
+
t0 = {
|
|
673
|
+
type: "divider",
|
|
674
|
+
width
|
|
812
675
|
};
|
|
813
|
-
$[0] =
|
|
814
|
-
$[1] =
|
|
815
|
-
$[2] = unregisterChild;
|
|
816
|
-
$[3] = t0;
|
|
817
|
-
} else {
|
|
818
|
-
t0 = $[3];
|
|
819
|
-
}
|
|
820
|
-
let t1;
|
|
821
|
-
if ($[4] !== registerChild || $[5] !== unregisterChild) {
|
|
822
|
-
t1 = [registerChild, unregisterChild];
|
|
823
|
-
$[4] = registerChild;
|
|
824
|
-
$[5] = unregisterChild;
|
|
825
|
-
$[6] = t1;
|
|
676
|
+
$[0] = width;
|
|
677
|
+
$[1] = t0;
|
|
826
678
|
} else {
|
|
827
|
-
|
|
679
|
+
t0 = $[1];
|
|
828
680
|
}
|
|
829
|
-
|
|
681
|
+
const registryProps = t0;
|
|
682
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
830
683
|
if (!isVisibleChild(id)) {
|
|
831
684
|
return null;
|
|
832
685
|
}
|
|
833
|
-
let
|
|
834
|
-
if ($[
|
|
835
|
-
|
|
686
|
+
let t1;
|
|
687
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
688
|
+
t1 = /*#__PURE__*/jsx("div", {
|
|
836
689
|
ref: ref,
|
|
837
690
|
"data-component": "ActionBar.VerticalDivider",
|
|
838
691
|
"aria-hidden": "true",
|
|
839
692
|
className: styles.Divider
|
|
840
693
|
});
|
|
841
|
-
$[
|
|
694
|
+
$[2] = t1;
|
|
842
695
|
} else {
|
|
843
|
-
|
|
696
|
+
t1 = $[2];
|
|
844
697
|
}
|
|
845
|
-
return
|
|
698
|
+
return t1;
|
|
846
699
|
};
|
|
847
700
|
function _temp() {
|
|
848
|
-
return new Map();
|
|
849
|
-
}
|
|
850
|
-
function _temp2() {
|
|
851
701
|
return new Set();
|
|
852
702
|
}
|
|
853
|
-
function
|
|
703
|
+
function _temp2(item, index) {
|
|
854
704
|
return renderMenuItem(item, index);
|
|
855
705
|
}
|
|
856
|
-
function
|
|
857
|
-
const [key_0,
|
|
858
|
-
if (
|
|
706
|
+
function _temp3(t0) {
|
|
707
|
+
const [key_0, childProps_0] = t0;
|
|
708
|
+
if (childProps_0.type === "action") {
|
|
859
709
|
const {
|
|
860
710
|
onClick: onClick_0,
|
|
861
711
|
icon: Icon_1,
|
|
862
712
|
label: label_1,
|
|
863
713
|
disabled: disabled_0
|
|
864
|
-
} =
|
|
714
|
+
} = childProps_0;
|
|
865
715
|
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
866
716
|
onSelect: event_0 => {
|
|
867
717
|
typeof onClick_0 === "function" && onClick_0(event_0);
|
|
@@ -874,7 +724,7 @@ function _temp4(t0) {
|
|
|
874
724
|
}
|
|
875
725
|
return null;
|
|
876
726
|
}
|
|
877
|
-
function
|
|
727
|
+
function _temp4(item, index) {
|
|
878
728
|
return renderMenuItem(item, index);
|
|
879
729
|
}
|
|
880
730
|
|