v-onboarding 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/v-onboarding.es.js
CHANGED
|
@@ -997,6 +997,12 @@ const _sfc_main = defineComponent({
|
|
|
997
997
|
const isFinished = computed(() => {
|
|
998
998
|
return index.value >= props.steps.length || index.value < 0;
|
|
999
999
|
});
|
|
1000
|
+
const destroyIsFinishedWatcher = watch(isFinished, (newValue) => {
|
|
1001
|
+
if (!newValue)
|
|
1002
|
+
return;
|
|
1003
|
+
exit();
|
|
1004
|
+
destroyIsFinishedWatcher();
|
|
1005
|
+
});
|
|
1000
1006
|
const start = () => {
|
|
1001
1007
|
setIndex(0);
|
|
1002
1008
|
};
|
package/dist/v-onboarding.umd.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
M${
|
|
1
|
+
(function(j,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("vue"),require("@popperjs/core")):typeof define=="function"&&define.amd?define(["exports","vue","@popperjs/core"],r):(j=typeof globalThis!="undefined"?globalThis:j||self,r(j["v-onboarding"]={},j.Vue,j.core))})(this,function(j,r,ie){"use strict";function at(o){return typeof o=="string"?document.querySelector(o):typeof o=="function"?o():null}const st={popper:{},overlay:{enabled:!0,padding:0,borderRadius:0},scrollToStep:{enabled:!0,options:{behavior:"smooth",block:"center",inline:"center"}},labels:{previousButton:"Previous",nextButton:"Next",finishButton:"Finish"},hideButtons:{previous:!1,next:!1}};function ae(){var y,T,P,U;const o=r.ref(""),m=r.ref(null),B=r.ref((T=(y=st.overlay)==null?void 0:y.padding)!=null?T:0),_=r.ref((U=(P=st.overlay)==null?void 0:P.borderRadius)!=null?U:0),u=()=>{C(m.value,{padding:B.value,borderRadius:_.value})},C=async(v,w=st.overlay)=>{var J,a,c,S,E,O,z,G,R,k,W,q;if(!v)return;const{innerWidth:I,innerHeight:L}=window,{left:M,top:N,width:x,height:tt}=v.getBoundingClientRect(),$=typeof w.padding=="number"?{top:w.padding,right:w.padding,bottom:w.padding,left:w.padding}:w.padding,d=typeof w.borderRadius=="number"?{leftTop:w.borderRadius,rightTop:w.borderRadius,rightBottom:w.borderRadius,leftBottom:w.borderRadius}:w.borderRadius,f={top:N-((J=$==null?void 0:$.top)!=null?J:0),right:M+x+((a=$==null?void 0:$.right)!=null?a:0),bottom:N+tt+((c=$==null?void 0:$.bottom)!=null?c:0),left:M-((S=$==null?void 0:$.left)!=null?S:0)},H={leftTop:`M${f.left+((E=d==null?void 0:d.leftTop)!=null?E:0)},${f.top} Q${f.left},${f.top} ${f.left},${f.top+((O=d==null?void 0:d.leftTop)!=null?O:0)}`,rightTop:`V${f.top+((z=d==null?void 0:d.rightTop)!=null?z:0)} Q${f.right},${f.top} ${f.right-((G=d==null?void 0:d.rightTop)!=null?G:0)},${f.top}`,rightBottom:`H${f.right-((R=d==null?void 0:d.rightBottom)!=null?R:0)} Q${f.right},${f.bottom} ${f.right},${f.bottom-((k=d==null?void 0:d.rightBottom)!=null?k:0)}`,leftBottom:`V${f.bottom-((W=d==null?void 0:d.leftBottom)!=null?W:0)} Q${f.left},${f.bottom} ${f.left+((q=d==null?void 0:d.leftBottom)!=null?q:0)},${f.bottom}`};o.value=`
|
|
2
|
+
M${I},${L}
|
|
3
3
|
H0V0
|
|
4
|
-
H${
|
|
4
|
+
H${I}V${L}
|
|
5
5
|
Z
|
|
6
|
-
${
|
|
7
|
-
${
|
|
8
|
-
${
|
|
9
|
-
${
|
|
6
|
+
${H.leftTop}
|
|
7
|
+
${H.leftBottom}
|
|
8
|
+
${H.rightBottom}
|
|
9
|
+
${H.rightTop}
|
|
10
10
|
Z
|
|
11
|
-
`,m.value=v,B.value=$,_.value=d};return r.onMounted(()=>{window.addEventListener("scroll",u),window.addEventListener("resize",u)}),r.onUnmounted(()=>{window.removeEventListener("scroll",u),window.removeEventListener("resize",u)}),{path:o,updatePath:C}}var lt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},_t={exports:{}};(function(o,m){var B=200,_="__lodash_hash_undefined__",u=800,C=16,y=9007199254740991,T="[object Arguments]",M="[object Array]",F="[object AsyncFunction]",v="[object Boolean]",x="[object Date]",D="[object Error]",j="[object Function]",P="[object GeneratorFunction]",w="[object Map]",Y="[object Number]",tt="[object Null]",$="[object Object]",d="[object Proxy]",f="[object RegExp]",U="[object Set]",Z="[object String]",a="[object Undefined]",c="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",O="[object Float32Array]",z="[object Float64Array]",H="[object Int8Array]",G="[object Int16Array]",R="[object Int32Array]",k="[object Uint8Array]",q="[object Uint8ClampedArray]",ct="[object Uint16Array]",dt="[object Uint32Array]",xe=/[\\^$.*+?()[\]{}|]/g,$e=/^\[object .+?Constructor\]$/,Be=/^(?:0|[1-9]\d*)$/,h={};h[O]=h[z]=h[H]=h[G]=h[R]=h[k]=h[q]=h[ct]=h[dt]=!0,h[T]=h[M]=h[S]=h[v]=h[E]=h[x]=h[D]=h[j]=h[w]=h[Y]=h[$]=h[f]=h[U]=h[Z]=h[c]=!1;var Pt=typeof lt=="object"&<&<.Object===Object&<,Ce=typeof self=="object"&&self&&self.Object===Object&&self,et=Pt||Ce||Function("return this")(),It=m&&!m.nodeType&&m,nt=It&&!0&&o&&!o.nodeType&&o,Lt=nt&&nt.exports===It,yt=Lt&&Pt.process,Mt=function(){try{var t=nt&&nt.require&&nt.require("util").types;return t||yt&&yt.binding&&yt.binding("util")}catch{}}(),Ft=Mt&&Mt.isTypedArray;function Ee(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Oe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Ae(t){return function(e){return t(e)}}function Ve(t,e){return t==null?void 0:t[e]}function Ne(t,e){return function(n){return t(e(n))}}var je=Array.prototype,ze=Function.prototype,ut=Object.prototype,Tt=et["__core-js_shared__"],ft=ze.toString,I=ut.hasOwnProperty,Dt=function(){var t=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ut=ut.toString,Pe=ft.call(Object),Ie=RegExp("^"+ft.call(I).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pt=Lt?et.Buffer:void 0,Ht=et.Symbol,Gt=et.Uint8Array,Rt=pt?pt.allocUnsafe:void 0,kt=Ne(Object.getPrototypeOf,Object),qt=Object.create,Le=ut.propertyIsEnumerable,Me=je.splice,W=Ht?Ht.toStringTag:void 0,ht=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Fe=pt?pt.isBuffer:void 0,Wt=Math.max,De=Date.now,Kt=xt(et,"Map"),rt=xt(Object,"create"),Ue=function(){function t(){}return function(e){if(!Q(e))return{};if(qt)return qt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function K(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function He(){this.__data__=rt?rt(null):{},this.size=0}function Ge(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Re(t){var e=this.__data__;if(rt){var n=e[t];return n===_?void 0:n}return I.call(e,t)?e[t]:void 0}function ke(t){var e=this.__data__;return rt?e[t]!==void 0:I.call(e,t)}function qe(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rt&&e===void 0?_:e,this}K.prototype.clear=He,K.prototype.delete=Ge,K.prototype.get=Re,K.prototype.has=ke,K.prototype.set=qe;function L(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function We(){this.__data__=[],this.size=0}function Ke(t){var e=this.__data__,n=gt(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Me.call(e,n,1),--this.size,!0}function Qe(t){var e=this.__data__,n=gt(e,t);return n<0?void 0:e[n][1]}function Ze(t){return gt(this.__data__,t)>-1}function Je(t,e){var n=this.__data__,i=gt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}L.prototype.clear=We,L.prototype.delete=Ke,L.prototype.get=Qe,L.prototype.has=Ze,L.prototype.set=Je;function J(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Xe(){this.size=0,this.__data__={hash:new K,map:new(Kt||L),string:new K}}function Ye(t){var e=mt(this,t).delete(t);return this.size-=e?1:0,e}function tn(t){return mt(this,t).get(t)}function en(t){return mt(this,t).has(t)}function nn(t,e){var n=mt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}J.prototype.clear=Xe,J.prototype.delete=Ye,J.prototype.get=tn,J.prototype.has=en,J.prototype.set=nn;function X(t){var e=this.__data__=new L(t);this.size=e.size}function rn(){this.__data__=new L,this.size=0}function on(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function an(t){return this.__data__.get(t)}function sn(t){return this.__data__.has(t)}function ln(t,e){var n=this.__data__;if(n instanceof L){var i=n.__data__;if(!Kt||i.length<B-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new J(i)}return n.set(t,e),this.size=n.size,this}X.prototype.clear=rn,X.prototype.delete=on,X.prototype.get=an,X.prototype.has=sn,X.prototype.set=ln;function cn(t,e){var n=Ct(t),i=!n&&Bt(t),l=!n&&!i&&Yt(t),p=!n&&!i&&!l&&ee(t),g=n||i||l||p,s=g?Oe(t.length,String):[],b=s.length;for(var V in t)(e||I.call(t,V))&&!(g&&(V=="length"||l&&(V=="offset"||V=="parent")||p&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Jt(V,b)))&&s.push(V);return s}function wt(t,e,n){(n!==void 0&&!vt(t[e],n)||n===void 0&&!(e in t))&&St(t,e,n)}function dn(t,e,n){var i=t[e];(!(I.call(t,e)&&vt(i,n))||n===void 0&&!(e in t))&&St(t,e,n)}function gt(t,e){for(var n=t.length;n--;)if(vt(t[n][0],e))return n;return-1}function St(t,e,n){e=="__proto__"&&ht?ht(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var un=xn();function bt(t){return t==null?t===void 0?a:tt:W&&W in Object(t)?$n(t):Vn(t)}function Qt(t){return ot(t)&&bt(t)==T}function fn(t){if(!Q(t)||On(t))return!1;var e=Ot(t)?Ie:$e;return e.test(Pn(t))}function pn(t){return ot(t)&&te(t.length)&&!!h[bt(t)]}function hn(t){if(!Q(t))return An(t);var e=Xt(t),n=[];for(var i in t)i=="constructor"&&(e||!I.call(t,i))||n.push(i);return n}function Zt(t,e,n,i,l){t!==e&&un(e,function(p,g){if(l||(l=new X),Q(p))gn(t,e,g,n,Zt,i,l);else{var s=i?i($t(t,g),p,g+"",t,e,l):void 0;s===void 0&&(s=p),wt(t,g,s)}},ne)}function gn(t,e,n,i,l,p,g){var s=$t(t,n),b=$t(e,n),V=g.get(b);if(V){wt(t,n,V);return}var A=p?p(s,b,n+"",t,e,g):void 0,it=A===void 0;if(it){var At=Ct(b),Vt=!At&&Yt(b),oe=!At&&!Vt&&ee(b);A=b,At||Vt||oe?Ct(s)?A=s:In(s)?A=Tn(s):Vt?(it=!1,A=vn(b,!0)):oe?(it=!1,A=yn(b,!0)):A=[]:Ln(b)||Bt(b)?(A=s,Bt(s)?A=Mn(s):(!Q(s)||Ot(s))&&(A=Bn(b))):it=!1}it&&(g.set(b,A),l(A,b,i,p,g),g.delete(b)),wt(t,n,A)}function bn(t,e){return jn(Nn(t,e,re),t+"")}var mn=ht?function(t,e){return ht(t,"toString",{configurable:!0,enumerable:!1,value:Dn(e),writable:!0})}:re;function vn(t,e){if(e)return t.slice();var n=t.length,i=Rt?Rt(n):new t.constructor(n);return t.copy(i),i}function _n(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function yn(t,e){var n=e?_n(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Tn(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function wn(t,e,n,i){var l=!n;n||(n={});for(var p=-1,g=e.length;++p<g;){var s=e[p],b=i?i(n[s],t[s],s,n,t):void 0;b===void 0&&(b=t[s]),l?St(n,s,b):dn(n,s,b)}return n}function Sn(t){return bn(function(e,n){var i=-1,l=n.length,p=l>1?n[l-1]:void 0,g=l>2?n[2]:void 0;for(p=t.length>3&&typeof p=="function"?(l--,p):void 0,g&&Cn(n[0],n[1],g)&&(p=l<3?void 0:p,l=1),e=Object(e);++i<l;){var s=n[i];s&&t(e,s,i,p)}return e})}function xn(t){return function(e,n,i){for(var l=-1,p=Object(e),g=i(e),s=g.length;s--;){var b=g[t?s:++l];if(n(p[b],b,p)===!1)break}return e}}function mt(t,e){var n=t.__data__;return En(e)?n[typeof e=="string"?"string":"hash"]:n.map}function xt(t,e){var n=Ve(t,e);return fn(n)?n:void 0}function $n(t){var e=I.call(t,W),n=t[W];try{t[W]=void 0;var i=!0}catch{}var l=Ut.call(t);return i&&(e?t[W]=n:delete t[W]),l}function Bn(t){return typeof t.constructor=="function"&&!Xt(t)?Ue(kt(t)):{}}function Jt(t,e){var n=typeof t;return e=e==null?y:e,!!e&&(n=="number"||n!="symbol"&&Be.test(t))&&t>-1&&t%1==0&&t<e}function Cn(t,e,n){if(!Q(n))return!1;var i=typeof e;return(i=="number"?Et(n)&&Jt(e,n.length):i=="string"&&e in n)?vt(n[e],t):!1}function En(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function On(t){return!!Dt&&Dt in t}function Xt(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ut;return t===n}function An(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Vn(t){return Ut.call(t)}function Nn(t,e,n){return e=Wt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,l=-1,p=Wt(i.length-e,0),g=Array(p);++l<p;)g[l]=i[e+l];l=-1;for(var s=Array(e+1);++l<e;)s[l]=i[l];return s[e]=n(g),Ee(t,this,s)}}function $t(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var jn=zn(mn);function zn(t){var e=0,n=0;return function(){var i=De(),l=C-(i-n);if(n=i,l>0){if(++e>=u)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Pn(t){if(t!=null){try{return ft.call(t)}catch{}try{return t+""}catch{}}return""}function vt(t,e){return t===e||t!==t&&e!==e}var Bt=Qt(function(){return arguments}())?Qt:function(t){return ot(t)&&I.call(t,"callee")&&!Le.call(t,"callee")},Ct=Array.isArray;function Et(t){return t!=null&&te(t.length)&&!Ot(t)}function In(t){return ot(t)&&Et(t)}var Yt=Fe||Un;function Ot(t){if(!Q(t))return!1;var e=bt(t);return e==j||e==P||e==F||e==d}function te(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=y}function Q(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ot(t){return t!=null&&typeof t=="object"}function Ln(t){if(!ot(t)||bt(t)!=$)return!1;var e=kt(t);if(e===null)return!0;var n=I.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ft.call(n)==Pe}var ee=Ft?Ae(Ft):pn;function Mn(t){return wn(t,ne(t))}function ne(t){return Et(t)?cn(t,!0):hn(t)}var Fn=Sn(function(t,e,n){Zt(t,e,n)});function Dn(t){return function(){return t}}function re(t){return t}function Un(){return!1}o.exports=Fn})(_t,_t.exports);var Nt=_t.exports,jt=(o,m)=>{const B=o.__vccOpts||o;for(const[_,u]of m)B[_]=u;return B};const se=r.defineComponent({name:"VOnboardingStep",setup(o,{slots:m}){const B=r.ref(!1),_=r.inject("next-step",()=>{}),u=r.inject("previous-step",()=>{}),C=r.inject("exit",()=>{}),y=r.inject("options"),T=r.computed(()=>Nt({},y==null?void 0:y.value,v.value.options)),M=r.inject("is-first-step"),F=r.inject("is-last-step"),v=r.inject("step",{}),x=r.computed(()=>{var a,c;return{previous:!((a=T.value.hideButtons)!=null&&a.previous),next:!((c=T.value.hideButtons)!=null&&c.next)}}),D=r.computed(()=>{var a,c,S,E,O,z;return{previous:(c=(a=T.value)==null?void 0:a.labels)==null?void 0:c.previousButton,next:(E=(S=T.value)==null?void 0:S.labels)==null?void 0:E.nextButton,finish:(z=(O=T.value)==null?void 0:O.labels)==null?void 0:z.finishButton}}),j=()=>{f(),_()},P=()=>{f(),u()};r.watch(()=>v.value,(a,c)=>{var S;!((S=m.default)!=null&&S.call(m))||f(c)});const w=r.ref(null),{updatePath:Y,path:tt}=ae(),$=()=>{var c,S,E,O,z,H,G,R,k,q,ct,dt;const a=at((S=(c=v==null?void 0:v.value)==null?void 0:c.attachTo)==null?void 0:S.element);a&&w.value&&(B.value=!0,(O=(E=T.value)==null?void 0:E.scrollToStep)!=null&&O.enabled&&a.scrollIntoView((H=(z=T.value)==null?void 0:z.scrollToStep)==null?void 0:H.options),ie.createPopper(a,w.value,T.value.popper),(R=(G=T.value)==null?void 0:G.overlay)!=null&&R.enabled&&Y(a,{padding:(q=(k=T.value)==null?void 0:k.overlay)==null?void 0:q.padding,borderRadius:(dt=(ct=T.value)==null?void 0:ct.overlay)==null?void 0:dt.borderRadius}),U(a))},d=async()=>{var a,c,S;await((S=(c=(a=v==null?void 0:v.value)==null?void 0:a.on)==null?void 0:c.beforeStep)==null?void 0:S.call(c)),$()},f=(a=v.value)=>{var c,S,E,O;(S=(c=a==null?void 0:a.on)==null?void 0:c.afterStep)==null||S.call(c),Z(at((E=a==null?void 0:a.attachTo)==null?void 0:E.element),(O=a==null?void 0:a.attachTo)==null?void 0:O.classList)},U=(a=at(v.value.attachTo.element))=>{const c=v.value.attachTo.classList;!c||!a||a.classList.add(...c)},Z=(a=at(v.value.attachTo.element),c)=>{!c||!a||a.classList.remove(...c)};return r.onMounted(d),{stepElement:w,onNext:j,onPrevious:P,path:tt,show:B,step:v,isFirst:M,isLast:F,exit:C,isButtonVisible:x,buttonLabels:D}}}),le={style:{width:"100%",height:"100%",position:"fixed",top:"0",left:"0",opacity:"0.5","z-index":"var(--v-onboarding-overlay-z, 10)","pointer-events":"none"}},ce=["d"],de={ref:"stepElement",style:{position:"relative","z-index":"var(--v-onboarding-step-z, 20)"}},ue={class:"v-onboarding-item"},fe={class:"v-onboarding-item__header"},pe={key:0,class:"v-onboarding-item__header-title"},he=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)],ge={key:0,class:"v-onboarding-item__description"},be={class:"v-onboarding-item__actions"},me=r.createElementVNode("div",{"data-popper-arrow":""},null,-1);function ve(o,m,B,_,u,C){return r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createElementBlock("svg",le,[r.createElementVNode("path",{d:o.path},null,8,ce)])),r.createElementVNode("div",de,[o.step?r.renderSlot(o.$slots,"default",{key:0},()=>[r.createElementVNode("div",ue,[r.createElementVNode("div",fe,[o.step.content.title?(r.openBlock(),r.createElementBlock("span",pe,r.toDisplayString(o.step.content.title),1)):r.createCommentVNode("",!0),r.createElementVNode("button",{onClick:m[0]||(m[0]=(...y)=>o.exit&&o.exit(...y)),class:"v-onboarding-item__header-close"},he)]),o.step.content.description?(r.openBlock(),r.createElementBlock("p",ge,r.toDisplayString(o.step.content.description),1)):r.createCommentVNode("",!0),r.createElementVNode("div",be,[!o.isFirst&&o.isButtonVisible.previous?(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",onClick:m[1]||(m[1]=(...y)=>o.onPrevious&&o.onPrevious(...y)),class:"v-onboarding-btn-secondary"},r.toDisplayString(o.buttonLabels.previous),1)):r.createCommentVNode("",!0),o.isButtonVisible.next?(r.openBlock(),r.createElementBlock("button",{key:1,onClick:m[2]||(m[2]=(...y)=>o.onNext&&o.onNext(...y)),type:"button",class:"v-onboarding-btn-primary"},r.toDisplayString(o.isLast?o.buttonLabels.finish:o.buttonLabels.next),1)):r.createCommentVNode("",!0)])])]):r.createCommentVNode("",!0),me],512)],512)),[[r.vShow,o.show]])}var zt=jt(se,[["render",ve]]);const _e=r.defineComponent({name:"VOnboardingWrapper",components:{VOnboardingStep:zt},props:{steps:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},emits:["exit"],setup(o,{expose:m,emit:B}){const _=r.ref(-1),u=w=>{typeof w=="function"?_.value=w(_.value):_.value=w},C=r.computed(()=>{var w;return((w=o.steps)==null?void 0:w[_.value])||null}),y=()=>{u(w=>w-1)},T=()=>{u(w=>w+1)},M=r.computed(()=>_.value>=o.steps.length||_.value<0),F=()=>{u(0)},v=()=>{u(-1)},x=()=>{v(),B("exit")};m({start:F,finish:v,goToStep:u});const D=r.computed(()=>Nt({},st,o.options));r.provide("options",D),r.provide("step",C),r.provide("next-step",T),r.provide("previous-step",y),r.provide("exit",x);const j=r.computed(()=>_.value===0),P=r.computed(()=>_.value===o.steps.length-1);return r.provide("is-first-step",j),r.provide("is-last-step",P),{index:_,activeStep:C,toPreviousStep:y,toNextStep:T,isFinished:M,setIndex:u,isFirstStep:j,isLastStep:P,finish:v}}}),ye={key:0,"data-v-onboarding-wrapper":""};function Te(o,m,B,_,u,C){const y=r.resolveComponent("VOnboardingStep");return o.isFinished?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",ye,[r.renderSlot(o.$slots,"default",{key:o.index,step:o.activeStep,next:()=>o.toNextStep(),previous:()=>o.toPreviousStep(),exit:()=>o.finish(),isFirst:o.isFirstStep,isLast:o.isLastStep,index:o.index},()=>[(r.openBlock(),r.createBlock(y,{key:o.index}))])]))}var we=jt(_e,[["render",Te]]);function Se(o){return{start:()=>{var u;return(u=o==null?void 0:o.value)==null?void 0:u.start()},finish:()=>{var u;return(u=o==null?void 0:o.value)==null?void 0:u.finish()},goToStep:u=>{var C;return(C=o==null?void 0:o.value)==null?void 0:C.goToStep(u)}}}var Gn=(()=>`.v-onboarding-item{width:20rem;padding:1rem;background-color:#fff;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:.375rem}.v-onboarding-item__header{display:flex;justify-content:space-between}.v-onboarding-item__header-title{font-size:1.25rem;font-weight:500;line-height:1.5}.v-onboarding-item__header-close{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:50%}.v-onboarding-item__header-close:hover{background:rgba(0,0,0,.1)}.v-onboarding-item__description{font-size:.875rem;color:#71717a;margin-top:.5rem}.v-onboarding-item__actions{display:flex;margin-top:1rem}.v-onboarding-item__actions>:not([hidden])~:not([hidden]){margin-left:.5rem}.v-onboarding-item__actions button{display:inline-flex;flex:1;align-items:center;justify-content:center;padding:.5rem 1.25rem;border-width:1px;border-style:solid;font-size:1rem;font-weight:500;box-shadow:0 1px 2px #0000000d;border-radius:9999px;background-color:transparent;background-image:none;cursor:pointer}.v-onboarding-item__actions button.v-onboarding-btn-primary{border-color:transparent;color:#fff;background-color:#4f46e5}.v-onboarding-item__actions button.v-onboarding-btn-primary:hover{background-color:#4338ca}.v-onboarding-item__actions button.v-onboarding-btn-secondary{border-color:#d4d4d8;color:#3f3f46}.v-onboarding-item__actions button.v-onboarding-btn-secondary:hover{background-color:#fafafa}[data-v-onboarding-wrapper] [data-popper-arrow]:before{content:"";background:var(--v-onboarding-step-arrow-background, white);top:0;left:0;transition:transform .2s ease-out,visibility .2s ease-out;visibility:visible;transform:translate(0) rotate(45deg);transform-origin:center;width:var(--v-onboarding-step-arrow-size, 10px);height:var(--v-onboarding-step-arrow-size, 10px);position:absolute;z-index:-1}[data-v-onboarding-wrapper] [data-popper-placement^=top]>[data-popper-arrow]{bottom:5px}[data-v-onboarding-wrapper] [data-popper-placement^=right]>[data-popper-arrow]{left:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=bottom]>[data-popper-arrow]{top:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=left]>[data-popper-arrow]{right:-4px}
|
|
12
|
-
`)();
|
|
11
|
+
`,m.value=v,B.value=$,_.value=d};return r.onMounted(()=>{window.addEventListener("scroll",u),window.addEventListener("resize",u)}),r.onUnmounted(()=>{window.removeEventListener("scroll",u),window.removeEventListener("resize",u)}),{path:o,updatePath:C}}var lt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},vt={exports:{}};(function(o,m){var B=200,_="__lodash_hash_undefined__",u=800,C=16,y=9007199254740991,T="[object Arguments]",P="[object Array]",U="[object AsyncFunction]",v="[object Boolean]",w="[object Date]",I="[object Error]",L="[object Function]",M="[object GeneratorFunction]",N="[object Map]",x="[object Number]",tt="[object Null]",$="[object Object]",d="[object Proxy]",f="[object RegExp]",H="[object Set]",J="[object String]",a="[object Undefined]",c="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",O="[object Float32Array]",z="[object Float64Array]",G="[object Int8Array]",R="[object Int16Array]",k="[object Int32Array]",W="[object Uint8Array]",q="[object Uint8ClampedArray]",ct="[object Uint16Array]",dt="[object Uint32Array]",xe=/[\\^$.*+?()[\]{}|]/g,$e=/^\[object .+?Constructor\]$/,Be=/^(?:0|[1-9]\d*)$/,h={};h[O]=h[z]=h[G]=h[R]=h[k]=h[W]=h[q]=h[ct]=h[dt]=!0,h[T]=h[P]=h[S]=h[v]=h[E]=h[w]=h[I]=h[L]=h[N]=h[x]=h[$]=h[f]=h[H]=h[J]=h[c]=!1;var Pt=typeof lt=="object"&<&<.Object===Object&<,Ce=typeof self=="object"&&self&&self.Object===Object&&self,et=Pt||Ce||Function("return this")(),It=m&&!m.nodeType&&m,nt=It&&!0&&o&&!o.nodeType&&o,Lt=nt&&nt.exports===It,yt=Lt&&Pt.process,Mt=function(){try{var t=nt&&nt.require&&nt.require("util").types;return t||yt&&yt.binding&&yt.binding("util")}catch{}}(),Ft=Mt&&Mt.isTypedArray;function Ee(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Oe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Ae(t){return function(e){return t(e)}}function Ve(t,e){return t==null?void 0:t[e]}function Ne(t,e){return function(n){return t(e(n))}}var je=Array.prototype,ze=Function.prototype,ut=Object.prototype,Tt=et["__core-js_shared__"],ft=ze.toString,F=ut.hasOwnProperty,Dt=function(){var t=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ut=ut.toString,Pe=ft.call(Object),Ie=RegExp("^"+ft.call(F).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pt=Lt?et.Buffer:void 0,Ht=et.Symbol,Gt=et.Uint8Array,Rt=pt?pt.allocUnsafe:void 0,kt=Ne(Object.getPrototypeOf,Object),Wt=Object.create,Le=ut.propertyIsEnumerable,Me=je.splice,K=Ht?Ht.toStringTag:void 0,ht=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Fe=pt?pt.isBuffer:void 0,qt=Math.max,De=Date.now,Kt=xt(et,"Map"),rt=xt(Object,"create"),Ue=function(){function t(){}return function(e){if(!Z(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Q(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function He(){this.__data__=rt?rt(null):{},this.size=0}function Ge(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Re(t){var e=this.__data__;if(rt){var n=e[t];return n===_?void 0:n}return F.call(e,t)?e[t]:void 0}function ke(t){var e=this.__data__;return rt?e[t]!==void 0:F.call(e,t)}function We(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rt&&e===void 0?_:e,this}Q.prototype.clear=He,Q.prototype.delete=Ge,Q.prototype.get=Re,Q.prototype.has=ke,Q.prototype.set=We;function D(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function qe(){this.__data__=[],this.size=0}function Ke(t){var e=this.__data__,n=gt(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Me.call(e,n,1),--this.size,!0}function Qe(t){var e=this.__data__,n=gt(e,t);return n<0?void 0:e[n][1]}function Ze(t){return gt(this.__data__,t)>-1}function Je(t,e){var n=this.__data__,i=gt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}D.prototype.clear=qe,D.prototype.delete=Ke,D.prototype.get=Qe,D.prototype.has=Ze,D.prototype.set=Je;function X(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Xe(){this.size=0,this.__data__={hash:new Q,map:new(Kt||D),string:new Q}}function Ye(t){var e=mt(this,t).delete(t);return this.size-=e?1:0,e}function tn(t){return mt(this,t).get(t)}function en(t){return mt(this,t).has(t)}function nn(t,e){var n=mt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}X.prototype.clear=Xe,X.prototype.delete=Ye,X.prototype.get=tn,X.prototype.has=en,X.prototype.set=nn;function Y(t){var e=this.__data__=new D(t);this.size=e.size}function rn(){this.__data__=new D,this.size=0}function on(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function an(t){return this.__data__.get(t)}function sn(t){return this.__data__.has(t)}function ln(t,e){var n=this.__data__;if(n instanceof D){var i=n.__data__;if(!Kt||i.length<B-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new X(i)}return n.set(t,e),this.size=n.size,this}Y.prototype.clear=rn,Y.prototype.delete=on,Y.prototype.get=an,Y.prototype.has=sn,Y.prototype.set=ln;function cn(t,e){var n=Ct(t),i=!n&&Bt(t),l=!n&&!i&&Yt(t),p=!n&&!i&&!l&&ee(t),g=n||i||l||p,s=g?Oe(t.length,String):[],b=s.length;for(var V in t)(e||F.call(t,V))&&!(g&&(V=="length"||l&&(V=="offset"||V=="parent")||p&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Jt(V,b)))&&s.push(V);return s}function wt(t,e,n){(n!==void 0&&!_t(t[e],n)||n===void 0&&!(e in t))&&St(t,e,n)}function dn(t,e,n){var i=t[e];(!(F.call(t,e)&&_t(i,n))||n===void 0&&!(e in t))&&St(t,e,n)}function gt(t,e){for(var n=t.length;n--;)if(_t(t[n][0],e))return n;return-1}function St(t,e,n){e=="__proto__"&&ht?ht(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var un=xn();function bt(t){return t==null?t===void 0?a:tt:K&&K in Object(t)?$n(t):Vn(t)}function Qt(t){return ot(t)&&bt(t)==T}function fn(t){if(!Z(t)||On(t))return!1;var e=Ot(t)?Ie:$e;return e.test(Pn(t))}function pn(t){return ot(t)&&te(t.length)&&!!h[bt(t)]}function hn(t){if(!Z(t))return An(t);var e=Xt(t),n=[];for(var i in t)i=="constructor"&&(e||!F.call(t,i))||n.push(i);return n}function Zt(t,e,n,i,l){t!==e&&un(e,function(p,g){if(l||(l=new Y),Z(p))gn(t,e,g,n,Zt,i,l);else{var s=i?i($t(t,g),p,g+"",t,e,l):void 0;s===void 0&&(s=p),wt(t,g,s)}},ne)}function gn(t,e,n,i,l,p,g){var s=$t(t,n),b=$t(e,n),V=g.get(b);if(V){wt(t,n,V);return}var A=p?p(s,b,n+"",t,e,g):void 0,it=A===void 0;if(it){var At=Ct(b),Vt=!At&&Yt(b),oe=!At&&!Vt&&ee(b);A=b,At||Vt||oe?Ct(s)?A=s:In(s)?A=Tn(s):Vt?(it=!1,A=_n(b,!0)):oe?(it=!1,A=yn(b,!0)):A=[]:Ln(b)||Bt(b)?(A=s,Bt(s)?A=Mn(s):(!Z(s)||Ot(s))&&(A=Bn(b))):it=!1}it&&(g.set(b,A),l(A,b,i,p,g),g.delete(b)),wt(t,n,A)}function bn(t,e){return jn(Nn(t,e,re),t+"")}var mn=ht?function(t,e){return ht(t,"toString",{configurable:!0,enumerable:!1,value:Dn(e),writable:!0})}:re;function _n(t,e){if(e)return t.slice();var n=t.length,i=Rt?Rt(n):new t.constructor(n);return t.copy(i),i}function vn(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function yn(t,e){var n=e?vn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Tn(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function wn(t,e,n,i){var l=!n;n||(n={});for(var p=-1,g=e.length;++p<g;){var s=e[p],b=i?i(n[s],t[s],s,n,t):void 0;b===void 0&&(b=t[s]),l?St(n,s,b):dn(n,s,b)}return n}function Sn(t){return bn(function(e,n){var i=-1,l=n.length,p=l>1?n[l-1]:void 0,g=l>2?n[2]:void 0;for(p=t.length>3&&typeof p=="function"?(l--,p):void 0,g&&Cn(n[0],n[1],g)&&(p=l<3?void 0:p,l=1),e=Object(e);++i<l;){var s=n[i];s&&t(e,s,i,p)}return e})}function xn(t){return function(e,n,i){for(var l=-1,p=Object(e),g=i(e),s=g.length;s--;){var b=g[t?s:++l];if(n(p[b],b,p)===!1)break}return e}}function mt(t,e){var n=t.__data__;return En(e)?n[typeof e=="string"?"string":"hash"]:n.map}function xt(t,e){var n=Ve(t,e);return fn(n)?n:void 0}function $n(t){var e=F.call(t,K),n=t[K];try{t[K]=void 0;var i=!0}catch{}var l=Ut.call(t);return i&&(e?t[K]=n:delete t[K]),l}function Bn(t){return typeof t.constructor=="function"&&!Xt(t)?Ue(kt(t)):{}}function Jt(t,e){var n=typeof t;return e=e==null?y:e,!!e&&(n=="number"||n!="symbol"&&Be.test(t))&&t>-1&&t%1==0&&t<e}function Cn(t,e,n){if(!Z(n))return!1;var i=typeof e;return(i=="number"?Et(n)&&Jt(e,n.length):i=="string"&&e in n)?_t(n[e],t):!1}function En(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function On(t){return!!Dt&&Dt in t}function Xt(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ut;return t===n}function An(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Vn(t){return Ut.call(t)}function Nn(t,e,n){return e=qt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,l=-1,p=qt(i.length-e,0),g=Array(p);++l<p;)g[l]=i[e+l];l=-1;for(var s=Array(e+1);++l<e;)s[l]=i[l];return s[e]=n(g),Ee(t,this,s)}}function $t(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var jn=zn(mn);function zn(t){var e=0,n=0;return function(){var i=De(),l=C-(i-n);if(n=i,l>0){if(++e>=u)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Pn(t){if(t!=null){try{return ft.call(t)}catch{}try{return t+""}catch{}}return""}function _t(t,e){return t===e||t!==t&&e!==e}var Bt=Qt(function(){return arguments}())?Qt:function(t){return ot(t)&&F.call(t,"callee")&&!Le.call(t,"callee")},Ct=Array.isArray;function Et(t){return t!=null&&te(t.length)&&!Ot(t)}function In(t){return ot(t)&&Et(t)}var Yt=Fe||Un;function Ot(t){if(!Z(t))return!1;var e=bt(t);return e==L||e==M||e==U||e==d}function te(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=y}function Z(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ot(t){return t!=null&&typeof t=="object"}function Ln(t){if(!ot(t)||bt(t)!=$)return!1;var e=kt(t);if(e===null)return!0;var n=F.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ft.call(n)==Pe}var ee=Ft?Ae(Ft):pn;function Mn(t){return wn(t,ne(t))}function ne(t){return Et(t)?cn(t,!0):hn(t)}var Fn=Sn(function(t,e,n){Zt(t,e,n)});function Dn(t){return function(){return t}}function re(t){return t}function Un(){return!1}o.exports=Fn})(vt,vt.exports);var Nt=vt.exports,jt=(o,m)=>{const B=o.__vccOpts||o;for(const[_,u]of m)B[_]=u;return B};const se=r.defineComponent({name:"VOnboardingStep",setup(o,{slots:m}){const B=r.ref(!1),_=r.inject("next-step",()=>{}),u=r.inject("previous-step",()=>{}),C=r.inject("exit",()=>{}),y=r.inject("options"),T=r.computed(()=>Nt({},y==null?void 0:y.value,v.value.options)),P=r.inject("is-first-step"),U=r.inject("is-last-step"),v=r.inject("step",{}),w=r.computed(()=>{var a,c;return{previous:!((a=T.value.hideButtons)!=null&&a.previous),next:!((c=T.value.hideButtons)!=null&&c.next)}}),I=r.computed(()=>{var a,c,S,E,O,z;return{previous:(c=(a=T.value)==null?void 0:a.labels)==null?void 0:c.previousButton,next:(E=(S=T.value)==null?void 0:S.labels)==null?void 0:E.nextButton,finish:(z=(O=T.value)==null?void 0:O.labels)==null?void 0:z.finishButton}}),L=()=>{f(),_()},M=()=>{f(),u()};r.watch(()=>v.value,(a,c)=>{var S;!((S=m.default)!=null&&S.call(m))||f(c)});const N=r.ref(null),{updatePath:x,path:tt}=ae(),$=()=>{var c,S,E,O,z,G,R,k,W,q,ct,dt;const a=at((S=(c=v==null?void 0:v.value)==null?void 0:c.attachTo)==null?void 0:S.element);a&&N.value&&(B.value=!0,(O=(E=T.value)==null?void 0:E.scrollToStep)!=null&&O.enabled&&a.scrollIntoView((G=(z=T.value)==null?void 0:z.scrollToStep)==null?void 0:G.options),ie.createPopper(a,N.value,T.value.popper),(k=(R=T.value)==null?void 0:R.overlay)!=null&&k.enabled&&x(a,{padding:(q=(W=T.value)==null?void 0:W.overlay)==null?void 0:q.padding,borderRadius:(dt=(ct=T.value)==null?void 0:ct.overlay)==null?void 0:dt.borderRadius}),H(a))},d=async()=>{var a,c,S;await((S=(c=(a=v==null?void 0:v.value)==null?void 0:a.on)==null?void 0:c.beforeStep)==null?void 0:S.call(c)),$()},f=(a=v.value)=>{var c,S,E,O;(S=(c=a==null?void 0:a.on)==null?void 0:c.afterStep)==null||S.call(c),J(at((E=a==null?void 0:a.attachTo)==null?void 0:E.element),(O=a==null?void 0:a.attachTo)==null?void 0:O.classList)},H=(a=at(v.value.attachTo.element))=>{const c=v.value.attachTo.classList;!c||!a||a.classList.add(...c)},J=(a=at(v.value.attachTo.element),c)=>{!c||!a||a.classList.remove(...c)};return r.onMounted(d),{stepElement:N,onNext:L,onPrevious:M,path:tt,show:B,step:v,isFirst:P,isLast:U,exit:C,isButtonVisible:w,buttonLabels:I}}}),le={style:{width:"100%",height:"100%",position:"fixed",top:"0",left:"0",opacity:"0.5","z-index":"var(--v-onboarding-overlay-z, 10)","pointer-events":"none"}},ce=["d"],de={ref:"stepElement",style:{position:"relative","z-index":"var(--v-onboarding-step-z, 20)"}},ue={class:"v-onboarding-item"},fe={class:"v-onboarding-item__header"},pe={key:0,class:"v-onboarding-item__header-title"},he=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)],ge={key:0,class:"v-onboarding-item__description"},be={class:"v-onboarding-item__actions"},me=r.createElementVNode("div",{"data-popper-arrow":""},null,-1);function _e(o,m,B,_,u,C){return r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createElementBlock("svg",le,[r.createElementVNode("path",{d:o.path},null,8,ce)])),r.createElementVNode("div",de,[o.step?r.renderSlot(o.$slots,"default",{key:0},()=>[r.createElementVNode("div",ue,[r.createElementVNode("div",fe,[o.step.content.title?(r.openBlock(),r.createElementBlock("span",pe,r.toDisplayString(o.step.content.title),1)):r.createCommentVNode("",!0),r.createElementVNode("button",{onClick:m[0]||(m[0]=(...y)=>o.exit&&o.exit(...y)),class:"v-onboarding-item__header-close"},he)]),o.step.content.description?(r.openBlock(),r.createElementBlock("p",ge,r.toDisplayString(o.step.content.description),1)):r.createCommentVNode("",!0),r.createElementVNode("div",be,[!o.isFirst&&o.isButtonVisible.previous?(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",onClick:m[1]||(m[1]=(...y)=>o.onPrevious&&o.onPrevious(...y)),class:"v-onboarding-btn-secondary"},r.toDisplayString(o.buttonLabels.previous),1)):r.createCommentVNode("",!0),o.isButtonVisible.next?(r.openBlock(),r.createElementBlock("button",{key:1,onClick:m[2]||(m[2]=(...y)=>o.onNext&&o.onNext(...y)),type:"button",class:"v-onboarding-btn-primary"},r.toDisplayString(o.isLast?o.buttonLabels.finish:o.buttonLabels.next),1)):r.createCommentVNode("",!0)])])]):r.createCommentVNode("",!0),me],512)],512)),[[r.vShow,o.show]])}var zt=jt(se,[["render",_e]]);const ve=r.defineComponent({name:"VOnboardingWrapper",components:{VOnboardingStep:zt},props:{steps:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},emits:["exit"],setup(o,{expose:m,emit:B}){const _=r.ref(-1),u=x=>{typeof x=="function"?_.value=x(_.value):_.value=x},C=r.computed(()=>{var x;return((x=o.steps)==null?void 0:x[_.value])||null}),y=()=>{u(x=>x-1)},T=()=>{u(x=>x+1)},P=r.computed(()=>_.value>=o.steps.length||_.value<0),U=r.watch(P,x=>{!x||(I(),U())}),v=()=>{u(0)},w=()=>{u(-1)},I=()=>{w(),B("exit")};m({start:v,finish:w,goToStep:u});const L=r.computed(()=>Nt({},st,o.options));r.provide("options",L),r.provide("step",C),r.provide("next-step",T),r.provide("previous-step",y),r.provide("exit",I);const M=r.computed(()=>_.value===0),N=r.computed(()=>_.value===o.steps.length-1);return r.provide("is-first-step",M),r.provide("is-last-step",N),{index:_,activeStep:C,toPreviousStep:y,toNextStep:T,isFinished:P,setIndex:u,isFirstStep:M,isLastStep:N,finish:w}}}),ye={key:0,"data-v-onboarding-wrapper":""};function Te(o,m,B,_,u,C){const y=r.resolveComponent("VOnboardingStep");return o.isFinished?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",ye,[r.renderSlot(o.$slots,"default",{key:o.index,step:o.activeStep,next:()=>o.toNextStep(),previous:()=>o.toPreviousStep(),exit:()=>o.finish(),isFirst:o.isFirstStep,isLast:o.isLastStep,index:o.index},()=>[(r.openBlock(),r.createBlock(y,{key:o.index}))])]))}var we=jt(ve,[["render",Te]]);function Se(o){return{start:()=>{var u;return(u=o==null?void 0:o.value)==null?void 0:u.start()},finish:()=>{var u;return(u=o==null?void 0:o.value)==null?void 0:u.finish()},goToStep:u=>{var C;return(C=o==null?void 0:o.value)==null?void 0:C.goToStep(u)}}}var Gn=(()=>`.v-onboarding-item{width:20rem;padding:1rem;background-color:#fff;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:.375rem}.v-onboarding-item__header{display:flex;justify-content:space-between}.v-onboarding-item__header-title{font-size:1.25rem;font-weight:500;line-height:1.5}.v-onboarding-item__header-close{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:50%}.v-onboarding-item__header-close:hover{background:rgba(0,0,0,.1)}.v-onboarding-item__description{font-size:.875rem;color:#71717a;margin-top:.5rem}.v-onboarding-item__actions{display:flex;margin-top:1rem}.v-onboarding-item__actions>:not([hidden])~:not([hidden]){margin-left:.5rem}.v-onboarding-item__actions button{display:inline-flex;flex:1;align-items:center;justify-content:center;padding:.5rem 1.25rem;border-width:1px;border-style:solid;font-size:1rem;font-weight:500;box-shadow:0 1px 2px #0000000d;border-radius:9999px;background-color:transparent;background-image:none;cursor:pointer}.v-onboarding-item__actions button.v-onboarding-btn-primary{border-color:transparent;color:#fff;background-color:#4f46e5}.v-onboarding-item__actions button.v-onboarding-btn-primary:hover{background-color:#4338ca}.v-onboarding-item__actions button.v-onboarding-btn-secondary{border-color:#d4d4d8;color:#3f3f46}.v-onboarding-item__actions button.v-onboarding-btn-secondary:hover{background-color:#fafafa}[data-v-onboarding-wrapper] [data-popper-arrow]:before{content:"";background:var(--v-onboarding-step-arrow-background, white);top:0;left:0;transition:transform .2s ease-out,visibility .2s ease-out;visibility:visible;transform:translate(0) rotate(45deg);transform-origin:center;width:var(--v-onboarding-step-arrow-size, 10px);height:var(--v-onboarding-step-arrow-size, 10px);position:absolute;z-index:-1}[data-v-onboarding-wrapper] [data-popper-placement^=top]>[data-popper-arrow]{bottom:5px}[data-v-onboarding-wrapper] [data-popper-placement^=right]>[data-popper-arrow]{left:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=bottom]>[data-popper-arrow]{top:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=left]>[data-popper-arrow]{right:-4px}
|
|
12
|
+
`)();j.VOnboardingStep=zt,j.VOnboardingWrapper=we,j.useVOnboarding=Se,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|