@ionic/core
Version:
Base components for Ionic
4 lines • 3.05 kB
JavaScript
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
import{d as t,H as i,h as e,f as s,t as a}from"./p-Ct2aBEue.js";import{b as n}from"./p-HthJZjZ6.js";const o=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.activateTimeouts=[],this.activated=!1,this.side="bottom"}activatedChanged(t){this.activateTimeouts.forEach(clearTimeout),this.activateTimeouts=[];const i=Array.from(this.el.querySelectorAll("ion-fab-button")),e=t?30:0;i.forEach(((i,s)=>{this.activateTimeouts.push(setTimeout((()=>i.show=t),s*e))}))}disconnectedCallback(){this.activateTimeouts.forEach(clearTimeout),this.activateTimeouts=[]}render(){const t=n(this);return e(s,{key:"03a8920c29a93c6df4bab14753a78a8a30722ce8",class:{[t]:!0,"fab-list-active":this.activated,["fab-list-side-"+this.side]:!0}},e("slot",{key:"d9e1541cb044e209bc2dff14080f3b938a2b84ae"}))}get el(){return this}static get watchers(){return{activated:[{activatedChanged:0}]}}static get style(){return":host{margin-left:0;margin-right:0;margin-top:calc(100% + 10px);margin-bottom:calc(100% + 10px);display:none;position:absolute;top:0;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;min-width:56px;min-height:56px}:host(.fab-list-active){display:-ms-flexbox;display:flex}::slotted(.fab-button-in-list){margin-left:0;margin-right:0;margin-top:8px;margin-bottom:8px;width:40px;height:40px;-webkit-transform:scale(0);transform:scale(0);opacity:0;visibility:hidden}:host(.fab-list-side-top) ::slotted(.fab-button-in-list),:host(.fab-list-side-bottom) ::slotted(.fab-button-in-list){margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px}:host(.fab-list-side-start) ::slotted(.fab-button-in-list),:host(.fab-list-side-end) ::slotted(.fab-button-in-list){-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:5px;margin-inline-end:5px;margin-top:0;margin-bottom:0}::slotted(.fab-button-in-list.fab-button-show){-webkit-transform:scale(1);transform:scale(1);opacity:1;visibility:visible}:host(.fab-list-side-top){top:auto;bottom:0;-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.fab-list-side-start){-webkit-margin-start:calc(100% + 10px);margin-inline-start:calc(100% + 10px);-webkit-margin-end:calc(100% + 10px);margin-inline-end:calc(100% + 10px);margin-top:0;margin-bottom:0;-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.fab-list-side-start){inset-inline-end:0}:host(.fab-list-side-end){-webkit-margin-start:calc(100% + 10px);margin-inline-start:calc(100% + 10px);-webkit-margin-end:calc(100% + 10px);margin-inline-end:calc(100% + 10px);margin-top:0;margin-bottom:0;-ms-flex-direction:row;flex-direction:row}:host(.fab-list-side-end){inset-inline-start:0}"}},[257,"ion-fab-list",{activated:[4],side:[1]},void 0,{activated:[{activatedChanged:0}]}]),r=o,l=function(){"undefined"!=typeof customElements&&["ion-fab-list"].forEach((t=>{"ion-fab-list"===t&&(customElements.get(a(t))||customElements.define(a(t),o))}))};export{r as IonFabList,l as defineCustomElement}