@primer/react 38.40.2-rc.fdfbe71e5 → 38.41.0-rc.61d283273
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 +11 -1
- package/dist/ActionBar/ActionBar.js +30 -33
- package/dist/ActionList/{ActionList-1ff5220c.css → ActionList-64885d7a.css} +2 -2
- package/dist/ActionList/ActionList-64885d7a.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +1 -1
- package/dist/ActionList/Description.js +2 -2
- package/dist/ActionList/Divider.js +1 -1
- package/dist/ActionList/Group.js +12 -12
- package/dist/ActionList/GroupHeadingTrailingAction.js +1 -10
- package/dist/ActionList/Heading.js +1 -1
- package/dist/ActionList/Item.js +19 -19
- package/dist/ActionList/LinkItem.js +4 -4
- package/dist/ActionList/List.js +2 -2
- package/dist/ActionList/Selection.js +6 -6
- package/dist/ActionList/TrailingAction.js +3 -3
- package/dist/ActionList/Visuals.js +9 -9
- package/dist/ActionList/index.d.ts +1 -1
- package/dist/ActionList/shared.d.ts +1 -1
- package/dist/ActionMenu/ActionMenu.js +8 -11
- package/dist/AnchoredOverlay/AnchoredOverlay.js +4 -4
- package/dist/Autocomplete/Autocomplete.js +3 -3
- package/dist/Autocomplete/AutocompleteInput.js +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +111 -106
- package/dist/Autocomplete/AutocompleteOverlay.js +2 -2
- package/dist/Avatar/Avatar.js +1 -1
- package/dist/AvatarStack/AvatarStack.js +3 -3
- package/dist/Banner/Banner.js +21 -21
- package/dist/BaseStyles.js +1 -1
- package/dist/Blankslate/Blankslate.js +10 -11
- package/dist/BranchName/BranchName.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +20 -29
- package/dist/Button/Button.js +1 -1
- package/dist/Button/ButtonBase-c8dab214.css +2 -0
- package/dist/Button/ButtonBase-c8dab214.css.map +1 -0
- package/dist/Button/ButtonBase.js +12 -9
- package/dist/Button/ButtonBase.module.css.js +1 -1
- package/dist/Button/IconButton.js +3 -3
- package/dist/Button/LinkButton.js +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +2 -3
- package/dist/Card/Card.js +16 -16
- package/dist/Checkbox/Checkbox.js +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
- package/dist/CircleBadge/CircleBadge.js +2 -2
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -5
- package/dist/CounterLabel/CounterLabel.js +2 -2
- package/dist/DataTable/DataTable.js +7 -8
- package/dist/DataTable/ErrorDialog.js +1 -1
- package/dist/DataTable/Pagination.js +23 -23
- package/dist/DataTable/Table.js +25 -27
- package/dist/DataTable/TableGroup.js +10 -10
- package/dist/Details/Details.js +2 -2
- package/dist/Dialog/Dialog.js +20 -23
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/FeatureFlags/FeatureFlags.js +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +18 -19
- package/dist/FilteredActionList/FilteredActionListInput.js +2 -2
- package/dist/FilteredActionList/FilteredActionListLoaders.js +10 -11
- package/dist/Flash/Flash.js +1 -4
- package/dist/FormControl/FormControl.js +8 -8
- package/dist/FormControl/FormControlCaption.js +1 -1
- package/dist/FormControl/FormControlLabel.js +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +1 -1
- package/dist/FormControl/_FormControlValidation.js +1 -1
- package/dist/Header/Header.js +3 -3
- package/dist/Heading/Heading.js +1 -1
- package/dist/Hidden/Hidden.js +1 -1
- package/dist/InlineMessage/InlineMessage.js +11 -11
- package/dist/KeybindingHint/KeybindingHint.js +3 -3
- package/dist/KeybindingHint/components/Chord.js +3 -3
- package/dist/KeybindingHint/components/Key.js +3 -3
- package/dist/KeybindingHint/components/Sequence.js +1 -1
- package/dist/KeybindingHint/platform.js +0 -8
- package/dist/Label/Label.js +1 -1
- package/dist/LabelGroup/LabelGroup.js +18 -18
- package/dist/Link/Link.js +1 -1
- package/dist/NavList/NavList.js +24 -24
- package/dist/Octicon/Octicon.js +1 -4
- package/dist/Overlay/Overlay.js +3 -3
- package/dist/PageHeader/PageHeader.js +21 -21
- package/dist/PageLayout/DragHandle.js +1 -1
- package/dist/PageLayout/PageLayout.js +26 -26
- package/dist/PageLayout/usePaneWidth.js +0 -5
- package/dist/Pagehead/Pagehead.js +1 -1
- package/dist/Pagination/Pagination.js +9 -10
- package/dist/Popover/Popover.js +3 -3
- package/dist/ProgressBar/ProgressBar.js +3 -3
- package/dist/Radio/Radio.js +1 -1
- package/dist/RadioGroup/RadioGroup.js +2 -2
- package/dist/RelativeTime/RelativeTime.js +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.js +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +13 -13
- package/dist/SegmentedControl/SegmentedControlAction.js +6 -6
- package/dist/SegmentedControl/SegmentedControlButton.js +8 -8
- package/dist/SegmentedControl/SegmentedControlDivider.js +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.js +5 -5
- package/dist/Select/Select.js +9 -9
- package/dist/SelectPanel/SelectPanel.js +24 -27
- package/dist/SelectPanel/SelectPanelMessage.js +5 -5
- package/dist/SideNav.js +2 -2
- package/dist/Skeleton/SkeletonBox.js +1 -1
- package/dist/SkeletonAvatar/SkeletonAvatar.js +1 -1
- package/dist/SkeletonText/SkeletonText.js +3 -3
- package/dist/Spinner/Spinner.js +5 -5
- package/dist/SplitPageLayout/SplitPageLayout.js +6 -6
- package/dist/Stack/Stack.js +2 -2
- package/dist/StateLabel/StateLabel.js +2 -2
- package/dist/SubNav/SubNav.js +5 -5
- package/dist/TabNav/TabNav.js +4 -10
- package/dist/Text/Text.js +1 -1
- package/dist/TextInput/TextInput.js +13 -13
- package/dist/TextInputWithTokens/TextInputWithTokens.js +12 -15
- package/dist/Textarea/Textarea.js +7 -7
- package/dist/ThemeProvider.js +1 -2
- package/dist/Timeline/Timeline.js +11 -14
- package/dist/ToggleSwitch/ToggleSwitch.js +18 -18
- package/dist/Token/IssueLabelToken.js +3 -3
- package/dist/Token/Token.js +7 -7
- package/dist/Token/TokenBase.js +1 -1
- package/dist/Token/_RemoveTokenButton.js +4 -5
- package/dist/Token/_TokenTextContainer.js +1 -1
- package/dist/Tooltip/Tooltip.js +2 -5
- package/dist/TooltipV2/Tooltip.js +7 -7
- package/dist/TopicTag/TopicTag.js +1 -1
- package/dist/TopicTag/TopicTagGroup.js +1 -1
- package/dist/TreeView/TreeView.js +52 -59
- package/dist/TreeView/useRovingTabIndex.js +1 -0
- package/dist/TreeView/useTypeahead.js +3 -3
- package/dist/Truncate/Truncate.js +1 -2
- package/dist/UnderlineNav/UnderlineNav.js +18 -18
- package/dist/UnderlineNav/UnderlineNavItem.js +2 -2
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/_VisuallyHidden.js +1 -1
- package/dist/deprecated/ActionList/Divider.js +1 -1
- package/dist/deprecated/ActionList/Group.js +2 -5
- package/dist/deprecated/ActionList/Header.js +2 -5
- package/dist/deprecated/ActionList/Item.js +17 -20
- package/dist/deprecated/ActionList/List.js +4 -13
- package/dist/deprecated/ActionMenu.js +4 -6
- package/dist/deprecated/DialogV1/Dialog.js +5 -5
- package/dist/deprecated/FilteredSearch/FilteredSearch.js +1 -1
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +4 -4
- package/dist/experimental/IssueLabel/IssueLabel.js +4 -4
- package/dist/experimental/SelectPanel2/SelectPanel.js +42 -49
- package/dist/experimental/Tabs/Tabs.js +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +6 -9
- package/dist/experimental/index.js +1 -1
- package/dist/hooks/useMergedRefs.js +0 -12
- package/dist/hooks/useResponsiveValue.js +0 -5
- package/dist/hooks/useSlots.js +0 -48
- package/dist/internal/components/ButtonReset.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +9 -9
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
- package/dist/internal/components/ConditionalWrapper.js +2 -2
- package/dist/internal/components/InputLabel.js +3 -3
- package/dist/internal/components/InputValidation.js +4 -4
- package/dist/internal/components/OverflowObserverProvider.js +1 -1
- package/dist/internal/components/TextInputInnerAction.js +6 -6
- package/dist/internal/components/TextInputInnerVisualSlot.js +5 -5
- package/dist/internal/components/TextInputWrapper.js +2 -2
- package/dist/internal/components/ThemeProviderBase.js +3 -3
- package/dist/internal/components/UnderlineTabbedInterface.js +11 -11
- package/dist/internal/components/UnstyledTextInput.js +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +2 -2
- package/dist/internal/hooks/useOverflowObserver.js +1 -2
- package/dist/live-region/Announce.js +1 -1
- package/dist/live-region/AriaAlert.js +1 -1
- package/dist/live-region/AriaStatus.js +1 -1
- package/dist/next/ThemeProvider.js +1 -1
- package/dist/utils/descendant-registry.js +1 -7
- package/dist/utils/modern-polymorphic.js +0 -10
- package/generated/components.json +13 -3
- package/generated/hooks.json +1 -1
- package/package.json +3 -3
- package/dist/ActionList/ActionList-1ff5220c.css.map +0 -1
- package/dist/Button/ButtonBase-014fae23.css +0 -2
- package/dist/Button/ButtonBase-014fae23.css.map +0 -1
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -8,9 +8,6 @@ import { clsx } from "clsx";
|
|
|
8
8
|
/**
|
|
9
9
|
* @deprecated
|
|
10
10
|
*/
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated
|
|
13
|
-
*/
|
|
14
11
|
const Tooltip = /*#__PURE__*/ React.forwardRef(function Tooltip({ as: Component = "span", direction = "n", children, className, text, noDelay, align, wrap, id, ...rest }, ref) {
|
|
15
12
|
const tooltipId = useId$1(id);
|
|
16
13
|
const tooltipClasses = clsx(className, Tooltip_module_css_default.Tooltip, Tooltip_module_css_default[`Tooltip--${direction}`], {
|
|
@@ -23,9 +20,9 @@ const Tooltip = /*#__PURE__*/ React.forwardRef(function Tooltip({ as: Component
|
|
|
23
20
|
"tooltipped-multiline": wrap
|
|
24
21
|
});
|
|
25
22
|
const value = useMemo(() => ({ tooltipId }), [tooltipId]);
|
|
26
|
-
return
|
|
23
|
+
return /* @__PURE__ */ jsx(TooltipContext.Provider, {
|
|
27
24
|
value,
|
|
28
|
-
children:
|
|
25
|
+
children: /* @__PURE__ */ jsx(Component, {
|
|
29
26
|
role: "tooltip",
|
|
30
27
|
"aria-label": text,
|
|
31
28
|
id: tooltipId,
|
|
@@ -172,9 +172,9 @@ const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type =
|
|
|
172
172
|
const hasAriaLabel = "aria-label" in rest;
|
|
173
173
|
const keybindingHints = Array.isArray(keybindingHint) ? keybindingHint : [keybindingHint];
|
|
174
174
|
if (isFragmentTrigger) return child;
|
|
175
|
-
return
|
|
175
|
+
return /* @__PURE__ */ jsx(TooltipContext.Provider, {
|
|
176
176
|
value,
|
|
177
|
-
children:
|
|
177
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/*#__PURE__*/ React.isValidElement(child) && /*#__PURE__*/ React.cloneElement(child, {
|
|
178
178
|
ref: appliedTriggerRef,
|
|
179
179
|
"aria-describedby": (() => {
|
|
180
180
|
if (type !== "description") return child.props["aria-describedby"];
|
|
@@ -215,7 +215,7 @@ const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type =
|
|
|
215
215
|
closeTooltip();
|
|
216
216
|
(_child$props$onMouseL = (_child$props5 = child.props).onMouseLeave) === null || _child$props$onMouseL === void 0 || _child$props$onMouseL.call(_child$props5, event);
|
|
217
217
|
}
|
|
218
|
-
}),
|
|
218
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
219
219
|
className: clsx(className, Tooltip_module_css_default.Tooltip),
|
|
220
220
|
ref: tooltipElRef,
|
|
221
221
|
"data-direction": calculatedDirection,
|
|
@@ -226,18 +226,18 @@ const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type =
|
|
|
226
226
|
onMouseEnter: openTooltip,
|
|
227
227
|
onMouseLeave: closeTooltip,
|
|
228
228
|
id: hasAriaLabel || keybindingHints.length === 0 ? tooltipId : void 0,
|
|
229
|
-
children: keybindingHints.length > 0 ?
|
|
229
|
+
children: keybindingHints.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
230
230
|
id: hasAriaLabel ? void 0 : tooltipId,
|
|
231
|
-
children: [text,
|
|
231
|
+
children: [text, /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
232
232
|
"(",
|
|
233
233
|
keybindingHints.map((hint) => getAccessibleKeybindingHintString(hint, platform)).join(" or "),
|
|
234
234
|
")"
|
|
235
235
|
] })]
|
|
236
|
-
}),
|
|
236
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
237
237
|
className: clsx(Tooltip_module_css_default.KeybindingHintContainer, text && Tooltip_module_css_default.HasTextBefore, keybindingHints.length > 1 && Tooltip_module_css_default.HasMultipleHints),
|
|
238
238
|
"aria-hidden": true,
|
|
239
239
|
"data-component": "Tooltip.KeybindingHintContainer",
|
|
240
|
-
children: keybindingHints.map((hint, i) =>
|
|
240
|
+
children: keybindingHints.map((hint, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [i > 0 && " or ", /* @__PURE__ */ jsx(KeybindingHint, {
|
|
241
241
|
keys: hint,
|
|
242
242
|
format: "condensed",
|
|
243
243
|
variant: "onEmphasis",
|
|
@@ -32,7 +32,7 @@ function TopicTag(t0) {
|
|
|
32
32
|
} else t1 = $[6];
|
|
33
33
|
let t2;
|
|
34
34
|
if ($[7] !== BaseComponent || $[8] !== children || $[9] !== rest || $[10] !== t1) {
|
|
35
|
-
t2 =
|
|
35
|
+
t2 = /* @__PURE__ */ jsx(BaseComponent, {
|
|
36
36
|
...rest,
|
|
37
37
|
className: t1,
|
|
38
38
|
children
|
|
@@ -94,16 +94,16 @@ const Root = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, chil
|
|
|
94
94
|
}, []);
|
|
95
95
|
const expandedStateCache = React.useRef(null);
|
|
96
96
|
if (expandedStateCache.current === null) expandedStateCache.current = /* @__PURE__ */ new Map();
|
|
97
|
-
return
|
|
97
|
+
return /* @__PURE__ */ jsx(RootContext.Provider, {
|
|
98
98
|
value: {
|
|
99
99
|
announceUpdate,
|
|
100
100
|
expandedStateCache,
|
|
101
101
|
scrollElementIntoView
|
|
102
102
|
},
|
|
103
|
-
children:
|
|
103
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(AriaStatus, {
|
|
104
104
|
announceOnShow: true,
|
|
105
105
|
children: ariaLiveMessage
|
|
106
|
-
}) }),
|
|
106
|
+
}) }), /* @__PURE__ */ jsx("ul", {
|
|
107
107
|
ref: containerRef,
|
|
108
108
|
role: "tree",
|
|
109
109
|
"aria-label": ariaLabel,
|
|
@@ -117,7 +117,6 @@ const Root = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, chil
|
|
|
117
117
|
})] })
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
|
-
Root.displayName = "Root";
|
|
121
120
|
Root.displayName = "TreeView";
|
|
122
121
|
const ItemImpl = fixedForwardRef(({ id: itemId, containIntrinsicSize, current: isCurrentItem = false, defaultExpanded, expanded, onExpandedChange, onSelect, children, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, secondaryActions, as: Component, ...restProps }, ref) => {
|
|
123
122
|
const ItemElement = Component !== null && Component !== void 0 ? Component : "li";
|
|
@@ -202,7 +201,7 @@ const ItemImpl = fixedForwardRef(({ id: itemId, containIntrinsicSize, current: i
|
|
|
202
201
|
]);
|
|
203
202
|
const ariaDescribedByIds = [slots.leadingVisual ? leadingVisualId : null, slots.trailingVisual ? trailingVisualId : null].filter(Boolean);
|
|
204
203
|
const trailingActionShortcutText = `Press (${getAccessibleKeybindingHintString(`Shift+${platform === "apple" ? "Meta" : "Control"}+U`, platform)}) for more actions.`;
|
|
205
|
-
const itemElement =
|
|
204
|
+
const itemElement = /* @__PURE__ */ jsxs(ItemElement, {
|
|
206
205
|
...restProps,
|
|
207
206
|
className: clsx("PRIVATE_TreeView-item", className, TreeView_module_css_default.TreeViewItem),
|
|
208
207
|
ref,
|
|
@@ -234,7 +233,7 @@ const ItemImpl = fixedForwardRef(({ id: itemId, containIntrinsicSize, current: i
|
|
|
234
233
|
if (onSelect && event.button === 1) onSelect(event);
|
|
235
234
|
event.stopPropagation();
|
|
236
235
|
},
|
|
237
|
-
children: [
|
|
236
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
238
237
|
className: clsx("PRIVATE_TreeView-item-container", TreeView_module_css_default.TreeViewItemContainer),
|
|
239
238
|
style: {
|
|
240
239
|
"--level": level,
|
|
@@ -242,44 +241,44 @@ const ItemImpl = fixedForwardRef(({ id: itemId, containIntrinsicSize, current: i
|
|
|
242
241
|
containIntrinsicSize
|
|
243
242
|
},
|
|
244
243
|
children: [
|
|
245
|
-
|
|
244
|
+
/* @__PURE__ */ jsx("div", {
|
|
246
245
|
style: {
|
|
247
246
|
gridArea: "spacer",
|
|
248
247
|
display: "flex"
|
|
249
248
|
},
|
|
250
|
-
children:
|
|
249
|
+
children: /* @__PURE__ */ jsx(LevelIndicatorLines, { level })
|
|
251
250
|
}),
|
|
252
251
|
slots.leadingAction,
|
|
253
|
-
hasSubTree ?
|
|
252
|
+
hasSubTree ? /* @__PURE__ */ jsx("div", {
|
|
254
253
|
className: clsx("PRIVATE_TreeView-item-toggle", onSelect && "PRIVATE_TreeView-item-toggle--hover", level === 1 && "PRIVATE_TreeView-item-toggle--end", TreeView_module_css_default.TreeViewItemToggle, TreeView_module_css_default.TreeViewItemToggleHover, TreeView_module_css_default.TreeViewItemToggleEnd),
|
|
255
254
|
onClick: (event) => {
|
|
256
255
|
if (onSelect) toggle(event);
|
|
257
256
|
},
|
|
258
|
-
children: isExpanded ?
|
|
257
|
+
children: isExpanded ? /* @__PURE__ */ jsx(ChevronDownIcon, { size: TOGGLE_ICON_SIZE }) : /* @__PURE__ */ jsx(ChevronRightIcon, { size: TOGGLE_ICON_SIZE })
|
|
259
258
|
}) : null,
|
|
260
|
-
|
|
259
|
+
/* @__PURE__ */ jsxs("div", {
|
|
261
260
|
id: labelId,
|
|
262
261
|
className: clsx("PRIVATE_TreeView-item-content", TreeView_module_css_default.TreeViewItemContent),
|
|
263
262
|
children: [
|
|
264
263
|
slots.leadingVisual,
|
|
265
|
-
|
|
264
|
+
/* @__PURE__ */ jsx("span", {
|
|
266
265
|
className: clsx("PRIVATE_TreeView-item-content-text", TreeView_module_css_default.TreeViewItemContentText),
|
|
267
266
|
children: childrenWithoutSubTree
|
|
268
267
|
}),
|
|
269
268
|
slots.trailingVisual
|
|
270
269
|
]
|
|
271
270
|
}),
|
|
272
|
-
secondaryActions ?
|
|
271
|
+
secondaryActions ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(TrailingAction, {
|
|
273
272
|
items: secondaryActions,
|
|
274
273
|
shortcutText: trailingActionShortcutText
|
|
275
|
-
}), actionCommandPressed ?
|
|
274
|
+
}), actionCommandPressed ? /* @__PURE__ */ jsx(ActionDialog, {
|
|
276
275
|
items: secondaryActions,
|
|
277
276
|
onClose: () => setActionCommandPressed(false)
|
|
278
277
|
}) : null] }) : null
|
|
279
278
|
]
|
|
280
279
|
}), subTree]
|
|
281
280
|
});
|
|
282
|
-
return
|
|
281
|
+
return /* @__PURE__ */ jsx(ItemContext.Provider, {
|
|
283
282
|
value: {
|
|
284
283
|
itemId,
|
|
285
284
|
level: level + 1,
|
|
@@ -291,7 +290,7 @@ const ItemImpl = fixedForwardRef(({ id: itemId, containIntrinsicSize, current: i
|
|
|
291
290
|
trailingVisualId,
|
|
292
291
|
trailingActionId
|
|
293
292
|
},
|
|
294
|
-
children: isPolymorphic ?
|
|
293
|
+
children: isPolymorphic ? /* @__PURE__ */ jsx("li", {
|
|
295
294
|
role: "none",
|
|
296
295
|
children: itemElement
|
|
297
296
|
}) : itemElement
|
|
@@ -300,15 +299,14 @@ const ItemImpl = fixedForwardRef(({ id: itemId, containIntrinsicSize, current: i
|
|
|
300
299
|
const Item = Object.assign(ItemImpl, { displayName: "TreeView.Item" });
|
|
301
300
|
/** Lines to indicate the depth of an item in a TreeView */
|
|
302
301
|
const LevelIndicatorLines = ({ level }) => {
|
|
303
|
-
return
|
|
302
|
+
return /* @__PURE__ */ jsx("div", {
|
|
304
303
|
style: {
|
|
305
304
|
width: "100%",
|
|
306
305
|
display: "flex"
|
|
307
306
|
},
|
|
308
|
-
children: Array.from({ length: level - 1 }).map((_, index) =>
|
|
307
|
+
children: Array.from({ length: level - 1 }).map((_, index) => /* @__PURE__ */ jsx("div", { className: clsx("PRIVATE_TreeView-item-level-line", TreeView_module_css_default.TreeViewItemLevelLine) }, index))
|
|
309
308
|
});
|
|
310
309
|
};
|
|
311
|
-
LevelIndicatorLines.displayName = "LevelIndicatorLines";
|
|
312
310
|
const SubTree = ({ count, state, children, "aria-label": ariaLabel }) => {
|
|
313
311
|
const { announceUpdate } = React.useContext(RootContext);
|
|
314
312
|
const { itemId, isExpanded, isSubTreeEmpty, setIsSubTreeEmpty } = React.useContext(ItemContext);
|
|
@@ -379,7 +377,7 @@ const SubTree = ({ count, state, children, "aria-label": ariaLabel }) => {
|
|
|
379
377
|
};
|
|
380
378
|
}, [loadingItemRef, state]);
|
|
381
379
|
if (!isExpanded) return null;
|
|
382
|
-
return
|
|
380
|
+
return /* @__PURE__ */ jsxs("ul", {
|
|
383
381
|
role: "group",
|
|
384
382
|
style: {
|
|
385
383
|
listStyle: "none",
|
|
@@ -388,13 +386,12 @@ const SubTree = ({ count, state, children, "aria-label": ariaLabel }) => {
|
|
|
388
386
|
},
|
|
389
387
|
ref,
|
|
390
388
|
"aria-label": ariaLabel || subTreeLabel,
|
|
391
|
-
children: [state === "loading" ?
|
|
389
|
+
children: [state === "loading" ? /* @__PURE__ */ jsx(LoadingItem, {
|
|
392
390
|
ref: loadingItemRef,
|
|
393
391
|
count
|
|
394
|
-
}) : children, isSubTreeEmpty && state !== "loading" ?
|
|
392
|
+
}) : children, isSubTreeEmpty && state !== "loading" ? /* @__PURE__ */ jsx(EmptyItem, {}) : null]
|
|
395
393
|
});
|
|
396
394
|
};
|
|
397
|
-
SubTree.displayName = "SubTree";
|
|
398
395
|
SubTree.displayName = "TreeView.SubTree";
|
|
399
396
|
SubTree.__SLOT__ = Symbol("TreeView.SubTree");
|
|
400
397
|
function usePreviousValue(value) {
|
|
@@ -405,25 +402,24 @@ function usePreviousValue(value) {
|
|
|
405
402
|
return ref.current;
|
|
406
403
|
}
|
|
407
404
|
const SkeletonItem = () => {
|
|
408
|
-
return
|
|
405
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
409
406
|
className: clsx(TreeView_module_css_default.TreeViewSkeletonItemContainerStyle, TreeView_module_css_default.TreeViewItemSkeleton, "PRIVATE_TreeView-item-skeleton"),
|
|
410
|
-
children: [
|
|
407
|
+
children: [/* @__PURE__ */ jsx(SkeletonAvatar, {
|
|
411
408
|
size: 16,
|
|
412
409
|
square: true
|
|
413
|
-
}),
|
|
410
|
+
}), /* @__PURE__ */ jsx(SkeletonText, { className: TreeView_module_css_default.TreeItemSkeletonTextStyles })]
|
|
414
411
|
});
|
|
415
412
|
};
|
|
416
|
-
SkeletonItem.displayName = "SkeletonItem";
|
|
417
413
|
const LoadingItem = /*#__PURE__*/ React.forwardRef(({ count }, ref) => {
|
|
418
414
|
const itemId = useId$1();
|
|
419
|
-
if (count) return
|
|
415
|
+
if (count) return /* @__PURE__ */ jsx(LoadingPlaceholderContext.Provider, {
|
|
420
416
|
value: true,
|
|
421
|
-
children:
|
|
417
|
+
children: /* @__PURE__ */ jsxs(Item, {
|
|
422
418
|
id: itemId,
|
|
423
419
|
ref,
|
|
424
420
|
children: [Array.from({ length: count }).map((_, i) => {
|
|
425
|
-
return
|
|
426
|
-
}),
|
|
421
|
+
return /* @__PURE__ */ jsx(SkeletonItem, { "aria-hidden": true }, i);
|
|
422
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
427
423
|
className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
|
|
428
424
|
children: [
|
|
429
425
|
"Loading ",
|
|
@@ -433,12 +429,12 @@ const LoadingItem = /*#__PURE__*/ React.forwardRef(({ count }, ref) => {
|
|
|
433
429
|
})]
|
|
434
430
|
})
|
|
435
431
|
});
|
|
436
|
-
return
|
|
432
|
+
return /* @__PURE__ */ jsx(LoadingPlaceholderContext.Provider, {
|
|
437
433
|
value: true,
|
|
438
|
-
children:
|
|
434
|
+
children: /* @__PURE__ */ jsxs(Item, {
|
|
439
435
|
id: itemId,
|
|
440
436
|
ref,
|
|
441
|
-
children: [
|
|
437
|
+
children: [/* @__PURE__ */ jsx(LeadingVisual, { children: /* @__PURE__ */ jsx(Spinner, { size: "small" }) }), /* @__PURE__ */ jsx(Text_default, {
|
|
442
438
|
className: "fgColor-muted",
|
|
443
439
|
children: "Loading..."
|
|
444
440
|
})]
|
|
@@ -446,11 +442,11 @@ const LoadingItem = /*#__PURE__*/ React.forwardRef(({ count }, ref) => {
|
|
|
446
442
|
});
|
|
447
443
|
});
|
|
448
444
|
const EmptyItem = /*#__PURE__*/ React.forwardRef((props, ref) => {
|
|
449
|
-
return
|
|
445
|
+
return /* @__PURE__ */ jsx(Item, {
|
|
450
446
|
expanded: null,
|
|
451
447
|
id: useId$1(),
|
|
452
448
|
ref,
|
|
453
|
-
children:
|
|
449
|
+
children: /* @__PURE__ */ jsx(Text_default, {
|
|
454
450
|
className: "fgColor-muted",
|
|
455
451
|
children: "No items found"
|
|
456
452
|
})
|
|
@@ -469,12 +465,12 @@ function useSubTree(children) {
|
|
|
469
465
|
const LeadingVisual = (props) => {
|
|
470
466
|
const { isExpanded, leadingVisualId } = React.useContext(ItemContext);
|
|
471
467
|
const children = typeof props.children === "function" ? props.children({ isExpanded }) : props.children;
|
|
472
|
-
return
|
|
468
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
473
469
|
className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
|
|
474
470
|
"aria-hidden": true,
|
|
475
471
|
id: leadingVisualId,
|
|
476
472
|
children: props.label
|
|
477
|
-
}),
|
|
473
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
478
474
|
className: clsx("PRIVATE_TreeView-item-visual", TreeView_module_css_default.TreeViewItemVisual),
|
|
479
475
|
"aria-hidden": true,
|
|
480
476
|
children
|
|
@@ -484,12 +480,12 @@ LeadingVisual.displayName = "TreeView.LeadingVisual";
|
|
|
484
480
|
const TrailingVisual = (props) => {
|
|
485
481
|
const { isExpanded, trailingVisualId } = React.useContext(ItemContext);
|
|
486
482
|
const children = typeof props.children === "function" ? props.children({ isExpanded }) : props.children;
|
|
487
|
-
return
|
|
483
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
488
484
|
className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
|
|
489
485
|
"aria-hidden": true,
|
|
490
486
|
id: trailingVisualId,
|
|
491
487
|
children: props.label
|
|
492
|
-
}),
|
|
488
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
493
489
|
className: clsx("PRIVATE_TreeView-item-visual", TreeView_module_css_default.TreeViewItemVisual),
|
|
494
490
|
"aria-hidden": true,
|
|
495
491
|
children
|
|
@@ -499,11 +495,11 @@ TrailingVisual.displayName = "TreeView.TrailingVisual";
|
|
|
499
495
|
const LeadingAction = (props) => {
|
|
500
496
|
const { isExpanded } = React.useContext(ItemContext);
|
|
501
497
|
const children = typeof props.children === "function" ? props.children({ isExpanded }) : props.children;
|
|
502
|
-
return
|
|
498
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
503
499
|
className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
|
|
504
500
|
"aria-hidden": true,
|
|
505
501
|
children: props.label
|
|
506
|
-
}),
|
|
502
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
507
503
|
className: clsx("PRIVATE_TreeView-item-leading-action", TreeView_module_css_default.TreeViewItemLeadingAction),
|
|
508
504
|
"aria-hidden": true,
|
|
509
505
|
children
|
|
@@ -513,19 +509,19 @@ LeadingAction.displayName = "TreeView.LeadingAction";
|
|
|
513
509
|
const TrailingAction = (props) => {
|
|
514
510
|
const { trailingActionId, itemId } = React.useContext(ItemContext);
|
|
515
511
|
const { items, shortcutText } = props;
|
|
516
|
-
return
|
|
512
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
517
513
|
id: trailingActionId,
|
|
518
514
|
className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
|
|
519
515
|
children: ["- ", shortcutText]
|
|
520
|
-
}),
|
|
516
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
521
517
|
className: TreeView_module_css_default.TreeViewItemTrailingAction,
|
|
522
518
|
"aria-hidden": true,
|
|
523
519
|
onClick: (event) => event.stopPropagation(),
|
|
524
520
|
onKeyDown: (event) => event.stopPropagation(),
|
|
525
521
|
children: items.map(({ label, onClick, icon, count, className }, index) => {
|
|
526
|
-
if (count) return
|
|
522
|
+
if (count) return /* @__PURE__ */ jsx(Tooltip, {
|
|
527
523
|
text: label,
|
|
528
|
-
children:
|
|
524
|
+
children: /* @__PURE__ */ jsx(ButtonComponent, {
|
|
529
525
|
"aria-label": label,
|
|
530
526
|
leadingVisual: icon,
|
|
531
527
|
variant: "invisible",
|
|
@@ -540,7 +536,7 @@ const TrailingAction = (props) => {
|
|
|
540
536
|
count
|
|
541
537
|
})
|
|
542
538
|
}, index);
|
|
543
|
-
return
|
|
539
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
544
540
|
icon,
|
|
545
541
|
variant: "invisible",
|
|
546
542
|
"aria-label": label,
|
|
@@ -559,7 +555,7 @@ const TrailingAction = (props) => {
|
|
|
559
555
|
TrailingAction.displayName = "TreeView.TrailingAction";
|
|
560
556
|
const ActionDialog = ({ items, onClose }) => {
|
|
561
557
|
const { itemId } = React.useContext(ItemContext);
|
|
562
|
-
return
|
|
558
|
+
return /* @__PURE__ */ jsx("div", {
|
|
563
559
|
onClick: (event) => {
|
|
564
560
|
event.stopPropagation();
|
|
565
561
|
},
|
|
@@ -573,7 +569,7 @@ const ActionDialog = ({ items, onClose }) => {
|
|
|
573
569
|
"Enter"
|
|
574
570
|
].includes(event.key)) event.stopPropagation();
|
|
575
571
|
},
|
|
576
|
-
children:
|
|
572
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
577
573
|
title: "Supplemental actions",
|
|
578
574
|
onClose: () => {
|
|
579
575
|
if (onClose) onClose();
|
|
@@ -582,31 +578,29 @@ const ActionDialog = ({ items, onClose }) => {
|
|
|
582
578
|
parentElement === null || parentElement === void 0 || parentElement.focus();
|
|
583
579
|
});
|
|
584
580
|
},
|
|
585
|
-
children:
|
|
581
|
+
children: /* @__PURE__ */ jsx(ActionList, { children: items.map(({ label, onClick, icon: Icon, count }, index) => /* @__PURE__ */ jsxs(ActionList.Item, {
|
|
586
582
|
onSelect: onClick,
|
|
587
583
|
children: [
|
|
588
|
-
|
|
584
|
+
/* @__PURE__ */ jsx(ActionList.LeadingVisual, { children: /* @__PURE__ */ jsx(Icon, {}) }),
|
|
589
585
|
label,
|
|
590
|
-
count ?
|
|
586
|
+
count ? /* @__PURE__ */ jsxs(ActionList.TrailingVisual, { children: [count, /* @__PURE__ */ jsx(VisuallyHidden, { children: "items" })] }) : null
|
|
591
587
|
]
|
|
592
588
|
}, index)) })
|
|
593
589
|
})
|
|
594
590
|
});
|
|
595
591
|
};
|
|
596
|
-
ActionDialog.displayName = "ActionDialog";
|
|
597
592
|
ActionDialog.displayName = "TreeView.ActionDialog";
|
|
598
593
|
const DirectoryIcon = () => {
|
|
599
594
|
const { isExpanded } = React.useContext(ItemContext);
|
|
600
595
|
const Icon = isExpanded ? FileDirectoryOpenFillIcon : FileDirectoryFillIcon;
|
|
601
|
-
return
|
|
596
|
+
return /* @__PURE__ */ jsx("div", {
|
|
602
597
|
className: clsx("PRIVATE_TreeView-directory-icon", TreeView_module_css_default.TreeViewDirectoryIcon),
|
|
603
|
-
children:
|
|
598
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
604
599
|
});
|
|
605
600
|
};
|
|
606
|
-
DirectoryIcon.displayName = "DirectoryIcon";
|
|
607
601
|
const ErrorDialog = ({ title = "Error", children, onRetry, onDismiss }) => {
|
|
608
602
|
const { itemId, setIsExpanded } = React.useContext(ItemContext);
|
|
609
|
-
return
|
|
603
|
+
return /* @__PURE__ */ jsx("div", {
|
|
610
604
|
onKeyDown: (event) => {
|
|
611
605
|
if ([
|
|
612
606
|
"Backspace",
|
|
@@ -617,7 +611,7 @@ const ErrorDialog = ({ title = "Error", children, onRetry, onDismiss }) => {
|
|
|
617
611
|
"Enter"
|
|
618
612
|
].includes(event.key)) event.stopPropagation();
|
|
619
613
|
},
|
|
620
|
-
children:
|
|
614
|
+
children: /* @__PURE__ */ jsx(ConfirmationDialog, {
|
|
621
615
|
title,
|
|
622
616
|
onClose: (gesture) => {
|
|
623
617
|
setTimeout(() => {
|
|
@@ -636,7 +630,6 @@ const ErrorDialog = ({ title = "Error", children, onRetry, onDismiss }) => {
|
|
|
636
630
|
})
|
|
637
631
|
});
|
|
638
632
|
};
|
|
639
|
-
ErrorDialog.displayName = "ErrorDialog";
|
|
640
633
|
ErrorDialog.displayName = "TreeView.ErrorDialog";
|
|
641
634
|
const TreeView = Object.assign(Root, {
|
|
642
635
|
Item,
|
|
@@ -57,6 +57,7 @@ function _temp(direction, from, event) {
|
|
|
57
57
|
try {
|
|
58
58
|
if (from.closest("dialog:modal")) return;
|
|
59
59
|
} catch {}
|
|
60
|
+
if (from.getAttribute("role") !== "treeitem") return from;
|
|
60
61
|
return (_getNextFocusableElem = getNextFocusableElement(from, event)) !== null && _getNextFocusableElem !== void 0 ? _getNextFocusableElem : from;
|
|
61
62
|
}
|
|
62
63
|
function getNextFocusableElement(activeElement, event) {
|
|
@@ -82,15 +82,15 @@ function useTypeahead(t0) {
|
|
|
82
82
|
}
|
|
83
83
|
React.useEffect(t4, t5);
|
|
84
84
|
}
|
|
85
|
+
function _temp(element) {
|
|
86
|
+
return element === document.activeElement;
|
|
87
|
+
}
|
|
85
88
|
/**
|
|
86
89
|
* Wraps an array around itself at a given start index
|
|
87
90
|
*
|
|
88
91
|
* @example
|
|
89
92
|
* wrapArray(['a', 'b', 'c', 'd'], 2) // ['c', 'd', 'a', 'b']
|
|
90
93
|
*/
|
|
91
|
-
function _temp(element) {
|
|
92
|
-
return element === document.activeElement;
|
|
93
|
-
}
|
|
94
94
|
function wrapArray(array, startIndex) {
|
|
95
95
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
96
96
|
}
|
|
@@ -5,7 +5,7 @@ import { clsx } from "clsx";
|
|
|
5
5
|
//#region src/Truncate/Truncate.tsx
|
|
6
6
|
function Truncate(props, ref) {
|
|
7
7
|
const { as: Component = "div", children, className, title, inline, expandable, maxWidth = 125, style, ...rest } = props;
|
|
8
|
-
return
|
|
8
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
9
9
|
...typeof Component === "string" ? {} : { inline },
|
|
10
10
|
...rest,
|
|
11
11
|
ref,
|
|
@@ -21,7 +21,6 @@ function Truncate(props, ref) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
Truncate.displayName = "Truncate";
|
|
24
|
-
Truncate.displayName = "Truncate";
|
|
25
24
|
var Truncate_default = fixedForwardRef(Truncate);
|
|
26
25
|
//#endregion
|
|
27
26
|
export { Truncate_default as default };
|
|
@@ -80,7 +80,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
80
80
|
if (menuOpen && !isOverflowing) setMenuOpen(false);
|
|
81
81
|
let t10;
|
|
82
82
|
if ($[12] !== ariaLabel) {
|
|
83
|
-
t10 = ariaLabel &&
|
|
83
|
+
t10 = ariaLabel && /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
84
84
|
as: "h2",
|
|
85
85
|
children: `${ariaLabel} navigation`
|
|
86
86
|
});
|
|
@@ -97,7 +97,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
97
97
|
const t13 = isOverflowing ? "true" : void 0;
|
|
98
98
|
let t14;
|
|
99
99
|
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
-
t14 =
|
|
100
|
+
t14 = /* @__PURE__ */ jsx("li", {
|
|
101
101
|
role: "presentation",
|
|
102
102
|
"aria-hidden": true,
|
|
103
103
|
className: UnderlineNav_module_css_default.WrapSpacer
|
|
@@ -106,7 +106,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
106
106
|
} else t14 = $[16];
|
|
107
107
|
let t15;
|
|
108
108
|
if ($[17] !== children || $[18] !== setRegisteredItems) {
|
|
109
|
-
t15 =
|
|
109
|
+
t15 = /* @__PURE__ */ jsx(UnderlineNavItemsRegistry.Provider, {
|
|
110
110
|
setRegistry: setRegisteredItems,
|
|
111
111
|
children
|
|
112
112
|
});
|
|
@@ -116,11 +116,11 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
116
116
|
} else t15 = $[19];
|
|
117
117
|
let t16;
|
|
118
118
|
if ($[20] !== navRef || $[21] !== t15) {
|
|
119
|
-
t16 =
|
|
119
|
+
t16 = /* @__PURE__ */ jsxs(UnderlineItemList, {
|
|
120
120
|
ref: listRef,
|
|
121
121
|
role: "list",
|
|
122
122
|
className: UnderlineNav_module_css_default.ItemsList,
|
|
123
|
-
children: [t14,
|
|
123
|
+
children: [t14, /* @__PURE__ */ jsx(OverflowObserverProvider, {
|
|
124
124
|
rootRef: navRef,
|
|
125
125
|
children: t15
|
|
126
126
|
})]
|
|
@@ -131,14 +131,14 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
131
131
|
} else t16 = $[22];
|
|
132
132
|
let t17;
|
|
133
133
|
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
134
|
-
t17 =
|
|
134
|
+
t17 = /* @__PURE__ */ jsx("div", { className: UnderlineNav_module_css_default.MoreButtonDivider });
|
|
135
135
|
$[23] = t17;
|
|
136
136
|
} else t17 = $[23];
|
|
137
137
|
const t18 = overflowingCurrentItem ? "true" : void 0;
|
|
138
138
|
const t19 = overflowingCurrentItem ? "More items, including current item" : void 0;
|
|
139
139
|
let t20;
|
|
140
140
|
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
141
|
-
t20 =
|
|
141
|
+
t20 = /* @__PURE__ */ jsxs("span", { children: ["More", /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
142
142
|
as: "span",
|
|
143
143
|
children: " items"
|
|
144
144
|
})] });
|
|
@@ -146,7 +146,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
146
146
|
} else t20 = $[24];
|
|
147
147
|
let t21;
|
|
148
148
|
if ($[25] !== t18 || $[26] !== t19) {
|
|
149
|
-
t21 =
|
|
149
|
+
t21 = /* @__PURE__ */ jsx(ActionMenu.Button, {
|
|
150
150
|
className: UnderlineNav_module_css_default.MoreButton,
|
|
151
151
|
variant: "invisible",
|
|
152
152
|
"data-component": "overflow-menu-button",
|
|
@@ -160,19 +160,19 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
160
160
|
} else t21 = $[27];
|
|
161
161
|
let t22;
|
|
162
162
|
if ($[28] !== loadingCounters || $[29] !== overflowMenuItems || $[30] !== registeredItems) {
|
|
163
|
-
t22 = registeredItems === void 0 ?
|
|
163
|
+
t22 = registeredItems === void 0 ? /* @__PURE__ */ jsx(ActionList.Item, { children: /* @__PURE__ */ jsx(SkeletonText, {}) }) : overflowMenuItems.map((t23) => {
|
|
164
164
|
const [key, allProps] = t23;
|
|
165
165
|
const { children: menuItemChildren, counter, onSelect, ...menuItemProps } = allProps;
|
|
166
|
-
return
|
|
166
|
+
return /* @__PURE__ */ jsxs(ActionList.LinkItem, {
|
|
167
167
|
onClick: (event) => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
|
|
168
168
|
...menuItemProps,
|
|
169
169
|
className: UnderlineNav_module_css_default.OverflowMenuItem,
|
|
170
|
-
children: [
|
|
170
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
171
171
|
className: UnderlineNav_module_css_default.OverflowMenuItemLabel,
|
|
172
172
|
children: menuItemChildren
|
|
173
|
-
}), loadingCounters ?
|
|
173
|
+
}), loadingCounters ? /* @__PURE__ */ jsx(ActionList.TrailingVisual, { children: /* @__PURE__ */ jsx(LoadingCounter, {}) }) : counter !== void 0 && /* @__PURE__ */ jsx(ActionList.TrailingVisual, { children: /* @__PURE__ */ jsx("span", {
|
|
174
174
|
"data-component": "counter",
|
|
175
|
-
children:
|
|
175
|
+
children: /* @__PURE__ */ jsx(CounterLabel, { children: counter })
|
|
176
176
|
}) })]
|
|
177
177
|
}, key);
|
|
178
178
|
});
|
|
@@ -183,15 +183,15 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
183
183
|
} else t22 = $[31];
|
|
184
184
|
let t23;
|
|
185
185
|
if ($[32] !== t22) {
|
|
186
|
-
t23 =
|
|
186
|
+
t23 = /* @__PURE__ */ jsx(ActionMenu.Overlay, { children: /* @__PURE__ */ jsx(ActionList, { children: t22 }) });
|
|
187
187
|
$[32] = t22;
|
|
188
188
|
$[33] = t23;
|
|
189
189
|
} else t23 = $[33];
|
|
190
190
|
let t24;
|
|
191
191
|
if ($[34] !== menuOpen || $[35] !== t21 || $[36] !== t23) {
|
|
192
|
-
t24 =
|
|
192
|
+
t24 = /* @__PURE__ */ jsxs("div", {
|
|
193
193
|
className: UnderlineNav_module_css_default.MoreButtonContainer,
|
|
194
|
-
children: [t17,
|
|
194
|
+
children: [t17, /* @__PURE__ */ jsxs(ActionMenu, {
|
|
195
195
|
open: menuOpen,
|
|
196
196
|
onOpenChange: setMenuOpen,
|
|
197
197
|
children: [t21, t23]
|
|
@@ -204,7 +204,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
204
204
|
} else t24 = $[37];
|
|
205
205
|
let t25;
|
|
206
206
|
if ($[38] !== ariaLabel || $[39] !== as || $[40] !== navRef || $[41] !== t11 || $[42] !== t12 || $[43] !== t13 || $[44] !== t16 || $[45] !== t24 || $[46] !== variant) {
|
|
207
|
-
t25 =
|
|
207
|
+
t25 = /* @__PURE__ */ jsxs(UnderlineWrapper, {
|
|
208
208
|
as,
|
|
209
209
|
"aria-label": ariaLabel,
|
|
210
210
|
className: t11,
|
|
@@ -228,7 +228,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
228
228
|
} else t25 = $[47];
|
|
229
229
|
let t26;
|
|
230
230
|
if ($[48] !== contextValue || $[49] !== t10 || $[50] !== t25) {
|
|
231
|
-
t26 =
|
|
231
|
+
t26 = /* @__PURE__ */ jsxs(UnderlineNavContext.Provider, {
|
|
232
232
|
value: contextValue,
|
|
233
233
|
children: [t10, t25]
|
|
234
234
|
});
|
|
@@ -79,7 +79,7 @@ const UnderlineNavItem = /*#__PURE__*/ forwardRef((allProps, forwardedRef) => {
|
|
|
79
79
|
const t6 = isOverflowing ? -1 : allProps.tabIndex;
|
|
80
80
|
let t7;
|
|
81
81
|
if ($[17] !== Component || $[18] !== ariaCurrent || $[19] !== children || $[20] !== clickHandler || $[21] !== counter || $[22] !== forwardedRef || $[23] !== hrefProps || $[24] !== keyDownHandler || $[25] !== loadingCounters || $[26] !== props || $[27] !== t5 || $[28] !== t6) {
|
|
82
|
-
t7 =
|
|
82
|
+
t7 = /* @__PURE__ */ jsx(UnderlineItem, {
|
|
83
83
|
ref: forwardedRef,
|
|
84
84
|
as: Component,
|
|
85
85
|
...hrefProps,
|
|
@@ -109,7 +109,7 @@ const UnderlineNavItem = /*#__PURE__*/ forwardRef((allProps, forwardedRef) => {
|
|
|
109
109
|
} else t7 = $[29];
|
|
110
110
|
let t8;
|
|
111
111
|
if ($[30] !== t4 || $[31] !== t7) {
|
|
112
|
-
t8 =
|
|
112
|
+
t8 = /* @__PURE__ */ jsx("li", {
|
|
113
113
|
className: UnderlineNavItem_module_css_default.UnderlineNavItem,
|
|
114
114
|
ref,
|
|
115
115
|
"aria-hidden": t4,
|