Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcwv/dialog

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcwv/dialog - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

17

dialog-button.js

@@ -9,2 +9,3 @@ import { cssClasses } from './constants';

isDefault: Boolean,
isInitialFocus: Boolean,
},

@@ -15,3 +16,3 @@

{
props: { action, isDefault },
props: { action, isDefault, isInitialFocus },
data: { staticClass, attrs },

@@ -24,8 +25,9 @@ scopedSlots,

{
class: [
staticClass,
cssClasses.BUTTON,
{ [cssClasses.DEFAULT_BUTTON]: isDefault },
],
attrs: { ...attrs, 'data-mdc-dialog-action': action },
class: [staticClass, cssClasses.BUTTON],
attrs: {
...attrs,
'data-mdc-dialog-action': action,
'data-mdc-dialog-button-default': isDefault,
'data-mdc-dialog-initial-focus': isInitialFocus,
},
},

@@ -36,2 +38,1 @@ scopedSlots.default && scopedSlots.default(),

};
2;
/* eslint-disable quote-props */
import mcwDialogFoundation from '@material/dialog/foundation';
import MDCDialogFoundation from '@material/dialog/foundation';
import * as util from '@material/dialog/util';

@@ -42,3 +42,3 @@ import { closest, matches } from '@material/dom/ponyfill';

mounted() {
const strings = mcwDialogFoundation.strings;
const strings = MDCDialogFoundation.strings;

@@ -49,3 +49,3 @@ const { open, autoStackButtons, escapeKeyAction, scrimClickAction } = this;

this.defaultButton = this.$el.querySelector(
`.${cssClasses.DEFAULT_BUTTON}`,
`[${strings.BUTTON_DEFAULT_ATTRIBUTE}]`,
);

@@ -60,4 +60,5 @@

eventTargetMatches: (target, selector) => matches(target, selector),
trapFocus: () => this.focusTrap && this.focusTrap.activate(),
trapFocus: initialFocusEl => this.focusTrap && this.focusTrap.activate(),
releaseFocus: () => this.focusTrap && this.focusTrap.deactivate(),
getInitialFocusEl: () => this.getInitialFocusEl_(),
isContentScrollable: () =>

@@ -112,3 +113,3 @@ !!this.$refs.contentEl && util.isScrollable(this.$refs.contentEl),

this.foundation = new mcwDialogFoundation(adapter);
this.foundation = new MDCDialogFoundation(adapter);

@@ -142,6 +143,15 @@ this.foundation.init();

},
getInitialFocusEl_() {
return document.querySelector(
`[${MDCDialogFoundation.strings.INITIAL_FOCUS_ATTRIBUTE}]`,
);
},
onOpen_(value) {
if (value) {
if (this.$refs.container) {
this.focusTrap = util.createFocusTrapInstance(this.$el);
this.focusTrap = util.createFocusTrapInstance(
this.$el,
void 0,
this.getInitialFocusEl_() || void 0,
);
}

@@ -153,3 +163,2 @@ this.foundation.open();

},
onCancel() {

@@ -244,4 +253,4 @@ if (this.$listeners['validateCancel']) {

on: {
click: evt => this.foundation.handleInteraction(evt),
keydown: evt => this.foundation.handleInteraction(evt),
click: evt => this.foundation.handleClick(evt),
keydown: evt => this.foundation.handleKeydown(evt),
},

@@ -248,0 +257,0 @@ },

{
"name": "@mcwv/dialog",
"description": "The Vue Material Adapter for the web dialog component",
"version": "0.9.0",
"version": "0.10.0",
"license": "MIT",

@@ -19,7 +19,7 @@ "main": "dist/mcwv.dialog.min.js",

"dependencies": {
"@material/dialog": "^2.3.0",
"@mcwv/base": "^0.9.0",
"@mcwv/button": "^0.9.0"
"@material/dialog": "^3.0.0",
"@mcwv/base": "^0.10.0",
"@mcwv/button": "^0.10.0"
},
"gitHead": "c1c18cf24c280b8345c7810d22a3f635ee49730b"
"gitHead": "43f9928f7e26c14fa6f8809e51ab81592fd082c4"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc