Skip to content

Commit 2f20144

Browse files
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 options
1 parent 5645c69 commit 2f20144

File tree

31 files changed

+2386
-3725
lines changed

31 files changed

+2386
-3725
lines changed

js/dist/modal.js

Lines changed: 0 additions & 300 deletions
This file was deleted.

js/dist/modal.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

js/index.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export { default as Alert } from './src/alert.js'
99
export { default as Button } from './src/button.js'
1010
export { default as Carousel } from './src/carousel.js'
1111
export { default as Collapse } from './src/collapse.js'
12+
export { default as Dialog } from './src/dialog.js'
1213
export { default as Dropdown } from './src/dropdown.js'
13-
export { default as Modal } from './src/modal.js'
1414
export { default as Offcanvas } from './src/offcanvas.js'
1515
export { default as Popover } from './src/popover.js'
1616
export { default as ScrollSpy } from './src/scrollspy.js'

js/index.umd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import Alert from './src/alert.js'
99
import Button from './src/button.js'
1010
import Carousel from './src/carousel.js'
1111
import Collapse from './src/collapse.js'
12+
import Dialog from './src/dialog.js'
1213
import Dropdown from './src/dropdown.js'
13-
import Modal from './src/modal.js'
1414
import Offcanvas from './src/offcanvas.js'
1515
import Popover from './src/popover.js'
1616
import ScrollSpy from './src/scrollspy.js'
@@ -23,8 +23,8 @@ export default {
2323
Button,
2424
Carousel,
2525
Collapse,
26+
Dialog,
2627
Dropdown,
27-
Modal,
2828
Offcanvas,
2929
Popover,
3030
ScrollSpy,

0 commit comments

Comments
 (0)