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

ay-menu-button

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ay-menu-button - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

3

dist-es6/index.js

@@ -7,5 +7,6 @@ /*! Copyright 2016 Ayogo Health Inc. */

display: none;
padding: 0;
padding: 0.125em;
margin: 0;
border: 1px solid;
background: Menu;
will-change: transform;

@@ -12,0 +13,0 @@ transform-origin: top center;

@@ -9,7 +9,7 @@ /*! Copyright 2016 Ayogo Health Inc. */

private static scrollJack;
static readonly open: boolean;
static get open(): boolean;
static openMenu(btn: HTMLButtonElement, focus?: boolean): void;
static closeMenu(): void;
static toggleMenu(btn: HTMLButtonElement): void;
static focusMenu(): void;
static focusMenu(offset?: number): void;
private static clickMenuItem;

@@ -16,0 +16,0 @@ private static addMenuStyle;

@@ -84,3 +84,3 @@ /*! Copyright 2016 Ayogo Health Inc. */

}
static focusMenu() {
static focusMenu(offset = 1) {
if (!this.curMenu) {

@@ -97,3 +97,10 @@ return;

let mi = this.curMenu.children[this.focusCount % length];
mi.focus();
const role = mi.getAttribute('role');
if (role === 'presentation' || role === 'separator' || role === 'none') {
this.focusCount += offset;
this.focusMenu(offset);
}
else {
mi.focus();
}
}

@@ -123,2 +130,8 @@ static clickMenuItem() {

for (let i = 0; i < menu.children.length; i++) {
if (menu.children[i].tagName === 'HR') {
menu.children[i].setAttribute('role', 'separator');
}
if (menu.children[i].hasAttribute('role') && menu.children[i].getAttribute('role') !== 'menuitem') {
continue;
}
menu.children[i].setAttribute('tabindex', '-1');

@@ -224,3 +237,3 @@ menu.children[i].setAttribute('role', 'menuitem');

}
MenuManager.focusMenu();
MenuManager.focusMenu(-1);
}

@@ -233,3 +246,3 @@ if (e.keyCode === 40) {

}
MenuManager.focusMenu();
MenuManager.focusMenu(1);
}

@@ -236,0 +249,0 @@ if (e.keyCode === 32 || e.keyCode === 13) {

@@ -5,5 +5,25 @@ /*! Copyright 2017 Ayogo Health Inc. */

typeof define === 'function' && define.amd ? define(['angular'], factory) :
(global = global || self, global.ayMenuButton = factory(global.angular));
}(this, function (angular) { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ayMenuButton = factory(global.angular));
})(this, (function (angular) { 'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var angular__namespace = /*#__PURE__*/_interopNamespace(angular);
/*! Copyright 2016 Ayogo Health Inc. */

@@ -17,3 +37,3 @@ var MenuManager = (function () {

},
enumerable: true,
enumerable: false,
configurable: true

@@ -101,3 +121,4 @@ });

};
MenuManager.focusMenu = function () {
MenuManager.focusMenu = function (offset) {
if (offset === void 0) { offset = 1; }
if (!this.curMenu) {

@@ -114,3 +135,10 @@ return;

var mi = this.curMenu.children[this.focusCount % length];
mi.focus();
var role = mi.getAttribute('role');
if (role === 'presentation' || role === 'separator' || role === 'none') {
this.focusCount += offset;
this.focusMenu(offset);
}
else {
mi.focus();
}
};

@@ -140,2 +168,8 @@ MenuManager.clickMenuItem = function () {

for (var i = 0; i < menu.children.length; i++) {
if (menu.children[i].tagName === 'HR') {
menu.children[i].setAttribute('role', 'separator');
}
if (menu.children[i].hasAttribute('role') && menu.children[i].getAttribute('role') !== 'menuitem') {
continue;
}
menu.children[i].setAttribute('tabindex', '-1');

@@ -241,3 +275,3 @@ menu.children[i].setAttribute('role', 'menuitem');

}
MenuManager.focusMenu();
MenuManager.focusMenu(-1);
}

@@ -250,3 +284,3 @@ if (e.keyCode === 40) {

}
MenuManager.focusMenu();
MenuManager.focusMenu(1);
}

@@ -359,3 +393,3 @@ if (e.keyCode === 32 || e.keyCode === 13) {

/*! Copyright 2016 Ayogo Health Inc. */
var MENU_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n display: none;\n padding: 0;\n margin: 0;\n border: 1px solid;\n will-change: transform;\n transform-origin: top center;\n transition: transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n transform-origin: bottom center;\n}\n\nmenuitem {\n display: list-item;\n list-style-type: none;\n background: Menu;\n font: menu;\n padding: 0.25em 0.5em;\n cursor: default;\n}\n\nmenuitem::after {\n content: attr(label);\n}\n\nmenuitem[disabled] {\n color: GrayText;\n}\n\nmenuitem:not([disabled]):hover,\nmenuitem:not([disabled]):focus {\n background: Highlight;\n color: HighlightText;\n}\n\nbutton[type=\"menu\"]::after,\nbutton[data-type=\"menu\"]:after { content: ' \u25BE'; }\n\nbutton[type=\"menu\"]:empty::after,\nbutton[data-type=\"menu\"]:empty:after { content: '\u25BE'; } /* No space character */\n\nbutton[type=\"menu\"][data-dir=\"up\"]::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:after { content: ' \u25B4'; }\n\nbutton[type=\"menu\"][data-dir=\"up\"]:empty::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:empty:after { content: '\u25B4'; } /* No space character */\n";
var MENU_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n display: none;\n padding: 0.125em;\n margin: 0;\n border: 1px solid;\n background: Menu;\n will-change: transform;\n transform-origin: top center;\n transition: transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n transform-origin: bottom center;\n}\n\nmenuitem {\n display: list-item;\n list-style-type: none;\n background: Menu;\n font: menu;\n padding: 0.25em 0.5em;\n cursor: default;\n}\n\nmenuitem::after {\n content: attr(label);\n}\n\nmenuitem[disabled] {\n color: GrayText;\n}\n\nmenuitem:not([disabled]):hover,\nmenuitem:not([disabled]):focus {\n background: Highlight;\n color: HighlightText;\n}\n\nbutton[type=\"menu\"]::after,\nbutton[data-type=\"menu\"]:after { content: ' \u25BE'; }\n\nbutton[type=\"menu\"]:empty::after,\nbutton[data-type=\"menu\"]:empty:after { content: '\u25BE'; } /* No space character */\n\nbutton[type=\"menu\"][data-dir=\"up\"]::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:after { content: ' \u25B4'; }\n\nbutton[type=\"menu\"][data-dir=\"up\"]:empty::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:empty:after { content: '\u25B4'; } /* No space character */\n";
var PREFIX_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n -webkit-transform-origin: top center;\n -webkit-transition: -webkit-transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n transition: -webkit-transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n -webkit-transform-origin: bottom center;\n}\n";

@@ -394,3 +428,3 @@ var mnuStyle = document.createElement('style');

var modName = 'ayMenuButton';
angular.module(modName, [])
angular__namespace.module(modName, [])
.directive('button', function () {

@@ -414,1 +448,2 @@ return {

}));
//# sourceMappingURL=angular1.js.map

@@ -5,4 +5,4 @@ /*! Copyright 2017 Ayogo Health Inc. */

typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.MenuButton = factory());
}(this, function () { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MenuButton = factory());
})(this, (function () { 'use strict';

@@ -17,3 +17,3 @@ /*! Copyright 2016 Ayogo Health Inc. */

},
enumerable: true,
enumerable: false,
configurable: true

@@ -101,3 +101,4 @@ });

};
MenuManager.focusMenu = function () {
MenuManager.focusMenu = function (offset) {
if (offset === void 0) { offset = 1; }
if (!this.curMenu) {

@@ -114,3 +115,10 @@ return;

var mi = this.curMenu.children[this.focusCount % length];
mi.focus();
var role = mi.getAttribute('role');
if (role === 'presentation' || role === 'separator' || role === 'none') {
this.focusCount += offset;
this.focusMenu(offset);
}
else {
mi.focus();
}
};

@@ -140,2 +148,8 @@ MenuManager.clickMenuItem = function () {

for (var i = 0; i < menu.children.length; i++) {
if (menu.children[i].tagName === 'HR') {
menu.children[i].setAttribute('role', 'separator');
}
if (menu.children[i].hasAttribute('role') && menu.children[i].getAttribute('role') !== 'menuitem') {
continue;
}
menu.children[i].setAttribute('tabindex', '-1');

@@ -241,3 +255,3 @@ menu.children[i].setAttribute('role', 'menuitem');

}
MenuManager.focusMenu();
MenuManager.focusMenu(-1);
}

@@ -250,3 +264,3 @@ if (e.keyCode === 40) {

}
MenuManager.focusMenu();
MenuManager.focusMenu(1);
}

@@ -359,3 +373,3 @@ if (e.keyCode === 32 || e.keyCode === 13) {

/*! Copyright 2016 Ayogo Health Inc. */
var MENU_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n display: none;\n padding: 0;\n margin: 0;\n border: 1px solid;\n will-change: transform;\n transform-origin: top center;\n transition: transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n transform-origin: bottom center;\n}\n\nmenuitem {\n display: list-item;\n list-style-type: none;\n background: Menu;\n font: menu;\n padding: 0.25em 0.5em;\n cursor: default;\n}\n\nmenuitem::after {\n content: attr(label);\n}\n\nmenuitem[disabled] {\n color: GrayText;\n}\n\nmenuitem:not([disabled]):hover,\nmenuitem:not([disabled]):focus {\n background: Highlight;\n color: HighlightText;\n}\n\nbutton[type=\"menu\"]::after,\nbutton[data-type=\"menu\"]:after { content: ' \u25BE'; }\n\nbutton[type=\"menu\"]:empty::after,\nbutton[data-type=\"menu\"]:empty:after { content: '\u25BE'; } /* No space character */\n\nbutton[type=\"menu\"][data-dir=\"up\"]::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:after { content: ' \u25B4'; }\n\nbutton[type=\"menu\"][data-dir=\"up\"]:empty::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:empty:after { content: '\u25B4'; } /* No space character */\n";
var MENU_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n display: none;\n padding: 0.125em;\n margin: 0;\n border: 1px solid;\n background: Menu;\n will-change: transform;\n transform-origin: top center;\n transition: transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n transform-origin: bottom center;\n}\n\nmenuitem {\n display: list-item;\n list-style-type: none;\n background: Menu;\n font: menu;\n padding: 0.25em 0.5em;\n cursor: default;\n}\n\nmenuitem::after {\n content: attr(label);\n}\n\nmenuitem[disabled] {\n color: GrayText;\n}\n\nmenuitem:not([disabled]):hover,\nmenuitem:not([disabled]):focus {\n background: Highlight;\n color: HighlightText;\n}\n\nbutton[type=\"menu\"]::after,\nbutton[data-type=\"menu\"]:after { content: ' \u25BE'; }\n\nbutton[type=\"menu\"]:empty::after,\nbutton[data-type=\"menu\"]:empty:after { content: '\u25BE'; } /* No space character */\n\nbutton[type=\"menu\"][data-dir=\"up\"]::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:after { content: ' \u25B4'; }\n\nbutton[type=\"menu\"][data-dir=\"up\"]:empty::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:empty:after { content: '\u25B4'; } /* No space character */\n";
var PREFIX_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n -webkit-transform-origin: top center;\n -webkit-transition: -webkit-transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n transition: -webkit-transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n -webkit-transform-origin: bottom center;\n}\n";

@@ -395,1 +409,2 @@ var mnuStyle = document.createElement('style');

}));
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Vue from 'vue';
import Vue, { openBlock, createElementBlock, renderSlot } from 'vue';

@@ -11,3 +11,3 @@ /*! Copyright 2016 Ayogo Health Inc. */

},
enumerable: true,
enumerable: false,
configurable: true

@@ -95,3 +95,4 @@ });

};
MenuManager.focusMenu = function () {
MenuManager.focusMenu = function (offset) {
if (offset === void 0) { offset = 1; }
if (!this.curMenu) {

@@ -108,3 +109,10 @@ return;

var mi = this.curMenu.children[this.focusCount % length];
mi.focus();
var role = mi.getAttribute('role');
if (role === 'presentation' || role === 'separator' || role === 'none') {
this.focusCount += offset;
this.focusMenu(offset);
}
else {
mi.focus();
}
};

@@ -134,2 +142,8 @@ MenuManager.clickMenuItem = function () {

for (var i = 0; i < menu.children.length; i++) {
if (menu.children[i].tagName === 'HR') {
menu.children[i].setAttribute('role', 'separator');
}
if (menu.children[i].hasAttribute('role') && menu.children[i].getAttribute('role') !== 'menuitem') {
continue;
}
menu.children[i].setAttribute('tabindex', '-1');

@@ -235,3 +249,3 @@ menu.children[i].setAttribute('role', 'menuitem');

}
MenuManager.focusMenu();
MenuManager.focusMenu(-1);
}

@@ -244,3 +258,3 @@ if (e.keyCode === 40) {

}
MenuManager.focusMenu();
MenuManager.focusMenu(1);
}

@@ -353,3 +367,3 @@ if (e.keyCode === 32 || e.keyCode === 13) {

/*! Copyright 2016 Ayogo Health Inc. */
var MENU_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n display: none;\n padding: 0;\n margin: 0;\n border: 1px solid;\n will-change: transform;\n transform-origin: top center;\n transition: transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n transform-origin: bottom center;\n}\n\nmenuitem {\n display: list-item;\n list-style-type: none;\n background: Menu;\n font: menu;\n padding: 0.25em 0.5em;\n cursor: default;\n}\n\nmenuitem::after {\n content: attr(label);\n}\n\nmenuitem[disabled] {\n color: GrayText;\n}\n\nmenuitem:not([disabled]):hover,\nmenuitem:not([disabled]):focus {\n background: Highlight;\n color: HighlightText;\n}\n\nbutton[type=\"menu\"]::after,\nbutton[data-type=\"menu\"]:after { content: ' \u25BE'; }\n\nbutton[type=\"menu\"]:empty::after,\nbutton[data-type=\"menu\"]:empty:after { content: '\u25BE'; } /* No space character */\n\nbutton[type=\"menu\"][data-dir=\"up\"]::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:after { content: ' \u25B4'; }\n\nbutton[type=\"menu\"][data-dir=\"up\"]:empty::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:empty:after { content: '\u25B4'; } /* No space character */\n";
var MENU_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n display: none;\n padding: 0.125em;\n margin: 0;\n border: 1px solid;\n background: Menu;\n will-change: transform;\n transform-origin: top center;\n transition: transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n transform-origin: bottom center;\n}\n\nmenuitem {\n display: list-item;\n list-style-type: none;\n background: Menu;\n font: menu;\n padding: 0.25em 0.5em;\n cursor: default;\n}\n\nmenuitem::after {\n content: attr(label);\n}\n\nmenuitem[disabled] {\n color: GrayText;\n}\n\nmenuitem:not([disabled]):hover,\nmenuitem:not([disabled]):focus {\n background: Highlight;\n color: HighlightText;\n}\n\nbutton[type=\"menu\"]::after,\nbutton[data-type=\"menu\"]:after { content: ' \u25BE'; }\n\nbutton[type=\"menu\"]:empty::after,\nbutton[data-type=\"menu\"]:empty:after { content: '\u25BE'; } /* No space character */\n\nbutton[type=\"menu\"][data-dir=\"up\"]::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:after { content: ' \u25B4'; }\n\nbutton[type=\"menu\"][data-dir=\"up\"]:empty::after,\nbutton[data-type=\"menu\"][data-dir=\"up\"]:empty:after { content: '\u25B4'; } /* No space character */\n";
var PREFIX_STYLES = "\nmenu[type=\"context\"],\nmenu[data-owner=\"button\"] {\n -webkit-transform-origin: top center;\n -webkit-transition: -webkit-transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n transition: -webkit-transform 225ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n\nmenu[type=\"context\"][data-dir=\"up\"],\nmenu[data-owner=\"button\"][data-dir=\"up\"] {\n -webkit-transform-origin: bottom center;\n}\n";

@@ -404,125 +418,13 @@ var mnuStyle = document.createElement('style');

function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
/* server only */
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
} // Vue.extend constructor export interop.
const _hoisted_1 = { type: "menu" };
var options = typeof script === 'function' ? script.options : script; // render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true; // functional template
if (isFunctionalTemplate) {
options.functional = true;
}
} // scopedId
if (scopeId) {
options._scopeId = scopeId;
}
var hook;
if (moduleIdentifier) {
// server build
hook = function hook(context) {
// 2.3 injection
context = context || // cached call
this.$vnode && this.$vnode.ssrContext || // stateful
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
} // inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
} // register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
}; // used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
} else if (style) {
hook = shadowMode ? function () {
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
} : function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
}
return script;
function render(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createElementBlock("button", _hoisted_1, [
renderSlot(_ctx.$slots, "default")
]))
}
var normalizeComponent_1 = normalizeComponent;
script.render = render;
script.__file = "src/component.vue";
/* script */
const __vue_script__ = script;
/* template */
var __vue_render__ = function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("button", { attrs: { type: "menu" } }, [_vm._t("default")], 2)
};
var __vue_staticRenderFns__ = [];
__vue_render__._withStripped = true;
/* style */
const __vue_inject_styles__ = undefined;
/* scoped */
const __vue_scope_id__ = undefined;
/* module identifier */
const __vue_module_identifier__ = undefined;
/* functional template */
const __vue_is_functional_template__ = false;
/* style inject */
/* style inject SSR */
var component = normalizeComponent_1(
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
__vue_inject_styles__,
__vue_script__,
__vue_scope_id__,
__vue_is_functional_template__,
__vue_module_identifier__,
undefined,
undefined
);
export default component;
export { script as default };
{
"name": "ay-menu-button",
"version": "1.1.0",
"version": "1.1.1",
"copyright": "Copyright 2016 Ayogo Health Inc.",

@@ -32,14 +32,14 @@ "license": "MIT",

"devDependencies": {
"@types/angular": "^1.6.54",
"angular": "^1.7.8",
"rollup": "^1.8.0",
"@types/angular": "^1.7.0",
"@vue/compiler-sfc": "^3.0.11",
"angular": "^1.8.0",
"rollup": "^2.3.3",
"rollup-plugin-cleanup": "^3.1.1",
"rollup-plugin-commonjs": "^9.3.3",
"rollup-plugin-sourcemaps": "^0.4.1",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-vue": "^4.7.2",
"tslib": "^1.9.3",
"typescript": "^3.4.1",
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10"
"rollup-plugin-sourcemaps": "^0.6.0",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-vue": "^6.0.0",
"tslib": "^2.2.0",
"typescript": "^4.2.4",
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11"
},

@@ -46,0 +46,0 @@ "scripts": {

@@ -10,3 +10,3 @@ /*! Copyright 2016 Ayogo Health Inc. */

banner: '/*! Copyright 2017 Ayogo Health Inc. */',
sourceMap: true,
sourcemap: true,
globals: {

@@ -13,0 +13,0 @@ 'angular': 'angular'

/*! Copyright 2016 Ayogo Health Inc. */
import vue from 'rollup-plugin-vue'; // Handle .vue SFC files
import typescript from 'rollup-plugin-typescript';
import commonjs from 'rollup-plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';

@@ -16,5 +15,4 @@ export default {

}),
commonjs(),
vue()
],
};

@@ -10,5 +10,6 @@ /*! Copyright 2016 Ayogo Health Inc. */

display: none;
padding: 0;
padding: 0.125em;
margin: 0;
border: 1px solid;
background: Menu;
will-change: transform;

@@ -15,0 +16,0 @@ transform-origin: top center;

@@ -88,3 +88,3 @@ /*! Copyright 2016 Ayogo Health Inc. */

} else {
oldMenu.style!.webkitTransitionDuration = '192ms';
(oldMenu.style as any).webkitTransitionDuration = '192ms';
}

@@ -95,3 +95,3 @@

} else {
oldMenu.style!.webkitTransform = 'scaleY(0)';
(oldMenu.style as any).webkitTransform = 'scaleY(0)';
}

@@ -122,3 +122,3 @@

static focusMenu() {
static focusMenu(offset = 1) {
if (!this.curMenu) {

@@ -139,3 +139,9 @@ return;

let mi = this.curMenu.children[this.focusCount % length] as HTMLElement;
mi.focus();
const role = mi.getAttribute('role');
if (role === 'presentation' || role === 'separator' || role === 'none') {
this.focusCount += offset;
this.focusMenu(offset);
} else {
mi.focus();
}
}

@@ -176,4 +182,12 @@

// Ensure the children are focusable
// Ensure the children are focusable, if they don't have a different role explicitly set already
for (let i = 0; i < menu.children.length; i++) {
if (menu.children[i].tagName === 'HR') {
menu.children[i].setAttribute('role', 'separator');
}
if (menu.children[i].hasAttribute('role') && menu.children[i].getAttribute('role') !== 'menuitem') {
continue;
}
menu.children[i].setAttribute('tabindex', '-1');

@@ -212,6 +226,6 @@ menu.children[i].setAttribute('role', 'menuitem');

} else {
menu.style!.webkitTransform = 'scaleY(0)';
(menu.style as any).webkitTransform = 'scaleY(0)';
requestAnimationFrame(() => {
menu.style.webkitTransform = 'scaleY(1)';
(menu.style as any).webkitTransform = 'scaleY(1)';
});

@@ -312,3 +326,3 @@ }

}
MenuManager.focusMenu();
MenuManager.focusMenu(-1);
}

@@ -324,3 +338,3 @@

}
MenuManager.focusMenu();
MenuManager.focusMenu(1);
}

@@ -327,0 +341,0 @@

@@ -5,4 +5,2 @@ {

"declaration": false,
"inlineSourceMap": true,
"inlineSources": true,
"lib": ["es5", "dom", "es2015.collection"],

@@ -21,2 +19,3 @@ "module": "es2015",

"stripInternal": true,
"sourceMap": true,
"target": "es5"

@@ -23,0 +22,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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