@primer/react 0.0.0-20260309133316 → 0.0.0-20260309133548

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,6 +1,6 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260309133316
3
+ ## 0.0.0-20260309133548
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -22,12 +22,8 @@
22
22
 
23
23
  - [#7617](https://github.com/primer/react/pull/7617) [`79c855a`](https://github.com/primer/react/commit/79c855abeb6f46d3fefafb236f00ea65dfcd1ed4) Thanks [@llastflowers](https://github.com/llastflowers)! - Push margin-top of TimelineBody +1px
24
24
 
25
- - [#7635](https://github.com/primer/react/pull/7635) [`74762e2`](https://github.com/primer/react/commit/74762e265a44b4fa46fcb4db8fd5194cb81b14c4) Thanks [@iansan5653](https://github.com/iansan5653)! - Fix(useRefObjectAsForwardedRef): fix ref failing to update when target changes
26
-
27
25
  - [#7550](https://github.com/primer/react/pull/7550) [`9585669`](https://github.com/primer/react/commit/958566907a580b54b484ff2339b32315b8a3b4b7) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(Spinner): replace Web Animations API with CSS animation-delay sync
28
26
 
29
- - [#7631](https://github.com/primer/react/pull/7631) [`230d875`](https://github.com/primer/react/commit/230d875ed78cb501ad942c997a1568b3504d3b06) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Add test to validate that the `muted` prop is not leaked as a bare DOM attribute on `Link`
30
-
31
27
  - [#7618](https://github.com/primer/react/pull/7618) [`17a103c`](https://github.com/primer/react/commit/17a103c0726ff2903e008a69dfd141461f99591f) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - TextInputWithTokens: announce selected token values for screen readers.
32
28
 
33
29
  - [#7588](https://github.com/primer/react/pull/7588) [`e649da3`](https://github.com/primer/react/commit/e649da3c89b38f477fb574acf5bb06a49b41ee9d) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - ToggleSwitch: Updated with a 1px space around the knob to work better with updated primitives.
package/dist/Link/Link.js CHANGED
@@ -10,7 +10,6 @@ const UnwrappedLink = (props, ref) => {
10
10
  as: Component = 'a',
11
11
  className,
12
12
  inline,
13
- muted,
14
13
  hoverColor,
15
14
  ...restProps
16
15
  } = props;
@@ -33,7 +32,7 @@ const UnwrappedLink = (props, ref) => {
33
32
  }
34
33
  return /*#__PURE__*/jsx(Component, {
35
34
  className: clsx(className, classes.Link),
36
- "data-muted": muted,
35
+ "data-muted": restProps.muted,
37
36
  "data-inline": inline,
38
37
  "data-hover-color": hoverColor,
39
38
  ...restProps,
@@ -1 +1 @@
1
- {"version":3,"file":"useRefObjectAsForwardedRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useRefObjectAsForwardedRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAGlD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAEjH"}
1
+ {"version":3,"file":"useRefObjectAsForwardedRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useRefObjectAsForwardedRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAGlD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAIjH"}
@@ -9,7 +9,7 @@ import { useImperativeHandle } from 'react';
9
9
  * **NOTE**: The `refObject` should be passed to the underlying element, NOT the `forwardedRef`.
10
10
  */
11
11
  function useRefObjectAsForwardedRef(forwardedRef, refObject) {
12
- const $ = c(2);
12
+ const $ = c(4);
13
13
  let t0;
14
14
  if ($[0] !== refObject.current) {
15
15
  t0 = () => refObject.current;
@@ -18,7 +18,15 @@ function useRefObjectAsForwardedRef(forwardedRef, refObject) {
18
18
  } else {
19
19
  t0 = $[1];
20
20
  }
21
- useImperativeHandle(forwardedRef, t0);
21
+ let t1;
22
+ if ($[2] !== refObject) {
23
+ t1 = [refObject];
24
+ $[2] = refObject;
25
+ $[3] = t1;
26
+ } else {
27
+ t1 = $[3];
28
+ }
29
+ useImperativeHandle(forwardedRef, t0, t1);
22
30
  }
23
31
 
24
32
  export { useRefObjectAsForwardedRef };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260309133316",
4
+ "version": "0.0.0-20260309133548",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",