@primer/react 0.0.0-20260225200356 → 0.0.0-20260225200721
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 -29
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +304 -397
- 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/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 +5 -18
- package/dist/PageLayout/usePaneWidth.d.ts.map +1 -1
- package/dist/PageLayout/usePaneWidth.js +111 -125
- package/dist/SelectPanel/SelectPanel.d.ts +1 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +1 -3
- 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/Timeline/Timeline-116393ee.css +2 -0
- package/dist/Timeline/Timeline-116393ee.css.map +1 -0
- package/dist/Timeline/Timeline.module.css.js +1 -1
- 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 +34 -0
- package/dist/utils/descendant-registry.d.ts.map +1 -0
- package/dist/utils/descendant-registry.js +242 -0
- package/generated/components.json +2 -194
- package/package.json +3 -3
- 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/PageLayout/PageLayout-06f4c069.css +0 -2
- package/dist/PageLayout/PageLayout-06f4c069.css.map +0 -1
- package/dist/Timeline/Timeline-c328e93a.css +0 -2
- package/dist/Timeline/Timeline-c328e93a.css.map +0 -1
- package/dist/experimental/SelectPanel2/SelectPanel-f0c4b9ca.css +0 -2
|
@@ -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
|
|
@@ -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,80 +324,107 @@ 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
|
-
$[
|
|
387
|
-
} else {
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
let
|
|
391
|
-
if ($[
|
|
392
|
-
|
|
393
|
-
value:
|
|
394
|
-
children:
|
|
378
|
+
$[31] = flush;
|
|
379
|
+
$[32] = t12;
|
|
380
|
+
$[33] = t9;
|
|
381
|
+
$[34] = t13;
|
|
382
|
+
} else {
|
|
383
|
+
t13 = $[34];
|
|
384
|
+
}
|
|
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
|
};
|
|
399
|
+
function useWidth(ref) {
|
|
400
|
+
const $ = c(3);
|
|
401
|
+
const widthRef = useRef(-1);
|
|
402
|
+
let t0;
|
|
403
|
+
if ($[0] !== ref) {
|
|
404
|
+
t0 = () => {
|
|
405
|
+
var _ref$current;
|
|
406
|
+
const width = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect().width;
|
|
407
|
+
if (width) {
|
|
408
|
+
widthRef.current = width;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
$[0] = ref;
|
|
412
|
+
$[1] = t0;
|
|
413
|
+
} else {
|
|
414
|
+
t0 = $[1];
|
|
415
|
+
}
|
|
416
|
+
let t1;
|
|
417
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
418
|
+
t1 = [];
|
|
419
|
+
$[2] = t1;
|
|
420
|
+
} else {
|
|
421
|
+
t1 = $[2];
|
|
422
|
+
}
|
|
423
|
+
useIsomorphicLayoutEffect(t0, t1);
|
|
424
|
+
return widthRef;
|
|
425
|
+
}
|
|
404
426
|
const ActionBarIconButton = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
405
|
-
const $ = c(
|
|
427
|
+
const $ = c(18);
|
|
406
428
|
let disabled;
|
|
407
429
|
let onClick;
|
|
408
430
|
let props;
|
|
@@ -423,29 +445,19 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
423
445
|
}
|
|
424
446
|
const ref = useRef(null);
|
|
425
447
|
useRefObjectAsForwardedRef(forwardedRef, ref);
|
|
426
|
-
const id = useId();
|
|
427
448
|
const {
|
|
428
449
|
size,
|
|
429
|
-
registerChild,
|
|
430
|
-
unregisterChild,
|
|
431
450
|
isVisibleChild
|
|
432
451
|
} = React.useContext(ActionBarContext);
|
|
433
452
|
const {
|
|
434
453
|
groupId
|
|
435
454
|
} = React.useContext(ActionBarGroupContext);
|
|
436
|
-
const widthRef =
|
|
455
|
+
const widthRef = useWidth(ref);
|
|
437
456
|
let t1;
|
|
438
|
-
if ($[4] !== disabled || $[5] !== groupId || $[6] !==
|
|
457
|
+
if ($[4] !== disabled || $[5] !== groupId || $[6] !== onClick || $[7] !== props || $[8] !== widthRef) {
|
|
439
458
|
t1 = () => {
|
|
440
|
-
var
|
|
441
|
-
|
|
442
|
-
if (width) {
|
|
443
|
-
widthRef.current = width;
|
|
444
|
-
}
|
|
445
|
-
if (!widthRef.current) {
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
registerChild(id, {
|
|
459
|
+
var _props$ariaLabel;
|
|
460
|
+
return {
|
|
449
461
|
type: "action",
|
|
450
462
|
label: (_props$ariaLabel = props["aria-label"]) !== null && _props$ariaLabel !== void 0 ? _props$ariaLabel : "",
|
|
451
463
|
icon: props.icon,
|
|
@@ -453,59 +465,41 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
453
465
|
onClick: onClick,
|
|
454
466
|
width: widthRef.current,
|
|
455
467
|
groupId: groupId !== null && groupId !== void 0 ? groupId : undefined
|
|
456
|
-
});
|
|
457
|
-
return () => {
|
|
458
|
-
unregisterChild(id);
|
|
459
468
|
};
|
|
460
469
|
};
|
|
461
470
|
$[4] = disabled;
|
|
462
471
|
$[5] = groupId;
|
|
463
|
-
$[6] =
|
|
464
|
-
$[7] =
|
|
465
|
-
$[8] =
|
|
466
|
-
$[9] =
|
|
467
|
-
$[10] = unregisterChild;
|
|
468
|
-
$[11] = t1;
|
|
472
|
+
$[6] = onClick;
|
|
473
|
+
$[7] = props;
|
|
474
|
+
$[8] = widthRef;
|
|
475
|
+
$[9] = t1;
|
|
469
476
|
} else {
|
|
470
|
-
t1 = $[
|
|
477
|
+
t1 = $[9];
|
|
471
478
|
}
|
|
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 => {
|
|
479
|
+
const registryProps = t1;
|
|
480
|
+
const id = ActionBarItemsRegistry.useRegisterDescendantCallback(registryProps);
|
|
481
|
+
let t2;
|
|
482
|
+
if ($[10] !== disabled || $[11] !== onClick) {
|
|
483
|
+
t2 = event => {
|
|
490
484
|
var _onClick;
|
|
491
485
|
if (disabled) {
|
|
492
486
|
return;
|
|
493
487
|
}
|
|
494
488
|
(_onClick = onClick) === null || _onClick === void 0 ? void 0 : _onClick(event);
|
|
495
489
|
};
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
490
|
+
$[10] = disabled;
|
|
491
|
+
$[11] = onClick;
|
|
492
|
+
$[12] = t2;
|
|
499
493
|
} else {
|
|
500
|
-
|
|
494
|
+
t2 = $[12];
|
|
501
495
|
}
|
|
502
|
-
const clickHandler =
|
|
496
|
+
const clickHandler = t2;
|
|
503
497
|
if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) {
|
|
504
498
|
return null;
|
|
505
499
|
}
|
|
506
|
-
let
|
|
507
|
-
if ($[
|
|
508
|
-
|
|
500
|
+
let t3;
|
|
501
|
+
if ($[13] !== clickHandler || $[14] !== disabled || $[15] !== props || $[16] !== size) {
|
|
502
|
+
t3 = /*#__PURE__*/jsx(IconButton, {
|
|
509
503
|
"aria-disabled": disabled,
|
|
510
504
|
ref: ref,
|
|
511
505
|
size: size,
|
|
@@ -513,108 +507,79 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
513
507
|
...props,
|
|
514
508
|
variant: "invisible"
|
|
515
509
|
});
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
510
|
+
$[13] = clickHandler;
|
|
511
|
+
$[14] = disabled;
|
|
512
|
+
$[15] = props;
|
|
513
|
+
$[16] = size;
|
|
514
|
+
$[17] = t3;
|
|
521
515
|
} else {
|
|
522
|
-
|
|
516
|
+
t3 = $[17];
|
|
523
517
|
}
|
|
524
|
-
return
|
|
518
|
+
return t3;
|
|
525
519
|
});
|
|
526
520
|
const ActionBarGroupContext = /*#__PURE__*/React.createContext({
|
|
527
521
|
groupId: null
|
|
528
522
|
});
|
|
529
523
|
const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
530
|
-
const $ = c(
|
|
524
|
+
const $ = c(10);
|
|
531
525
|
const {
|
|
532
526
|
children
|
|
533
527
|
} = t0;
|
|
534
528
|
const backupRef = useRef(null);
|
|
535
529
|
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();
|
|
530
|
+
const widthRef = useWidth(ref);
|
|
542
531
|
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;
|
|
532
|
+
if ($[0] !== widthRef) {
|
|
533
|
+
t1 = () => ({
|
|
534
|
+
type: "group",
|
|
535
|
+
width: widthRef.current
|
|
536
|
+
});
|
|
537
|
+
$[0] = widthRef;
|
|
538
|
+
$[1] = t1;
|
|
566
539
|
} else {
|
|
567
|
-
t1 = $[
|
|
540
|
+
t1 = $[1];
|
|
568
541
|
}
|
|
542
|
+
const registryProps = t1;
|
|
543
|
+
const id = ActionBarItemsRegistry.useRegisterDescendantCallback(registryProps);
|
|
569
544
|
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 = {
|
|
545
|
+
if ($[2] !== id) {
|
|
546
|
+
t2 = {
|
|
582
547
|
groupId: id
|
|
583
548
|
};
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
549
|
+
$[2] = id;
|
|
550
|
+
$[3] = t2;
|
|
586
551
|
} else {
|
|
587
|
-
|
|
552
|
+
t2 = $[3];
|
|
588
553
|
}
|
|
589
|
-
let
|
|
590
|
-
if ($[
|
|
591
|
-
|
|
554
|
+
let t3;
|
|
555
|
+
if ($[4] !== children || $[5] !== ref) {
|
|
556
|
+
t3 = /*#__PURE__*/jsx("div", {
|
|
592
557
|
className: styles.Group,
|
|
593
558
|
ref: ref,
|
|
594
559
|
children: children
|
|
595
560
|
});
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
561
|
+
$[4] = children;
|
|
562
|
+
$[5] = ref;
|
|
563
|
+
$[6] = t3;
|
|
599
564
|
} else {
|
|
600
|
-
|
|
565
|
+
t3 = $[6];
|
|
601
566
|
}
|
|
602
|
-
let
|
|
603
|
-
if ($[
|
|
604
|
-
|
|
605
|
-
value:
|
|
606
|
-
children:
|
|
567
|
+
let t4;
|
|
568
|
+
if ($[7] !== t2 || $[8] !== t3) {
|
|
569
|
+
t4 = /*#__PURE__*/jsx(ActionBarGroupContext.Provider, {
|
|
570
|
+
value: t2,
|
|
571
|
+
children: t3
|
|
607
572
|
});
|
|
608
|
-
$[
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
573
|
+
$[7] = t2;
|
|
574
|
+
$[8] = t3;
|
|
575
|
+
$[9] = t4;
|
|
611
576
|
} else {
|
|
612
|
-
|
|
577
|
+
t4 = $[9];
|
|
613
578
|
}
|
|
614
|
-
return
|
|
579
|
+
return t4;
|
|
615
580
|
});
|
|
616
581
|
const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
617
|
-
const $ = c(
|
|
582
|
+
const $ = c(32);
|
|
618
583
|
let ariaLabel;
|
|
619
584
|
let icon;
|
|
620
585
|
let items;
|
|
@@ -647,70 +612,39 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
647
612
|
}
|
|
648
613
|
const backupRef = useRef(null);
|
|
649
614
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
650
|
-
const id = useId();
|
|
651
615
|
const {
|
|
652
|
-
registerChild,
|
|
653
|
-
unregisterChild,
|
|
654
616
|
isVisibleChild
|
|
655
617
|
} = React.useContext(ActionBarContext);
|
|
656
618
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
657
|
-
const widthRef =
|
|
619
|
+
const widthRef = useWidth(ref);
|
|
658
620
|
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
|
-
};
|
|
621
|
+
if ($[7] !== ariaLabel || $[8] !== icon || $[9] !== items || $[10] !== overflowIcon || $[11] !== returnFocusRef || $[12] !== widthRef) {
|
|
622
|
+
t1 = () => ({
|
|
623
|
+
type: "menu",
|
|
624
|
+
width: widthRef.current,
|
|
625
|
+
label: ariaLabel,
|
|
626
|
+
icon: overflowIcon ? overflowIcon : icon,
|
|
627
|
+
returnFocusRef,
|
|
628
|
+
items
|
|
629
|
+
});
|
|
681
630
|
$[7] = ariaLabel;
|
|
682
631
|
$[8] = icon;
|
|
683
|
-
$[9] =
|
|
684
|
-
$[10] =
|
|
685
|
-
$[11] =
|
|
686
|
-
$[12] =
|
|
687
|
-
$[13] =
|
|
688
|
-
$[14] = returnFocusRef;
|
|
689
|
-
$[15] = unregisterChild;
|
|
690
|
-
$[16] = t1;
|
|
632
|
+
$[9] = items;
|
|
633
|
+
$[10] = overflowIcon;
|
|
634
|
+
$[11] = returnFocusRef;
|
|
635
|
+
$[12] = widthRef;
|
|
636
|
+
$[13] = t1;
|
|
691
637
|
} else {
|
|
692
|
-
t1 = $[
|
|
638
|
+
t1 = $[13];
|
|
693
639
|
}
|
|
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);
|
|
640
|
+
const registryProps = t1;
|
|
641
|
+
const id = ActionBarItemsRegistry.useRegisterDescendantCallback(registryProps);
|
|
708
642
|
if (!isVisibleChild(id)) {
|
|
709
643
|
return null;
|
|
710
644
|
}
|
|
711
|
-
let
|
|
712
|
-
if ($[
|
|
713
|
-
|
|
645
|
+
let t2;
|
|
646
|
+
if ($[14] !== ariaLabel || $[15] !== icon || $[16] !== props) {
|
|
647
|
+
t2 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
714
648
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
715
649
|
variant: "invisible",
|
|
716
650
|
"aria-label": ariaLabel,
|
|
@@ -718,150 +652,123 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
718
652
|
...props
|
|
719
653
|
})
|
|
720
654
|
});
|
|
721
|
-
$[
|
|
722
|
-
$[
|
|
723
|
-
$[
|
|
724
|
-
$[
|
|
655
|
+
$[14] = ariaLabel;
|
|
656
|
+
$[15] = icon;
|
|
657
|
+
$[16] = props;
|
|
658
|
+
$[17] = t2;
|
|
725
659
|
} else {
|
|
726
|
-
|
|
660
|
+
t2 = $[17];
|
|
727
661
|
}
|
|
728
|
-
let
|
|
729
|
-
if ($[
|
|
730
|
-
|
|
662
|
+
let t3;
|
|
663
|
+
if ($[18] !== returnFocusRef) {
|
|
664
|
+
t3 = returnFocusRef && {
|
|
731
665
|
returnFocusRef
|
|
732
666
|
};
|
|
733
|
-
$[
|
|
734
|
-
$[
|
|
667
|
+
$[18] = returnFocusRef;
|
|
668
|
+
$[19] = t3;
|
|
735
669
|
} else {
|
|
736
|
-
|
|
670
|
+
t3 = $[19];
|
|
671
|
+
}
|
|
672
|
+
let t4;
|
|
673
|
+
if ($[20] !== items) {
|
|
674
|
+
t4 = items.map(_temp4);
|
|
675
|
+
$[20] = items;
|
|
676
|
+
$[21] = t4;
|
|
677
|
+
} else {
|
|
678
|
+
t4 = $[21];
|
|
737
679
|
}
|
|
738
680
|
let t5;
|
|
739
|
-
if ($[
|
|
740
|
-
t5 =
|
|
741
|
-
|
|
742
|
-
|
|
681
|
+
if ($[22] !== t4) {
|
|
682
|
+
t5 = /*#__PURE__*/jsx(ActionList, {
|
|
683
|
+
children: t4
|
|
684
|
+
});
|
|
685
|
+
$[22] = t4;
|
|
686
|
+
$[23] = t5;
|
|
743
687
|
} else {
|
|
744
|
-
t5 = $[
|
|
688
|
+
t5 = $[23];
|
|
745
689
|
}
|
|
746
690
|
let t6;
|
|
747
|
-
if ($[
|
|
748
|
-
t6 = /*#__PURE__*/jsx(
|
|
691
|
+
if ($[24] !== t3 || $[25] !== t5) {
|
|
692
|
+
t6 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
693
|
+
...t3,
|
|
749
694
|
children: t5
|
|
750
695
|
});
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
696
|
+
$[24] = t3;
|
|
697
|
+
$[25] = t5;
|
|
698
|
+
$[26] = t6;
|
|
753
699
|
} else {
|
|
754
|
-
t6 = $[
|
|
700
|
+
t6 = $[26];
|
|
755
701
|
}
|
|
756
702
|
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, {
|
|
703
|
+
if ($[27] !== menuOpen || $[28] !== ref || $[29] !== t2 || $[30] !== t6) {
|
|
704
|
+
t7 = /*#__PURE__*/jsxs(ActionMenu, {
|
|
771
705
|
anchorRef: ref,
|
|
772
706
|
open: menuOpen,
|
|
773
707
|
onOpenChange: setMenuOpen,
|
|
774
|
-
children: [
|
|
708
|
+
children: [t2, t6]
|
|
775
709
|
});
|
|
776
|
-
$[
|
|
777
|
-
$[
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
710
|
+
$[27] = menuOpen;
|
|
711
|
+
$[28] = ref;
|
|
712
|
+
$[29] = t2;
|
|
713
|
+
$[30] = t6;
|
|
714
|
+
$[31] = t7;
|
|
781
715
|
} else {
|
|
782
|
-
|
|
716
|
+
t7 = $[31];
|
|
783
717
|
}
|
|
784
|
-
return
|
|
718
|
+
return t7;
|
|
785
719
|
});
|
|
786
720
|
const VerticalDivider = () => {
|
|
787
|
-
const $ = c(
|
|
721
|
+
const $ = c(3);
|
|
788
722
|
const ref = useRef(null);
|
|
789
|
-
const id = useId();
|
|
790
723
|
const {
|
|
791
|
-
registerChild,
|
|
792
|
-
unregisterChild,
|
|
793
724
|
isVisibleChild
|
|
794
725
|
} = React.useContext(ActionBarContext);
|
|
795
|
-
const widthRef =
|
|
726
|
+
const widthRef = useWidth(ref);
|
|
796
727
|
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;
|
|
728
|
+
if ($[0] !== widthRef) {
|
|
729
|
+
t0 = () => ({
|
|
730
|
+
type: "divider",
|
|
731
|
+
width: widthRef.current
|
|
732
|
+
});
|
|
733
|
+
$[0] = widthRef;
|
|
734
|
+
$[1] = t0;
|
|
826
735
|
} else {
|
|
827
|
-
|
|
736
|
+
t0 = $[1];
|
|
828
737
|
}
|
|
829
|
-
|
|
738
|
+
const registryProps = t0;
|
|
739
|
+
const id = ActionBarItemsRegistry.useRegisterDescendantCallback(registryProps);
|
|
830
740
|
if (!isVisibleChild(id)) {
|
|
831
741
|
return null;
|
|
832
742
|
}
|
|
833
|
-
let
|
|
834
|
-
if ($[
|
|
835
|
-
|
|
743
|
+
let t1;
|
|
744
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
745
|
+
t1 = /*#__PURE__*/jsx("div", {
|
|
836
746
|
ref: ref,
|
|
837
747
|
"data-component": "ActionBar.VerticalDivider",
|
|
838
748
|
"aria-hidden": "true",
|
|
839
749
|
className: styles.Divider
|
|
840
750
|
});
|
|
841
|
-
$[
|
|
751
|
+
$[2] = t1;
|
|
842
752
|
} else {
|
|
843
|
-
|
|
753
|
+
t1 = $[2];
|
|
844
754
|
}
|
|
845
|
-
return
|
|
755
|
+
return t1;
|
|
846
756
|
};
|
|
847
757
|
function _temp() {
|
|
848
|
-
return new Map();
|
|
849
|
-
}
|
|
850
|
-
function _temp2() {
|
|
851
758
|
return new Set();
|
|
852
759
|
}
|
|
853
|
-
function
|
|
760
|
+
function _temp2(item, index) {
|
|
854
761
|
return renderMenuItem(item, index);
|
|
855
762
|
}
|
|
856
|
-
function
|
|
857
|
-
const [key_0,
|
|
858
|
-
if (
|
|
763
|
+
function _temp3(t0) {
|
|
764
|
+
const [key_0, childProps_0] = t0;
|
|
765
|
+
if (childProps_0.type === "action") {
|
|
859
766
|
const {
|
|
860
767
|
onClick: onClick_0,
|
|
861
768
|
icon: Icon_1,
|
|
862
769
|
label: label_1,
|
|
863
770
|
disabled: disabled_0
|
|
864
|
-
} =
|
|
771
|
+
} = childProps_0;
|
|
865
772
|
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
866
773
|
onSelect: event_0 => {
|
|
867
774
|
typeof onClick_0 === "function" && onClick_0(event_0);
|
|
@@ -874,7 +781,7 @@ function _temp4(t0) {
|
|
|
874
781
|
}
|
|
875
782
|
return null;
|
|
876
783
|
}
|
|
877
|
-
function
|
|
784
|
+
function _temp4(item, index) {
|
|
878
785
|
return renderMenuItem(item, index);
|
|
879
786
|
}
|
|
880
787
|
|