diff --git a/.changeset/tricky-plants-sip.md b/.changeset/tricky-plants-sip.md new file mode 100644 index 000000000..ae009230f --- /dev/null +++ b/.changeset/tricky-plants-sip.md @@ -0,0 +1,5 @@ +--- +'@strapi/design-system': patch +--- + +fix: wrapping content of dialog in overlay to restore pointer-events diff --git a/docs/stories/04-components/Dialog.stories.tsx b/docs/stories/04-components/Dialog.stories.tsx index fc0ef384b..d9827387c 100644 --- a/docs/stories/04-components/Dialog.stories.tsx +++ b/docs/stories/04-components/Dialog.stories.tsx @@ -1,6 +1,6 @@ import { Meta, StoryObj } from '@storybook/react'; import { fn } from '@storybook/test'; -import { Button, Dialog, Flex, Radio } from '@strapi/design-system'; +import { Button, Dialog, Field, Flex, Radio, SingleSelect, SingleSelectOption } from '@strapi/design-system'; import { WarningCircle } from '@strapi/icons'; import { outdent } from 'outdent'; @@ -33,11 +33,24 @@ const meta: Meta = { code: outdent` - + Confirmation - }>Are you sure you want to delete this? + + + What is your favourite fruit? + + Apple + Avocado + Banana + Kiwi + Mango + Orange + Strawberry + + + - @@ -60,7 +73,7 @@ const meta: Meta = { return ( - + = { onEscapeKeyDown={onEscapeKeyDown} > Confirmation - Are you sure you want to delete this? + + + What is your favourite fruit? + + Apple + Avocado + Banana + Kiwi + Mango + Orange + Strawberry + + + - @@ -108,7 +134,7 @@ export const Children = { return ( - + ((props, forwardedRef) => { return ( - - + + + ); }); const Overlay = styled(AlertDialog.Overlay)` - background-color: ${(props) => props.theme.colors.neutral800}; + background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)}; position: fixed; inset: 0; z-index: ${(props) => props.theme.zIndices.overlay}; - opacity: 0.2; + will-change: opacity; @media (prefers-reduced-motion: no-preference) { animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings['200']}