@primer/react 38.36.0-rc.acb49cd1b → 38.36.0-rc.e29d259bd
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 +8 -0
- package/dist/ActionBar/ActionBar.js +10 -8
- package/dist/ActionList/Heading.js +2 -1
- package/dist/ActionList/Item.js +282 -277
- package/dist/ActionList/LinkItem.js +11 -3
- package/dist/ActionList/index.d.ts +3 -0
- package/dist/ActionList/shared.d.ts +4 -0
- package/dist/CounterLabel/CounterLabel.js +5 -2
- package/dist/Details/Details.js +2 -1
- package/dist/Dialog/Dialog.js +3 -2
- package/dist/NavList/NavList.d.ts +2 -0
- package/dist/NavList/NavList.js +15 -11
- package/dist/PageHeader/PageHeader.js +2 -1
- package/dist/Portal/Portal.js +91 -29
- package/dist/SelectPanel/SelectPanel.js +26 -25
- package/dist/TooltipV2/Tooltip.js +3 -2
- package/dist/TreeView/TreeView.js +0 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts +3 -2
- package/dist/UnderlineNav/UnderlineNav.js +1 -1
- package/dist/deprecated/ActionList/List.js +2 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +7 -4
- package/dist/hooks/useFocusZone.js +2 -1
- package/dist/hooks/useMenuInitialFocus.js +72 -57
- package/generated/components.json +7 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
- [#8212](https://github.com/primer/react/pull/8212) [`9ac9343`](https://github.com/primer/react/commit/9ac9343a70fd0f70413a42cd27baf562a74dd4fc) Thanks [@mattcosta7](https://github.com/mattcosta7)! - ThemeProvider: Add a CSS-variable-based implementation to `@primer/react/next`
|
|
8
8
|
and deprecate the legacy JavaScript theme implementation.
|
|
9
9
|
|
|
10
|
+
- [#8303](https://github.com/primer/react/pull/8303) [`a88cc69`](https://github.com/primer/react/commit/a88cc693539e2b9aa836623c737e860e7203e73a) Thanks [@TylerJDev](https://github.com/TylerJDev)! - NavList: Add a `tooltipText` prop to items
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
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
|
+
- [#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
|
|
17
|
+
|
|
10
18
|
## 38.35.1
|
|
11
19
|
|
|
12
20
|
### Patch Changes
|
|
@@ -133,14 +133,15 @@ 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]);
|
|
136
140
|
return /*#__PURE__*/ jsx(IconButton, {
|
|
137
141
|
"aria-disabled": disabled,
|
|
138
142
|
ref: mergedRef,
|
|
139
143
|
size,
|
|
140
|
-
onClick:
|
|
141
|
-
if (disabled) return;
|
|
142
|
-
onClick === null || onClick === void 0 || onClick(event);
|
|
143
|
-
}, [disabled, onClick]),
|
|
144
|
+
onClick: clickHandler,
|
|
144
145
|
...props,
|
|
145
146
|
variant: "invisible",
|
|
146
147
|
"data-overflowing": dataOverflowingAttr
|
|
@@ -163,14 +164,15 @@ const ActionBarButton = /*#__PURE__*/ forwardRef(({ disabled, onClick, ...props
|
|
|
163
164
|
disabled,
|
|
164
165
|
onClick
|
|
165
166
|
]));
|
|
167
|
+
const clickHandler = useCallback((event) => {
|
|
168
|
+
if (disabled) return;
|
|
169
|
+
onClick === null || onClick === void 0 || onClick(event);
|
|
170
|
+
}, [disabled, onClick]);
|
|
166
171
|
return /*#__PURE__*/ jsx(ButtonComponent, {
|
|
167
172
|
"aria-disabled": disabled,
|
|
168
173
|
ref: mergedRef,
|
|
169
174
|
size,
|
|
170
|
-
onClick:
|
|
171
|
-
if (disabled) return;
|
|
172
|
-
onClick === null || onClick === void 0 || onClick(event);
|
|
173
|
-
}, [disabled, onClick]),
|
|
175
|
+
onClick: clickHandler,
|
|
174
176
|
...props,
|
|
175
177
|
variant: "invisible",
|
|
176
178
|
"data-overflowing": dataOverflowingAttr
|
|
@@ -37,7 +37,8 @@ const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
37
37
|
t1 = $[6];
|
|
38
38
|
}
|
|
39
39
|
const visuallyHidden = t1 === void 0 ? false : t1;
|
|
40
|
-
const
|
|
40
|
+
const innerRef = React.useRef(null);
|
|
41
|
+
const mergedRef = useMergedRefs(forwardedRef, innerRef);
|
|
41
42
|
const { headingId, variant: listVariant } = React.useContext(ListContext);
|
|
42
43
|
const { container } = React.useContext(ActionListContainerContext);
|
|
43
44
|
!(container !== "ActionMenu") && invariant(false, "ActionList.Heading shouldn't be used within an ActionMenu container. Menus are labelled by the menu button's name.");
|