| Index: third_party/polymer/v0_8/components-chromium/paper-radio-button/paper-radio-button-extracted.js
|
| diff --git a/third_party/polymer/v0_8/components-chromium/paper-radio-button/paper-radio-button-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-radio-button/paper-radio-button-extracted.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..81b0561a24f6a36fd4c6a48c99f06d57c554be97
|
| --- /dev/null
|
| +++ b/third_party/polymer/v0_8/components-chromium/paper-radio-button/paper-radio-button-extracted.js
|
| @@ -0,0 +1,74 @@
|
| +
|
| + Polymer({
|
| + is: 'paper-radio-button',
|
| +
|
| + behaviors: [
|
| + Polymer.PaperRadioButtonBehavior
|
| + ],
|
| +
|
| + hostAttributes: {
|
| + role: 'radio',
|
| + 'aria-checked': false,
|
| + tabindex: 0
|
| + },
|
| +
|
| + properties: {
|
| + /**
|
| + * Fired when the checked state changes due to user interaction.
|
| + *
|
| + * @event change
|
| + */
|
| +
|
| + /**
|
| + * Fired when the checked state changes.
|
| + *
|
| + * @event iron-change
|
| + */
|
| +
|
| + /**
|
| + * Gets or sets the state, `true` is checked and `false` is unchecked.
|
| + */
|
| + checked: {
|
| + type: Boolean,
|
| + value: false,
|
| + reflectToAttribute: true,
|
| + notify: true,
|
| + observer: '_checkedChanged'
|
| + },
|
| +
|
| + /**
|
| + * If true, the button toggles the active state with each tap or press
|
| + * of the spacebar.
|
| + */
|
| + toggles: {
|
| + type: Boolean,
|
| + value: true,
|
| + reflectToAttribute: true
|
| + }
|
| + },
|
| +
|
| + ready: function() {
|
| + if (Polymer.dom(this).textContent == '') {
|
| + this.$.radioLabel.hidden = true;
|
| + } else {
|
| + this.setAttribute('aria-label', Polymer.dom(this).textContent);
|
| + }
|
| + this._isReady = true;
|
| + },
|
| +
|
| + _buttonStateChanged: function() {
|
| + if (this.disabled) {
|
| + return;
|
| + }
|
| + if (this._isReady) {
|
| + this.checked = this.active;
|
| + }
|
| + },
|
| +
|
| + _checkedChanged: function() {
|
| + this.setAttribute('aria-checked', this.checked ? 'true' : 'false');
|
| + this.active = this.checked;
|
| + this.fire('iron-change');
|
| + }
|
| + })
|
| +
|
|
|