@primer/react 38.1.0-rc.6118e2738 → 38.1.0-rc.63925902f
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 +23 -1
- package/README.md +16 -11
- package/dist/ActionBar/ActionBar.d.ts +70 -0
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +536 -160
- package/dist/ActionBar/index.d.ts +17 -1
- package/dist/ActionBar/index.d.ts.map +1 -1
- package/dist/ActionBar/index.js +3 -2
- package/dist/ActionList/ActionList-46e9c2db.css +2 -0
- package/dist/ActionList/ActionList-46e9c2db.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 +3 -1
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts +1 -0
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +13 -1
- package/dist/Autocomplete/AutocompleteInput.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +0 -1
- package/dist/Autocomplete/AutocompleteMenu.js +334 -124
- package/dist/Avatar/Avatar.js +31 -23
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +0 -1
- package/dist/BaseStyles.d.ts +2 -2
- package/dist/BaseStyles.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +1 -0
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +0 -1
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/DataTable/Pagination.js +296 -87
- package/dist/DataTable/Table.d.ts +13 -13
- package/dist/DataTable/Table.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +1 -1
- package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css +1 -1
- package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.d.ts +1 -0
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts +1 -0
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts.map +1 -1
- package/dist/FilteredActionList/useAnnouncements.d.ts.map +1 -1
- package/dist/FilteredActionList/useAnnouncements.js +1 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +0 -1
- package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.js +1 -0
- package/dist/Link/Link-968346ff.css +2 -0
- package/dist/Link/Link-968346ff.css.map +1 -0
- package/dist/Link/Link.d.ts +0 -2
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +0 -3
- package/dist/Link/Link.module.css.js +1 -1
- package/dist/PageHeader/PageHeader-9f4a690a.css +2 -0
- package/dist/PageHeader/PageHeader-9f4a690a.css.map +1 -0
- package/dist/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/PageHeader/PageHeader.js +24 -16
- package/dist/PageHeader/PageHeader.module.css.js +1 -1
- package/dist/PageLayout/PageLayout-28a244f7.css +2 -0
- package/dist/PageLayout/PageLayout-28a244f7.css.map +1 -0
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +535 -448
- package/dist/PageLayout/PageLayout.module.css.js +1 -1
- package/dist/Portal/Portal.d.ts.map +1 -1
- package/dist/Portal/Portal.js +0 -1
- package/dist/SelectPanel/SelectPanel.d.ts +1 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +0 -1
- package/dist/SkeletonAvatar/SkeletonAvatar.js +31 -23
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +1 -0
- 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/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/Token/IssueLabelToken.js +280 -57
- package/dist/Token/_RemoveTokenButton.d.ts +1 -1
- package/dist/Token/_RemoveTokenButton.d.ts.map +1 -1
- package/dist/Token/_RemoveTokenButton.js +4 -3
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +28 -25
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +5 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +0 -1
- package/dist/deprecated/ActionList/Divider.d.ts +1 -0
- package/dist/deprecated/ActionList/Divider.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Group.d.ts +1 -0
- package/dist/deprecated/ActionList/Group.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Header.d.ts +1 -0
- package/dist/deprecated/ActionList/Header.d.ts.map +1 -1
- package/dist/deprecated/ActionList/List.d.ts.map +1 -1
- package/dist/deprecated/ActionMenu.d.ts +2 -1
- package/dist/deprecated/ActionMenu.d.ts.map +1 -1
- package/dist/deprecated/utils/create-slots.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +4 -2
- package/dist/experimental/Tabs/Tabs.d.ts +127 -0
- package/dist/experimental/Tabs/Tabs.d.ts.map +1 -0
- package/dist/experimental/Tabs/Tabs.js +317 -0
- package/dist/experimental/Tabs/index.d.ts +3 -0
- package/dist/experimental/Tabs/index.d.ts.map +1 -0
- package/dist/experimental/index.d.ts +1 -0
- package/dist/experimental/index.d.ts.map +1 -1
- package/dist/experimental/index.js +1 -0
- package/dist/hooks/useAnchoredPosition.d.ts.map +1 -1
- package/dist/hooks/useAnchoredPosition.js +0 -1
- package/dist/hooks/useControllableState.d.ts.map +1 -1
- package/dist/hooks/useControllableState.js +2 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +0 -1
- package/dist/hooks/useFocusZone.d.ts.map +1 -1
- package/dist/hooks/useFocusZone.js +0 -1
- package/dist/hooks/useIsMacOS.d.ts.map +1 -1
- package/dist/hooks/useIsMacOS.js +3 -1
- package/dist/hooks/{useMediaUnsafeSSR.d.ts → useMedia.d.ts} +6 -9
- package/dist/hooks/useMedia.d.ts.map +1 -0
- package/dist/hooks/{useMediaUnsafeSSR.js → useMedia.js} +14 -29
- package/dist/hooks/useMenuInitialFocus.d.ts.map +1 -1
- package/dist/hooks/useMenuInitialFocus.js +0 -1
- package/dist/hooks/useOnEscapePress.d.ts.map +1 -1
- package/dist/hooks/useOnEscapePress.js +0 -1
- package/dist/hooks/useRenderForcingRef.d.ts.map +1 -1
- package/dist/hooks/useRenderForcingRef.js +37 -7
- package/dist/hooks/useResizeObserver.d.ts.map +1 -1
- package/dist/hooks/useResizeObserver.js +0 -1
- package/dist/hooks/useResponsiveValue.d.ts +0 -2
- package/dist/hooks/useResponsiveValue.d.ts.map +1 -1
- package/dist/hooks/useResponsiveValue.js +5 -9
- package/dist/hooks/useSafeTimeout.d.ts.map +1 -1
- package/dist/hooks/useSafeTimeout.js +0 -1
- package/dist/hooks/useScrollFlash.d.ts.map +1 -1
- package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
- package/dist/internal/hooks/useFocus.d.ts.map +1 -1
- package/dist/internal/hooks/useMergedRefs.d.ts.map +1 -1
- package/dist/internal/hooks/useMergedRefs.js +0 -1
- package/dist/utils/polymorphic.d.ts +1 -0
- package/dist/utils/polymorphic.d.ts.map +1 -1
- package/generated/components.json +32 -7
- package/package.json +8 -8
- package/dist/ActionList/ActionList-167cf6c7.css +0 -2
- package/dist/ActionList/ActionList-167cf6c7.css.map +0 -1
- package/dist/Link/Link-e01bdaee.css +0 -2
- package/dist/Link/Link-e01bdaee.css.map +0 -1
- package/dist/PageHeader/PageHeader-4e1d8fee.css +0 -2
- package/dist/PageHeader/PageHeader-4e1d8fee.css.map +0 -1
- package/dist/PageLayout/PageLayout-1849f083.css +0 -2
- package/dist/PageLayout/PageLayout-1849f083.css.map +0 -1
- package/dist/Timeline/Timeline-e8e88a13.css +0 -2
- package/dist/Timeline/Timeline-e8e88a13.css.map +0 -1
- package/dist/hooks/useMediaUnsafeSSR.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import React, { forwardRef, useRef, useState,
|
|
2
|
+
import React, { forwardRef, useRef, useState, 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';
|
|
@@ -10,7 +10,7 @@ import { IconButton } from '../Button/IconButton.js';
|
|
|
10
10
|
import { useFocusZone } from '../hooks/useFocusZone.js';
|
|
11
11
|
import styles from './ActionBar.module.css.js';
|
|
12
12
|
import { clsx } from 'clsx';
|
|
13
|
-
import {
|
|
13
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
14
|
import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
|
|
15
15
|
import { FocusKeys } from '@primer/behaviors';
|
|
16
16
|
import { ActionMenu } from '../ActionMenu/ActionMenu.js';
|
|
@@ -50,6 +50,54 @@ const calculatePossibleItems = (registryEntries, navWidth, gap, moreMenuWidth =
|
|
|
50
50
|
}
|
|
51
51
|
return breakpoint;
|
|
52
52
|
};
|
|
53
|
+
const renderMenuItem = (item, index) => {
|
|
54
|
+
if (item.type === 'divider') {
|
|
55
|
+
return /*#__PURE__*/jsx(ActionList.Divider, {}, index);
|
|
56
|
+
}
|
|
57
|
+
const {
|
|
58
|
+
label,
|
|
59
|
+
onClick,
|
|
60
|
+
disabled,
|
|
61
|
+
trailingVisual: TrailingIcon,
|
|
62
|
+
leadingVisual: LeadingIcon,
|
|
63
|
+
items,
|
|
64
|
+
variant
|
|
65
|
+
} = item;
|
|
66
|
+
if (items && items.length > 0) {
|
|
67
|
+
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
68
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
69
|
+
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
70
|
+
disabled: disabled,
|
|
71
|
+
variant: variant,
|
|
72
|
+
children: [LeadingIcon ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
73
|
+
children: /*#__PURE__*/jsx(LeadingIcon, {})
|
|
74
|
+
}) : null, label, TrailingIcon ? /*#__PURE__*/jsx(ActionList.TrailingVisual, {
|
|
75
|
+
children: typeof TrailingIcon === 'string' ? /*#__PURE__*/jsx("span", {
|
|
76
|
+
children: TrailingIcon
|
|
77
|
+
}) : /*#__PURE__*/jsx(TrailingIcon, {})
|
|
78
|
+
}) : null]
|
|
79
|
+
})
|
|
80
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
81
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
82
|
+
children: items.map((subItem, subIndex) => renderMenuItem(subItem, subIndex))
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}, label);
|
|
86
|
+
}
|
|
87
|
+
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
88
|
+
onSelect: onClick,
|
|
89
|
+
disabled: disabled,
|
|
90
|
+
variant: variant,
|
|
91
|
+
children: [LeadingIcon ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
92
|
+
children: /*#__PURE__*/jsx(LeadingIcon, {})
|
|
93
|
+
}) : null, label, TrailingIcon ? /*#__PURE__*/jsx(ActionList.TrailingVisual, {
|
|
94
|
+
children: typeof TrailingIcon === 'string' ? /*#__PURE__*/jsx("span", {
|
|
95
|
+
children: TrailingIcon
|
|
96
|
+
}) : /*#__PURE__*/jsx(TrailingIcon, {})
|
|
97
|
+
}) : null]
|
|
98
|
+
}, label);
|
|
99
|
+
};
|
|
100
|
+
renderMenuItem.displayName = "renderMenuItem";
|
|
53
101
|
const getMenuItems = (navWidth, moreMenuWidth, childRegistry, hasActiveMenu, gap) => {
|
|
54
102
|
const registryEntries = Array.from(childRegistry).filter(entry => entry[1] !== null && (entry[1].type !== 'action' || entry[1].groupId === undefined));
|
|
55
103
|
if (registryEntries.length === 0) return new Set();
|
|
@@ -86,178 +134,352 @@ const getMenuItems = (navWidth, moreMenuWidth, childRegistry, hasActiveMenu, gap
|
|
|
86
134
|
}
|
|
87
135
|
};
|
|
88
136
|
const ActionBar = props => {
|
|
137
|
+
const $ = c(43);
|
|
89
138
|
const {
|
|
90
|
-
size
|
|
139
|
+
size: t0,
|
|
91
140
|
children,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
flush
|
|
141
|
+
"aria-label": ariaLabel,
|
|
142
|
+
"aria-labelledby": ariaLabelledBy,
|
|
143
|
+
flush: t1,
|
|
95
144
|
className,
|
|
96
|
-
gap
|
|
145
|
+
gap: t2
|
|
97
146
|
} = props;
|
|
98
|
-
|
|
99
|
-
|
|
147
|
+
const size = t0 === undefined ? "medium" : t0;
|
|
148
|
+
const flush = t1 === undefined ? false : t1;
|
|
149
|
+
const gap = t2 === undefined ? "condensed" : t2;
|
|
100
150
|
const listRef = useRef(null);
|
|
101
151
|
const [computedGap, setComputedGap] = useState(ACTIONBAR_ITEM_GAP);
|
|
102
|
-
const [childRegistry, setChildRegistry] = useState(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
152
|
+
const [childRegistry, setChildRegistry] = useState(_temp);
|
|
153
|
+
let t3;
|
|
154
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
155
|
+
t3 = (id, childProps) => setChildRegistry(prev => new Map(prev).set(id, childProps));
|
|
156
|
+
$[0] = t3;
|
|
157
|
+
} else {
|
|
158
|
+
t3 = $[0];
|
|
159
|
+
}
|
|
160
|
+
const registerChild = t3;
|
|
161
|
+
let t4;
|
|
162
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
163
|
+
t4 = id_0 => setChildRegistry(prev_0 => new Map(prev_0).set(id_0, null));
|
|
164
|
+
$[1] = t4;
|
|
165
|
+
} else {
|
|
166
|
+
t4 = $[1];
|
|
167
|
+
}
|
|
168
|
+
const unregisterChild = t4;
|
|
169
|
+
const [menuItemIds, setMenuItemIds] = useState(_temp2);
|
|
106
170
|
const navRef = useRef(null);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
171
|
+
let t5;
|
|
172
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
173
|
+
t5 = () => {
|
|
174
|
+
if (!listRef.current) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const g = window.getComputedStyle(listRef.current).gap;
|
|
178
|
+
const parsed = parseFloat(g);
|
|
179
|
+
if (!Number.isNaN(parsed)) {
|
|
180
|
+
setComputedGap(parsed);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
$[2] = t5;
|
|
184
|
+
} else {
|
|
185
|
+
t5 = $[2];
|
|
186
|
+
}
|
|
187
|
+
let t6;
|
|
188
|
+
if ($[3] !== gap) {
|
|
189
|
+
t6 = [gap];
|
|
190
|
+
$[3] = gap;
|
|
191
|
+
$[4] = t6;
|
|
192
|
+
} else {
|
|
193
|
+
t6 = $[4];
|
|
194
|
+
}
|
|
195
|
+
useIsomorphicLayoutEffect(t5, t6);
|
|
114
196
|
const moreMenuRef = useRef(null);
|
|
115
197
|
const moreMenuBtnRef = useRef(null);
|
|
116
198
|
const containerRef = React.useRef(null);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
199
|
+
let t7;
|
|
200
|
+
if ($[5] !== childRegistry || $[6] !== computedGap || $[7] !== menuItemIds.size) {
|
|
201
|
+
t7 = resizeObserverEntries => {
|
|
202
|
+
var _moreMenuRef$current$, _moreMenuRef$current;
|
|
203
|
+
const navWidth = resizeObserverEntries[0].contentRect.width;
|
|
204
|
+
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;
|
|
205
|
+
const hasActiveMenu = menuItemIds.size > 0;
|
|
206
|
+
if (navWidth > 0) {
|
|
207
|
+
const newMenuItemIds = getMenuItems(navWidth, moreMenuWidth, childRegistry, hasActiveMenu, computedGap);
|
|
208
|
+
if (newMenuItemIds) {
|
|
209
|
+
setMenuItemIds(newMenuItemIds);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
$[5] = childRegistry;
|
|
214
|
+
$[6] = computedGap;
|
|
215
|
+
$[7] = menuItemIds.size;
|
|
216
|
+
$[8] = t7;
|
|
217
|
+
} else {
|
|
218
|
+
t7 = $[8];
|
|
219
|
+
}
|
|
220
|
+
useResizeObserver(t7, navRef);
|
|
221
|
+
let t8;
|
|
222
|
+
if ($[9] !== menuItemIds) {
|
|
223
|
+
t8 = id_1 => !menuItemIds.has(id_1);
|
|
224
|
+
$[9] = menuItemIds;
|
|
225
|
+
$[10] = t8;
|
|
226
|
+
} else {
|
|
227
|
+
t8 = $[10];
|
|
228
|
+
}
|
|
229
|
+
const isVisibleChild = t8;
|
|
130
230
|
const [isWidgetOpen, setIsWidgetOpen] = useState(false);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
231
|
+
let t9;
|
|
232
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
233
|
+
t9 = () => {
|
|
234
|
+
setIsWidgetOpen(false);
|
|
235
|
+
};
|
|
236
|
+
$[11] = t9;
|
|
237
|
+
} else {
|
|
238
|
+
t9 = $[11];
|
|
239
|
+
}
|
|
240
|
+
const closeOverlay = t9;
|
|
241
|
+
let t10;
|
|
242
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
243
|
+
t10 = () => {
|
|
244
|
+
var _moreMenuBtnRef$curre;
|
|
245
|
+
(_moreMenuBtnRef$curre = moreMenuBtnRef.current) === null || _moreMenuBtnRef$curre === void 0 ? void 0 : _moreMenuBtnRef$curre.focus();
|
|
246
|
+
};
|
|
247
|
+
$[12] = t10;
|
|
248
|
+
} else {
|
|
249
|
+
t10 = $[12];
|
|
250
|
+
}
|
|
251
|
+
const focusOnMoreMenuBtn = t10;
|
|
252
|
+
let t11;
|
|
253
|
+
let t12;
|
|
254
|
+
if ($[13] !== isWidgetOpen) {
|
|
255
|
+
t11 = event => {
|
|
256
|
+
if (isWidgetOpen) {
|
|
257
|
+
event.preventDefault();
|
|
258
|
+
closeOverlay();
|
|
259
|
+
focusOnMoreMenuBtn();
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
t12 = [isWidgetOpen];
|
|
263
|
+
$[13] = isWidgetOpen;
|
|
264
|
+
$[14] = t11;
|
|
265
|
+
$[15] = t12;
|
|
266
|
+
} else {
|
|
267
|
+
t11 = $[14];
|
|
268
|
+
t12 = $[15];
|
|
269
|
+
}
|
|
270
|
+
useOnEscapePress(t11, t12);
|
|
271
|
+
let t13;
|
|
272
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
273
|
+
t13 = {
|
|
274
|
+
onClickOutside: closeOverlay,
|
|
275
|
+
containerRef,
|
|
276
|
+
ignoreClickRefs: [moreMenuBtnRef]
|
|
277
|
+
};
|
|
278
|
+
$[16] = t13;
|
|
279
|
+
} else {
|
|
280
|
+
t13 = $[16];
|
|
281
|
+
}
|
|
282
|
+
useOnOutsideClick(t13);
|
|
283
|
+
let t14;
|
|
284
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
285
|
+
t14 = {
|
|
286
|
+
containerRef: listRef,
|
|
287
|
+
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
288
|
+
focusOutBehavior: "wrap"
|
|
289
|
+
};
|
|
290
|
+
$[17] = t14;
|
|
291
|
+
} else {
|
|
292
|
+
t14 = $[17];
|
|
293
|
+
}
|
|
294
|
+
useFocusZone(t14);
|
|
295
|
+
let groupedItemsMap;
|
|
296
|
+
if ($[18] !== childRegistry) {
|
|
297
|
+
groupedItemsMap = new Map();
|
|
157
298
|
for (const [key, childProps_0] of childRegistry) {
|
|
158
|
-
if ((childProps_0 === null || childProps_0 === void 0 ? void 0 : childProps_0.type) ===
|
|
299
|
+
if ((childProps_0 === null || childProps_0 === void 0 ? void 0 : childProps_0.type) === "action" && childProps_0.groupId) {
|
|
159
300
|
const existingGroup = groupedItemsMap.get(childProps_0.groupId) || [];
|
|
160
301
|
existingGroup.push([key, childProps_0]);
|
|
161
302
|
groupedItemsMap.set(childProps_0.groupId, existingGroup);
|
|
162
303
|
}
|
|
163
304
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
305
|
+
$[18] = childRegistry;
|
|
306
|
+
$[19] = groupedItemsMap;
|
|
307
|
+
} else {
|
|
308
|
+
groupedItemsMap = $[19];
|
|
309
|
+
}
|
|
310
|
+
const groupedItems = groupedItemsMap;
|
|
311
|
+
let t15;
|
|
312
|
+
if ($[20] !== isVisibleChild || $[21] !== size) {
|
|
313
|
+
t15 = {
|
|
168
314
|
size,
|
|
169
315
|
registerChild,
|
|
170
316
|
unregisterChild,
|
|
171
317
|
isVisibleChild
|
|
172
|
-
}
|
|
173
|
-
|
|
318
|
+
};
|
|
319
|
+
$[20] = isVisibleChild;
|
|
320
|
+
$[21] = size;
|
|
321
|
+
$[22] = t15;
|
|
322
|
+
} else {
|
|
323
|
+
t15 = $[22];
|
|
324
|
+
}
|
|
325
|
+
let t16;
|
|
326
|
+
if ($[23] !== className) {
|
|
327
|
+
t16 = clsx(className, styles.Nav);
|
|
328
|
+
$[23] = className;
|
|
329
|
+
$[24] = t16;
|
|
330
|
+
} else {
|
|
331
|
+
t16 = $[24];
|
|
332
|
+
}
|
|
333
|
+
let t17;
|
|
334
|
+
if ($[25] !== ariaLabel || $[26] !== childRegistry || $[27] !== groupedItems || $[28] !== menuItemIds) {
|
|
335
|
+
t17 = menuItemIds.size > 0 && /*#__PURE__*/jsxs(ActionMenu, {
|
|
336
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
337
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
338
|
+
variant: "invisible",
|
|
339
|
+
"aria-label": `More ${ariaLabel} items`,
|
|
340
|
+
icon: KebabHorizontalIcon
|
|
341
|
+
})
|
|
342
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
343
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
344
|
+
children: Array.from(menuItemIds).map(id_2 => {
|
|
345
|
+
const menuItem = childRegistry.get(id_2);
|
|
346
|
+
if (!menuItem) {
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
if (menuItem.type === "divider") {
|
|
350
|
+
return /*#__PURE__*/jsx(ActionList.Divider, {}, id_2);
|
|
351
|
+
} else {
|
|
352
|
+
if (menuItem.type === "action") {
|
|
353
|
+
const {
|
|
354
|
+
onClick,
|
|
355
|
+
icon: Icon,
|
|
356
|
+
label,
|
|
357
|
+
disabled
|
|
358
|
+
} = menuItem;
|
|
359
|
+
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
360
|
+
onClick: event_0 => {
|
|
361
|
+
closeOverlay();
|
|
362
|
+
focusOnMoreMenuBtn();
|
|
363
|
+
typeof onClick === "function" && onClick(event_0);
|
|
364
|
+
},
|
|
365
|
+
disabled: disabled,
|
|
366
|
+
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
367
|
+
children: /*#__PURE__*/jsx(Icon, {})
|
|
368
|
+
}), label]
|
|
369
|
+
}, label);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
if (menuItem.type === "menu") {
|
|
373
|
+
const menuItems = menuItem.items;
|
|
374
|
+
const {
|
|
375
|
+
icon: Icon_0,
|
|
376
|
+
label: label_0
|
|
377
|
+
} = menuItem;
|
|
378
|
+
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
379
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
380
|
+
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
381
|
+
children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
382
|
+
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
383
|
+
}) : null, label_0]
|
|
384
|
+
})
|
|
385
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
386
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
387
|
+
children: menuItems.map(_temp3)
|
|
388
|
+
})
|
|
389
|
+
})]
|
|
390
|
+
}, id_2);
|
|
391
|
+
}
|
|
392
|
+
const groupedMenuItems = groupedItems.get(id_2) || [];
|
|
393
|
+
if (menuItem.type === "group") {
|
|
394
|
+
return /*#__PURE__*/jsx(React.Fragment, {
|
|
395
|
+
children: groupedMenuItems.map(t18 => {
|
|
396
|
+
const [key_0, childProps_1] = t18;
|
|
397
|
+
if (childProps_1.type === "action") {
|
|
398
|
+
const {
|
|
399
|
+
onClick: onClick_0,
|
|
400
|
+
icon: Icon_1,
|
|
401
|
+
label: label_1,
|
|
402
|
+
disabled: disabled_0
|
|
403
|
+
} = childProps_1;
|
|
404
|
+
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
405
|
+
onSelect: event_1 => {
|
|
406
|
+
closeOverlay();
|
|
407
|
+
focusOnMoreMenuBtn();
|
|
408
|
+
typeof onClick_0 === "function" && onClick_0(event_1);
|
|
409
|
+
},
|
|
410
|
+
disabled: disabled_0,
|
|
411
|
+
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
412
|
+
children: /*#__PURE__*/jsx(Icon_1, {})
|
|
413
|
+
}), label_1]
|
|
414
|
+
}, key_0);
|
|
415
|
+
}
|
|
416
|
+
return null;
|
|
417
|
+
})
|
|
418
|
+
}, id_2);
|
|
419
|
+
}
|
|
420
|
+
})
|
|
421
|
+
})
|
|
422
|
+
})]
|
|
423
|
+
});
|
|
424
|
+
$[25] = ariaLabel;
|
|
425
|
+
$[26] = childRegistry;
|
|
426
|
+
$[27] = groupedItems;
|
|
427
|
+
$[28] = menuItemIds;
|
|
428
|
+
$[29] = t17;
|
|
429
|
+
} else {
|
|
430
|
+
t17 = $[29];
|
|
431
|
+
}
|
|
432
|
+
let t18;
|
|
433
|
+
if ($[30] !== ariaLabel || $[31] !== ariaLabelledBy || $[32] !== children || $[33] !== gap || $[34] !== t17) {
|
|
434
|
+
t18 = /*#__PURE__*/jsxs("div", {
|
|
435
|
+
ref: listRef,
|
|
436
|
+
role: "toolbar",
|
|
437
|
+
className: styles.List,
|
|
438
|
+
"aria-label": ariaLabel,
|
|
439
|
+
"aria-labelledby": ariaLabelledBy,
|
|
440
|
+
"data-gap": gap,
|
|
441
|
+
children: [children, t17]
|
|
442
|
+
});
|
|
443
|
+
$[30] = ariaLabel;
|
|
444
|
+
$[31] = ariaLabelledBy;
|
|
445
|
+
$[32] = children;
|
|
446
|
+
$[33] = gap;
|
|
447
|
+
$[34] = t17;
|
|
448
|
+
$[35] = t18;
|
|
449
|
+
} else {
|
|
450
|
+
t18 = $[35];
|
|
451
|
+
}
|
|
452
|
+
let t19;
|
|
453
|
+
if ($[36] !== flush || $[37] !== t16 || $[38] !== t18) {
|
|
454
|
+
t19 = /*#__PURE__*/jsx("div", {
|
|
174
455
|
ref: navRef,
|
|
175
|
-
className:
|
|
456
|
+
className: t16,
|
|
176
457
|
"data-flush": flush,
|
|
177
|
-
children:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const {
|
|
200
|
-
onClick,
|
|
201
|
-
icon: Icon,
|
|
202
|
-
label,
|
|
203
|
-
disabled
|
|
204
|
-
} = menuItem;
|
|
205
|
-
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
206
|
-
// eslint-disable-next-line primer-react/prefer-action-list-item-onselect
|
|
207
|
-
onClick: event_0 => {
|
|
208
|
-
closeOverlay();
|
|
209
|
-
focusOnMoreMenuBtn();
|
|
210
|
-
typeof onClick === 'function' && onClick(event_0);
|
|
211
|
-
},
|
|
212
|
-
disabled: disabled,
|
|
213
|
-
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
214
|
-
children: /*#__PURE__*/jsx(Icon, {})
|
|
215
|
-
}), label]
|
|
216
|
-
}, label);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// Use the memoized map instead of filtering each time
|
|
220
|
-
const groupedMenuItems = groupedItems.get(id_2) || [];
|
|
221
|
-
|
|
222
|
-
// If we ever add additional types, this condition will be necessary
|
|
223
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
224
|
-
if (menuItem.type === 'group') {
|
|
225
|
-
return /*#__PURE__*/jsx(React.Fragment, {
|
|
226
|
-
children: groupedMenuItems.map(([key_0, childProps_1]) => {
|
|
227
|
-
if (childProps_1.type === 'action') {
|
|
228
|
-
const {
|
|
229
|
-
onClick: onClick_0,
|
|
230
|
-
icon: Icon_0,
|
|
231
|
-
label: label_0,
|
|
232
|
-
disabled: disabled_0
|
|
233
|
-
} = childProps_1;
|
|
234
|
-
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
235
|
-
onSelect: event_1 => {
|
|
236
|
-
closeOverlay();
|
|
237
|
-
focusOnMoreMenuBtn();
|
|
238
|
-
typeof onClick_0 === 'function' && onClick_0(event_1);
|
|
239
|
-
},
|
|
240
|
-
disabled: disabled_0,
|
|
241
|
-
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
242
|
-
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
243
|
-
}), label_0]
|
|
244
|
-
}, key_0);
|
|
245
|
-
}
|
|
246
|
-
return null;
|
|
247
|
-
})
|
|
248
|
-
}, id_2);
|
|
249
|
-
}
|
|
250
|
-
})
|
|
251
|
-
})
|
|
252
|
-
})]
|
|
253
|
-
})]
|
|
254
|
-
})
|
|
255
|
-
})
|
|
256
|
-
});
|
|
458
|
+
children: t18
|
|
459
|
+
});
|
|
460
|
+
$[36] = flush;
|
|
461
|
+
$[37] = t16;
|
|
462
|
+
$[38] = t18;
|
|
463
|
+
$[39] = t19;
|
|
464
|
+
} else {
|
|
465
|
+
t19 = $[39];
|
|
466
|
+
}
|
|
467
|
+
let t20;
|
|
468
|
+
if ($[40] !== t15 || $[41] !== t19) {
|
|
469
|
+
t20 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
|
|
470
|
+
value: t15,
|
|
471
|
+
children: t19
|
|
472
|
+
});
|
|
473
|
+
$[40] = t15;
|
|
474
|
+
$[41] = t19;
|
|
475
|
+
$[42] = t20;
|
|
476
|
+
} else {
|
|
477
|
+
t20 = $[42];
|
|
478
|
+
}
|
|
479
|
+
return t20;
|
|
257
480
|
};
|
|
258
|
-
ActionBar.displayName = "ActionBar";
|
|
259
481
|
const ActionBarIconButton = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
260
|
-
const $ = c(
|
|
482
|
+
const $ = c(27);
|
|
261
483
|
let disabled;
|
|
262
484
|
let onClick;
|
|
263
485
|
let props;
|
|
@@ -359,24 +581,22 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
359
581
|
return null;
|
|
360
582
|
}
|
|
361
583
|
let t5;
|
|
362
|
-
if ($[22] !== clickHandler || $[23] !== disabled || $[24] !==
|
|
584
|
+
if ($[22] !== clickHandler || $[23] !== disabled || $[24] !== props || $[25] !== size) {
|
|
363
585
|
t5 = /*#__PURE__*/jsx(IconButton, {
|
|
364
586
|
"aria-disabled": disabled,
|
|
365
587
|
ref: ref,
|
|
366
588
|
size: size,
|
|
367
589
|
onClick: clickHandler,
|
|
368
590
|
...props,
|
|
369
|
-
variant: "invisible"
|
|
370
|
-
"data-testid": id
|
|
591
|
+
variant: "invisible"
|
|
371
592
|
});
|
|
372
593
|
$[22] = clickHandler;
|
|
373
594
|
$[23] = disabled;
|
|
374
|
-
$[24] =
|
|
375
|
-
$[25] =
|
|
376
|
-
$[26] =
|
|
377
|
-
$[27] = t5;
|
|
595
|
+
$[24] = props;
|
|
596
|
+
$[25] = size;
|
|
597
|
+
$[26] = t5;
|
|
378
598
|
} else {
|
|
379
|
-
t5 = $[
|
|
599
|
+
t5 = $[26];
|
|
380
600
|
}
|
|
381
601
|
return t5;
|
|
382
602
|
});
|
|
@@ -470,6 +690,150 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
470
690
|
}
|
|
471
691
|
return t5;
|
|
472
692
|
});
|
|
693
|
+
const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
694
|
+
const $ = c(35);
|
|
695
|
+
let ariaLabel;
|
|
696
|
+
let icon;
|
|
697
|
+
let items;
|
|
698
|
+
let overflowIcon;
|
|
699
|
+
let props;
|
|
700
|
+
if ($[0] !== t0) {
|
|
701
|
+
({
|
|
702
|
+
"aria-label": ariaLabel,
|
|
703
|
+
icon,
|
|
704
|
+
overflowIcon,
|
|
705
|
+
items,
|
|
706
|
+
...props
|
|
707
|
+
} = t0);
|
|
708
|
+
$[0] = t0;
|
|
709
|
+
$[1] = ariaLabel;
|
|
710
|
+
$[2] = icon;
|
|
711
|
+
$[3] = items;
|
|
712
|
+
$[4] = overflowIcon;
|
|
713
|
+
$[5] = props;
|
|
714
|
+
} else {
|
|
715
|
+
ariaLabel = $[1];
|
|
716
|
+
icon = $[2];
|
|
717
|
+
items = $[3];
|
|
718
|
+
overflowIcon = $[4];
|
|
719
|
+
props = $[5];
|
|
720
|
+
}
|
|
721
|
+
const backupRef = useRef(null);
|
|
722
|
+
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
723
|
+
const id = useId();
|
|
724
|
+
const {
|
|
725
|
+
registerChild,
|
|
726
|
+
unregisterChild,
|
|
727
|
+
isVisibleChild
|
|
728
|
+
} = React.useContext(ActionBarContext);
|
|
729
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
730
|
+
const widthRef = useRef();
|
|
731
|
+
let t1;
|
|
732
|
+
if ($[6] !== ariaLabel || $[7] !== icon || $[8] !== id || $[9] !== items || $[10] !== overflowIcon || $[11] !== ref || $[12] !== registerChild || $[13] !== unregisterChild) {
|
|
733
|
+
t1 = () => {
|
|
734
|
+
var _ref$current3;
|
|
735
|
+
const width = (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.getBoundingClientRect().width;
|
|
736
|
+
if (width) {
|
|
737
|
+
widthRef.current = width;
|
|
738
|
+
}
|
|
739
|
+
if (!widthRef.current) {
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
registerChild(id, {
|
|
743
|
+
type: "menu",
|
|
744
|
+
width: widthRef.current,
|
|
745
|
+
label: ariaLabel,
|
|
746
|
+
icon: overflowIcon ? overflowIcon : icon,
|
|
747
|
+
items
|
|
748
|
+
});
|
|
749
|
+
return () => {
|
|
750
|
+
unregisterChild(id);
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
$[6] = ariaLabel;
|
|
754
|
+
$[7] = icon;
|
|
755
|
+
$[8] = id;
|
|
756
|
+
$[9] = items;
|
|
757
|
+
$[10] = overflowIcon;
|
|
758
|
+
$[11] = ref;
|
|
759
|
+
$[12] = registerChild;
|
|
760
|
+
$[13] = unregisterChild;
|
|
761
|
+
$[14] = t1;
|
|
762
|
+
} else {
|
|
763
|
+
t1 = $[14];
|
|
764
|
+
}
|
|
765
|
+
let t2;
|
|
766
|
+
if ($[15] !== ariaLabel || $[16] !== icon || $[17] !== items || $[18] !== overflowIcon || $[19] !== registerChild || $[20] !== unregisterChild) {
|
|
767
|
+
t2 = [registerChild, unregisterChild, ariaLabel, overflowIcon, icon, items];
|
|
768
|
+
$[15] = ariaLabel;
|
|
769
|
+
$[16] = icon;
|
|
770
|
+
$[17] = items;
|
|
771
|
+
$[18] = overflowIcon;
|
|
772
|
+
$[19] = registerChild;
|
|
773
|
+
$[20] = unregisterChild;
|
|
774
|
+
$[21] = t2;
|
|
775
|
+
} else {
|
|
776
|
+
t2 = $[21];
|
|
777
|
+
}
|
|
778
|
+
useIsomorphicLayoutEffect(t1, t2);
|
|
779
|
+
if (!isVisibleChild(id)) {
|
|
780
|
+
return null;
|
|
781
|
+
}
|
|
782
|
+
let t3;
|
|
783
|
+
if ($[22] !== ariaLabel || $[23] !== icon || $[24] !== props) {
|
|
784
|
+
t3 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
785
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
786
|
+
variant: "invisible",
|
|
787
|
+
"aria-label": ariaLabel,
|
|
788
|
+
icon: icon,
|
|
789
|
+
...props
|
|
790
|
+
})
|
|
791
|
+
});
|
|
792
|
+
$[22] = ariaLabel;
|
|
793
|
+
$[23] = icon;
|
|
794
|
+
$[24] = props;
|
|
795
|
+
$[25] = t3;
|
|
796
|
+
} else {
|
|
797
|
+
t3 = $[25];
|
|
798
|
+
}
|
|
799
|
+
let t4;
|
|
800
|
+
if ($[26] !== items) {
|
|
801
|
+
t4 = items.map(_temp4);
|
|
802
|
+
$[26] = items;
|
|
803
|
+
$[27] = t4;
|
|
804
|
+
} else {
|
|
805
|
+
t4 = $[27];
|
|
806
|
+
}
|
|
807
|
+
let t5;
|
|
808
|
+
if ($[28] !== t4) {
|
|
809
|
+
t5 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
810
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
811
|
+
children: t4
|
|
812
|
+
})
|
|
813
|
+
});
|
|
814
|
+
$[28] = t4;
|
|
815
|
+
$[29] = t5;
|
|
816
|
+
} else {
|
|
817
|
+
t5 = $[29];
|
|
818
|
+
}
|
|
819
|
+
let t6;
|
|
820
|
+
if ($[30] !== menuOpen || $[31] !== ref || $[32] !== t3 || $[33] !== t5) {
|
|
821
|
+
t6 = /*#__PURE__*/jsxs(ActionMenu, {
|
|
822
|
+
anchorRef: ref,
|
|
823
|
+
open: menuOpen,
|
|
824
|
+
onOpenChange: setMenuOpen,
|
|
825
|
+
children: [t3, t5]
|
|
826
|
+
});
|
|
827
|
+
$[30] = menuOpen;
|
|
828
|
+
$[31] = ref;
|
|
829
|
+
$[32] = t3;
|
|
830
|
+
$[33] = t5;
|
|
831
|
+
$[34] = t6;
|
|
832
|
+
} else {
|
|
833
|
+
t6 = $[34];
|
|
834
|
+
}
|
|
835
|
+
return t6;
|
|
836
|
+
});
|
|
473
837
|
const VerticalDivider = () => {
|
|
474
838
|
const $ = c(8);
|
|
475
839
|
const ref = useRef(null);
|
|
@@ -483,8 +847,8 @@ const VerticalDivider = () => {
|
|
|
483
847
|
let t0;
|
|
484
848
|
if ($[0] !== id || $[1] !== registerChild || $[2] !== unregisterChild) {
|
|
485
849
|
t0 = () => {
|
|
486
|
-
var _ref$
|
|
487
|
-
const width = (_ref$
|
|
850
|
+
var _ref$current4;
|
|
851
|
+
const width = (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.getBoundingClientRect().width;
|
|
488
852
|
if (width) {
|
|
489
853
|
widthRef.current = width;
|
|
490
854
|
}
|
|
@@ -531,5 +895,17 @@ const VerticalDivider = () => {
|
|
|
531
895
|
}
|
|
532
896
|
return t2;
|
|
533
897
|
};
|
|
898
|
+
function _temp() {
|
|
899
|
+
return new Map();
|
|
900
|
+
}
|
|
901
|
+
function _temp2() {
|
|
902
|
+
return new Set();
|
|
903
|
+
}
|
|
904
|
+
function _temp3(item, index) {
|
|
905
|
+
return renderMenuItem(item, index);
|
|
906
|
+
}
|
|
907
|
+
function _temp4(item, index) {
|
|
908
|
+
return renderMenuItem(item, index);
|
|
909
|
+
}
|
|
534
910
|
|
|
535
|
-
export { ActionBar, ActionBarGroup, ActionBarIconButton, VerticalDivider };
|
|
911
|
+
export { ActionBar, ActionBarGroup, ActionBarIconButton, ActionBarMenu, VerticalDivider };
|