From 7e47736f12052159a98f15bc571adfdd260c0252 Mon Sep 17 00:00:00 2001
From: Lyza Danger Gardner
Date: Fri, 14 Apr 2023 14:16:30 -0400
Subject: [PATCH 1/3] Export `ModalDialog` and its prop types from package
---
src/next.ts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/next.ts b/src/next.ts
index 1ae5ea4f..8fc09c93 100644
--- a/src/next.ts
+++ b/src/next.ts
@@ -22,7 +22,13 @@ export {
TableRow,
Thumbnail,
} from './components/data';
-export { Dialog, Modal, Spinner, SpinnerOverlay } from './components/feedback';
+export {
+ Dialog,
+ Modal,
+ ModalDialog,
+ Spinner,
+ SpinnerOverlay,
+} from './components/feedback';
export {
Button,
ButtonBase,
@@ -78,6 +84,7 @@ export type {
export type {
DialogProps,
ModalProps,
+ ModalDialogProps,
SpinnerProps,
SpinnerOverlayProps,
} from './components/feedback';
From 414a89e4630e501187e60b7d1407c02b99a80f74 Mon Sep 17 00:00:00 2001
From: Lyza Danger Gardner
Date: Fri, 14 Apr 2023 14:16:39 -0400
Subject: [PATCH 2/3] Update `ModalDialog` pattern-library docs
---
.../components/patterns/feedback/DialogPage.tsx | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/pattern-library/components/patterns/feedback/DialogPage.tsx b/src/pattern-library/components/patterns/feedback/DialogPage.tsx
index 3626d870..713042a7 100644
--- a/src/pattern-library/components/patterns/feedback/DialogPage.tsx
+++ b/src/pattern-library/components/patterns/feedback/DialogPage.tsx
@@ -407,10 +407,6 @@ export default function DialogPage() {
deprecated Modal
component.
-
- ModalDialog
is still under development and is not yet
- part of the package API.
-
@@ -497,11 +493,6 @@ export default function DialogPage() {
tables (ARIA {'`role="grid"`'}
) or tabs (ARIA{' '}
{'`role="tablist"`'}
).
-
-
- Keyboard navigation for embedded widgets is under development.
-
-
}
From 2de15ef4538a1dc42ea20be230b7d3cc23d23af6 Mon Sep 17 00:00:00 2001
From: Lyza Danger Gardner
Date: Fri, 24 Mar 2023 14:41:14 -0700
Subject: [PATCH 3/3] Deprecate `Modal`
---
src/components/feedback/Modal.tsx | 1 +
.../components/patterns/feedback/ModalPage.tsx | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/src/components/feedback/Modal.tsx b/src/components/feedback/Modal.tsx
index 43bdfc83..c6a793f1 100644
--- a/src/components/feedback/Modal.tsx
+++ b/src/components/feedback/Modal.tsx
@@ -36,6 +36,7 @@ const noop = () => {};
/**
* Show a modal
+ * @deprecated - Use `ModalDialog` instead
*/
const ModalNext = function Modal({
children,
diff --git a/src/pattern-library/components/patterns/feedback/ModalPage.tsx b/src/pattern-library/components/patterns/feedback/ModalPage.tsx
index 96de62c4..972a44dc 100644
--- a/src/pattern-library/components/patterns/feedback/ModalPage.tsx
+++ b/src/pattern-library/components/patterns/feedback/ModalPage.tsx
@@ -103,6 +103,19 @@ export default function ModalPage() {
}
>
+
+
+
+ This implementation of
+
+ Modal
+ {' '}
+ is deprecated. Use
+ ModalDialog
or Dialog
instead, which
+ provide a similar API and enhanced accessibility.
+
+
+