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

@spectrum-web-components/button

Package Overview
Dependencies
Maintainers
6
Versions
299
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spectrum-web-components/button - npm Package Compare versions

Comparing version 0.13.5 to 0.13.6

6

CHANGELOG.md

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

## [0.13.6](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/button@0.13.5...@spectrum-web-components/button@0.13.6) (2021-04-15)
### Bug Fixes
- **button:** no double link clicks ([02d576c](https://github.com/adobe/spectrum-web-components/commit/02d576c89561ba9459feb1efdba613ea289e808c))
## [0.13.5](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/button@0.13.4...@spectrum-web-components/button@0.13.5) (2021-04-09)

@@ -8,0 +14,0 @@

6

package.json
{
"name": "@spectrum-web-components/button",
"version": "0.13.5",
"version": "0.13.6",
"publishConfig": {

@@ -34,3 +34,2 @@ "access": "public"

},
"customElementsManifest": "custom-elements.json",
"files": [

@@ -60,2 +59,3 @@ "*.d.ts",

"types": "./src/index.d.ts",
"customElementsManifest": "custom-elements.json",
"sideEffects": [

@@ -65,3 +65,3 @@ "./sp-*.js",

],
"gitHead": "1bd2f11dc1f2485a583e02fb5163ec5f5804df66"
"gitHead": "8acfee43ce3be5d4a6da4cf1179d3400bca77968"
}

@@ -35,3 +35,3 @@ import { TemplateResult, CSSResultArray, PropertyValues } from '@spectrum-web-components/base';

private handlePointerdown;
private manageRole;
private manageAnchor;
protected firstUpdated(changed: PropertyValues): void;

@@ -38,0 +38,0 @@ protected updated(changed: PropertyValues): void;

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

handled = true;
this.anchorElement.classList.remove('clicking');
}

@@ -157,8 +156,10 @@ else if (this.type !== 'button') {

}
manageRole() {
manageAnchor() {
if (this.href && this.href.length > 0) {
this.removeAttribute('role');
this.removeEventListener('click', this.shouldProxyClick);
}
else if (!this.hasAttribute('role')) {
this.setAttribute('role', 'button');
this.addEventListener('click', this.shouldProxyClick);
}

@@ -171,4 +172,3 @@ }

}
this.manageRole();
this.addEventListener('click', this.shouldProxyClick);
this.manageAnchor();
this.addEventListener('keydown', this.handleKeydown);

@@ -181,3 +181,3 @@ this.addEventListener('keypress', this.handleKeypress);

if (changed.has('href')) {
this.manageRole();
this.manageAnchor();
}

@@ -184,0 +184,0 @@ if (changed.has('label')) {

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

handled = true;
this.anchorElement.classList.remove('clicking');
} else if (this.type !== 'button') {

@@ -197,7 +196,9 @@ const proxy = document.createElement('button');

private manageRole(): void {
private manageAnchor(): void {
if (this.href && this.href.length > 0) {
this.removeAttribute('role');
this.removeEventListener('click', this.shouldProxyClick);
} else if (!this.hasAttribute('role')) {
this.setAttribute('role', 'button');
this.addEventListener('click', this.shouldProxyClick);
}

@@ -211,4 +212,3 @@ }

}
this.manageRole();
this.addEventListener('click', this.shouldProxyClick);
this.manageAnchor();
this.addEventListener('keydown', this.handleKeydown);

@@ -222,3 +222,3 @@ this.addEventListener('keypress', this.handleKeypress);

if (changed.has('href')) {
this.manageRole();
this.manageAnchor();
}

@@ -225,0 +225,0 @@ if (changed.has('label')) {

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