@primer/react 38.32.0-rc.e7fe8806e → 38.32.0
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 +2 -0
- 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/internal/components/UnderlineTabbedInterface-25587345.css +2 -0
- package/dist/internal/components/UnderlineTabbedInterface-25587345.css.map +1 -0
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
- package/package.json +1 -1
- 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
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
7
9
|
- [#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
10
|
|
|
9
11
|
SplitPageLayout
|
|
@@ -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",
|
|
@@ -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]{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-25587345.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,+CA0BF,CAfE,2DAEE,oBACF,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-25587345.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 .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"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./UnderlineTabbedInterface-
|
|
1
|
+
import "./UnderlineTabbedInterface-25587345.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/package.json
CHANGED
|
@@ -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"]}
|