- Fixed incorrect
isOpen
property.
- Fixed event names in
on
andoff
methods.
- Added the
manageFocus
option. - Converted to TypeScript.
- Added the
id
property to access the instances id.
- Fixed issue with incorrect event target when using domapi.
- The 'dialog' prefix is no longer required when using the
on
andoff
methods.
- Added the
element
property. - Added the ability to set the focused element when calling
close()
. - Added the ability to unmount the domapi.
- Added ability to access the elements being watched by the domapi.
- Changed: The domapi now needs to be explicitly mounted.
- Changed: The default browser action is now prevented when using the domapi.
- Changed: The element passed into
open()
is now the element that gets focused on open. - Removed the
elements
property.
- Added basic data attribute API.
- Added ability to cancel opening and closing via
event.preventDefault
. - Added
initiated
property to dialog instance. - Now uses
aria-modal="true"
and aligns with WAI-ARIA Authoring Practices 1.1. - Events now use the native CustomEvent API.
- Event names are now prefixed with
dialog:
. - No longer provides a default export, use
import { dialog } from @rynpsc/dialog
instead. - Removed
main
parameter from constructor. - Removed
autoInit
option, dialogs must now be manually created withcreate()
. - Removed
focus
option, autofocus element should now be defined using thedata-dialog-autofocus
attribute.
- Added
aria-hidden
attribute to main and dialog elements.
- Added
create
,destroy
,open
andclose
events. - Added event subscription via
on
andoff
methods. - Removed
onCreate
,onDestroy
,onOpen
andonClose
callbacks.
- Initial release.