@primer/react 38.32.0-rc.e7fe8806e → 38.32.1-rc.1e5efd5e2
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 +14 -0
- package/dist/ActionBar/ActionBar.js +1 -1
- package/dist/ActionList/Group.js +1 -1
- package/dist/ActionList/Item.js +1 -1
- package/dist/ActionList/List.js +1 -1
- package/dist/ActionMenu/ActionMenu.js +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +2 -1
- package/dist/Autocomplete/AutocompleteMenu.js +3 -2
- package/dist/Breadcrumbs/Breadcrumbs.js +4 -1
- package/dist/Dialog/Dialog.js +1 -1
- package/dist/FilteredActionList/useAnnouncements.js +20 -14
- package/dist/NavList/NavList.js +1 -1
- package/dist/PageHeader/PageHeader.js +1 -1
- package/dist/PageLayout/PageLayout.js +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.js +1 -1
- package/dist/TooltipV2/Tooltip.js +2 -1
- package/dist/TreeView/TreeView.js +6 -3
- package/dist/UnderlineNav/UnderlineNav-a06bbc74.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-a06bbc74.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts +5 -0
- package/dist/UnderlineNav/UnderlineNav.js +136 -129
- package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +2 -2
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +1 -1
- package/dist/experimental/index.js +1 -1
- package/dist/hooks/useAnchoredPosition.js +14 -1
- package/dist/hooks/useDialog.js +2 -1
- package/dist/hooks/useScrollFlash.js +2 -1
- package/dist/index.js +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +1 -1
- package/dist/internal/components/UnderlineTabbedInterface-93bd865a.css +2 -0
- package/dist/internal/components/UnderlineTabbedInterface-93bd865a.css.map +1 -0
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
- package/dist/utils/warning.js +3 -2
- package/package.json +2 -2
- package/dist/UnderlineNav/UnderlineNav-47547980.css +0 -2
- package/dist/UnderlineNav/UnderlineNav-47547980.css.map +0 -1
- package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.css +0 -2
- package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
+
## 38.32.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#8064](https://github.com/primer/react/pull/8064) [`eb447fe`](https://github.com/primer/react/commit/eb447fef0f1565934dc38d09df21d8063957aa9d) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Update the ActionBar overflow menu anchor label to `More items`
|
|
8
|
+
|
|
9
|
+
- [#8116](https://github.com/primer/react/pull/8116) [`cade4af`](https://github.com/primer/react/commit/cade4af9a70f3fd2622031af585dc07dccd79e11) Thanks [@mattcosta7](https://github.com/mattcosta7)! - `useAnchoredPosition`: improve performance by caching the scrollable-ancestor walk per anchor, reducing repositioning work for overlays, menus, and tooltips.
|
|
10
|
+
|
|
11
|
+
- [#8164](https://github.com/primer/react/pull/8164) [`f86e5a6`](https://github.com/primer/react/commit/f86e5a6420e857e7476c3954d419f4e228bdcf1a) Thanks [@jonrohan](https://github.com/jonrohan)! - Fix `UnderlineNav` tab list not filling the full width of the underline nav in Safari
|
|
12
|
+
|
|
13
|
+
- [#8165](https://github.com/primer/react/pull/8165) [`d60d05b`](https://github.com/primer/react/commit/d60d05b2684056b653cb605418d6f1cae0ba38e2) Thanks [@jonrohan](https://github.com/jonrohan)! - Pin the underline tabbed interface wrapper's vertical box model in wrap mode so external border and padding overrides can no longer offset its height and incorrectly trigger the overflow "more" menu
|
|
14
|
+
|
|
3
15
|
## 38.32.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
6
18
|
|
|
19
|
+
- [#8133](https://github.com/primer/react/pull/8133) [`0cb8e17`](https://github.com/primer/react/commit/0cb8e17219f61f853fcf06ce9ee09c755c9ef5ff) Thanks [@iansan5653](https://github.com/iansan5653)! - `UnderlineNav`: Replaced dynamic icon visibility with static breakpoints to avoid flickering. Breakpoints customizable via the `hideIconsBreakpoint` prop.
|
|
20
|
+
|
|
7
21
|
- [#8112](https://github.com/primer/react/pull/8112) [`50face0`](https://github.com/primer/react/commit/50face041d55eb800d643b0d264d23fc12fd4121) Thanks [@llastflowers](https://github.com/llastflowers)! - Add data-component attributes and associated tests for:
|
|
8
22
|
|
|
9
23
|
SplitPageLayout
|
|
@@ -74,7 +74,7 @@ const ActionBar = ({ size = "medium", children, "aria-label": ariaLabel, "aria-l
|
|
|
74
74
|
})]
|
|
75
75
|
}), /*#__PURE__*/ jsxs(ActionMenu, { children: [/*#__PURE__*/ jsx(ActionMenu.Anchor, { children: /*#__PURE__*/ jsx(IconButton, {
|
|
76
76
|
variant: "invisible",
|
|
77
|
-
"aria-label":
|
|
77
|
+
"aria-label": "More items",
|
|
78
78
|
icon: KebabHorizontalIcon,
|
|
79
79
|
className: ActionBar_module_css_default.MoreButton,
|
|
80
80
|
"data-more-button-inactive": overflowItems !== null && overflowItems !== void 0 && overflowItems.length ? void 0 : true,
|
package/dist/ActionList/Group.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
2
|
-
import { invariant } from "../utils/invariant.js";
|
|
3
2
|
import { useSlots } from "../hooks/useSlots.js";
|
|
3
|
+
import { invariant } from "../utils/invariant.js";
|
|
4
4
|
import { ListContext } from "./shared.js";
|
|
5
5
|
import ActionList_module_css_default from "./ActionList.module.css.js";
|
|
6
6
|
import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
|
package/dist/ActionList/Item.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
2
|
+
import { useSlots } from "../hooks/useSlots.js";
|
|
2
3
|
import { ConditionalWrapper } from "../internal/components/ConditionalWrapper.js";
|
|
3
4
|
import { invariant } from "../utils/invariant.js";
|
|
4
5
|
import { fixedForwardRef } from "../utils/modern-polymorphic.js";
|
|
5
6
|
import VisuallyHidden from "../_VisuallyHidden.js";
|
|
6
7
|
import { TooltipContext } from "../TooltipV2/TooltipContext.js";
|
|
7
8
|
import { Tooltip } from "../TooltipV2/Tooltip.js";
|
|
8
|
-
import { useSlots } from "../hooks/useSlots.js";
|
|
9
9
|
import { ActionListContainerContext } from "./ActionListContainerContext.js";
|
|
10
10
|
import { ItemContext, ListContext } from "./shared.js";
|
|
11
11
|
import ActionList_module_css_default from "./ActionList.module.css.js";
|
package/dist/ActionList/List.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
|
|
2
2
|
import useIsomorphicLayoutEffect from "../utils/useIsomorphicLayoutEffect.js";
|
|
3
3
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
4
|
-
import { fixedForwardRef } from "../utils/modern-polymorphic.js";
|
|
5
4
|
import { useSlots } from "../hooks/useSlots.js";
|
|
5
|
+
import { fixedForwardRef } from "../utils/modern-polymorphic.js";
|
|
6
6
|
import { FocusKeys, useFocusZone } from "../hooks/useFocusZone.js";
|
|
7
7
|
import { ActionListContainerContext } from "./ActionListContainerContext.js";
|
|
8
8
|
import { ListContext } from "./shared.js";
|
|
@@ -2,10 +2,10 @@ import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
|
|
|
2
2
|
import { useProvidedStateOrCreate } from "../hooks/useProvidedStateOrCreate.js";
|
|
3
3
|
import { useMenuKeyboardNavigation } from "../hooks/useMenuKeyboardNavigation.js";
|
|
4
4
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
5
|
+
import { isSlot } from "../utils/is-slot.js";
|
|
5
6
|
import { Tooltip } from "../TooltipV2/Tooltip.js";
|
|
6
7
|
import { ButtonComponent } from "../Button/Button.js";
|
|
7
8
|
import { useResponsiveValue } from "../hooks/useResponsiveValue.js";
|
|
8
|
-
import { isSlot } from "../utils/is-slot.js";
|
|
9
9
|
import { DialogContext } from "../Dialog/DialogContext.js";
|
|
10
10
|
import { ActionListContainerContext } from "../ActionList/ActionListContainerContext.js";
|
|
11
11
|
import { Divider } from "../ActionList/Divider.js";
|
|
@@ -122,7 +122,8 @@ const AnchoredOverlay = ({ renderAnchor, anchorRef: externalAnchorRef, anchorId:
|
|
|
122
122
|
else currentOverlay.style.removeProperty("position-try-fallbacks");
|
|
123
123
|
pendingPositionFrame = requestAnimationFrame(() => {
|
|
124
124
|
pendingPositionFrame = null;
|
|
125
|
-
const
|
|
125
|
+
const fallbackWidth = width ? parseInt(widthMap[width]) : parseInt(widthMap.small);
|
|
126
|
+
const result = getDefaultPosition(anchorElement, currentOverlay, fallbackWidth);
|
|
126
127
|
currentOverlay.setAttribute("data-align", result.horizontal);
|
|
127
128
|
if (result.suggestedSide) currentOverlay.setAttribute("data-side", result.suggestedSide);
|
|
128
129
|
const offset = result.horizontal === "left" ? result.leftOffset : result.rightOffset;
|
|
@@ -193,10 +193,11 @@ function AutocompleteMenu(props) {
|
|
|
193
193
|
t12 = (current, _previous, directlyActivated) => {
|
|
194
194
|
activeDescendantRef.current = current || null;
|
|
195
195
|
if (current) {
|
|
196
|
-
|
|
196
|
+
const selectedItem = allItemsToRenderRef.current.find((item_1) => {
|
|
197
197
|
var _current$closest;
|
|
198
198
|
return item_1.id === ((_current$closest = current.closest("li")) === null || _current$closest === void 0 ? void 0 : _current$closest.getAttribute("data-id"));
|
|
199
|
-
})
|
|
199
|
+
});
|
|
200
|
+
setHighlightedItem(selectedItem);
|
|
200
201
|
setIsMenuDirectlyActivated(directlyActivated);
|
|
201
202
|
}
|
|
202
203
|
if (current && customScrollContainerRef && customScrollContainerRef.current && directlyActivated) scrollIntoView(current, customScrollContainerRef.current, menuScrollMargins);
|
|
@@ -250,7 +250,10 @@ function Breadcrumbs(t0) {
|
|
|
250
250
|
const measuredContainerWidth = containerElement.offsetWidth;
|
|
251
251
|
setContainerWidth((prev_0) => prev_0 === measuredContainerWidth ? prev_0 : measuredContainerWidth);
|
|
252
252
|
const listElement = containerElement.querySelector("ol");
|
|
253
|
-
if (listElement && listElement.children.length > 0 && listElement.children.length === childArray.length)
|
|
253
|
+
if (listElement && listElement.children.length > 0 && listElement.children.length === childArray.length) {
|
|
254
|
+
const widths = Array.from(listElement.children).map(_temp3);
|
|
255
|
+
setChildArrayWidths(widths);
|
|
256
|
+
}
|
|
254
257
|
};
|
|
255
258
|
$[3] = childArray.length;
|
|
256
259
|
$[4] = overflow;
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -3,9 +3,9 @@ import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
|
|
|
3
3
|
import { useOnEscapePress } from "../hooks/useOnEscapePress.js";
|
|
4
4
|
import { useResizeObserver } from "../hooks/useResizeObserver.js";
|
|
5
5
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
6
|
+
import { useSlots } from "../hooks/useSlots.js";
|
|
6
7
|
import { IconButton } from "../Button/IconButton.js";
|
|
7
8
|
import { ButtonComponent } from "../Button/Button.js";
|
|
8
|
-
import { useSlots } from "../hooks/useSlots.js";
|
|
9
9
|
import { useFocusTrap } from "../hooks/useFocusTrap.js";
|
|
10
10
|
import { useFocusZone } from "../hooks/useFocusZone.js";
|
|
11
11
|
import Portal_default from "../Portal/index.js";
|
|
@@ -31,20 +31,23 @@ const useAnnouncements = (items, listContainerRef, inputRef, enabled = true, loa
|
|
|
31
31
|
}, [enabled]);
|
|
32
32
|
useEffect(function announceInitialFocus() {
|
|
33
33
|
const focusHandler = () => {
|
|
34
|
-
if (usingRovingTabindex)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
if (usingRovingTabindex) {
|
|
35
|
+
const announcementText = `${items.length} item${items.length > 1 ? "s" : ""} available, ${selectedItems} selected.`;
|
|
36
|
+
announce$1(announcementText, {
|
|
37
|
+
delayMs,
|
|
38
|
+
from: liveRegion ? liveRegion : void 0
|
|
39
|
+
});
|
|
40
|
+
} else window.requestAnimationFrame(() => {
|
|
39
41
|
const activeItem = getItemWithActiveDescendant(listContainerRef, items);
|
|
40
42
|
if (!activeItem) return;
|
|
41
43
|
const { index, text, selected } = activeItem;
|
|
42
|
-
|
|
44
|
+
const announcementText = [
|
|
43
45
|
`Focus on filter text box and list of items`,
|
|
44
46
|
`Focused item: ${text}`,
|
|
45
47
|
`${selected ? "selected" : "not selected"}`,
|
|
46
48
|
`${index + 1} of ${items.length}`
|
|
47
|
-
].join(", ")
|
|
49
|
+
].join(", ");
|
|
50
|
+
announce$1(announcementText, {
|
|
48
51
|
delayMs,
|
|
49
52
|
from: liveRegion ? liveRegion : void 0
|
|
50
53
|
});
|
|
@@ -70,20 +73,23 @@ const useAnnouncements = (items, listContainerRef, inputRef, enabled = true, loa
|
|
|
70
73
|
announce$1(`${message === null || message === void 0 ? void 0 : message.title}. ${message === null || message === void 0 ? void 0 : message.description}`, { delayMs });
|
|
71
74
|
return;
|
|
72
75
|
}
|
|
73
|
-
if (usingRovingTabindex)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
if (usingRovingTabindex) {
|
|
77
|
+
const announcementText = `${items.length} item${items.length > 1 ? "s" : ""} available, ${selectedItems} selected.`;
|
|
78
|
+
announce$1(announcementText, {
|
|
79
|
+
delayMs,
|
|
80
|
+
from: liveRegion ? liveRegion : void 0
|
|
81
|
+
});
|
|
82
|
+
} else window.requestAnimationFrame(() => {
|
|
78
83
|
const activeItem = getItemWithActiveDescendant(listContainerRef, items);
|
|
79
84
|
if (!activeItem) return;
|
|
80
85
|
const { index, text, selected } = activeItem;
|
|
81
|
-
|
|
86
|
+
const announcementText = [
|
|
82
87
|
`List updated`,
|
|
83
88
|
`Focused item: ${text}`,
|
|
84
89
|
`${selected ? "selected" : "not selected"}`,
|
|
85
90
|
`${index + 1} of ${items.length}`
|
|
86
|
-
].join(", ")
|
|
91
|
+
].join(", ");
|
|
92
|
+
announce$1(announcementText, {
|
|
87
93
|
delayMs,
|
|
88
94
|
from: liveRegion ? liveRegion : void 0
|
|
89
95
|
});
|
package/dist/NavList/NavList.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import useIsomorphicLayoutEffect from "../utils/useIsomorphicLayoutEffect.js";
|
|
2
2
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
3
|
+
import { useSlots } from "../hooks/useSlots.js";
|
|
3
4
|
import { fixedForwardRef } from "../utils/modern-polymorphic.js";
|
|
4
5
|
import _VisuallyHidden_module_css_default from "../_VisuallyHidden.module.css.js";
|
|
5
|
-
import { useSlots } from "../hooks/useSlots.js";
|
|
6
6
|
import { ActionListContainerContext } from "../ActionList/ActionListContainerContext.js";
|
|
7
7
|
import Heading$1 from "../Heading/Heading.js";
|
|
8
8
|
import ActionList_module_css_default from "../ActionList/ActionList.module.css.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
|
|
2
2
|
import { warning } from "../utils/warning.js";
|
|
3
|
-
import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
|
|
4
3
|
import { isSlot } from "../utils/is-slot.js";
|
|
4
|
+
import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
|
|
5
5
|
import { getResponsiveAttributes } from "../internal/utils/getResponsiveAttributes.js";
|
|
6
6
|
import Heading from "../Heading/Heading.js";
|
|
7
7
|
import Link from "../Link/Link.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
2
2
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
3
3
|
import { warning } from "../utils/warning.js";
|
|
4
|
-
import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
|
|
5
4
|
import { useSlots } from "../hooks/useSlots.js";
|
|
5
|
+
import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
|
|
6
6
|
import { useOverflow } from "../hooks/useOverflow.js";
|
|
7
7
|
import { getResponsiveAttributes } from "../internal/utils/getResponsiveAttributes.js";
|
|
8
8
|
import PageLayout_module_css_default from "./PageLayout.module.css.js";
|
|
@@ -12,8 +12,8 @@ import { c } from "react-compiler-runtime";
|
|
|
12
12
|
import { clsx } from "clsx";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import React, { useRef, useState } from "react";
|
|
15
|
-
import { FocusKeys } from "@primer/behaviors";
|
|
16
15
|
import { isFocusable } from "@primer/behaviors/utils";
|
|
16
|
+
import { FocusKeys } from "@primer/behaviors";
|
|
17
17
|
import { isValidElementType } from "react-is";
|
|
18
18
|
//#region src/TextInputWithTokens/TextInputWithTokens.tsx
|
|
19
19
|
/**
|
|
@@ -184,12 +184,13 @@ const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type =
|
|
|
184
184
|
(_child$props$onFocus = (_child$props3 = child.props).onFocus) === null || _child$props$onFocus === void 0 || _child$props$onFocus.call(_child$props3, event);
|
|
185
185
|
},
|
|
186
186
|
onMouseOverCapture: (event) => {
|
|
187
|
+
const delayTime = delayTimeMap[delay] || 50;
|
|
187
188
|
openTimeoutRef.current = safeSetTimeout(() => {
|
|
188
189
|
var _child$props$onMouseE, _child$props4;
|
|
189
190
|
if (!openTimeoutRef.current) return;
|
|
190
191
|
openTooltip();
|
|
191
192
|
(_child$props$onMouseE = (_child$props4 = child.props).onMouseEnter) === null || _child$props$onMouseE === void 0 || _child$props$onMouseE.call(_child$props4, event);
|
|
192
|
-
},
|
|
193
|
+
}, delayTime);
|
|
193
194
|
},
|
|
194
195
|
onMouseLeave: (event) => {
|
|
195
196
|
var _child$props$onMouseL, _child$props5;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
2
|
+
import { isSlot } from "../utils/is-slot.js";
|
|
3
|
+
import { useSlots } from "../hooks/useSlots.js";
|
|
2
4
|
import Spinner from "../Spinner/Spinner.js";
|
|
3
5
|
import { AriaStatus } from "../live-region/AriaStatus.js";
|
|
4
6
|
import { fixedForwardRef } from "../utils/modern-polymorphic.js";
|
|
@@ -10,8 +12,6 @@ import useSafeTimeout from "../hooks/useSafeTimeout.js";
|
|
|
10
12
|
import { Tooltip } from "../TooltipV2/Tooltip.js";
|
|
11
13
|
import { IconButton } from "../Button/IconButton.js";
|
|
12
14
|
import { ButtonComponent } from "../Button/Button.js";
|
|
13
|
-
import { isSlot } from "../utils/is-slot.js";
|
|
14
|
-
import { useSlots } from "../hooks/useSlots.js";
|
|
15
15
|
import { Dialog } from "../Dialog/Dialog.js";
|
|
16
16
|
import { ConfirmationDialog } from "../ConfirmationDialog/ConfirmationDialog.js";
|
|
17
17
|
import { ActionList } from "../ActionList/index.js";
|
|
@@ -349,7 +349,10 @@ const SubTree = ({ count, state, children, "aria-label": ariaLabel }) => {
|
|
|
349
349
|
});
|
|
350
350
|
setLoadingFocused(false);
|
|
351
351
|
}
|
|
352
|
-
} else if (state === "loading")
|
|
352
|
+
} else if (state === "loading") {
|
|
353
|
+
const parentName = getAccessibleName(parentElement);
|
|
354
|
+
announceUpdate(`${parentName} content loading`);
|
|
355
|
+
}
|
|
353
356
|
}, [
|
|
354
357
|
loadingFocused,
|
|
355
358
|
previousState,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-UnderlineNav-UnderlineWrapper-GWONT{animation:prc-UnderlineNav-detect-overflow-6HuSH linear;animation-timeline:scroll(self block);container-type:inline-size;--UnderlineNav_moreButton-display:none}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-has-overflow=true]{--UnderlineNav_moreButton-display:flex}@keyframes prc-UnderlineNav-detect-overflow-6HuSH{0%,to{--UnderlineNav_moreButton-display:flex}}@container (width < 20rem){.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons-breakpoint=xsmall] .prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:none}}@container (width < 34rem){.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons-breakpoint=small] .prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:none}}@container (width < 48rem){.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons-breakpoint=medium] .prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:none}}@container (width < 63.25rem){.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons-breakpoint=large] .prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:none}}@container (width < 80rem){.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons-breakpoint=xlarge] .prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:none}}@container (width < 87.5rem){.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons-breakpoint=xxlarge] .prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:none}}.prc-UnderlineNav-WrapSpacer--aLgz{margin-inline-end:calc(var(--stack-gap-condensed,.5rem)*-1)}.prc-UnderlineNav-MoreButtonContainer-Dnrq6{align-items:center;display:var(--UnderlineNav_moreButton-display,flex)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]{position:relative}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current] .prc-UnderlineNav-OverflowMenuItemLabel-F80v6{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]:after{background:var(--underlineNav-borderColor-active,#fd8c73);content:"";inset:var(--base-size-2,.125rem) auto var(--base-size-2,.125rem) 0;position:absolute;width:var(--base-size-2,.125rem)}.prc-UnderlineNav-MoreButtonDivider-dN0a-{border-left:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);display:inline-block;height:var(--base-size-24,1.5rem);margin-inline:var(--base-size-4,.25rem);width:0}.prc-UnderlineNav-MoreButton-Y8soj{font-weight:var(--base-text-weight-normal,400);margin:0;position:relative}.prc-UnderlineNav-MoreButton-Y8soj>[data-component=trailingVisual]{margin-left:0}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73));content:"";height:2px;inset:auto 0 0;margin-bottom:calc((var(--base-size-8,.5rem) + var(--borderWidth-thin,.0625rem))*-1);pointer-events:none;position:absolute}@media (forced-colors:active){.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:LinkText}}
|
|
2
|
+
/*# sourceMappingURL=UnderlineNav-a06bbc74.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/UnderlineNav/UnderlineNav.module.css.js"],"names":[],"mappings":"AAAA,yCAIE,uDAAiC,CACjC,qCAAsC,CACtC,0BAA2B,CAE3B,sCAKF,CAHE,iEACE,sCACF,CAIF,kDACE,MAEE,sCACF,CACF,CAGE,2BACE,oIACE,YACF,CACF,CAIA,2BACE,mIACE,YACF,CACF,CAIA,2BACE,oIACE,YACF,CACF,CAIA,8BACE,mIACE,YACF,CACF,CAIA,2BACE,oIACE,YACF,CACF,CAIA,6BACE,qIACE,YACF,CACF,CAGF,mCAGE,2DACF,CAEA,4CAEE,kBAAmB,CADnB,mDAEF,CAEA,wDACE,iBAcF,CAZE,sGACE,gDACF,CAEA,8DAME,yDAAkD,CALlD,UAAW,CAGX,kEAAmD,CADnD,iBAAkB,CADlB,gCAKF,CAGF,0CAEE,qFAAmE,CADnE,oBAAqB,CAIrB,iCAA2B,CAD3B,uCAAiC,CADjC,OAGF,CAEA,mCAEE,8CAA2C,CAD3C,QAAS,CAET,iBA6BF,CA3BE,mEACE,aACF,CAIA,sDACE,gDAmBF,CAjBE,4DAUE,iGAAoG,CAFpG,UAAW,CAFX,UAAW,CAJX,cAAe,CAGf,oFAAwE,CAExE,mBAAoB,CANpB,iBAeF,CAJE,8BAZF,4DAcI,yBAEJ,CADE","file":"UnderlineNav-a06bbc74.css","sourcesContent":[".UnderlineWrapper {\n /* Progressive enhancement: Detect overflow using scroll-based animations.\n The idiomatic way would be a scroll-state container query but browser support\n is slightly better for animations. */\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n container-type: inline-size;\n\n --UnderlineNav_moreButton-display: none;\n\n &[data-has-overflow='true'] {\n --UnderlineNav_moreButton-display: flex;\n }\n}\n\n/* Set overflow button visibility with pure CSS to avoid a layout shift on hydration */\n@keyframes detect-overflow {\n 0%,\n 100% {\n --UnderlineNav_moreButton-display: flex;\n }\n}\n\n.UnderlineWrapper[data-hide-icons-breakpoint='xsmall'] {\n @container (width < 20rem) {\n .ItemsList [data-component='icon'] {\n display: none;\n }\n }\n}\n\n.UnderlineWrapper[data-hide-icons-breakpoint='small'] {\n @container (width < 34rem) {\n .ItemsList [data-component='icon'] {\n display: none;\n }\n }\n}\n\n.UnderlineWrapper[data-hide-icons-breakpoint='medium'] {\n @container (width < 48rem) {\n .ItemsList [data-component='icon'] {\n display: none;\n }\n }\n}\n\n.UnderlineWrapper[data-hide-icons-breakpoint='large'] {\n @container (width < 63.25rem) {\n .ItemsList [data-component='icon'] {\n display: none;\n }\n }\n}\n\n.UnderlineWrapper[data-hide-icons-breakpoint='xlarge'] {\n @container (width < 80rem) {\n .ItemsList [data-component='icon'] {\n display: none;\n }\n }\n}\n\n.UnderlineWrapper[data-hide-icons-breakpoint='xxlarge'] {\n @container (width < 87.5rem) {\n .ItemsList [data-component='icon'] {\n display: none;\n }\n }\n}\n\n.WrapSpacer {\n /* Cancel out the flex gap so the first real item has no leading gap */\n /* stylelint-disable-next-line primer/spacing -- negative margin required to cancel the flex gap from the list */\n margin-inline-end: calc(-1 * var(--stack-gap-condensed));\n}\n\n.MoreButtonContainer {\n display: var(--UnderlineNav_moreButton-display, flex);\n align-items: center;\n}\n\n.OverflowMenuItem [aria-current] {\n position: relative;\n\n .OverflowMenuItemLabel {\n font-weight: var(--base-text-weight-semibold);\n }\n\n &::after {\n content: '';\n width: var(--base-size-2);\n position: absolute;\n inset: var(--base-size-2) auto var(--base-size-2) 0;\n /* stylelint-disable-next-line primer/colors */\n background: var(--underlineNav-borderColor-active);\n }\n}\n\n.MoreButtonDivider {\n display: inline-block;\n border-left: var(--borderWidth-thin) solid var(--borderColor-muted);\n width: 0;\n margin-inline: var(--base-size-4);\n height: var(--base-size-24);\n}\n\n.MoreButton {\n margin: 0; /* reset Safari extra margin */\n font-weight: var(--base-text-weight-normal);\n position: relative;\n\n & > [data-component='trailingVisual'] {\n margin-left: 0;\n }\n\n /* When the current item has overflowed into the menu, style the overflow\n anchor so it looks like the current item (semibold text + active underline). */\n &[data-current='true'] {\n font-weight: var(--base-text-weight-semibold);\n\n &::after {\n position: absolute;\n inset: auto 0 0;\n /* Pull down same amount as the item-level decoration, plus the border width of the button */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: calc(-1 * (var(--base-size-8) + var(--borderWidth-thin)));\n height: 2px;\n pointer-events: none;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--underlineNav-borderColor-active, var(--color-primer-border-active, #fd8c73));\n\n @media (forced-colors: active) {\n /* Support for Windows Forced Color Mode https://learn.microsoft.com/en-us/fluent-ui/web-components/design-system/high-contrast */\n background-color: LinkText;\n }\n }\n }\n}\n"]}
|
|
@@ -16,6 +16,11 @@ type UnderlineNavProps = {
|
|
|
16
16
|
* Setting this to `flush` will remove the horizontal padding on the items.
|
|
17
17
|
*/
|
|
18
18
|
variant?: 'inset' | 'flush';
|
|
19
|
+
/**
|
|
20
|
+
* Customize when the icons are hidden to save space. Set to `null` to always show icons.
|
|
21
|
+
* Defaults to `xxlarge`; if you know there won't be very many tabs you might set this to a smaller value.
|
|
22
|
+
*/
|
|
23
|
+
hideIconsBreakpoint?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | null;
|
|
19
24
|
};
|
|
20
25
|
//#endregion
|
|
21
26
|
export { UnderlineNavProps };
|
|
@@ -18,143 +18,150 @@ import { forwardRef, useRef, useState } from "react";
|
|
|
18
18
|
//#region src/UnderlineNav/UnderlineNav.tsx
|
|
19
19
|
const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
20
20
|
const $ = c(52);
|
|
21
|
-
const { as: t1, "aria-label": ariaLabel, loadingCounters: t2, variant: t3, className, children } = t0;
|
|
21
|
+
const { as: t1, "aria-label": ariaLabel, loadingCounters: t2, variant: t3, className, children, hideIconsBreakpoint: t4 } = t0;
|
|
22
22
|
const as = t1 === void 0 ? "nav" : t1;
|
|
23
23
|
const loadingCounters = t2 === void 0 ? false : t2;
|
|
24
24
|
const variant = t3 === void 0 ? "inset" : t3;
|
|
25
|
+
const hideIconsBreakpoint = t4 === void 0 ? "xxlarge" : t4;
|
|
25
26
|
const backupRef = useRef(null);
|
|
26
27
|
const navRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
27
28
|
const listRef = useRef(null);
|
|
28
|
-
const [hasEverOverflowed, setHasOverflowed] = useState(false);
|
|
29
29
|
const [registeredItems, setRegisteredItems] = UnderlineNavItemsRegistry.useRegistryState();
|
|
30
30
|
let isOverflowing;
|
|
31
31
|
let overflowMenuItems;
|
|
32
|
-
let
|
|
33
|
-
if ($[0] !==
|
|
32
|
+
let t5;
|
|
33
|
+
if ($[0] !== registeredItems) {
|
|
34
34
|
var _registeredItems$entr;
|
|
35
35
|
overflowMenuItems = Array.from((_registeredItems$entr = registeredItems === null || registeredItems === void 0 ? void 0 : registeredItems.entries()) !== null && _registeredItems$entr !== void 0 ? _registeredItems$entr : []).filter(_temp);
|
|
36
36
|
isOverflowing = overflowMenuItems.length > 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
$[
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
$[3] = overflowMenuItems;
|
|
43
|
-
$[4] = t4;
|
|
37
|
+
t5 = overflowMenuItems.some(_temp2);
|
|
38
|
+
$[0] = registeredItems;
|
|
39
|
+
$[1] = isOverflowing;
|
|
40
|
+
$[2] = overflowMenuItems;
|
|
41
|
+
$[3] = t5;
|
|
44
42
|
} else {
|
|
45
|
-
isOverflowing = $[
|
|
46
|
-
overflowMenuItems = $[
|
|
47
|
-
|
|
43
|
+
isOverflowing = $[1];
|
|
44
|
+
overflowMenuItems = $[2];
|
|
45
|
+
t5 = $[3];
|
|
48
46
|
}
|
|
49
|
-
const overflowingCurrentItem =
|
|
50
|
-
let t5;
|
|
51
|
-
if ($[5] !== children) {
|
|
52
|
-
t5 = getValidChildren(children);
|
|
53
|
-
$[5] = children;
|
|
54
|
-
$[6] = t5;
|
|
55
|
-
} else t5 = $[6];
|
|
56
|
-
const validChildren = t5;
|
|
47
|
+
const overflowingCurrentItem = t5;
|
|
57
48
|
let t6;
|
|
49
|
+
if ($[4] !== children) {
|
|
50
|
+
t6 = getValidChildren(children);
|
|
51
|
+
$[4] = children;
|
|
52
|
+
$[5] = t6;
|
|
53
|
+
} else t6 = $[5];
|
|
54
|
+
const validChildren = t6;
|
|
58
55
|
let t7;
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
let t8;
|
|
57
|
+
if ($[6] !== ariaLabel || $[7] !== validChildren) {
|
|
58
|
+
t7 = () => {
|
|
61
59
|
!(validChildren.filter(_temp3).length <= 1) && invariant(false, "Only one current element is allowed");
|
|
62
60
|
!ariaLabel && invariant(false, "Use the `aria-label` prop to provide an accessible label for assistive technology");
|
|
63
61
|
};
|
|
64
|
-
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
62
|
+
t8 = [validChildren, ariaLabel];
|
|
63
|
+
$[6] = ariaLabel;
|
|
64
|
+
$[7] = validChildren;
|
|
65
|
+
$[8] = t7;
|
|
66
|
+
$[9] = t8;
|
|
69
67
|
} else {
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
t7 = $[8];
|
|
69
|
+
t8 = $[9];
|
|
72
70
|
}
|
|
73
|
-
useDevOnlyEffect(
|
|
74
|
-
let
|
|
75
|
-
if ($[
|
|
76
|
-
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
} else
|
|
80
|
-
const contextValue =
|
|
71
|
+
useDevOnlyEffect(t7, t8);
|
|
72
|
+
let t9;
|
|
73
|
+
if ($[10] !== loadingCounters) {
|
|
74
|
+
t9 = { loadingCounters };
|
|
75
|
+
$[10] = loadingCounters;
|
|
76
|
+
$[11] = t9;
|
|
77
|
+
} else t9 = $[11];
|
|
78
|
+
const contextValue = t9;
|
|
81
79
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
82
80
|
if (menuOpen && !isOverflowing) setMenuOpen(false);
|
|
83
|
-
let
|
|
84
|
-
if ($[
|
|
85
|
-
|
|
81
|
+
let t10;
|
|
82
|
+
if ($[12] !== ariaLabel) {
|
|
83
|
+
t10 = ariaLabel && /*#__PURE__*/ jsx(VisuallyHidden, {
|
|
86
84
|
as: "h2",
|
|
87
85
|
children: `${ariaLabel} navigation`
|
|
88
86
|
});
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
} else
|
|
92
|
-
let
|
|
93
|
-
if ($[
|
|
94
|
-
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
} else
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
let
|
|
87
|
+
$[12] = ariaLabel;
|
|
88
|
+
$[13] = t10;
|
|
89
|
+
} else t10 = $[13];
|
|
90
|
+
let t11;
|
|
91
|
+
if ($[14] !== className) {
|
|
92
|
+
t11 = clsx(UnderlineNav_module_css_default.UnderlineWrapper, className);
|
|
93
|
+
$[14] = className;
|
|
94
|
+
$[15] = t11;
|
|
95
|
+
} else t11 = $[15];
|
|
96
|
+
const t12 = hideIconsBreakpoint !== null && hideIconsBreakpoint !== void 0 ? hideIconsBreakpoint : void 0;
|
|
97
|
+
const t13 = isOverflowing ? "true" : void 0;
|
|
98
|
+
let t14;
|
|
99
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
+
t14 = /*#__PURE__*/ jsx("li", {
|
|
101
|
+
role: "presentation",
|
|
102
|
+
"aria-hidden": true,
|
|
103
|
+
className: UnderlineNav_module_css_default.WrapSpacer
|
|
104
|
+
});
|
|
105
|
+
$[16] = t14;
|
|
106
|
+
} else t14 = $[16];
|
|
107
|
+
let t15;
|
|
101
108
|
if ($[17] !== children || $[18] !== setRegisteredItems) {
|
|
102
|
-
|
|
109
|
+
t15 = /*#__PURE__*/ jsx(UnderlineNavItemsRegistry.Provider, {
|
|
103
110
|
setRegistry: setRegisteredItems,
|
|
104
111
|
children
|
|
105
112
|
});
|
|
106
113
|
$[17] = children;
|
|
107
114
|
$[18] = setRegisteredItems;
|
|
108
|
-
$[19] =
|
|
109
|
-
} else
|
|
110
|
-
let
|
|
111
|
-
if ($[20] !== navRef || $[21] !==
|
|
112
|
-
|
|
115
|
+
$[19] = t15;
|
|
116
|
+
} else t15 = $[19];
|
|
117
|
+
let t16;
|
|
118
|
+
if ($[20] !== navRef || $[21] !== t15) {
|
|
119
|
+
t16 = /*#__PURE__*/ jsxs(UnderlineItemList, {
|
|
113
120
|
ref: listRef,
|
|
114
121
|
role: "list",
|
|
115
122
|
className: UnderlineNav_module_css_default.ItemsList,
|
|
116
|
-
children: /*#__PURE__*/ jsx(OverflowObserverProvider, {
|
|
123
|
+
children: [t14, /*#__PURE__*/ jsx(OverflowObserverProvider, {
|
|
117
124
|
rootRef: navRef,
|
|
118
|
-
children:
|
|
119
|
-
})
|
|
125
|
+
children: t15
|
|
126
|
+
})]
|
|
120
127
|
});
|
|
121
128
|
$[20] = navRef;
|
|
122
|
-
$[21] =
|
|
123
|
-
$[22] =
|
|
124
|
-
} else
|
|
125
|
-
let
|
|
129
|
+
$[21] = t15;
|
|
130
|
+
$[22] = t16;
|
|
131
|
+
} else t16 = $[22];
|
|
132
|
+
let t17;
|
|
126
133
|
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
127
|
-
|
|
128
|
-
$[23] =
|
|
129
|
-
} else
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
let
|
|
134
|
+
t17 = /*#__PURE__*/ jsx("div", { className: UnderlineNav_module_css_default.MoreButtonDivider });
|
|
135
|
+
$[23] = t17;
|
|
136
|
+
} else t17 = $[23];
|
|
137
|
+
const t18 = overflowingCurrentItem ? "true" : void 0;
|
|
138
|
+
const t19 = overflowingCurrentItem ? "More items, including current item" : void 0;
|
|
139
|
+
let t20;
|
|
133
140
|
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
134
|
-
|
|
141
|
+
t20 = /*#__PURE__*/ jsxs("span", { children: ["More", /*#__PURE__*/ jsx(VisuallyHidden, {
|
|
135
142
|
as: "span",
|
|
136
143
|
children: " items"
|
|
137
144
|
})] });
|
|
138
|
-
$[24] =
|
|
139
|
-
} else
|
|
140
|
-
let
|
|
141
|
-
if ($[25] !==
|
|
142
|
-
|
|
145
|
+
$[24] = t20;
|
|
146
|
+
} else t20 = $[24];
|
|
147
|
+
let t21;
|
|
148
|
+
if ($[25] !== t18 || $[26] !== t19) {
|
|
149
|
+
t21 = /*#__PURE__*/ jsx(ActionMenu.Button, {
|
|
143
150
|
className: UnderlineNav_module_css_default.MoreButton,
|
|
144
151
|
variant: "invisible",
|
|
145
152
|
"data-component": "overflow-menu-button",
|
|
146
|
-
"data-current":
|
|
147
|
-
"aria-label":
|
|
148
|
-
children:
|
|
153
|
+
"data-current": t18,
|
|
154
|
+
"aria-label": t19,
|
|
155
|
+
children: t20
|
|
149
156
|
});
|
|
150
|
-
$[25] =
|
|
151
|
-
$[26] =
|
|
152
|
-
$[27] =
|
|
153
|
-
} else
|
|
154
|
-
let
|
|
157
|
+
$[25] = t18;
|
|
158
|
+
$[26] = t19;
|
|
159
|
+
$[27] = t21;
|
|
160
|
+
} else t21 = $[27];
|
|
161
|
+
let t22;
|
|
155
162
|
if ($[28] !== loadingCounters || $[29] !== overflowMenuItems || $[30] !== registeredItems) {
|
|
156
|
-
|
|
157
|
-
const [key, allProps] =
|
|
163
|
+
t22 = registeredItems === void 0 ? /*#__PURE__*/ jsx(ActionList.Item, { children: /*#__PURE__*/ jsx(SkeletonText, {}) }) : overflowMenuItems.map((t23) => {
|
|
164
|
+
const [key, allProps] = t23;
|
|
158
165
|
const { children: menuItemChildren, counter, onSelect, ...menuItemProps } = allProps;
|
|
159
166
|
return /*#__PURE__*/ jsxs(ActionList.LinkItem, {
|
|
160
167
|
onClick: (event) => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
|
|
@@ -172,65 +179,65 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
172
179
|
$[28] = loadingCounters;
|
|
173
180
|
$[29] = overflowMenuItems;
|
|
174
181
|
$[30] = registeredItems;
|
|
175
|
-
$[31] =
|
|
176
|
-
} else
|
|
177
|
-
let
|
|
178
|
-
if ($[32] !==
|
|
179
|
-
|
|
180
|
-
$[32] =
|
|
181
|
-
$[33] =
|
|
182
|
-
} else
|
|
183
|
-
let
|
|
184
|
-
if ($[34] !== menuOpen || $[35] !==
|
|
185
|
-
|
|
182
|
+
$[31] = t22;
|
|
183
|
+
} else t22 = $[31];
|
|
184
|
+
let t23;
|
|
185
|
+
if ($[32] !== t22) {
|
|
186
|
+
t23 = /*#__PURE__*/ jsx(ActionMenu.Overlay, { children: /*#__PURE__*/ jsx(ActionList, { children: t22 }) });
|
|
187
|
+
$[32] = t22;
|
|
188
|
+
$[33] = t23;
|
|
189
|
+
} else t23 = $[33];
|
|
190
|
+
let t24;
|
|
191
|
+
if ($[34] !== menuOpen || $[35] !== t21 || $[36] !== t23) {
|
|
192
|
+
t24 = /*#__PURE__*/ jsxs("div", {
|
|
186
193
|
className: UnderlineNav_module_css_default.MoreButtonContainer,
|
|
187
|
-
children: [
|
|
194
|
+
children: [t17, /*#__PURE__*/ jsxs(ActionMenu, {
|
|
188
195
|
open: menuOpen,
|
|
189
196
|
onOpenChange: setMenuOpen,
|
|
190
|
-
children: [
|
|
197
|
+
children: [t21, t23]
|
|
191
198
|
})]
|
|
192
199
|
});
|
|
193
200
|
$[34] = menuOpen;
|
|
194
|
-
$[35] =
|
|
195
|
-
$[36] =
|
|
196
|
-
$[37] =
|
|
197
|
-
} else
|
|
198
|
-
let
|
|
199
|
-
if ($[38] !== ariaLabel || $[39] !== as || $[40] !== navRef || $[41] !==
|
|
200
|
-
|
|
201
|
+
$[35] = t21;
|
|
202
|
+
$[36] = t23;
|
|
203
|
+
$[37] = t24;
|
|
204
|
+
} else t24 = $[37];
|
|
205
|
+
let t25;
|
|
206
|
+
if ($[38] !== ariaLabel || $[39] !== as || $[40] !== navRef || $[41] !== t11 || $[42] !== t12 || $[43] !== t13 || $[44] !== t16 || $[45] !== t24 || $[46] !== variant) {
|
|
207
|
+
t25 = /*#__PURE__*/ jsxs(UnderlineWrapper, {
|
|
201
208
|
as,
|
|
202
209
|
"aria-label": ariaLabel,
|
|
203
|
-
className:
|
|
210
|
+
className: t11,
|
|
204
211
|
ref: navRef,
|
|
205
212
|
"data-variant": variant,
|
|
206
213
|
"data-overflow-mode": "wrap",
|
|
207
|
-
"data-hide-icons":
|
|
208
|
-
"data-has-overflow":
|
|
209
|
-
children: [
|
|
214
|
+
"data-hide-icons-breakpoint": t12,
|
|
215
|
+
"data-has-overflow": t13,
|
|
216
|
+
children: [t16, t24]
|
|
210
217
|
});
|
|
211
218
|
$[38] = ariaLabel;
|
|
212
219
|
$[39] = as;
|
|
213
220
|
$[40] = navRef;
|
|
214
|
-
$[41] =
|
|
215
|
-
$[42] =
|
|
216
|
-
$[43] =
|
|
217
|
-
$[44] =
|
|
218
|
-
$[45] =
|
|
221
|
+
$[41] = t11;
|
|
222
|
+
$[42] = t12;
|
|
223
|
+
$[43] = t13;
|
|
224
|
+
$[44] = t16;
|
|
225
|
+
$[45] = t24;
|
|
219
226
|
$[46] = variant;
|
|
220
|
-
$[47] =
|
|
221
|
-
} else
|
|
222
|
-
let
|
|
223
|
-
if ($[48] !== contextValue || $[49] !==
|
|
224
|
-
|
|
227
|
+
$[47] = t25;
|
|
228
|
+
} else t25 = $[47];
|
|
229
|
+
let t26;
|
|
230
|
+
if ($[48] !== contextValue || $[49] !== t10 || $[50] !== t25) {
|
|
231
|
+
t26 = /*#__PURE__*/ jsxs(UnderlineNavContext.Provider, {
|
|
225
232
|
value: contextValue,
|
|
226
|
-
children: [
|
|
233
|
+
children: [t10, t25]
|
|
227
234
|
});
|
|
228
235
|
$[48] = contextValue;
|
|
229
|
-
$[49] =
|
|
230
|
-
$[50] =
|
|
231
|
-
$[51] =
|
|
232
|
-
} else
|
|
233
|
-
return
|
|
236
|
+
$[49] = t10;
|
|
237
|
+
$[50] = t25;
|
|
238
|
+
$[51] = t26;
|
|
239
|
+
} else t26 = $[51];
|
|
240
|
+
return t26;
|
|
234
241
|
});
|
|
235
242
|
UnderlineNav.displayName = "UnderlineNav";
|
|
236
243
|
function _temp(entry) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./UnderlineNav-
|
|
1
|
+
import "./UnderlineNav-a06bbc74.css";
|
|
2
2
|
//#region src/UnderlineNav/UnderlineNav.module.css.js
|
|
3
3
|
var UnderlineNav_module_css_default = {
|
|
4
4
|
"UnderlineWrapper": "prc-UnderlineNav-UnderlineWrapper-GWONT",
|
|
5
5
|
"detect-overflow": "prc-UnderlineNav-detect-overflow-6HuSH",
|
|
6
6
|
"ItemsList": "prc-UnderlineNav-ItemsList-oj8gN",
|
|
7
|
+
"WrapSpacer": "prc-UnderlineNav-WrapSpacer--aLgz",
|
|
7
8
|
"MoreButtonContainer": "prc-UnderlineNav-MoreButtonContainer-Dnrq6",
|
|
8
9
|
"OverflowMenuItem": "prc-UnderlineNav-OverflowMenuItem-7SG7M",
|
|
9
10
|
"OverflowMenuItemLabel": "prc-UnderlineNav-OverflowMenuItemLabel-F80v6",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useProvidedRefOrCreate } from "../../hooks/useProvidedRefOrCreate.js";
|
|
2
2
|
import { useAnchoredPosition } from "../../hooks/useAnchoredPosition.js";
|
|
3
3
|
import { useId as useId$1 } from "../../hooks/useId.js";
|
|
4
|
+
import { isSlot } from "../../utils/is-slot.js";
|
|
5
|
+
import { useSlots } from "../../hooks/useSlots.js";
|
|
4
6
|
import Spinner from "../../Spinner/Spinner.js";
|
|
5
7
|
import { AriaStatus } from "../../live-region/AriaStatus.js";
|
|
6
8
|
import { invariant } from "../../utils/invariant.js";
|
|
7
9
|
import { IconButton } from "../../Button/IconButton.js";
|
|
8
10
|
import { ButtonComponent } from "../../Button/Button.js";
|
|
9
11
|
import { useResponsiveValue } from "../../hooks/useResponsiveValue.js";
|
|
10
|
-
import { isSlot } from "../../utils/is-slot.js";
|
|
11
|
-
import { useSlots } from "../../hooks/useSlots.js";
|
|
12
12
|
import { ActionListContainerContext } from "../../ActionList/ActionListContainerContext.js";
|
|
13
13
|
import Heading from "../../Heading/Heading.js";
|
|
14
14
|
import Link from "../../Link/Link.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import useIsomorphicLayoutEffect from "../../utils/useIsomorphicLayoutEffect.js";
|
|
2
2
|
import { useResizeObserver } from "../../hooks/useResizeObserver.js";
|
|
3
3
|
import { useId as useId$1 } from "../../hooks/useId.js";
|
|
4
|
-
import { invariant } from "../../utils/invariant.js";
|
|
5
4
|
import { isSlot } from "../../utils/is-slot.js";
|
|
5
|
+
import { invariant } from "../../utils/invariant.js";
|
|
6
6
|
import { createComponent } from "../../utils/create-component.js";
|
|
7
7
|
import { UnderlineItem, UnderlineItemList, UnderlineWrapper } from "../../internal/components/UnderlineTabbedInterface.js";
|
|
8
8
|
import UnderlinePanels_module_css_default from "./UnderlinePanels.module.css.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useSlots } from "../hooks/useSlots.js";
|
|
2
3
|
import { Announce } from "../live-region/Announce.js";
|
|
3
4
|
import { AriaAlert } from "../live-region/AriaAlert.js";
|
|
4
5
|
import { AriaStatus } from "../live-region/AriaStatus.js";
|
|
@@ -6,7 +7,6 @@ import { ButtonBase } from "../Button/ButtonBase.js";
|
|
|
6
7
|
import { KeybindingHint } from "../KeybindingHint/KeybindingHint.js";
|
|
7
8
|
import { getAccessibleKeybindingHintString } from "../KeybindingHint/utils.js";
|
|
8
9
|
import { Tooltip } from "../TooltipV2/Tooltip.js";
|
|
9
|
-
import { useSlots } from "../hooks/useSlots.js";
|
|
10
10
|
import { useOverflow } from "../hooks/useOverflow.js";
|
|
11
11
|
import { ScrollableRegion } from "../ScrollableRegion/ScrollableRegion.js";
|
|
12
12
|
import { Dialog } from "../Dialog/Dialog.js";
|
|
@@ -106,6 +106,10 @@ function useAnchoredPosition(settings, dependencies = []) {
|
|
|
106
106
|
}, [updatePosition]);
|
|
107
107
|
useResizeObserver(updatePosition, void 0, [], enabled);
|
|
108
108
|
useResizeObserver(updatePosition, floatingElementRef, [], enabled);
|
|
109
|
+
const scrollAncestorsCacheRef = React.useRef({
|
|
110
|
+
anchor: null,
|
|
111
|
+
scrollables: []
|
|
112
|
+
});
|
|
109
113
|
React.useEffect(() => {
|
|
110
114
|
if (!enabled) return;
|
|
111
115
|
const anchorEl = anchorElementRef.current;
|
|
@@ -118,7 +122,16 @@ function useAnchoredPosition(settings, dependencies = []) {
|
|
|
118
122
|
updatePosition();
|
|
119
123
|
});
|
|
120
124
|
};
|
|
121
|
-
const
|
|
125
|
+
const cache = scrollAncestorsCacheRef.current;
|
|
126
|
+
let scrollables;
|
|
127
|
+
if (cache.anchor === anchorEl) scrollables = cache.scrollables;
|
|
128
|
+
else {
|
|
129
|
+
scrollables = getScrollableAncestors(anchorEl);
|
|
130
|
+
scrollAncestorsCacheRef.current = {
|
|
131
|
+
anchor: anchorEl,
|
|
132
|
+
scrollables
|
|
133
|
+
};
|
|
134
|
+
}
|
|
122
135
|
for (const scrollable of scrollables) scrollable.addEventListener("scroll", handleScroll);
|
|
123
136
|
return () => {
|
|
124
137
|
for (const scrollable of scrollables) scrollable.removeEventListener("scroll", handleScroll);
|
package/dist/hooks/useDialog.js
CHANGED
|
@@ -91,7 +91,8 @@ function useDialog(t0) {
|
|
|
91
91
|
let t8;
|
|
92
92
|
if ($[15] !== getFocusableItem) {
|
|
93
93
|
t8 = (e_1) => {
|
|
94
|
-
const
|
|
94
|
+
const movement_0 = e_1.shiftKey ? -1 : 1;
|
|
95
|
+
const focusableItem_0 = getFocusableItem(e_1, movement_0);
|
|
95
96
|
if (!focusableItem_0) return;
|
|
96
97
|
focusableItem_0.focus();
|
|
97
98
|
};
|
|
@@ -15,7 +15,8 @@ function useScrollFlash(scrollContainerRef) {
|
|
|
15
15
|
if (!scrollContainer) return;
|
|
16
16
|
const id = requestAnimationFrame(() => {
|
|
17
17
|
const currentScroll = scrollContainer.scrollTop;
|
|
18
|
-
|
|
18
|
+
const altScroll = currentScroll < 1 ? currentScroll + 1 : currentScroll - 1;
|
|
19
|
+
scrollContainer.scrollTop = altScroll;
|
|
19
20
|
scrollContainer.scrollTop = currentScroll;
|
|
20
21
|
});
|
|
21
22
|
return () => cancelAnimationFrame(id);
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,15 @@ import { VisuallyHidden } from "./VisuallyHidden/VisuallyHidden.js";
|
|
|
9
9
|
import { useOnOutsideClick } from "./hooks/useOnOutsideClick.js";
|
|
10
10
|
import { useProvidedRefOrCreate } from "./hooks/useProvidedRefOrCreate.js";
|
|
11
11
|
import { useOnEscapePress } from "./hooks/useOnEscapePress.js";
|
|
12
|
+
import { useOpenAndCloseFocus } from "./hooks/useOpenAndCloseFocus.js";
|
|
12
13
|
import useIsomorphicLayoutEffect from "./utils/useIsomorphicLayoutEffect.js";
|
|
13
14
|
import { useResizeObserver } from "./hooks/useResizeObserver.js";
|
|
14
15
|
import { useAnchoredPosition } from "./hooks/useAnchoredPosition.js";
|
|
15
|
-
import { useOpenAndCloseFocus } from "./hooks/useOpenAndCloseFocus.js";
|
|
16
16
|
import { useOverlay } from "./hooks/useOverlay.js";
|
|
17
|
+
import { useRefObjectAsForwardedRef } from "./hooks/useRefObjectAsForwardedRef.js";
|
|
17
18
|
import { useId } from "./hooks/useId.js";
|
|
19
|
+
import { isSlot } from "./utils/is-slot.js";
|
|
20
|
+
import { useSlots } from "./hooks/useSlots.js";
|
|
18
21
|
import Spinner from "./Spinner/Spinner.js";
|
|
19
22
|
import CounterLabel from "./CounterLabel/CounterLabel.js";
|
|
20
23
|
import { ButtonBase } from "./Button/ButtonBase.js";
|
|
@@ -25,8 +28,6 @@ import { IconButton } from "./Button/IconButton.js";
|
|
|
25
28
|
import { LinkButton } from "./Button/LinkButton.js";
|
|
26
29
|
import { ButtonComponent } from "./Button/Button.js";
|
|
27
30
|
import { useResponsiveValue } from "./hooks/useResponsiveValue.js";
|
|
28
|
-
import { isSlot } from "./utils/is-slot.js";
|
|
29
|
-
import { useSlots } from "./hooks/useSlots.js";
|
|
30
31
|
import { PageLayout } from "./PageLayout/PageLayout.js";
|
|
31
32
|
import { SplitPageLayout } from "./SplitPageLayout/SplitPageLayout.js";
|
|
32
33
|
import useDetails from "./hooks/useDetails.js";
|
|
@@ -38,7 +39,6 @@ import Portal_default from "./Portal/index.js";
|
|
|
38
39
|
import { Dialog } from "./Dialog/Dialog.js";
|
|
39
40
|
import { ConfirmationDialog } from "./ConfirmationDialog/ConfirmationDialog.js";
|
|
40
41
|
import { useConfirm } from "./ConfirmationDialog/useConfirm.js";
|
|
41
|
-
import { useRefObjectAsForwardedRef } from "./hooks/useRefObjectAsForwardedRef.js";
|
|
42
42
|
import { createComponent } from "./utils/create-component.js";
|
|
43
43
|
import { asSlot } from "./utils/as-slot.js";
|
|
44
44
|
import Radio from "./Radio/Radio.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useId as useId$1 } from "../../../hooks/useId.js";
|
|
2
|
-
import VisuallyHidden from "../../../_VisuallyHidden.js";
|
|
3
2
|
import { useSlots } from "../../../hooks/useSlots.js";
|
|
3
|
+
import VisuallyHidden from "../../../_VisuallyHidden.js";
|
|
4
4
|
import ValidationAnimationContainer from "../ValidationAnimationContainer.js";
|
|
5
5
|
import CheckboxOrRadioGroupContext from "./CheckboxOrRadioGroupContext.js";
|
|
6
6
|
import CheckboxOrRadioGroup_module_css_default from "./CheckboxOrRadioGroup.module.css.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-components-UnderlineWrapper-eT-Yj{align-items:flex-start;box-shadow:inset 0 -1px var(--borderColor-muted,#d1d9e0b3);display:flex;justify-content:flex-start;min-height:var(--control-xlarge-size,3rem);padding-top:var(--base-size-8,.5rem);padding-inline:var(--stack-padding-normal,1rem)}.prc-components-UnderlineWrapper-eT-Yj[data-variant=flush]{padding-inline:unset}.prc-components-UnderlineWrapper-eT-Yj[data-overflow-mode=wrap]{border-block:0!important;box-sizing:border-box;max-height:var(--control-xlarge-size,3rem);overflow:hidden;padding-block:var(--base-size-8,.5rem) 0!important}.prc-components-UnderlineWrapper-eT-Yj[data-overflow-mode=wrap] .prc-components-UnderlineItemList-xKlKC{flex-grow:1;flex-wrap:wrap;overflow:hidden}.prc-components-UnderlineItemList-xKlKC{display:flex;gap:var(--stack-gap-condensed,.5rem);list-style:none;margin:0;padding:0;white-space:nowrap}.prc-components-UnderlineItem-7fP-n,.prc-components-UnderlineItemList-xKlKC{align-items:center;position:relative}.prc-components-UnderlineItem-7fP-n{appearance:none;background-color:transparent;border:0;border-radius:var(--borderRadius-medium,.375rem);color:var(--fgColor-default,#1f2328);cursor:pointer;display:inline-flex;font:inherit;font-size:var(--text-body-size-medium,.875rem);height:32px;line-height:var(--text-body-lineHeight-medium,1.4285);margin-bottom:var(--base-size-8,.5rem);max-width:100%;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-8,.5rem);text-align:center;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.prc-components-UnderlineItem-7fP-n:hover{background-color:var(--bgColor-neutral-muted,#818b981f);-webkit-text-decoration:none;text-decoration:none;transition:background-color .12s ease-out}}.prc-components-UnderlineItem-7fP-n:focus{box-shadow:inset 0 0 0 2px var(--fgColor-accent,#0969da);outline:2px solid transparent}.prc-components-UnderlineItem-7fP-n:focus:not(:focus-visible){box-shadow:none}.prc-components-UnderlineItem-7fP-n:focus-visible{box-shadow:inset 0 0 0 2px var(--fgColor-accent,#0969da);outline:2px solid transparent}.prc-components-UnderlineItem-7fP-n [data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;visibility:hidden;white-space:nowrap}.prc-components-UnderlineItem-7fP-n [data-component=icon]{align-items:center;color:var(--fgColor-muted,#59636e);display:inline-flex;margin-inline-end:var(--base-size-8,.5rem)}.prc-components-UnderlineItem-7fP-n [data-component=text]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prc-components-UnderlineItem-7fP-n [data-component=counter]{align-items:center;display:flex;margin-inline-start:var(--base-size-8,.5rem)}.prc-components-UnderlineItem-7fP-n:after{background-color:transparent;content:"";height:2px;inset:auto 0 0;margin-bottom:calc(var(--base-size-8,.5rem)*-1);pointer-events:none;position:absolute}.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]) [data-component=text],.prc-components-UnderlineItem-7fP-n[aria-selected=true] [data-component=text]{font-weight:var(--base-text-weight-semibold,600)}.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]):after,.prc-components-UnderlineItem-7fP-n[aria-selected=true]:after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73))}@media (forced-colors:active){.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]):after,.prc-components-UnderlineItem-7fP-n[aria-selected=true]:after{background-color:LinkText}}.prc-components-LoadingCounter-dBuLy{animation:prc-components-loadingCounterKeyFrames-8tMlf 1.2s ease-in-out infinite alternate;background-color:var(--bgColor-neutral-muted,#818b981f);border-color:var(--borderColor-default,#d1d9e0);border-radius:20px;display:inline-block;height:1rem;width:1.5rem}@keyframes prc-components-loadingCounterKeyFrames-8tMlf{0%{opacity:1}to{opacity:.2}}
|
|
2
|
+
/*# sourceMappingURL=UnderlineTabbedInterface-93bd865a.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/internal/components/UnderlineTabbedInterface.module.css.js"],"names":[],"mappings":"AAAA,uCAME,sBAAuB,CAOvB,0DAAiD,CAZjD,YAAa,CAIb,0BAA2B,CAI3B,0CAAsC,CAPtC,oCAA+B,CAE/B,+CAgCF,CArBE,2DAEE,oBACF,CAEA,gEAOE,wBAA0B,CAD1B,qBAAsB,CAHtB,0CAAsC,CADtC,eAAgB,CAMhB,kDAOF,CALE,wGACE,WAAY,CACZ,cAAe,CACf,eACF,CAIJ,wCAEE,YAAa,CAMb,oCAA+B,CAF/B,eAAgB,CAFhB,QAAS,CADT,SAAU,CAEV,kBAIF,CAEA,4EAJE,kBAAmB,CANnB,iBAyCF,CA/BA,oCAmBE,eAAgB,CARhB,4BAA6B,CAC7B,QAAS,CACT,gDAAyC,CANzC,oCAA6B,CAG7B,cAAe,CAPf,mBAAoB,CACpB,YAAa,CACb,8CAAuC,CAWvC,WAAY,CAVZ,qDAAuD,CASvD,sCAAiC,CADjC,cAAe,CAOf,wCAAiC,CADjC,uCAAkC,CAZlC,iBAAkB,CAClB,4BAAqB,CAArB,oBAsBF,CAPE,qBACE,0CAEE,uDAA8C,CAD9C,4BAAqB,CAArB,oBAAqB,CAErB,yCACF,CACF,CAGF,0CAGE,wDAAiD,CAFjD,6BAQF,CAHE,8DACE,eACF,CAGF,kDAGE,wDAAiD,CAFjD,6BAGF,CAGA,0DAME,0BAA2B,CAL3B,aAAc,CAEd,gDAA6C,CAD7C,QAAS,CAGT,iBAAkB,CADlB,kBAGF,CAEA,0DAGE,kBAAmB,CADnB,kCAA2B,CAD3B,mBAAoB,CAGpB,0CACF,CAGA,0DACE,eAAgB,CAChB,sBAAuB,CACvB,kBACF,CAEA,6DAGE,kBAAmB,CADnB,YAAa,CADb,4CAGF,CAEA,0CAOE,4BAA6B,CAD7B,UAAW,CAFX,UAAW,CAFX,cAAe,CACf,+CAA4C,CAE5C,mBAAoB,CAJpB,iBAOF,CAEA,gLAEE,gDACF,CAEA,gJAGE,iGAMF,CAJE,8BALF,gJAOI,yBAEJ,CADE,CAGF,qCASE,0FAAsE,CAJtE,uDAA8C,CAC9C,+CAAwC,CAExC,kBAAmB,CAPnB,oBAAqB,CAErB,WAAY,CADZ,YAQF,CAEA,wDACE,GACE,SACF,CAEA,GACE,UACF,CACF","file":"UnderlineTabbedInterface-93bd865a.css","sourcesContent":[".UnderlineWrapper {\n display: flex;\n padding-top: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: var(--stack-padding-normal);\n justify-content: flex-start;\n align-items: flex-start;\n\n /* make space for the underline */\n min-height: var(--control-xlarge-size);\n\n /* using a box-shadow instead of a border to accommodate 'overflow-y: hidden' on UnderlinePanels */\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 -1px var(--borderColor-muted);\n\n &[data-variant='flush'] {\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: unset;\n }\n\n &[data-overflow-mode='wrap'] {\n /* Wrap items onto hidden next lines */\n overflow: hidden;\n max-height: var(--control-xlarge-size);\n\n /* Pin the vertical box model so external border/padding overrides can't change the height budget and incorrectly trigger the overflow \"more\" menu */\n box-sizing: border-box;\n border-block: 0 !important;\n padding-block: var(--base-size-8) 0 !important;\n\n .UnderlineItemList {\n flex-grow: 1;\n flex-wrap: wrap;\n overflow: hidden;\n }\n }\n}\n\n.UnderlineItemList {\n position: relative;\n display: flex;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n list-style: none;\n align-items: center;\n gap: var(--stack-gap-condensed);\n}\n\n.UnderlineItem {\n /* underline tab specific styles */\n position: relative;\n display: inline-flex;\n font: inherit;\n font-size: var(--text-body-size-medium);\n line-height: var(--text-body-lineHeight-medium, 1.4285);\n color: var(--fgColor-default);\n text-align: center;\n text-decoration: none;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n border-radius: var(--borderRadius-medium);\n max-width: 100%;\n margin-bottom: var(--base-size-8);\n height: 32px;\n\n /* button resets */\n appearance: none;\n padding-inline: var(--base-size-8);\n padding-block: var(--base-size-6);\n align-items: center;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: none;\n background-color: var(--bgColor-neutral-muted);\n transition: background-color 0.12s ease-out;\n }\n }\n}\n\n.UnderlineItem:focus {\n outline: 2px solid transparent;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 0 0 2px var(--fgColor-accent);\n\n /* where focus-visible is supported, remove the focus box-shadow */\n &:not(:focus-visible) {\n box-shadow: none;\n }\n}\n\n.UnderlineItem:focus-visible {\n outline: 2px solid transparent;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 0 0 2px var(--fgColor-accent);\n}\n\n/* renders a visibly hidden \"copy\" of the label in bold, reserving box space for when label becomes bold on selected */\n.UnderlineItem [data-content]::before {\n display: block;\n height: 0;\n font-weight: var(--base-text-weight-semibold);\n white-space: nowrap;\n visibility: hidden;\n content: attr(data-content);\n}\n\n.UnderlineItem [data-component='icon'] {\n display: inline-flex;\n color: var(--fgColor-muted);\n align-items: center;\n margin-inline-end: var(--base-size-8);\n}\n\n/* Truncate items if necessary (should only ever apply to the last item after everything else overflows) */\n.UnderlineItem [data-component='text'] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.UnderlineItem [data-component='counter'] {\n margin-inline-start: var(--base-size-8);\n display: flex;\n align-items: center;\n}\n\n.UnderlineItem::after {\n position: absolute;\n inset: auto 0 0;\n margin-bottom: calc(-1 * var(--base-size-8));\n height: 2px;\n pointer-events: none;\n content: '';\n background-color: transparent;\n}\n\n.UnderlineItem[aria-current]:not([aria-current='false']) [data-component='text'],\n.UnderlineItem[aria-selected='true'] [data-component='text'] {\n font-weight: var(--base-text-weight-semibold);\n}\n\n.UnderlineItem[aria-current]:not([aria-current='false'])::after,\n.UnderlineItem[aria-selected='true']::after {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--underlineNav-borderColor-active, var(--color-primer-border-active, #fd8c73));\n\n @media (forced-colors: active) {\n /* Support for Window Force Color Mode https://learn.microsoft.com/en-us/fluent-ui/web-components/design-system/high-contrast */\n background-color: LinkText;\n }\n}\n\n.LoadingCounter {\n display: inline-block;\n width: 1.5rem;\n height: 1rem;\n /* 16px */\n background-color: var(--bgColor-neutral-muted);\n border-color: var(--borderColor-default);\n /* stylelint-disable-next-line primer/borders */\n border-radius: 20px;\n animation: loadingCounterKeyFrames 1.2s ease-in-out infinite alternate;\n}\n\n@keyframes loadingCounterKeyFrames {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0.2;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./UnderlineTabbedInterface-
|
|
1
|
+
import "./UnderlineTabbedInterface-93bd865a.css";
|
|
2
2
|
//#region src/internal/components/UnderlineTabbedInterface.module.css.js
|
|
3
3
|
var UnderlineTabbedInterface_module_css_default = {
|
|
4
4
|
"UnderlineWrapper": "prc-components-UnderlineWrapper-eT-Yj",
|
package/dist/utils/warning.js
CHANGED
|
@@ -5,9 +5,10 @@ const warn = function warn(message) {
|
|
|
5
5
|
const warning = function warning(condition, format, ...args) {
|
|
6
6
|
if (condition) {
|
|
7
7
|
let index = 0;
|
|
8
|
-
|
|
8
|
+
const message = format.replace(/%s/g, () => {
|
|
9
9
|
return args[index++];
|
|
10
|
-
})
|
|
10
|
+
});
|
|
11
|
+
warn(message);
|
|
11
12
|
}
|
|
12
13
|
};
|
|
13
14
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "38.32.
|
|
4
|
+
"version": "38.32.1-rc.1e5efd5e2",
|
|
5
5
|
"description": "An implementation of GitHub's Primer Design System using React",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"react-is": "18.3.1",
|
|
170
170
|
"recast": "0.23.7",
|
|
171
171
|
"rimraf": "5.0.5",
|
|
172
|
-
"rolldown": "^1.1.
|
|
172
|
+
"rolldown": "^1.1.4",
|
|
173
173
|
"rolldown-plugin-dts": "^0.26.0",
|
|
174
174
|
"rolldown-plugin-import-css": "^0.0.0",
|
|
175
175
|
"rolldown-plugin-preserve-directives": "^0.0.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-UnderlineNav-UnderlineWrapper-GWONT{animation:prc-UnderlineNav-detect-overflow-6HuSH linear;animation-timeline:scroll(self block);--UnderlineNav_moreButton-visibility:hidden;--UnderlineNav_icons-display:inline}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons=true]{--UnderlineNav_icons-display:none}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-has-overflow=true]{--UnderlineNav_moreButton-visibility:visible}@keyframes prc-UnderlineNav-detect-overflow-6HuSH{0%,to{--UnderlineNav_moreButton-visibility:visible;--UnderlineNav_icons-display:none}}.prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:var(--UnderlineNav_icons-display)}.prc-UnderlineNav-MoreButtonContainer-Dnrq6{align-items:center;display:flex;visibility:var(--UnderlineNav_moreButton-visibility)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]{position:relative}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current] .prc-UnderlineNav-OverflowMenuItemLabel-F80v6{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]:after{background:var(--underlineNav-borderColor-active,#fd8c73);content:"";inset:var(--base-size-2,.125rem) auto var(--base-size-2,.125rem) 0;position:absolute;width:var(--base-size-2,.125rem)}.prc-UnderlineNav-MoreButtonDivider-dN0a-{border-left:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);display:inline-block;height:var(--base-size-24,1.5rem);margin-inline:var(--base-size-4,.25rem);width:0}.prc-UnderlineNav-MoreButton-Y8soj{font-weight:var(--base-text-weight-normal,400);margin:0;position:relative}.prc-UnderlineNav-MoreButton-Y8soj>[data-component=trailingVisual]{margin-left:0}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73));content:"";height:2px;inset:auto 0 0;margin-bottom:calc((var(--base-size-8,.5rem) + var(--borderWidth-thin,.0625rem))*-1);pointer-events:none;position:absolute}@media (forced-colors:active){.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:LinkText}}
|
|
2
|
-
/*# sourceMappingURL=UnderlineNav-47547980.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/UnderlineNav/UnderlineNav.module.css.js"],"names":[],"mappings":"AAAA,yCAIE,uDAAiC,CACjC,qCAAsC,CAEtC,2CAA4C,CAC5C,mCASF,CAPE,+DACE,iCACF,CAEA,iEACE,4CACF,CAGF,kDACE,MAEE,4CAA6C,CAC7C,iCACF,CACF,CAEA,wDACE,yCACF,CAEA,4CAGE,kBAAmB,CAFnB,YAAa,CACb,oDAEF,CAEA,wDACE,iBAcF,CAZE,sGACE,gDACF,CAEA,8DAME,yDAAkD,CALlD,UAAW,CAGX,kEAAmD,CADnD,iBAAkB,CADlB,gCAKF,CAGF,0CAEE,qFAAmE,CADnE,oBAAqB,CAIrB,iCAA2B,CAD3B,uCAAiC,CADjC,OAGF,CAEA,mCAEE,8CAA2C,CAD3C,QAAS,CAET,iBA6BF,CA3BE,mEACE,aACF,CAIA,sDACE,gDAmBF,CAjBE,4DAUE,iGAAoG,CAFpG,UAAW,CAFX,UAAW,CAJX,cAAe,CAGf,oFAAwE,CAExE,mBAAoB,CANpB,iBAeF,CAJE,8BAZF,4DAcI,yBAEJ,CADE","file":"UnderlineNav-47547980.css","sourcesContent":[".UnderlineWrapper {\n /* Progressive enhancement: Detect overflow using scroll-based animations.\n The idiomatic way would be a scroll-state container query but browser support\n is slightly better for animations. */\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n\n --UnderlineNav_moreButton-visibility: hidden;\n --UnderlineNav_icons-display: inline;\n\n &[data-hide-icons='true'] {\n --UnderlineNav_icons-display: none;\n }\n\n &[data-has-overflow='true'] {\n --UnderlineNav_moreButton-visibility: visible;\n }\n}\n\n@keyframes detect-overflow {\n 0%,\n 100% {\n --UnderlineNav_moreButton-visibility: visible;\n --UnderlineNav_icons-display: none;\n }\n}\n\n.ItemsList [data-component='icon'] {\n display: var(--UnderlineNav_icons-display);\n}\n\n.MoreButtonContainer {\n display: flex;\n visibility: var(--UnderlineNav_moreButton-visibility);\n align-items: center;\n}\n\n.OverflowMenuItem [aria-current] {\n position: relative;\n\n .OverflowMenuItemLabel {\n font-weight: var(--base-text-weight-semibold);\n }\n\n &::after {\n content: '';\n width: var(--base-size-2);\n position: absolute;\n inset: var(--base-size-2) auto var(--base-size-2) 0;\n /* stylelint-disable-next-line primer/colors */\n background: var(--underlineNav-borderColor-active);\n }\n}\n\n.MoreButtonDivider {\n display: inline-block;\n border-left: var(--borderWidth-thin) solid var(--borderColor-muted);\n width: 0;\n margin-inline: var(--base-size-4);\n height: var(--base-size-24);\n}\n\n.MoreButton {\n margin: 0; /* reset Safari extra margin */\n font-weight: var(--base-text-weight-normal);\n position: relative;\n\n & > [data-component='trailingVisual'] {\n margin-left: 0;\n }\n\n /* When the current item has overflowed into the menu, style the overflow\n anchor so it looks like the current item (semibold text + active underline). */\n &[data-current='true'] {\n font-weight: var(--base-text-weight-semibold);\n\n &::after {\n position: absolute;\n inset: auto 0 0;\n /* Pull down same amount as the item-level decoration, plus the border width of the button */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: calc(-1 * (var(--base-size-8) + var(--borderWidth-thin)));\n height: 2px;\n pointer-events: none;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--underlineNav-borderColor-active, var(--color-primer-border-active, #fd8c73));\n\n @media (forced-colors: active) {\n /* Support for Windows Forced Color Mode https://learn.microsoft.com/en-us/fluent-ui/web-components/design-system/high-contrast */\n background-color: LinkText;\n }\n }\n }\n}\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-components-UnderlineWrapper-eT-Yj{align-items:flex-start;box-shadow:inset 0 -1px var(--borderColor-muted,#d1d9e0b3);display:flex;justify-content:flex-start;min-height:var(--control-xlarge-size,3rem);padding-top:var(--base-size-8,.5rem);padding-inline:var(--stack-padding-normal,1rem)}.prc-components-UnderlineWrapper-eT-Yj[data-variant=flush]{padding-inline:unset}.prc-components-UnderlineWrapper-eT-Yj[data-hide-icons=true] [data-component=icon]{display:none}.prc-components-UnderlineWrapper-eT-Yj[data-overflow-mode=wrap]{max-height:var(--control-xlarge-size,3rem);overflow:hidden}.prc-components-UnderlineWrapper-eT-Yj[data-overflow-mode=wrap] .prc-components-UnderlineItemList-xKlKC{flex-wrap:wrap;overflow:hidden}.prc-components-UnderlineItemList-xKlKC{display:flex;gap:var(--stack-gap-condensed,.5rem);list-style:none;margin:0;padding:0;white-space:nowrap}.prc-components-UnderlineItem-7fP-n,.prc-components-UnderlineItemList-xKlKC{align-items:center;position:relative}.prc-components-UnderlineItem-7fP-n{appearance:none;background-color:transparent;border:0;border-radius:var(--borderRadius-medium,.375rem);color:var(--fgColor-default,#1f2328);cursor:pointer;display:inline-flex;font:inherit;font-size:var(--text-body-size-medium,.875rem);height:32px;line-height:var(--text-body-lineHeight-medium,1.4285);margin-bottom:var(--base-size-8,.5rem);max-width:100%;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-8,.5rem);text-align:center;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.prc-components-UnderlineItem-7fP-n:hover{background-color:var(--bgColor-neutral-muted,#818b981f);-webkit-text-decoration:none;text-decoration:none;transition:background-color .12s ease-out}}.prc-components-UnderlineItem-7fP-n:focus{box-shadow:inset 0 0 0 2px var(--fgColor-accent,#0969da);outline:2px solid transparent}.prc-components-UnderlineItem-7fP-n:focus:not(:focus-visible){box-shadow:none}.prc-components-UnderlineItem-7fP-n:focus-visible{box-shadow:inset 0 0 0 2px var(--fgColor-accent,#0969da);outline:2px solid transparent}.prc-components-UnderlineItem-7fP-n [data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;visibility:hidden;white-space:nowrap}.prc-components-UnderlineItem-7fP-n [data-component=icon]{align-items:center;color:var(--fgColor-muted,#59636e);display:inline-flex;margin-inline-end:var(--base-size-8,.5rem)}.prc-components-UnderlineItem-7fP-n [data-component=text]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prc-components-UnderlineItem-7fP-n [data-component=counter]{align-items:center;display:flex;margin-inline-start:var(--base-size-8,.5rem)}.prc-components-UnderlineItem-7fP-n:after{background-color:transparent;content:"";height:2px;inset:auto 0 0;margin-bottom:calc(var(--base-size-8,.5rem)*-1);pointer-events:none;position:absolute}.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]) [data-component=text],.prc-components-UnderlineItem-7fP-n[aria-selected=true] [data-component=text]{font-weight:var(--base-text-weight-semibold,600)}.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]):after,.prc-components-UnderlineItem-7fP-n[aria-selected=true]:after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73))}@media (forced-colors:active){.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]):after,.prc-components-UnderlineItem-7fP-n[aria-selected=true]:after{background-color:LinkText}}.prc-components-LoadingCounter-dBuLy{animation:prc-components-loadingCounterKeyFrames-8tMlf 1.2s ease-in-out infinite alternate;background-color:var(--bgColor-neutral-muted,#818b981f);border-color:var(--borderColor-default,#d1d9e0);border-radius:20px;display:inline-block;height:1rem;width:1.5rem}@keyframes prc-components-loadingCounterKeyFrames-8tMlf{0%{opacity:1}to{opacity:.2}}
|
|
2
|
-
/*# sourceMappingURL=UnderlineTabbedInterface-1745a3d6.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/internal/components/UnderlineTabbedInterface.module.css.js"],"names":[],"mappings":"AAAA,uCAME,sBAAuB,CAOvB,0DAAiD,CAZjD,YAAa,CAIb,0BAA2B,CAI3B,0CAAsC,CAPtC,oCAA+B,CAE/B,+CA8BF,CAnBE,2DAEE,oBACF,CAEA,mFACE,YACF,CAEA,gEAGE,0CAAsC,CADtC,eAOF,CAJE,wGACE,cAAe,CACf,eACF,CAIJ,wCAEE,YAAa,CAMb,oCAA+B,CAF/B,eAAgB,CAFhB,QAAS,CADT,SAAU,CAEV,kBAIF,CAEA,4EAJE,kBAAmB,CANnB,iBAyCF,CA/BA,oCAmBE,eAAgB,CARhB,4BAA6B,CAC7B,QAAS,CACT,gDAAyC,CANzC,oCAA6B,CAG7B,cAAe,CAPf,mBAAoB,CACpB,YAAa,CACb,8CAAuC,CAWvC,WAAY,CAVZ,qDAAuD,CASvD,sCAAiC,CADjC,cAAe,CAOf,wCAAiC,CADjC,uCAAkC,CAZlC,iBAAkB,CAClB,4BAAqB,CAArB,oBAsBF,CAPE,qBACE,0CAEE,uDAA8C,CAD9C,4BAAqB,CAArB,oBAAqB,CAErB,yCACF,CACF,CAGF,0CAGE,wDAAiD,CAFjD,6BAQF,CAHE,8DACE,eACF,CAGF,kDAGE,wDAAiD,CAFjD,6BAGF,CAGA,0DAME,0BAA2B,CAL3B,aAAc,CAEd,gDAA6C,CAD7C,QAAS,CAGT,iBAAkB,CADlB,kBAGF,CAEA,0DAGE,kBAAmB,CADnB,kCAA2B,CAD3B,mBAAoB,CAGpB,0CACF,CAGA,0DACE,eAAgB,CAChB,sBAAuB,CACvB,kBACF,CAEA,6DAGE,kBAAmB,CADnB,YAAa,CADb,4CAGF,CAEA,0CAOE,4BAA6B,CAD7B,UAAW,CAFX,UAAW,CAFX,cAAe,CACf,+CAA4C,CAE5C,mBAAoB,CAJpB,iBAOF,CAEA,gLAEE,gDACF,CAEA,gJAGE,iGAMF,CAJE,8BALF,gJAOI,yBAEJ,CADE,CAGF,qCASE,0FAAsE,CAJtE,uDAA8C,CAC9C,+CAAwC,CAExC,kBAAmB,CAPnB,oBAAqB,CAErB,WAAY,CADZ,YAQF,CAEA,wDACE,GACE,SACF,CAEA,GACE,UACF,CACF","file":"UnderlineTabbedInterface-1745a3d6.css","sourcesContent":[".UnderlineWrapper {\n display: flex;\n padding-top: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: var(--stack-padding-normal);\n justify-content: flex-start;\n align-items: flex-start;\n\n /* make space for the underline */\n min-height: var(--control-xlarge-size);\n\n /* using a box-shadow instead of a border to accommodate 'overflow-y: hidden' on UnderlinePanels */\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 -1px var(--borderColor-muted);\n\n &[data-variant='flush'] {\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: unset;\n }\n\n &[data-hide-icons='true'] [data-component='icon'] {\n display: none;\n }\n\n &[data-overflow-mode='wrap'] {\n /* Wrap items onto hidden next lines */\n overflow: hidden;\n max-height: var(--control-xlarge-size);\n\n .UnderlineItemList {\n flex-wrap: wrap;\n overflow: hidden;\n }\n }\n}\n\n.UnderlineItemList {\n position: relative;\n display: flex;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n list-style: none;\n align-items: center;\n gap: var(--stack-gap-condensed);\n}\n\n.UnderlineItem {\n /* underline tab specific styles */\n position: relative;\n display: inline-flex;\n font: inherit;\n font-size: var(--text-body-size-medium);\n line-height: var(--text-body-lineHeight-medium, 1.4285);\n color: var(--fgColor-default);\n text-align: center;\n text-decoration: none;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n border-radius: var(--borderRadius-medium);\n max-width: 100%;\n margin-bottom: var(--base-size-8);\n height: 32px;\n\n /* button resets */\n appearance: none;\n padding-inline: var(--base-size-8);\n padding-block: var(--base-size-6);\n align-items: center;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: none;\n background-color: var(--bgColor-neutral-muted);\n transition: background-color 0.12s ease-out;\n }\n }\n}\n\n.UnderlineItem:focus {\n outline: 2px solid transparent;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 0 0 2px var(--fgColor-accent);\n\n /* where focus-visible is supported, remove the focus box-shadow */\n &:not(:focus-visible) {\n box-shadow: none;\n }\n}\n\n.UnderlineItem:focus-visible {\n outline: 2px solid transparent;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 0 0 2px var(--fgColor-accent);\n}\n\n/* renders a visibly hidden \"copy\" of the label in bold, reserving box space for when label becomes bold on selected */\n.UnderlineItem [data-content]::before {\n display: block;\n height: 0;\n font-weight: var(--base-text-weight-semibold);\n white-space: nowrap;\n visibility: hidden;\n content: attr(data-content);\n}\n\n.UnderlineItem [data-component='icon'] {\n display: inline-flex;\n color: var(--fgColor-muted);\n align-items: center;\n margin-inline-end: var(--base-size-8);\n}\n\n/* Truncate items if necessary (should only ever apply to the last item after everything else overflows) */\n.UnderlineItem [data-component='text'] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.UnderlineItem [data-component='counter'] {\n margin-inline-start: var(--base-size-8);\n display: flex;\n align-items: center;\n}\n\n.UnderlineItem::after {\n position: absolute;\n inset: auto 0 0;\n margin-bottom: calc(-1 * var(--base-size-8));\n height: 2px;\n pointer-events: none;\n content: '';\n background-color: transparent;\n}\n\n.UnderlineItem[aria-current]:not([aria-current='false']) [data-component='text'],\n.UnderlineItem[aria-selected='true'] [data-component='text'] {\n font-weight: var(--base-text-weight-semibold);\n}\n\n.UnderlineItem[aria-current]:not([aria-current='false'])::after,\n.UnderlineItem[aria-selected='true']::after {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--underlineNav-borderColor-active, var(--color-primer-border-active, #fd8c73));\n\n @media (forced-colors: active) {\n /* Support for Window Force Color Mode https://learn.microsoft.com/en-us/fluent-ui/web-components/design-system/high-contrast */\n background-color: LinkText;\n }\n}\n\n.LoadingCounter {\n display: inline-block;\n width: 1.5rem;\n height: 1rem;\n /* 16px */\n background-color: var(--bgColor-neutral-muted);\n border-color: var(--borderColor-default);\n /* stylelint-disable-next-line primer/borders */\n border-radius: 20px;\n animation: loadingCounterKeyFrames 1.2s ease-in-out infinite alternate;\n}\n\n@keyframes loadingCounterKeyFrames {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0.2;\n }\n}\n"]}
|