-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path64.f2f189489709d5cf6e9d.js
1 lines (1 loc) · 7.03 KB
/
64.f2f189489709d5cf6e9d.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{Q4Z5:function(e,t,i){"use strict";i.r(t),i.d(t,"ion_radio",function(){return s}),i.d(t,"ion_radio_group",function(){return d});var o=i("9TBO"),n=i("VKG5"),r=(i("Ansa"),i("j5a+")),a=i("l1ru"),c=i("3z3p"),s=function(){function e(e){var t=this;Object(n.l)(this,e),this.inputId="ion-rb-"+l++,this.name=this.inputId,this.disabled=!1,this.checked=!1,this.onFocus=function(){t.ionFocus.emit()},this.onBlur=function(){t.ionBlur.emit()},this.onClick=function(){t.checked?t.ionDeselect.emit():t.checked=!0},this.ionStyle=Object(n.d)(this,"ionStyle",7),this.ionSelect=Object(n.d)(this,"ionSelect",7),this.ionDeselect=Object(n.d)(this,"ionDeselect",7),this.ionFocus=Object(n.d)(this,"ionFocus",7),this.ionBlur=Object(n.d)(this,"ionBlur",7)}return e.prototype.colorChanged=function(){this.emitStyle()},e.prototype.checkedChanged=function(e){e&&this.ionSelect.emit({checked:!0,value:this.value}),this.emitStyle()},e.prototype.disabledChanged=function(){this.emitStyle()},e.prototype.componentWillLoad=function(){void 0===this.value&&(this.value=this.inputId),this.emitStyle()},e.prototype.emitStyle=function(){this.ionStyle.emit({"radio-checked":this.checked,"interactive-disabled":this.disabled})},e.prototype.render=function(){var e,t=this,i=t.inputId,o=t.disabled,c=t.checked,s=t.color,l=t.el,d=Object(n.e)(this),u=i+"-lbl",h=Object(a.f)(l);return h&&(h.id=u),Object(n.i)(n.a,{onClick:this.onClick,role:"radio","aria-disabled":o?"true":null,"aria-checked":""+c,"aria-labelledby":u,class:Object.assign({},Object(r.a)(s),(e={},e[d]=!0,e["in-item"]=Object(r.c)("ion-item",l),e.interactive=!0,e["radio-checked"]=c,e["radio-disabled"]=o,e))},Object(n.i)("div",{class:"radio-icon"},Object(n.i)("div",{class:"radio-inner"})),Object(n.i)("button",{type:"button",onFocus:this.onFocus,onBlur:this.onBlur,disabled:o}))},Object.defineProperty(e.prototype,"el",{get:function(){return Object(n.f)(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{color:["colorChanged"],checked:["checkedChanged"],disabled:["disabledChanged"]}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return':host{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;contain:layout size style}.radio-icon,button{width:100%;height:100%}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}:host-context([dir=rtl]) button,[dir=rtl] button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--color:var(--ion-color-step-400,#999);--color-checked:var(--ion-color-primary,#3880ff);--border-width:2px;--border-style:solid;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:50%;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:50%;width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0,0,0);transform:scale3d(0,0,0);-webkit-transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}:host(.radio-disabled){opacity:.3}:host(.ion-focused) .radio-icon:after{border-radius:50%;left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint,#4c8dff);content:"";opacity:.2}:host-context([dir=rtl]).ion-focused .radio-icon:after,:host-context([dir=rtl]):host(.ion-focused) .radio-icon:after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}'},enumerable:!0,configurable:!0}),e}(),l=0,d=function(){function e(e){var t=this;Object(n.l)(this,e),this.inputId="ion-rg-"+u++,this.labelId=this.inputId+"-lbl",this.allowEmptySelection=!1,this.name=this.inputId,this.onSelect=function(e){var i=e.target;i&&(t.value=i.value)},this.onDeselect=function(e){var i=e.target;i&&(i.checked=!1,t.value=void 0)},this.ionChange=Object(n.d)(this,"ionChange",7)}return e.prototype.valueChanged=function(e){this.updateRadios(),this.ionChange.emit({value:e})},e.prototype.connectedCallback=function(){return o.a(this,void 0,void 0,function(){var e,t,i,n,r=this;return o.c(this,function(o){switch(o.label){case 0:return(t=(e=this.el).querySelector("ion-list-header")||e.querySelector("ion-item-divider"))&&(i=t.querySelector("ion-label"))&&(this.labelId=i.id=this.name+"-lbl"),void 0!==this.value?[3,2]:void 0===(n=Object(c.a)(e,"ion-radio"))?[3,2]:[4,n.componentOnReady()];case 1:o.sent(),void 0===this.value&&(this.value=n.value),o.label=2;case 2:return this.mutationO=Object(c.b)(e,"ion-radio",function(e){void 0!==e?e.componentOnReady().then(function(){r.value=e.value}):r.updateRadios()}),this.updateRadios(),[2]}})})},e.prototype.disconnectedCallback=function(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)},e.prototype.updateRadios=function(){return o.a(this,void 0,void 0,function(){var e,t,i,n,r,a;return o.c(this,function(o){switch(o.label){case 0:return e=this.value,[4,this.getRadios()];case 1:for(t=o.sent(),i=!1,n=0,r=t;n<r.length;n++)a=r[n],i||a.value!==e?a.checked=!1:(i=!0,a.checked=!0);return i||(this.value=void 0),[2]}})})},e.prototype.getRadios=function(){return Promise.all(Array.from(this.el.querySelectorAll("ion-radio")).map(function(e){return e.componentOnReady()}))},e.prototype.render=function(){return Object(n.i)(n.a,{role:"radiogroup","aria-labelledby":this.labelId,onIonSelect:this.onSelect,onIonDeselect:this.allowEmptySelection?this.onDeselect:void 0,class:Object(n.e)(this)})},Object.defineProperty(e.prototype,"el",{get:function(){return Object(n.f)(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:!0,configurable:!0}),e}(),u=0}}]);