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