@primer/react 0.0.0-20260813141315 → 0.0.0-20260814130501
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 -23
- package/dist/ActionBar/ActionBar.js +8 -10
- package/dist/ActionList/Group-efcb39da.css +2 -0
- package/dist/ActionList/Group-efcb39da.css.map +1 -0
- package/dist/ActionList/Group.module.css.js +2 -2
- package/dist/ActionList/Heading.js +1 -2
- package/dist/ActionList/Item.js +277 -282
- package/dist/ActionList/LinkItem.js +3 -11
- package/dist/ActionList/index.d.ts +0 -3
- package/dist/ActionList/shared.d.ts +0 -4
- package/dist/AvatarStack/{AvatarStack-e6a99916.css → AvatarStack-9bb5649f.css} +2 -2
- package/dist/AvatarStack/AvatarStack-9bb5649f.css.map +1 -0
- package/dist/AvatarStack/AvatarStack.module.css.js +1 -1
- package/dist/CounterLabel/CounterLabel.js +2 -5
- package/dist/Details/Details.js +1 -2
- package/dist/Dialog/Dialog.js +2 -3
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/NavList/NavList.d.ts +2 -4
- package/dist/NavList/NavList.js +45 -87
- package/dist/PageHeader/PageHeader.js +1 -2
- package/dist/Popover/Popover.d.ts +0 -1
- package/dist/Popover/Popover.js +47 -84
- package/dist/Portal/Portal.js +29 -91
- package/dist/Radio/Radio.js +1 -1
- package/dist/SelectPanel/SelectPanel.js +25 -26
- package/dist/ThemeProvider.d.ts +0 -3
- package/dist/ThemeProvider.js +129 -39
- package/dist/TooltipV2/Tooltip.js +2 -3
- package/dist/TreeView/TreeView.js +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/dist/UnderlineNav/UnderlineNav.js +1 -1
- package/dist/deprecated/ActionList/List.js +1 -2
- package/dist/experimental/SelectPanel2/SelectPanel.js +4 -7
- package/dist/experimental/Tabs/Tabs.js +33 -19
- package/dist/experimental/Tabs/types.d.ts +6 -0
- package/dist/experimental/Tabs/useTab.js +6 -1
- package/dist/experimental/Tabs/useTabList.js +29 -22
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts +38 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +69 -18
- package/dist/hooks/useFocusZone.js +1 -2
- package/dist/hooks/useMenuInitialFocus.js +57 -72
- package/dist/legacy-theme/ts/color-schemes.js +3942 -3942
- package/dist/next/index.d.ts +1 -4
- package/dist/next/index.js +1 -3
- package/dist/theme.d.ts +54 -16
- package/dist/useTheme.d.ts +14 -2
- package/generated/components.json +56 -14
- package/generated/hooks.json +7 -2
- package/package.json +10 -8
- package/dist/ActionList/Group-d89306a8.css +0 -2
- package/dist/ActionList/Group-d89306a8.css.map +0 -1
- package/dist/AvatarStack/AvatarStack-e6a99916.css.map +0 -1
- package/dist/ThemeContext.d.ts +0 -20
- package/dist/internal/components/ThemeProviderBase.js +0 -50
- package/dist/internal/hooks/useThemeProvider.js +0 -71
- package/dist/next/ThemeProvider.d.ts +0 -7
- package/dist/next/ThemeProvider.js +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,36 +1,15 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260814130501
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
8
|
-
and deprecate the legacy JavaScript theme implementation.
|
|
9
|
-
|
|
10
|
-
- [#8303](https://github.com/primer/react/pull/8303) [`c4f1b35`](https://github.com/primer/react/commit/c4f1b35b258020461561d17b2c066f8766feb897) Thanks [@TylerJDev](https://github.com/TylerJDev)! - NavList: Add a `tooltipText` prop to items
|
|
7
|
+
- [#8233](https://github.com/primer/react/pull/8233) [`6cbfecc`](https://github.com/primer/react/commit/6cbfecc13c8f9ae4315c84774752d4408f9d2616) Thanks [@rickyzhangca](https://github.com/rickyzhangca)! - UnderlinePanels: add controlled `value`/`defaultValue`/`onChange` and `activationMode` props, keyed to a per-`Tab`/`Panel` `value`, for data-driven tabs. Behind the `primer_react_underline_panels_controlled` feature flag; the existing `aria-selected`/`onSelect` API is unchanged.
|
|
11
8
|
|
|
12
9
|
### Patch Changes
|
|
13
10
|
|
|
14
|
-
- [#8276](https://github.com/primer/react/pull/8276) [`5069f8a`](https://github.com/primer/react/commit/5069f8a7cb95544ce14122e97d67c8a1279f8a08) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Portal: Render nothing while server rendering and during hydration instead of accessing the DOM during render, fixing server rendering support. Client-only renders are unchanged and still mount portaled content in the same commit.
|
|
15
|
-
|
|
16
11
|
- Fake entry to force publishing
|
|
17
12
|
|
|
18
|
-
- [#8260](https://github.com/primer/react/pull/8260) [`24d0831`](https://github.com/primer/react/commit/24d0831d34b13e3b4bac8afcfa2ccd5795cd9a9d) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - UnderlineNav: Keep item icons visible by default at the medium breakpoint and above
|
|
19
|
-
|
|
20
|
-
## 38.35.1
|
|
21
|
-
|
|
22
|
-
### Patch Changes
|
|
23
|
-
|
|
24
|
-
- [#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
|
|
25
|
-
|
|
26
|
-
- [#8273](https://github.com/primer/react/pull/8273) [`0c1e401`](https://github.com/primer/react/commit/0c1e401b6b0d57f95f8115ea90af78281751a766) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - NavList: Exclude group headings from navigation list item counts
|
|
27
|
-
|
|
28
|
-
## 38.35.0
|
|
29
|
-
|
|
30
|
-
### Minor Changes
|
|
31
|
-
|
|
32
|
-
- [#8253](https://github.com/primer/react/pull/8253) [`da3df9a`](https://github.com/primer/react/commit/da3df9aba582c7bcedbe69f1bdc5ab64ac90d32b) Thanks [@llastflowers](https://github.com/llastflowers)! - Add default Esc-to-dismiss support to `Popover` component
|
|
33
|
-
|
|
34
13
|
## 38.34.0
|
|
35
14
|
|
|
36
15
|
### Minor Changes
|
|
@@ -133,15 +133,14 @@ const ActionBarIconButton = /*#__PURE__*/ forwardRef(({ disabled, onClick, ...pr
|
|
|
133
133
|
disabled,
|
|
134
134
|
onClick
|
|
135
135
|
]));
|
|
136
|
-
const clickHandler = useCallback((event) => {
|
|
137
|
-
if (disabled) return;
|
|
138
|
-
onClick === null || onClick === void 0 || onClick(event);
|
|
139
|
-
}, [disabled, onClick]);
|
|
140
136
|
return /*#__PURE__*/ jsx(IconButton, {
|
|
141
137
|
"aria-disabled": disabled,
|
|
142
138
|
ref: mergedRef,
|
|
143
139
|
size,
|
|
144
|
-
onClick:
|
|
140
|
+
onClick: useCallback((event) => {
|
|
141
|
+
if (disabled) return;
|
|
142
|
+
onClick === null || onClick === void 0 || onClick(event);
|
|
143
|
+
}, [disabled, onClick]),
|
|
145
144
|
...props,
|
|
146
145
|
variant: "invisible",
|
|
147
146
|
"data-overflowing": dataOverflowingAttr
|
|
@@ -164,15 +163,14 @@ const ActionBarButton = /*#__PURE__*/ forwardRef(({ disabled, onClick, ...props
|
|
|
164
163
|
disabled,
|
|
165
164
|
onClick
|
|
166
165
|
]));
|
|
167
|
-
const clickHandler = useCallback((event) => {
|
|
168
|
-
if (disabled) return;
|
|
169
|
-
onClick === null || onClick === void 0 || onClick(event);
|
|
170
|
-
}, [disabled, onClick]);
|
|
171
166
|
return /*#__PURE__*/ jsx(ButtonComponent, {
|
|
172
167
|
"aria-disabled": disabled,
|
|
173
168
|
ref: mergedRef,
|
|
174
169
|
size,
|
|
175
|
-
onClick:
|
|
170
|
+
onClick: useCallback((event) => {
|
|
171
|
+
if (disabled) return;
|
|
172
|
+
onClick === null || onClick === void 0 || onClick(event);
|
|
173
|
+
}, [disabled, onClick]),
|
|
176
174
|
...props,
|
|
177
175
|
variant: "invisible",
|
|
178
176
|
"data-overflowing": dataOverflowingAttr
|
|
@@ -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-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 */
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./Group-
|
|
1
|
+
import "./Group-efcb39da.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
|
-
"GroupList": "prc-ActionList-GroupList-V5B3-",
|
|
6
5
|
"GroupHeadingWrap": "prc-ActionList-GroupHeadingWrap-laXcX",
|
|
6
|
+
"GroupList": "prc-ActionList-GroupList-V5B3-",
|
|
7
7
|
"GroupHeading": "prc-ActionList-GroupHeading-STzxi",
|
|
8
8
|
"GroupHeadingTrailingAction": "prc-ActionList-GroupHeadingTrailingAction-jnb64"
|
|
9
9
|
};
|
|
@@ -37,8 +37,7 @@ const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
37
37
|
t1 = $[6];
|
|
38
38
|
}
|
|
39
39
|
const visuallyHidden = t1 === void 0 ? false : t1;
|
|
40
|
-
const
|
|
41
|
-
const mergedRef = useMergedRefs(forwardedRef, innerRef);
|
|
40
|
+
const mergedRef = useMergedRefs(forwardedRef, React.useRef(null));
|
|
42
41
|
const { headingId, variant: listVariant } = React.useContext(ListContext);
|
|
43
42
|
const { container } = React.useContext(ActionListContainerContext);
|
|
44
43
|
!(container !== "ActionMenu") && invariant(false, "ActionList.Heading shouldn't be used within an ActionMenu container. Menus are labelled by the menu button's name.");
|