@adyen/bento-vue3 1.25.0 → 1.26.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.
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.types.d.ts +10 -2
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +8 -6
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +26 -11
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/use-column-hovering.d.ts +18 -6
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-reorderer/use-column-reorderer.d.ts +36 -12
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config-settings.d.ts +18 -6
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-resizer.d.ts +18 -6
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +14 -48
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +20 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +22 -2
- package/dist/@types/packages/vue2/src/components/typography/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/typography/typography.vue.d.ts +1 -1
- package/dist/accordion.js +3 -3
- package/dist/action-bar.js +7 -7
- package/dist/alert.js +6 -6
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +4 -4
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.6be8b60e.js → base-button.e84acf30.js} +2 -2
- package/dist/chunks/{base-button.6be8b60e.js.map → base-button.e84acf30.js.map} +1 -1
- package/dist/chunks/{base-modal.310c4790.js → base-modal.29e062d0.js} +7 -7
- package/dist/chunks/{base-modal.310c4790.js.map → base-modal.29e062d0.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.a007b034.js → button-actions-with-menu.7fce47a2.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.a007b034.js.map → button-actions-with-menu.7fce47a2.js.map} +1 -1
- package/dist/chunks/{button-actions.adc0a2fe.js → button-actions.642b37de.js} +3 -3
- package/dist/chunks/{button-actions.adc0a2fe.js.map → button-actions.642b37de.js.map} +1 -1
- package/dist/chunks/{button.de5589fa.js → button.60dad578.js} +3 -3
- package/dist/chunks/{button.de5589fa.js.map → button.60dad578.js.map} +1 -1
- package/dist/chunks/{calendar.73f5b904.js → calendar.f38cdab9.js} +5 -5
- package/dist/chunks/{calendar.73f5b904.js.map → calendar.f38cdab9.js.map} +1 -1
- package/dist/chunks/{checkbox-input.99336948.js → checkbox-input.ab758a81.js} +2 -2
- package/dist/chunks/{checkbox-input.99336948.js.map → checkbox-input.ab758a81.js.map} +1 -1
- package/dist/chunks/{checkbox.4c96cc23.js → checkbox.f55ee3a5.js} +4 -4
- package/dist/chunks/{checkbox.4c96cc23.js.map → checkbox.f55ee3a5.js.map} +1 -1
- package/dist/chunks/{checkmark-circle-fill.c45a999d.js → checkmark-circle-fill.f3a69c6a.js} +2 -2
- package/dist/chunks/{checkmark-circle-fill.c45a999d.js.map → checkmark-circle-fill.f3a69c6a.js.map} +1 -1
- package/dist/chunks/{checkmark-small.c79220d9.js → checkmark-small.d7e31e5e.js} +2 -2
- package/dist/chunks/{checkmark-small.c79220d9.js.map → checkmark-small.d7e31e5e.js.map} +1 -1
- package/dist/chunks/{checkmark.eb3c7a06.js → checkmark.87919b24.js} +2 -2
- package/dist/chunks/{checkmark.eb3c7a06.js.map → checkmark.87919b24.js.map} +1 -1
- package/dist/chunks/{chevron-left.4ee92950.js → chevron-left.963d35e9.js} +2 -2
- package/dist/chunks/{chevron-left.4ee92950.js.map → chevron-left.963d35e9.js.map} +1 -1
- package/dist/chunks/{chevron-up.638a9f34.js → chevron-up.05ca20db.js} +2 -2
- package/dist/chunks/{chevron-up.638a9f34.js.map → chevron-up.05ca20db.js.map} +1 -1
- package/dist/chunks/{controls-group.37a67734.js → controls-group.9e0f17b2.js} +3 -3
- package/dist/chunks/{controls-group.37a67734.js.map → controls-group.9e0f17b2.js.map} +1 -1
- package/dist/chunks/{copy.43de2653.js → copy.852d4cb8.js} +4 -4
- package/dist/chunks/{copy.43de2653.js.map → copy.852d4cb8.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.1abec1a2.js → cross-circle-fill.81925c7f.js} +2 -2
- package/dist/chunks/{cross-circle-fill.1abec1a2.js.map → cross-circle-fill.81925c7f.js.map} +1 -1
- package/dist/chunks/{cross-small.b85406fe.js → cross-small.9bc6a02f.js} +2 -2
- package/dist/chunks/{cross-small.b85406fe.js.map → cross-small.9bc6a02f.js.map} +1 -1
- package/dist/chunks/{cross.26509efc.js → cross.a60533f6.js} +2 -2
- package/dist/chunks/{cross.26509efc.js.map → cross.a60533f6.js.map} +1 -1
- package/dist/chunks/{dialog-page.cd8c7fff.js → dialog-page.ea67bb14.js} +3 -3
- package/dist/chunks/{dialog-page.cd8c7fff.js.map → dialog-page.ea67bb14.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.424e0eb6.js → dropdown-default-textbox.ad5063c2.js} +4 -4
- package/dist/chunks/{dropdown-default-textbox.424e0eb6.js.map → dropdown-default-textbox.ad5063c2.js.map} +1 -1
- package/dist/chunks/{dropdown.57b2ea6f.js → dropdown.d8587f36.js} +15 -15
- package/dist/chunks/{dropdown.57b2ea6f.js.map → dropdown.d8587f36.js.map} +1 -1
- package/dist/chunks/{error-message.4bd22112.js → error-message.3fb5573a.js} +3 -3
- package/dist/chunks/{error-message.4bd22112.js.map → error-message.3fb5573a.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.5b93a6a6.js → fixed-scroller.59aefd1b.js} +3 -3
- package/dist/chunks/{fixed-scroller.5b93a6a6.js.map → fixed-scroller.59aefd1b.js.map} +1 -1
- package/dist/chunks/{footer-actions.c401ec50.js → footer-actions.89e68269.js} +4 -4
- package/dist/chunks/{footer-actions.c401ec50.js.map → footer-actions.89e68269.js.map} +1 -1
- package/dist/chunks/{index.8b10ee32.js → index.030c1dd7.js} +7 -7
- package/dist/chunks/{index.8b10ee32.js.map → index.030c1dd7.js.map} +1 -1
- package/dist/chunks/{index.98bbaed9.js → index.07122048.js} +2 -2
- package/dist/chunks/{index.98bbaed9.js.map → index.07122048.js.map} +1 -1
- package/dist/chunks/{index.8682bd04.js → index.146f967e.js} +2 -2
- package/dist/chunks/{index.8682bd04.js.map → index.146f967e.js.map} +1 -1
- package/dist/chunks/{index.bab8811d.js → index.5bdebf9d.js} +7 -7
- package/dist/chunks/{index.bab8811d.js.map → index.5bdebf9d.js.map} +1 -1
- package/dist/chunks/{index.aa83aa48.js → index.6e0e9d21.js} +3 -3
- package/dist/chunks/{index.aa83aa48.js.map → index.6e0e9d21.js.map} +1 -1
- package/dist/chunks/{index.ea65003b.js → index.8be283d5.js} +2 -2
- package/dist/chunks/{index.ea65003b.js.map → index.8be283d5.js.map} +1 -1
- package/dist/chunks/{index.faec0854.js → index.96cd0d4c.js} +15 -15
- package/dist/chunks/{index.faec0854.js.map → index.96cd0d4c.js.map} +1 -1
- package/dist/chunks/{index.f71015d8.js → index.9bf04b01.js} +3 -3
- package/dist/chunks/{index.f71015d8.js.map → index.9bf04b01.js.map} +1 -1
- package/dist/chunks/{index.11b6dd35.js → index.a3d60e4f.js} +17 -17
- package/dist/chunks/index.a3d60e4f.js.map +1 -0
- package/dist/chunks/{index.73ac0db6.js → index.ba3396d3.js} +3 -3
- package/dist/chunks/{index.73ac0db6.js.map → index.ba3396d3.js.map} +1 -1
- package/dist/chunks/{index.38752f78.js → index.c8ffede1.js} +7 -7
- package/dist/chunks/{index.38752f78.js.map → index.c8ffede1.js.map} +1 -1
- package/dist/chunks/{info.550f9511.js → info.205b4496.js} +2 -2
- package/dist/chunks/{info.550f9511.js.map → info.205b4496.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.d1a3b340.js → listbox-option-tag.b6182b2e.js} +3 -3
- package/dist/chunks/{listbox-option-tag.d1a3b340.js.map → listbox-option-tag.b6182b2e.js.map} +1 -1
- package/dist/chunks/{loading-button.2db95771.js → loading-button.0391ad8b.js} +4 -4
- package/dist/chunks/{loading-button.2db95771.js.map → loading-button.0391ad8b.js.map} +1 -1
- package/dist/chunks/{payment-method.26fa5509.js → payment-method.31a68b9b.js} +2 -2
- package/dist/chunks/{payment-method.26fa5509.js.map → payment-method.31a68b9b.js.map} +1 -1
- package/dist/chunks/{refresh.bd60f6a8.js → refresh.53691839.js} +2 -2
- package/dist/chunks/{refresh.bd60f6a8.js.map → refresh.53691839.js.map} +1 -1
- package/dist/chunks/{search.ade93bda.js → search.4e4ee4dd.js} +2 -2
- package/dist/chunks/{search.ade93bda.js.map → search.4e4ee4dd.js.map} +1 -1
- package/dist/chunks/{tooltip.e29f7d7e.js → tooltip.1084d92b.js} +3 -3
- package/dist/chunks/{tooltip.e29f7d7e.js.map → tooltip.1084d92b.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.98ca249a.js → use-bento-toast-controller.98d8613c.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.98ca249a.js.map → use-bento-toast-controller.98d8613c.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.a9b0fb3d.js → use-cached-selected-values.852aeafe.js} +8 -8
- package/dist/chunks/{use-cached-selected-values.a9b0fb3d.js.map → use-cached-selected-values.852aeafe.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1287 -1253
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +19 -19
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +7 -7
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +22 -22
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +53 -51
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +4 -4
- package/dist/index.js +22 -22
- package/dist/info-icon.js +4 -4
- package/dist/input-field.js +3 -3
- package/dist/internal.js +8 -8
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +7 -7
- package/dist/modal.js +6 -6
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +4 -4
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +4 -4
- package/dist/selection-card.js +5 -5
- package/dist/sidepanel.js +7 -7
- package/dist/status.js +2 -2
- package/dist/stepper.js +4 -4
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +2 -2
- package/dist/tabs.js +22 -20
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +6 -6
- package/dist/toast.js +5 -5
- package/dist/toggle.js +3 -3
- package/dist/tutorial.js +145 -124
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/composables/useDynamicImport.d.ts +0 -8
- package/dist/chunks/index.11b6dd35.js.map +0 -1
- /package/dist/@types/packages/{vue2 → core}/src/components/typography/typography.types.d.ts +0 -0
- /package/dist/assets/{cross.css → checkmark-circle-fill.css} +0 -0
package/dist/tutorial.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B } from "./chunks/index.
|
|
5
|
-
import { BentoImage as
|
|
6
|
-
import { u as
|
|
7
|
-
import { R as
|
|
1
|
+
import { defineComponent as R, ref as C, openBlock as u, createBlock as S, unref as o, withCtx as v, createElementVNode as c, normalizeStyle as M, createElementBlock as O, mergeProps as x, toDisplayString as T, createCommentVNode as y, computed as l, isRef as q, watch as Z, nextTick as z, createVNode as h, withKeys as H, createSlots as U, createTextVNode as I, renderSlot as W, pushScopeId as X, popScopeId as G, Fragment as J, renderList as Q } from "vue";
|
|
2
|
+
import { B as Y } from "./chunks/index.030c1dd7.js";
|
|
3
|
+
import { B as w, a as tt } from "./chunks/index.5bdebf9d.js";
|
|
4
|
+
import { B as $ } from "./chunks/index.a3d60e4f.js";
|
|
5
|
+
import { BentoImage as et } from "./image.js";
|
|
6
|
+
import { u as ot } from "./chunks/i18n.f7e6533e.js";
|
|
7
|
+
import { R as st } from "./chunks/refresh.53691839.js";
|
|
8
8
|
import { _ as k } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
9
|
-
import { a as
|
|
10
|
-
import { B as
|
|
11
|
-
import "./assets/
|
|
12
|
-
var
|
|
13
|
-
const
|
|
9
|
+
import { a as P, h as nt, o as at } from "./chunks/index.9bf04b01.js";
|
|
10
|
+
import { B as it } from "./chunks/button-actions.642b37de.js";
|
|
11
|
+
import "./assets/index18.css";
|
|
12
|
+
var D;
|
|
13
|
+
const lt = /* @__PURE__ */ R({
|
|
14
14
|
__name: "tutorial-indicator",
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
@@ -18,95 +18,95 @@ const it = /* @__PURE__ */ x({
|
|
|
18
18
|
* The indicator will position itself around the target element.
|
|
19
19
|
*/
|
|
20
20
|
targetElement: {
|
|
21
|
-
type: (
|
|
21
|
+
type: (D = P.props) == null ? void 0 : D.targetElement.type,
|
|
22
22
|
required: !0
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
setup(t) {
|
|
26
|
-
const e =
|
|
26
|
+
const e = C({
|
|
27
27
|
width: "0",
|
|
28
28
|
height: "0",
|
|
29
29
|
borderRadius: "0"
|
|
30
30
|
});
|
|
31
|
-
function
|
|
31
|
+
function f(p) {
|
|
32
32
|
try {
|
|
33
|
-
const
|
|
34
|
-
return Number.isNaN(
|
|
33
|
+
const s = parseFloat(getComputedStyle(p).getPropertyValue("border-radius"));
|
|
34
|
+
return Number.isNaN(s) ? "" : `${s + 2 * 2}px`;
|
|
35
35
|
} catch {
|
|
36
36
|
return "";
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const r = [
|
|
40
|
+
nt(),
|
|
41
|
+
at({
|
|
42
42
|
mainAxis: 2,
|
|
43
43
|
alignmentAxis: -2
|
|
44
44
|
}),
|
|
45
45
|
{
|
|
46
46
|
name: "updateIndicatorSize",
|
|
47
|
-
fn: ({ x:
|
|
48
|
-
const
|
|
49
|
-
return e.value.width = `${
|
|
47
|
+
fn: ({ x: p, y: s, elements: a }) => {
|
|
48
|
+
const d = a.reference;
|
|
49
|
+
return e.value.width = `${d.offsetWidth + 4 * 2}px`, e.value.height = `${d.offsetHeight + 4 * 2}px`, e.value.borderRadius = f(d), { x: p, y: s };
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
|
-
return (
|
|
53
|
+
return (p, s) => (u(), S(o(P), {
|
|
54
54
|
"target-element": t.targetElement,
|
|
55
|
-
middleware:
|
|
55
|
+
middleware: r,
|
|
56
56
|
position: "top-start",
|
|
57
57
|
"fixed-positioning": "",
|
|
58
58
|
"disabled-focus-trap": "",
|
|
59
59
|
class: "b-tutorial-indicator",
|
|
60
60
|
"data-testid": "tutorial-indicator"
|
|
61
61
|
}, {
|
|
62
|
-
default:
|
|
62
|
+
default: v(() => [
|
|
63
63
|
c("div", {
|
|
64
64
|
class: "b-tutorial-indicator__highlight",
|
|
65
|
-
style:
|
|
65
|
+
style: M(e.value)
|
|
66
66
|
}, null, 4)
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
69
69
|
}, 8, ["target-element"]));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const rt = /* @__PURE__ */ k(
|
|
73
|
-
let
|
|
74
|
-
const
|
|
72
|
+
const rt = /* @__PURE__ */ k(lt, [["__scopeId", "data-v-672deffb"]]);
|
|
73
|
+
let A = 0;
|
|
74
|
+
const ut = {
|
|
75
75
|
beforeCreate() {
|
|
76
|
-
this.uuid =
|
|
76
|
+
this.uuid = A.toString(), A += 1;
|
|
77
77
|
}
|
|
78
|
-
},
|
|
78
|
+
}, ct = { key: 0 }, pt = ["clip-path"], dt = /* @__PURE__ */ c("path", {
|
|
79
79
|
fill: "#00112C",
|
|
80
80
|
d: "M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z"
|
|
81
|
-
}, null, -1),
|
|
81
|
+
}, null, -1), _t = [
|
|
82
82
|
dt
|
|
83
|
-
],
|
|
83
|
+
], ft = ["id"], vt = /* @__PURE__ */ c("rect", {
|
|
84
84
|
width: "16",
|
|
85
85
|
height: "16",
|
|
86
86
|
fill: "#fff"
|
|
87
|
-
}, null, -1),
|
|
88
|
-
|
|
87
|
+
}, null, -1), mt = [
|
|
88
|
+
vt
|
|
89
89
|
];
|
|
90
|
-
function
|
|
91
|
-
return u(),
|
|
90
|
+
function gt(t, n, e, f, r, p) {
|
|
91
|
+
return u(), O("svg", x({ role: "img" }, t.$attrs, {
|
|
92
92
|
class: "ui-assets-icons-16",
|
|
93
93
|
xmlns: "http://www.w3.org/2000/svg",
|
|
94
94
|
width: "16",
|
|
95
95
|
height: "16",
|
|
96
96
|
fill: "none"
|
|
97
97
|
}), [
|
|
98
|
-
t.$attrs["svg-title"] ? (u(),
|
|
98
|
+
t.$attrs["svg-title"] ? (u(), O("title", ct, T(t.$attrs["svg-title"]), 1)) : y("", !0),
|
|
99
99
|
c("g", {
|
|
100
100
|
"clip-path": "url(#uia-icons-16-blocked__a" + t.uuid + ")"
|
|
101
|
-
},
|
|
101
|
+
}, _t, 8, pt),
|
|
102
102
|
c("defs", null, [
|
|
103
103
|
c("clipPath", {
|
|
104
104
|
id: "uia-icons-16-blocked__a" + t.uuid
|
|
105
|
-
},
|
|
105
|
+
}, mt, 8, ft)
|
|
106
106
|
])
|
|
107
107
|
], 16);
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const ht = /* @__PURE__ */ k(ut, [["render", gt]]), V = {
|
|
110
110
|
"en-US": {
|
|
111
111
|
finish: "Finish",
|
|
112
112
|
next: "Next",
|
|
@@ -116,13 +116,13 @@ const gt = /* @__PURE__ */ k(lt, [["render", mt]]), D = {
|
|
|
116
116
|
startTour: "Start tour",
|
|
117
117
|
stepsOfTotal: "{step} of {totalSteps}"
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, yt = (t) => (X("data-v-9513f48c"), t = t(), G(), t), St = { key: 0 }, Ot = /* @__PURE__ */ yt(() => /* @__PURE__ */ c("div", {
|
|
120
120
|
"aria-hidden": "true",
|
|
121
121
|
class: "b-tutorial-popover__ripple"
|
|
122
|
-
}, null, -1)), bt = { class: "b-tutorial-popover__header" }, Ct = { class: "b-tutorial-popover__footer" }, Tt = { class: "b-tutorial-popover__actions" },
|
|
123
|
-
i18n: { messages:
|
|
124
|
-
}, Et = /* @__PURE__ */
|
|
125
|
-
...
|
|
122
|
+
}, null, -1)), bt = { class: "b-tutorial-popover__header" }, Ct = { class: "b-tutorial-popover__footer" }, Tt = { class: "b-tutorial-popover__actions" }, Bt = {
|
|
123
|
+
i18n: { messages: V }
|
|
124
|
+
}, Et = /* @__PURE__ */ R({
|
|
125
|
+
...Bt,
|
|
126
126
|
__name: "tutorial-popover",
|
|
127
127
|
props: {
|
|
128
128
|
/**
|
|
@@ -158,8 +158,17 @@ const gt = /* @__PURE__ */ k(lt, [["render", mt]]), D = {
|
|
|
158
158
|
*/
|
|
159
159
|
position: {
|
|
160
160
|
type: String,
|
|
161
|
-
default:
|
|
162
|
-
validator: (t) => Object.values(
|
|
161
|
+
default: w.BOTTOM_START,
|
|
162
|
+
validator: (t) => Object.values(w).includes(t)
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Options to control the scroll into view behavior.
|
|
166
|
+
* Takes the same options as the `scrollIntoView` function
|
|
167
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}
|
|
168
|
+
*/
|
|
169
|
+
scrollOptions: {
|
|
170
|
+
type: [Boolean, Object],
|
|
171
|
+
default: null
|
|
163
172
|
},
|
|
164
173
|
/**
|
|
165
174
|
* Indicates whether this popover is a single tutorial or a tour.
|
|
@@ -203,104 +212,106 @@ const gt = /* @__PURE__ */ k(lt, [["render", mt]]), D = {
|
|
|
203
212
|
}
|
|
204
213
|
},
|
|
205
214
|
emits: ["next", "finish", "restart"],
|
|
206
|
-
setup(t, { emit:
|
|
207
|
-
const e = t, { t:
|
|
208
|
-
title:
|
|
209
|
-
event: () =>
|
|
210
|
-
})),
|
|
211
|
-
title:
|
|
212
|
-
event: () =>
|
|
213
|
-
})), a =
|
|
214
|
-
title:
|
|
215
|
-
event: () =>
|
|
216
|
-
})),
|
|
217
|
-
title:
|
|
218
|
-
event: () =>
|
|
219
|
-
})),
|
|
220
|
-
title:
|
|
221
|
-
event: () =>
|
|
222
|
-
})),
|
|
215
|
+
setup(t, { emit: n }) {
|
|
216
|
+
const e = t, f = { behavior: "smooth" }, { t: r } = ot({ messages: V }), p = l(() => ({
|
|
217
|
+
title: r("skipTour"),
|
|
218
|
+
event: () => n("finish")
|
|
219
|
+
})), s = l(() => ({
|
|
220
|
+
title: r("startTour"),
|
|
221
|
+
event: () => n("next")
|
|
222
|
+
})), a = l(() => ({
|
|
223
|
+
title: r("next"),
|
|
224
|
+
event: () => n("next")
|
|
225
|
+
})), d = l(() => ({
|
|
226
|
+
title: r("finish"),
|
|
227
|
+
event: () => n("finish")
|
|
228
|
+
})), B = l(() => ({
|
|
229
|
+
title: r("ok"),
|
|
230
|
+
event: () => n("finish")
|
|
231
|
+
})), g = C(!1), F = C(!1), m = l(() => {
|
|
223
232
|
var i;
|
|
224
233
|
return q(e.targetElement) ? ((i = e.targetElement.value) == null ? void 0 : i.$el) || e.targetElement.value : e.targetElement.$el || e.targetElement;
|
|
225
|
-
}),
|
|
234
|
+
}), b = l(() => e.step === 0), N = l(() => e.step === e.totalSteps), L = l(() => !b.value), j = l(() => [
|
|
226
235
|
{
|
|
227
|
-
text:
|
|
228
|
-
handler: () =>
|
|
229
|
-
icon:
|
|
236
|
+
text: r("restartTour"),
|
|
237
|
+
handler: () => n("restart"),
|
|
238
|
+
icon: st
|
|
230
239
|
},
|
|
231
|
-
...
|
|
240
|
+
...N.value ? [] : [
|
|
232
241
|
{
|
|
233
242
|
text: "Skip tour",
|
|
234
|
-
handler: () =>
|
|
235
|
-
icon:
|
|
243
|
+
handler: () => n("finish"),
|
|
244
|
+
icon: ht
|
|
236
245
|
}
|
|
237
246
|
]
|
|
238
|
-
]),
|
|
247
|
+
]), K = l(() => {
|
|
239
248
|
let i;
|
|
240
|
-
|
|
249
|
+
b.value ? i = e.single ? B.value : s.value : N.value ? i = d.value : i = a.value;
|
|
241
250
|
const _ = [i];
|
|
242
|
-
return
|
|
251
|
+
return b.value && !e.single ? _.push(p.value) : e.action && _.push(e.action), _;
|
|
243
252
|
});
|
|
244
|
-
return
|
|
253
|
+
return Z(
|
|
245
254
|
() => e.active,
|
|
246
255
|
async (i) => {
|
|
247
|
-
var _,
|
|
248
|
-
i && ((_ = m.value) != null && _.scrollIntoView) && ((
|
|
256
|
+
var _, E;
|
|
257
|
+
i && ((_ = m.value) != null && _.scrollIntoView) && ((E = m.value) == null || E.scrollIntoView(
|
|
258
|
+
e.scrollOptions != null ? e.scrollOptions : f
|
|
259
|
+
), await z()), g.value = i, F.value = i;
|
|
249
260
|
},
|
|
250
261
|
{ immediate: !0 }
|
|
251
|
-
), (i, _) => t.active && o(m) ? (u(),
|
|
252
|
-
|
|
262
|
+
), (i, _) => t.active && o(m) ? (u(), O("div", St, [
|
|
263
|
+
F.value && o(m) ? (u(), S(o(rt), {
|
|
253
264
|
key: 0,
|
|
254
265
|
"target-element": o(m)
|
|
255
266
|
}, null, 8, ["target-element"])) : y("", !0),
|
|
256
|
-
h(o(
|
|
267
|
+
h(o(tt), {
|
|
257
268
|
"target-element": o(m),
|
|
258
269
|
position: t.position,
|
|
259
|
-
open:
|
|
270
|
+
open: g.value,
|
|
260
271
|
"aria-label": t.title,
|
|
261
272
|
"fixed-positioning": "",
|
|
262
273
|
class: "b-tutorial-popover",
|
|
263
|
-
onKeydown: _[0] || (_[0] =
|
|
264
|
-
},
|
|
265
|
-
default:
|
|
266
|
-
|
|
274
|
+
onKeydown: _[0] || (_[0] = H((E) => n("finish"), ["esc", "native"]))
|
|
275
|
+
}, U({
|
|
276
|
+
default: v(() => [
|
|
277
|
+
Ot,
|
|
267
278
|
c("div", bt, [
|
|
268
|
-
h(o(
|
|
279
|
+
h(o($), {
|
|
269
280
|
variant: "title",
|
|
270
281
|
el: "span"
|
|
271
282
|
}, {
|
|
272
|
-
default:
|
|
273
|
-
I(
|
|
283
|
+
default: v(() => [
|
|
284
|
+
I(T(t.title), 1)
|
|
274
285
|
]),
|
|
275
286
|
_: 1
|
|
276
287
|
}),
|
|
277
|
-
o(
|
|
288
|
+
o(L) ? (u(), S(o($), {
|
|
278
289
|
key: 0,
|
|
279
290
|
el: "span",
|
|
280
291
|
class: "b-tutorial-popover__steps"
|
|
281
292
|
}, {
|
|
282
|
-
default:
|
|
283
|
-
I(
|
|
293
|
+
default: v(() => [
|
|
294
|
+
I(T(o(r)("stepsOfTotal", { step: t.step, totalSteps: t.totalSteps })), 1)
|
|
284
295
|
]),
|
|
285
296
|
_: 1
|
|
286
297
|
})) : y("", !0)
|
|
287
298
|
]),
|
|
288
|
-
h(o(
|
|
289
|
-
default:
|
|
290
|
-
|
|
299
|
+
h(o($), null, {
|
|
300
|
+
default: v(() => [
|
|
301
|
+
W(i.$slots, "default", {}, void 0, !0)
|
|
291
302
|
]),
|
|
292
303
|
_: 3
|
|
293
304
|
}),
|
|
294
305
|
c("div", Ct, [
|
|
295
|
-
o(
|
|
306
|
+
o(b) ? y("", !0) : (u(), S(o(Y), {
|
|
296
307
|
key: 0,
|
|
297
|
-
data: o(
|
|
308
|
+
data: o(j),
|
|
298
309
|
class: "b-tutorial-popover__menu",
|
|
299
310
|
"data-testid": "menu-button"
|
|
300
311
|
}, null, 8, ["data"])),
|
|
301
312
|
c("div", Tt, [
|
|
302
|
-
h(o(
|
|
303
|
-
actions: o(
|
|
313
|
+
h(o(it), {
|
|
314
|
+
actions: o(K),
|
|
304
315
|
layout: "buttons-end"
|
|
305
316
|
}, null, 8, ["actions"])
|
|
306
317
|
])
|
|
@@ -310,8 +321,8 @@ const gt = /* @__PURE__ */ k(lt, [["render", mt]]), D = {
|
|
|
310
321
|
}, [
|
|
311
322
|
t.image ? {
|
|
312
323
|
name: "image",
|
|
313
|
-
fn:
|
|
314
|
-
h(o(
|
|
324
|
+
fn: v(() => [
|
|
325
|
+
h(o(et), x(t.image, {
|
|
315
326
|
"aspect-ratio": "landscape",
|
|
316
327
|
class: "b-tutorial-popover__image"
|
|
317
328
|
}), null, 16)
|
|
@@ -322,8 +333,8 @@ const gt = /* @__PURE__ */ k(lt, [["render", mt]]), D = {
|
|
|
322
333
|
])) : y("", !0);
|
|
323
334
|
}
|
|
324
335
|
});
|
|
325
|
-
const $t = /* @__PURE__ */ k(Et, [["__scopeId", "data-v-
|
|
326
|
-
...
|
|
336
|
+
const $t = /* @__PURE__ */ k(Et, [["__scopeId", "data-v-9513f48c"]]), It = { class: "b-tutorial" }, Rt = {}, jt = /* @__PURE__ */ R({
|
|
337
|
+
...Rt,
|
|
327
338
|
__name: "tutorial",
|
|
328
339
|
props: {
|
|
329
340
|
/**
|
|
@@ -334,34 +345,44 @@ const $t = /* @__PURE__ */ k(Et, [["__scopeId", "data-v-dc83a55d"]]), Bt = { cla
|
|
|
334
345
|
type: Array,
|
|
335
346
|
required: !0,
|
|
336
347
|
validator: (t) => t.length > 0
|
|
348
|
+
},
|
|
349
|
+
/**
|
|
350
|
+
* Options to control the scroll into view behavior.
|
|
351
|
+
* Takes the same options as the `scrollIntoView` function
|
|
352
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}
|
|
353
|
+
*/
|
|
354
|
+
scrollOptions: {
|
|
355
|
+
type: [Boolean, Object],
|
|
356
|
+
default: null
|
|
337
357
|
}
|
|
338
358
|
},
|
|
339
359
|
setup(t) {
|
|
340
|
-
const
|
|
341
|
-
function
|
|
360
|
+
const n = t, e = C(0), f = l(() => n.steps.length - 1), r = l(() => f.value === 0);
|
|
361
|
+
function p(s, a) {
|
|
342
362
|
return {
|
|
343
363
|
// Visual
|
|
344
|
-
targetElement:
|
|
345
|
-
image:
|
|
346
|
-
title:
|
|
347
|
-
step:
|
|
348
|
-
totalSteps:
|
|
349
|
-
action:
|
|
364
|
+
targetElement: s.target,
|
|
365
|
+
image: s.image,
|
|
366
|
+
title: s.title,
|
|
367
|
+
step: a,
|
|
368
|
+
totalSteps: f.value,
|
|
369
|
+
action: s.action,
|
|
370
|
+
scrollOptions: n.scrollOptions,
|
|
350
371
|
// Config
|
|
351
|
-
active:
|
|
352
|
-
single:
|
|
353
|
-
position:
|
|
372
|
+
active: a === e.value,
|
|
373
|
+
single: r.value,
|
|
374
|
+
position: s.position
|
|
354
375
|
};
|
|
355
376
|
}
|
|
356
|
-
return (
|
|
357
|
-
(u(!0),
|
|
358
|
-
key:
|
|
359
|
-
onFinish:
|
|
360
|
-
onNext:
|
|
361
|
-
onRestart:
|
|
377
|
+
return (s, a) => (u(), O("div", It, [
|
|
378
|
+
(u(!0), O(J, null, Q(t.steps, (d, B) => (u(), S(o($t), x(p(d, B), {
|
|
379
|
+
key: d.title,
|
|
380
|
+
onFinish: a[0] || (a[0] = (g) => e.value = -1),
|
|
381
|
+
onNext: a[1] || (a[1] = (g) => e.value += 1),
|
|
382
|
+
onRestart: a[2] || (a[2] = (g) => e.value = 0)
|
|
362
383
|
}), {
|
|
363
|
-
default:
|
|
364
|
-
I(
|
|
384
|
+
default: v(() => [
|
|
385
|
+
I(T(d.description), 1)
|
|
365
386
|
]),
|
|
366
387
|
_: 2
|
|
367
388
|
}, 1040))), 128))
|
|
@@ -369,6 +390,6 @@ const $t = /* @__PURE__ */ k(Et, [["__scopeId", "data-v-dc83a55d"]]), Bt = { cla
|
|
|
369
390
|
}
|
|
370
391
|
});
|
|
371
392
|
export {
|
|
372
|
-
|
|
393
|
+
jt as BentoTutorial
|
|
373
394
|
};
|
|
374
395
|
//# sourceMappingURL=tutorial.js.map
|
package/dist/tutorial.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutorial.js","sources":["../../vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/blocked.vue","../../vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../vue2/src/components/tutorial/tutorial.vue"],"sourcesContent":["<template>\n <popper-container\n :target-element=\"targetElement\"\n :middleware=\"middleware\"\n position=\"top-start\"\n fixed-positioning\n disabled-focus-trap\n class=\"b-tutorial-indicator\"\n data-testid=\"tutorial-indicator\"\n >\n <div class=\"b-tutorial-indicator__highlight\" :style=\"computedStyles\"></div>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { hide, type Middleware, offset } from '@floating-ui/vue';\n import { PopperContainer } from '@/components/popper-container';\n\n const BORDER_OFFSET = 2;\n\n defineProps({\n /**\n * Tutorial indicator's target element.\n * The indicator will position itself around the target element.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n });\n\n const computedStyles = ref({\n width: '0',\n height: '0',\n borderRadius: '0',\n });\n\n function getBorderRadius(element: HTMLElement) {\n try {\n const radius = parseFloat(getComputedStyle(element).getPropertyValue('border-radius'));\n return Number.isNaN(radius) ? '' : `${radius + 2 * BORDER_OFFSET}px`;\n } catch {\n return '';\n }\n }\n\n const middleware = [\n hide(),\n offset({\n mainAxis: BORDER_OFFSET,\n alignmentAxis: -BORDER_OFFSET,\n }),\n {\n name: 'updateIndicatorSize',\n fn: ({ x, y, elements }) => {\n const target = elements.reference as HTMLElement;\n computedStyles.value.width = `${target.offsetWidth + 4 * BORDER_OFFSET}px`;\n computedStyles.value.height = `${target.offsetHeight + 4 * BORDER_OFFSET}px`;\n computedStyles.value.borderRadius = getBorderRadius(target);\n return { x, y };\n },\n } as Middleware,\n ];\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-indicator.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-icons-16-blocked__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z\"/></g><defs><clipPath :id=\"'uia-icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div v-if=\"active && targetElement\">\n <tutorial-indicator v-if=\"isIndicatorVisible && targetElement\" :target-element=\"targetElement\" />\n\n <bento-popover\n :target-element=\"targetElement\"\n :position=\"position\"\n :open=\"isPopoverOpen\"\n :aria-label=\"title\"\n fixed-positioning\n class=\"b-tutorial-popover\"\n @keydown.esc.native=\"emit('finish')\"\n >\n <template v-if=\"image\" #image>\n <bento-image v-bind=\"image\" aspect-ratio=\"landscape\" class=\"b-tutorial-popover__image\" />\n </template>\n\n <div aria-hidden=\"true\" class=\"b-tutorial-popover__ripple\"></div>\n\n <div class=\"b-tutorial-popover__header\">\n <bento-typography variant=\"title\" el=\"span\"> {{ title }} </bento-typography>\n\n <bento-typography v-if=\"showSteps\" el=\"span\" class=\"b-tutorial-popover__steps\">\n {{ t('stepsOfTotal', { step, totalSteps }) }}\n </bento-typography>\n </div>\n\n <bento-typography>\n <slot />\n </bento-typography>\n\n <div class=\"b-tutorial-popover__footer\">\n <bento-menu\n v-if=\"!isFirstStep\"\n :data=\"menuData\"\n class=\"b-tutorial-popover__menu\"\n data-testid=\"menu-button\"\n />\n <div class=\"b-tutorial-popover__actions\">\n <bento-button-actions :actions=\"computedActions\" layout=\"buttons-end\" />\n </div>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, isRef, nextTick, PropType, ref, type default as Vue, watch } from 'vue';\n import { BentoMenu } from '@/components/menu';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { type BentoButtonActionObject, BentoButtonActions } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { TutorialIndicator } from './components/tutorial-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoMenuItem } from '@/components/menu/components';\n import type { VueNodeElement } from '@/types';\n import type { BentoTutorialStep } from '../../tutorial.types';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import BlockedIcon from '@adyen/ui-assets-icons-16/vue/blocked';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Optional configuration for the secondary action.\n * In tour tutorials, this is ignored for the introductory step.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is the active step (and should be visible).\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional illustration to display at the top of the popover.\n */\n image: {\n type: Object as PropType<BentoTutorialStep['image']>,\n default: null,\n },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<`${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Indicates whether this popover is a single tutorial or a tour.\n */\n single: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The tutorial step number.\n * In tour tutorials, `0` is the introductory step, and is displayed next\n * to the title.\n */\n step: {\n type: Number,\n default: null,\n },\n\n /**\n * Tutorial popover's target element.\n * The popover will position itself relatively to target element.\n */\n targetElement: {\n type: [Element, Object] as PropType<VueNodeElement>,\n required: true,\n },\n\n /**\n * The tutorial step title.\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Total count of steps.\n * In tour tutorials, this does not include the introductory step, and is\n * displayed next to the title.\n */\n totalSteps: {\n type: Number,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const emit = defineEmits<{\n /**\n * Emitted when the user clicks the primary action in popovers during introductory or intermediate steps of tour tutorials\n */\n (e: 'next'): void;\n\n /**\n * Emitted when the user clicks the primary action in a single tutorial, the last step of a tour, or skips the tutorial\n */\n (e: 'finish'): void;\n\n /**\n * Emitted when the user selects the restart tour option\n */\n (e: 'restart'): void;\n }>();\n\n const ACTION_SKIP = computed<BentoButtonActionObject>(() => ({\n title: t('skipTour') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_START = computed<BentoButtonActionObject>(() => ({\n title: t('startTour') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_NEXT = computed<BentoButtonActionObject>(() => ({\n title: t('next') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_FINISH = computed<BentoButtonActionObject>(() => ({\n title: t('finish') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_OK = computed<BentoButtonActionObject>(() => ({\n title: t('ok') as string,\n event: () => emit('finish'),\n }));\n\n const isPopoverOpen = ref(false);\n const isIndicatorVisible = ref(false);\n\n const targetElement = computed(() => {\n if (isRef(props.targetElement)) {\n return ((props.targetElement.value as Vue)?.$el || props.targetElement.value) as HTMLElement;\n }\n return ((props.targetElement as Vue).$el || props.targetElement) as HTMLElement;\n });\n\n const isFirstStep = computed(() => props.step === 0);\n const isLastStep = computed(() => props.step === props.totalSteps);\n\n const showSteps = computed(() => !isFirstStep.value);\n\n const menuData = computed<BentoMenuItem[]>(() => [\n {\n text: t('restartTour'),\n handler: () => emit('restart'),\n icon: RefreshIcon,\n },\n ...(isLastStep.value\n ? []\n : [\n {\n text: 'Skip tour',\n handler: () => emit('finish'),\n icon: BlockedIcon,\n },\n ]),\n ]);\n\n const computedActions = computed(() => {\n let primaryAction: BentoButtonActionObject;\n if (isFirstStep.value) {\n primaryAction = props.single ? ACTION_OK.value : ACTION_START.value;\n } else if (isLastStep.value) {\n primaryAction = ACTION_FINISH.value;\n } else {\n primaryAction = ACTION_NEXT.value;\n }\n\n const actions = [primaryAction];\n if (isFirstStep.value && !props.single) {\n actions.push(ACTION_SKIP.value);\n } else if (props.action) {\n actions.push(props.action);\n }\n\n return actions;\n });\n\n watch(\n () => props.active,\n async isActive => {\n if (isActive && targetElement.value?.scrollIntoView) {\n targetElement.value?.scrollIntoView({ behavior: 'smooth' });\n\n // Skip to next tick to preserve popover appear animation\n await nextTick();\n }\n\n isPopoverOpen.value = isActive;\n isIndicatorVisible.value = isActive;\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-popover.scss\" />\n","<template>\n <div class=\"b-tutorial\">\n <tutorial-popover\n v-for=\"(step, index) in steps\"\n v-bind=\"getPopoverProps(step, index)\"\n :key=\"step.title\"\n @finish=\"currentStep = -1\"\n @next=\"currentStep += 1\"\n @restart=\"currentStep = 0\"\n >\n {{ step.description }}\n </tutorial-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref } from 'vue';\n import { TutorialPopover } from './components/tutorial-popover';\n import type { BentoTutorialStep } from './tutorial.types';\n\n const props = defineProps({\n /**\n * The steps configuration for the tutorial.\n *\n */\n steps: {\n type: Array as PropType<BentoTutorialStep[]>,\n required: true,\n validator: (value: BentoTutorialStep[]) => value.length > 0,\n },\n });\n\n const currentStep = ref(0);\n\n const totalSteps = computed(() => props.steps.length - 1);\n const isSingleTutorial = computed(() => totalSteps.value === 0);\n\n function getPopoverProps(step: BentoTutorialStep, index: number) {\n return {\n // Visual\n targetElement: step.target,\n image: step.image,\n title: step.title,\n step: index,\n totalSteps: totalSteps.value,\n action: step.action,\n\n // Config\n active: index === currentStep.value,\n single: isSingleTutorial.value,\n position: step.position,\n };\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * The Tutorial is a temporary popover that should be used to educate users about\n * new or unfamiliar features or experiences.\n *\n * You can use single tutorial or chain them into a tour.\n *\n * Only use this component for new features/experiences that are not obvious and\n * self-explanatory on their own.\n *\n * @example\n * import { BentoTutorial } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTutorial },\n * template: `\n * <bento-tutorial\n * :steps=\"[\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * image: { src: imageSource, alt: 'Alt text' }\n * },\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * action: { title: 'Action label', event: () => {} }\n * },\n * ]\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n"],"names":["computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$2","toDisplayString","__default__$1","messages","t","useI18n","ACTION_SKIP","computed","emit","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","props","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCI,UAAAA,IAAAC,EAAA;AAAA,MAA2B,OAAA;AAAA,MAChB,QAAA;AAAA,MACC,cAAA;AAAA,IACM,CAAA;AAGlB,aAAAC,EAAAC,GAAA;AACI,UAAA;AACI,cAAAC,IAAA,WAAA,iBAAAD,CAAA,EAAA,iBAAA,eAAA,CAAA;AACA,eAAA,OAAA,MAAAC,CAAA,IAAA,KAAA,GAAAA,IAAA,IAAA;AAAA,MAAmD,QAAA;AAEnD,eAAA;AAAA,MAAO;AAAA,IACX;AAGJ,UAAAC,IAAA;AAAA,MAAmBC,GAAA;AAAA,MACVC,GAAA;AAAA,QACE,UAAA;AAAA,QACO,eAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,GAAAC,GAAA,GAAAC,GAAA,UAAAC,EAAA,MAAA;AAEF,gBAAAC,IAAAD,EAAA;AACA,iBAAAV,EAAA,MAAA,QAAA,GAAAW,EAAA,cAAA,IAAA,OACAX,EAAA,MAAA,SAAA,GAAAW,EAAA,eAAA,IAAA,OACAX,EAAA,MAAA,eAAAE,EAAAS,CAAA,GACA,EAAA,GAAAH,GAAA,GAAAC,EAAA;AAAA,QAAc;AAAA,MAClB;AAAA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H,EAAA,UAAA,QAAAG,EAAA,qBACIY,IAAAf,EAAA,UAAA,QAAAe,EAAA,eAAA,EAAA,UAAA,SAAA,IAGA,MAAAC,EAAA,IAGJlB,EAAA,QAAAgB,GACAf,EAAA,QAAAe;AAAA,MAA2B;AAAA,MAC/B,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oGC3KtBG,KAAA,CAAA;;;;;;;;;;;;;;;iBA1DAC,IAAAjD,EAAA,CAAA,GAEAkD,IAAA3B,EAAA,MAAAU,EAAA,MAAA,SAAA,CAAA,GACAkB,IAAA5B,EAAA,MAAA2B,EAAA,UAAA,CAAA;AAEA,aAAAE,EAAAC,GAAAC,GAAA;AACI,aAAA;AAAA;AAAA,QAAO,eAAAD,EAAA;AAAA,QAEiB,OAAAA,EAAA;AAAA,QACR,OAAAA,EAAA;AAAA,QACA,MAAAC;AAAA,QACN,YAAAJ,EAAA;AAAA,QACiB,QAAAG,EAAA;AAAA;AAAA,QACV,QAAAC,MAAAL,EAAA;AAAA,QAGiB,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"tutorial.js","sources":["../../vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/blocked.vue","../../vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../vue2/src/components/tutorial/tutorial.vue"],"sourcesContent":["<template>\n <popper-container\n :target-element=\"targetElement\"\n :middleware=\"middleware\"\n position=\"top-start\"\n fixed-positioning\n disabled-focus-trap\n class=\"b-tutorial-indicator\"\n data-testid=\"tutorial-indicator\"\n >\n <div class=\"b-tutorial-indicator__highlight\" :style=\"computedStyles\"></div>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { hide, type Middleware, offset } from '@floating-ui/vue';\n import { PopperContainer } from '@/components/popper-container';\n\n const BORDER_OFFSET = 2;\n\n defineProps({\n /**\n * Tutorial indicator's target element.\n * The indicator will position itself around the target element.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n });\n\n const computedStyles = ref({\n width: '0',\n height: '0',\n borderRadius: '0',\n });\n\n function getBorderRadius(element: HTMLElement) {\n try {\n const radius = parseFloat(getComputedStyle(element).getPropertyValue('border-radius'));\n return Number.isNaN(radius) ? '' : `${radius + 2 * BORDER_OFFSET}px`;\n } catch {\n return '';\n }\n }\n\n const middleware = [\n hide(),\n offset({\n mainAxis: BORDER_OFFSET,\n alignmentAxis: -BORDER_OFFSET,\n }),\n {\n name: 'updateIndicatorSize',\n fn: ({ x, y, elements }) => {\n const target = elements.reference as HTMLElement;\n computedStyles.value.width = `${target.offsetWidth + 4 * BORDER_OFFSET}px`;\n computedStyles.value.height = `${target.offsetHeight + 4 * BORDER_OFFSET}px`;\n computedStyles.value.borderRadius = getBorderRadius(target);\n return { x, y };\n },\n } as Middleware,\n ];\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-indicator.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-icons-16-blocked__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z\"/></g><defs><clipPath :id=\"'uia-icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div v-if=\"active && targetElement\">\n <tutorial-indicator v-if=\"isIndicatorVisible && targetElement\" :target-element=\"targetElement\" />\n\n <bento-popover\n :target-element=\"targetElement\"\n :position=\"position\"\n :open=\"isPopoverOpen\"\n :aria-label=\"title\"\n fixed-positioning\n class=\"b-tutorial-popover\"\n @keydown.esc.native=\"emit('finish')\"\n >\n <template v-if=\"image\" #image>\n <bento-image v-bind=\"image\" aspect-ratio=\"landscape\" class=\"b-tutorial-popover__image\" />\n </template>\n\n <div aria-hidden=\"true\" class=\"b-tutorial-popover__ripple\"></div>\n\n <div class=\"b-tutorial-popover__header\">\n <bento-typography variant=\"title\" el=\"span\"> {{ title }} </bento-typography>\n\n <bento-typography v-if=\"showSteps\" el=\"span\" class=\"b-tutorial-popover__steps\">\n {{ t('stepsOfTotal', { step, totalSteps }) }}\n </bento-typography>\n </div>\n\n <bento-typography>\n <slot />\n </bento-typography>\n\n <div class=\"b-tutorial-popover__footer\">\n <bento-menu\n v-if=\"!isFirstStep\"\n :data=\"menuData\"\n class=\"b-tutorial-popover__menu\"\n data-testid=\"menu-button\"\n />\n <div class=\"b-tutorial-popover__actions\">\n <bento-button-actions :actions=\"computedActions\" layout=\"buttons-end\" />\n </div>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, isRef, nextTick, PropType, ref, type default as Vue, watch } from 'vue';\n import { BentoMenu } from '@/components/menu';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { type BentoButtonActionObject, BentoButtonActions } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { TutorialIndicator } from './components/tutorial-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoMenuItem } from '@/components/menu/components';\n import type { VueNodeElement } from '@/types';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from '../../tutorial.types';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import BlockedIcon from '@adyen/ui-assets-icons-16/vue/blocked';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_SCROLL_OPTIONS: BentoTutorialScrollOptions = { behavior: 'smooth' };\n\n const props = defineProps({\n /**\n * Optional configuration for the secondary action.\n * In tour tutorials, this is ignored for the introductory step.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is the active step (and should be visible).\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional illustration to display at the top of the popover.\n */\n image: {\n type: Object as PropType<BentoTutorialStep['image']>,\n default: null,\n },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<`${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is a single tutorial or a tour.\n */\n single: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The tutorial step number.\n * In tour tutorials, `0` is the introductory step, and is displayed next\n * to the title.\n */\n step: {\n type: Number,\n default: null,\n },\n\n /**\n * Tutorial popover's target element.\n * The popover will position itself relatively to target element.\n */\n targetElement: {\n type: [Element, Object] as PropType<VueNodeElement>,\n required: true,\n },\n\n /**\n * The tutorial step title.\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Total count of steps.\n * In tour tutorials, this does not include the introductory step, and is\n * displayed next to the title.\n */\n totalSteps: {\n type: Number,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const emit = defineEmits<{\n /**\n * Emitted when the user clicks the primary action in popovers during introductory or intermediate steps of tour tutorials\n */\n (e: 'next'): void;\n\n /**\n * Emitted when the user clicks the primary action in a single tutorial, the last step of a tour, or skips the tutorial\n */\n (e: 'finish'): void;\n\n /**\n * Emitted when the user selects the restart tour option\n */\n (e: 'restart'): void;\n }>();\n\n const ACTION_SKIP = computed<BentoButtonActionObject>(() => ({\n title: t('skipTour') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_START = computed<BentoButtonActionObject>(() => ({\n title: t('startTour') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_NEXT = computed<BentoButtonActionObject>(() => ({\n title: t('next') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_FINISH = computed<BentoButtonActionObject>(() => ({\n title: t('finish') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_OK = computed<BentoButtonActionObject>(() => ({\n title: t('ok') as string,\n event: () => emit('finish'),\n }));\n\n const isPopoverOpen = ref(false);\n const isIndicatorVisible = ref(false);\n\n const targetElement = computed(() => {\n if (isRef(props.targetElement)) {\n return ((props.targetElement.value as Vue)?.$el || props.targetElement.value) as HTMLElement;\n }\n return ((props.targetElement as Vue).$el || props.targetElement) as HTMLElement;\n });\n\n const isFirstStep = computed(() => props.step === 0);\n const isLastStep = computed(() => props.step === props.totalSteps);\n\n const showSteps = computed(() => !isFirstStep.value);\n\n const menuData = computed<BentoMenuItem[]>(() => [\n {\n text: t('restartTour'),\n handler: () => emit('restart'),\n icon: RefreshIcon,\n },\n ...(isLastStep.value\n ? []\n : [\n {\n text: 'Skip tour',\n handler: () => emit('finish'),\n icon: BlockedIcon,\n },\n ]),\n ]);\n\n const computedActions = computed(() => {\n let primaryAction: BentoButtonActionObject;\n if (isFirstStep.value) {\n primaryAction = props.single ? ACTION_OK.value : ACTION_START.value;\n } else if (isLastStep.value) {\n primaryAction = ACTION_FINISH.value;\n } else {\n primaryAction = ACTION_NEXT.value;\n }\n\n const actions = [primaryAction];\n if (isFirstStep.value && !props.single) {\n actions.push(ACTION_SKIP.value);\n } else if (props.action) {\n actions.push(props.action);\n }\n\n return actions;\n });\n\n watch(\n () => props.active,\n async isActive => {\n if (isActive && targetElement.value?.scrollIntoView) {\n targetElement.value?.scrollIntoView(\n props.scrollOptions != null ? props.scrollOptions : DEFAULT_SCROLL_OPTIONS\n );\n\n // Skip to next tick to preserve popover appear animation\n await nextTick();\n }\n\n isPopoverOpen.value = isActive;\n isIndicatorVisible.value = isActive;\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-popover.scss\" />\n","<template>\n <div class=\"b-tutorial\">\n <tutorial-popover\n v-for=\"(step, index) in steps\"\n v-bind=\"getPopoverProps(step, index)\"\n :key=\"step.title\"\n @finish=\"currentStep = -1\"\n @next=\"currentStep += 1\"\n @restart=\"currentStep = 0\"\n >\n {{ step.description }}\n </tutorial-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref } from 'vue';\n import { TutorialPopover } from './components/tutorial-popover';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from './tutorial.types';\n\n const props = defineProps({\n /**\n * The steps configuration for the tutorial.\n *\n */\n steps: {\n type: Array as PropType<BentoTutorialStep[]>,\n required: true,\n validator: (value: BentoTutorialStep[]) => value.length > 0,\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n });\n\n const currentStep = ref(0);\n\n const totalSteps = computed(() => props.steps.length - 1);\n const isSingleTutorial = computed(() => totalSteps.value === 0);\n\n function getPopoverProps(step: BentoTutorialStep, index: number) {\n return {\n // Visual\n targetElement: step.target,\n image: step.image,\n title: step.title,\n step: index,\n totalSteps: totalSteps.value,\n action: step.action,\n scrollOptions: props.scrollOptions,\n\n // Config\n active: index === currentStep.value,\n single: isSingleTutorial.value,\n position: step.position,\n };\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * The Tutorial is a temporary popover that should be used to educate users about\n * new or unfamiliar features or experiences.\n *\n * You can use single tutorial or chain them into a tour.\n *\n * Only use this component for new features/experiences that are not obvious and\n * self-explanatory on their own.\n *\n * @example\n * import { BentoTutorial } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTutorial },\n * template: `\n * <bento-tutorial\n * :steps=\"[\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * image: { src: imageSource, alt: 'Alt text' }\n * },\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * action: { title: 'Action label', event: () => {} }\n * },\n * ]\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n"],"names":["computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$2","toDisplayString","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","t","useI18n","ACTION_SKIP","computed","emit","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","props","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCI,UAAAA,IAAAC,EAAA;AAAA,MAA2B,OAAA;AAAA,MAChB,QAAA;AAAA,MACC,cAAA;AAAA,IACM,CAAA;AAGlB,aAAAC,EAAAC,GAAA;AACI,UAAA;AACI,cAAAC,IAAA,WAAA,iBAAAD,CAAA,EAAA,iBAAA,eAAA,CAAA;AACA,eAAA,OAAA,MAAAC,CAAA,IAAA,KAAA,GAAAA,IAAA,IAAA;AAAA,MAAmD,QAAA;AAEnD,eAAA;AAAA,MAAO;AAAA,IACX;AAGJ,UAAAC,IAAA;AAAA,MAAmBC,GAAA;AAAA,MACVC,GAAA;AAAA,QACE,UAAA;AAAA,QACO,eAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,GAAAC,GAAA,GAAAC,GAAA,UAAAC,EAAA,MAAA;AAEF,gBAAAC,IAAAD,EAAA;AACA,iBAAAV,EAAA,MAAA,QAAA,GAAAW,EAAA,cAAA,IAAA,OACAX,EAAA,MAAA,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AArB,EAAA,KAAA,IAA8BW,EAAA,UAE9BU,EAAA,KAAAV,EAAA,MAAA,GAGJU;AAAA,IAAO,CAAA;AAGX,WAAAC;AAAA,MAAA,MAAAX,EAAA;AAAA,MACgB,OAAAY,MAAA;;AAER,QAAAA,OAAAX,IAAAH,EAAA,UAAA,QAAAG,EAAA,qBACIY,IAAAf,EAAA,UAAA,QAAAe,EAAA;AAAA,UAAqBb,EAAA,iBAAA,OAAAA,EAAA,gBAAAd;AAAA,WAKrB,MAAA4B,EAAA,IAGJlB,EAAA,QAAAgB,GACAf,EAAA,QAAAe;AAAA,MAA2B;AAAA,MAC/B,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oGC9KtBG,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBA3DAC,IAAAlD,EAAA,CAAA,GAEAmD,IAAA3B,EAAA,MAAAU,EAAA,MAAA,SAAA,CAAA,GACAkB,IAAA5B,EAAA,MAAA2B,EAAA,UAAA,CAAA;AAEA,aAAAE,EAAAC,GAAAC,GAAA;AACI,aAAA;AAAA;AAAA,QAAO,eAAAD,EAAA;AAAA,QAEiB,OAAAA,EAAA;AAAA,QACR,OAAAA,EAAA;AAAA,QACA,MAAAC;AAAA,QACN,YAAAJ,EAAA;AAAA,QACiB,QAAAG,EAAA;AAAA,QACV,eAAApB,EAAA;AAAA;AAAA,QACQ,QAAAqB,MAAAL,EAAA;AAAA,QAGS,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
package/dist/typography.js
CHANGED
package/dist/web-types.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/bento-vue3",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "Adyen Bento Vue 3 components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"url": "git@github.com:Adyen/bento.git"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@adyen/bento-design-tokens": "1.
|
|
55
|
+
"@adyen/bento-design-tokens": "1.26.0",
|
|
56
56
|
"@adyen/ui-assets-icons-16": "4.1.0",
|
|
57
57
|
"@adyen/ui-assets-payment-method-icons": "6.1.0",
|
|
58
58
|
"@codemirror/commands": "6.3.3",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MaybeRef } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Dynamic import fn, check if this is even possible?????
|
|
4
|
-
* @param packageName
|
|
5
|
-
* @param suffixSvgSrc
|
|
6
|
-
* @param fallBackSrc
|
|
7
|
-
*/
|
|
8
|
-
export declare const useDynamicIconImport: (packageName: string, suffixSvgSrc: MaybeRef<string>, fallBackSrc: string) => import("../../../vue3/node_modules/vue").Ref<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.11b6dd35.js","sources":["../../../vue2/src/components/typography/typography.types.ts","../../../vue2/src/utils/ts/dev-environment.ts","../../../vue2/src/utils/ts/print-development-warning.ts","../../../vue2/src/utils/ts/deprecate.ts","../../../vue2/src/components/typography/typography.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyVariant {\n CAPTION = 'caption',\n BODY = 'body',\n /** @deprecated Use \"TITLE\" instead. */\n SUBTITLE = 'subtitle',\n TITLE = 'title',\n}\n\nexport enum BentoTypographyModifier {\n WIDE = 'wide',\n STRONGER = 'stronger',\n STRONGER_WIDE = 'stronger-wide',\n STRONGEST = 'strongest',\n STRONGEST_WIDE = 'strongest-wide',\n MEDIUM = 'm',\n LARGE = 'l',\n MOBILE = 'mobile',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyElement {\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n DIV = 'div',\n PARAGRAPH = 'p',\n SPAN = 'span',\n}\n","const DEV_ENVIROMENT_NAMES = ['development', 'DEVELOPMENT', 'dev', 'DEV'];\n\nexport const isDevelopmentEnviroment = () => DEV_ENVIROMENT_NAMES.includes(process.env.NODE_ENV);\n","import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n/**\n * Prints console.warn messages in development mode only.\n *\n * @see console.warn for what parameters you can use\n */\n\nexport function printDevelopmentWarning(...args: Parameters<typeof console.warn>) {\n if (isDevelopmentEnviroment()) {\n // eslint-disable-next-line no-console\n console.warn(...args);\n }\n}\n","import { printDevelopmentWarning } from './print-development-warning';\n\nconst DEPRECATION_STYLES = ['color: red', 'background: yellow'].join(';');\nconst shownMessages = new Set<string>();\n\n/**\n * Informs users about the deprecations in development mode only.\n *\n * @param title Indicates what is being deprecated.\n * @param deprecationMessage How to avoid the deprecation by giving an example of the alternatives. Backticks can be used to multi-line the message.\n * @param toBeRemovedInVersion The version it will be removed. Must be in X.Y.Z format.\n */\nexport function deprecate(title: string, deprecationMessage: string, toBeRemovedInVersion: string) {\n // If the message is already showing, don't show it again\n if (!shownMessages.has(title)) {\n printDevelopmentWarning(`%cDEPRECATED:\\x1b[0m ${title}`, DEPRECATION_STYLES);\n // Format multi-line descriptions with the backtick\n printDevelopmentWarning(`${deprecationMessage.replaceAll(' ', '').trim()}`);\n printDevelopmentWarning(`To be removed in: %c${toBeRemovedInVersion}`, DEPRECATION_STYLES);\n shownMessages.add(title);\n }\n}\n\n/**\n * Reset shownMessages set\n *\n * @deprecated For testing purposes only. Do not use.\n */\nexport function resetShownMessages() {\n shownMessages.clear();\n}\n","<template>\n <component :is=\"el\" class=\"b-typography\" :class=\"conditionalClasses\" data-testid=\"typography\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypographyElement, BentoTypographyModifier, BentoTypographyVariant } from './typography.types';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el?: BentoTypographyElement | `${BentoTypographyElement}`;\n\n /**\n * Adds the large class modifier.\n * Applicable to the Title variant.\n */\n large?: boolean;\n\n /**\n * Adds the medium class modifier.\n * Applicable to the Title variant.\n */\n medium?: boolean;\n\n /**\n * Adds the stronger class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n stronger?: boolean;\n\n /**\n * Adds the strongest class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n strongest?: boolean;\n\n /**\n * Sets the type of typography variant.\n * @values caption, body, title.\n */\n variant?: BentoTypographyVariant | `${BentoTypographyVariant}`;\n\n /**\n * Adds the medium class modifier.\n * Applicable to tje Body variant.\n */\n wide?: boolean;\n }>(),\n {\n el: BentoTypographyElement.PARAGRAPH,\n large: false,\n medium: false,\n stronger: false,\n strongest: false,\n variant: BentoTypographyVariant.BODY,\n wide: false,\n }\n );\n\n if (props.variant === BentoTypographyVariant.SUBTITLE) {\n deprecate(\n 'BentoTypography \"subtitle\" variant (BentoTypographyVariant.SUBTITLE)',\n `Use the \"title\" or \"BentoTypographyVariant.TITLE\" variant and (optionally) combine it with a size property. e.g. medium / large.\n <bento-typography :variant=\"BentoTypographyVariant.TITLE\" medium>`,\n '2.0.0'\n );\n }\n\n const conditionalClasses = computed(() => ({\n // Caption\n [`b-typography--${BentoTypographyVariant.CAPTION}`]: props.variant === BentoTypographyVariant.CAPTION,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.wide,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.stronger,\n\n // Body\n [`b-typography--${BentoTypographyVariant.BODY}`]: props.variant === BentoTypographyVariant.BODY,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.BODY && props.wide,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.BODY && props.stronger,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGEST}`]:\n props.variant === BentoTypographyVariant.BODY && props.strongest,\n\n // Subtitle\n [`b-typography--${BentoTypographyVariant.SUBTITLE}`]: props.variant === BentoTypographyVariant.SUBTITLE,\n [`b-typography--${BentoTypographyVariant.SUBTITLE}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.SUBTITLE && props.stronger,\n\n // Title\n [`b-typography--${BentoTypographyVariant.TITLE}`]:\n props.variant === BentoTypographyVariant.TITLE && !props.medium && !props.large,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.MEDIUM}`]:\n props.variant === BentoTypographyVariant.TITLE && props.medium,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.LARGE}`]:\n props.variant === BentoTypographyVariant.TITLE && props.large,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * The Typography component makes it easy to apply a default set of font weights, sizes and other text styles\n * easily to text. The variants and properties match with those found in Figma.\n *\n * For example, seeing text with the typography styling of\n *\n * @example\n * import { BentoTypography } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTypography },\n * template: `\n * <bento-typography>\n * ... text content\n * </bento-typography>\n * `\n * }\n */\n export default {\n name: 'bento-typography',\n inheritAttrs: true,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./typography.scss\" />\n<style lang=\"scss\">\n // Reset preset browser margin on all elements but allow for it to be overriden\n .b-typography {\n margin: 0;\n }\n</style>\n"],"names":["BentoTypographyVariant","BentoTypographyVariant2","BentoTypographyModifier","BentoTypographyModifier2","BentoTypographyElement","BentoTypographyElement2","DEV_ENVIROMENT_NAMES","isDevelopmentEnviroment","printDevelopmentWarning","args","DEPRECATION_STYLES","shownMessages","deprecate","title","deprecationMessage","toBeRemovedInVersion","__default__","props","conditionalClasses","computed"],"mappings":";;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,OAAA,QAEAA,EAAA,WAAA,YACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,WAAA,YACAA,EAAA,gBAAA,iBACAA,EAAA,YAAA,aACAA,EAAA,iBAAA,kBACAA,EAAA,SAAA,KACAA,EAAA,QAAA,KACAA,EAAA,SAAA,UARQA,IAAAD,KAAA,CAAA,CAAA,GAcAE,IAAA,kBAAAC,OACRA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,KAAA,MACAA,EAAA,MAAA,OACAA,EAAA,YAAA,KACAA,EAAA,OAAA,QATQA,IAAAD,KAAA,CAAA,CAAA;ACzBZ,MAAAE,IAAA,CAAA,eAAA,eAAA,OAAA,KAAA,GAEOC,IAAA,MAAAD,EAAA,SAAA,QAAA,IAAA,QAAA;ACMA,SAAAE,KAAAC,GAAA;AACH,EAAAF,EAAA,KAEI,QAAA,KAAA,GAAAE,CAAA;AAER;ACXA,MAAAC,IAAA,CAAA,cAAA,oBAAA,EAAA,KAAA,GAAA,GACAC,IAAA,oBAAA,IAAA;AASgB,SAAAC,EAAAC,GAAAC,GAAAC,GAAA;AAEZ,EAAAJ,EAAA,IAAAE,CAAA,MACIL,EAAA,wBAAAK,KAAAH,CAAA,GAEAF,EAAA,GAAAM,EAAA,WAAA,MAAA,EAAA,EAAA,KAAA,GAAA,GACAN,EAAA,uBAAAO,KAAAL,CAA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