1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-07-03 01:39:22 +00:00
Classworks/assets/VTooltip-DWy6jMDt.js

2 lines
1.5 KiB
JavaScript

import{g as h,p as O,a6 as x,a_ as T,aJ as k,t as u,r as p,f as n,X as d,j as C,aC as v,k as I,aM as R,a9 as w,b4 as A}from"./index-DHJ8t5vF.js";const B=O({id:String,interactive:Boolean,text:String,...w(A({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"),j=h()({name:"VTooltip",props:B(),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 C(()=>{const S=v.filterProps(t);return I(v,d({ref:l,class:["v-tooltip",{"v-tooltip--interactive":t.interactive},t.class],style:t.style,id:r.value},S,{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}})}),R({},l)}});export{j as V};