From 9f82aa5caa3dbd953617b5f9f4af95a54be2d7df Mon Sep 17 00:00:00 2001 From: Arun Chintalapati Date: Mon, 27 Apr 2026 10:07:43 -0500 Subject: [PATCH 1/3] docs(dialog): update demos to match design patterns and improve examples - Change close buttons from secondary to ghost variant for consistency - Update "With Actions" demo to show save workflow instead of delete - Add alertdialog role to confirmation demo and update description to explain disablePointerDismissal behavior - Wrap primary action buttons in Dialog.Close for proper dismissal - Add JSDoc note about excluding header close button from alertdialog role - Add descriptive text to "With Actions" example section --- .npmrc | 3 ++ .../src/components/demos/DialogDemo.tsx | 40 ++++++++++++------- .../src/pages/components/dialog.mdx | 1 + .../kumo/src/components/dialog/dialog.tsx | 3 ++ 4 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..01eaeec7dd --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +# Override global ~/.npmrc which redirects @cloudflare to an internal registry. +# This is a public repo — all dependencies are on public npm. +@cloudflare:registry=https://registry.npmjs.org/ diff --git a/packages/kumo-docs-astro/src/components/demos/DialogDemo.tsx b/packages/kumo-docs-astro/src/components/demos/DialogDemo.tsx index 1ff0c5f05c..36dc189e00 100644 --- a/packages/kumo-docs-astro/src/components/demos/DialogDemo.tsx +++ b/packages/kumo-docs-astro/src/components/demos/DialogDemo.tsx @@ -22,7 +22,7 @@ export function DialogBasicDemo() { render={(props) => ( } /> + } />
- Modal Title + Save changes ( )} /> @@ -88,7 +88,7 @@ export function DialogWithActionsDemo() { export function DialogConfirmationDemo() { return ( - + (
- This action cannot be undone. This will permanently delete the project - and all associated data. + This example is using disablePointerDismissal. Try closing this dialog by clicking outside - + it should not close.
( )} /> - + ( + + )} + />
@@ -255,7 +261,7 @@ export function DialogWithComboboxDemo() { render={(props) => ( )} /> - + ( + + )} + /> @@ -311,7 +323,7 @@ export function DialogWithDropdownDemo() { render={(props) => (