@primer/react 38.31.0-rc.81bdc210a → 38.31.0-rc.f96563b64
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 +2 -0
- package/dist/ActionList/Heading.js +25 -35
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
### Patch Changes
|
|
10
10
|
|
|
11
|
+
- [#8066](https://github.com/primer/react/pull/8066) [`dd66aa2`](https://github.com/primer/react/commit/dd66aa27611f7ad56adb7429b50813d6af5a01d7) Thanks [@janmaarten-a11y](https://github.com/janmaarten-a11y)! - Fix invalid HTML nesting in `ActionList.Heading` by applying the visually-hidden styles directly to the heading element instead of wrapping it in a `span`.
|
|
12
|
+
|
|
11
13
|
- [#8054](https://github.com/primer/react/pull/8054) [`1775f2e`](https://github.com/primer/react/commit/1775f2e8b968d59a1189456b14cff15e527937cb) Thanks [@joshblack](https://github.com/joshblack)! - AvatarStack: Improve rendering performance with React Compiler support
|
|
12
14
|
|
|
13
15
|
- [#8053](https://github.com/primer/react/pull/8053) [`b2151ae`](https://github.com/primer/react/commit/b2151ae2d5719f09efb0b89731e52e4ca50e8bf1) Thanks [@joshblack](https://github.com/joshblack)! - Checkbox, CheckboxGroup, and RadioGroup: Improve rendering performance with React Compiler support
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
2
2
|
import { invariant } from "../utils/invariant.js";
|
|
3
|
-
import
|
|
3
|
+
import _VisuallyHidden_module_css_default from "../_VisuallyHidden.module.css.js";
|
|
4
4
|
import { ActionListContainerContext } from "./ActionListContainerContext.js";
|
|
5
5
|
import Heading$1 from "../Heading/Heading.js";
|
|
6
6
|
import { ListContext } from "./shared.js";
|
|
@@ -12,7 +12,7 @@ import React, { forwardRef } from "react";
|
|
|
12
12
|
//#region src/ActionList/Heading.tsx
|
|
13
13
|
const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
14
14
|
var _props$id;
|
|
15
|
-
const $ = c(
|
|
15
|
+
const $ = c(19);
|
|
16
16
|
let as;
|
|
17
17
|
let children;
|
|
18
18
|
let className;
|
|
@@ -41,48 +41,38 @@ const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
41
41
|
const { headingId, variant: listVariant } = React.useContext(ListContext);
|
|
42
42
|
const { container } = React.useContext(ActionListContainerContext);
|
|
43
43
|
!(container !== "ActionMenu") && invariant(false, "ActionList.Heading shouldn't be used within an ActionMenu container. Menus are labelled by the menu button's name.");
|
|
44
|
-
const t2 =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
t4 = clsx(className, Heading_module_css_default.ActionListHeader);
|
|
44
|
+
const t2 = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : headingId;
|
|
45
|
+
let t3;
|
|
46
|
+
if ($[7] !== className || $[8] !== visuallyHidden) {
|
|
47
|
+
t3 = clsx(className, Heading_module_css_default.ActionListHeader, { [_VisuallyHidden_module_css_default.InternalVisuallyHidden]: visuallyHidden });
|
|
49
48
|
$[7] = className;
|
|
50
|
-
$[8] =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
$[8] = visuallyHidden;
|
|
50
|
+
$[9] = t3;
|
|
51
|
+
} else t3 = $[9];
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[10] !== as || $[11] !== children || $[12] !== listVariant || $[13] !== mergedRef || $[14] !== props || $[15] !== size || $[16] !== t2 || $[17] !== t3) {
|
|
54
|
+
t4 = /*#__PURE__*/ jsx(Heading$1, {
|
|
55
55
|
as,
|
|
56
56
|
variant: size,
|
|
57
57
|
ref: mergedRef,
|
|
58
|
-
id:
|
|
59
|
-
className:
|
|
58
|
+
id: t2,
|
|
59
|
+
className: t3,
|
|
60
60
|
"data-component": "ActionList.Heading",
|
|
61
61
|
"data-list-variant": listVariant,
|
|
62
62
|
...props,
|
|
63
63
|
children
|
|
64
64
|
});
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
} else
|
|
75
|
-
|
|
76
|
-
if ($[18] !== t2 || $[19] !== t5) {
|
|
77
|
-
t6 = /*#__PURE__*/ jsx(VisuallyHidden, {
|
|
78
|
-
isVisible: t2,
|
|
79
|
-
children: t5
|
|
80
|
-
});
|
|
81
|
-
$[18] = t2;
|
|
82
|
-
$[19] = t5;
|
|
83
|
-
$[20] = t6;
|
|
84
|
-
} else t6 = $[20];
|
|
85
|
-
return t6;
|
|
65
|
+
$[10] = as;
|
|
66
|
+
$[11] = children;
|
|
67
|
+
$[12] = listVariant;
|
|
68
|
+
$[13] = mergedRef;
|
|
69
|
+
$[14] = props;
|
|
70
|
+
$[15] = size;
|
|
71
|
+
$[16] = t2;
|
|
72
|
+
$[17] = t3;
|
|
73
|
+
$[18] = t4;
|
|
74
|
+
} else t4 = $[18];
|
|
75
|
+
return t4;
|
|
86
76
|
});
|
|
87
77
|
Heading.displayName = "ActionList.Heading";
|
|
88
78
|
Heading.__SLOT__ = Symbol("ActionList.Heading");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "38.31.0-rc.
|
|
4
|
+
"version": "38.31.0-rc.f96563b64",
|
|
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",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@oddbird/popover-polyfill": "^0.5.2",
|
|
82
82
|
"@primer/behaviors": "^1.10.3",
|
|
83
83
|
"@primer/live-region-element": "^0.8.0",
|
|
84
|
-
"@primer/octicons-react": "^19.
|
|
84
|
+
"@primer/octicons-react": "^19.28.1",
|
|
85
85
|
"@primer/primitives": "10.x || 11.x",
|
|
86
86
|
"@tanstack/react-virtual": "^3.13.18",
|
|
87
87
|
"clsx": "^2.1.1",
|