New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/vaadin-menu-bar

Package Overview
Dependencies
Maintainers
16
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-menu-bar - npm Package Compare versions

Comparing version 1.1.0-alpha1 to 1.1.0-alpha2

11

package.json

@@ -13,3 +13,3 @@ {

"name": "@vaadin/vaadin-menu-bar",
"version": "1.1.0-alpha1",
"version": "1.1.0-alpha2",
"main": "vaadin-menu-bar.js",

@@ -28,2 +28,3 @@ "author": "Vaadin Ltd",

"@webcomponents/webcomponentsjs": "2.2.0",
"@webcomponents/webcomponentsjs": "2.2.0",
"inherits": "2.0.3",

@@ -44,3 +45,9 @@ "samsam": "1.1.3",

},
"devDependencies": {
"scripts": {
"generate-typings": "gen-typescript-declarations --outDir . --verify"
},
"scripts": {
"generate-typings": "gen-typescript-declarations --outDir . --verify"
},
"devDependencies": {
"@polymer/iron-component-page": "^4.0.0",

@@ -47,0 +54,0 @@ "@polymer/iron-test-helpers": "^3.0.0",

2

src/vaadin-menu-bar-button.js

@@ -24,3 +24,3 @@ /**

/**
* @memberof Vaadin
* @extends PolymerElement
*/

@@ -27,0 +27,0 @@ class MenuBarButtonElement extends ButtonElement {

@@ -68,2 +68,3 @@ /**

const containerWidth = container.offsetWidth;
const isRTL = this.getAttribute('dir') === 'rtl';

@@ -82,3 +83,6 @@ if (container.offsetWidth < container.scrollWidth) {

const btnWidth = btn.offsetWidth;
if ((btn.offsetLeft + btnWidth) < (containerWidth - overflow.offsetWidth)) {
if (
(!isRTL && (btn.offsetLeft + btnWidth) < (containerWidth - overflow.offsetWidth)) ||
(isRTL && btn.offsetLeft >= overflow.offsetWidth)
) {
break;

@@ -103,2 +107,3 @@ }

const btn = buttons[i];
const btnWidth = btn.getBoundingClientRect().width;

@@ -109,6 +114,6 @@ if (getComputedStyle(btn).visibility !== 'hidden') {

const overflowLeft = overflow.offsetLeft;
const btnWidth = btn.getBoundingClientRect().width;
if ((overflowLeft + overflow.offsetWidth + btnWidth) < containerWidth) {
if (
(!isRTL && (overflow.offsetLeft + overflow.offsetWidth + btnWidth) < containerWidth) ||
(isRTL && (btnWidth < overflow.offsetLeft))
) {
btn.disabled = btn.item.disabled;

@@ -115,0 +120,0 @@ btn.style.visibility = '';

@@ -214,4 +214,4 @@ /**

const endAligned = overlay.hasAttribute('end-aligned');
if (this.__isRTL) {
if (endAligned) {
if (endAligned) {
if (this.__isRTL) {
overlay.style.left = left + 'px';

@@ -221,4 +221,2 @@ } else {

}
} else if (endAligned) {
overlay.style.right = parseInt(getComputedStyle(overlay).right) - width + 'px';
}

@@ -303,3 +301,3 @@ }

button.dispatchEvent(new CustomEvent('opensubmenu', {detail: {
x: rect.left,
x: this.__isRTL ? rect.right : rect.left,
y: rect.bottom,

@@ -306,0 +304,0 @@ children: items

@@ -9,3 +9,3 @@ /**

/**
* @memberof Vaadin
* @extends PolymerElement
*/

@@ -12,0 +12,0 @@ class MenuBarSubmenuElement extends ContextMenuElement {

@@ -45,7 +45,7 @@ /**

*
* @memberof Vaadin
* @mixes Vaadin.MenuBar.ButtonsMixin
* @mixes Vaadin.MenuBar.InteractionsMixin
* @mixes Vaadin.ElementMixin
* @mixes Vaadin.ThemableMixin
* @extends PolymerElement
* @mixes MenuBar.ButtonsMixin
* @mixes MenuBar.InteractionsMixin
* @mixes ElementMixin
* @mixes ThemableMixin
* @demo demo/index.html

@@ -107,3 +107,3 @@ */

static get version() {
return '1.1.0-alpha1';
return '1.1.0-alpha2';
}

@@ -110,0 +110,0 @@

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