@retoo/borda 0.0.2 → 0.1.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/borda.cjs.js +103 -23
- package/dist/borda.css +18 -8
- package/dist/borda.css.map +1 -1
- package/dist/borda.es.js +103 -23
- package/dist/borda.min.cjs.js +234 -190
- package/dist/borda.min.css +1 -1
- package/dist/borda.min.es.js +895 -851
- package/dist/borda.min.umd.js +234 -190
- package/dist/borda.umd.js +103 -23
- package/dist/index.d.ts +20 -5
- package/package.json +1 -1
package/dist/borda.min.cjs.js
CHANGED
|
@@ -2276,7 +2276,7 @@ var [Xr, Wr] = function() {
|
|
|
2276
2276
|
return ie("setContext").set(e, t), t;
|
|
2277
2277
|
}(e, t)];
|
|
2278
2278
|
}(), Yr = function(e) {
|
|
2279
|
-
return e.ON_BORDA_DESTROY = "borda:on-destroy", e.ON_CLOSE_CLICK = "close:click", e.ON_OVERLAY_CLICK = "overlay:click", e.ON_TOUR_START = "tour:start", e.ON_TOUR_FINISH = "tour:finish", e.ON_TOUR_CLOSE = "tour:close", e.ON_TOUR_NEXT = "tour:next", e.ON_TOUR_PREV = "tour:prev", e.ON_KEYBOARD_NEXT = "keyboard:next", e.ON_KEYBOARD_PREV = "keyboard:prev", e.ON_TOUR_STEP_CHANGE = "tour:step-change", e.ON_SKIP_CHANGE = "skip:change", e.ON_SKIP_CLEAR = "skip:clear", e.ON_VISIBILITY_SHOW = "visibility:show", e.ON_VISIBILITY_HIDE = "visibility:hide", e;
|
|
2279
|
+
return e.ON_BORDA_DESTROY = "borda:on-destroy", e.ON_CLOSE_CLICK = "close:click", e.ON_OVERLAY_CLICK = "overlay:click", e.ON_TOUR_START = "tour:start", e.ON_TOUR_FINISH = "tour:finish", e.ON_TOUR_CLOSE = "tour:close", e.ON_TOUR_NEXT = "tour:next", e.ON_TOUR_PREV = "tour:prev", e.ON_TOUR_ERROR = "tour:error", e.ON_KEYBOARD_NEXT = "keyboard:next", e.ON_KEYBOARD_PREV = "keyboard:prev", e.ON_TOUR_STEP_CHANGE = "tour:step-change", e.ON_SKIP_CHANGE = "skip:change", e.ON_SKIP_CLEAR = "skip:clear", e.ON_VISIBILITY_SHOW = "visibility:show", e.ON_VISIBILITY_HIDE = "visibility:hide", e;
|
|
2280
2280
|
}({});
|
|
2281
2281
|
function Zr() {
|
|
2282
2282
|
const e = /* @__PURE__ */ new Map();
|
|
@@ -2591,9 +2591,16 @@ function Co(e) {
|
|
|
2591
2591
|
};
|
|
2592
2592
|
}
|
|
2593
2593
|
function No(e) {
|
|
2594
|
+
try {
|
|
2595
|
+
return document.querySelector(e);
|
|
2596
|
+
} catch {
|
|
2597
|
+
return null;
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
function ko(e) {
|
|
2594
2601
|
if (!e) return null;
|
|
2595
2602
|
if (e instanceof HTMLElement) return e;
|
|
2596
|
-
if ("string" == typeof e) return
|
|
2603
|
+
if ("string" == typeof e) return No(e);
|
|
2597
2604
|
const t = function(e) {
|
|
2598
2605
|
const t = [];
|
|
2599
2606
|
if (e.id && t.push(`#${CSS.escape(e.id)}`), e.class && t.push(`.${CSS.escape(e.class)}`), e.data) {
|
|
@@ -2602,22 +2609,27 @@ function No(e) {
|
|
|
2602
2609
|
}
|
|
2603
2610
|
return t.join("");
|
|
2604
2611
|
}(e);
|
|
2605
|
-
return t ?
|
|
2612
|
+
return t ? No(t) : null;
|
|
2606
2613
|
}
|
|
2607
|
-
function
|
|
2614
|
+
function Ao(e, t) {
|
|
2608
2615
|
let n = tt(0), r = tt(!1), o = null, i = null;
|
|
2609
|
-
const s = Oe(() => e.current.steps ?? []), a = Oe(() => wn(s).length), l = Oe(() => wn(s)[wn(n)]), u = Oe(() => wn(n) + 1), c = Oe(() =>
|
|
2610
|
-
|
|
2616
|
+
const s = Oe(() => e.current.steps ?? []), a = Oe(() => wn(s).length), l = Oe(() => wn(s)[wn(n)]), u = Oe(() => wn(n) + 1), c = Oe(() => ko(wn(l)?.target)), f = Oe(() => wn(n) >= wn(a) - 1), d = Oe(() => wn(a) > 0), p = Oe(() => !wn(f)), h = Oe(() => wn(n) > 0), v = Oe(() => e.getConfig().tour);
|
|
2617
|
+
function g() {
|
|
2618
|
+
if (!wn(l) || wn(c)) return !0;
|
|
2619
|
+
const e = new ho(`Borda: target for step ${wn(u)} did not resolve to an element.`);
|
|
2620
|
+
return console.error(e), t.emit(Yr.ON_TOUR_ERROR, e), t.emit(Yr.ON_TOUR_CLOSE), !1;
|
|
2621
|
+
}
|
|
2622
|
+
async function m(e) {
|
|
2611
2623
|
if (e < 0 || e >= wn(a)) return;
|
|
2612
2624
|
const r = wn(s)[wn(n)], o = wn(s)[e];
|
|
2613
|
-
r?.onDeselected?.(), await o?.prepareElement?.(), o?.onBeforeHighlighted?.(), rt(n, e, !0), o?.onHighlighted?.(), t.emit(Yr.ON_TOUR_STEP_CHANGE, wn(u));
|
|
2625
|
+
r?.onDeselected?.(), await o?.prepareElement?.(), o?.onBeforeHighlighted?.(), rt(n, e, !0), g() && (o?.onHighlighted?.(), t.emit(Yr.ON_TOUR_STEP_CHANGE, wn(u)));
|
|
2614
2626
|
}
|
|
2615
|
-
function
|
|
2627
|
+
function _() {
|
|
2616
2628
|
return new Promise((e, t) => {
|
|
2617
2629
|
o = e, i = t;
|
|
2618
2630
|
});
|
|
2619
2631
|
}
|
|
2620
|
-
function
|
|
2632
|
+
function b() {
|
|
2621
2633
|
t.emit(Yr.ON_TOUR_FINISH);
|
|
2622
2634
|
}
|
|
2623
2635
|
return {
|
|
@@ -2661,33 +2673,34 @@ function ko(e, t) {
|
|
|
2661
2673
|
clearMovePrevented: function() {
|
|
2662
2674
|
rt(r, !1), i?.(), o = null, i = null;
|
|
2663
2675
|
},
|
|
2664
|
-
changeStep:
|
|
2676
|
+
changeStep: m,
|
|
2665
2677
|
prev: async function() {
|
|
2666
2678
|
if (wn(h)) {
|
|
2667
2679
|
if (wn(l)?.onPrev?.(), wn(v)?.onPrev?.(), t.emit(Yr.ON_TOUR_PREV), wn(r)) try {
|
|
2668
|
-
await
|
|
2680
|
+
await _();
|
|
2669
2681
|
} catch {
|
|
2670
2682
|
return;
|
|
2671
2683
|
}
|
|
2672
|
-
await
|
|
2684
|
+
await m(wn(n) - 1);
|
|
2673
2685
|
}
|
|
2674
2686
|
},
|
|
2675
2687
|
next: async function() {
|
|
2676
|
-
if (wn(f))
|
|
2688
|
+
if (wn(f)) b();
|
|
2677
2689
|
else {
|
|
2678
2690
|
if (wn(l)?.onNext?.(), wn(v)?.onNext?.(), t.emit(Yr.ON_TOUR_NEXT), wn(r)) try {
|
|
2679
|
-
await
|
|
2691
|
+
await _();
|
|
2680
2692
|
} catch {
|
|
2681
2693
|
return;
|
|
2682
2694
|
}
|
|
2683
|
-
await
|
|
2695
|
+
await m(wn(n) + 1);
|
|
2684
2696
|
}
|
|
2685
2697
|
},
|
|
2686
|
-
finish:
|
|
2687
|
-
}
|
|
2698
|
+
finish: b
|
|
2699
|
+
},
|
|
2700
|
+
checkCurrentTarget: g
|
|
2688
2701
|
};
|
|
2689
2702
|
}
|
|
2690
|
-
function
|
|
2703
|
+
function Po(e) {
|
|
2691
2704
|
return { highlight: function(t, n, r) {
|
|
2692
2705
|
return e({
|
|
2693
2706
|
...n,
|
|
@@ -2695,15 +2708,15 @@ function Ao(e) {
|
|
|
2695
2708
|
}, r);
|
|
2696
2709
|
} };
|
|
2697
2710
|
}
|
|
2698
|
-
var
|
|
2711
|
+
var Do = new Set([
|
|
2699
2712
|
"INPUT",
|
|
2700
2713
|
"TEXTAREA",
|
|
2701
2714
|
"SELECT"
|
|
2702
2715
|
]);
|
|
2703
|
-
function
|
|
2716
|
+
function Lo(e, t) {
|
|
2704
2717
|
const n = Oe(() => e.getConfig().tour);
|
|
2705
2718
|
function r(e) {
|
|
2706
|
-
if (!
|
|
2719
|
+
if (!Do.has(e.target?.tagName)) switch (e.key) {
|
|
2707
2720
|
case "ArrowRight":
|
|
2708
2721
|
e.preventDefault(), t.emit(Yr.ON_KEYBOARD_NEXT);
|
|
2709
2722
|
break;
|
|
@@ -2722,15 +2735,15 @@ function Do(e, t) {
|
|
|
2722
2735
|
}
|
|
2723
2736
|
};
|
|
2724
2737
|
}
|
|
2725
|
-
var
|
|
2726
|
-
function
|
|
2738
|
+
var Ro = [co.RESPONSIVE, co.STEP];
|
|
2739
|
+
function Mo(e) {
|
|
2727
2740
|
const t = lt({});
|
|
2728
2741
|
function n(e, n) {
|
|
2729
2742
|
null === n ? delete t[e] : t[e] = n;
|
|
2730
2743
|
}
|
|
2731
2744
|
function r() {
|
|
2732
2745
|
let n = e.current;
|
|
2733
|
-
for (const e of
|
|
2746
|
+
for (const e of Ro) {
|
|
2734
2747
|
const r = t[e];
|
|
2735
2748
|
r && (n = mo(n, r()));
|
|
2736
2749
|
}
|
|
@@ -2766,7 +2779,7 @@ function Ro(e) {
|
|
|
2766
2779
|
}
|
|
2767
2780
|
};
|
|
2768
2781
|
}
|
|
2769
|
-
function
|
|
2782
|
+
function Io(e, t) {
|
|
2770
2783
|
let n = tt(null), r = [];
|
|
2771
2784
|
function o(e, r) {
|
|
2772
2785
|
const o = function(e, t) {
|
|
@@ -2802,47 +2815,47 @@ function Mo(e, t) {
|
|
|
2802
2815
|
}
|
|
2803
2816
|
};
|
|
2804
2817
|
}
|
|
2805
|
-
var
|
|
2818
|
+
var Bo = function(e) {
|
|
2806
2819
|
return e.LINEAR = "linear", e.EASE = "ease", e.EASE_IN = "ease-in", e.EASE_OUT = "ease-out", e.EASE_IN_OUT = "ease-in-out", e;
|
|
2807
|
-
}({}),
|
|
2808
|
-
[
|
|
2809
|
-
[
|
|
2810
|
-
[
|
|
2811
|
-
[
|
|
2812
|
-
[
|
|
2813
|
-
},
|
|
2814
|
-
function
|
|
2820
|
+
}({}), $o = {
|
|
2821
|
+
[Bo.LINEAR]: (e) => e,
|
|
2822
|
+
[Bo.EASE]: (e) => e * e * (3 - 2 * e),
|
|
2823
|
+
[Bo.EASE_IN]: (e) => e * e,
|
|
2824
|
+
[Bo.EASE_OUT]: (e) => 1 - (1 - e) * (1 - e),
|
|
2825
|
+
[Bo.EASE_IN_OUT]: (e) => e < .5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2
|
|
2826
|
+
}, Ho = Bo.EASE_IN_OUT;
|
|
2827
|
+
function jo({ getEasing: e }) {
|
|
2815
2828
|
const t = Oe(e), n = Oe(() => function(e) {
|
|
2816
|
-
return "function" == typeof e ? e : e ?
|
|
2829
|
+
return "function" == typeof e ? e : e ? $o[e] : $o[Ho];
|
|
2817
2830
|
}(wn(t)));
|
|
2818
2831
|
return { get easingFunction() {
|
|
2819
2832
|
return wn(n);
|
|
2820
2833
|
} };
|
|
2821
2834
|
}
|
|
2822
|
-
var
|
|
2835
|
+
var Fo = {
|
|
2823
2836
|
block: "center",
|
|
2824
2837
|
inline: "nearest",
|
|
2825
2838
|
duration: 400,
|
|
2826
|
-
easing:
|
|
2839
|
+
easing: Bo.EASE_IN_OUT,
|
|
2827
2840
|
offset: {
|
|
2828
2841
|
x: 0,
|
|
2829
2842
|
y: 0
|
|
2830
2843
|
},
|
|
2831
2844
|
isLocked: !0
|
|
2832
2845
|
};
|
|
2833
|
-
function
|
|
2846
|
+
function zo(e) {
|
|
2834
2847
|
let t = tt(!1), n = null;
|
|
2835
2848
|
const r = Oe(() => e.getConfig().scroll), o = Oe(() => !1 !== wn(r)), i = Oe(() => wn(r) || {}), s = Oe(() => {
|
|
2836
2849
|
return e = wn(i), {
|
|
2837
|
-
...
|
|
2850
|
+
...Fo,
|
|
2838
2851
|
...e,
|
|
2839
2852
|
offset: {
|
|
2840
|
-
...
|
|
2853
|
+
...Fo.offset,
|
|
2841
2854
|
...e.offset ?? {}
|
|
2842
2855
|
}
|
|
2843
2856
|
};
|
|
2844
2857
|
var e;
|
|
2845
|
-
}), a =
|
|
2858
|
+
}), a = jo({ getEasing: () => wn(s).easing }), l = Oe(() => e.getConfig().animation), u = Oe(() => !1 !== wn(l) && !1 !== wn(l)?.isEnabled), c = Oe(() => wn(u) ? wn(s).duration : 0), f = { resolve: function(e, t, n, r, o) {
|
|
2846
2859
|
return e + function(e, t, n, r) {
|
|
2847
2860
|
const o = t + n;
|
|
2848
2861
|
switch (r) {
|
|
@@ -2909,7 +2922,7 @@ function Fo(e) {
|
|
|
2909
2922
|
}
|
|
2910
2923
|
};
|
|
2911
2924
|
}
|
|
2912
|
-
function
|
|
2925
|
+
function Uo(e, t) {
|
|
2913
2926
|
let n = tt(!1);
|
|
2914
2927
|
const r = Oe(() => e.getConfig().skip), o = Oe(() => !1 === wn(r)), i = Oe(() => "object" == typeof wn(r) && wn(r)?.storageKey ? wn(r).storageKey : "borda-tour-skipped");
|
|
2915
2928
|
function s(e, t) {
|
|
@@ -2950,7 +2963,7 @@ function zo(e, t) {
|
|
|
2950
2963
|
}
|
|
2951
2964
|
};
|
|
2952
2965
|
}
|
|
2953
|
-
function
|
|
2966
|
+
function Vo(e, t) {
|
|
2954
2967
|
function n() {
|
|
2955
2968
|
e.mergeConfig({ visibility: { isHidden: !1 } }), t.emit(Yr.ON_VISIBILITY_SHOW);
|
|
2956
2969
|
}
|
|
@@ -2977,14 +2990,14 @@ function Uo(e, t) {
|
|
|
2977
2990
|
};
|
|
2978
2991
|
}
|
|
2979
2992
|
Q = !0;
|
|
2980
|
-
var
|
|
2981
|
-
var
|
|
2993
|
+
var qo = $n("<path d=\"M4.45416 4.45404L11.3625 11.3624Z\" fill=\"currentColor\"></path><path d=\"M4.45416 11.3624L11.3625 4.45404Z\" fill=\"currentColor\"></path><path d=\"M4.45416 4.45404L11.3625 11.3624M4.45416 11.3624L11.3625 4.45404\" stroke=\"currentColor\" stroke-width=\"1.25\" stroke-linecap=\"round\" stroke-linejoin=\"bevel\"></path>", 1);
|
|
2994
|
+
var Ko = function(e) {
|
|
2982
2995
|
return e.RECTANGLE = "rectangle", e.CIRCLE = "circle", e.SQUARE = "square", e;
|
|
2983
|
-
}({}), Ko = function(e) {
|
|
2984
|
-
return e.FILLED = "filled", e.OUTLINED = "outlined", e.GHOST = "ghost", e.TEXT = "text", e;
|
|
2985
2996
|
}({}), Go = function(e) {
|
|
2997
|
+
return e.FILLED = "filled", e.OUTLINED = "outlined", e.GHOST = "ghost", e.TEXT = "text", e;
|
|
2998
|
+
}({}), Xo = function(e) {
|
|
2986
2999
|
return e.BUTTON = "button", e.SUBMIT = "submit", e.RESET = "reset", e;
|
|
2987
|
-
}({}),
|
|
3000
|
+
}({}), Wo = new Set([
|
|
2988
3001
|
"$$slots",
|
|
2989
3002
|
"$$events",
|
|
2990
3003
|
"$$legacy",
|
|
@@ -2999,12 +3012,12 @@ var qo = function(e) {
|
|
|
2999
3012
|
"customClasses",
|
|
3000
3013
|
"customStyles",
|
|
3001
3014
|
"children"
|
|
3002
|
-
]),
|
|
3003
|
-
function
|
|
3015
|
+
]), Yo = In("<button><!></button>");
|
|
3016
|
+
function Zo(e, t) {
|
|
3004
3017
|
ne(t, !0);
|
|
3005
|
-
let n = qr(t, "size", 19, () => oo.MD), r = qr(t, "shape", 19, () =>
|
|
3018
|
+
let n = qr(t, "size", 19, () => oo.MD), r = qr(t, "shape", 19, () => Ko.RECTANGLE), o = qr(t, "variant", 19, () => Go.FILLED), i = qr(t, "type", 19, () => Xo.BUTTON), s = new Proxy({
|
|
3006
3019
|
props: t,
|
|
3007
|
-
exclude:
|
|
3020
|
+
exclude: Wo
|
|
3008
3021
|
}, zr);
|
|
3009
3022
|
const a = Oe(() => [
|
|
3010
3023
|
"rb-button",
|
|
@@ -3017,7 +3030,7 @@ function Yo(e, t) {
|
|
|
3017
3030
|
const u = Oe(() => no(t.customStyles?.root));
|
|
3018
3031
|
var c = { getElements: function() {
|
|
3019
3032
|
return { root: wn(l) };
|
|
3020
|
-
} }, f =
|
|
3033
|
+
} }, f = Yo();
|
|
3021
3034
|
Ir(f, () => ({
|
|
3022
3035
|
id: t.id,
|
|
3023
3036
|
type: i(),
|
|
@@ -3042,9 +3055,9 @@ function Yo(e, t) {
|
|
|
3042
3055
|
t.children && e(p);
|
|
3043
3056
|
}), G(f), Fr(f, (e) => rt(l, e), () => wn(l)), Fn(e, f), re(c);
|
|
3044
3057
|
}
|
|
3045
|
-
var
|
|
3046
|
-
var
|
|
3047
|
-
function
|
|
3058
|
+
var Jo = $n("<svg fill=\"none\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\"><!></svg>");
|
|
3059
|
+
var Qo = In("<div><!></div>");
|
|
3060
|
+
function ei(e, t) {
|
|
3048
3061
|
ne(t, !0);
|
|
3049
3062
|
let n = qr(t, "size", 19, () => oo.MD), r = qr(t, "shape", 19, () => so.CIRCLE), o = qr(t, "aria", 19, () => ({ ariaLabel: "Close" }));
|
|
3050
3063
|
const { eventEmitter: i, close: s } = Xr();
|
|
@@ -3064,22 +3077,22 @@ function Qo(e, t) {
|
|
|
3064
3077
|
button: ro(wn(l)),
|
|
3065
3078
|
cross: ro(wn(u))
|
|
3066
3079
|
};
|
|
3067
|
-
} }, h =
|
|
3080
|
+
} }, h = Qo(), g = bt(h), m = (e) => {
|
|
3068
3081
|
var n = jn();
|
|
3069
3082
|
pr(yt(n), () => t.customHtml.button), Fn(e, n);
|
|
3070
3083
|
}, _ = (e) => {
|
|
3071
3084
|
{
|
|
3072
3085
|
let r = Oe(() => ({ root: t.customClasses?.button })), i = Oe(() => ({ root: t.customStyles?.button }));
|
|
3073
|
-
Fr(
|
|
3086
|
+
Fr(Zo(e, {
|
|
3074
3087
|
get aria() {
|
|
3075
3088
|
return o();
|
|
3076
3089
|
},
|
|
3077
3090
|
autosize: !0,
|
|
3078
3091
|
get shape() {
|
|
3079
|
-
return
|
|
3092
|
+
return Ko.CIRCLE;
|
|
3080
3093
|
},
|
|
3081
3094
|
get variant() {
|
|
3082
|
-
return
|
|
3095
|
+
return Go.FILLED;
|
|
3083
3096
|
},
|
|
3084
3097
|
get customClasses() {
|
|
3085
3098
|
return wn(r);
|
|
@@ -3101,7 +3114,7 @@ function Qo(e, t) {
|
|
|
3101
3114
|
]), s = Oe(() => no(t.customStyles?.root));
|
|
3102
3115
|
var a = { getElements: function() {
|
|
3103
3116
|
return { root: wn(o) };
|
|
3104
|
-
} }, l =
|
|
3117
|
+
} }, l = Jo();
|
|
3105
3118
|
return or(bt(l), () => t.children ?? v), G(l), Fr(l, (e) => rt(o, e), () => wn(o)), It(() => {
|
|
3106
3119
|
Mr(l, "id", t.id), yr(l, 0, gr(wn(i))), wr(l, wn(s)), Mr(l, "viewBox", n());
|
|
3107
3120
|
}), Fn(e, l), re(a);
|
|
@@ -3117,7 +3130,7 @@ function Qo(e, t) {
|
|
|
3117
3130
|
},
|
|
3118
3131
|
children: (e, t) => {
|
|
3119
3132
|
(function(e) {
|
|
3120
|
-
var t =
|
|
3133
|
+
var t = qo();
|
|
3121
3134
|
X(2), Fn(e, t);
|
|
3122
3135
|
})(e);
|
|
3123
3136
|
},
|
|
@@ -3135,34 +3148,34 @@ function Qo(e, t) {
|
|
|
3135
3148
|
Mr(h, "id", t.id), yr(h, 1, gr(wn(c))), wr(h, wn(f));
|
|
3136
3149
|
}), Fn(e, h), re(p);
|
|
3137
3150
|
}
|
|
3138
|
-
var
|
|
3151
|
+
var ti = {
|
|
3139
3152
|
label: "Back",
|
|
3140
|
-
type:
|
|
3141
|
-
variant:
|
|
3142
|
-
shape:
|
|
3143
|
-
}, ti = {
|
|
3144
|
-
label: "Next",
|
|
3145
|
-
type: Go.BUTTON,
|
|
3146
|
-
variant: Ko.FILLED,
|
|
3147
|
-
shape: qo.RECTANGLE
|
|
3153
|
+
type: Xo.BUTTON,
|
|
3154
|
+
variant: Go.OUTLINED,
|
|
3155
|
+
shape: Ko.RECTANGLE
|
|
3148
3156
|
}, ni = {
|
|
3149
|
-
label: "
|
|
3150
|
-
type:
|
|
3151
|
-
variant:
|
|
3152
|
-
shape:
|
|
3157
|
+
label: "Next",
|
|
3158
|
+
type: Xo.BUTTON,
|
|
3159
|
+
variant: Go.FILLED,
|
|
3160
|
+
shape: Ko.RECTANGLE
|
|
3153
3161
|
}, ri = {
|
|
3162
|
+
label: "Finish",
|
|
3163
|
+
type: Xo.BUTTON,
|
|
3164
|
+
variant: Go.FILLED,
|
|
3165
|
+
shape: Ko.RECTANGLE
|
|
3166
|
+
}, oi = {
|
|
3154
3167
|
label: "Skip",
|
|
3155
|
-
type:
|
|
3156
|
-
variant:
|
|
3157
|
-
shape:
|
|
3158
|
-
},
|
|
3159
|
-
var
|
|
3160
|
-
var
|
|
3168
|
+
type: Xo.BUTTON,
|
|
3169
|
+
variant: Go.TEXT,
|
|
3170
|
+
shape: Ko.RECTANGLE
|
|
3171
|
+
}, ii = In("<div><!> <div class=\"rb-tour-buttons__center\"><!></div> <!> <!></div>");
|
|
3172
|
+
var si = In("<img/>");
|
|
3173
|
+
var ai = function(e) {
|
|
3161
3174
|
return e.DEFAULT = "default", e.BLEED = "bleed", e;
|
|
3162
3175
|
}({});
|
|
3163
|
-
function
|
|
3176
|
+
function li(e, t) {
|
|
3164
3177
|
ne(t, !0);
|
|
3165
|
-
let n = qr(t, "src", 3, ""), r = qr(t, "alt", 3, ""), o = qr(t, "variant", 19, () =>
|
|
3178
|
+
let n = qr(t, "src", 3, ""), r = qr(t, "alt", 3, ""), o = qr(t, "variant", 19, () => ai.DEFAULT), i = tt(null);
|
|
3166
3179
|
const s = Oe(() => [
|
|
3167
3180
|
"rb-tour-image",
|
|
3168
3181
|
`rb-tour-image--${o()}`,
|
|
@@ -3183,7 +3196,7 @@ function ai(e, t) {
|
|
|
3183
3196
|
var n = jn();
|
|
3184
3197
|
pr(yt(n), () => t.customHtml.root), Fn(e, n);
|
|
3185
3198
|
}, f = (e) => {
|
|
3186
|
-
var a =
|
|
3199
|
+
var a = si();
|
|
3187
3200
|
Fr(a, (e) => rt(o, e), () => wn(o)), It(() => {
|
|
3188
3201
|
Mr(a, "id", t.id), yr(a, 1, gr(wn(i))), wr(a, wn(s)), Mr(a, "src", n()), Mr(a, "alt", r()), Mr(a, "aria-label", t.aria?.ariaLabel), Mr(a, "aria-labelledby", t.aria?.ariaLabelledby), Mr(a, "aria-describedby", t.aria?.ariaDescribedby);
|
|
3189
3202
|
}), Fn(e, a);
|
|
@@ -3217,15 +3230,15 @@ function ai(e, t) {
|
|
|
3217
3230
|
}
|
|
3218
3231
|
return re(a);
|
|
3219
3232
|
}
|
|
3220
|
-
var
|
|
3221
|
-
var
|
|
3222
|
-
var
|
|
3223
|
-
var
|
|
3233
|
+
var ui = In("<div></div>"), ci = In("<div role=\"progressbar\"></div>");
|
|
3234
|
+
var fi = In("<div role=\"progressbar\"><div><div></div></div></div>");
|
|
3235
|
+
var di = In("<div role=\"progressbar\"><span> </span></div>");
|
|
3236
|
+
var pi = function(e) {
|
|
3224
3237
|
return e.DOTS = "dots", e.TEXT = "text", e.LINE = "line", e;
|
|
3225
|
-
}({}),
|
|
3226
|
-
function
|
|
3238
|
+
}({}), hi = In("<div><!></div>");
|
|
3239
|
+
function vi(e, t) {
|
|
3227
3240
|
ne(t, !0);
|
|
3228
|
-
let n = qr(t, "currentStep", 3, 1), r = qr(t, "totalSteps", 3, 1), o = qr(t, "variant", 19, () =>
|
|
3241
|
+
let n = qr(t, "currentStep", 3, 1), r = qr(t, "totalSteps", 3, 1), o = qr(t, "variant", 19, () => pi.DOTS), i = tt(null);
|
|
3229
3242
|
const s = Oe(() => [
|
|
3230
3243
|
"rb-tour-progress",
|
|
3231
3244
|
`rb-tour-progress--${o()}`,
|
|
@@ -3233,7 +3246,7 @@ function hi(e, t) {
|
|
|
3233
3246
|
]), a = Oe(() => no(t.customStyles?.root));
|
|
3234
3247
|
var l = { getElements: function() {
|
|
3235
3248
|
return { root: wn(i) };
|
|
3236
|
-
} }, u =
|
|
3249
|
+
} }, u = hi(), c = bt(u), f = (e) => {
|
|
3237
3250
|
var n = jn();
|
|
3238
3251
|
pr(yt(n), () => t.customHtml.progress), Fn(e, n);
|
|
3239
3252
|
}, d = (e) => {
|
|
@@ -3245,9 +3258,9 @@ function hi(e, t) {
|
|
|
3245
3258
|
"rb-progress--dots",
|
|
3246
3259
|
t.customClasses?.root
|
|
3247
3260
|
]), s = Oe(() => no(t.customStyles?.root)), a = Oe(() => ["rb-progress__item", t.customClasses?.item]), l = Oe(() => no(t.customStyles?.item));
|
|
3248
|
-
var u =
|
|
3261
|
+
var u = ci();
|
|
3249
3262
|
Mr(u, "aria-valuemin", 1), lr(u, 20, () => Array.from({ length: r() }, (e, t) => t), (e) => e, (e, t) => {
|
|
3250
|
-
var r =
|
|
3263
|
+
var r = ui();
|
|
3251
3264
|
It((e) => {
|
|
3252
3265
|
yr(r, 1, e), wr(r, wn(l));
|
|
3253
3266
|
}, [() => gr([...wn(a), t + 1 === n() && "rb-progress__item--active"])]), Fn(e, r);
|
|
@@ -3277,7 +3290,7 @@ function hi(e, t) {
|
|
|
3277
3290
|
"rb-progress--text",
|
|
3278
3291
|
t.customClasses?.root
|
|
3279
3292
|
]), s = Oe(() => no(t.customStyles?.root)), a = Oe(() => ["rb-progress__item", t.customClasses?.item]), l = Oe(() => no(t.customStyles?.item));
|
|
3280
|
-
var u =
|
|
3293
|
+
var u = di();
|
|
3281
3294
|
Mr(u, "aria-valuemin", 1);
|
|
3282
3295
|
var c = bt(u), f = bt(c);
|
|
3283
3296
|
G(c), G(u), It(() => {
|
|
@@ -3306,7 +3319,7 @@ function hi(e, t) {
|
|
|
3306
3319
|
"rb-progress--line",
|
|
3307
3320
|
t.customClasses?.root
|
|
3308
3321
|
]), a = Oe(() => no(t.customStyles?.root)), l = Oe(() => ["rb-progress__track", t.customClasses?.track]), u = Oe(() => no(t.customStyles?.track)), c = Oe(() => ["rb-progress__progress", t.customClasses?.progress]), f = Oe(() => no(t.customStyles?.progress));
|
|
3309
|
-
var d =
|
|
3322
|
+
var d = fi();
|
|
3310
3323
|
Mr(d, "aria-valuemin", 1);
|
|
3311
3324
|
var p = bt(d), h = bt(p);
|
|
3312
3325
|
let v;
|
|
@@ -3329,13 +3342,13 @@ function hi(e, t) {
|
|
|
3329
3342
|
});
|
|
3330
3343
|
};
|
|
3331
3344
|
return sr(c, (e) => {
|
|
3332
|
-
t.customHtml?.progress ? e(f) : o() ===
|
|
3345
|
+
t.customHtml?.progress ? e(f) : o() === pi.DOTS ? e(d, 1) : o() === pi.TEXT ? e(p, 2) : o() === pi.LINE && e(h, 3);
|
|
3333
3346
|
}), G(u), Fr(u, (e) => rt(i, e), () => wn(i)), It(() => {
|
|
3334
3347
|
Mr(u, "id", t.id), yr(u, 1, gr(wn(s))), wr(u, wn(a)), Mr(u, "aria-label", t.aria?.ariaLabel), Mr(u, "aria-labelledby", t.aria?.ariaLabelledby), Mr(u, "aria-describedby", t.aria?.ariaDescribedby), Mr(u, "aria-disabled", t.aria?.ariaDisabled), Mr(u, "aria-expanded", t.aria?.ariaExpanded), Mr(u, "aria-controls", t.aria?.ariaControls), Mr(u, "aria-haspopup", t.aria?.ariaHaspopup), Mr(u, "aria-pressed", t.aria?.ariaPressed);
|
|
3335
3348
|
}), Fn(e, u), re(l);
|
|
3336
3349
|
}
|
|
3337
|
-
var
|
|
3338
|
-
function
|
|
3350
|
+
var gi = In("<input type=\"checkbox\"/>"), mi = In("<span></span>"), _i = In("<span> </span>"), bi = In("<label><!> <!></label>");
|
|
3351
|
+
function yi(e, t) {
|
|
3339
3352
|
ne(t, !0);
|
|
3340
3353
|
let n = qr(t, "checked", 3, !1), r = qr(t, "label", 3, "Don't show again"), o = qr(t, "disabled", 3, !1), i = tt(null), s = tt(null);
|
|
3341
3354
|
const a = Oe(() => ["rb-tour-skip", t.customClasses?.root]), l = Oe(() => no(t.customStyles?.root)), u = Oe(() => ["rb-tour-skip__input", t.customClasses?.input]), c = Oe(() => no(t.customStyles?.input)), f = Oe(() => ["rb-tour-skip__label", t.customClasses?.label]), d = Oe(() => no(t.customStyles?.label));
|
|
@@ -3348,11 +3361,11 @@ function bi(e, t) {
|
|
|
3348
3361
|
root: wn(i),
|
|
3349
3362
|
input: wn(s)
|
|
3350
3363
|
};
|
|
3351
|
-
} }, v =
|
|
3364
|
+
} }, v = bi(), g = bt(v), m = (e) => {
|
|
3352
3365
|
var n = jn();
|
|
3353
3366
|
pr(yt(n), () => t.customHtml.input), Fn(e, n);
|
|
3354
3367
|
}, _ = (e) => {
|
|
3355
|
-
var t =
|
|
3368
|
+
var t = gi();
|
|
3356
3369
|
Lr(t), Fr(t, (e) => rt(s, e), () => wn(s)), It(() => {
|
|
3357
3370
|
yr(t, 1, gr(wn(u))), wr(t, wn(c)), function(e, t) {
|
|
3358
3371
|
var n = Br(e);
|
|
@@ -3364,12 +3377,12 @@ function bi(e, t) {
|
|
|
3364
3377
|
t.customHtml?.input ? e(m) : e(_, -1);
|
|
3365
3378
|
});
|
|
3366
3379
|
var b = Tt(g, 2), y = (e) => {
|
|
3367
|
-
var n =
|
|
3380
|
+
var n = mi();
|
|
3368
3381
|
pr(n, () => t.customHtml.label, !0), G(n), It(() => {
|
|
3369
3382
|
yr(n, 1, gr(wn(f))), wr(n, wn(d));
|
|
3370
3383
|
}), Fn(e, n);
|
|
3371
3384
|
}, T = (e) => {
|
|
3372
|
-
var t =
|
|
3385
|
+
var t = _i(), n = bt(t, !0);
|
|
3373
3386
|
G(t), It(() => {
|
|
3374
3387
|
yr(t, 1, gr(wn(f))), wr(t, wn(d)), Wn(n, r());
|
|
3375
3388
|
}), Fn(e, t);
|
|
@@ -3381,20 +3394,20 @@ function bi(e, t) {
|
|
|
3381
3394
|
}), Fn(e, v), re(h);
|
|
3382
3395
|
}
|
|
3383
3396
|
Pn(["change"]);
|
|
3384
|
-
var
|
|
3397
|
+
var Ti = function(e) {
|
|
3385
3398
|
return e.TOP = "top", e.BOTTOM = "bottom", e.LEFT = "left", e.RIGHT = "right", e;
|
|
3386
3399
|
}({});
|
|
3387
|
-
function
|
|
3400
|
+
function wi({ getArrow: e, getPlacement: t }) {
|
|
3388
3401
|
const n = Oe(e), r = Oe(t), o = Oe(() => !1 === wn(n) ? null : function(e) {
|
|
3389
3402
|
switch (e) {
|
|
3390
3403
|
case io.BOTTOM_START:
|
|
3391
3404
|
case io.BOTTOM_CENTER:
|
|
3392
|
-
case io.BOTTOM_END: return
|
|
3405
|
+
case io.BOTTOM_END: return Ti.TOP;
|
|
3393
3406
|
case io.TOP_START:
|
|
3394
3407
|
case io.TOP_CENTER:
|
|
3395
|
-
case io.TOP_END: return
|
|
3396
|
-
case io.MIDDLE_END: return
|
|
3397
|
-
case io.MIDDLE_START: return
|
|
3408
|
+
case io.TOP_END: return Ti.BOTTOM;
|
|
3409
|
+
case io.MIDDLE_END: return Ti.LEFT;
|
|
3410
|
+
case io.MIDDLE_START: return Ti.RIGHT;
|
|
3398
3411
|
default: return null;
|
|
3399
3412
|
}
|
|
3400
3413
|
}(wn(n) ? wn(n).placement : wn(r))), i = Oe(() => wn(o) ? function(e) {
|
|
@@ -3409,7 +3422,7 @@ function Ti({ getArrow: e, getPlacement: t }) {
|
|
|
3409
3422
|
}
|
|
3410
3423
|
};
|
|
3411
3424
|
}
|
|
3412
|
-
function
|
|
3425
|
+
function Ei({ target: e, tooltip: t, placement: n, offset: r, margin: o, padding: i, autoPlacement: s, arrowSide: a, viewport: l }) {
|
|
3413
3426
|
function u(e, t, n, r) {
|
|
3414
3427
|
switch (n) {
|
|
3415
3428
|
case io.TOP_START: return {
|
|
@@ -3629,20 +3642,19 @@ function wi({ target: e, tooltip: t, placement: n, offset: r, margin: o, padding
|
|
|
3629
3642
|
arrowOffset: function(e, t, n) {
|
|
3630
3643
|
if (null === n) return 0;
|
|
3631
3644
|
const r = e.getBoundingClientRect();
|
|
3632
|
-
return n ===
|
|
3645
|
+
return n === Ti.TOP || n === Ti.BOTTOM ? r.left + r.width / 2 - t.left : r.top + r.height / 2 - t.top;
|
|
3633
3646
|
}(e, T, a)
|
|
3634
3647
|
};
|
|
3635
3648
|
}
|
|
3636
|
-
function
|
|
3649
|
+
function Si({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPadding: r, getOffset: o, getMargin: i, getAutoPlacement: s, getArrowSide: a }) {
|
|
3637
3650
|
let l = tt(0), u = tt(0), c = tt(lt(io.BOTTOM_START)), f = tt(0);
|
|
3638
3651
|
const d = yo(), p = bo(), h = Oe(e), v = Oe(t), g = Oe(() => {
|
|
3639
3652
|
return e = n(), fo.has(e) ? e : io.BOTTOM_START;
|
|
3640
3653
|
var e;
|
|
3641
3654
|
}), m = Oe(o), _ = Oe(i), b = Oe(r), y = Oe(s), T = Oe(a);
|
|
3642
|
-
|
|
3655
|
+
function w() {
|
|
3643
3656
|
if (!wn(h) || !wn(v)) return;
|
|
3644
|
-
|
|
3645
|
-
const e = wi({
|
|
3657
|
+
const e = Ei({
|
|
3646
3658
|
target: wn(h),
|
|
3647
3659
|
tooltip: wn(v),
|
|
3648
3660
|
placement: wn(g),
|
|
@@ -3657,6 +3669,13 @@ function Ei({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPad
|
|
|
3657
3669
|
}
|
|
3658
3670
|
});
|
|
3659
3671
|
rt(l, e.position.top, !0), rt(u, e.position.left, !0), rt(c, e.placement, !0), rt(f, e.arrowOffset, !0);
|
|
3672
|
+
}
|
|
3673
|
+
return Dt(() => {
|
|
3674
|
+
if (!wn(v)) return;
|
|
3675
|
+
const e = new ResizeObserver(w);
|
|
3676
|
+
return e.observe(wn(v)), () => e.disconnect();
|
|
3677
|
+
}), Dt(() => {
|
|
3678
|
+
p.x, p.y, w();
|
|
3660
3679
|
}), {
|
|
3661
3680
|
get top() {
|
|
3662
3681
|
return wn(l);
|
|
@@ -3672,8 +3691,8 @@ function Ei({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPad
|
|
|
3672
3691
|
}
|
|
3673
3692
|
};
|
|
3674
3693
|
}
|
|
3675
|
-
var
|
|
3676
|
-
function
|
|
3694
|
+
var Oi = In("<div></div>"), xi = In("<p> </p>"), Ci = In("<div><!> <!></div>"), Ni = In("<div><!> <!> <!> <!> <!> <!> <!></div>");
|
|
3695
|
+
function ki(e, t) {
|
|
3677
3696
|
ne(t, !0);
|
|
3678
3697
|
let n = qr(t, "step", 19, () => ({
|
|
3679
3698
|
target: "",
|
|
@@ -3705,7 +3724,7 @@ function Ni(e, t) {
|
|
|
3705
3724
|
{
|
|
3706
3725
|
const n = (e) => {
|
|
3707
3726
|
var n = jn(), r = yt(n), o = (e) => {
|
|
3708
|
-
Fr(
|
|
3727
|
+
Fr(li(e, Vr(() => t.tourImageProps, {
|
|
3709
3728
|
get src() {
|
|
3710
3729
|
return wn(_).src;
|
|
3711
3730
|
},
|
|
@@ -3719,7 +3738,7 @@ function Ni(e, t) {
|
|
|
3719
3738
|
}), Fn(e, n);
|
|
3720
3739
|
}, r = (e) => {
|
|
3721
3740
|
var n = jn(), r = yt(n), o = (e) => {
|
|
3722
|
-
Fr(
|
|
3741
|
+
Fr(ei(e, Vr({
|
|
3723
3742
|
get size() {
|
|
3724
3743
|
return s();
|
|
3725
3744
|
},
|
|
@@ -3733,7 +3752,7 @@ function Ni(e, t) {
|
|
|
3733
3752
|
}), Fn(e, n);
|
|
3734
3753
|
}, y = (e) => {
|
|
3735
3754
|
var n = jn(), r = yt(n), o = (e) => {
|
|
3736
|
-
Fr(
|
|
3755
|
+
Fr(yi(e, Vr(() => t.tourSkipProps, {
|
|
3737
3756
|
get checked() {
|
|
3738
3757
|
return l();
|
|
3739
3758
|
},
|
|
@@ -3749,9 +3768,9 @@ function Ni(e, t) {
|
|
|
3749
3768
|
var n = jn(), r = yt(n), s = (e) => {
|
|
3750
3769
|
{
|
|
3751
3770
|
let n = Oe(() => t.tourProgressProps?.customClasses), r = Oe(() => t.tourProgressProps?.customStyles);
|
|
3752
|
-
|
|
3771
|
+
vi(e, {
|
|
3753
3772
|
get variant() {
|
|
3754
|
-
return
|
|
3773
|
+
return pi.LINE;
|
|
3755
3774
|
},
|
|
3756
3775
|
get currentStep() {
|
|
3757
3776
|
return o();
|
|
@@ -3769,7 +3788,7 @@ function Ni(e, t) {
|
|
|
3769
3788
|
}
|
|
3770
3789
|
};
|
|
3771
3790
|
sr(r, (e) => {
|
|
3772
|
-
!1 !== t.tourProgressProps && wn(b) ===
|
|
3791
|
+
!1 !== t.tourProgressProps && wn(b) === pi.LINE && e(s);
|
|
3773
3792
|
}), Fn(e, n);
|
|
3774
3793
|
}, w = (e) => {
|
|
3775
3794
|
var n = jn(), r = yt(n), a = (e) => {
|
|
@@ -3778,7 +3797,7 @@ function Ni(e, t) {
|
|
|
3778
3797
|
var n = jn(), r = yt(n), s = (e) => {
|
|
3779
3798
|
{
|
|
3780
3799
|
let n = Oe(() => t.tourProgressProps?.customClasses), r = Oe(() => t.tourProgressProps?.customStyles);
|
|
3781
|
-
|
|
3800
|
+
vi(e, {
|
|
3782
3801
|
get variant() {
|
|
3783
3802
|
return wn(b);
|
|
3784
3803
|
},
|
|
@@ -3798,7 +3817,7 @@ function Ni(e, t) {
|
|
|
3798
3817
|
}
|
|
3799
3818
|
};
|
|
3800
3819
|
sr(r, (e) => {
|
|
3801
|
-
!1 === t.tourProgressProps || wn(b) !==
|
|
3820
|
+
!1 === t.tourProgressProps || wn(b) !== pi.DOTS && wn(b) !== pi.TEXT || e(s);
|
|
3802
3821
|
}), Fn(e, n);
|
|
3803
3822
|
};
|
|
3804
3823
|
Fr(function(e, t) {
|
|
@@ -3821,17 +3840,17 @@ function Ni(e, t) {
|
|
|
3821
3840
|
styles: h(o.customStyles?.root, t.customStyles?.[r])
|
|
3822
3841
|
};
|
|
3823
3842
|
}
|
|
3824
|
-
const g = Oe(() => v(i(),
|
|
3843
|
+
const g = Oe(() => v(i(), ti, "prev")), m = Oe(() => v(s(), ni, "next")), _ = Oe(() => v(l(), oi, "skip")), b = Oe(() => v(a(), ri, "finish"));
|
|
3825
3844
|
var y = { getElements: function() {
|
|
3826
3845
|
return { root: wn(u) };
|
|
3827
|
-
} }, T =
|
|
3846
|
+
} }, T = ii(), w = bt(T), E = (e) => {
|
|
3828
3847
|
var n = jn(), r = yt(n), i = (e) => {
|
|
3829
3848
|
var n = jn();
|
|
3830
3849
|
pr(yt(n), () => t.customHtml.prev), Fn(e, n);
|
|
3831
3850
|
}, s = (e) => {
|
|
3832
3851
|
{
|
|
3833
3852
|
let n = Oe(() => wn(g).size ?? o()), r = Oe(() => ({ root: wn(g).classes })), i = Oe(() => ({ root: wn(g).styles }));
|
|
3834
|
-
|
|
3853
|
+
Zo(e, {
|
|
3835
3854
|
get type() {
|
|
3836
3855
|
return wn(g).type;
|
|
3837
3856
|
},
|
|
@@ -3892,7 +3911,7 @@ function Ni(e, t) {
|
|
|
3892
3911
|
}, s = (e) => {
|
|
3893
3912
|
{
|
|
3894
3913
|
let n = Oe(() => wn(_).size ?? o()), r = Oe(() => ({ root: wn(_).classes })), i = Oe(() => ({ root: wn(_).styles }));
|
|
3895
|
-
|
|
3914
|
+
Zo(e, {
|
|
3896
3915
|
get type() {
|
|
3897
3916
|
return wn(_).type;
|
|
3898
3917
|
},
|
|
@@ -3944,7 +3963,7 @@ function Ni(e, t) {
|
|
|
3944
3963
|
}, s = (e) => {
|
|
3945
3964
|
{
|
|
3946
3965
|
let n = Oe(() => wn(b).size ?? o()), r = Oe(() => ({ root: wn(b).classes })), i = Oe(() => ({ root: wn(b).styles }));
|
|
3947
|
-
|
|
3966
|
+
Zo(e, {
|
|
3948
3967
|
get type() {
|
|
3949
3968
|
return wn(b).type;
|
|
3950
3969
|
},
|
|
@@ -3995,7 +4014,7 @@ function Ni(e, t) {
|
|
|
3995
4014
|
}, s = (e) => {
|
|
3996
4015
|
{
|
|
3997
4016
|
let n = Oe(() => wn(m).size ?? o()), r = Oe(() => ({ root: wn(m).classes })), i = Oe(() => ({ root: wn(m).styles }));
|
|
3998
|
-
|
|
4017
|
+
Zo(e, {
|
|
3999
4018
|
get type() {
|
|
4000
4019
|
return wn(m).type;
|
|
4001
4020
|
},
|
|
@@ -4074,10 +4093,10 @@ function Ni(e, t) {
|
|
|
4074
4093
|
Fr(function(e, t) {
|
|
4075
4094
|
ne(t, !0);
|
|
4076
4095
|
let n = qr(t, "title", 3, ""), r = qr(t, "description", 3, ""), o = qr(t, "size", 19, () => oo.MD), i = qr(t, "placement", 19, () => io.BOTTOM_START), s = qr(t, "targetElement", 3, null), a = qr(t, "offset", 3, 12), l = qr(t, "margin", 3, 8), u = qr(t, "padding", 3, 12), c = qr(t, "autoPlacement", 3, !0), f = qr(t, "isHidden", 3, !1), d = qr(t, "hasGlide", 3, !1), p = qr(t, "animation", 3, !1), h = tt(null), v = tt(!1);
|
|
4077
|
-
const g =
|
|
4096
|
+
const g = wi({
|
|
4078
4097
|
getArrow: () => t.arrow,
|
|
4079
4098
|
getPlacement: () => m.effectivePlacement
|
|
4080
|
-
}), m =
|
|
4099
|
+
}), m = Si({
|
|
4081
4100
|
getTargetElement: () => s(),
|
|
4082
4101
|
getTooltipElement: () => wn(h),
|
|
4083
4102
|
getPlacement: () => i(),
|
|
@@ -4121,10 +4140,10 @@ function Ni(e, t) {
|
|
|
4121
4140
|
]), w = Oe(() => no(t.customStyles?.root)), E = Oe(() => ["rb-tour-tooltip__header", t.customClasses?.header]), S = Oe(() => no(t.customStyles?.header)), O = Oe(() => ["rb-tour-tooltip__title", t.customClasses?.title]), x = Oe(() => no(t.customStyles?.title)), C = Oe(() => ["rb-tour-tooltip__description", t.customClasses?.description]), N = Oe(() => no(t.customStyles?.description));
|
|
4122
4141
|
var k = { getElements: function() {
|
|
4123
4142
|
return { root: wn(h) };
|
|
4124
|
-
} }, A =
|
|
4143
|
+
} }, A = Ni();
|
|
4125
4144
|
let P;
|
|
4126
4145
|
var D = bt(A), L = (e) => {
|
|
4127
|
-
var t =
|
|
4146
|
+
var t = Oi();
|
|
4128
4147
|
let n;
|
|
4129
4148
|
It(() => {
|
|
4130
4149
|
yr(t, 1, gr(g.classes)), n = wr(t, "", n, { "--rb-tour-tooltip-arrow-offset": `${m.arrowOffset ?? ""}px` });
|
|
@@ -4141,11 +4160,11 @@ function Ni(e, t) {
|
|
|
4141
4160
|
t.image && e(M);
|
|
4142
4161
|
});
|
|
4143
4162
|
var I = Tt(R, 2), B = (e) => {
|
|
4144
|
-
var r =
|
|
4163
|
+
var r = Ci(), o = bt(r), i = (e) => {
|
|
4145
4164
|
var n = jn();
|
|
4146
4165
|
pr(yt(n), () => t.customHtml.title), Fn(e, n);
|
|
4147
4166
|
}, s = (e) => {
|
|
4148
|
-
var t =
|
|
4167
|
+
var t = xi(), r = bt(t, !0);
|
|
4149
4168
|
G(t), It(() => {
|
|
4150
4169
|
yr(t, 1, gr(wn(O))), wr(t, wn(x)), Wn(r, n());
|
|
4151
4170
|
}), Fn(e, t);
|
|
@@ -4170,7 +4189,7 @@ function Ni(e, t) {
|
|
|
4170
4189
|
var n = jn();
|
|
4171
4190
|
pr(yt(n), () => t.customHtml.description), Fn(e, n);
|
|
4172
4191
|
}, j = (e) => {
|
|
4173
|
-
var t =
|
|
4192
|
+
var t = xi(), n = bt(t, !0);
|
|
4174
4193
|
G(t), It(() => {
|
|
4175
4194
|
yr(t, 1, gr(wn(C))), wr(t, wn(N)), Wn(n, r());
|
|
4176
4195
|
}), Fn(e, t);
|
|
@@ -4234,8 +4253,8 @@ function Ni(e, t) {
|
|
|
4234
4253
|
}
|
|
4235
4254
|
return re(y);
|
|
4236
4255
|
}
|
|
4237
|
-
var
|
|
4238
|
-
function
|
|
4256
|
+
var Ai = In("<!> <!>", 1), Pi = In("<div><!></div>");
|
|
4257
|
+
function Di(e, t) {
|
|
4239
4258
|
ne(t, !0);
|
|
4240
4259
|
let n = tt(null), r = tt(null), o = tt(null);
|
|
4241
4260
|
Wr({
|
|
@@ -4259,13 +4278,20 @@ function Pi(e, t) {
|
|
|
4259
4278
|
getDuration: () => t.animation.overlay.transitionDuration
|
|
4260
4279
|
});
|
|
4261
4280
|
eo({ getContainer: () => wn(n)?.getElements()?.root ?? null });
|
|
4262
|
-
const a = Oe(() =>
|
|
4281
|
+
const a = Oe(() => ["rb"]), l = Oe(() => ({
|
|
4263
4282
|
...t.config.container,
|
|
4264
4283
|
customClasses: {
|
|
4265
4284
|
...t.config.container?.customClasses,
|
|
4266
4285
|
root: [t.config.container?.customClasses?.root, i.classes]
|
|
4267
4286
|
}
|
|
4268
|
-
})),
|
|
4287
|
+
})), u = Oe(() => !!t.animation.isEnabled && t.animation.tooltip), c = Oe(() => t.animation.isEnabled), f = Oe(() => t.animation.tooltip.transition === So.GLIDE), d = Oe(() => t.animation.tooltip.appearance === Eo.DURING_SCROLL), p = Oe(() => t.scroll.isScrolling || s.isActive), h = Oe(() => !wn(f) && wn(c) && wn(p) && !wn(d));
|
|
4288
|
+
let v = tt(lt({
|
|
4289
|
+
step: On(() => t.controller.step),
|
|
4290
|
+
target: On(() => t.controller.currentTarget),
|
|
4291
|
+
currentStep: On(() => t.controller.currentStep),
|
|
4292
|
+
config: On(() => t.config)
|
|
4293
|
+
}));
|
|
4294
|
+
const g = Oe(() => wn(v).config.size), m = Oe(() => wn(v).config.shape), _ = Oe(() => wn(v).config.tourOverlay), b = Oe(() => wn(v).config.tourTooltip), y = Oe(() => wn(v).config.tourImage), T = Oe(() => wn(v).config.tourButtons), w = Oe(() => wn(v).config.tourProgress), E = Oe(() => wn(v).config.tourSkip), S = Oe(() => wn(v).config.closeButton), O = Oe(() => {
|
|
4269
4295
|
const e = wn(o)?.getComponents();
|
|
4270
4296
|
return {
|
|
4271
4297
|
tourTooltip: e?.tourTooltip ?? null,
|
|
@@ -4292,12 +4318,28 @@ function Pi(e, t) {
|
|
|
4292
4318
|
var C;
|
|
4293
4319
|
Dt(() => {
|
|
4294
4320
|
t.config.visibility?.isHidden || t.scroll.scrollTo(t.controller.currentTarget);
|
|
4321
|
+
}), Dt(() => {
|
|
4322
|
+
if (!wn(h)) return void rt(v, {
|
|
4323
|
+
step: t.controller.step,
|
|
4324
|
+
target: t.controller.currentTarget,
|
|
4325
|
+
currentStep: t.controller.currentStep,
|
|
4326
|
+
config: t.config
|
|
4327
|
+
}, !0);
|
|
4328
|
+
const e = setTimeout(() => {
|
|
4329
|
+
rt(v, {
|
|
4330
|
+
step: t.controller.step,
|
|
4331
|
+
target: t.controller.currentTarget,
|
|
4332
|
+
currentStep: t.controller.currentStep,
|
|
4333
|
+
config: t.config
|
|
4334
|
+
}, !0);
|
|
4335
|
+
}, t.animation.tooltip.exitDuration);
|
|
4336
|
+
return () => clearTimeout(e);
|
|
4295
4337
|
}), ir(() => {
|
|
4296
4338
|
t.mount();
|
|
4297
4339
|
}), C = () => {
|
|
4298
4340
|
t.eventEmitter.emit(Yr.ON_BORDA_DESTROY), t.eventEmitter.clear();
|
|
4299
4341
|
}, null === ee && H(), ir(() => () => On(C));
|
|
4300
|
-
var N = { api: x }, k =
|
|
4342
|
+
var N = { api: x }, k = Pi();
|
|
4301
4343
|
return Fr(function(e, t) {
|
|
4302
4344
|
ne(t, !0);
|
|
4303
4345
|
let n = tt(null);
|
|
@@ -4313,10 +4355,10 @@ function Pi(e, t) {
|
|
|
4313
4355
|
}), G(s), Fr(s, (e) => rt(n, e), () => wn(n)), It(() => {
|
|
4314
4356
|
Mr(s, "id", t.id), yr(s, 1, gr(wn(r))), wr(s, wn(o));
|
|
4315
4357
|
}), Fn(e, s), re(i);
|
|
4316
|
-
}(bt(k), Vr(() => wn(
|
|
4358
|
+
}(bt(k), Vr(() => wn(l), {
|
|
4317
4359
|
children: (e, n) => {
|
|
4318
|
-
var i = jn(), s = yt(i),
|
|
4319
|
-
var n =
|
|
4360
|
+
var i = jn(), s = yt(i), a = (e) => {
|
|
4361
|
+
var n = Ai(), i = yt(n), s = (e) => {
|
|
4320
4362
|
Fr(function(e, t) {
|
|
4321
4363
|
ne(t, !0);
|
|
4322
4364
|
let n = qr(t, "targetElement", 3, null), r = qr(t, "borderRadius", 3, 8), o = qr(t, "padding", 3, 12), i = qr(t, "isAnimated", 3, !0), s = qr(t, "hasCloseOnBackdropClick", 3, !1), a = qr(t, "aria", 19, () => ({ ariaLabel: "Close" }));
|
|
@@ -4357,26 +4399,26 @@ function Pi(e, t) {
|
|
|
4357
4399
|
}), Fn(e, y), re(b);
|
|
4358
4400
|
}(e, Vr({
|
|
4359
4401
|
get targetElement() {
|
|
4360
|
-
return
|
|
4402
|
+
return wn(v).target;
|
|
4361
4403
|
},
|
|
4362
4404
|
get isAnimated() {
|
|
4363
|
-
return wn(
|
|
4405
|
+
return wn(c);
|
|
4364
4406
|
}
|
|
4365
|
-
}, () => wn(
|
|
4407
|
+
}, () => wn(_))), (e) => rt(r, e, !0), () => wn(r));
|
|
4366
4408
|
};
|
|
4367
4409
|
sr(i, (e) => {
|
|
4368
|
-
!1 !== wn(
|
|
4410
|
+
!1 !== wn(_) && e(s);
|
|
4369
4411
|
});
|
|
4370
|
-
var
|
|
4371
|
-
Fr(
|
|
4412
|
+
var a = Tt(i, 2), l = (e) => {
|
|
4413
|
+
Fr(ki(e, {
|
|
4372
4414
|
get step() {
|
|
4373
|
-
return wn(
|
|
4415
|
+
return wn(v).step;
|
|
4374
4416
|
},
|
|
4375
4417
|
get currentTarget() {
|
|
4376
|
-
return
|
|
4418
|
+
return wn(v).target;
|
|
4377
4419
|
},
|
|
4378
4420
|
get currentStep() {
|
|
4379
|
-
return
|
|
4421
|
+
return wn(v).currentStep;
|
|
4380
4422
|
},
|
|
4381
4423
|
get totalSteps() {
|
|
4382
4424
|
return t.controller.totalSteps;
|
|
@@ -4385,37 +4427,37 @@ function Pi(e, t) {
|
|
|
4385
4427
|
return t.skip.isSkipped;
|
|
4386
4428
|
},
|
|
4387
4429
|
get isHidden() {
|
|
4388
|
-
return wn(
|
|
4430
|
+
return wn(h);
|
|
4389
4431
|
},
|
|
4390
4432
|
get hasGlide() {
|
|
4391
|
-
return wn(
|
|
4433
|
+
return wn(f);
|
|
4392
4434
|
},
|
|
4393
4435
|
get tourTooltipAnimation() {
|
|
4394
|
-
return wn(
|
|
4436
|
+
return wn(u);
|
|
4395
4437
|
},
|
|
4396
4438
|
get size() {
|
|
4397
|
-
return wn(
|
|
4439
|
+
return wn(g);
|
|
4398
4440
|
},
|
|
4399
4441
|
get shape() {
|
|
4400
|
-
return wn(
|
|
4442
|
+
return wn(m);
|
|
4401
4443
|
},
|
|
4402
4444
|
get tourTooltipProps() {
|
|
4403
|
-
return wn(
|
|
4445
|
+
return wn(b);
|
|
4404
4446
|
},
|
|
4405
4447
|
get tourImageProps() {
|
|
4406
|
-
return wn(
|
|
4448
|
+
return wn(y);
|
|
4407
4449
|
},
|
|
4408
4450
|
get tourButtonsProps() {
|
|
4409
|
-
return wn(
|
|
4451
|
+
return wn(T);
|
|
4410
4452
|
},
|
|
4411
4453
|
get tourProgressProps() {
|
|
4412
|
-
return wn(
|
|
4454
|
+
return wn(w);
|
|
4413
4455
|
},
|
|
4414
4456
|
get closeButtonProps() {
|
|
4415
|
-
return wn(
|
|
4457
|
+
return wn(S);
|
|
4416
4458
|
},
|
|
4417
4459
|
get tourSkipProps() {
|
|
4418
|
-
return wn(
|
|
4460
|
+
return wn(E);
|
|
4419
4461
|
},
|
|
4420
4462
|
get onNext() {
|
|
4421
4463
|
return t.controller.next;
|
|
@@ -4434,18 +4476,18 @@ function Pi(e, t) {
|
|
|
4434
4476
|
}
|
|
4435
4477
|
}), (e) => rt(o, e, !0), () => wn(o));
|
|
4436
4478
|
};
|
|
4437
|
-
sr(
|
|
4438
|
-
!1 !== wn(
|
|
4479
|
+
sr(a, (e) => {
|
|
4480
|
+
!1 !== wn(b) && e(l);
|
|
4439
4481
|
}), Fn(e, n);
|
|
4440
4482
|
};
|
|
4441
4483
|
sr(s, (e) => {
|
|
4442
|
-
t.controller.currentTarget &&
|
|
4484
|
+
t.controller.currentTarget && t.controller.step && e(a);
|
|
4443
4485
|
}), Fn(e, i);
|
|
4444
4486
|
},
|
|
4445
4487
|
$$slots: { default: !0 }
|
|
4446
|
-
})), (e) => rt(n, e, !0), () => wn(n)), G(k), It(() => yr(k, 1, gr(wn(
|
|
4488
|
+
})), (e) => rt(n, e, !0), () => wn(n)), G(k), It(() => yr(k, 1, gr(wn(a)))), Fn(e, k), re(N);
|
|
4447
4489
|
}
|
|
4448
|
-
function
|
|
4490
|
+
function Li() {
|
|
4449
4491
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakSet();
|
|
4450
4492
|
function n(t, n) {
|
|
4451
4493
|
(function(e) {
|
|
@@ -4454,21 +4496,21 @@ function Di() {
|
|
|
4454
4496
|
const o = n ?? document.body;
|
|
4455
4497
|
return new Promise((n) => {
|
|
4456
4498
|
let i = null;
|
|
4457
|
-
const s = Zr(), a =
|
|
4499
|
+
const s = Zr(), a = Ri(t), l = Mo(a), u = Ao(a, s);
|
|
4458
4500
|
u.apply(), l.applyStep(u.api.step ?? null);
|
|
4459
|
-
const c =
|
|
4501
|
+
const c = Uo(a, s);
|
|
4460
4502
|
c.apply(), c.api.isSkipped && a.mergeConfig({ visibility: { isHidden: !0 } });
|
|
4461
|
-
const f =
|
|
4503
|
+
const f = Lo(a, s);
|
|
4462
4504
|
f.apply();
|
|
4463
|
-
const d =
|
|
4505
|
+
const d = zo(a);
|
|
4464
4506
|
d.apply();
|
|
4465
4507
|
const p = Co(a);
|
|
4466
4508
|
p.apply();
|
|
4467
|
-
const h =
|
|
4509
|
+
const h = Io(a, l);
|
|
4468
4510
|
h.apply();
|
|
4469
|
-
const v =
|
|
4511
|
+
const v = Vo(a, s);
|
|
4470
4512
|
v.apply();
|
|
4471
|
-
const g = Yn(
|
|
4513
|
+
const g = Yn(Di, {
|
|
4472
4514
|
target: o,
|
|
4473
4515
|
props: {
|
|
4474
4516
|
get config() {
|
|
@@ -4509,7 +4551,9 @@ function Di() {
|
|
|
4509
4551
|
a.getConfig().tour?.onFinish?.(), await r(t);
|
|
4510
4552
|
}), s.once(Yr.ON_TOUR_CLOSE, async () => {
|
|
4511
4553
|
a.getConfig().tour?.onClose?.(), await r(t);
|
|
4512
|
-
}),
|
|
4554
|
+
}), s.once(Yr.ON_TOUR_ERROR, (e) => {
|
|
4555
|
+
a.getConfig().tour?.onError?.(e);
|
|
4556
|
+
}), u.checkCurrentTarget(), n(t);
|
|
4513
4557
|
},
|
|
4514
4558
|
unmount: () => {
|
|
4515
4559
|
i && r(i);
|
|
@@ -4534,13 +4578,13 @@ function Di() {
|
|
|
4534
4578
|
}
|
|
4535
4579
|
return {
|
|
4536
4580
|
NAME: "@retoo/borda",
|
|
4537
|
-
VERSION: "0.
|
|
4581
|
+
VERSION: "0.1.1",
|
|
4538
4582
|
mount: n,
|
|
4539
4583
|
unmount: r,
|
|
4540
|
-
highlight:
|
|
4584
|
+
highlight: Po(n).highlight
|
|
4541
4585
|
};
|
|
4542
4586
|
}
|
|
4543
|
-
function
|
|
4587
|
+
function Ri(e) {
|
|
4544
4588
|
let t = tt(lt(go(e)));
|
|
4545
4589
|
function n(e) {
|
|
4546
4590
|
rt(t, go(e), !0);
|
|
@@ -4558,8 +4602,8 @@ function Li(e) {
|
|
|
4558
4602
|
}
|
|
4559
4603
|
};
|
|
4560
4604
|
}
|
|
4561
|
-
var
|
|
4562
|
-
static tagName =
|
|
4605
|
+
var Mi = "borda-tour-widget", Ii = "undefined" != typeof HTMLElement ? HTMLElement : class {}, Bi = class extends Ii {
|
|
4606
|
+
static tagName = Mi;
|
|
4563
4607
|
_instance = null;
|
|
4564
4608
|
_borda = null;
|
|
4565
4609
|
_connected = !1;
|
|
@@ -4586,7 +4630,7 @@ var Ri = "borda-tour-widget", Mi = "undefined" != typeof HTMLElement ? HTMLEleme
|
|
|
4586
4630
|
}
|
|
4587
4631
|
async _mount(e) {
|
|
4588
4632
|
if (this._unmountPending && await this._unmountPending, this._instance) return this._instance.config.setConfig(e), this._instance;
|
|
4589
|
-
const t =
|
|
4633
|
+
const t = Li(), n = await t.mount(e);
|
|
4590
4634
|
return this._borda = t, this._instance = n, this.dispatchEvent(new CustomEvent("borda:mount", {
|
|
4591
4635
|
detail: n,
|
|
4592
4636
|
bubbles: !0,
|
|
@@ -4607,10 +4651,10 @@ var Ri = "borda-tour-widget", Mi = "undefined" != typeof HTMLElement ? HTMLEleme
|
|
|
4607
4651
|
}));
|
|
4608
4652
|
}
|
|
4609
4653
|
};
|
|
4610
|
-
function Bi() {
|
|
4611
|
-
return customElements.get(Ii.tagName);
|
|
4612
|
-
}
|
|
4613
4654
|
function $i() {
|
|
4614
|
-
|
|
4655
|
+
return customElements.get(Bi.tagName);
|
|
4656
|
+
}
|
|
4657
|
+
function Hi() {
|
|
4658
|
+
$i() || customElements.define(Bi.tagName, Bi);
|
|
4615
4659
|
}
|
|
4616
|
-
po && (window.bordaWidget =
|
|
4660
|
+
po && (window.bordaWidget = Li, window.defineBordaElement = Hi), exports.AnimationEffect = uo, exports.BordaButtonShape = Ko, exports.BordaButtonType = Xo, exports.BordaButtonVariant = Go, exports.BordaEvent = Yr, exports.BordaScrollAppearance = Eo, exports.BordaTooltipArrowSide = Ti, exports.BordaTooltipTransition = So, exports.BordaTourImageVariant = ai, exports.BordaTourProgressVariant = pi, exports.ComponentAriaHaspopup = lo, exports.ComponentAriaPressed = ao, exports.ComponentPlacement = io, exports.ComponentShape = so, exports.ComponentSize = oo, exports.OverrideLayer = co, exports.SAFE_HTML_ELEMENT = Ii, exports.TAG_NAME = Mi, exports.bordaTourFinishButtonDefault = ri, exports.bordaTourNextButtonDefault = ni, exports.bordaTourPrevButtonDefault = ti, exports.bordaTourSkipButtonDefault = oi, exports.defineBordaElement = Hi, exports.getBordaContext = Xr, exports.getBordaElement = $i, exports.setBordaContext = Wr, exports.useBorda = Li, exports.useBordaAnimation = Co, exports.useBordaConfig = Ri, exports.useBordaController = Ao, exports.useBordaHighlight = Po, exports.useBordaKeyboard = Lo, exports.useBordaOverrides = Mo, exports.useBordaResponsive = Io, exports.useBordaScroll = zo, exports.useBordaSkip = Uo, exports.useBordaVisibility = Vo, exports.useEventEmitter = Zr, exports.useOverlay = To, exports.useTooltipArrow = wi, exports.useTooltipPosition = Si;
|