@primer/react 0.0.0-20260714183333 → 0.0.0-20260714190115
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 +3 -5
- 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 +261 -68
- package/dist/PageLayout/index.d.ts +1 -3
- package/dist/PageLayout/usePaneWidth.d.ts +1 -55
- package/dist/PageLayout/usePaneWidth.js +5 -10
- package/dist/TextInputWithTokens/TextInputWithTokens.js +1 -1
- package/dist/TooltipV2/Tooltip.js +2 -1
- package/dist/TreeView/TreeView.js +6 -3
- 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/useDialog.js +2 -1
- package/dist/hooks/useScrollFlash.js +2 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +5 -7
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +1 -1
- package/dist/internal/components/UnderlineTabbedInterface-9aca4eac.css +2 -0
- package/dist/internal/components/UnderlineTabbedInterface-9aca4eac.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/PageLayout/DragHandle.d.ts +0 -38
- package/dist/PageLayout/DragHandle.js +0 -220
- package/dist/internal/components/UnderlineTabbedInterface-25587345.css +0 -2
- package/dist/internal/components/UnderlineTabbedInterface-25587345.css.map +0 -1
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import PageLayout_module_css_default from "./PageLayout.module.css.js";
|
|
2
|
-
import { defaultFormatValueText } from "./usePaneWidth.js";
|
|
3
|
-
import { removeDraggingStyles, setDraggingStyles } from "./paneUtils.js";
|
|
4
|
-
import { c } from "react-compiler-runtime";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import React, { memo } from "react";
|
|
7
|
-
//#region src/PageLayout/DragHandle.tsx
|
|
8
|
-
const isArrowKey = (key) => key === "ArrowLeft" || key === "ArrowRight" || key === "ArrowUp" || key === "ArrowDown";
|
|
9
|
-
const isShrinkKey = (key) => key === "ArrowLeft" || key === "ArrowDown";
|
|
10
|
-
/**
|
|
11
|
-
* DragHandle - handles all pointer and keyboard interactions for resizing.
|
|
12
|
-
* ARIA values are set in JSX for SSR accessibility, then updated via DOM
|
|
13
|
-
* manipulation during drag for performance. The consumer owns writing the width
|
|
14
|
-
* (via the `onDrag` callback); this component only reports interactions.
|
|
15
|
-
*/
|
|
16
|
-
const DragHandle = /*#__PURE__*/ memo(function DragHandle(t0) {
|
|
17
|
-
const $ = c(39);
|
|
18
|
-
const { handleRef, onDragStart, onDrag, onDragEnd, onDoubleClick, "aria-valuemin": ariaValueMin, "aria-valuemax": ariaValueMax, "aria-valuenow": ariaValueNow, dragTargetRef, contentWrapperRef, formatValueText: t1, "data-component": t2 } = t0;
|
|
19
|
-
const formatValueText = t1 === void 0 ? defaultFormatValueText : t1;
|
|
20
|
-
const dataComponent = t2 === void 0 ? "PageLayout.DragHandle" : t2;
|
|
21
|
-
const stableOnDragStart = React.useRef(onDragStart);
|
|
22
|
-
const stableOnDrag = React.useRef(onDrag);
|
|
23
|
-
const stableOnDragEnd = React.useRef(onDragEnd);
|
|
24
|
-
let t3;
|
|
25
|
-
if ($[0] !== onDrag || $[1] !== onDragEnd || $[2] !== onDragStart) {
|
|
26
|
-
t3 = () => {
|
|
27
|
-
stableOnDragStart.current = onDragStart;
|
|
28
|
-
stableOnDrag.current = onDrag;
|
|
29
|
-
stableOnDragEnd.current = onDragEnd;
|
|
30
|
-
};
|
|
31
|
-
$[0] = onDrag;
|
|
32
|
-
$[1] = onDragEnd;
|
|
33
|
-
$[2] = onDragStart;
|
|
34
|
-
$[3] = t3;
|
|
35
|
-
} else t3 = $[3];
|
|
36
|
-
React.useEffect(t3);
|
|
37
|
-
const isDraggingRef = React.useRef(false);
|
|
38
|
-
let t4;
|
|
39
|
-
if ($[4] !== contentWrapperRef || $[5] !== dragTargetRef || $[6] !== handleRef) {
|
|
40
|
-
t4 = () => {
|
|
41
|
-
var _dragTargetRef$curren, _contentWrapperRef$cu;
|
|
42
|
-
if (isDraggingRef.current) return;
|
|
43
|
-
setDraggingStyles({
|
|
44
|
-
handle: handleRef.current,
|
|
45
|
-
pane: (_dragTargetRef$curren = dragTargetRef === null || dragTargetRef === void 0 ? void 0 : dragTargetRef.current) !== null && _dragTargetRef$curren !== void 0 ? _dragTargetRef$curren : null,
|
|
46
|
-
contentWrapper: (_contentWrapperRef$cu = contentWrapperRef === null || contentWrapperRef === void 0 ? void 0 : contentWrapperRef.current) !== null && _contentWrapperRef$cu !== void 0 ? _contentWrapperRef$cu : null
|
|
47
|
-
});
|
|
48
|
-
isDraggingRef.current = true;
|
|
49
|
-
};
|
|
50
|
-
$[4] = contentWrapperRef;
|
|
51
|
-
$[5] = dragTargetRef;
|
|
52
|
-
$[6] = handleRef;
|
|
53
|
-
$[7] = t4;
|
|
54
|
-
} else t4 = $[7];
|
|
55
|
-
const startDragging = t4;
|
|
56
|
-
let t5;
|
|
57
|
-
if ($[8] !== contentWrapperRef || $[9] !== dragTargetRef || $[10] !== handleRef) {
|
|
58
|
-
t5 = () => {
|
|
59
|
-
var _dragTargetRef$curren2, _contentWrapperRef$cu2;
|
|
60
|
-
if (!isDraggingRef.current) return;
|
|
61
|
-
removeDraggingStyles({
|
|
62
|
-
handle: handleRef.current,
|
|
63
|
-
pane: (_dragTargetRef$curren2 = dragTargetRef === null || dragTargetRef === void 0 ? void 0 : dragTargetRef.current) !== null && _dragTargetRef$curren2 !== void 0 ? _dragTargetRef$curren2 : null,
|
|
64
|
-
contentWrapper: (_contentWrapperRef$cu2 = contentWrapperRef === null || contentWrapperRef === void 0 ? void 0 : contentWrapperRef.current) !== null && _contentWrapperRef$cu2 !== void 0 ? _contentWrapperRef$cu2 : null
|
|
65
|
-
});
|
|
66
|
-
isDraggingRef.current = false;
|
|
67
|
-
};
|
|
68
|
-
$[8] = contentWrapperRef;
|
|
69
|
-
$[9] = dragTargetRef;
|
|
70
|
-
$[10] = handleRef;
|
|
71
|
-
$[11] = t5;
|
|
72
|
-
} else t5 = $[11];
|
|
73
|
-
const endDragging = t5;
|
|
74
|
-
let t6;
|
|
75
|
-
if ($[12] !== startDragging) {
|
|
76
|
-
t6 = (event) => {
|
|
77
|
-
if (event.button !== 0) return;
|
|
78
|
-
event.preventDefault();
|
|
79
|
-
const target = event.currentTarget;
|
|
80
|
-
try {
|
|
81
|
-
target.setPointerCapture(event.pointerId);
|
|
82
|
-
} catch {}
|
|
83
|
-
stableOnDragStart.current(event.clientX);
|
|
84
|
-
startDragging();
|
|
85
|
-
};
|
|
86
|
-
$[12] = startDragging;
|
|
87
|
-
$[13] = t6;
|
|
88
|
-
} else t6 = $[13];
|
|
89
|
-
const handlePointerDown = t6;
|
|
90
|
-
const rafIdRef = React.useRef(null);
|
|
91
|
-
const pendingClientXRef = React.useRef(null);
|
|
92
|
-
let t7;
|
|
93
|
-
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
-
t7 = (event_0) => {
|
|
95
|
-
if (!isDraggingRef.current) return;
|
|
96
|
-
event_0.preventDefault();
|
|
97
|
-
pendingClientXRef.current = event_0.clientX;
|
|
98
|
-
if (rafIdRef.current === null) rafIdRef.current = requestAnimationFrame(() => {
|
|
99
|
-
rafIdRef.current = null;
|
|
100
|
-
if (pendingClientXRef.current !== null) {
|
|
101
|
-
stableOnDrag.current(pendingClientXRef.current, false);
|
|
102
|
-
pendingClientXRef.current = null;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
$[14] = t7;
|
|
107
|
-
} else t7 = $[14];
|
|
108
|
-
const handlePointerMove = t7;
|
|
109
|
-
let t8;
|
|
110
|
-
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
111
|
-
t8 = (event_1) => {
|
|
112
|
-
if (!isDraggingRef.current) return;
|
|
113
|
-
event_1.preventDefault();
|
|
114
|
-
};
|
|
115
|
-
$[15] = t8;
|
|
116
|
-
} else t8 = $[15];
|
|
117
|
-
const handlePointerUp = t8;
|
|
118
|
-
let t9;
|
|
119
|
-
if ($[16] !== endDragging) {
|
|
120
|
-
t9 = () => {
|
|
121
|
-
if (!isDraggingRef.current) return;
|
|
122
|
-
if (rafIdRef.current !== null) {
|
|
123
|
-
cancelAnimationFrame(rafIdRef.current);
|
|
124
|
-
rafIdRef.current = null;
|
|
125
|
-
pendingClientXRef.current = null;
|
|
126
|
-
}
|
|
127
|
-
endDragging();
|
|
128
|
-
stableOnDragEnd.current();
|
|
129
|
-
};
|
|
130
|
-
$[16] = endDragging;
|
|
131
|
-
$[17] = t9;
|
|
132
|
-
} else t9 = $[17];
|
|
133
|
-
const handleLostPointerCapture = t9;
|
|
134
|
-
let t10;
|
|
135
|
-
if ($[18] !== startDragging) {
|
|
136
|
-
t10 = (event_2) => {
|
|
137
|
-
if (!isArrowKey(event_2.key)) return;
|
|
138
|
-
event_2.preventDefault();
|
|
139
|
-
const delta = isShrinkKey(event_2.key) ? -3 : 3;
|
|
140
|
-
if (!isDraggingRef.current) startDragging();
|
|
141
|
-
stableOnDrag.current(delta, true);
|
|
142
|
-
};
|
|
143
|
-
$[18] = startDragging;
|
|
144
|
-
$[19] = t10;
|
|
145
|
-
} else t10 = $[19];
|
|
146
|
-
const handleKeyDown = t10;
|
|
147
|
-
let t11;
|
|
148
|
-
if ($[20] !== endDragging) {
|
|
149
|
-
t11 = (event_3) => {
|
|
150
|
-
if (!isArrowKey(event_3.key)) return;
|
|
151
|
-
event_3.preventDefault();
|
|
152
|
-
endDragging();
|
|
153
|
-
stableOnDragEnd.current();
|
|
154
|
-
};
|
|
155
|
-
$[20] = endDragging;
|
|
156
|
-
$[21] = t11;
|
|
157
|
-
} else t11 = $[21];
|
|
158
|
-
const handleKeyUp = t11;
|
|
159
|
-
let t12;
|
|
160
|
-
let t13;
|
|
161
|
-
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
162
|
-
t12 = () => () => {
|
|
163
|
-
if (rafIdRef.current !== null) {
|
|
164
|
-
cancelAnimationFrame(rafIdRef.current);
|
|
165
|
-
rafIdRef.current = null;
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
t13 = [];
|
|
169
|
-
$[22] = t12;
|
|
170
|
-
$[23] = t13;
|
|
171
|
-
} else {
|
|
172
|
-
t12 = $[22];
|
|
173
|
-
t13 = $[23];
|
|
174
|
-
}
|
|
175
|
-
React.useEffect(t12, t13);
|
|
176
|
-
let t14;
|
|
177
|
-
if ($[24] !== ariaValueNow || $[25] !== formatValueText) {
|
|
178
|
-
t14 = ariaValueNow !== void 0 ? formatValueText(ariaValueNow) : void 0;
|
|
179
|
-
$[24] = ariaValueNow;
|
|
180
|
-
$[25] = formatValueText;
|
|
181
|
-
$[26] = t14;
|
|
182
|
-
} else t14 = $[26];
|
|
183
|
-
let t15;
|
|
184
|
-
if ($[27] !== ariaValueMax || $[28] !== ariaValueMin || $[29] !== ariaValueNow || $[30] !== dataComponent || $[31] !== handleKeyDown || $[32] !== handleKeyUp || $[33] !== handleLostPointerCapture || $[34] !== handlePointerDown || $[35] !== handleRef || $[36] !== onDoubleClick || $[37] !== t14) {
|
|
185
|
-
t15 = /*#__PURE__*/ jsx("div", {
|
|
186
|
-
ref: handleRef,
|
|
187
|
-
className: PageLayout_module_css_default.DraggableHandle,
|
|
188
|
-
"data-component": dataComponent,
|
|
189
|
-
role: "slider",
|
|
190
|
-
"aria-label": "Draggable pane splitter",
|
|
191
|
-
"aria-valuemin": ariaValueMin,
|
|
192
|
-
"aria-valuemax": ariaValueMax,
|
|
193
|
-
"aria-valuenow": ariaValueNow,
|
|
194
|
-
"aria-valuetext": t14,
|
|
195
|
-
tabIndex: 0,
|
|
196
|
-
onPointerDown: handlePointerDown,
|
|
197
|
-
onPointerMove: handlePointerMove,
|
|
198
|
-
onPointerUp: handlePointerUp,
|
|
199
|
-
onLostPointerCapture: handleLostPointerCapture,
|
|
200
|
-
onKeyDown: handleKeyDown,
|
|
201
|
-
onKeyUp: handleKeyUp,
|
|
202
|
-
onDoubleClick
|
|
203
|
-
});
|
|
204
|
-
$[27] = ariaValueMax;
|
|
205
|
-
$[28] = ariaValueMin;
|
|
206
|
-
$[29] = ariaValueNow;
|
|
207
|
-
$[30] = dataComponent;
|
|
208
|
-
$[31] = handleKeyDown;
|
|
209
|
-
$[32] = handleKeyUp;
|
|
210
|
-
$[33] = handleLostPointerCapture;
|
|
211
|
-
$[34] = handlePointerDown;
|
|
212
|
-
$[35] = handleRef;
|
|
213
|
-
$[36] = onDoubleClick;
|
|
214
|
-
$[37] = t14;
|
|
215
|
-
$[38] = t15;
|
|
216
|
-
} else t15 = $[38];
|
|
217
|
-
return t15;
|
|
218
|
-
});
|
|
219
|
-
//#endregion
|
|
220
|
-
export { DragHandle };
|
|
@@ -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-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 */
|
|
@@ -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,+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"]}
|