@lion/switch
Advanced tools
Comparing version 0.3.13 to 0.4.0
@@ -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 @@ |
{ | ||
"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 @@ `; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20473
398
+ Added@lion/button@0.4.4(transitive)
+ Added@lion/choice-input@0.4.10(transitive)
+ Added@lion/field@0.7.0(transitive)
+ Added@lion/validate@0.5.3(transitive)
- Removed@lion/button@0.4.3(transitive)
- Removed@lion/choice-input@0.4.9(transitive)
- Removed@lion/field@0.6.8(transitive)
- Removed@lion/validate@0.5.2(transitive)
Updated@lion/button@0.4.4
Updated@lion/choice-input@0.4.10
Updated@lion/field@0.7.0