@primer/react 0.0.0-20260818135516 → 0.0.0-20260819123220
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
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260819123220
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#8320](https://github.com/primer/react/pull/8320) [`d711274`](https://github.com/primer/react/commit/d7112747cee1fab22dfb0030bd455a971dcb3dfd) Thanks [@mattcosta7](https://github.com/mattcosta7)! - ActionBar: Add `activeAnchorRef` to action buttons for overlays that need the action's currently visible trigger. Anchored overlay render functions now receive their reactive anchor ref as
|
|
7
|
+
- [#8320](https://github.com/primer/react/pull/8320) [`d711274`](https://github.com/primer/react/commit/d7112747cee1fab22dfb0030bd455a971dcb3dfd) Thanks [@mattcosta7](https://github.com/mattcosta7)! - ActionBar: Add `activeAnchorRef` to action buttons for overlays that need the action's currently visible trigger. Anchored overlay render functions now receive their reactive anchor ref as an optional second argument.
|
|
8
8
|
|
|
9
9
|
- [#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`
|
|
10
10
|
and deprecate the legacy JavaScript theme implementation.
|
|
@@ -10,9 +10,10 @@ import { AnchorPosition, PositionSettings } from "@primer/behaviors";
|
|
|
10
10
|
interface AnchoredOverlayPropsWithAnchor {
|
|
11
11
|
/**
|
|
12
12
|
* A custom function component used to render the anchor element.
|
|
13
|
+
* The optional second argument is a reactive ref for the current anchor element.
|
|
13
14
|
* Will receive the selected text as `children` prop when an item is activated.
|
|
14
15
|
*/
|
|
15
|
-
renderAnchor: <T extends Omit<React.HTMLAttributes<HTMLElement>, 'aria-label' | 'aria-labelledby'>>(props: T, anchorRef
|
|
16
|
+
renderAnchor: <T extends Omit<React.HTMLAttributes<HTMLElement>, 'aria-label' | 'aria-labelledby'>>(props: T, anchorRef?: React.RefCallback<HTMLElement>) => JSX.Element;
|
|
16
17
|
/**
|
|
17
18
|
* An override to the internal ref that will be spread on to the renderAnchor
|
|
18
19
|
*/
|
|
@@ -918,9 +918,9 @@
|
|
|
918
918
|
},
|
|
919
919
|
{
|
|
920
920
|
"name": "renderAnchor",
|
|
921
|
-
"type": "<T extends React.HTMLAttributes<HTMLElement>>(props: T, anchorRef
|
|
921
|
+
"type": "<T extends React.HTMLAttributes<HTMLElement>>(props: T, anchorRef?: React.RefCallback<HTMLElement>) => JSX.Element",
|
|
922
922
|
"defaultValue": "",
|
|
923
|
-
"description": "A custom function component used to render the anchor element. The second argument is a reactive ref for the current anchor element. When renderAnchor is null, an anchorRef is required."
|
|
923
|
+
"description": "A custom function component used to render the anchor element. The optional second argument is a reactive ref for the current anchor element. When renderAnchor is null, an anchorRef is required."
|
|
924
924
|
},
|
|
925
925
|
{
|
|
926
926
|
"name": "anchorRef",
|
package/package.json
CHANGED