Skip to content

Commit 705ab50

Browse files
authored
Merge branch 'main' into fix/update-page-layout-to-only-respond-on-left-click
2 parents ba04adb + debf495 commit 705ab50

32 files changed

+1316
-1389
lines changed

.changeset/itchy-jokes-compare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Changes the focus styling of input components such as `Textarea`, `TextInput`, `TextInputWithTokens` and `Select` from using `border` and `box-shadow` to use `outline` only for better border rendering and scrollbar support.

.changeset/little-apples-own.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': minor
3+
---
4+
5+
Update SSRProvider, useSSRSafeId to use the native React 18 useId() instead of @react-aria/ssr

.changeset/thin-ladybugs-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Ensure ConfirmationDialog adds host element to the DOM

.eslintrc.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@ module.exports = {
138138
'error',
139139
{
140140
paths: [
141-
{
142-
name: '@react-aria/ssr',
143-
importNames: ['useSSRSafeId'],
144-
message: 'Please use the `useId` hook from `src/hooks/useId.ts` instead',
145-
},
146141
{
147142
name: 'react',
148143
importNames: ['useLayoutEffect'],

.github/workflows/release-schedule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
type: boolean
77
description: 'Run in dry mode. This option will disable creating and closing issues'
88
schedule:
9-
- cron: '30 15 * * MON'
9+
- cron: '30 16 * * MON'
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}

package-lock.json

Lines changed: 58 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
"@primer/behaviors": "^1.5.1",
104104
"@primer/octicons-react": "^19.8.0",
105105
"@primer/primitives": "^7.11.11",
106-
"@react-aria/ssr": "^3.5.0",
107106
"@styled-system/css": "^5.1.5",
108107
"@styled-system/props": "^5.1.5",
109108
"@styled-system/theme-get": "^5.1.2",
@@ -147,7 +146,7 @@
147146
"@rollup/plugin-node-resolve": "15.1.0",
148147
"@rollup/plugin-replace": "5.0.2",
149148
"@rollup/plugin-terser": "0.4.3",
150-
"@rollup/plugin-typescript": "11.1.0",
149+
"@rollup/plugin-typescript": "11.1.5",
151150
"@rollup/plugin-virtual": "3.0.2",
152151
"@size-limit/preset-big-lib": "8.2.6",
153152
"@storybook/addon-a11y": "7.1.0",
@@ -172,10 +171,10 @@
172171
"@types/jest": "29.5.6",
173172
"@types/jest-axe": "3.5.5",
174173
"@types/lodash.groupby": "4.6.7",
175-
"@types/lodash.isempty": "4.4.7",
174+
"@types/lodash.isempty": "4.4.9",
176175
"@types/lodash.isobject": "3.0.7",
177176
"@types/lodash.keyby": "4.6.7",
178-
"@types/node": "18.16.19",
177+
"@types/node": "20.10.3",
179178
"@types/react": "18.2.21",
180179
"@types/react-dom": "18.2.6",
181180
"@types/semver": "7.5.3",
@@ -258,7 +257,7 @@
258257
"ts-node": "10.9.1",
259258
"ts-toolbelt": "9.6.0",
260259
"typescript": "5.2.2",
261-
"typescript-plugin-css-modules": "5.0.1",
260+
"typescript-plugin-css-modules": "5.0.2",
262261
"unist-util-find": "3.0.0",
263262
"unist-util-find-before": "4.0.0",
264263
"unist-util-flat-filter": "2.0.0",

src/ConfirmationDialog/ConfirmationDialog.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface ConfirmationDialogProps {
1616
* Required. This callback is invoked when a gesture to close the dialog
1717
* is performed. The first argument indicates the gesture.
1818
*/
19-
onClose: (gesture: 'confirm' | 'cancel' | 'close-button' | 'cancel' | 'escape') => void
19+
onClose: (gesture: 'confirm' | 'close-button' | 'cancel' | 'escape') => void
2020

2121
/**
2222
* Required. The title of the ConfirmationDialog. This is usually a brief
@@ -145,11 +145,14 @@ export const ConfirmationDialog: React.FC<React.PropsWithChildren<ConfirmationDi
145145
)
146146
}
147147

148+
let hostElement: Element | null = null
148149
export type ConfirmOptions = Omit<ConfirmationDialogProps, 'onClose'> & {content: React.ReactNode}
149150
async function confirm(themeProps: ThemeProviderProps, options: ConfirmOptions): Promise<boolean> {
150151
const {content, ...confirmationDialogProps} = options
151152
return new Promise(resolve => {
152-
const root = createRoot(document.createElement('div'))
153+
hostElement = document.createElement('div')
154+
if (!hostElement.isConnected) document.body.append(hostElement)
155+
const root = createRoot(hostElement)
153156
const onClose: ConfirmationDialogProps['onClose'] = gesture => {
154157
root.unmount()
155158
if (gesture === 'confirm') {

0 commit comments

Comments
 (0)