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