@primer/react 38.19.0-rc.9add2ea76 → 38.19.0-rc.b42304a52

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
@@ -12,7 +12,9 @@
12
12
 
13
13
  - [#7652](https://github.com/primer/react/pull/7652) [`5d19e2b`](https://github.com/primer/react/commit/5d19e2bb5bbd444f2e82d98eef300c221863941c) Thanks [@owenniblock](https://github.com/owenniblock)! - useAnchoredPosition: recalculate overlay position when any scrollable ancestor (or the window) is scrolled.
14
14
 
15
- - [#7638](https://github.com/primer/react/pull/7638) [`f04e85d`](https://github.com/primer/react/commit/f04e85df536cd6e8047f70b070bd3cf7c0961f92) Thanks [@iansan5653](https://github.com/iansan5653)! - Update internal implementations of combined refs to improve performance and add support for React 19 callback refs
15
+ - [#7707](https://github.com/primer/react/pull/7707) [`6431bfe`](https://github.com/primer/react/commit/6431bfecd72e24db1dfa90b02f8a42834e63843b) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Fix anchor-name not being set on the anchor element when SelectPanel is opened in Copilot code agent.
16
+
17
+ - [#7633](https://github.com/primer/react/pull/7633) [`a107d39`](https://github.com/primer/react/commit/a107d398e0574b5f8085485c96b27a168061eb50) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Graduate `primer_react_css_has_selector_perf` feature flag: the CSS `:has()` performance optimization (`body[data-dialog-scroll-disabled]`) is now the default behavior for Dialog scroll disabling
16
18
 
17
19
  - [#7695](https://github.com/primer/react/pull/7695) [`780fc3d`](https://github.com/primer/react/commit/780fc3d7b52fd0f9b63f313af6355398180a0118) Thanks [@mattcosta7](https://github.com/mattcosta7)! - perf(ThemeProvider): Reduce unnecessary renders and effect cascades
18
20
 
@@ -21,6 +23,8 @@
21
23
  - Cache `getServerHandoff` DOM read + JSON.parse per ID (runs once, not on every call)
22
24
  - Memoize context value object to prevent unnecessary re-renders of all consumers
23
25
 
26
+ - [#7706](https://github.com/primer/react/pull/7706) [`fd8910a`](https://github.com/primer/react/commit/fd8910abff851f43d19805ceaa439a9a18c4f226) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - ActionList.Item: fix inline descriptions being referenced via `aria-labelledby` instead of `aria-describedby`
27
+
24
28
  ## 38.18.0
25
29
 
26
30
  ### Minor Changes
@@ -10,7 +10,7 @@ import styles from './ActionBar.module.css.js';
10
10
  import { clsx } from 'clsx';
11
11
  import { createDescendantRegistry } from '../utils/descendant-registry.js';
12
12
  import { jsxs, jsx } from 'react/jsx-runtime';
13
- import { useMergedRefs } from '../hooks/useMergedRefs.js';
13
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
14
14
  import { FocusKeys } from '@primer/behaviors';
15
15
  import { ActionMenu } from '../ActionMenu/ActionMenu.js';
16
16
 
@@ -423,7 +423,7 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
423
423
  ...props
424
424
  }, forwardedRef) => {
425
425
  const ref = useRef(null);
426
- const mergedRef = useMergedRefs(ref, forwardedRef);
426
+ useRefObjectAsForwardedRef(forwardedRef, ref);
427
427
  const {
428
428
  size,
429
429
  isVisibleChild
@@ -453,7 +453,7 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
453
453
  if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
454
454
  return /*#__PURE__*/jsx(IconButton, {
455
455
  "aria-disabled": disabled,
456
- ref: mergedRef,
456
+ ref: ref,
457
457
  size: size,
458
458
  onClick: clickHandler,
459
459
  ...props,
@@ -7,12 +7,12 @@ import { invariant } from '../utils/invariant.js';
7
7
  import { clsx } from 'clsx';
8
8
  import classes from './Heading.module.css.js';
9
9
  import { jsx } from 'react/jsx-runtime';
10
- import { useMergedRefs } from '../hooks/useMergedRefs.js';
10
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
11
11
  import Heading$1 from '../Heading/Heading.js';
12
12
 
13
13
  const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
14
14
  var _props$id;
15
- const $ = c(21);
15
+ const $ = c(20);
16
16
  let as;
17
17
  let children;
18
18
  let className;
@@ -45,7 +45,7 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
45
45
  }
46
46
  const visuallyHidden = t1 === undefined ? false : t1;
47
47
  const innerRef = React.useRef(null);
48
- const mergedRef = useMergedRefs(forwardedRef, innerRef);
48
+ useRefObjectAsForwardedRef(forwardedRef, innerRef);
49
49
  const {
50
50
  headingId,
51
51
  variant: listVariant
@@ -65,11 +65,11 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
65
65
  t4 = $[8];
66
66
  }
67
67
  let t5;
68
- if ($[9] !== as || $[10] !== children || $[11] !== listVariant || $[12] !== mergedRef || $[13] !== props || $[14] !== size || $[15] !== t3 || $[16] !== t4) {
68
+ if ($[9] !== as || $[10] !== children || $[11] !== listVariant || $[12] !== props || $[13] !== size || $[14] !== t3 || $[15] !== t4) {
69
69
  t5 = /*#__PURE__*/jsx(Heading$1, {
70
70
  as: as,
71
71
  variant: size,
72
- ref: mergedRef,
72
+ ref: innerRef,
73
73
  id: t3,
74
74
  className: t4,
75
75
  "data-list-variant": listVariant,
@@ -79,26 +79,25 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
79
79
  $[9] = as;
80
80
  $[10] = children;
81
81
  $[11] = listVariant;
82
- $[12] = mergedRef;
83
- $[13] = props;
84
- $[14] = size;
85
- $[15] = t3;
86
- $[16] = t4;
87
- $[17] = t5;
82
+ $[12] = props;
83
+ $[13] = size;
84
+ $[14] = t3;
85
+ $[15] = t4;
86
+ $[16] = t5;
88
87
  } else {
89
- t5 = $[17];
88
+ t5 = $[16];
90
89
  }
91
90
  let t6;
92
- if ($[18] !== t2 || $[19] !== t5) {
91
+ if ($[17] !== t2 || $[18] !== t5) {
93
92
  t6 = /*#__PURE__*/jsx(VisuallyHidden, {
94
93
  isVisible: t2,
95
94
  children: t5
96
95
  });
97
- $[18] = t2;
98
- $[19] = t5;
99
- $[20] = t6;
96
+ $[17] = t2;
97
+ $[18] = t5;
98
+ $[19] = t6;
100
99
  } else {
101
- t6 = $[20];
100
+ t6 = $[19];
102
101
  }
103
102
  return t6;
104
103
  });