Commit 2f20144
authored
Replace Modal with new Dialog component (#41917)
* Add Dialog component using native HTML dialog element
New component that leverages the native HTML <dialog> element for modals
and non-modal dialogs with built-in backdrop and accessibility support.
Features:
- Modal dialogs using showModal() with automatic backdrop
- Non-modal dialogs using show() for persistent UI elements
- Static backdrop option (prevents close on outside click)
- Keyboard support (Escape to close, focus trapping for modals)
- Smooth open/close animations via CSS
- Events: show, shown, hide, hidden, hidePrevented
- Data API for toggling with data-bs-toggle="dialog"
JavaScript:
- js/src/dialog.js - Main component class
- js/tests/unit/dialog.spec.js - Unit tests
- js/tests/visual/dialog.html - Visual test page
SCSS:
- scss/_dialog.scss - Component styles
Docs:
- Add dialog component documentation
- Update modal docs with dialog references
* Modal examples now Dialog examples, needs improvement
* Remove all of Modal
* real words
* Fix layout while I'm here
* Lint Markdown
* New dialog size options1 parent 5645c69 commit 2f20144
File tree
31 files changed
+2386
-3725
lines changed- js
- dist
- src
- tests
- unit
- visual
- scss
- site
- data
- src
- assets
- examples
- cheatsheet-rtl
- cheatsheet
- dialogs
- modals
- partials
- components/home
- content/docs
- components
- customize
- getting-started
- utilities
31 files changed
+2386
-3725
lines changedThis file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | | - | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments