1.1.13 • Published 9 months ago

@blockquote-web-components/blockquote-dialog v1.1.13

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Lit

ARIA patterns

A dialog is a window overlaid on either the primary window or another dialog window. Windows under a modal dialog are inert. That is, users cannot interact with content outside an active dialog window. Inert content outside an active dialog is typically visually obscured or dimmed so it is difficult to discern, and in some implementations, attempts to interact with the inert content cause the dialog to close.

Demo

Open in StackBlitz

Usage

<blockquote-dialog>
  <button form="form1" aria-label="close" formnovalidate>X</button>
  <p>Fill in your email address to receive our newsletter!</p>
  <form  id="form1 method="dialog">
    <label for="email">Email (required)</label>
    <input type="email" name="EMAIL" id="email" placeholder="john.doe@gmail.com" required />
    <button type="submit" name="button">Sign up</button>
  </form>
</blockquote-dialog>

src/BlockquoteDialog.js:

class: BlockquoteDialog, blockquote-dialog

Fields
NamePrivacyTypeDefaultDescriptionInherited From
treewalker
dialogRef
openpublicbooleanOpens the dialog when set to `true` and closes it when set to `false`.
_slotTpl
_labeledbyTpl
_contentTpl
_scrollerTpl
_firstNodeFocusTrapTpl
_lastNodeFocusTrapTpl
_isConnectedCallbackResolve
_isConnectedCallback
_firstFocusableChildundefined
_lastFocusableChildundefined
_nextClickIsFromContentbooleanfalse
_overflowRoot
typepublicstring'alert'The type of dialog for accessibility. Set this to `alert` to announce a dialog as an alert dialog.
labelpublicstring''The 'label' attribute will be used as the 'aria-label' for the dialog
labelledbypublicstring''The 'labelledby' attribute will be used as the 'aria-labelledby' for the dialog. It will also be used to create a slot with the same 'id' and 'name'. This slot is hidden by default and its 'name' and 'id' should correspond to the 'slot' attribute of an element in the Light DOM. This connects the 'slot', 'name', and 'id' attributes of a slot to be used with ARIA relationships.
labelledbyVisiblepublicbooleanfalseThe 'labelledbyVisible' attribute will control the visibility of the slot created by 'labelledby'. By default, it is set to 'hidden'.
returnValuepublicGets or sets the dialog's return value, usually to indicate which button a user pressed to close it. https\://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue returnValue
Methods
NamePrivacyDescriptionParametersReturnInherited From
getIsConnectedCallbackResolve
show
close
_handleSubmitev: SubmitEvent
_handleOpen
_handleCloseev: Event
_handleCancelev: Event
_handleDialogClick
_handleContentClick
_firstFocusTrap{ relatedTarget }
_lastFocusTrap{ relatedTarget }
Events
NameTypeDescriptionInherited From
open
close
cancel
Attributes
NameFieldInherited From
openopen
labellabel
labelledbylabelledby
labelledbyVisible
typetype
labelledby-visibilelabelledbyVisible
Slots
NameDescription
This element has a slot
Fields
NamePrivacyTypeDefaultDescriptionInherited From
#openprivatebooleanfalse

Exports

KindNameDeclarationModulePackage
jsBlockquoteDialogBlockquoteDialogsrc/BlockquoteDialog.js

src/index.js:

Exports

KindNameDeclarationModulePackage
jsBlockquoteDialogBlockquoteDialog./BlockquoteDialog.js

src/styles/blockqoute-dialog-animations-styles.css.js:

Variables

NameDescriptionType
styles

Exports

KindNameDeclarationModulePackage
jsstylesstylessrc/styles/blockqoute-dialog-animations-styles.css.js

src/styles/blockquote-dialog-styles.css.js:

Variables

NameDescriptionType
styles

Exports

KindNameDeclarationModulePackage
jsstylesstylessrc/styles/blockquote-dialog-styles.css.js

define/blockquote-dialog.js:

Exports

KindNameDeclarationModulePackage
custom-element-definitionblockquote-dialogBlockquoteDialog/src/BlockquoteDialog.js
1.1.12

9 months ago

1.1.13

9 months ago

1.1.11

9 months ago

1.1.9

10 months ago

1.1.8

10 months ago

1.1.10

10 months ago

1.1.7

12 months ago

1.1.6

12 months ago

1.1.5

12 months ago

1.1.4

12 months ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago