Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/little-apples-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Update SSRProvider, useSSRSafeId to use the native React 18 useId() instead of @react-aria/ssr
5 changes: 0 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ module.exports = {
'error',
{
paths: [
{
name: '@react-aria/ssr',
importNames: ['useSSRSafeId'],
message: 'Please use the `useId` hook from `src/hooks/useId.ts` instead',
},
{
name: 'react',
importNames: ['useLayoutEffect'],
Expand Down
23 changes: 2 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
"@primer/behaviors": "^1.5.1",
"@primer/octicons-react": "^19.8.0",
"@primer/primitives": "^7.11.11",
"@react-aria/ssr": "^3.5.0",
"@styled-system/css": "^5.1.5",
"@styled-system/props": "^5.1.5",
"@styled-system/theme-get": "^5.1.2",
Expand Down
78 changes: 39 additions & 39 deletions src/NavList/__snapshots__/NavList.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ exports[`NavList renders a simple list 1`] = `
>
<a
aria-current="page"
aria-labelledby="react-aria-2--label "
aria-labelledby=":r1:--label "
class="c3 c4"
href="/"
id="react-aria-2"
id=":r1:"
tabindex="0"
>
<div
Expand All @@ -325,7 +325,7 @@ exports[`NavList renders a simple list 1`] = `
>
<span
class="c6"
id="react-aria-2--label"
id=":r1:--label"
>
Home
</span>
Expand All @@ -336,10 +336,10 @@ exports[`NavList renders a simple list 1`] = `
class="c1 c7"
>
<a
aria-labelledby="react-aria-3--label "
aria-labelledby=":r2:--label "
class="c3 c4"
href="/about"
id="react-aria-3"
id=":r2:"
tabindex="0"
>
<div
Expand All @@ -348,7 +348,7 @@ exports[`NavList renders a simple list 1`] = `
>
<span
class="c6"
id="react-aria-3--label"
id=":r2:--label"
>
About
</span>
Expand All @@ -359,10 +359,10 @@ exports[`NavList renders a simple list 1`] = `
class="c1 c7"
>
<a
aria-labelledby="react-aria-4--label "
aria-labelledby=":r3:--label "
class="c3 c4"
href="/contact"
id="react-aria-4"
id=":r3:"
tabindex="0"
>
<div
Expand All @@ -371,7 +371,7 @@ exports[`NavList renders a simple list 1`] = `
>
<span
class="c6"
id="react-aria-4--label"
id=":r3:--label"
>
Contact
</span>
Expand Down Expand Up @@ -738,23 +738,23 @@ exports[`NavList renders with groups 1`] = `
>
<h3
class="c3"
id="react-aria-2"
id=":r5:"
>
Overview
</h3>
<ul
aria-labelledby="react-aria-2"
aria-labelledby=":r5:"
class="c4"
>
<li
class="c5 c6"
>
<a
aria-current="page"
aria-labelledby="react-aria-3--label "
aria-labelledby=":r6:--label "
class="c7 c8"
href="/getting-started"
id="react-aria-3"
id=":r6:"
tabindex="0"
>
<div
Expand All @@ -763,7 +763,7 @@ exports[`NavList renders with groups 1`] = `
>
<span
class="c10"
id="react-aria-3--label"
id=":r6:--label"
>
Getting started
</span>
Expand All @@ -782,22 +782,22 @@ exports[`NavList renders with groups 1`] = `
>
<h3
class="c3"
id="react-aria-4"
id=":r7:"
>
Components
</h3>
<ul
aria-labelledby="react-aria-4"
aria-labelledby=":r7:"
class="c4"
>
<li
class="c5 c11"
>
<a
aria-labelledby="react-aria-5--label "
aria-labelledby=":r8:--label "
class="c7 c8"
href="/Avatar"
id="react-aria-5"
id=":r8:"
tabindex="0"
>
<div
Expand All @@ -806,7 +806,7 @@ exports[`NavList renders with groups 1`] = `
>
<span
class="c10"
id="react-aria-5--label"
id=":r8:--label"
>
Avatar
</span>
Expand Down Expand Up @@ -1190,15 +1190,15 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
class="c0"
>
<li
aria-labelledby="react-aria-2"
aria-labelledby=":r1v:"
class="c1 c2"
>
<button
aria-controls="react-aria-3"
aria-controls=":r20:"
aria-expanded="true"
aria-labelledby="react-aria-2--label "
aria-labelledby=":r1v:--label "
class="c3 c4"
id="react-aria-2"
id=":r1v:"
tabindex="0"
>
<div
Expand All @@ -1210,7 +1210,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
>
<span
class="c1 c7"
id="react-aria-2--label"
id=":r1v:--label"
>
Item
</span>
Expand Down Expand Up @@ -1238,19 +1238,19 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
</button>
<div>
<ul
aria-labelledby="react-aria-2"
aria-labelledby=":r1v:"
class="c1 c10"
id="react-aria-3"
id=":r20:"
>
<li
class="c3 c11"
>
<a
aria-current="page"
aria-labelledby="react-aria-4--label "
aria-labelledby=":r22:--label "
class="c12 c13"
href="#"
id="react-aria-4"
id=":r22:"
tabindex="0"
>
<div
Expand All @@ -1259,7 +1259,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
>
<span
class="c1 c7"
id="react-aria-4--label"
id=":r22:--label"
>
Sub Item
</span>
Expand Down Expand Up @@ -1673,15 +1673,15 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
class="c0"
>
<li
aria-labelledby="react-aria-2"
aria-labelledby=":r1q:"
class="c1 c2"
>
<button
aria-controls="react-aria-3"
aria-controls=":r1r:"
aria-expanded="false"
aria-labelledby="react-aria-2--label "
aria-labelledby=":r1q:--label "
class="c3 c4"
id="react-aria-2"
id=":r1q:"
tabindex="0"
>
<div
Expand All @@ -1693,7 +1693,7 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
>
<span
class="c1 c7"
id="react-aria-2--label"
id=":r1q:--label"
>
Item
</span>
Expand Down Expand Up @@ -1721,19 +1721,19 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
</button>
<div>
<ul
aria-labelledby="react-aria-2"
aria-labelledby=":r1q:"
class="c1 c10"
id="react-aria-3"
id=":r1r:"
>
<li
class="c3 c11"
>
<a
aria-current="page"
aria-labelledby="react-aria-4--label "
aria-labelledby=":r1t:--label "
class="c12 c13"
href="#"
id="react-aria-4"
id=":r1t:"
tabindex="0"
>
<div
Expand All @@ -1742,7 +1742,7 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
>
<span
class="c1 c7"
id="react-aria-4--label"
id=":r1t:--label"
>
Sub Item
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/SelectPanel/__snapshots__/SelectPanel.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ exports[`SelectPanel renders consistently 1`] = `
aria-haspopup="true"
className="c1"
data-block={null}
id="react-aria-3"
id=":r2:"
onClick={[Function]}
onKeyDown={[Function]}
style={{}}
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/__snapshots__/ActionMenu.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ exports[`ActionMenu renders consistently 1`] = `
aria-haspopup="true"
className="c1"
data-block={null}
id="react-aria-1"
id=":r0:"
onClick={[Function]}
onKeyDown={[Function]}
style={{}}
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ exports[`AnchoredOverlay renders consistently 1`] = `
<button
aria-haspopup="true"
className="c1 c2"
id="react-aria-1"
id=":r0:"
onClick={[Function]}
onKeyDown={[Function]}
tabIndex={0}
Expand Down Expand Up @@ -208,7 +208,7 @@ exports[`AnchoredOverlay should render consistently when open 1`] = `
aria-expanded="true"
aria-haspopup="true"
class="c1 c2"
id="react-aria-1"
id=":r6:"
tabindex="0"
>
Anchor Button
Expand Down
Loading