1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-07-02 00:59:23 +00:00
Classworks/assets/VTooltip-1sQCtODC.js

2 lines
1.5 KiB
JavaScript

import{g as S,p as h,a7 as x,aU as T,aL as k,t as u,r as p,f as n,Z as d,j as I,aE as v,k as R,aO as w,aa as A,aZ as B}from"./index-ByVcHmHP.js";const C=h({id:String,interactive:Boolean,text:String,...A(B({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:null}),["absolute","persistent"])},"VTooltip"),Z=S()({name:"VTooltip",props:C(),emits:{"update:modelValue":t=>!0},setup(t,g){let{slots:e}=g;const i=x(t,"modelValue"),{scopeId:f}=T(),m=k(),r=u(()=>t.id||`v-tooltip-${m}`),l=p(),V=n(()=>t.location.split(" ").length>1?t.location:t.location+" center"),P=n(()=>t.origin==="auto"||t.origin==="overlap"||t.origin.split(" ").length>1||t.location.split(" ").length>1?t.origin:t.origin+" center"),y=u(()=>t.transition!=null?t.transition:i.value?"scale-transition":"fade-transition"),b=n(()=>d({"aria-describedby":r.value},t.activatorProps));return I(()=>{const O=v.filterProps(t);return R(v,d({ref:l,class:["v-tooltip",{"v-tooltip--interactive":t.interactive},t.class],style:t.style,id:r.value},O,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a,transition:y.value,absolute:!0,location:V.value,origin:P.value,persistent:!0,role:"tooltip",activatorProps:b.value,_disableGlobalStack:!0},f),{activator:e.activator,default:function(){var c;for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return((c=e.default)==null?void 0:c.call(e,...s))??t.text}})}),w({},l)}});export{Z as V};