npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vonage/vwc-dialog

v2.46.1

Published

dialog component

Downloads

979

Readme

vwc-dialog

This component is an extension of

API

Slots

| Name | Description | ----------------- | ------------- | icon | A slot meant for an icon. Appears above the heading. | primaryAction | A focusable and clickable target. Typically a button such as <mwc-button>. Placed on the bottom right of the dialog (LTR) and above the secondary action when stacked. Automatically clicked when Enter key is pressed in the dialog. | secondaryAction | A focusable and clickable target. Typically a button such as <mwc-button>. Placed immediately to the left of the primaryAction (LTR) or below when stacked. | default | Content to display in the dialog's content area.

Properties/Attributes

| Name | Type | Description | ----------------------- |------------|------------ | open | boolean | Whether the dialog should open. | hideActions | boolean | Hides the actions footer of the dialog. Needed to remove excess padding when no actions are slotted in. | stacked | boolean | Whether to stack the action buttons. | heading | string | Heading text of the dialog. | scrimClickAction | string | Default: 'close' – Action to be emitted with the closing and closed events when the dialog closes because the scrim was clicked. | escapeKeyAction | string | Default: 'close' – Action to be emitted with the closing and closed events when the dialog closes because the excape key was pressed. | defaultAction | string | Default: 'close' – Action to be emitted with the closing and closed events when <mwc-dialog>.open is toggled. | actionAttribute | string | Default: 'dialogAction' – Attribute to read in light dom of dialog for closing action value. | initialFocusAttribute | string | Default: 'dialogInitialFocus' – Attribute to search for in light dom for initial focus on dialog open. | closeButton | boolean | Default: 'false' - show/hide the dismiss button | topPosition | string | Default: 'unset' - override the dialog centering to the screen and allow setting a unique top. Can get: small, medium, large, xlarge

Methods

| Name | Description | -------- | ------------- | forceLayout() => void | Forces dialog to relayout (animation frame time). May be required if dialog size is incorrect or if stacked layout has not been triggered correctly. | focus() => void | Focuses on the initial focus element if defined. | blur() => void | Blurs the active element. | show() => void | Opens the dialog. | close() => void | Closes the dialog.

Listeners

| Event Name | Target | Description | ------------------- | ------------ | ----------- | click | root element | Detects if clicked target is a dialog action. | resize | window | Performs dialog layout (passive). | orientationchange | window | Performs dialog layout (passive). | keydown | mwc-dialog | Listens for the enter key to click the default button (passive). | keydown | document | Listens for the escape key to close the dialog (see escapeKeyAction).

Events

| Event Name | Target | Detail | Description | ---------- | ------------ | ------------------ | ----------- | opening | mwc-dialog | {} | Fired when the dialog is beginning to open. | opened | mwc-dialog | {} | Fired once the dialog is finished opening (after animation). | closing | mwc-dialog | {action: string} | Fired when the dialog is is beginning to close. Detail is the action that closed the dialog. | closed | mwc-dialog | {action: string} | Fired once the dialog is finished closing (after animation). Detail is the action that closed the dialog.