calcite-radio-button-group.entry.js 4.7 KB

123456
  1. /*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.82
  5. */
  6. import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-8ece2564.js";import{c as createObserver}from"./observers-b198f831.js";var radioButtonGroupCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:-ms-flexbox;display:flex;max-width:100vw}:host([layout=horizontal]){-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}:host([layout=horizontal][scale=s]){gap:1rem}:host([layout=horizontal][scale=m]){gap:1.25rem}:host([layout=horizontal][scale=l]){gap:1.5rem}:host([layout=vertical]){-ms-flex-direction:column;flex-direction:column}";var RadioButtonGroup=function(){function t(t){var a=this;registerInstance(this,t);this.calciteRadioButtonGroupChange=createEvent(this,"calciteRadioButtonGroupChange",7);this.disabled=false;this.hidden=false;this.layout="horizontal";this.required=false;this.scale="m";this.mutationObserver=createObserver("mutation",(function(){return a.passPropsToRadioButtons()}));this.passPropsToRadioButtons=function(){var t=a.el.querySelectorAll("calcite-radio-button");if(t.length>0){t.forEach((function(t){t.disabled=a.disabled||t.disabled;t.hidden=a.hidden;t.name=a.name;t.required=a.required;t.scale=a.scale}))}}}t.prototype.onDisabledChange=function(){this.passPropsToRadioButtons()};t.prototype.onHiddenChange=function(){this.passPropsToRadioButtons()};t.prototype.onLayoutChange=function(){this.passPropsToRadioButtons()};t.prototype.onScaleChange=function(){this.passPropsToRadioButtons()};t.prototype.connectedCallback=function(){var t;this.passPropsToRadioButtons();(t=this.mutationObserver)===null||t===void 0?void 0:t.observe(this.el,{childList:true,subtree:true})};t.prototype.disconnectedCallback=function(){var t;(t=this.mutationObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.radioButtonChangeHandler=function(t){this.calciteRadioButtonGroupChange.emit(t.target.value)};t.prototype.render=function(){return h(Host,{role:"radiogroup"},h("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:["onDisabledChange"],hidden:["onHiddenChange"],layout:["onLayoutChange"],scale:["onScaleChange"]}},enumerable:false,configurable:true});return t}();RadioButtonGroup.style=radioButtonGroupCss;export{RadioButtonGroup as calcite_radio_button_group};