Ui.Modal
A generic global modal component.
Some of it's features:
-
When open pressing
Esc
closes it. -
After opened it will focus the first focusable item (which usually is the close icon).
-
Showing the component returns a promise which is resolved when its closed or rejected when cancelled.
-
The keyboard focus is trapped in the list:
Tab
andShift-Tab
cycles focusable elements. -
When closed the focus is returned to the last focused element before opening (which is usally the one that opened the modal).
States
The content of the modal.
The previously focused element.
Whether or not the modal is open.
The reject function.
The resolve function.
The transition duration.
The z-index of the modal.
Functions
Cancels the modal.
Hides the modal.
Renders the modal.
Shows the component with the given content.
Shows the component with the given content and z-index.