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

@spectrum-web-components/shared

Package Overview
Dependencies
Maintainers
2
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.1.2 to 0.1.3

CHANGELOG.md

2

lib/focusable.d.ts

@@ -25,3 +25,3 @@ import { LitElement, CSSResultArray, PropertyValues } from 'lit-element';

private newTabindex?;
private oldTabindex?;
private oldTabindex;
readonly focusElement: HTMLElement;

@@ -28,0 +28,0 @@ focus(): void;

@@ -43,2 +43,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

this.isShiftTabbing = false;
this.newTabindex = 0;
this.oldTabindex = 0;
}

@@ -61,5 +63,2 @@ static get styles() {

firstUpdated() {
if (!this.hasAttribute('tabindex')) {
this.tabIndex = 0;
}
if (this.autofocus) {

@@ -124,5 +123,3 @@ this.focus();

else if (oldDisabled) {
if (this.oldTabindex !== undefined) {
this.tabIndex = this.oldTabindex;
}
this.tabIndex = this.oldTabindex;
this.removeAttribute('aria-disabled');

@@ -129,0 +126,0 @@ }

@@ -21,3 +21,3 @@ {

],
"version": "0.1.2",
"version": "0.1.3",
"description": "",

@@ -39,3 +39,3 @@ "main": "lib/index.js",

},
"gitHead": "3d7176f688fee7746b52556ecba4df15c2342948"
"gitHead": "5112887821c1408c1c4121949a4f91743c98ff6a"
}

@@ -34,3 +34,3 @@ /*

@property({ type: Boolean, reflect: true })
public disabled: boolean = false;
public disabled = false;

@@ -41,3 +41,3 @@ /**

@property({ type: Boolean })
public autofocus: boolean = false;
public autofocus = false;

@@ -49,7 +49,7 @@ /**

@property({ type: Number, reflect: true })
public tabIndex: number = 0;
public tabIndex = 0;
private isShiftTabbing: boolean = false;
private newTabindex?: number;
private oldTabindex?: number;
private isShiftTabbing = false;
private newTabindex?: number = 0;
private oldTabindex = 0;

@@ -73,6 +73,2 @@ public get focusElement(): HTMLElement {

protected firstUpdated(): void {
if (!this.hasAttribute('tabindex')) {
this.tabIndex = 0;
}
if (this.autofocus) {

@@ -156,5 +152,3 @@ this.focus();

} else if (oldDisabled) {
if (this.oldTabindex !== undefined) {
this.tabIndex = this.oldTabindex;
}
this.tabIndex = this.oldTabindex;
this.removeAttribute('aria-disabled');

@@ -161,0 +155,0 @@ }

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