Socket
Socket
Sign inDemoInstall

@lion/switch

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/switch - npm Package Compare versions

Comparing version 0.12.15 to 0.12.16

10

CHANGELOG.md
# Change Log
## 0.12.16
### Patch Changes
- f98aab23: Make \_\_toggleChecked protected property (\_toggleChecked)
- Updated dependencies [77114753]
- Updated dependencies [f98aab23]
- Updated dependencies [f98aab23]
- @lion/form-core@0.7.2
## 0.12.15

@@ -4,0 +14,0 @@

4

package.json
{
"name": "@lion/switch",
"version": "0.12.15",
"version": "0.12.16",
"description": "A Switch is used for switching a property or feature on and off",

@@ -38,3 +38,3 @@ "license": "MIT",

"@lion/core": "0.13.8",
"@lion/form-core": "0.7.1",
"@lion/form-core": "0.7.2",
"@lion/helpers": "0.5.20"

@@ -41,0 +41,0 @@ },

@@ -83,3 +83,3 @@ import { css, html, ScopedElementsMixin } from '@lion/core';

if (this._labelNode) {
this._labelNode.addEventListener('click', this.__toggleChecked);
this._labelNode.addEventListener('click', this._toggleChecked);
}

@@ -98,3 +98,3 @@ this._syncButtonSwitch();

if (this._labelNode) {
this._labelNode.removeEventListener('click', this.__toggleChecked);
this._labelNode.removeEventListener('click', this._toggleChecked);
}

@@ -101,0 +101,0 @@ }

@@ -17,3 +17,3 @@ declare const LionSwitchButton_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledWithTabIndexMixinTypes").DisabledWithTabIndexHost> & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledMixinTypes").DisabledHost>;

checked: boolean;
__toggleChecked(): void;
_toggleChecked(): void;
/**

@@ -20,0 +20,0 @@ * @param {KeyboardEvent} e

@@ -80,3 +80,3 @@ import { html, css, LitElement, DisabledWithTabIndexMixin } from '@lion/core';

this.checked = false;
this.__toggleChecked = this.__toggleChecked.bind(this);
this._toggleChecked = this._toggleChecked.bind(this);
this.__handleKeydown = this.__handleKeydown.bind(this);

@@ -89,3 +89,3 @@ this.__handleKeyup = this.__handleKeyup.bind(this);

this.setAttribute('aria-checked', `${this.checked}`);
this.addEventListener('click', this.__toggleChecked);
this.addEventListener('click', this._toggleChecked);
this.addEventListener('keydown', this.__handleKeydown);

@@ -97,3 +97,3 @@ this.addEventListener('keyup', this.__handleKeyup);

super.disconnectedCallback();
this.removeEventListener('click', this.__toggleChecked);
this.removeEventListener('click', this._toggleChecked);
this.removeEventListener('keydown', this.__handleKeydown);

@@ -103,3 +103,3 @@ this.removeEventListener('keyup', this.__handleKeyup);

__toggleChecked() {
_toggleChecked() {
if (this.disabled) {

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

if ([32 /* space */, 13 /* enter */].indexOf(e.keyCode) !== -1) {
this.__toggleChecked();
this._toggleChecked();
}

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