(function(define){define(function(require,exports,module){ /*jshint esnext:true*/ 'use strict'; /** * Dependencies */ var component = require('gaia-component'); /** * Exports */ module.exports = component.register('gaia-button', { created: function() { this.setupShadowRoot(); this.els = { inner: this.shadowRoot.querySelector('.inner'), content: this.shadowRoot.querySelector('.content') }; this.circular = this.hasAttribute('circular'); this.disabled = this.hasAttribute('disabled'); this.setAttribute('role', 'button'); this.tabIndex = 0; }, attrs: { circular: { get: function() { this.getAttribute('circular'); }, set: function(value) { value = !!(value === '' || value); if (value) { this.setAttribute('circular', ''); this.els.inner.setAttribute('circular', ''); } else { this.removeAttribute('circular'); this.els.inner.removeAttribute('circular'); } } }, disabled: { get: function() { this.getAttribute('disabled'); }, set: function(value) { value = !!(value === '' || value); if (value) { this.setAttribute('disabled', ''); this.els.inner.setAttribute('disabled', ''); } else { this.removeAttribute('disabled'); this.els.inner.removeAttribute('disabled'); } } } }, template: `
` }); });})((function(n,w){return typeof define=='function'&&define.amd? define:typeof module=='object'?function(c){c(require,exports,module);}:function(c){ var m={exports:{}},r=function(n){return w[n];};w[n]=c(r,m.exports,m)||m.exports;};})('gaia-button',this));