@primer/react 0.0.0-20260804195417 → 0.0.0-20260805165233
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 -2
- package/dist/ActionList/Group-d89306a8.css +2 -0
- package/dist/ActionList/Group-d89306a8.css.map +1 -0
- package/dist/ActionList/Group.module.css.js +2 -2
- package/dist/NavList/NavList.d.ts +2 -2
- package/dist/NavList/NavList.js +45 -36
- package/dist/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/dist/UnderlineNav/UnderlineNav.js +1 -1
- package/generated/components.json +1 -7
- package/package.json +1 -1
- package/dist/ActionList/Group-efcb39da.css +0 -2
- package/dist/ActionList/Group-efcb39da.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260805165233
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
- [#8258](https://github.com/primer/react/pull/8258) [`edbcd94`](https://github.com/primer/react/commit/edbcd942354ff45148c2623be8b543ef8789a20f) Thanks [@llastflowers](https://github.com/llastflowers)! - Update `AvatarStack` to not reserve space when collapsed
|
|
10
10
|
|
|
11
|
-
- [#
|
|
11
|
+
- [#8273](https://github.com/primer/react/pull/8273) [`8243fbd`](https://github.com/primer/react/commit/8243fbd6276cd00e2f693d45990ae4fe89057c84) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - NavList: Exclude group headings from navigation list item counts
|
|
12
12
|
|
|
13
13
|
## 38.35.0
|
|
14
14
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-ActionList-Group-lMIPQ{list-style:none}.prc-ActionList-Group-lMIPQ:not(:first-child){margin-block-start:var(--base-size-8,.5rem)}.prc-ActionList-GroupList-V5B3-{padding-inline-start:0}.prc-ActionList-GroupHeadingWrap-laXcX{color:var(--fgColor-muted,#59636e);display:flex;flex-direction:column;font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);line-height:18px;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]){background:var(--bgColor-muted,#f6f8fa);border-bottom:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);border-top:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);margin-block-end:var(--base-size-8,.5rem);margin-block-start:calc(var(--base-size-8,.5rem) - var(--borderWidth-thin,.0625rem));padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]):first-child{margin-block-start:0}.prc-ActionList-GroupHeading-STzxi{align-self:flex-start;color:var(--fgColor-muted,#59636e);font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);margin:0}.prc-ActionList-GroupHeadingWrap-laXcX[data-has-trailing-action]{align-items:center;flex-direction:row;gap:var(--base-size-8,.5rem);justify-content:space-between}.prc-ActionList-GroupHeadingWrap-laXcX[data-has-trailing-action]>.prc-ActionList-GroupHeading-STzxi{align-self:center}.prc-ActionList-GroupHeadingTrailingAction-jnb64{align-items:center;display:inline-flex;margin-inline-start:auto}
|
|
2
|
+
/*# sourceMappingURL=Group-d89306a8.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ActionList/Group.module.css.js"],"names":[],"mappings":"AAAA,4BACE,eAKF,CAHE,8CACE,2CACF,CAGF,gCACE,sBACF,CAEA,uCAQE,kCAA2B,CAP3B,YAAa,CAQb,qBAAsB,CAPtB,4CAAsC,CACtC,gDAA6C,CAI7C,gBAAiB,CAIjB,wCAAiC,CADjC,uCAoBF,CAjBE,oEAIE,uCAAgC,CAEhC,uFAAqE,CADrE,oFAAkE,CAFlE,yCAAoC,CADpC,oFAAsE,CAKtE,uCAKF,CAHE,gFACE,oBACF,CAQJ,mCAKE,qBAAsB,CADtB,kCAA2B,CAF3B,4CAAsC,CACtC,gDAA6C,CAF7C,QAKF,CAEA,iEAEE,kBAAmB,CADnB,kBAAmB,CAGnB,4BAAuB,CADvB,6BAMF,CAHE,oGACE,iBACF,CAGF,iDAEE,kBAAmB,CADnB,mBAAoB,CAEpB,wBACF","file":"Group-d89306a8.css","sourcesContent":[".Group {\n list-style: none;\n\n &:not(:first-child) {\n margin-block-start: var(--base-size-8);\n }\n}\n\n.GroupList {\n padding-inline-start: 0;\n}\n\n.GroupHeadingWrap {\n display: flex;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n\n /* line-height: var(--text-body-lineHeight-small); use when FF rolls out */\n /* stylelint-disable-next-line primer/typography */\n line-height: 18px;\n color: var(--fgColor-muted);\n flex-direction: column;\n padding-inline: var(--base-size-16);\n padding-block: var(--base-size-6);\n\n &:where([data-variant='filled']) {\n /* stylelint-disable-next-line primer/spacing */\n margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));\n margin-block-end: var(--base-size-8);\n background: var(--bgColor-muted);\n border-top: solid var(--borderWidth-thin) var(--borderColor-muted);\n border-bottom: solid var(--borderWidth-thin) var(--borderColor-muted);\n padding-inline: var(--base-size-16);\n\n &:first-child {\n margin-block-start: 0;\n }\n }\n\n /* & + ul:has(.GroupHeadingWrap) {\n outline: solid 1px red;\n } */\n}\n\n.GroupHeading {\n margin: 0;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n align-self: flex-start;\n}\n\n.GroupHeadingWrap[data-has-trailing-action] {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: var(--base-size-8);\n\n & > .GroupHeading {\n align-self: center;\n }\n}\n\n.GroupHeadingTrailingAction {\n display: inline-flex;\n align-items: center;\n margin-inline-start: auto;\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./Group-
|
|
1
|
+
import "./Group-d89306a8.css";
|
|
2
2
|
//#region src/ActionList/Group.module.css.js
|
|
3
3
|
var Group_module_css_default = {
|
|
4
4
|
"Group": "prc-ActionList-Group-lMIPQ",
|
|
5
|
-
"GroupHeadingWrap": "prc-ActionList-GroupHeadingWrap-laXcX",
|
|
6
5
|
"GroupList": "prc-ActionList-GroupList-V5B3-",
|
|
6
|
+
"GroupHeadingWrap": "prc-ActionList-GroupHeadingWrap-laXcX",
|
|
7
7
|
"GroupHeading": "prc-ActionList-GroupHeading-STzxi",
|
|
8
8
|
"GroupHeadingTrailingAction": "prc-ActionList-GroupHeadingTrailingAction-jnb64"
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FCWithSlotMarker } from "../utils/types/Slots.js";
|
|
1
|
+
import { FCWithSlotMarker, WithSlotMarker } from "../utils/types/Slots.js";
|
|
2
2
|
import { ForwardRefComponent } from "../utils/polymorphic.js";
|
|
3
3
|
import { DistributiveOmit, PolymorphicProps } from "../utils/modern-polymorphic.js";
|
|
4
4
|
import { ActionListTrailingActionProps } from "../ActionList/TrailingAction.js";
|
|
@@ -71,7 +71,7 @@ declare const NavList: React.ForwardRefExoticComponent<Omit<NavListProps, "ref">
|
|
|
71
71
|
Divider: FCWithSlotMarker<React.PropsWithChildren<ActionListDividerProps>>;
|
|
72
72
|
Group: React.FC<NavListGroupProps>;
|
|
73
73
|
GroupExpand: React.ForwardRefExoticComponent<NavListGroupExpandProps & React.RefAttributes<HTMLButtonElement>>;
|
|
74
|
-
GroupHeading: React.FC<ActionListGroupHeadingProps
|
|
74
|
+
GroupHeading: WithSlotMarker<React.FC<ActionListGroupHeadingProps>>;
|
|
75
75
|
};
|
|
76
76
|
//#endregion
|
|
77
77
|
export { NavList, NavListDividerProps, NavListGroupExpandProps, NavListGroupHeadingProps, NavListGroupProps, NavListHeadingProps, NavListItemProps, NavListLeadingVisualProps, NavListProps, NavListSubNavProps, NavListTrailingVisualProps };
|
package/dist/NavList/NavList.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useId as useId$1 } from "../hooks/useId.js";
|
|
|
3
3
|
import { useSlots } from "../hooks/useSlots.js";
|
|
4
4
|
import { fixedForwardRef } from "../utils/modern-polymorphic.js";
|
|
5
5
|
import _VisuallyHidden_module_css_default from "../_VisuallyHidden.module.css.js";
|
|
6
|
+
import { asSlot } from "../utils/as-slot.js";
|
|
6
7
|
import { ActionListContainerContext } from "../ActionList/ActionListContainerContext.js";
|
|
7
8
|
import Heading$1 from "../Heading/Heading.js";
|
|
8
9
|
import ActionList_module_css_default from "../ActionList/ActionList.module.css.js";
|
|
@@ -375,7 +376,7 @@ Divider.displayName = "NavList.Divider";
|
|
|
375
376
|
const TrailingAction = ActionList.TrailingAction;
|
|
376
377
|
TrailingAction.displayName = "NavList.TrailingAction";
|
|
377
378
|
const Group = (t0) => {
|
|
378
|
-
const $ = c(
|
|
379
|
+
const $ = c(21);
|
|
379
380
|
let children;
|
|
380
381
|
let hideDivider;
|
|
381
382
|
let props;
|
|
@@ -395,48 +396,55 @@ const Group = (t0) => {
|
|
|
395
396
|
}
|
|
396
397
|
const headingLevel = React.useContext(NavListHeadingLevelContext);
|
|
397
398
|
let t1;
|
|
398
|
-
if ($[5]
|
|
399
|
-
t1 =
|
|
400
|
-
$[5] =
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
const groupHeadingAs = t1;
|
|
399
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
400
|
+
t1 = { groupHeading: GroupHeading };
|
|
401
|
+
$[5] = t1;
|
|
402
|
+
} else t1 = $[5];
|
|
403
|
+
const [slots, childrenWithoutHeading] = useSlots(children, t1);
|
|
404
404
|
let t2;
|
|
405
|
-
if ($[
|
|
406
|
-
t2 =
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
-
} else t2 = $[
|
|
405
|
+
if ($[6] !== headingLevel) {
|
|
406
|
+
t2 = headingLevel ? levelToHeadingTag(headingLevel + 1) : "h3";
|
|
407
|
+
$[6] = headingLevel;
|
|
408
|
+
$[7] = t2;
|
|
409
|
+
} else t2 = $[7];
|
|
410
|
+
const groupHeadingAs = t2;
|
|
410
411
|
let t3;
|
|
411
|
-
if ($[
|
|
412
|
-
t3 =
|
|
412
|
+
if ($[8] !== hideDivider) {
|
|
413
|
+
t3 = !hideDivider && /*#__PURE__*/ jsx(ActionList.Divider, {});
|
|
414
|
+
$[8] = hideDivider;
|
|
415
|
+
$[9] = t3;
|
|
416
|
+
} else t3 = $[9];
|
|
417
|
+
let t4;
|
|
418
|
+
if ($[10] !== groupHeadingAs || $[11] !== slots.groupHeading || $[12] !== title) {
|
|
419
|
+
t4 = slots.groupHeading ? /*#__PURE__*/ React.cloneElement(slots.groupHeading, { headingWrapElement: "div" }) : title ? /*#__PURE__*/ jsx(ActionList.GroupHeading, {
|
|
413
420
|
as: groupHeadingAs,
|
|
414
421
|
"data-component": "ActionList.GroupHeading",
|
|
415
422
|
children: title
|
|
416
423
|
}) : null;
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
+
$[10] = groupHeadingAs;
|
|
425
|
+
$[11] = slots.groupHeading;
|
|
426
|
+
$[12] = title;
|
|
427
|
+
$[13] = t4;
|
|
428
|
+
} else t4 = $[13];
|
|
429
|
+
let t5;
|
|
430
|
+
if ($[14] !== childrenWithoutHeading || $[15] !== props || $[16] !== t4) {
|
|
431
|
+
t5 = /*#__PURE__*/ jsxs(ActionList.Group, {
|
|
424
432
|
...props,
|
|
425
|
-
children: [
|
|
433
|
+
children: [t4, childrenWithoutHeading]
|
|
426
434
|
});
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else
|
|
432
|
-
let
|
|
433
|
-
if ($[
|
|
434
|
-
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
} else
|
|
439
|
-
return
|
|
435
|
+
$[14] = childrenWithoutHeading;
|
|
436
|
+
$[15] = props;
|
|
437
|
+
$[16] = t4;
|
|
438
|
+
$[17] = t5;
|
|
439
|
+
} else t5 = $[17];
|
|
440
|
+
let t6;
|
|
441
|
+
if ($[18] !== t3 || $[19] !== t5) {
|
|
442
|
+
t6 = /*#__PURE__*/ jsxs(Fragment, { children: [t3, t5] });
|
|
443
|
+
$[18] = t3;
|
|
444
|
+
$[19] = t5;
|
|
445
|
+
$[20] = t6;
|
|
446
|
+
} else t6 = $[20];
|
|
447
|
+
return t6;
|
|
440
448
|
};
|
|
441
449
|
const GroupExpand = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
442
450
|
const $ = c(23);
|
|
@@ -534,7 +542,7 @@ const GroupExpand = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
534
542
|
* This is an alternative to the `title` prop on `NavList.Group`.
|
|
535
543
|
* It was primarily added to allow links in group headings.
|
|
536
544
|
*/
|
|
537
|
-
const
|
|
545
|
+
const GroupHeadingImpl = (t0) => {
|
|
538
546
|
const $ = c(13);
|
|
539
547
|
let as;
|
|
540
548
|
let className;
|
|
@@ -582,6 +590,7 @@ const GroupHeading = (t0) => {
|
|
|
582
590
|
} else t3 = $[12];
|
|
583
591
|
return t3;
|
|
584
592
|
};
|
|
593
|
+
const GroupHeading = asSlot(GroupHeadingImpl, ActionList.GroupHeading);
|
|
585
594
|
const NavList = Object.assign(Root, {
|
|
586
595
|
Description: ActionList.Description,
|
|
587
596
|
Heading,
|
|
@@ -17,9 +17,8 @@ type UnderlineNavProps = {
|
|
|
17
17
|
*/
|
|
18
18
|
variant?: 'inset' | 'flush';
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* always show icons.
|
|
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.
|
|
23
22
|
*/
|
|
24
23
|
hideIconsBreakpoint?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | null;
|
|
25
24
|
};
|
|
@@ -22,7 +22,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
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 ? "
|
|
25
|
+
const hideIconsBreakpoint = t4 === void 0 ? "xxlarge" : t4;
|
|
26
26
|
const backupRef = useRef(null);
|
|
27
27
|
const navRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
28
28
|
const listRef = useRef(null);
|
|
@@ -9042,7 +9042,7 @@
|
|
|
9042
9042
|
},
|
|
9043
9043
|
{
|
|
9044
9044
|
"id": "components-underlinenav-features--overflow-template",
|
|
9045
|
-
"code": "({ initialSelectedIndex = 1 }: { initialSelectedIndex?: number }) => {\n const [selectedIndex, setSelectedIndex] = React.useState<number | null>(\n initialSelectedIndex,\n )\n return (\n <UnderlineNav aria-label=\"Repository\"
|
|
9045
|
+
"code": "({ initialSelectedIndex = 1 }: { initialSelectedIndex?: number }) => {\n const [selectedIndex, setSelectedIndex] = React.useState<number | null>(\n initialSelectedIndex,\n )\n return (\n <UnderlineNav aria-label=\"Repository\">\n {items.map((item, index) => (\n <UnderlineNav.Item\n key={item.navigation}\n leadingVisual={item.icon}\n aria-current={index === selectedIndex ? 'page' : undefined}\n // Set so that navigation in interaction tests does not cause the\n // page to load the storybook iframe URL and instead keeps the test in\n // the local preview\n target=\"_self\"\n onSelect={(event) => {\n event.preventDefault()\n setSelectedIndex(index)\n }}\n counter={item.counter}\n href={item.href}\n >\n {item.navigation}\n </UnderlineNav.Item>\n ))}\n </UnderlineNav>\n )\n}"
|
|
9046
9046
|
},
|
|
9047
9047
|
{
|
|
9048
9048
|
"id": "components-underlinenav-features--overflow-on-narrow-screen",
|
|
@@ -9078,12 +9078,6 @@
|
|
|
9078
9078
|
"defaultValue": "false",
|
|
9079
9079
|
"description": "Whether the navigation items are in loading state. Component waits for all the counters to finish loading to prevent multiple layout shifts."
|
|
9080
9080
|
},
|
|
9081
|
-
{
|
|
9082
|
-
"name": "hideIconsBreakpoint",
|
|
9083
|
-
"type": "'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | null",
|
|
9084
|
-
"defaultValue": "'medium'",
|
|
9085
|
-
"description": "Controls the container width below which icons are hidden to save space. To keep icons visible in a narrow container, use a smaller breakpoint such as `xsmall`, or set to `null` to always show icons."
|
|
9086
|
-
},
|
|
9087
9081
|
{
|
|
9088
9082
|
"name": "variant",
|
|
9089
9083
|
"type": "'inset' | 'flush'",
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-ActionList-Group-lMIPQ{list-style:none}.prc-ActionList-Group-lMIPQ:not(:first-child){margin-block-start:var(--base-size-8,.5rem)}.prc-ActionList-Group-lMIPQ:not(:first-child):has(.prc-ActionList-GroupHeadingWrap-laXcX+ul>.prc-ActionList-GroupHeadingWrap-laXcX)>.prc-ActionList-GroupHeadingWrap-laXcX{display:none}.prc-ActionList-GroupList-V5B3-{padding-inline-start:0}.prc-ActionList-GroupHeadingWrap-laXcX{color:var(--fgColor-muted,#59636e);display:flex;flex-direction:column;font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);line-height:18px;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]){background:var(--bgColor-muted,#f6f8fa);border-bottom:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);border-top:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);margin-block-end:var(--base-size-8,.5rem);margin-block-start:calc(var(--base-size-8,.5rem) - var(--borderWidth-thin,.0625rem));padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]):first-child{margin-block-start:0}.prc-ActionList-GroupHeading-STzxi{align-self:flex-start;color:var(--fgColor-muted,#59636e);font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);margin:0}.prc-ActionList-GroupHeadingWrap-laXcX[data-has-trailing-action]{align-items:center;flex-direction:row;gap:var(--base-size-8,.5rem);justify-content:space-between}.prc-ActionList-GroupHeadingWrap-laXcX[data-has-trailing-action]>.prc-ActionList-GroupHeading-STzxi{align-self:center}.prc-ActionList-GroupHeadingTrailingAction-jnb64{align-items:center;display:inline-flex;margin-inline-start:auto}
|
|
2
|
-
/*# sourceMappingURL=Group-efcb39da.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ActionList/Group.module.css.js"],"names":[],"mappings":"AAAA,4BACE,eAcF,CAZE,8CACE,2CAUF,CAJI,2KACE,YACF,CAKN,gCACE,sBACF,CAEA,uCAQE,kCAA2B,CAP3B,YAAa,CAQb,qBAAsB,CAPtB,4CAAsC,CACtC,gDAA6C,CAI7C,gBAAiB,CAIjB,wCAAiC,CADjC,uCAoBF,CAjBE,oEAIE,uCAAgC,CAEhC,uFAAqE,CADrE,oFAAkE,CAFlE,yCAAoC,CADpC,oFAAsE,CAKtE,uCAKF,CAHE,gFACE,oBACF,CAQJ,mCAKE,qBAAsB,CADtB,kCAA2B,CAF3B,4CAAsC,CACtC,gDAA6C,CAF7C,QAKF,CAEA,iEAEE,kBAAmB,CADnB,kBAAmB,CAGnB,4BAAuB,CADvB,6BAMF,CAHE,oGACE,iBACF,CAGF,iDAEE,kBAAmB,CADnB,mBAAoB,CAEpB,wBACF","file":"Group-efcb39da.css","sourcesContent":[".Group {\n list-style: none;\n\n &:not(:first-child) {\n margin-block-start: var(--base-size-8);\n\n /* If somebody tries to pass the `title` prop AND a `NavList.GroupHeading` as a child, hide the `ActionList.GroupHeading */\n /* stylelint-disable-next-line selector-max-specificity, selector-pseudo-class-disallowed-list -- scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(.GroupHeadingWrap + ul > .GroupHeadingWrap) {\n /* stylelint-disable-next-line selector-max-specificity */\n & > .GroupHeadingWrap {\n display: none;\n }\n }\n }\n}\n\n.GroupList {\n padding-inline-start: 0;\n}\n\n.GroupHeadingWrap {\n display: flex;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n\n /* line-height: var(--text-body-lineHeight-small); use when FF rolls out */\n /* stylelint-disable-next-line primer/typography */\n line-height: 18px;\n color: var(--fgColor-muted);\n flex-direction: column;\n padding-inline: var(--base-size-16);\n padding-block: var(--base-size-6);\n\n &:where([data-variant='filled']) {\n /* stylelint-disable-next-line primer/spacing */\n margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));\n margin-block-end: var(--base-size-8);\n background: var(--bgColor-muted);\n border-top: solid var(--borderWidth-thin) var(--borderColor-muted);\n border-bottom: solid var(--borderWidth-thin) var(--borderColor-muted);\n padding-inline: var(--base-size-16);\n\n &:first-child {\n margin-block-start: 0;\n }\n }\n\n /* & + ul:has(.GroupHeadingWrap) {\n outline: solid 1px red;\n } */\n}\n\n.GroupHeading {\n margin: 0;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n align-self: flex-start;\n}\n\n.GroupHeadingWrap[data-has-trailing-action] {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: var(--base-size-8);\n\n & > .GroupHeading {\n align-self: center;\n }\n}\n\n.GroupHeadingTrailingAction {\n display: inline-flex;\n align-items: center;\n margin-inline-start: auto;\n}\n"]}
|