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 • 5.99 kB
JavaScript
import{A as e,F as t,R as n,c as r,s as i}from"./i18n.store-B-qxQMr8.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-Cw5qm5mn.js";var m=d({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},`transition`);function h(e,n,a){return l()({name:e,props:m({mode:a,origin:n}),setup(n,{slots:a}){let o={onBeforeEnter(e){n.origin&&(e.style.transformOrigin=n.origin)},onLeave(e){if(n.leaveAbsolute){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;e._transitionInitialStyles={position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height},e.style.position=`absolute`,e.style.top=`${t}px`,e.style.left=`${n}px`,e.style.width=`${r}px`,e.style.height=`${i}px`}n.hideOnLeave&&e.style.setProperty(`display`,`none`,`important`)},onAfterLeave(e){if(n.leaveAbsolute&&e?._transitionInitialStyles){let{position:t,top:n,left:r,width:i,height:a}=e._transitionInitialStyles;delete e._transitionInitialStyles,e.style.position=t||``,e.style.top=n||``,e.style.left=r||``,e.style.width=i||``,e.style.height=a||``}}};return()=>t(n.group?r:i,{name:n.disabled?``:e,css:!n.disabled,...n.group?void 0:{mode:n.mode},...n.disabled?{}:o},a.default)}})}function g(e,n,a=`in-out`){return l()({name:e,props:{mode:{type:String,default:a},disabled:{type:Boolean,default:f()},group:Boolean,hideOnLeave:Boolean},setup(a,{slots:o}){let s=a.group?r:i;return()=>t(s,{name:a.disabled?``:e,css:!a.disabled,...a.disabled?{}:{...n,onLeave:e=>{a.hideOnLeave?e.style.setProperty(`display`,`none`,`important`):n.onLeave?.(e)}}},o.default)}})}function _(e=``,t=`y`){return{onBeforeEnter(e){e._parent=e.parentNode,e._initialStyle={transition:e.style.transition,overflow:e.style.overflow,width:e.style.width,height:e.style.height}},onEnter(n){let r=n._initialStyle;if(!r)return;n.style.setProperty(`transition`,`none`,`important`),n.style.overflow=`hidden`;let i=`${n.offsetWidth}px`,a=`${n.offsetHeight}px`;[`x`,`both`].includes(t)&&(n.style.width=`0`),[`y`,`both`].includes(t)&&(n.style.height=`0`),n.offsetHeight,n.style.transition=r.transition,e&&n._parent&&n._parent.classList.add(e),requestAnimationFrame(()=>{[`x`,`both`].includes(t)&&(n.style.width=i),[`y`,`both`].includes(t)&&(n.style.height=a)})},onAfterEnter:r,onEnterCancelled:r,onLeave(e){e._initialStyle={transition:``,overflow:e.style.overflow,width:e.style.width,height:e.style.height},e.style.overflow=`hidden`,[`x`,`both`].includes(t)&&(e.style.width=`${e.offsetWidth}px`),[`y`,`both`].includes(t)&&(e.style.height=`${e.offsetHeight}px`),e.offsetHeight,requestAnimationFrame(()=>{[`x`,`both`].includes(t)&&(e.style.width=`0`),[`y`,`both`].includes(t)&&(e.style.height=`0`)})},onAfterLeave:n,onLeaveCancelled:n};function n(t){e&&t._parent&&t._parent.classList.remove(e),r(t)}function r(e){if(!e._initialStyle)return;let{width:n,height:r}=e._initialStyle;e.style.overflow=e._initialStyle.overflow,n!=null&&[`x`,`both`].includes(t)&&(e.style.width=n),r!=null&&[`y`,`both`].includes(t)&&(e.style.height=r),delete e._initialStyle}}var v=d({target:[Object,Array]},`v-dialog-transition`),y=new WeakMap,b=l()({name:`VDialogTransition`,props:v(),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=S(t.target,e),{x:i,y:a,sx:s,sy:l,speed:d}=r;if(y.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});x(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=!y.has(e)||Array.isArray(t.target)||t.target.offsetParent||t.target.getClientRects().length?S(t.target,e):y.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()),x(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(i,n({name:`dialog-transition`},a,{css:!1}),r):e(i,{name:`dialog-transition`},r)}});function x(e){let t=e.querySelector(`:scope > .v-card, :scope > .v-sheet, :scope > .v-list`)?.children;return t&&[...t]}function S(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}}var C=h(`fab-transition`,`center center`,`out-in`),w=h(`dialog-bottom-transition`),T=h(`dialog-top-transition`),E=h(`fade-transition`),D=h(`scale-transition`),O=h(`scroll-x-transition`),k=h(`scroll-x-reverse-transition`),A=h(`scroll-y-transition`),j=h(`scroll-y-reverse-transition`),M=h(`slide-x-transition`),N=h(`slide-x-reverse-transition`),P=h(`slide-y-transition`),F=h(`slide-y-reverse-transition`),I=g(`expand-transition`,_()),L=g(`expand-x-transition`,_(``,`x`)),R=g(`expand-both-transition`,_(``,`both`));export{b as _,L as a,D as c,j as d,A as f,P as g,F as h,I as i,k as l,M as m,T as n,C as o,N as p,R as r,E as s,w as t,O as u};