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 • 6.02 kB
JavaScript
import{A as e,F as t,I as n,c as r,s as i,u as a,z as o}from"./i18n.store-Bkc9i0ZB.js";import{$t as s,At as c,Dt as l,Ot as u,Pt as d,Qt as f,Vt as p,ir as m,rn as h}from"./_plugin-vue_export-helper-BZ1AqotW.js";n(),a();var g=p({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},`transition`);function _(e,n,a){return d()({name:e,props:g({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 v(e,n,a=`in-out`){return d()({name:e,props:{mode:{type:String,default:a},disabled:{type:Boolean,default:m()},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 y(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}}a(),n();var b=p({target:[Object,Array]},`v-dialog-transition`),x=new WeakMap,S=d()({name:`VDialogTransition`,props:b(),setup(t,{slots:n}){let r={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=w(t.target,e),{x:i,y:a,sx:o,sy:s,speed:l}=r;if(x.set(e,r),m())f(e,[{opacity:0},{}],{duration:125*l,easing:u}).finished.then(()=>n());else{let t=f(e,[{transform:`translate(${i}px, ${a}px) scale(${o}, ${s})`,opacity:0},{}],{duration:225*l,easing:u});C(e)?.forEach(e=>{f(e,[{opacity:0},{opacity:0,offset:.33},{}],{duration:450*l,easing:c})}),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=!x.has(e)||Array.isArray(t.target)||t.target.offsetParent||t.target.getClientRects().length?w(t.target,e):x.get(e);let{x:i,y:a,sx:o,sy:s,speed:u}=r;m()?f(e,[{},{opacity:0}],{duration:85*u,easing:l}).finished.then(()=>n()):(f(e,[{},{transform:`translate(${i}px, ${a}px) scale(${o}, ${s})`,opacity:0}],{duration:125*u,easing:l}).finished.then(()=>n()),C(e)?.forEach(e=>{f(e,[{},{opacity:0,offset:.2},{opacity:0}],{duration:250*u,easing:c})}))},onAfterLeave(e){e.style.removeProperty(`pointer-events`)}};return()=>t.target?e(i,o({name:`dialog-transition`},r,{css:!1}),n):e(i,{name:`dialog-transition`},n)}});function C(e){let t=e.querySelector(`:scope > .v-card, :scope > .v-sheet, :scope > .v-list`)?.children;return t&&[...t]}function w(e,t){let n=h(e),r=s(t),[i,a]=getComputedStyle(t).transformOrigin.split(` `).map(e=>parseFloat(e)),[o,c]=getComputedStyle(t).getPropertyValue(`--v-overlay-anchor-origin`).split(` `),l=n.left+n.width/2;o===`left`||c===`left`?l-=n.width/2:(o===`right`||c===`right`)&&(l+=n.width/2);let u=n.top+n.height/2;o===`top`||c===`top`?u-=n.height/2:(o===`bottom`||c===`bottom`)&&(u+=n.height/2);let d=n.width/r.width,f=n.height/r.height,p=Math.max(1,d,f),m=d/p||0,g=f/p||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-(a+r.top),sx:m,sy:g,speed:v}}var T=_(`fab-transition`,`center center`,`out-in`),E=_(`dialog-bottom-transition`),D=_(`dialog-top-transition`),O=_(`fade-transition`),k=_(`scale-transition`),A=_(`scroll-x-transition`),j=_(`scroll-x-reverse-transition`),M=_(`scroll-y-transition`),N=_(`scroll-y-reverse-transition`),P=_(`slide-x-transition`),F=_(`slide-x-reverse-transition`),I=_(`slide-y-transition`),L=_(`slide-y-reverse-transition`),R=v(`expand-transition`,y()),z=v(`expand-x-transition`,y(``,`x`)),B=v(`expand-both-transition`,y(``,`both`));export{S as _,z as a,k as c,N as d,M as f,I as g,L as h,R as i,j as l,P as m,D as n,T as o,F as p,B as r,O as s,E as t,A as u};