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.16.1 to 0.17.0

57

CHANGELOG.md
# Change Log
## 0.17.0
### Minor Changes
- 72067c0d: **BREAKING** Upgrade to [lit](https://lit.dev/) version 2
This does not change any of the public APIs of lion.
It however effects you when you have your own extension layer or your own components especially when using directives.
See the [official lit upgrade guide](https://lit.dev/docs/releases/upgrade/).
**BREAKING** Upgrade to [ScopedElements](https://open-wc.org/docs/development/scoped-elements/) version 2
This version of `@open-wc/scoped-elements` is now following the [Scoped Custom Element Registries](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md) and automatically loads a polyfill [@webcomponents/scoped-custom-element-registry](https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry).
This means tag names are no longer being rewritten with a hash.
```js
import { css, LitElement } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { MyButton } from './MyButton.js';
export class MyElement extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return {
'my-button': MyButton,
};
}
render() {
return html`
<my-button>click me</my-button>
`;
}
}
```
```html
<!-- before (ScopedElements 1.x) -->
<my-element>
#shadow-root
<my-button-23243424>click me</my-button-23243424>
</my-element>
<!-- after (ScopedElements 2.x) -->
<my-element>
#shadow-root
<my-button>click me</my-button>
</my-element>
```
### Patch Changes
- Updated dependencies [72067c0d]
- @lion/core@0.18.0
- @lion/form-core@0.14.0
- @lion/helpers@0.9.0
## 0.16.1

@@ -4,0 +61,0 @@

20

custom-elements.json

@@ -398,22 +398,2 @@ {

{
"kind": "method",
"name": "requestUpdateInternal",
"privacy": "public",
"description": "We synchronously update aria-checked to support voice over on safari.",
"parameters": [
{
"name": "name",
"type": {
"text": "PropertyKey"
}
},
{
"name": "oldValue",
"type": {
"text": "?"
}
}
]
},
{
"kind": "field",

@@ -420,0 +400,0 @@ "name": "role",

8

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

@@ -41,5 +41,5 @@ "license": "MIT",

"dependencies": {
"@lion/core": "0.17.0",
"@lion/form-core": "0.13.0",
"@lion/helpers": "0.8.0"
"@lion/core": "0.18.0",
"@lion/form-core": "0.14.0",
"@lion/helpers": "0.9.0"
},

@@ -46,0 +46,0 @@ "keywords": [

@@ -1,4 +0,4 @@

declare const LionSwitch_base: typeof LionField & import("@open-wc/dedupe-mixin").Constructor<import("@lion/form-core/types/choice-group/ChoiceInputMixinTypes").ChoiceInputHost> & Pick<typeof import("@lion/form-core/types/choice-group/ChoiceInputMixinTypes").ChoiceInputHost, "prototype" | "styles"> & import("@open-wc/dedupe-mixin").Constructor<import("@lion/form-core/types/FormatMixinTypes").FormatHost> & Pick<typeof import("@lion/form-core/types/FormatMixinTypes").FormatHost, "prototype"> & Pick<typeof import("lit-element").LitElement, "prototype" | "render" | "styles" | "getStyles" | "properties" | "observedAttributes" | "createProperty"> & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost> & typeof import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost;
declare const LionSwitch_base: typeof LionField & import("@open-wc/dedupe-mixin").Constructor<import("@lion/form-core/types/choice-group/ChoiceInputMixinTypes").ChoiceInputHost> & Pick<typeof import("@lion/form-core/types/choice-group/ChoiceInputMixinTypes").ChoiceInputHost, "prototype" | "styles"> & import("@open-wc/dedupe-mixin").Constructor<import("@lion/form-core/types/FormatMixinTypes").FormatHost> & Pick<typeof import("@lion/form-core/types/FormatMixinTypes").FormatHost, "prototype"> & Pick<typeof import("@lion/core").LitElement, "prototype" | "_$litElement$" | "enabledWarnings" | "enableWarning" | "disableWarning" | "addInitializer" | "_initializers" | "elementProperties" | "properties" | "elementStyles" | "styles" | "observedAttributes" | "createProperty" | "shadowRootOptions"> & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/node_modules/@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
export class LionSwitch extends LionSwitch_base {
static get styles(): (CSSStyleSheet | import("@lion/core").CSSResult | import("lit-element").CSSResultArray)[];
static get styles(): import("lit").CSSResultGroup[];
static get scopedElements(): {

@@ -5,0 +5,0 @@ 'lion-switch-button': typeof LionSwitchButton;

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

get _inputNode() {
return /** @type {LionSwitchButton} */ (Array.from(this.children).find(
el => el.slot === 'input',
));
return /** @type {LionSwitchButton} */ (
Array.from(this.children).find(el => el.slot === 'input')
);
}

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

@@ -1,2 +0,2 @@

declare const LionSwitchButton_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledWithTabIndexMixinTypes").DisabledWithTabIndexHost> & Pick<typeof import("@lion/core/types/DisabledWithTabIndexMixinTypes").DisabledWithTabIndexHost, "prototype"> & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledMixinTypes").DisabledHost> & Pick<typeof import("@lion/core/types/DisabledMixinTypes").DisabledHost, "prototype"> & Pick<typeof LitElement, "prototype" | "render" | "styles" | "getStyles" | "properties" | "observedAttributes" | "createProperty">;
declare const LionSwitchButton_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledWithTabIndexMixinTypes").DisabledWithTabIndexHost> & Pick<typeof import("@lion/core/types/DisabledWithTabIndexMixinTypes").DisabledWithTabIndexHost, "prototype"> & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledMixinTypes").DisabledHost> & Pick<typeof import("@lion/core/types/DisabledMixinTypes").DisabledHost, "prototype"> & Pick<typeof LitElement, "prototype" | "_$litElement$" | "enabledWarnings" | "enableWarning" | "disableWarning" | "addInitializer" | "_initializers" | "elementProperties" | "properties" | "elementStyles" | "styles" | "observedAttributes" | "createProperty" | "shadowRootOptions">;
export class LionSwitchButton extends LionSwitchButton_base {

@@ -13,3 +13,3 @@ static get properties(): {

};
static get styles(): import("@lion/core").CSSResult[];
static get styles(): import("lit").CSSResultGroup[];
value: string;

@@ -16,0 +16,0 @@ role: string;

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

*/
requestUpdateInternal(name, oldValue) {
super.requestUpdateInternal(name, oldValue);
requestUpdate(name, oldValue) {
super.requestUpdate(name, oldValue);
if (this.isConnected && name === 'checked' && this.checked !== oldValue) {

@@ -164,0 +164,0 @@ this.__checkedStateChange();

export type LionSwitchButton = import("../src/LionSwitchButton").LionSwitchButton;
export type TemplateResult = import("@lion/core").TemplateResult;
export type TemplateResult = {
_$litType$: 1 | 2;
strings: TemplateStringsArray;
values: unknown[];
};

@@ -1,2 +0,3 @@

import { expect, fixture as _fixture, html } from '@open-wc/testing';
import { expect, fixture as _fixture } from '@open-wc/testing';
import { html } from 'lit/static-html.js';
import sinon from 'sinon';

@@ -3,0 +4,0 @@ import '@lion/switch/define-switch-button';

export type LionSwitchButton = import("..").LionSwitchButton;
export type TemplateResult = import("@lion/core").TemplateResult;
export type TemplateResult = {
_$litType$: 1 | 2;
strings: TemplateStringsArray;
values: unknown[];
};
export type FormControlHost = import("@lion/form-core/types/FormControlMixinTypes").FormControlHost;

@@ -1,2 +0,3 @@

import { expect, fixture as _fixture, html } from '@open-wc/testing';
import { expect, fixture as _fixture } from '@open-wc/testing';
import { html } from 'lit/static-html.js';
import sinon from 'sinon';

@@ -3,0 +4,0 @@ import { Validator } from '@lion/form-core';

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