@material/mwc-radio
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -35,6 +35,6 @@ /** | ||
return { | ||
checked: Boolean, | ||
disabled: Boolean, | ||
value: String, | ||
name: String, | ||
checked: {type: Boolean}, | ||
disabled: {type: Boolean}, | ||
value: {type: String}, | ||
name: {type: String}, | ||
}; | ||
@@ -66,15 +66,16 @@ } | ||
_renderStyle() { | ||
renderStyle() { | ||
return style; | ||
} | ||
_render({checked, value, name}) { | ||
render() { | ||
const {checked, value, name} = this; | ||
return html` | ||
${this._renderStyle()} | ||
${this.renderStyle()} | ||
<div class="mdc-radio"> | ||
<input class="mdc-radio__native-control" type="radio" | ||
checked="${checked}" name="${name}" value="${value}" | ||
on-change="${this._boundInputChangeHandler}" | ||
on-focus="${this._boundInputFocusHandler}" | ||
on-blur="${this._boundInputBlurHandler}"> | ||
.checked="${checked}" .name="${name}" .value="${value}" | ||
@change="${this._boundInputChangeHandler}" | ||
@focus="${this._boundInputFocusHandler}" | ||
@blur="${this._boundInputBlurHandler}"> | ||
<div class="mdc-radio__background"> | ||
@@ -96,7 +97,9 @@ <div class="mdc-radio__outer-circle"></div> | ||
get checked() { | ||
return this._getProperty('checked'); | ||
return this.__checked; | ||
} | ||
set checked(value) { | ||
this._setProperty('checked', value); | ||
const old = this.checked; | ||
this.__checked = value; | ||
this.requestUpdate('checked', old); | ||
if (this._selectionController) { | ||
@@ -120,3 +123,3 @@ this._selectionController.update(this); | ||
get name() { | ||
return this._getProperty('name'); | ||
return this.__name; | ||
} | ||
@@ -128,3 +131,5 @@ | ||
} | ||
this._setProperty('name', value); | ||
const old = this.name; | ||
this.__name = value; | ||
this.requestUpdate('name', old); | ||
if (this._selectionController) { | ||
@@ -131,0 +136,0 @@ this._selectionController.register(this); |
{ | ||
"name": "@material/mwc-radio", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -16,5 +16,5 @@ "main": "mwc-radio.js", | ||
"dependencies": { | ||
"@material/mwc-base": "^0.1.2", | ||
"@material/mwc-base": "^0.2.0", | ||
"@material/radio": "^0.35.0", | ||
"@polymer/lit-element": "^0.5.2" | ||
"@polymer/lit-element": "^0.6.0" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
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
15333
156
+ Added@material/mwc-base@0.2.1(transitive)
+ Added@polymer/lit-element@0.6.5(transitive)
+ Addedlit-html@1.4.1(transitive)
- Removed@material/mwc-base@0.1.2(transitive)
- Removed@polymer/lit-element@0.5.2(transitive)
- Removed@polymer/polymer@3.5.1(transitive)
- Removed@webcomponents/shadycss@1.11.2(transitive)
- Removedlit-html@0.10.2(transitive)
Updated@material/mwc-base@^0.2.0
Updated@polymer/lit-element@^0.6.0