Socket
Socket
Sign inDemoInstall

@material/radio

Package Overview
Dependencies
Maintainers
1
Versions
1698
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/radio - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

dist/mdc.radio.min.js
/*!
Material Components for the web
Copyright (c) 2016 Google Inc.
Copyright (c) 2017 Google Inc.
License: Apache-2.0
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.radio=e():(t.mdc=t.mdc||{},t.mdc.radio=e())}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="/assets/",e(0)}([function(t,e,n){t.exports=n(25)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);Object.defineProperty(e,"MDCFoundation",{enumerable:!0,get:function(){return i(r).default}});var a=n(3);Object.defineProperty(e,"MDCComponent",{enumerable:!0,get:function(){return i(a).default}})},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.default=r},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(2),s=i(o),u=function(){function t(e,n){r(this,t),this.root_=e;for(var i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this.initialize.apply(this,a),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return a(t,null,[{key:"attachTo",value:function(e){return new t(e,new s.default)}}]),a(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=void 0;"function"==typeof CustomEvent?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(t,!1,!1,e)),this.root_.dispatchEvent(n)}}]),t}();e.default=u},function(t,e){"use strict";function n(t){var e=t.CSS&&"function"==typeof t.CSS.supports;if(e){var n=t.CSS.supports("--css-vars","yes"),i=t.CSS.supports("(--css-vars: yes)")&&t.CSS.supports("color","#00000000");return n||i}}function i(t){return["webkitMatchesSelector","msMatchesSelector","matches"].filter(function(e){return e in t}).pop()}function r(t,e,n){var i=!1,r=function r(){i||(i=!0,t.removeClass(e),t.deregisterInteractionHandler(n,r))};return t.registerInteractionHandler(n,r),t.addClass(e),r}function a(t,e,n){var i=e.x,r=e.y,a=i+n.left,o=r+n.top,s=void 0,u=void 0;return"touchend"===t.type?(s=t.changedTouches[0].pageX-a,u=t.changedTouches[0].pageY-o):(s=t.pageX-a,u=t.pageY-o),{left:s,top:u}}Object.defineProperty(e,"__esModule",{value:!0}),e.supportsCssVariables=n,e.getMatchesProperty=i,e.animateWithClass=r,e.getNormalizedEventCoords=a},,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=e.ROOT="mdc-ripple",i=e.UPGRADED=n+"-upgraded";e.cssClasses={ROOT:i,UNBOUNDED:i+"--unbounded",BG_ACTIVE:i+"--background-active",BG_BOUNDED_ACTIVE_FILL:i+"--background-bounded-active-fill",FG_BOUNDED_ACTIVE_FILL:i+"--foreground-bounded-active-fill",FG_UNBOUNDED_ACTIVATION:i+"--foreground-unbounded-activation",FG_UNBOUNDED_DEACTIVATION:i+"--foreground-unbounded-deactivation"},e.strings={VAR_SURFACE_WIDTH:"--"+n+"-surface-width",VAR_SURFACE_HEIGHT:"--"+n+"-surface-height",VAR_FG_SIZE:"--"+n+"-fg-size",VAR_FG_UNBOUNDED_OPACITY_DURATION:"--"+n+"-fg-unbounded-opacity-duration",VAR_FG_UNBOUNDED_TRANSFORM_DURATION:"--"+n+"-fg-unbounded-transform-duration",VAR_LEFT:"--"+n+"-left",VAR_TOP:"--"+n+"-top",VAR_XF_ORIGIN_X:"--"+n+"-xfo-x",VAR_XF_ORIGIN_Y:"--"+n+"-xfo-y",VAR_FG_APPROX_XF:"--"+n+"-fg-approx-xf",ANIMATION_END_EVENT:function(){var t=document.createElement("div");return"webkitAnimation"in t.style?"webkitAnimationEnd":"animationend"}(),TRANSITION_END_EVENT:function(){var t=document.createElement("div");return"webkitTransition"in t.style?"webkitTransitionEnd":"transitionend"}()},e.numbers={FG_TRANSFORM_DELAY_MS:80,OPACITY_DURATION_DIVISOR:3,ACTIVE_OPACITY_DURATION_MS:110,MIN_OPACITY_DURATION_MS:200,UNBOUNDED_TRANSFORM_DURATION_MS:200}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=n(1),c=n(6),d=n(4),f={mouseup:"mousedown",pointerup:"pointerdown",touchend:"touchstart",keyup:"keydown",blur:"focus"},l=function(t){function e(t){i(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o(e.defaultAdapter,t)));return n.layoutFrame_=0,n.frame_={width:0,height:0},n.activationState_=n.defaultActivationState_(),n.xfDuration_=0,n.maxRadius=0,n.listenerInfos_=[{activate:"touchstart",deactivate:"touchend"},{activate:"pointerdown",deactivate:"pointerup"},{activate:"mousedown",deactivate:"mouseup"},{activate:"keydown",deactivate:"keyup"},{focus:"focus",blur:"blur"}],n.listeners_={activate:function(t){return n.activate_(t)},deactivate:function(t){return n.deactivate_(t)},focus:function(){return requestAnimationFrame(function(){return n.adapter_.addClass(e.cssClasses.BG_ACTIVE)})},blur:function(){return requestAnimationFrame(function(){return n.adapter_.removeClass(e.cssClasses.BG_ACTIVE)})}},n.unboundedOpacityFadeTimer_=0,n.resizeHandler_=function(){return n.layout()},n.cancelBgBounded_=function(){},n.cancelFgBounded_=function(){},n.cancelFgUnbounded_=function(){},n}return a(e,t),s(e,[{key:"isSupported_",get:function(){return this.adapter_.browserSupportsCssVars()}}],[{key:"cssClasses",get:function(){return c.cssClasses}},{key:"strings",get:function(){return c.strings}},{key:"numbers",get:function(){return c.numbers}},{key:"defaultAdapter",get:function(){return{browserSupportsCssVars:function(){},isUnbounded:function(){},isSurfaceActive:function(){},addClass:function(){},removeClass:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},updateCssVariable:function(){},computeBoundingRect:function(){},getWindowPageOffset:function(){}}}}]),s(e,[{key:"defaultActivationState_",value:function(){return{isActivated:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1,activationStartTime:0,activationEvent:null}}},{key:"init",value:function(){var t=this;if(this.isSupported_){this.addEventListeners_();var n=e.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(i),t.adapter_.isUnbounded()&&t.adapter_.addClass(r),t.layoutInternal_()})}}},{key:"addEventListeners_",value:function(){var t=this;this.listenerInfos_.forEach(function(e){Object.keys(e).forEach(function(n){t.adapter_.registerInteractionHandler(e[n],t.listeners_[n])})}),this.adapter_.registerResizeHandler(this.resizeHandler_)}},{key:"activate_",value:function(t){var e=this,n=this.activationState_;n.isActivated||(n.isActivated=!0,n.activationEvent=t,n.wasActivatedByPointer="mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type,n.activationStartTime=Date.now(),requestAnimationFrame(function(){n.wasElementMadeActive="keydown"!==t.type||e.adapter_.isSurfaceActive(),n.wasElementMadeActive?e.animateActivation_():e.activationState_=e.defaultActivationState_()}))}},{key:"animateActivation_",value:function(){var t=this,n=e.cssClasses,i=n.BG_ACTIVE,r=n.BG_BOUNDED_ACTIVE_FILL,a=n.FG_UNBOUNDED_DEACTIVATION,o=n.FG_BOUNDED_ACTIVE_FILL;[r,a,o].forEach(function(e){return t.adapter_.removeClass(e)}),this.cancelBgBounded_(),this.cancelFgBounded_(),this.cancelFgUnbounded_(),this.unboundedOpacityFadeTimer_&&(clearTimeout(this.unboundedOpacityFadeTimer_),this.unboundedOpacityFadeTimer_=0),this.adapter_.addClass(i),this.adapter_.isUnbounded()&&this.animateUnboundedActivation_()}},{key:"animateUnboundedActivation_",value:function(){var t=e.cssClasses.FG_UNBOUNDED_ACTIVATION,n=void 0;n=this.activationState_.wasActivatedByPointer?(0,d.getNormalizedEventCoords)(this.activationState_.activationEvent,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{left:this.frame_.width/2,top:this.frame_.height/2};var i=n,r=i.left,a=i.top,o=e.strings,s=o.VAR_XF_ORIGIN_X,u=o.VAR_XF_ORIGIN_Y;this.adapter_.updateCssVariable(s,r+"px"),this.adapter_.updateCssVariable(u,a+"px"),this.adapter_.addClass(t)}},{key:"deactivate_",value:function(t){var e=this,n=this.activationState_;if(n.isActivated){var i=f[t.type],r=n.activationEvent.type,a=i===r,s=a;n.wasActivatedByPointer&&(s="mouseup"===t.type);var u=o({},this.activationState_);a&&requestAnimationFrame(function(){return e.animateDeactivation_(t,u)}),s&&(this.activationState_=this.defaultActivationState_())}}},{key:"animateDeactivation_",value:function(t,n){var i=n.wasActivatedByPointer,r=n.wasElementMadeActive,a=n.activationStartTime,o=e.cssClasses.BG_ACTIVE;if(i||r){this.adapter_.removeClass(o);var s="touchend"===t.type||"pointerup"===t.type||"mouseup"===t.type;this.adapter_.isUnbounded()?this.animateUnboundedDeactivation_(this.getUnboundedDeactivationInfo_(a)):this.animateBoundedDeactivation_(t,s)}}},{key:"animateUnboundedDeactivation_",value:function(t){var n=this,i=t.opacityDuration,r=t.transformDuration,a=t.approxCurScale,o=e.cssClasses,s=o.FG_UNBOUNDED_ACTIVATION,u=o.FG_UNBOUNDED_DEACTIVATION,c=e.strings,d=c.VAR_FG_UNBOUNDED_OPACITY_DURATION,f=c.VAR_FG_UNBOUNDED_TRANSFORM_DURATION,l=c.VAR_FG_APPROX_XF;this.adapter_.updateCssVariable(l,"scale("+a+")"),this.adapter_.updateCssVariable(d,i+"ms"),this.adapter_.updateCssVariable(f,r+"ms"),this.adapter_.addClass(u),this.adapter_.removeClass(s),this.unboundedOpacityFadeTimer_=setTimeout(function(){n.adapter_.removeClass(u)},i)}},{key:"getUnboundedDeactivationInfo_",value:function(t){var n=Date.now()-t,i=e.numbers,r=i.FG_TRANSFORM_DELAY_MS,a=i.OPACITY_DURATION_DIVISOR,o=i.ACTIVE_OPACITY_DURATION_MS,s=i.UNBOUNDED_TRANSFORM_DURATION_MS,u=i.MIN_OPACITY_DURATION_MS,c=0;n>r&&(c=Math.min((n-r)/this.xfDuration_,1));var d=s,f=Math.min(n/o,1),l=Math.max(u,1e3*f/a);return{transformDuration:d,opacityDuration:l,approxCurScale:c}}},{key:"animateBoundedDeactivation_",value:function(t,n){var i=void 0;i=n?(0,d.getNormalizedEventCoords)(t,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{left:this.frame_.width/2,top:this.frame_.height/2};var r=i,a=r.left,o=r.top,s=e.strings,u=s.VAR_LEFT,c=s.VAR_TOP,f=s.TRANSITION_END_EVENT,l=s.ANIMATION_END_EVENT,_=e.cssClasses,p=_.BG_BOUNDED_ACTIVE_FILL,v=_.FG_BOUNDED_ACTIVE_FILL;this.adapter_.updateCssVariable(u,a+"px"),this.adapter_.updateCssVariable(c,o+"px"),this.cancelBgBounded_=(0,d.animateWithClass)(this.adapter_,p,f),this.cancelFgBounded_=(0,d.animateWithClass)(this.adapter_,v,l)}},{key:"destroy",value:function(){var t=this;if(this.isSupported_){this.removeEventListeners_();var n=e.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(r),t.removeCssVars_()})}}},{key:"removeEventListeners_",value:function(){var t=this;this.listenerInfos_.forEach(function(e){Object.keys(e).forEach(function(n){t.adapter_.deregisterInteractionHandler(e[n],t.listeners_[n])})}),this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"removeCssVars_",value:function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})}},{key:"layout",value:function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){this.frame_=this.adapter_.computeBoundingRect();var t=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=Math.sqrt(2)*t/2,this.xfDuration_=1e3*Math.sqrt(this.maxRadius_/1024),this.updateLayoutCssVars_()}},{key:"updateLayoutCssVars_",value:function(){var t=2*this.maxRadius_,n=e.strings,i=n.VAR_SURFACE_WIDTH,r=n.VAR_SURFACE_HEIGHT,a=n.VAR_FG_SIZE,o=n.VAR_FG_UNBOUNDED_TRANSFORM_DURATION,s=n.VAR_LEFT,u=n.VAR_TOP;if(this.adapter_.updateCssVariable(i,this.frame_.width+"px"),this.adapter_.updateCssVariable(r,this.frame_.height+"px"),this.adapter_.updateCssVariable(a,t+"px"),this.adapter_.updateCssVariable(o,this.xfDuration_+"ms"),this.adapter_.isUnbounded()){var c=-(t/2)+this.frame_.width/2,d=-(t/2)+this.frame_.height/2;this.adapter_.updateCssVariable(s,c+"px"),this.adapter_.updateCssVariable(u,d+"px")}}}]),e}(u.MDCFoundation);e.default=l},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRipple=e.MDCRippleFoundation=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=n(1),c=n(7),d=i(c),f=n(4),l=(0,f.getMatchesProperty)(HTMLElement.prototype);e.MDCRippleFoundation=d.default;e.MDCRipple=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),s(e,[{key:"getDefaultFoundation",value:function(){return new d.default(e.createAdapter(this))}},{key:"initialSyncWithDOM",value:function(){this.unbounded="mdcRippleIsUnbounded"in this.root_.dataset}},{key:"unbounded",get:function(){return this.unbounded_},set:function(t){var e=d.default.cssClasses.UNBOUNDED;this.unbounded_=Boolean(t),this.unbounded_?this.root_.classList.add(e):this.root_.classList.remove(e)}}],[{key:"attachTo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.isUnbounded,r=void 0===i?void 0:i,a=new e(t);return void 0!==r&&(a.unbounded=r),a}},{key:"createAdapter",value:function(t){return{browserSupportsCssVars:function(){return(0,f.supportsCssVariables)(window)},isUnbounded:function(){return t.unbounded},isSurfaceActive:function(){return t.root_[l](":active")},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n)},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}}}]),e}(u.MDCComponent)},,,,,,,,,,,,,,,,function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=n(1),u="mdc-radio",c=function(t){function e(){return i(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),o(e,[{key:"isChecked",value:function(){return this.getNativeControl_().checked}},{key:"setChecked",value:function(t){this.getNativeControl_().checked=t}},{key:"isDisabled",value:function(){return this.getNativeControl_().disabled}},{key:"setDisabled",value:function(t){var n=e.cssClasses.DISABLED;this.getNativeControl_().disabled=t,t?this.adapter_.addClass(n):this.adapter_.removeClass(n)}},{key:"getNativeControl_",value:function(){return this.adapter_.getNativeControl()||{checked:!1,disabled:!1}}}],[{key:"cssClasses",get:function(){return{ROOT:u,DISABLED:u+"--disabled"}}},{key:"strings",get:function(){return{NATIVE_CONTROL_SELECTOR:"."+u+"__native-control"}}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},getNativeControl:function(){}}}}]),e}(s.MDCFoundation);e.default=c},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRadio=e.MDCRadioFoundation=void 0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},u=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,i)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(i)},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),d=n(1),f=n(8),l=n(24),_=i(l);e.MDCRadioFoundation=_.default;e.MDCRadio=function(t){function e(){var t;r(this,e);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var s=a(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(i)));return s.ripple_=s.initRipple_(),s}return o(e,t),c(e,[{key:"checked",get:function(){return this.foundation_.isChecked()},set:function(t){this.foundation_.setChecked(t)}},{key:"disabled",get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),c(e,[{key:"initRipple_",value:function(){var t=this,e=s(f.MDCRipple.createAdapter(this),{isUnbounded:function(){return!0},isSurfaceActive:function(){return!1},registerInteractionHandler:function(e,n){return t.nativeControl_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.nativeControl_.removeEventListener(e,n)},computeBoundingRect:function(){var e=t.root_.getBoundingClientRect(),n=e.left,i=e.top,r=40;return{top:i,left:n,right:n+r,bottom:i+r,width:r,height:r}}}),n=new f.MDCRippleFoundation(e);return new f.MDCRipple(this.root_,n)}},{key:"destroy",value:function(){this.ripple_.destroy(),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"getDefaultFoundation",value:function(){var t=this;return new _.default({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},getNativeControl:function(){return t.root_.querySelector(_.default.strings.NATIVE_CONTROL_SELECTOR)}})}},{key:"nativeControl_",get:function(){return this.root_.querySelector(_.default.strings.NATIVE_CONTROL_SELECTOR)}}]),e}(d.MDCComponent)}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.radio=e():(t.mdc=t.mdc||{},t.mdc.radio=e())}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="/assets/",e(0)}([function(t,e,n){t.exports=n(26)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);Object.defineProperty(e,"MDCFoundation",{enumerable:!0,get:function(){return i(r).default}});var a=n(3);Object.defineProperty(e,"MDCComponent",{enumerable:!0,get:function(){return i(a).default}})},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.default=r},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(2),s=i(o),u=function(){function t(e,n){r(this,t),this.root_=e;for(var i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this.initialize.apply(this,a),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return a(t,null,[{key:"attachTo",value:function(e){return new t(e,new s.default)}}]),a(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=void 0;"function"==typeof CustomEvent?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(t,!1,!1,e)),this.root_.dispatchEvent(n)}}]),t}();e.default=u},function(t,e){"use strict";function n(t){return void 0!==t.document&&"function"==typeof t.document.createElement}function i(t){return t in u||t in c}function r(t,e,n){switch(t){case"animationstart":case"animationend":case"animationiteration":return"animation"in n.style?e[t].noPrefix:e[t].webkitPrefix;case"transitionend":return"transition"in n.style?e[t].noPrefix:e[t].webkitPrefix;default:return e[t].noPrefix}}function a(t,e){if(!n(t)||!i(e))return e;var a=e in u?u:c,o=t.document.createElement("div"),s="";return s=a===u?r(e,a,o):a[e].noPrefix in o.style?a[e].noPrefix:a[e].webkitPrefix}function o(t,e){return a(t,e)}function s(t,e){return a(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.getCorrectEventName=o,e.getCorrectPropertyName=s;var u={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd"}},c={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}}},function(t,e){"use strict";function n(t){var e=t.CSS&&"function"==typeof t.CSS.supports;if(e){var n=t.CSS.supports("--css-vars","yes"),i=t.CSS.supports("(--css-vars: yes)")&&t.CSS.supports("color","#00000000");return n||i}}function i(t){return["webkitMatchesSelector","msMatchesSelector","matches"].filter(function(e){return e in t}).pop()}function r(t,e,n){var i=!1,r=function r(){i||(i=!0,t.removeClass(e),t.deregisterInteractionHandler(n,r))};return t.registerInteractionHandler(n,r),t.addClass(e),r}function a(t,e,n){var i=e.x,r=e.y,a=i+n.left,o=r+n.top,s=void 0,u=void 0;return"touchend"===t.type?(s=t.changedTouches[0].pageX-a,u=t.changedTouches[0].pageY-o):(s=t.pageX-a,u=t.pageY-o),{left:s,top:u}}Object.defineProperty(e,"__esModule",{value:!0}),e.supportsCssVariables=n,e.getMatchesProperty=i,e.animateWithClass=r,e.getNormalizedEventCoords=a},,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=e.ROOT="mdc-ripple",i=e.UPGRADED=n+"-upgraded";e.cssClasses={ROOT:i,UNBOUNDED:i+"--unbounded",BG_ACTIVE:i+"--background-active",BG_BOUNDED_ACTIVE_FILL:i+"--background-bounded-active-fill",FG_BOUNDED_ACTIVE_FILL:i+"--foreground-bounded-active-fill",FG_UNBOUNDED_ACTIVATION:i+"--foreground-unbounded-activation",FG_UNBOUNDED_DEACTIVATION:i+"--foreground-unbounded-deactivation"},e.strings={VAR_SURFACE_WIDTH:"--"+n+"-surface-width",VAR_SURFACE_HEIGHT:"--"+n+"-surface-height",VAR_FG_SIZE:"--"+n+"-fg-size",VAR_FG_UNBOUNDED_OPACITY_DURATION:"--"+n+"-fg-unbounded-opacity-duration",VAR_FG_UNBOUNDED_TRANSFORM_DURATION:"--"+n+"-fg-unbounded-transform-duration",VAR_LEFT:"--"+n+"-left",VAR_TOP:"--"+n+"-top",VAR_XF_ORIGIN_X:"--"+n+"-xfo-x",VAR_XF_ORIGIN_Y:"--"+n+"-xfo-y",VAR_FG_APPROX_XF:"--"+n+"-fg-approx-xf"},e.numbers={FG_TRANSFORM_DELAY_MS:80,OPACITY_DURATION_DIVISOR:3,ACTIVE_OPACITY_DURATION_MS:110,MIN_OPACITY_DURATION_MS:200,UNBOUNDED_TRANSFORM_DURATION_MS:200}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=n(1),c=n(4),d=n(7),f=n(5),l={mouseup:"mousedown",pointerup:"pointerdown",touchend:"touchstart",keyup:"keydown",blur:"focus"},_=function(t){function e(t){i(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o(e.defaultAdapter,t)));return n.layoutFrame_=0,n.frame_={width:0,height:0},n.activationState_=n.defaultActivationState_(),n.xfDuration_=0,n.maxRadius=0,n.listenerInfos_=[{activate:"touchstart",deactivate:"touchend"},{activate:"pointerdown",deactivate:"pointerup"},{activate:"mousedown",deactivate:"mouseup"},{activate:"keydown",deactivate:"keyup"},{focus:"focus",blur:"blur"}],n.listeners_={activate:function(t){return n.activate_(t)},deactivate:function(t){return n.deactivate_(t)},focus:function(){return requestAnimationFrame(function(){return n.adapter_.addClass(e.cssClasses.BG_ACTIVE)})},blur:function(){return requestAnimationFrame(function(){return n.adapter_.removeClass(e.cssClasses.BG_ACTIVE)})}},n.unboundedOpacityFadeTimer_=0,n.resizeHandler_=function(){return n.layout()},n.cancelBgBounded_=function(){},n.cancelFgBounded_=function(){},n.cancelFgUnbounded_=function(){},n}return a(e,t),s(e,[{key:"isSupported_",get:function(){return this.adapter_.browserSupportsCssVars()}}],[{key:"cssClasses",get:function(){return d.cssClasses}},{key:"strings",get:function(){return d.strings}},{key:"numbers",get:function(){return d.numbers}},{key:"defaultAdapter",get:function(){return{browserSupportsCssVars:function(){},isUnbounded:function(){},isSurfaceActive:function(){},addClass:function(){},removeClass:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},updateCssVariable:function(){},computeBoundingRect:function(){},getWindowPageOffset:function(){}}}}]),s(e,[{key:"defaultActivationState_",value:function(){return{isActivated:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1,activationStartTime:0,activationEvent:null}}},{key:"init",value:function(){var t=this;if(this.isSupported_){this.addEventListeners_();var n=e.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(i),t.adapter_.isUnbounded()&&t.adapter_.addClass(r),t.layoutInternal_()})}}},{key:"addEventListeners_",value:function(){var t=this;this.listenerInfos_.forEach(function(e){Object.keys(e).forEach(function(n){t.adapter_.registerInteractionHandler(e[n],t.listeners_[n])})}),this.adapter_.registerResizeHandler(this.resizeHandler_)}},{key:"activate_",value:function(t){var e=this,n=this.activationState_;n.isActivated||(n.isActivated=!0,n.activationEvent=t,n.wasActivatedByPointer="mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type,n.activationStartTime=Date.now(),requestAnimationFrame(function(){n.wasElementMadeActive="keydown"!==t.type||e.adapter_.isSurfaceActive(),n.wasElementMadeActive?e.animateActivation_():e.activationState_=e.defaultActivationState_()}))}},{key:"animateActivation_",value:function(){var t=this,n=e.cssClasses,i=n.BG_ACTIVE,r=n.BG_BOUNDED_ACTIVE_FILL,a=n.FG_UNBOUNDED_DEACTIVATION,o=n.FG_BOUNDED_ACTIVE_FILL;[r,a,o].forEach(function(e){return t.adapter_.removeClass(e)}),this.cancelBgBounded_(),this.cancelFgBounded_(),this.cancelFgUnbounded_(),this.unboundedOpacityFadeTimer_&&(clearTimeout(this.unboundedOpacityFadeTimer_),this.unboundedOpacityFadeTimer_=0),this.adapter_.addClass(i),this.adapter_.isUnbounded()&&this.animateUnboundedActivation_()}},{key:"animateUnboundedActivation_",value:function(){var t=e.cssClasses.FG_UNBOUNDED_ACTIVATION,n=void 0;n=this.activationState_.wasActivatedByPointer?(0,f.getNormalizedEventCoords)(this.activationState_.activationEvent,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{left:this.frame_.width/2,top:this.frame_.height/2};var i=n,r=i.left,a=i.top,o=e.strings,s=o.VAR_XF_ORIGIN_X,u=o.VAR_XF_ORIGIN_Y;this.adapter_.updateCssVariable(s,r+"px"),this.adapter_.updateCssVariable(u,a+"px"),this.adapter_.addClass(t)}},{key:"deactivate_",value:function(t){var e=this,n=this.activationState_;if(n.isActivated){var i=l[t.type],r=n.activationEvent.type,a=i===r,s=a;n.wasActivatedByPointer&&(s="mouseup"===t.type);var u=o({},this.activationState_);a&&requestAnimationFrame(function(){return e.animateDeactivation_(t,u)}),s&&(this.activationState_=this.defaultActivationState_())}}},{key:"animateDeactivation_",value:function(t,n){var i=n.wasActivatedByPointer,r=n.wasElementMadeActive,a=n.activationStartTime,o=e.cssClasses.BG_ACTIVE;if(i||r){this.adapter_.removeClass(o);var s="touchend"===t.type||"pointerup"===t.type||"mouseup"===t.type;this.adapter_.isUnbounded()?this.animateUnboundedDeactivation_(this.getUnboundedDeactivationInfo_(a)):this.animateBoundedDeactivation_(t,s)}}},{key:"animateUnboundedDeactivation_",value:function(t){var n=this,i=t.opacityDuration,r=t.transformDuration,a=t.approxCurScale,o=e.cssClasses,s=o.FG_UNBOUNDED_ACTIVATION,u=o.FG_UNBOUNDED_DEACTIVATION,c=e.strings,d=c.VAR_FG_UNBOUNDED_OPACITY_DURATION,f=c.VAR_FG_UNBOUNDED_TRANSFORM_DURATION,l=c.VAR_FG_APPROX_XF;this.adapter_.updateCssVariable(l,"scale("+a+")"),this.adapter_.updateCssVariable(d,i+"ms"),this.adapter_.updateCssVariable(f,r+"ms"),this.adapter_.addClass(u),this.adapter_.removeClass(s),this.unboundedOpacityFadeTimer_=setTimeout(function(){n.adapter_.removeClass(u)},i)}},{key:"getUnboundedDeactivationInfo_",value:function(t){var n=Date.now()-t,i=e.numbers,r=i.FG_TRANSFORM_DELAY_MS,a=i.OPACITY_DURATION_DIVISOR,o=i.ACTIVE_OPACITY_DURATION_MS,s=i.UNBOUNDED_TRANSFORM_DURATION_MS,u=i.MIN_OPACITY_DURATION_MS,c=0;n>r&&(c=Math.min((n-r)/this.xfDuration_,1));var d=s,f=Math.min(n/o,1),l=Math.max(u,1e3*f/a);return{transformDuration:d,opacityDuration:l,approxCurScale:c}}},{key:"animateBoundedDeactivation_",value:function(t,n){var i=void 0;i=n?(0,f.getNormalizedEventCoords)(t,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{left:this.frame_.width/2,top:this.frame_.height/2};var r=i,a=r.left,o=r.top,s=e.strings,u=s.VAR_LEFT,d=s.VAR_TOP,l=e.cssClasses,_=l.BG_BOUNDED_ACTIVE_FILL,p=l.FG_BOUNDED_ACTIVE_FILL;this.adapter_.updateCssVariable(u,a+"px"),this.adapter_.updateCssVariable(d,o+"px"),this.cancelBgBounded_=(0,f.animateWithClass)(this.adapter_,_,(0,c.getCorrectEventName)(window,"transitionend")),this.cancelFgBounded_=(0,f.animateWithClass)(this.adapter_,p,(0,c.getCorrectEventName)(window,"animationend"))}},{key:"destroy",value:function(){var t=this;if(this.isSupported_){this.removeEventListeners_();var n=e.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(r),t.removeCssVars_()})}}},{key:"removeEventListeners_",value:function(){var t=this;this.listenerInfos_.forEach(function(e){Object.keys(e).forEach(function(n){t.adapter_.deregisterInteractionHandler(e[n],t.listeners_[n])})}),this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"removeCssVars_",value:function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})}},{key:"layout",value:function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){this.frame_=this.adapter_.computeBoundingRect();var t=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=Math.sqrt(2)*t/2,this.xfDuration_=1e3*Math.sqrt(this.maxRadius_/1024),this.updateLayoutCssVars_()}},{key:"updateLayoutCssVars_",value:function(){var t=2*this.maxRadius_,n=e.strings,i=n.VAR_SURFACE_WIDTH,r=n.VAR_SURFACE_HEIGHT,a=n.VAR_FG_SIZE,o=n.VAR_FG_UNBOUNDED_TRANSFORM_DURATION,s=n.VAR_LEFT,u=n.VAR_TOP;if(this.adapter_.updateCssVariable(i,this.frame_.width+"px"),this.adapter_.updateCssVariable(r,this.frame_.height+"px"),this.adapter_.updateCssVariable(a,t+"px"),this.adapter_.updateCssVariable(o,this.xfDuration_+"ms"),this.adapter_.isUnbounded()){var c=-(t/2)+this.frame_.width/2,d=-(t/2)+this.frame_.height/2;this.adapter_.updateCssVariable(s,c+"px"),this.adapter_.updateCssVariable(u,d+"px")}}}]),e}(u.MDCFoundation);e.default=_},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRipple=e.MDCRippleFoundation=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=n(1),c=n(8),d=i(c),f=n(5),l=(0,f.getMatchesProperty)(HTMLElement.prototype);e.MDCRippleFoundation=d.default;e.MDCRipple=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),s(e,[{key:"getDefaultFoundation",value:function(){return new d.default(e.createAdapter(this))}},{key:"initialSyncWithDOM",value:function(){this.unbounded="mdcRippleIsUnbounded"in this.root_.dataset}},{key:"unbounded",get:function(){return this.unbounded_},set:function(t){var e=d.default.cssClasses.UNBOUNDED;this.unbounded_=Boolean(t),this.unbounded_?this.root_.classList.add(e):this.root_.classList.remove(e)}}],[{key:"attachTo",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.isUnbounded,r=void 0===i?void 0:i,a=new e(t);return void 0!==r&&(a.unbounded=r),a}},{key:"createAdapter",value:function(t){return{browserSupportsCssVars:function(){return(0,f.supportsCssVariables)(window)},isUnbounded:function(){return t.unbounded},isSurfaceActive:function(){return t.root_[l](":active")},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n)},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}}}]),e}(u.MDCComponent)},,,,,,,,,,,,,,,,function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=n(1),u="mdc-radio",c=function(t){function e(){return i(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),o(e,[{key:"isChecked",value:function(){return this.getNativeControl_().checked}},{key:"setChecked",value:function(t){this.getNativeControl_().checked=t}},{key:"isDisabled",value:function(){return this.getNativeControl_().disabled}},{key:"setDisabled",value:function(t){var n=e.cssClasses.DISABLED;this.getNativeControl_().disabled=t,t?this.adapter_.addClass(n):this.adapter_.removeClass(n)}},{key:"getNativeControl_",value:function(){return this.adapter_.getNativeControl()||{checked:!1,disabled:!1}}}],[{key:"cssClasses",get:function(){return{ROOT:u,DISABLED:u+"--disabled"}}},{key:"strings",get:function(){return{NATIVE_CONTROL_SELECTOR:"."+u+"__native-control"}}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},getNativeControl:function(){}}}}]),e}(s.MDCFoundation);e.default=c},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRadio=e.MDCRadioFoundation=void 0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},u=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,i)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(i)},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),d=n(1),f=n(9),l=n(25),_=i(l);e.MDCRadioFoundation=_.default;e.MDCRadio=function(t){function e(){var t;r(this,e);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var s=a(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(i)));return s.ripple_=s.initRipple_(),s}return o(e,t),c(e,[{key:"checked",get:function(){return this.foundation_.isChecked()},set:function(t){this.foundation_.setChecked(t)}},{key:"disabled",get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),c(e,[{key:"initRipple_",value:function(){var t=this,e=s(f.MDCRipple.createAdapter(this),{isUnbounded:function(){return!0},isSurfaceActive:function(){return!1},registerInteractionHandler:function(e,n){return t.nativeControl_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.nativeControl_.removeEventListener(e,n)},computeBoundingRect:function(){var e=t.root_.getBoundingClientRect(),n=e.left,i=e.top,r=40;return{top:i,left:n,right:n+r,bottom:i+r,width:r,height:r}}}),n=new f.MDCRippleFoundation(e);return new f.MDCRipple(this.root_,n)}},{key:"destroy",value:function(){this.ripple_.destroy(),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"getDefaultFoundation",value:function(){var t=this;return new _.default({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},getNativeControl:function(){return t.root_.querySelector(_.default.strings.NATIVE_CONTROL_SELECTOR)}})}},{key:"nativeControl_",get:function(){return this.root_.querySelector(_.default.strings.NATIVE_CONTROL_SELECTOR)}}]),e}(d.MDCComponent)}])});
{
"name": "@material/radio",
"description": "The Material Components for the web radio component",
"version": "0.1.0",
"version": "0.1.1",
"license": "Apache-2.0",

@@ -12,7 +12,7 @@ "main": "index.js",

"dependencies": {
"@material/animation": "^0.1.0",
"@material/animation": "^0.1.1",
"@material/base": "^0.1.0",
"@material/ripple": "^0.1.0",
"@material/ripple": "^0.1.1",
"@material/theme": "^0.1.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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