v-onboarding 2.1.0 → 2.2.0

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.
@@ -27,6 +27,10 @@ const defaultVOnboardingWrapperOptions = {
27
27
  previousButton: "Previous",
28
28
  nextButton: "Next",
29
29
  finishButton: "Finish"
30
+ },
31
+ hideButtons: {
32
+ previous: false,
33
+ next: false
30
34
  }
31
35
  };
32
36
  function useSvgOverlay() {
@@ -795,6 +799,13 @@ const _sfc_main$1 = defineComponent({
795
799
  const isFirst = inject("is-first-step");
796
800
  const isLast = inject("is-last-step");
797
801
  const step = inject("step", {});
802
+ const isButtonVisible = computed(() => {
803
+ var _a, _b;
804
+ return {
805
+ previous: !((_a = mergedOptions.value.hideButtons) == null ? void 0 : _a.previous),
806
+ next: !((_b = mergedOptions.value.hideButtons) == null ? void 0 : _b.next)
807
+ };
808
+ });
798
809
  const buttonLabels = computed(() => {
799
810
  var _a, _b, _c, _d, _e, _f;
800
811
  return {
@@ -845,7 +856,7 @@ const _sfc_main$1 = defineComponent({
845
856
  const beforeStepEnd = (stepObj = step.value) => {
846
857
  var _a, _b, _c, _d;
847
858
  (_b = (_a = stepObj == null ? void 0 : stepObj.on) == null ? void 0 : _a.afterStep) == null ? void 0 : _b.call(_a);
848
- unsetTargetElementClassName(useGetElement((_c = stepObj == null ? void 0 : stepObj.attachTo) == null ? void 0 : _c.element), (_d = stepObj.attachTo) == null ? void 0 : _d.classList);
859
+ unsetTargetElementClassName(useGetElement((_c = stepObj == null ? void 0 : stepObj.attachTo) == null ? void 0 : _c.element), (_d = stepObj == null ? void 0 : stepObj.attachTo) == null ? void 0 : _d.classList);
849
860
  };
850
861
  const setTargetElementClassName = (element = useGetElement(step.value.attachTo.element)) => {
851
862
  const classList = step.value.attachTo.classList;
@@ -869,6 +880,7 @@ const _sfc_main$1 = defineComponent({
869
880
  isFirst,
870
881
  isLast,
871
882
  exit,
883
+ isButtonVisible,
872
884
  buttonLabels
873
885
  };
874
886
  }
@@ -925,17 +937,18 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
925
937
  ]),
926
938
  _ctx.step.content.description ? (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString(_ctx.step.content.description), 1)) : createCommentVNode("", true),
927
939
  createElementVNode("div", _hoisted_10, [
928
- !_ctx.isFirst ? (openBlock(), createElementBlock("button", {
940
+ !_ctx.isFirst && _ctx.isButtonVisible.previous ? (openBlock(), createElementBlock("button", {
929
941
  key: 0,
930
942
  type: "button",
931
943
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onPrevious && _ctx.onPrevious(...args)),
932
944
  class: "v-onboarding-btn-secondary"
933
945
  }, toDisplayString(_ctx.buttonLabels.previous), 1)) : createCommentVNode("", true),
934
- createElementVNode("button", {
946
+ _ctx.isButtonVisible.next ? (openBlock(), createElementBlock("button", {
947
+ key: 1,
935
948
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onNext && _ctx.onNext(...args)),
936
949
  type: "button",
937
950
  class: "v-onboarding-btn-primary"
938
- }, toDisplayString(_ctx.isLast ? _ctx.buttonLabels.finish : _ctx.buttonLabels.next), 1)
951
+ }, toDisplayString(_ctx.isLast ? _ctx.buttonLabels.finish : _ctx.buttonLabels.next), 1)) : createCommentVNode("", true)
939
952
  ])
940
953
  ])
941
954
  ]) : createCommentVNode("", true),
@@ -961,7 +974,8 @@ const _sfc_main = defineComponent({
961
974
  default: () => ({})
962
975
  }
963
976
  },
964
- setup(props, { expose }) {
977
+ emits: ["exit"],
978
+ setup(props, { expose, emit }) {
965
979
  const index = ref(-1);
966
980
  const setIndex = (value) => {
967
981
  if (typeof value === "function") {
@@ -989,6 +1003,9 @@ const _sfc_main = defineComponent({
989
1003
  const finish = () => {
990
1004
  setIndex(-1);
991
1005
  };
1006
+ const exit = () => {
1007
+ finish(), emit("exit");
1008
+ };
992
1009
  expose({
993
1010
  start,
994
1011
  finish,
@@ -999,7 +1016,7 @@ const _sfc_main = defineComponent({
999
1016
  provide("step", activeStep);
1000
1017
  provide("next-step", toNextStep);
1001
1018
  provide("previous-step", toPreviousStep);
1002
- provide("exit", () => finish());
1019
+ provide("exit", exit);
1003
1020
  const isFirstStep = computed(() => index.value === 0);
1004
1021
  const isLastStep = computed(() => index.value === props.steps.length - 1);
1005
1022
  provide("is-first-step", isFirstStep);
@@ -1058,5 +1075,5 @@ function useVOnboarding(wrapperRef) {
1058
1075
  goToStep
1059
1076
  };
1060
1077
  }
1061
- var vOnboarding = "";
1078
+ var vOnboarding = /* @__PURE__ */ (() => '.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}\n')();
1062
1079
  export { VOnboardingStep, VOnboardingWrapper, useVOnboarding };
@@ -1,11 +1,12 @@
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,oe){"use strict";function at(i){return typeof i=="string"?document.querySelector(i):typeof i=="function"?i():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"}};function ie(){var y,O,M,x;const i=r.ref(""),b=r.ref(null),_=r.ref((O=(y=st.overlay)==null?void 0:y.padding)!=null?O:0),T=r.ref((x=(M=st.overlay)==null?void 0:M.borderRadius)!=null?x:0),m=()=>{E(b.value,{padding:_.value,borderRadius:T.value})},E=async(v,S=st.overlay)=>{var c,u,w,B,A,P,U,H,G,R,q,W;if(!v)return;const{innerWidth:I,innerHeight:$}=window,{left:F,top:J,width:k,height:tt}=v.getBoundingClientRect(),C=typeof S.padding=="number"?{top:S.padding,right:S.padding,bottom:S.padding,left:S.padding}:S.padding,l=typeof S.borderRadius=="number"?{leftTop:S.borderRadius,rightTop:S.borderRadius,rightBottom:S.borderRadius,leftBottom:S.borderRadius}:S.borderRadius,d={top:J-((c=C==null?void 0:C.top)!=null?c:0),right:F+k+((u=C==null?void 0:C.right)!=null?u:0),bottom:J+tt+((w=C==null?void 0:C.bottom)!=null?w:0),left:F-((B=C==null?void 0:C.left)!=null?B:0)},D={leftTop:`M${d.left+((A=l==null?void 0:l.leftTop)!=null?A:0)},${d.top} Q${d.left},${d.top} ${d.left},${d.top+((P=l==null?void 0:l.leftTop)!=null?P:0)}`,rightTop:`V${d.top+((U=l==null?void 0:l.rightTop)!=null?U:0)} Q${d.right},${d.top} ${d.right-((H=l==null?void 0:l.rightTop)!=null?H:0)},${d.top}`,rightBottom:`H${d.right-((G=l==null?void 0:l.rightBottom)!=null?G:0)} Q${d.right},${d.bottom} ${d.right},${d.bottom-((R=l==null?void 0:l.rightBottom)!=null?R:0)}`,leftBottom:`V${d.bottom-((q=l==null?void 0:l.leftBottom)!=null?q:0)} Q${d.left},${d.bottom} ${d.left+((W=l==null?void 0:l.leftBottom)!=null?W:0)},${d.bottom}`};i.value=`
2
- M${I},${$}
1
+ (function(N,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):(N=typeof globalThis!="undefined"?globalThis:N||self,r(N["v-onboarding"]={},N.Vue,N.core))})(this,function(N,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,M,F;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((F=(M=st.overlay)==null?void 0:M.borderRadius)!=null?F:0),u=()=>{C(m.value,{padding:B.value,borderRadius:_.value})},C=async(v,x=st.overlay)=>{var Z,a,c,S,E,O,z,H,G,R,k,q;if(!v)return;const{innerWidth:D,innerHeight:j}=window,{left:P,top:w,width:Y,height:tt}=v.getBoundingClientRect(),$=typeof x.padding=="number"?{top:x.padding,right:x.padding,bottom:x.padding,left:x.padding}:x.padding,d=typeof x.borderRadius=="number"?{leftTop:x.borderRadius,rightTop:x.borderRadius,rightBottom:x.borderRadius,leftBottom:x.borderRadius}:x.borderRadius,f={top:w-((Z=$==null?void 0:$.top)!=null?Z:0),right:P+Y+((a=$==null?void 0:$.right)!=null?a:0),bottom:w+tt+((c=$==null?void 0:$.bottom)!=null?c:0),left:P-((S=$==null?void 0:$.left)!=null?S:0)},U={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-((H=d==null?void 0:d.rightTop)!=null?H:0)},${f.top}`,rightBottom:`H${f.right-((G=d==null?void 0:d.rightBottom)!=null?G:0)} Q${f.right},${f.bottom} ${f.right},${f.bottom-((R=d==null?void 0:d.rightBottom)!=null?R:0)}`,leftBottom:`V${f.bottom-((k=d==null?void 0:d.leftBottom)!=null?k:0)} Q${f.left},${f.bottom} ${f.left+((q=d==null?void 0:d.leftBottom)!=null?q:0)},${f.bottom}`};o.value=`
2
+ M${D},${j}
3
3
  H0V0
4
- H${I}V${$}
4
+ H${D}V${j}
5
5
  Z
6
- ${D.leftTop}
7
- ${D.leftBottom}
8
- ${D.rightBottom}
9
- ${D.rightTop}
6
+ ${U.leftTop}
7
+ ${U.leftBottom}
8
+ ${U.rightBottom}
9
+ ${U.rightTop}
10
10
  Z
11
- `,b.value=v,_.value=C,T.value=l};return r.onMounted(()=>{window.addEventListener("scroll",m),window.addEventListener("resize",m)}),r.onUnmounted(()=>{window.removeEventListener("scroll",m),window.removeEventListener("resize",m)}),{path:i,updatePath:E}}var lt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},mt={exports:{}};(function(i,b){var _=200,T="__lodash_hash_undefined__",m=800,E=16,y=9007199254740991,O="[object Arguments]",M="[object Array]",x="[object AsyncFunction]",v="[object Boolean]",S="[object Date]",I="[object Error]",$="[object Function]",F="[object GeneratorFunction]",J="[object Map]",k="[object Number]",tt="[object Null]",C="[object Object]",l="[object Proxy]",d="[object RegExp]",D="[object Set]",c="[object String]",u="[object Undefined]",w="[object WeakMap]",B="[object ArrayBuffer]",A="[object DataView]",P="[object Float32Array]",U="[object Float64Array]",H="[object Int8Array]",G="[object Int16Array]",R="[object Int32Array]",q="[object Uint8Array]",W="[object Uint8ClampedArray]",ct="[object Uint16Array]",we="[object Uint32Array]",$e=/[\\^$.*+?()[\]{}|]/g,Ce=/^\[object .+?Constructor\]$/,Oe=/^(?:0|[1-9]\d*)$/,p={};p[P]=p[U]=p[H]=p[G]=p[R]=p[q]=p[W]=p[ct]=p[we]=!0,p[O]=p[M]=p[B]=p[v]=p[A]=p[S]=p[I]=p[$]=p[J]=p[k]=p[C]=p[d]=p[D]=p[c]=p[w]=!1;var Pt=typeof lt=="object"&&lt&&lt.Object===Object&&lt,Ee=typeof self=="object"&&self&&self.Object===Object&&self,et=Pt||Ee||Function("return this")(),It=b&&!b.nodeType&&b,nt=It&&!0&&i&&!i.nodeType&&i,Lt=nt&&nt.exports===It,vt=Lt&&Pt.process,zt=function(){try{var t=nt&&nt.require&&nt.require("util").types;return t||vt&&vt.binding&&vt.binding("util")}catch{}}(),Mt=zt&&zt.isTypedArray;function Be(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 Ae(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}function Ne(t){return function(e){return t(e)}}function Ve(t,e){return t==null?void 0:t[e]}function je(t,e){return function(n){return t(e(n))}}var xe=Array.prototype,Pe=Function.prototype,ut=Object.prototype,yt=et["__core-js_shared__"],ft=Pe.toString,L=ut.hasOwnProperty,Ft=function(){var t=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Dt=ut.toString,Ie=ft.call(Object),Le=RegExp("^"+ft.call(L).replace($e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dt=Lt?et.Buffer:void 0,Ut=et.Symbol,Ht=et.Uint8Array,Gt=dt?dt.allocUnsafe:void 0,Rt=je(Object.getPrototypeOf,Object),qt=Object.create,ze=ut.propertyIsEnumerable,Me=xe.splice,K=Ut?Ut.toStringTag:void 0,pt=function(){try{var t=wt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Fe=dt?dt.isBuffer:void 0,Wt=Math.max,De=Date.now,Kt=wt(et,"Map"),rt=wt(Object,"create"),Ue=function(){function t(){}return function(e){if(!Z(e))return{};if(qt)return qt(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 o=t[e];this.set(o[0],o[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===T?void 0:n}return L.call(e,t)?e[t]:void 0}function qe(t){var e=this.__data__;return rt?e[t]!==void 0:L.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?T:e,this}Q.prototype.clear=He,Q.prototype.delete=Ge,Q.prototype.get=Re,Q.prototype.has=qe,Q.prototype.set=We;function z(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}function Ke(){this.__data__=[],this.size=0}function Qe(t){var e=this.__data__,n=ht(e,t);if(n<0)return!1;var o=e.length-1;return n==o?e.pop():Me.call(e,n,1),--this.size,!0}function Ze(t){var e=this.__data__,n=ht(e,t);return n<0?void 0:e[n][1]}function Je(t){return ht(this.__data__,t)>-1}function Xe(t,e){var n=this.__data__,o=ht(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}z.prototype.clear=Ke,z.prototype.delete=Qe,z.prototype.get=Ze,z.prototype.has=Je,z.prototype.set=Xe;function X(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}function Ye(){this.size=0,this.__data__={hash:new Q,map:new(Kt||z),string:new Q}}function ke(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e}function tn(t){return bt(this,t).get(t)}function en(t){return bt(this,t).has(t)}function nn(t,e){var n=bt(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}X.prototype.clear=Ye,X.prototype.delete=ke,X.prototype.get=tn,X.prototype.has=en,X.prototype.set=nn;function Y(t){var e=this.__data__=new z(t);this.size=e.size}function rn(){this.__data__=new z,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 z){var o=n.__data__;if(!Kt||o.length<_-1)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new X(o)}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=Ot(t),o=!n&&Ct(t),s=!n&&!o&&Yt(t),f=!n&&!o&&!s&&te(t),h=n||o||s||f,a=h?Ae(t.length,String):[],g=a.length;for(var V in t)(e||L.call(t,V))&&!(h&&(V=="length"||s&&(V=="offset"||V=="parent")||f&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Jt(V,g)))&&a.push(V);return a}function Tt(t,e,n){(n!==void 0&&!_t(t[e],n)||n===void 0&&!(e in t))&&St(t,e,n)}function un(t,e,n){var o=t[e];(!(L.call(t,e)&&_t(o,n))||n===void 0&&!(e in t))&&St(t,e,n)}function ht(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__"&&pt?pt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var fn=$n();function gt(t){return t==null?t===void 0?u:tt:K&&K in Object(t)?Cn(t):Vn(t)}function Qt(t){return ot(t)&&gt(t)==O}function dn(t){if(!Z(t)||An(t))return!1;var e=Bt(t)?Le:Ce;return e.test(In(t))}function pn(t){return ot(t)&&kt(t.length)&&!!p[gt(t)]}function hn(t){if(!Z(t))return Nn(t);var e=Xt(t),n=[];for(var o in t)o=="constructor"&&(e||!L.call(t,o))||n.push(o);return n}function Zt(t,e,n,o,s){t!==e&&fn(e,function(f,h){if(s||(s=new Y),Z(f))gn(t,e,h,n,Zt,o,s);else{var a=o?o($t(t,h),f,h+"",t,e,s):void 0;a===void 0&&(a=f),Tt(t,h,a)}},ee)}function gn(t,e,n,o,s,f,h){var a=$t(t,n),g=$t(e,n),V=h.get(g);if(V){Tt(t,n,V);return}var N=f?f(a,g,n+"",t,e,h):void 0,it=N===void 0;if(it){var At=Ot(g),Nt=!At&&Yt(g),re=!At&&!Nt&&te(g);N=g,At||Nt||re?Ot(a)?N=a:Ln(a)?N=Tn(a):Nt?(it=!1,N=mn(g,!0)):re?(it=!1,N=yn(g,!0)):N=[]:zn(g)||Ct(g)?(N=a,Ct(a)?N=Mn(a):(!Z(a)||Bt(a))&&(N=On(g))):it=!1}it&&(h.set(g,N),s(N,g,o,f,h),h.delete(g)),Tt(t,n,N)}function bn(t,e){return xn(jn(t,e,ne),t+"")}var _n=pt?function(t,e){return pt(t,"toString",{configurable:!0,enumerable:!1,value:Dn(e),writable:!0})}:ne;function mn(t,e){if(e)return t.slice();var n=t.length,o=Gt?Gt(n):new t.constructor(n);return t.copy(o),o}function vn(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(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,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e}function Sn(t,e,n,o){var s=!n;n||(n={});for(var f=-1,h=e.length;++f<h;){var a=e[f],g=o?o(n[a],t[a],a,n,t):void 0;g===void 0&&(g=t[a]),s?St(n,a,g):un(n,a,g)}return n}function wn(t){return bn(function(e,n){var o=-1,s=n.length,f=s>1?n[s-1]:void 0,h=s>2?n[2]:void 0;for(f=t.length>3&&typeof f=="function"?(s--,f):void 0,h&&En(n[0],n[1],h)&&(f=s<3?void 0:f,s=1),e=Object(e);++o<s;){var a=n[o];a&&t(e,a,o,f)}return e})}function $n(t){return function(e,n,o){for(var s=-1,f=Object(e),h=o(e),a=h.length;a--;){var g=h[t?a:++s];if(n(f[g],g,f)===!1)break}return e}}function bt(t,e){var n=t.__data__;return Bn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function wt(t,e){var n=Ve(t,e);return dn(n)?n:void 0}function Cn(t){var e=L.call(t,K),n=t[K];try{t[K]=void 0;var o=!0}catch{}var s=Dt.call(t);return o&&(e?t[K]=n:delete t[K]),s}function On(t){return typeof t.constructor=="function"&&!Xt(t)?Ue(Rt(t)):{}}function Jt(t,e){var n=typeof t;return e=e==null?y:e,!!e&&(n=="number"||n!="symbol"&&Oe.test(t))&&t>-1&&t%1==0&&t<e}function En(t,e,n){if(!Z(n))return!1;var o=typeof e;return(o=="number"?Et(n)&&Jt(e,n.length):o=="string"&&e in n)?_t(n[e],t):!1}function Bn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function An(t){return!!Ft&&Ft in t}function Xt(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ut;return t===n}function Nn(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Vn(t){return Dt.call(t)}function jn(t,e,n){return e=Wt(e===void 0?t.length-1:e,0),function(){for(var o=arguments,s=-1,f=Wt(o.length-e,0),h=Array(f);++s<f;)h[s]=o[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=o[s];return a[e]=n(h),Be(t,this,a)}}function $t(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var xn=Pn(_n);function Pn(t){var e=0,n=0;return function(){var o=De(),s=E-(o-n);if(n=o,s>0){if(++e>=m)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function In(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 Ct=Qt(function(){return arguments}())?Qt:function(t){return ot(t)&&L.call(t,"callee")&&!ze.call(t,"callee")},Ot=Array.isArray;function Et(t){return t!=null&&kt(t.length)&&!Bt(t)}function Ln(t){return ot(t)&&Et(t)}var Yt=Fe||Un;function Bt(t){if(!Z(t))return!1;var e=gt(t);return e==$||e==F||e==x||e==l}function kt(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 zn(t){if(!ot(t)||gt(t)!=C)return!1;var e=Rt(t);if(e===null)return!0;var n=L.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ft.call(n)==Ie}var te=Mt?Ne(Mt):pn;function Mn(t){return Sn(t,ee(t))}function ee(t){return Et(t)?cn(t,!0):hn(t)}var Fn=wn(function(t,e,n){Zt(t,e,n)});function Dn(t){return function(){return t}}function ne(t){return t}function Un(){return!1}i.exports=Fn})(mt,mt.exports);var Vt=mt.exports,jt=(i,b)=>{const _=i.__vccOpts||i;for(const[T,m]of b)_[T]=m;return _};const ae=r.defineComponent({name:"VOnboardingStep",setup(i,{slots:b}){const _=r.ref(!1),T=r.inject("next-step",()=>{}),m=r.inject("previous-step",()=>{}),E=r.inject("exit",()=>{}),y=r.inject("options"),O=r.computed(()=>Vt({},y==null?void 0:y.value,v.value.options)),M=r.inject("is-first-step"),x=r.inject("is-last-step"),v=r.inject("step",{}),S=r.computed(()=>{var c,u,w,B,A,P;return{previous:(u=(c=O.value)==null?void 0:c.labels)==null?void 0:u.previousButton,next:(B=(w=O.value)==null?void 0:w.labels)==null?void 0:B.nextButton,finish:(P=(A=O.value)==null?void 0:A.labels)==null?void 0:P.finishButton}}),I=()=>{l(),T()},$=()=>{l(),m()};r.watch(()=>v.value,(c,u)=>{var w;!((w=b.default)!=null&&w.call(b))||l(u)});const F=r.ref(null),{updatePath:J,path:k}=ie(),tt=()=>{var u,w,B,A,P,U,H,G,R,q,W,ct;const c=at((w=(u=v==null?void 0:v.value)==null?void 0:u.attachTo)==null?void 0:w.element);c&&F.value&&(_.value=!0,(A=(B=O.value)==null?void 0:B.scrollToStep)!=null&&A.enabled&&c.scrollIntoView((U=(P=O.value)==null?void 0:P.scrollToStep)==null?void 0:U.options),oe.createPopper(c,F.value,O.value.popper),(G=(H=O.value)==null?void 0:H.overlay)!=null&&G.enabled&&J(c,{padding:(q=(R=O.value)==null?void 0:R.overlay)==null?void 0:q.padding,borderRadius:(ct=(W=O.value)==null?void 0:W.overlay)==null?void 0:ct.borderRadius}),d(c))},C=async()=>{var c,u,w;await((w=(u=(c=v==null?void 0:v.value)==null?void 0:c.on)==null?void 0:u.beforeStep)==null?void 0:w.call(u)),tt()},l=(c=v.value)=>{var u,w,B,A;(w=(u=c==null?void 0:c.on)==null?void 0:u.afterStep)==null||w.call(u),D(at((B=c==null?void 0:c.attachTo)==null?void 0:B.element),(A=c.attachTo)==null?void 0:A.classList)},d=(c=at(v.value.attachTo.element))=>{const u=v.value.attachTo.classList;!u||!c||c.classList.add(...u)},D=(c=at(v.value.attachTo.element),u)=>{!u||!c||c.classList.remove(...u)};return r.onMounted(C),{stepElement:F,onNext:I,onPrevious:$,path:k,show:_,step:v,isFirst:M,isLast:x,exit:E,buttonLabels:S}}}),se={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"}},le=["d"],ce={ref:"stepElement",style:{position:"relative","z-index":"var(--v-onboarding-step-z, 20)"}},ue={class:"v-onboarding-item"},fe={class:"v-onboarding-item__header"},de={key:0,class:"v-onboarding-item__header-title"},pe=[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)],he={key:0,class:"v-onboarding-item__description"},ge={class:"v-onboarding-item__actions"},be=r.createElementVNode("div",{"data-popper-arrow":""},null,-1);function _e(i,b,_,T,m,E){return r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createElementBlock("svg",se,[r.createElementVNode("path",{d:i.path},null,8,le)])),r.createElementVNode("div",ce,[i.step?r.renderSlot(i.$slots,"default",{key:0},()=>[r.createElementVNode("div",ue,[r.createElementVNode("div",fe,[i.step.content.title?(r.openBlock(),r.createElementBlock("span",de,r.toDisplayString(i.step.content.title),1)):r.createCommentVNode("",!0),r.createElementVNode("button",{onClick:b[0]||(b[0]=(...y)=>i.exit&&i.exit(...y)),class:"v-onboarding-item__header-close"},pe)]),i.step.content.description?(r.openBlock(),r.createElementBlock("p",he,r.toDisplayString(i.step.content.description),1)):r.createCommentVNode("",!0),r.createElementVNode("div",ge,[i.isFirst?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",onClick:b[1]||(b[1]=(...y)=>i.onPrevious&&i.onPrevious(...y)),class:"v-onboarding-btn-secondary"},r.toDisplayString(i.buttonLabels.previous),1)),r.createElementVNode("button",{onClick:b[2]||(b[2]=(...y)=>i.onNext&&i.onNext(...y)),type:"button",class:"v-onboarding-btn-primary"},r.toDisplayString(i.isLast?i.buttonLabels.finish:i.buttonLabels.next),1)])])]):r.createCommentVNode("",!0),be],512)],512)),[[r.vShow,i.show]])}var xt=jt(ae,[["render",_e]]);const me=r.defineComponent({name:"VOnboardingWrapper",components:{VOnboardingStep:xt},props:{steps:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},setup(i,{expose:b}){const _=r.ref(-1),T=$=>{typeof $=="function"?_.value=$(_.value):_.value=$},m=r.computed(()=>{var $;return(($=i.steps)==null?void 0:$[_.value])||null}),E=()=>{T($=>$-1)},y=()=>{T($=>$+1)},O=r.computed(()=>_.value>=i.steps.length||_.value<0),M=()=>{T(0)},x=()=>{T(-1)};b({start:M,finish:x,goToStep:T});const v=r.computed(()=>Vt({},st,i.options));r.provide("options",v),r.provide("step",m),r.provide("next-step",y),r.provide("previous-step",E),r.provide("exit",()=>x());const S=r.computed(()=>_.value===0),I=r.computed(()=>_.value===i.steps.length-1);return r.provide("is-first-step",S),r.provide("is-last-step",I),{index:_,activeStep:m,toPreviousStep:E,toNextStep:y,isFinished:O,setIndex:T,isFirstStep:S,isLastStep:I,finish:x}}}),ve={key:0,"data-v-onboarding-wrapper":""};function ye(i,b,_,T,m,E){const y=r.resolveComponent("VOnboardingStep");return i.isFinished?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",ve,[r.renderSlot(i.$slots,"default",{key:i.index,step:i.activeStep,next:()=>i.toNextStep(),previous:()=>i.toPreviousStep(),exit:()=>i.finish(),isFirst:i.isFirstStep,isLast:i.isLastStep,index:i.index},()=>[(r.openBlock(),r.createBlock(y,{key:i.index}))])]))}var Te=jt(me,[["render",ye]]);function Se(i){return{start:()=>{var m;return(m=i==null?void 0:i.value)==null?void 0:m.start()},finish:()=>{var m;return(m=i==null?void 0:i.value)==null?void 0:m.finish()},goToStep:m=>{var E;return(E=i==null?void 0:i.value)==null?void 0:E.goToStep(m)}}}var Gn="";j.VOnboardingStep=xt,j.VOnboardingWrapper=Te,j.useVOnboarding=Se,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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"&&lt&&lt.Object===Object&&lt,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
+ `)();N.VOnboardingStep=zt,N.VOnboardingWrapper=we,N.useVOnboarding=Se,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-onboarding",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "v-onboarding is a super-slim, fully-typed onboarding component for Vue 3",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,11 @@ export interface VOnboardingWrapperOptions {
22
22
  scrollToStep?: {
23
23
  enabled?: boolean
24
24
  options?: ScrollIntoViewOptions
25
- }
25
+ },
26
+ hideButtons?: {
27
+ previous?: boolean
28
+ next?: boolean
29
+ },
26
30
  labels?: {
27
31
  previousButton?: string
28
32
  nextButton?: string
@@ -49,5 +53,9 @@ export const defaultVOnboardingWrapperOptions: VOnboardingWrapperOptions = {
49
53
  previousButton: 'Previous',
50
54
  nextButton: 'Next',
51
55
  finishButton: 'Finish'
56
+ },
57
+ hideButtons: {
58
+ previous: false,
59
+ next: false
52
60
  }
53
61
  }
package/src/typings.d.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import { DefineComponent } from 'vue'
1
2
  import { StepEntity } from '@/types/StepEntity'
2
3
  import { VOnboardingWrapperOptions } from '@/types/VOnboardingWrapper'
3
- import { DefineComponent } from 'vue'
4
4
 
5
5
  declare const VOnboardingWrapper: DefineComponent<{
6
6
  steps: StepEntity[]
@@ -15,4 +15,4 @@ declare const useVOnboarding: (wrapperRef: any) => {
15
15
  goToStep: (newStepNumber: number | ((currentStepNumber: number) => number)) => void
16
16
  }
17
17
 
18
- export { VOnboardingWrapper, VOnboardingStep, useVOnboarding }
18
+ export { VOnboardingWrapperOptions, VOnboardingWrapper, VOnboardingStep, useVOnboarding }
@@ -41,6 +41,11 @@
41
41
  "default": "() => ({})"
42
42
  }
43
43
  ],
44
+ "events": [
45
+ {
46
+ "name": "exit"
47
+ }
48
+ ],
44
49
  "slots": [
45
50
  {
46
51
  "name": "default"