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.3.13 to 0.4.0

11

CHANGELOG.md

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

# [0.4.0](https://github.com/ing-bank/lion/compare/@lion/switch@0.3.13...@lion/switch@0.4.0) (2019-12-13)
### Features
* **field:** add wrappers to allow label left of input ([5413ad1](https://github.com/ing-bank/lion/commit/5413ad130fac76235609ea735aea6c41467f1b22))
## [0.3.13](https://github.com/ing-bank/lion/compare/@lion/switch@0.3.12...@lion/switch@0.3.13) (2019-12-11)

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

12

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

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

"dependencies": {
"@lion/button": "0.4.3",
"@lion/choice-input": "0.4.9",
"@lion/button": "0.4.4",
"@lion/choice-input": "0.4.10",
"@lion/core": "0.3.0",
"@lion/field": "0.6.8"
"@lion/field": "0.7.0"
},
"devDependencies": {
"@lion/localize": "0.7.1",
"@lion/validate": "0.5.2",
"@lion/validate": "0.5.3",
"@open-wc/demoing-storybook": "^0.2.0",

@@ -48,3 +48,3 @@ "@open-wc/testing": "^2.3.4",

},
"gitHead": "e3389ad233c261689fd246df18440a21f66ed0dd"
"gitHead": "e51bf720e5eef3575d07083a7fead0d10cf056e6"
}

@@ -26,7 +26,25 @@ import { html, css } from '@lion/core';

/**
* Restore original render function from FormControlMixin.js
* As it gets overwritten in ChoiceInputMixin
*/
render() {
return html`
<div class="input-switch__container">
${this.labelTemplate()} ${this.helpTextTemplate()} ${this.feedbackTemplate()}
<div class="form-field__group-one">
${this.groupOneTemplate()}
</div>
<div class="form-field__group-two">
${this.groupTwoTemplate()}
</div>
`;
}
groupOneTemplate() {
return html`
${this.labelTemplate()} ${this.helpTextTemplate()} ${this.feedbackTemplate()}
`;
}
groupTwoTemplate() {
return html`
${this.inputGroupTemplate()}

@@ -33,0 +51,0 @@ `;

@@ -22,4 +22,4 @@ import { storiesOf, html } from '@open-wc/demoing-storybook';

class IsTrue extends Validator {
constructor() {
super();
constructor(...args) {
super(...args);
this.name = 'IsTrue';

@@ -41,3 +41,3 @@ }

label="Subscribe to newsletter"
.validators="${[new IsTrue(null, { type: 'info' })]}"
.validators="${[new IsTrue()]}"
></lion-switch>

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