@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 +5 -1
- package/dist/ActionBar/ActionBar.js +3 -3
- package/dist/ActionList/Heading.js +16 -17
- package/dist/ActionList/Item.js +169 -171
- package/dist/AnchoredOverlay/AnchoredOverlay.js +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +3 -3
- package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +4 -3
- package/dist/Dialog/{Dialog-b577691f.css → Dialog-f9bb927a.css} +2 -2
- package/dist/Dialog/Dialog-f9bb927a.css.map +1 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +9 -21
- package/dist/Dialog/Dialog.module.css.js +2 -2
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +0 -1
- package/dist/FeatureFlags/FeatureFlags.d.ts +0 -6
- package/dist/FeatureFlags/FeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/FeatureFlags.js +32 -41
- package/dist/Heading/Heading.js +3 -3
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +4 -3
- package/dist/Overlay/Overlay.js +20 -21
- package/dist/PageLayout/PageLayout.js +5 -5
- package/dist/TextInputWithTokens/TextInputWithTokens.js +90 -91
- package/dist/deprecated/DialogV1/Dialog.js +9 -10
- package/dist/hooks/useMergedRefs.d.ts +4 -4
- package/dist/hooks/useMergedRefs.js +4 -4
- package/package.json +1 -1
- package/dist/Dialog/Dialog-b577691f.css.map +0 -1
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
|
-
- [#
|
|
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 {
|
|
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
|
-
|
|
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:
|
|
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 {
|
|
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(
|
|
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
|
-
|
|
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] !==
|
|
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:
|
|
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] =
|
|
83
|
-
$[13] =
|
|
84
|
-
$[14] =
|
|
85
|
-
$[15] =
|
|
86
|
-
$[16] =
|
|
87
|
-
$[17] = t5;
|
|
82
|
+
$[12] = props;
|
|
83
|
+
$[13] = size;
|
|
84
|
+
$[14] = t3;
|
|
85
|
+
$[15] = t4;
|
|
86
|
+
$[16] = t5;
|
|
88
87
|
} else {
|
|
89
|
-
t5 = $[
|
|
88
|
+
t5 = $[16];
|
|
90
89
|
}
|
|
91
90
|
let t6;
|
|
92
|
-
if ($[
|
|
91
|
+
if ($[17] !== t2 || $[18] !== t5) {
|
|
93
92
|
t6 = /*#__PURE__*/jsx(VisuallyHidden, {
|
|
94
93
|
isVisible: t2,
|
|
95
94
|
children: t5
|
|
96
95
|
});
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
96
|
+
$[17] = t2;
|
|
97
|
+
$[18] = t5;
|
|
98
|
+
$[19] = t6;
|
|
100
99
|
} else {
|
|
101
|
-
t6 = $[
|
|
100
|
+
t6 = $[19];
|
|
102
101
|
}
|
|
103
102
|
return t6;
|
|
104
103
|
});
|