Skip to content

feat(ModalDialog): voeg ModalDialog component toe (issue #114)#122

Merged
jeffreylauwers merged 3 commits intomainfrom
fix/card-stories-typescript
Mar 26, 2026
Merged

feat(ModalDialog): voeg ModalDialog component toe (issue #114)#122
jeffreylauwers merged 3 commits intomainfrom
fix/card-stories-typescript

Conversation

@jeffreylauwers
Copy link
Copy Markdown
Owner

Summary

  • Compound component gebaseerd op het native <dialog> element met .showModal() voor ingebakken focus-trap, aria-modal semantiek en inert-attribuut op de achtergrond
  • Sub-componenten: ModalDialog, ModalDialogHeader, ModalDialogHeading, ModalDialogBody, ModalDialogFooter
  • aria-labelledby automatisch gekoppeld via React.useId() + context — geen handmatige ID nodig
  • Open/sluitanimatie via @starting-style en allow-discrete; uitschakelbaar via prefers-reduced-motion
  • Scroll-affordance schaduw in body (Lea Verou verticale techniek)
  • 18 component-tokens, 16 React tests
  • Closes feat(ModalDialog): modal dialog met header, body en footer #114

Test plan

  • Storybook: Default story — trigger button opent dialog, sluitknop sluit
  • Storybook: WithLongContent — body scrollt, header/footer blijven sticky
  • Storybook: RTL — layout spiegelt correct
  • Keyboard: Tab blijft binnen de dialog (native focus-trap via showModal())
  • Keyboard: Escape sluit de dialog
  • Visueel: openingsanimatie smooth; sluitanimatie zonder layout-glitch
  • pnpm test — alle 1149 tests groen
  • pnpm --filter storybook exec tsc --noEmit — 0 fouten

🤖 Generated with Claude Code

Jeffrey Lauwers and others added 3 commits March 26, 2026 21:08
Compound component gebaseerd op het native <dialog> element met
showModal() voor ingebakken focus-trap, aria-modal en inert-achtergrond.

Sub-componenten: ModalDialog, ModalDialogHeader, ModalDialogHeading,
ModalDialogBody, ModalDialogFooter.

- aria-labelledby automatisch via React.useId() + context
- Open/sluitanimatie via @starting-style en allow-discrete
- Scroll-affordance schaduw in body (Lea Verou techniek)
- 18 component-tokens, 16 React tests
- Docs: changelog, 03-components.md, README bijgewerkt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- header padding-block-start: 3xl (24px) → xl (16px)
- header padding-inline: 3xl (24px) → xl (16px)
- body padding-block: xl (16px) → 3xl (24px)
- body padding-inline: 3xl (24px) → xl (16px)
- footer padding-inline: 3xl (24px) → xl (16px)
- footer padding-block-end: nieuw eigen token (xl, 16px)
  voorheen werd header-padding-block-start hergebruikt

CSS footer gebruikt nu --dsn-modal-dialog-footer-padding-block-end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…block-start

Consistent met footer-padding-block-end — beide zijden nu expliciet
benoemd. CSS gebruikt --dsn-modal-dialog-footer-padding-block-start.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jeffreylauwers jeffreylauwers merged commit ae430c0 into main Mar 26, 2026
3 checks passed
@jeffreylauwers jeffreylauwers deleted the fix/card-stories-typescript branch March 27, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ModalDialog): modal dialog met header, body en footer

1 participant