UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

1 lines • 2.47 kB
import{A as e,I as t,s as n,u as r,z as i}from"./i18n.store-Bn0-vXNV.js";import{$t as a,At as o,Dt as s,Ot as c,Pt as l,Qt as u,Vt as d,ir as f,rn as p}from"./_plugin-vue_export-helper-CSr60JSh.js";r(),t();var m=d({target:[Object,Array]},`v-dialog-transition`),h=new WeakMap,g=l()({name:`VDialogTransition`,props:m(),setup(t,{slots:r}){let a={onBeforeEnter(e){e.style.pointerEvents=`none`,e.style.visibility=`hidden`},async onEnter(e,n){await new Promise(e=>requestAnimationFrame(e)),await new Promise(e=>requestAnimationFrame(e)),e.style.visibility=``;let r=v(t.target,e),{x:i,y:a,sx:s,sy:l,speed:d}=r;if(h.set(e,r),f())u(e,[{opacity:0},{}],{duration:125*d,easing:c}).finished.then(()=>n());else{let t=u(e,[{transform:`translate(${i}px, ${a}px) scale(${s}, ${l})`,opacity:0},{}],{duration:225*d,easing:c});_(e)?.forEach(e=>{u(e,[{opacity:0},{opacity:0,offset:.33},{}],{duration:450*d,easing:o})}),t.finished.then(()=>n())}},onAfterEnter(e){e.style.removeProperty(`pointer-events`)},onBeforeLeave(e){e.style.pointerEvents=`none`},async onLeave(e,n){await new Promise(e=>requestAnimationFrame(e));let r;r=!h.has(e)||Array.isArray(t.target)||t.target.offsetParent||t.target.getClientRects().length?v(t.target,e):h.get(e);let{x:i,y:a,sx:c,sy:l,speed:d}=r;f()?u(e,[{},{opacity:0}],{duration:85*d,easing:s}).finished.then(()=>n()):(u(e,[{},{transform:`translate(${i}px, ${a}px) scale(${c}, ${l})`,opacity:0}],{duration:125*d,easing:s}).finished.then(()=>n()),_(e)?.forEach(e=>{u(e,[{},{opacity:0,offset:.2},{opacity:0}],{duration:250*d,easing:o})}))},onAfterLeave(e){e.style.removeProperty(`pointer-events`)}};return()=>t.target?e(n,i({name:`dialog-transition`},a,{css:!1}),r):e(n,{name:`dialog-transition`},r)}});function _(e){let t=e.querySelector(`:scope > .v-card, :scope > .v-sheet, :scope > .v-list`)?.children;return t&&[...t]}function v(e,t){let n=p(e),r=a(t),[i,o]=getComputedStyle(t).transformOrigin.split(` `).map(e=>parseFloat(e)),[s,c]=getComputedStyle(t).getPropertyValue(`--v-overlay-anchor-origin`).split(` `),l=n.left+n.width/2;s===`left`||c===`left`?l-=n.width/2:(s===`right`||c===`right`)&&(l+=n.width/2);let u=n.top+n.height/2;s===`top`||c===`top`?u-=n.height/2:(s===`bottom`||c===`bottom`)&&(u+=n.height/2);let d=n.width/r.width,f=n.height/r.height,m=Math.max(1,d,f),h=d/m||0,g=f/m||0,_=r.width*r.height/(window.innerWidth*window.innerHeight),v=_>.12?Math.min(1.5,(_-.12)*10+1):1;return{x:l-(i+r.left),y:u-(o+r.top),sx:h,sy:g,speed:v}}export{g as t};