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

@lion/button

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/button - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.5.4](https://github.com/ing-bank/lion/compare/@lion/button@0.5.3...@lion/button@0.5.4) (2020-02-06)
### Bug Fixes
* **button:** run regexp once instead of every render cycle ([954adc5](https://github.com/ing-bank/lion/commit/954adc56596f2d9244baf48889d6b338b2a12ac4))
## [0.5.3](https://github.com/ing-bank/lion/compare/@lion/button@0.5.2...@lion/button@0.5.3) (2020-01-30)

@@ -8,0 +19,0 @@

6

package.json
{
"name": "@lion/button",
"version": "0.5.3",
"version": "0.5.4",
"description": "A button that is easily styleable and accessible in all contexts",

@@ -35,3 +35,3 @@ "author": "ing-bank",

"dependencies": {
"@lion/core": "0.4.2"
"@lion/core": "0.4.3"
},

@@ -44,3 +44,3 @@ "devDependencies": {

},
"gitHead": "4ce24576a70c2b6d8e172557b2d7f6f1e820ee76"
"gitHead": "d67225984ce359c421e1c1e350da98819f83e452"
}

@@ -1,6 +0,11 @@

import { css, html, SlotMixin, DisabledWithTabIndexMixin, LitElement } from '@lion/core';
import {
css,
html,
browserDetection,
SlotMixin,
DisabledWithTabIndexMixin,
LitElement,
} from '@lion/core';
// eslint-disable-next-line class-methods-use-this
const isKeyboardClickEvent = e => e.keyCode === 32 /* space */ || e.keyCode === 13; /* enter */
// eslint-disable-next-line class-methods-use-this
const isSpaceKeyboardClickEvent = e => e.keyCode === 32; /* space */

@@ -30,3 +35,3 @@

${this._renderBefore()}
${this.constructor.__isIE11()
${browserDetection.isIE11
? html`

@@ -157,3 +162,3 @@ <div id="${this._buttonId}"><slot></slot></div>

if (this.constructor.__isIE11()) {
if (browserDetection.isIE11) {
this._buttonId = `button-${Math.random()

@@ -260,8 +265,2 @@ .toString(36)

}
static __isIE11() {
const ua = window.navigator.userAgent;
const result = /Trident/.test(ua);
return result;
}
}

@@ -12,3 +12,3 @@ import { expect, fixture, html, aTimeout, oneEvent } from '@open-wc/testing';

} from '@polymer/iron-test-helpers/mock-interactions.js';
import { LionButton } from '../src/LionButton.js';
import { browserDetection } from '@lion/core';

@@ -25,12 +25,2 @@ import '../lion-button.js';

let originalIsIE11Method;
function mockIsIE11() {
originalIsIE11Method = LionButton.__isIE11;
LionButton.__isIE11 = () => true;
}
function restoreMockIsIE11() {
LionButton.__isIE11 = originalIsIE11Method;
}
describe('lion-button', () => {

@@ -217,3 +207,3 @@ it('behaves like native `button` in terms of a11y', async () => {

it('has an aria-labelledby and wrapper element in IE11', async () => {
mockIsIE11();
const browserDetectionStub = sinon.stub(browserDetection, 'isIE11').value(true);
const el = await fixture(`<lion-button>foo</lion-button>`);

@@ -226,3 +216,3 @@ expect(el.hasAttribute('aria-labelledby')).to.be.true;

);
restoreMockIsIE11();
browserDetectionStub.restore();
});

@@ -229,0 +219,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