@adyen/bento-vue3 1.8.0 → 1.9.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/composables/useKeyboardNavigator/useKeyboardNavigator.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useScroller/useScroller.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +23 -422
- package/dist/@types/packages/vue2/src/components/divider/divider.vue.d.ts +1 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -3
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +9 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +4 -4
- package/dist/alert.js +58 -59
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/cross.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.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/index15.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/index31.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/index35.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/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/assets/listbox.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +2 -2
- package/dist/checkbox.js +5 -5
- package/dist/chunks/arrow-left.81a91b8f.js +29 -0
- package/dist/chunks/arrow-left.81a91b8f.js.map +1 -0
- package/dist/chunks/{base-modal.3dcf8376.js → base-modal.a629cb32.js} +3 -3
- package/dist/chunks/{base-modal.3dcf8376.js.map → base-modal.a629cb32.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.3f52ea2d.js → button-actions-with-menu.f6dfb14d.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.3f52ea2d.js.map → button-actions-with-menu.f6dfb14d.js.map} +1 -1
- package/dist/chunks/{calendar.d4ab387d.js → calendar.fa7712e8.js} +2 -2
- package/dist/chunks/{calendar.d4ab387d.js.map → calendar.fa7712e8.js.map} +1 -1
- package/dist/chunks/{checkbox.03c4b0fe.js → checkbox.731dc0ab.js} +71 -72
- package/dist/chunks/checkbox.731dc0ab.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.c45a999d.js +44 -0
- package/dist/chunks/checkmark-circle-fill.c45a999d.js.map +1 -0
- package/dist/chunks/checkmark-small.c79220d9.js +29 -0
- package/dist/chunks/checkmark-small.c79220d9.js.map +1 -0
- package/dist/chunks/checkmark.eb3c7a06.js +29 -0
- package/dist/chunks/checkmark.eb3c7a06.js.map +1 -0
- package/dist/chunks/chevron-left.4ee92950.js +52 -0
- package/dist/chunks/chevron-left.4ee92950.js.map +1 -0
- package/dist/chunks/chevron-up.46afb34c.js +52 -0
- package/dist/chunks/chevron-up.46afb34c.js.map +1 -0
- package/dist/chunks/{controls-group.807b5fb0.js → controls-group.d6543674.js} +2 -2
- package/dist/chunks/{controls-group.807b5fb0.js.map → controls-group.d6543674.js.map} +1 -1
- package/dist/chunks/{copy.28bd4298.js → copy.330d594e.js} +36 -37
- package/dist/chunks/copy.330d594e.js.map +1 -0
- package/dist/chunks/cross-circle-fill.1abec1a2.js +44 -0
- package/dist/chunks/cross-circle-fill.1abec1a2.js.map +1 -0
- package/dist/chunks/cross.26509efc.js +29 -0
- package/dist/chunks/cross.26509efc.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.74c4584a.js → dropdown-default-textbox.4108b289.js} +63 -58
- package/dist/chunks/{dropdown-default-textbox.74c4584a.js.map → dropdown-default-textbox.4108b289.js.map} +1 -1
- package/dist/chunks/{dropdown.502e1f5c.js → dropdown.63de9aac.js} +209 -201
- package/dist/chunks/dropdown.63de9aac.js.map +1 -0
- package/dist/chunks/field-label.3c19a29a.js +146 -0
- package/dist/chunks/field-label.3c19a29a.js.map +1 -0
- package/dist/chunks/{fixed-scroller.92bb77a6.js → fixed-scroller.bced60dd.js} +2 -2
- package/dist/chunks/{fixed-scroller.92bb77a6.js.map → fixed-scroller.bced60dd.js.map} +1 -1
- package/dist/chunks/{index.cf0d3be3.js → index.4d2a13e1.js} +2 -2
- package/dist/chunks/{index.cf0d3be3.js.map → index.4d2a13e1.js.map} +1 -1
- package/dist/chunks/{index.d2542c6a.js → index.73ed22a7.js} +145 -150
- package/dist/chunks/index.73ed22a7.js.map +1 -0
- package/dist/chunks/{index.7262642e.js → index.85832db5.js} +3 -3
- package/dist/chunks/{index.7262642e.js.map → index.85832db5.js.map} +1 -1
- package/dist/chunks/{index.abb2a1d5.js → index.89dfe209.js} +2 -2
- package/dist/chunks/{index.abb2a1d5.js.map → index.89dfe209.js.map} +1 -1
- package/dist/chunks/{index.726e2f3c.js → index.98174339.js} +4 -4
- package/dist/chunks/{index.726e2f3c.js.map → index.98174339.js.map} +1 -1
- package/dist/chunks/{index.e9156fe3.js → index.c6fecf1c.js} +7 -7
- package/dist/chunks/{index.e9156fe3.js.map → index.c6fecf1c.js.map} +1 -1
- package/dist/chunks/{index.b043371e.js → index.edcaf766.js} +5 -5
- package/dist/chunks/{index.b043371e.js.map → index.edcaf766.js.map} +1 -1
- package/dist/chunks/info-filled.e591599f.js +67 -0
- package/dist/chunks/info-filled.e591599f.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.5b00c85f.js → listbox-option-tag.b1eb32bd.js} +2 -2
- package/dist/chunks/{listbox-option-tag.5b00c85f.js.map → listbox-option-tag.b1eb32bd.js.map} +1 -1
- package/dist/chunks/{listbox.d07c24e6.js → listbox.ac43f8ab.js} +39 -36
- package/dist/chunks/{listbox.d07c24e6.js.map → listbox.ac43f8ab.js.map} +1 -1
- package/dist/chunks/{loading-button.ad7cfaee.js → loading-button.4b88e24d.js} +3 -3
- package/dist/chunks/{loading-button.ad7cfaee.js.map → loading-button.4b88e24d.js.map} +1 -1
- package/dist/chunks/refresh.bd60f6a8.js +29 -0
- package/dist/chunks/refresh.bd60f6a8.js.map +1 -0
- package/dist/chunks/search.ade93bda.js +44 -0
- package/dist/chunks/search.ade93bda.js.map +1 -0
- package/dist/chunks/{tooltip.054d2eb6.js → tooltip.27c32d36.js} +2 -2
- package/dist/chunks/{tooltip.054d2eb6.js.map → tooltip.27c32d36.js.map} +1 -1
- package/dist/code-snippet.js +425 -428
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +1 -1
- package/dist/data-grid.js +1080 -1140
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +6 -6
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +9 -26
- package/dist/divider.js.map +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/filter-bar.js +1035 -836
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +2 -2
- package/dist/index.js +12 -12
- package/dist/info-icon.js +38 -39
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +105 -107
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +7 -7
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +1 -1
- package/dist/pagination.js +149 -157
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +3 -3
- package/dist/search-bar.js +4 -4
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +4 -4
- package/dist/status.js +1 -1
- package/dist/stepper.js +78 -79
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +2 -2
- package/dist/tabs.js +2 -2
- package/dist/tag.js +2 -2
- package/dist/textarea.js +46 -47
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +92 -93
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +2 -2
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +86 -87
- package/dist/tutorial.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/assets/arrow-left.css +0 -1
- package/dist/assets/checkmark-circle-fill.css +0 -1
- package/dist/assets/checkmark-small.css +0 -1
- package/dist/assets/checkmark.css +0 -1
- package/dist/assets/chevron-left.css +0 -1
- package/dist/assets/chevron-up.css +0 -1
- package/dist/assets/cross-circle-fill.css +0 -1
- package/dist/assets/info-filled.css +0 -1
- package/dist/assets/refresh.css +0 -1
- package/dist/assets/search.css +0 -1
- package/dist/chunks/arrow-left.cdbcc128.js +0 -30
- package/dist/chunks/arrow-left.cdbcc128.js.map +0 -1
- package/dist/chunks/checkbox.03c4b0fe.js.map +0 -1
- package/dist/chunks/checkmark-circle-fill.e6b84561.js +0 -45
- package/dist/chunks/checkmark-circle-fill.e6b84561.js.map +0 -1
- package/dist/chunks/checkmark-small.3e93a119.js +0 -30
- package/dist/chunks/checkmark-small.3e93a119.js.map +0 -1
- package/dist/chunks/checkmark.83e4f1e0.js +0 -30
- package/dist/chunks/checkmark.83e4f1e0.js.map +0 -1
- package/dist/chunks/chevron-left.2fd6b083.js +0 -54
- package/dist/chunks/chevron-left.2fd6b083.js.map +0 -1
- package/dist/chunks/chevron-up.9bf21068.js +0 -54
- package/dist/chunks/chevron-up.9bf21068.js.map +0 -1
- package/dist/chunks/copy.28bd4298.js.map +0 -1
- package/dist/chunks/cross-circle-fill.0feb37b3.js +0 -45
- package/dist/chunks/cross-circle-fill.0feb37b3.js.map +0 -1
- package/dist/chunks/cross.5c36a670.js +0 -30
- package/dist/chunks/cross.5c36a670.js.map +0 -1
- package/dist/chunks/dropdown.502e1f5c.js.map +0 -1
- package/dist/chunks/field-label.61679178.js +0 -132
- package/dist/chunks/field-label.61679178.js.map +0 -1
- package/dist/chunks/index.d2542c6a.js.map +0 -1
- package/dist/chunks/info-filled.514a2db6.js +0 -69
- package/dist/chunks/info-filled.514a2db6.js.map +0 -1
- package/dist/chunks/refresh.c38c9eee.js +0 -30
- package/dist/chunks/refresh.c38c9eee.js.map +0 -1
- package/dist/chunks/search.d18f9657.js +0 -45
- package/dist/chunks/search.d18f9657.js.map +0 -1
package/dist/tutorial.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as x, ref as O, openBlock as u, createBlock as S, unref as o, withCtx as f, createElementVNode as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as F, a as
|
|
1
|
+
import { defineComponent as x, ref as O, openBlock as u, createBlock as S, unref as o, withCtx as f, createElementVNode as c, normalizeStyle as j, createElementBlock as b, mergeProps as R, toDisplayString as E, createCommentVNode as y, computed as r, isRef as q, watch as L, nextTick as Z, createVNode as h, withKeys as z, createSlots as H, createTextVNode as I, renderSlot as U, pushScopeId as W, popScopeId as X, Fragment as G, renderList as J } from "vue";
|
|
2
|
+
import { B as Q } from "./chunks/index.73ed22a7.js";
|
|
3
|
+
import { B as F, a as Y } from "./chunks/index.98174339.js";
|
|
4
4
|
import { B } from "./chunks/index.75f3672e.js";
|
|
5
|
-
import { BentoImage as
|
|
6
|
-
import { u as
|
|
7
|
-
import { R as
|
|
5
|
+
import { BentoImage as tt } from "./image.js";
|
|
6
|
+
import { u as et } from "./chunks/i18n.6c402773.js";
|
|
7
|
+
import { R as ot } from "./chunks/refresh.bd60f6a8.js";
|
|
8
8
|
import { _ as k } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
9
|
-
import { a as N, h as
|
|
9
|
+
import { a as N, h as at, o as st } from "./chunks/index.85832db5.js";
|
|
10
10
|
import { BentoButtonActions as nt } from "./button.js";
|
|
11
|
-
import "./assets/
|
|
11
|
+
import "./assets/index40.css";
|
|
12
12
|
var A;
|
|
13
|
-
const
|
|
13
|
+
const it = /* @__PURE__ */ x({
|
|
14
14
|
__name: "tutorial-indicator",
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
@@ -28,29 +28,29 @@ const rt = /* @__PURE__ */ x({
|
|
|
28
28
|
height: "0",
|
|
29
29
|
borderRadius: "0"
|
|
30
30
|
});
|
|
31
|
-
function s(
|
|
31
|
+
function s(d) {
|
|
32
32
|
try {
|
|
33
|
-
const a = parseFloat(getComputedStyle(
|
|
33
|
+
const a = parseFloat(getComputedStyle(d).getPropertyValue("border-radius"));
|
|
34
34
|
return Number.isNaN(a) ? "" : `${a + 2 * 2}px`;
|
|
35
35
|
} catch {
|
|
36
36
|
return "";
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
const v = [
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
at(),
|
|
41
|
+
st({
|
|
42
42
|
mainAxis: 2,
|
|
43
43
|
alignmentAxis: -2
|
|
44
44
|
}),
|
|
45
45
|
{
|
|
46
46
|
name: "updateIndicatorSize",
|
|
47
|
-
fn: ({ x:
|
|
48
|
-
const p =
|
|
49
|
-
return e.value.width = `${p.offsetWidth + 4 * 2}px`, e.value.height = `${p.offsetHeight + 4 * 2}px`, e.value.borderRadius = s(p), { x:
|
|
47
|
+
fn: ({ x: d, y: a, elements: n }) => {
|
|
48
|
+
const p = n.reference;
|
|
49
|
+
return e.value.width = `${p.offsetWidth + 4 * 2}px`, e.value.height = `${p.offsetHeight + 4 * 2}px`, e.value.borderRadius = s(p), { x: d, y: a };
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
|
-
return (
|
|
53
|
+
return (d, a) => (u(), S(o(N), {
|
|
54
54
|
"target-element": t.targetElement,
|
|
55
55
|
middleware: v,
|
|
56
56
|
position: "top-start",
|
|
@@ -60,54 +60,53 @@ const rt = /* @__PURE__ */ x({
|
|
|
60
60
|
"data-testid": "tutorial-indicator"
|
|
61
61
|
}, {
|
|
62
62
|
default: f(() => [
|
|
63
|
-
|
|
63
|
+
c("div", {
|
|
64
64
|
class: "b-tutorial-indicator__highlight",
|
|
65
|
-
style:
|
|
65
|
+
style: j(e.value)
|
|
66
66
|
}, null, 4)
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
69
69
|
}, 8, ["target-element"]));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const
|
|
72
|
+
const rt = /* @__PURE__ */ k(it, [["__scopeId", "data-v-672deffb"]]);
|
|
73
73
|
let P = 0;
|
|
74
|
-
const
|
|
74
|
+
const lt = {
|
|
75
75
|
beforeCreate() {
|
|
76
76
|
this.uuid = P.toString(), P += 1;
|
|
77
77
|
}
|
|
78
|
-
},
|
|
78
|
+
}, ut = { key: 0 }, ct = ["clip-path"], dt = /* @__PURE__ */ c("path", {
|
|
79
79
|
fill: "#00112C",
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
pt
|
|
85
|
-
], ft = ["id"], vt = /* @__PURE__ */ K(() => /* @__PURE__ */ d("rect", {
|
|
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), pt = [
|
|
82
|
+
dt
|
|
83
|
+
], _t = ["id"], ft = /* @__PURE__ */ c("rect", {
|
|
86
84
|
width: "16",
|
|
87
85
|
height: "16",
|
|
88
86
|
fill: "#fff"
|
|
89
|
-
}, null, -1)
|
|
90
|
-
|
|
87
|
+
}, null, -1), vt = [
|
|
88
|
+
ft
|
|
91
89
|
];
|
|
92
|
-
function
|
|
90
|
+
function mt(t, l, e, s, v, d) {
|
|
93
91
|
return u(), b("svg", R({ role: "img" }, t.$attrs, {
|
|
92
|
+
class: "ui-assets-icons-16",
|
|
94
93
|
xmlns: "http://www.w3.org/2000/svg",
|
|
95
94
|
width: "16",
|
|
96
95
|
height: "16",
|
|
97
96
|
fill: "none"
|
|
98
97
|
}), [
|
|
99
|
-
t.$attrs["svg-title"] ? (u(), b("title",
|
|
100
|
-
|
|
98
|
+
t.$attrs["svg-title"] ? (u(), b("title", ut, E(t.$attrs["svg-title"]), 1)) : y("", !0),
|
|
99
|
+
c("g", {
|
|
101
100
|
"clip-path": "url(#uia-icons-16-blocked__a" + t.uuid + ")"
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
}, pt, 8, ct),
|
|
102
|
+
c("defs", null, [
|
|
103
|
+
c("clipPath", {
|
|
105
104
|
id: "uia-icons-16-blocked__a" + t.uuid
|
|
106
|
-
},
|
|
105
|
+
}, vt, 8, _t)
|
|
107
106
|
])
|
|
108
107
|
], 16);
|
|
109
108
|
}
|
|
110
|
-
const
|
|
109
|
+
const gt = /* @__PURE__ */ k(lt, [["render", mt]]), D = {
|
|
111
110
|
"en-US": {
|
|
112
111
|
finish: "Finish",
|
|
113
112
|
next: "Next",
|
|
@@ -117,13 +116,13 @@ const ht = /* @__PURE__ */ k(ut, [["render", gt], ["__scopeId", "data-v-fc5ded40
|
|
|
117
116
|
startTour: "Start tour",
|
|
118
117
|
stepsOfTotal: "{step} of {totalSteps}"
|
|
119
118
|
}
|
|
120
|
-
},
|
|
119
|
+
}, ht = (t) => (W("data-v-dc83a55d"), t = t(), X(), t), yt = { key: 0 }, St = /* @__PURE__ */ ht(() => /* @__PURE__ */ c("div", {
|
|
121
120
|
"aria-hidden": "true",
|
|
122
121
|
class: "b-tutorial-popover__ripple"
|
|
123
|
-
}, null, -1)),
|
|
124
|
-
i18n: { messages:
|
|
122
|
+
}, null, -1)), bt = { class: "b-tutorial-popover__header" }, Ct = { class: "b-tutorial-popover__footer" }, Tt = { class: "b-tutorial-popover__actions" }, Ot = {
|
|
123
|
+
i18n: { messages: D }
|
|
125
124
|
}, Et = /* @__PURE__ */ x({
|
|
126
|
-
|
|
125
|
+
...Ot,
|
|
127
126
|
__name: "tutorial-popover",
|
|
128
127
|
props: {
|
|
129
128
|
/**
|
|
@@ -205,103 +204,103 @@ const ht = /* @__PURE__ */ k(ut, [["render", gt], ["__scopeId", "data-v-fc5ded40
|
|
|
205
204
|
},
|
|
206
205
|
emits: ["next", "finish", "restart"],
|
|
207
206
|
setup(t, { emit: l }) {
|
|
208
|
-
const e = t, { t: s } =
|
|
207
|
+
const e = t, { t: s } = et({ messages: D }), v = r(() => ({
|
|
209
208
|
title: s("skipTour"),
|
|
210
209
|
event: () => l("finish")
|
|
211
|
-
})),
|
|
210
|
+
})), d = r(() => ({
|
|
212
211
|
title: s("startTour"),
|
|
213
212
|
event: () => l("next")
|
|
214
213
|
})), a = r(() => ({
|
|
215
214
|
title: s("next"),
|
|
216
215
|
event: () => l("next")
|
|
217
|
-
})),
|
|
216
|
+
})), n = r(() => ({
|
|
218
217
|
title: s("finish"),
|
|
219
218
|
event: () => l("finish")
|
|
220
219
|
})), p = r(() => ({
|
|
221
220
|
title: s("ok"),
|
|
222
221
|
event: () => l("finish")
|
|
223
222
|
})), C = O(!1), g = O(!1), m = r(() => {
|
|
224
|
-
var
|
|
225
|
-
return
|
|
226
|
-
}), T = r(() => e.step === 0), w = r(() => e.step === e.totalSteps),
|
|
223
|
+
var i;
|
|
224
|
+
return q(e.targetElement) ? ((i = e.targetElement.value) == null ? void 0 : i.$el) || e.targetElement.value : e.targetElement.$el || e.targetElement;
|
|
225
|
+
}), T = r(() => e.step === 0), w = r(() => e.step === e.totalSteps), V = r(() => !T.value), K = r(() => [
|
|
227
226
|
{
|
|
228
227
|
text: s("restartTour"),
|
|
229
228
|
handler: () => l("restart"),
|
|
230
|
-
icon:
|
|
229
|
+
icon: ot
|
|
231
230
|
},
|
|
232
231
|
...w.value ? [] : [
|
|
233
232
|
{
|
|
234
233
|
text: "Skip tour",
|
|
235
234
|
handler: () => l("finish"),
|
|
236
|
-
icon:
|
|
235
|
+
icon: gt
|
|
237
236
|
}
|
|
238
237
|
]
|
|
239
|
-
]),
|
|
240
|
-
let
|
|
241
|
-
T.value ?
|
|
242
|
-
const _ = [
|
|
238
|
+
]), M = r(() => {
|
|
239
|
+
let i;
|
|
240
|
+
T.value ? i = e.single ? p.value : d.value : w.value ? i = n.value : i = a.value;
|
|
241
|
+
const _ = [i];
|
|
243
242
|
return T.value && !e.single ? _.push(v.value) : e.action && _.push(e.action), _;
|
|
244
243
|
});
|
|
245
|
-
return
|
|
244
|
+
return L(
|
|
246
245
|
() => e.active,
|
|
247
|
-
async (
|
|
248
|
-
var _,
|
|
249
|
-
|
|
246
|
+
async (i) => {
|
|
247
|
+
var _, $;
|
|
248
|
+
i && ((_ = m.value) != null && _.scrollIntoView) && (($ = m.value) == null || $.scrollIntoView({ behavior: "smooth" }), await Z()), C.value = i, g.value = i;
|
|
250
249
|
},
|
|
251
250
|
{ immediate: !0 }
|
|
252
|
-
), (
|
|
253
|
-
g.value && o(m) ? (u(), S(o(
|
|
251
|
+
), (i, _) => t.active && o(m) ? (u(), b("div", yt, [
|
|
252
|
+
g.value && o(m) ? (u(), S(o(rt), {
|
|
254
253
|
key: 0,
|
|
255
254
|
"target-element": o(m)
|
|
256
255
|
}, null, 8, ["target-element"])) : y("", !0),
|
|
257
|
-
h(o(
|
|
256
|
+
h(o(Y), {
|
|
258
257
|
"target-element": o(m),
|
|
259
258
|
position: t.position,
|
|
260
259
|
open: C.value,
|
|
261
260
|
"aria-label": t.title,
|
|
262
261
|
"fixed-positioning": "",
|
|
263
262
|
class: "b-tutorial-popover",
|
|
264
|
-
onKeydown: _[0] || (_[0] =
|
|
265
|
-
},
|
|
263
|
+
onKeydown: _[0] || (_[0] = z(($) => l("finish"), ["esc", "native"]))
|
|
264
|
+
}, H({
|
|
266
265
|
default: f(() => [
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
St,
|
|
267
|
+
c("div", bt, [
|
|
269
268
|
h(o(B), {
|
|
270
269
|
variant: "title",
|
|
271
270
|
el: "span"
|
|
272
271
|
}, {
|
|
273
272
|
default: f(() => [
|
|
274
|
-
I(
|
|
273
|
+
I(E(t.title), 1)
|
|
275
274
|
]),
|
|
276
275
|
_: 1
|
|
277
276
|
}),
|
|
278
|
-
o(
|
|
277
|
+
o(V) ? (u(), S(o(B), {
|
|
279
278
|
key: 0,
|
|
280
279
|
el: "span",
|
|
281
280
|
class: "b-tutorial-popover__steps"
|
|
282
281
|
}, {
|
|
283
282
|
default: f(() => [
|
|
284
|
-
I(
|
|
283
|
+
I(E(o(s)("stepsOfTotal", { step: t.step, totalSteps: t.totalSteps })), 1)
|
|
285
284
|
]),
|
|
286
285
|
_: 1
|
|
287
286
|
})) : y("", !0)
|
|
288
287
|
]),
|
|
289
288
|
h(o(B), null, {
|
|
290
289
|
default: f(() => [
|
|
291
|
-
|
|
290
|
+
U(i.$slots, "default", {}, void 0, !0)
|
|
292
291
|
]),
|
|
293
292
|
_: 3
|
|
294
293
|
}),
|
|
295
|
-
|
|
296
|
-
o(T) ? y("", !0) : (u(), S(o(
|
|
294
|
+
c("div", Ct, [
|
|
295
|
+
o(T) ? y("", !0) : (u(), S(o(Q), {
|
|
297
296
|
key: 0,
|
|
298
|
-
data: o(
|
|
297
|
+
data: o(K),
|
|
299
298
|
class: "b-tutorial-popover__menu",
|
|
300
299
|
"data-testid": "menu-button"
|
|
301
300
|
}, null, 8, ["data"])),
|
|
302
|
-
|
|
301
|
+
c("div", Tt, [
|
|
303
302
|
h(o(nt), {
|
|
304
|
-
actions: o(
|
|
303
|
+
actions: o(M),
|
|
305
304
|
layout: "buttons-end"
|
|
306
305
|
}, null, 8, ["actions"])
|
|
307
306
|
])
|
|
@@ -312,7 +311,7 @@ const ht = /* @__PURE__ */ k(ut, [["render", gt], ["__scopeId", "data-v-fc5ded40
|
|
|
312
311
|
t.image ? {
|
|
313
312
|
name: "image",
|
|
314
313
|
fn: f(() => [
|
|
315
|
-
h(o(
|
|
314
|
+
h(o(tt), R(t.image, {
|
|
316
315
|
"aspect-ratio": "landscape",
|
|
317
316
|
class: "b-tutorial-popover__image"
|
|
318
317
|
}), null, 16)
|
|
@@ -323,8 +322,8 @@ const ht = /* @__PURE__ */ k(ut, [["render", gt], ["__scopeId", "data-v-fc5ded40
|
|
|
323
322
|
])) : y("", !0);
|
|
324
323
|
}
|
|
325
324
|
});
|
|
326
|
-
const
|
|
327
|
-
...
|
|
325
|
+
const $t = /* @__PURE__ */ k(Et, [["__scopeId", "data-v-dc83a55d"]]), Bt = { class: "b-tutorial" }, It = {}, Kt = /* @__PURE__ */ x({
|
|
326
|
+
...It,
|
|
328
327
|
__name: "tutorial",
|
|
329
328
|
props: {
|
|
330
329
|
/**
|
|
@@ -339,30 +338,30 @@ const Bt = /* @__PURE__ */ k(Et, [["__scopeId", "data-v-dc83a55d"]]), It = { cla
|
|
|
339
338
|
},
|
|
340
339
|
setup(t) {
|
|
341
340
|
const l = t, e = O(0), s = r(() => l.steps.length - 1), v = r(() => s.value === 0);
|
|
342
|
-
function
|
|
341
|
+
function d(a, n) {
|
|
343
342
|
return {
|
|
344
343
|
// Visual
|
|
345
344
|
targetElement: a.target,
|
|
346
345
|
image: a.image,
|
|
347
346
|
title: a.title,
|
|
348
|
-
step:
|
|
347
|
+
step: n,
|
|
349
348
|
totalSteps: s.value,
|
|
350
349
|
action: a.action,
|
|
351
350
|
// Config
|
|
352
|
-
active:
|
|
351
|
+
active: n === e.value,
|
|
353
352
|
single: v.value,
|
|
354
353
|
position: a.position
|
|
355
354
|
};
|
|
356
355
|
}
|
|
357
|
-
return (a,
|
|
358
|
-
(u(!0), b(
|
|
356
|
+
return (a, n) => (u(), b("div", Bt, [
|
|
357
|
+
(u(!0), b(G, null, J(t.steps, (p, C) => (u(), S(o($t), R(d(p, C), {
|
|
359
358
|
key: p.title,
|
|
360
|
-
onFinish:
|
|
361
|
-
onNext:
|
|
362
|
-
onRestart:
|
|
359
|
+
onFinish: n[0] || (n[0] = (g) => e.value = -1),
|
|
360
|
+
onNext: n[1] || (n[1] = (g) => e.value += 1),
|
|
361
|
+
onRestart: n[2] || (n[2] = (g) => e.value = 0)
|
|
363
362
|
}), {
|
|
364
363
|
default: f(() => [
|
|
365
|
-
I(
|
|
364
|
+
I(E(p.description), 1)
|
|
366
365
|
]),
|
|
367
366
|
_: 2
|
|
368
367
|
}, 1040))), 128))
|
|
@@ -370,6 +369,6 @@ const Bt = /* @__PURE__ */ k(Et, [["__scopeId", "data-v-dc83a55d"]]), It = { cla
|
|
|
370
369
|
}
|
|
371
370
|
});
|
|
372
371
|
export {
|
|
373
|
-
|
|
372
|
+
Kt as BentoTutorial
|
|
374
373
|
};
|
|
375
374
|
//# 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\" 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\" fill-rule=\"evenodd\" d=\"M9.51195 0.398918C8.0086 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.70453 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.8888 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4123 12.9178 11.8571L4.14287 3.08218C4.58773 2.73326 5.08025 2.44445 5.60823 2.22576ZM3.0822 4.14283C2.98463 4.26723 2.89158 4.39559 2.80331 4.52769C2.11656 5.5555 1.75 6.76387 1.75 8C1.75 9.65761 2.40848 11.2473 3.58058 12.4194C4.75268 13.5915 6.3424 14.25 8 14.25C9.23613 14.25 10.4445 13.8834 11.4723 13.1967C11.6044 13.1084 11.7328 13.0154 11.8572 12.9178L3.0822 4.14283Z\" clip-rule=\"evenodd\"/></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 scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\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,IACJ;;;;;;;;;;;;;;;;;;;;;ACzDJ,IAAAG,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARmO,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAgkC,aAAA;;;;EAAsF,OAAA;AAAA,EAAW,QAAA;AAAA,EAAY,MAAA;;;;;AAA37C,SAAAC,EAAA,GAAAC,EAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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","../../vue2/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,I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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]}
|
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.9.0",
|
|
4
4
|
"description": "Adyen Bento Vue 3 components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"url": "git@github.com:Adyen/bento.git"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@adyen/bento-design-tokens": "1.
|
|
56
|
-
"@adyen/ui-assets-icons-16": "
|
|
57
|
-
"@adyen/ui-assets-payment-method-icons": "
|
|
55
|
+
"@adyen/bento-design-tokens": "1.9.0",
|
|
56
|
+
"@adyen/ui-assets-icons-16": "4.1.0",
|
|
57
|
+
"@adyen/ui-assets-payment-method-icons": "6.1.0",
|
|
58
58
|
"@codemirror/commands": "6.3.3",
|
|
59
59
|
"@codemirror/language-data": "6.4.0",
|
|
60
60
|
"@codemirror/state": "6.4.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-23e56bf5]{display:inline-flex;flex-shrink:0}svg[data-v-23e56bf5],svg *[data-v-23e56bf5]{fill:currentcolor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-f497be72]{display:inline-flex;flex-shrink:0}svg[data-v-f497be72],svg *[data-v-f497be72]{fill:currentcolor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-50484a8e]{display:inline-flex;flex-shrink:0}svg[data-v-50484a8e],svg *[data-v-50484a8e]{fill:currentcolor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-4687fbd0]{display:inline-flex;flex-shrink:0}svg[data-v-4687fbd0],svg *[data-v-4687fbd0]{fill:currentcolor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-3164242c]{display:inline-flex;flex-shrink:0}svg[data-v-3164242c],svg *[data-v-3164242c]{fill:currentcolor}svg[data-v-132e7234]{display:inline-flex;flex-shrink:0}svg[data-v-132e7234],svg *[data-v-132e7234]{fill:currentcolor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-58c18347]{display:inline-flex;flex-shrink:0}svg[data-v-58c18347],svg *[data-v-58c18347]{fill:currentcolor}svg[data-v-32f5f438]{display:inline-flex;flex-shrink:0}svg[data-v-32f5f438],svg *[data-v-32f5f438]{fill:currentcolor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-d287ffae]{display:inline-flex;flex-shrink:0}svg[data-v-d287ffae],svg *[data-v-d287ffae]{fill:currentcolor}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-7eda5e5d]{display:inline-flex;flex-shrink:0}svg[data-v-7eda5e5d],svg *[data-v-7eda5e5d]{fill:currentcolor}svg[data-v-5b9448a4]{display:inline-flex;flex-shrink:0}svg[data-v-5b9448a4],svg *[data-v-5b9448a4]{fill:currentcolor}
|
package/dist/assets/refresh.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-35088f28]{display:inline-flex;flex-shrink:0}svg[data-v-35088f28],svg *[data-v-35088f28]{fill:currentcolor}
|
package/dist/assets/search.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-493560a7]{display:inline-flex;flex-shrink:0}svg[data-v-493560a7],svg *[data-v-493560a7]{fill:currentcolor}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { openBlock as t, createElementBlock as o, mergeProps as s, toDisplayString as i, createCommentVNode as n, pushScopeId as l, popScopeId as p, createElementVNode as d } from "vue";
|
|
2
|
-
import { _ as c } from "./_plugin-vue_export-helper.dad06003.js";
|
|
3
|
-
import "../assets/arrow-left.css";
|
|
4
|
-
let r = 0;
|
|
5
|
-
const _ = {
|
|
6
|
-
beforeCreate() {
|
|
7
|
-
this.uuid = r.toString(), r += 1;
|
|
8
|
-
}
|
|
9
|
-
}, a = (e) => (l("data-v-23e56bf5"), e = e(), p(), e), C = { key: 0 }, f = /* @__PURE__ */ a(() => /* @__PURE__ */ d("path", {
|
|
10
|
-
fill: "#00112C",
|
|
11
|
-
"fill-rule": "evenodd",
|
|
12
|
-
d: "M6.46998 2.45129L1.46998 7.45129C1.39987 7.52054 1.3443 7.60309 1.30652 7.6941C1.26874 7.78511 1.24952 7.88275 1.24998 7.98129C1.24529 8.03118 1.24529 8.0814 1.24998 8.13129C1.24544 8.17117 1.24544 8.21142 1.24998 8.25129C1.28579 8.35526 1.34778 8.44825 1.42998 8.52129L6.42998 13.5213C6.57187 13.6672 6.7659 13.7507 6.96938 13.7535C7.17285 13.7563 7.36911 13.6782 7.51498 13.5363C7.66085 13.3944 7.74438 13.2004 7.74719 12.9969C7.75001 12.7934 7.67187 12.5972 7.52998 12.4513L3.80998 8.73129H14C14.1989 8.73129 14.3897 8.65228 14.5303 8.51162C14.671 8.37097 14.75 8.18021 14.75 7.98129C14.75 7.78238 14.671 7.59162 14.5303 7.45096C14.3897 7.31031 14.1989 7.23129 14 7.23129L3.80998 7.23129L7.52998 3.51129C7.66246 3.36912 7.73459 3.18107 7.73116 2.98677C7.72773 2.79247 7.64902 2.60709 7.51161 2.46967C7.37419 2.33226 7.18881 2.25355 6.99451 2.25012C6.8002 2.24669 6.61216 2.31881 6.46998 2.45129Z",
|
|
13
|
-
"clip-rule": "evenodd"
|
|
14
|
-
}, null, -1));
|
|
15
|
-
function u(e, m, g, h, v, w) {
|
|
16
|
-
return t(), o("svg", s({ role: "img" }, e.$attrs, {
|
|
17
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
-
width: "16",
|
|
19
|
-
height: "16",
|
|
20
|
-
fill: "none"
|
|
21
|
-
}), [
|
|
22
|
-
e.$attrs["svg-title"] ? (t(), o("title", C, i(e.$attrs["svg-title"]), 1)) : n("", !0),
|
|
23
|
-
f
|
|
24
|
-
], 16);
|
|
25
|
-
}
|
|
26
|
-
const I = /* @__PURE__ */ c(_, [["render", u], ["__scopeId", "data-v-23e56bf5"]]);
|
|
27
|
-
export {
|
|
28
|
-
I as A
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=arrow-left.cdbcc128.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-left.cdbcc128.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/arrow-left.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M6.46998 2.45129L1.46998 7.45129C1.39987 7.52054 1.3443 7.60309 1.30652 7.6941C1.26874 7.78511 1.24952 7.88275 1.24998 7.98129C1.24529 8.03118 1.24529 8.0814 1.24998 8.13129C1.24544 8.17117 1.24544 8.21142 1.24998 8.25129C1.28579 8.35526 1.34778 8.44825 1.42998 8.52129L6.42998 13.5213C6.57187 13.6672 6.7659 13.7507 6.96938 13.7535C7.17285 13.7563 7.36911 13.6782 7.51498 13.5363C7.66085 13.3944 7.74438 13.2004 7.74719 12.9969C7.75001 12.7934 7.67187 12.5972 7.52998 12.4513L3.80998 8.73129H14C14.1989 8.73129 14.3897 8.65228 14.5303 8.51162C14.671 8.37097 14.75 8.18021 14.75 7.98129C14.75 7.78238 14.671 7.59162 14.5303 7.45096C14.3897 7.31031 14.1989 7.23129 14 7.23129L3.80998 7.23129L7.52998 3.51129C7.66246 3.36912 7.73459 3.18107 7.73116 2.98677C7.72773 2.79247 7.64902 2.60709 7.51161 2.46967C7.37419 2.33226 7.18881 2.25355 6.99451 2.25012C6.8002 2.24669 6.61216 2.31881 6.46998 2.45129Z\" clip-rule=\"evenodd\"/></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 scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n"],"names":["uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1","toDisplayString"],"mappings":";;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAu4B,aAAA;;;AAAzlC,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;","x_google_ignoreList":[0]}
|