@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/stepper.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as K, ref as i, computed as a, watch as $, provide as Z, readonly as se, openBlock as d, createElementBlock as S, withDirectives as M, mergeProps as U, unref as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as N, a as
|
|
4
|
-
import { u as
|
|
1
|
+
import { defineComponent as K, ref as i, computed as a, watch as $, provide as Z, readonly as se, openBlock as d, createElementBlock as S, withDirectives as M, mergeProps as U, unref as s, toHandlers as ne, renderSlot as V, createVNode as A, withCtx as x, createTextVNode as j, toDisplayString as P, createCommentVNode as ae, createElementVNode as G, useSlots as oe, inject as le, onMounted as ue, normalizeClass as re, createBlock as z, Fragment as ie, vShow as pe } from "vue";
|
|
2
|
+
import { B as w } from "./chunks/index.75f3672e.js";
|
|
3
|
+
import { B as N, a as ce } from "./chunks/keyboard-navigation.ca47dfa8.js";
|
|
4
|
+
import { u as de } from "./chunks/i18n.6c402773.js";
|
|
5
5
|
import { _ as H } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
6
|
-
import { B as
|
|
7
|
-
import { C as
|
|
8
|
-
import "./assets/
|
|
9
|
-
const
|
|
6
|
+
import { B as ve } from "./chunks/base-button.aa085dfa.js";
|
|
7
|
+
import { C as _e } from "./chunks/checkmark-small.c79220d9.js";
|
|
8
|
+
import "./assets/index43.css";
|
|
9
|
+
const be = (o) => {
|
|
10
10
|
function v(r) {
|
|
11
11
|
return ({ detail: u }) => {
|
|
12
12
|
var e;
|
|
13
13
|
u.preventDefault();
|
|
14
|
-
const p =
|
|
15
|
-
p < 0 || (e =
|
|
14
|
+
const p = o.value.indexOf(document.activeElement);
|
|
15
|
+
p < 0 || (e = o.value[p + r]) == null || e.focus();
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
const l = v(-1), _ = v(1);
|
|
@@ -23,16 +23,16 @@ const me = (s) => {
|
|
|
23
23
|
[N.ARROW_LEFT]: l
|
|
24
24
|
};
|
|
25
25
|
}, L = Symbol("stepper state");
|
|
26
|
-
var D = /* @__PURE__ */ ((
|
|
26
|
+
var D = /* @__PURE__ */ ((o) => (o.LINEAR = "linear", o.NON_LINEAR = "non-linear", o))(D || {}), W = /* @__PURE__ */ ((o) => (o.HORIZONTAL = "horizontal", o.VERTICAL = "vertical", o))(W || {});
|
|
27
27
|
const q = {
|
|
28
28
|
"en-US": {
|
|
29
29
|
step: "Step {currentIndex}/{totalSteps} {content}"
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, fe = { class: "b-stepper" }, me = {
|
|
32
32
|
i18n: { messages: q },
|
|
33
33
|
name: "stepper"
|
|
34
|
-
},
|
|
35
|
-
...
|
|
34
|
+
}, Se = /* @__PURE__ */ K({
|
|
35
|
+
...me,
|
|
36
36
|
props: {
|
|
37
37
|
/**
|
|
38
38
|
* Type of stepper; defines how the stepper should behave. Default: linear
|
|
@@ -59,16 +59,16 @@ const q = {
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
emits: ["update:index"],
|
|
62
|
-
setup(
|
|
63
|
-
const l =
|
|
62
|
+
setup(o, { emit: v }) {
|
|
63
|
+
const l = o, { t: _ } = de({ messages: q }), r = i([]), u = i(l.index), p = i(u.value), e = (t) => {
|
|
64
64
|
t > p.value && (p.value = t), u.value = t;
|
|
65
65
|
}, C = a(() => {
|
|
66
66
|
var t;
|
|
67
67
|
return (t = r.value[u.value]) == null ? void 0 : t.stepContent;
|
|
68
|
-
}), c = a(() => r.value.length), R = a(() => r.value.map(({ buttonElement: t }) => t)),
|
|
68
|
+
}), c = a(() => r.value.length), R = a(() => r.value.map(({ buttonElement: t }) => t)), h = a(() => l.variant === W.HORIZONTAL), b = a(
|
|
69
69
|
() => r.value.map(({ buttonElement: t, substeps: f }, m) => {
|
|
70
70
|
const T = u.value === m;
|
|
71
|
-
return !
|
|
71
|
+
return !h.value && T ? [t].concat(f.map((g) => g.buttonElement)) : [t];
|
|
72
72
|
}).flat()
|
|
73
73
|
), y = (t) => {
|
|
74
74
|
r.value.push({
|
|
@@ -76,7 +76,7 @@ const q = {
|
|
|
76
76
|
buttonElement: t.buttonElement,
|
|
77
77
|
substeps: t.substeps
|
|
78
78
|
});
|
|
79
|
-
},
|
|
79
|
+
}, I = i({
|
|
80
80
|
activeStepIndex: u,
|
|
81
81
|
latestActiveStep: p,
|
|
82
82
|
steps: R,
|
|
@@ -85,64 +85,63 @@ const q = {
|
|
|
85
85
|
navigateToStep: e,
|
|
86
86
|
registerStep: y
|
|
87
87
|
}), B = a(() => ({
|
|
88
|
-
"b-stepper__list--horizontal":
|
|
88
|
+
"b-stepper__list--horizontal": h.value
|
|
89
89
|
}));
|
|
90
90
|
$(() => l.index, e), $(u, (t) => {
|
|
91
91
|
v("update:index", t);
|
|
92
92
|
});
|
|
93
|
-
const O =
|
|
94
|
-
return Z(L, se(
|
|
93
|
+
const O = be(b);
|
|
94
|
+
return Z(L, se(I)), (t, f) => (d(), S("nav", fe, [
|
|
95
95
|
M((d(), S("ol", U({
|
|
96
|
-
class: ["b-stepper__list",
|
|
97
|
-
}, ne(
|
|
98
|
-
|
|
96
|
+
class: ["b-stepper__list", s(B)]
|
|
97
|
+
}, ne(s(O), !0)), [
|
|
98
|
+
V(t.$slots, "default", {}, void 0, !0)
|
|
99
99
|
], 16)), [
|
|
100
|
-
[
|
|
100
|
+
[s(ce)]
|
|
101
101
|
]),
|
|
102
|
-
A(
|
|
102
|
+
A(s(w), {
|
|
103
103
|
el: "span",
|
|
104
104
|
variant: "body",
|
|
105
105
|
stronger: "",
|
|
106
106
|
class: "b-stepper__text-stepper"
|
|
107
107
|
}, {
|
|
108
108
|
default: x(() => [
|
|
109
|
-
j(P(
|
|
109
|
+
j(P(s(_)("step", { currentIndex: u.value + 1, totalSteps: s(c), content: s(C) })), 1)
|
|
110
110
|
]),
|
|
111
111
|
_: 1
|
|
112
112
|
})
|
|
113
113
|
]));
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
|
-
const
|
|
116
|
+
const Ve = /* @__PURE__ */ H(Se, [["__scopeId", "data-v-5197d91f"]]);
|
|
117
117
|
let F = 0;
|
|
118
|
-
const
|
|
118
|
+
const ye = {
|
|
119
119
|
beforeCreate() {
|
|
120
120
|
this.uuid = F.toString(), F += 1;
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, ge = { key: 0 }, xe = /* @__PURE__ */ G("path", {
|
|
123
123
|
fill: "#00112C",
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
return d(), S("svg", U({ role: "img" }, s.$attrs, {
|
|
124
|
+
d: "M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25Z"
|
|
125
|
+
}, null, -1);
|
|
126
|
+
function Ce(o, v, l, _, r, u) {
|
|
127
|
+
return d(), S("svg", U({ role: "img" }, o.$attrs, {
|
|
128
|
+
class: "ui-assets-icons-16",
|
|
130
129
|
xmlns: "http://www.w3.org/2000/svg",
|
|
131
130
|
width: "16",
|
|
132
131
|
height: "16",
|
|
133
132
|
fill: "none"
|
|
134
133
|
}), [
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
o.$attrs["svg-title"] ? (d(), S("title", ge, P(o.$attrs["svg-title"]), 1)) : ae("", !0),
|
|
135
|
+
xe
|
|
137
136
|
], 16);
|
|
138
137
|
}
|
|
139
|
-
const
|
|
138
|
+
const he = /* @__PURE__ */ H(ye, [["render", Ce]]), Ie = {
|
|
140
139
|
ref: "substepList",
|
|
141
140
|
class: "b-step__substep-list"
|
|
142
|
-
},
|
|
141
|
+
}, Ee = {
|
|
143
142
|
name: "step"
|
|
144
|
-
},
|
|
145
|
-
|
|
143
|
+
}, Ne = /* @__PURE__ */ K({
|
|
144
|
+
...Ee,
|
|
146
145
|
props: {
|
|
147
146
|
/**
|
|
148
147
|
* Completed status. Used on non-linear steppers to indicate if the step is completed.
|
|
@@ -160,34 +159,34 @@ const Ne = /* @__PURE__ */ H(xe, [["render", Ee], ["__scopeId", "data-v-750b7c68
|
|
|
160
159
|
}
|
|
161
160
|
},
|
|
162
161
|
emits: ["update:substep-index"],
|
|
163
|
-
setup(
|
|
164
|
-
const l =
|
|
165
|
-
var
|
|
166
|
-
return (
|
|
162
|
+
setup(o, { emit: v }) {
|
|
163
|
+
const l = o, _ = oe(), r = i(null), u = i(null), p = i([]), e = le(L), C = a(() => {
|
|
164
|
+
var n;
|
|
165
|
+
return (n = r.value) == null ? void 0 : n.$el;
|
|
167
166
|
}), c = a(() => e == null ? void 0 : e.value.steps.indexOf(C.value)), R = a(() => {
|
|
168
|
-
var
|
|
169
|
-
return (
|
|
170
|
-
}),
|
|
171
|
-
|
|
172
|
-
}, B = (
|
|
167
|
+
var n;
|
|
168
|
+
return (n = u.value) == null ? void 0 : n.$el.textContent;
|
|
169
|
+
}), h = a(() => p.value.map(({ buttonElement: n }) => n)), b = i(l.substepIndex), y = i(b.value), I = (n) => {
|
|
170
|
+
n > y.value && (y.value = n), b.value = n;
|
|
171
|
+
}, B = (n) => {
|
|
173
172
|
p.value.push({
|
|
174
|
-
stepContent:
|
|
175
|
-
buttonElement:
|
|
176
|
-
substeps:
|
|
173
|
+
stepContent: n.stepContent,
|
|
174
|
+
buttonElement: n.buttonElement,
|
|
175
|
+
substeps: n.substeps
|
|
177
176
|
});
|
|
178
177
|
}, O = i({
|
|
179
178
|
activeStepIndex: b,
|
|
180
179
|
latestActiveStep: y,
|
|
181
180
|
type: e.value.type,
|
|
182
181
|
variant: e.value.variant,
|
|
183
|
-
steps:
|
|
182
|
+
steps: h,
|
|
184
183
|
isParentStep: !0,
|
|
185
|
-
navigateToStep:
|
|
184
|
+
navigateToStep: I,
|
|
186
185
|
registerStep: B
|
|
187
186
|
});
|
|
188
|
-
Z(L, O), $(() => l.substepIndex,
|
|
189
|
-
v("update:substep-index",
|
|
190
|
-
}),
|
|
187
|
+
Z(L, O), $(() => l.substepIndex, I), $(b, (n) => {
|
|
188
|
+
v("update:substep-index", n);
|
|
189
|
+
}), ue(() => {
|
|
191
190
|
if (!e)
|
|
192
191
|
throw new Error(
|
|
193
192
|
"BentoStep components should only be used inside BentoStepper or other BentoStep components."
|
|
@@ -209,24 +208,24 @@ const Ne = /* @__PURE__ */ H(xe, [["render", Ee], ["__scopeId", "data-v-750b7c68
|
|
|
209
208
|
"b-step--completed": k.value,
|
|
210
209
|
"b-step--substep": t.value
|
|
211
210
|
}));
|
|
212
|
-
return (
|
|
213
|
-
class:
|
|
211
|
+
return (n, E) => (d(), S("li", {
|
|
212
|
+
class: re([s(ee), "b-step"])
|
|
214
213
|
}, [
|
|
215
|
-
A(
|
|
214
|
+
A(s(ve), {
|
|
216
215
|
ref_key: "buttonComponent",
|
|
217
216
|
ref: r,
|
|
218
|
-
"aria-current":
|
|
219
|
-
"aria-disabled":
|
|
217
|
+
"aria-current": s(Q),
|
|
218
|
+
"aria-disabled": s(X),
|
|
220
219
|
class: "b-step__button",
|
|
221
220
|
type: "button",
|
|
222
|
-
tabindex:
|
|
223
|
-
disabled:
|
|
221
|
+
tabindex: s(Y),
|
|
222
|
+
disabled: s(g),
|
|
224
223
|
onClick: J,
|
|
225
224
|
onFocus: E[0] || (E[0] = (te) => f.value = !0),
|
|
226
225
|
onBlur: E[1] || (E[1] = (te) => f.value = !1)
|
|
227
226
|
}, {
|
|
228
227
|
iconLeft: x(() => [
|
|
229
|
-
A(
|
|
228
|
+
A(s(w), {
|
|
230
229
|
el: "span",
|
|
231
230
|
variant: "body",
|
|
232
231
|
stronger: "",
|
|
@@ -234,42 +233,42 @@ const Ne = /* @__PURE__ */ H(xe, [["render", Ee], ["__scopeId", "data-v-750b7c68
|
|
|
234
233
|
"aria-hidden": "true"
|
|
235
234
|
}, {
|
|
236
235
|
default: x(() => [
|
|
237
|
-
|
|
238
|
-
j(P(
|
|
236
|
+
s(k) ? (d(), z(s(_e), { key: 0 })) : s(t) ? (d(), z(s(he), { key: 2 })) : (d(), S(ie, { key: 1 }, [
|
|
237
|
+
j(P(s(c) + 1), 1)
|
|
239
238
|
], 64))
|
|
240
239
|
]),
|
|
241
240
|
_: 1
|
|
242
241
|
})
|
|
243
242
|
]),
|
|
244
243
|
default: x(() => [
|
|
245
|
-
A(
|
|
244
|
+
A(s(w), {
|
|
246
245
|
ref_key: "stepContent",
|
|
247
246
|
ref: u,
|
|
248
247
|
el: "span",
|
|
249
248
|
variant: "body",
|
|
250
|
-
stronger:
|
|
249
|
+
stronger: s(m),
|
|
251
250
|
class: "b-step__content"
|
|
252
251
|
}, {
|
|
253
252
|
default: x(() => [
|
|
254
|
-
|
|
253
|
+
V(n.$slots, "default", {}, void 0, !0)
|
|
255
254
|
]),
|
|
256
255
|
_: 3
|
|
257
256
|
}, 8, ["stronger"])
|
|
258
257
|
]),
|
|
259
258
|
_: 3
|
|
260
259
|
}, 8, ["aria-current", "aria-disabled", "tabindex", "disabled"]),
|
|
261
|
-
M(G("ul",
|
|
262
|
-
|
|
260
|
+
M(G("ul", Ie, [
|
|
261
|
+
V(n.$slots, "substeps", {}, void 0, !0)
|
|
263
262
|
], 512), [
|
|
264
|
-
[
|
|
263
|
+
[pe, s(T)]
|
|
265
264
|
])
|
|
266
265
|
], 2));
|
|
267
266
|
}
|
|
268
267
|
});
|
|
269
|
-
const
|
|
268
|
+
const we = /* @__PURE__ */ H(Ne, [["__scopeId", "data-v-8874f961"]]);
|
|
270
269
|
export {
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
we as BentoStep,
|
|
271
|
+
Ve as BentoStepper,
|
|
273
272
|
D as BentoStepperTypeOption,
|
|
274
273
|
W as BentoStepperVariantOption
|
|
275
274
|
};
|
package/dist/stepper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.js","sources":["../../vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.ts","../../vue2/src/components/stepper/stepper.keys.ts","../../vue2/src/components/stepper/stepper.types.ts","../../vue2/src/components/stepper/stepper.vue","../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/dot.vue","../../vue2/src/components/stepper/components/step/step.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types';\n\n/**\n * Returns keyboard navigation's event handlers to navigate through the steps\n *\n * @param steps the list of bento-steps DOM elements to focus on the navigation\n * @returns\n */\nexport const useKeyboardNavigation = (steps: Ref<HTMLButtonElement[]>) => {\n // Returns the event handler that moves the focus on a given step offset\n function focusOnStep(indexOffset: number) {\n return ({ detail: event }) => {\n event.preventDefault();\n\n const currentIndex = steps.value.indexOf(document.activeElement as HTMLButtonElement);\n if (currentIndex < 0) {\n return;\n }\n\n steps.value[currentIndex + indexOffset]?.focus();\n };\n }\n\n const focusOnPreviousStep = focusOnStep(-1);\n const focusOnNextStep = focusOnStep(1);\n\n return {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: focusOnPreviousStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT]: focusOnPreviousStep,\n };\n};\n","import type { InjectionKey } from 'vue';\n\nimport type { BentoStepperState } from './stepper.types';\n\nexport const STEPPER_STATE = Symbol('stepper state') as InjectionKey<BentoStepperState>;\n","import type { ComputedRef, Ref } from 'vue';\n\nexport enum BentoStepperTypeOption {\n LINEAR = 'linear',\n NON_LINEAR = 'non-linear',\n}\n\nexport enum BentoStepperVariantOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoStepperStepExposeState {\n buttonElement: HTMLButtonElement | Ref<HTMLButtonElement>;\n substeps: BentoStepperStepExposeState[] | Ref<BentoStepperStepExposeState[]>;\n stepContent: string | ComputedRef<string>;\n}\n\nexport type BentoStepperState = Ref<{\n activeStepIndex: number;\n latestActiveStep: number;\n type: `${BentoStepperTypeOption}`;\n variant: `${BentoStepperVariantOption}`;\n steps: HTMLElement[];\n isParentStep?: boolean;\n navigateToStep: (index: number) => void;\n registerStep: (stepState: BentoStepperStepExposeState) => void;\n}>;\n","<template>\n <nav class=\"b-stepper\">\n <ol\n v-bento-keyboard-navigation-directive\n class=\"b-stepper__list\"\n :class=\"conditionalClasses\"\n v-on=\"keyboardNavigationListeners\"\n >\n <slot></slot>\n </ol>\n\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-stepper__text-stepper\"\n >{{\n t('step', { currentIndex: activeStepIndex + 1, totalSteps: stepsAmount, content: currentStepContent })\n }}\n </bento-typography>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n\n import { computed, PropType, provide, readonly, ref, watch } from 'vue';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import { useKeyboardNavigation } from './composables/useKeyboardNavigation/useKeyboardNavigation';\n import { useI18n } from '@/utils/ts/i18n';\n\n import { STEPPER_STATE } from './stepper.keys';\n import {\n BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from './stepper.types';\n\n import messages from './messages.json';\n\n const props = defineProps({\n /**\n * Type of stepper; defines how the stepper should behave. Default: linear\n * @values linear, non-linear\n */\n type: {\n type: String as PropType<`${BentoStepperTypeOption}`>,\n default: 'linear',\n },\n /**\n * Stepper variant; defines how the stepper should be displayed. Default: vertical\n * @values vertical, horizontal\n */\n variant: {\n type: String as PropType<`${BentoStepperVariantOption}`>,\n default: 'vertical',\n },\n /**\n * Active step index\n */\n index: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when step is updated by the stepper\n */\n (e: 'update:index', index: number): void;\n }>();\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<BentoStepperStepExposeState[]>([]);\n const activeStepIndex = ref(props.index);\n const latestActiveStep = ref(activeStepIndex.value);\n\n const navigateToStep = (index: number) => {\n // Stores latest active step index so users can navigate backwards and forwards on linear stepper\n if (index > latestActiveStep.value) {\n latestActiveStep.value = index;\n }\n activeStepIndex.value = index;\n };\n\n const currentStepContent = computed(() => childrenSteps.value[activeStepIndex.value]?.stepContent);\n const stepsAmount = computed(() => childrenSteps.value.length);\n const childrenStepsElements = computed(() => childrenSteps.value.map(({ buttonElement }) => buttonElement));\n const isHorizontalVariant = computed(() => props.variant === BentoStepperVariantOption.HORIZONTAL);\n\n // List of all visible steps nested on the stepper, including the substeps of the children steps\n // Flattening the steps on a single list makes the keyboard navigation easier to be handled\n const allVisibleStepsElements = computed(() =>\n childrenSteps.value\n .map(({ buttonElement, substeps }, index) => {\n const isStepActive = activeStepIndex.value === index;\n const isSubstepsVisible = !isHorizontalVariant.value && isStepActive;\n\n if (!isSubstepsVisible) {\n return [buttonElement];\n }\n\n return [buttonElement].concat(substeps.map(step => step.buttonElement));\n })\n .flat()\n );\n\n // Maps BentoStep children components whenever the DOM is updated to keep track of steps indexes\n const registerStep = (stepState: BentoStepperStepExposeState) => {\n childrenSteps.value.push({\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as BentoStepperStepExposeState[],\n });\n };\n\n const stepperState: BentoStepperState = ref({\n activeStepIndex,\n latestActiveStep,\n steps: childrenStepsElements,\n type: props.type,\n variant: props.variant,\n navigateToStep,\n registerStep,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-stepper__list--horizontal': isHorizontalVariant.value,\n }));\n\n watch(() => props.index, navigateToStep);\n watch(activeStepIndex, index => {\n emit('update:index', index);\n });\n\n const keyboardNavigationListeners = useKeyboardNavigation(allVisibleStepsElements);\n\n // Provides stepper state to BentoStep children components\n provide(STEPPER_STATE, readonly(stepperState));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steppers break down complex processes into manageable steps to guide users through a sequential or multi-step process.\n *\n * @example\n * import { BentoStep, BentoStepper } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep, BentoStepper },\n * template: `\n * <bento-stepper :index=\"1\">\n * <bento-step>Step 1</bento-step>\n * <bento-step>Step 2</bento-step>\n * <bento-step>Step 3</bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n i18n: { messages },\n name: 'stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.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><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25Z\" 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","<template>\n <li :class=\"conditionalClasses\" class=\"b-step\">\n <base-button\n ref=\"buttonComponent\"\n :aria-current=\"ariaCurrentValue\"\n :aria-disabled=\"ariaDisabledValue\"\n class=\"b-step__button\"\n type=\"button\"\n :tabindex=\"tabIndexValue\"\n :disabled=\"isDisabled\"\n @click=\"navigateToStep\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n >\n <template #iconLeft>\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-step__index\" aria-hidden=\"true\">\n <checkmark-small-icon v-if=\"isCompleted\" />\n <template v-else-if=\"!isSubstep\">{{ index + 1 }}</template>\n <dot-icon v-else />\n </bento-typography>\n </template>\n\n <bento-typography ref=\"stepContent\" el=\"span\" variant=\"body\" :stronger=\"isActive\" class=\"b-step__content\">\n <slot></slot>\n </bento-typography>\n </base-button>\n\n <ul v-show=\"isSubstepsVisible\" ref=\"substepList\" class=\"b-step__substep-list\">\n <slot name=\"substeps\"></slot>\n </ul>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onMounted, provide, ref, useSlots, watch } from 'vue';\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n\n import { STEPPER_STATE } from '../../stepper.keys';\n import {\n BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { Booleanish } from '@/types';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Completed status. Used on non-linear steppers to indicate if the step is completed.\n */\n completed: {\n type: Boolean,\n default: false,\n },\n /**\n * Active substep index\n */\n substepIndex: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when substep is updated by the parent step\n */\n (e: 'update:substep-index', index: number): void;\n }>();\n\n // Element refs\n const buttonComponent = ref<InstanceType<typeof BaseButton> | null>(null);\n const stepContent = ref<InstanceType<typeof BentoTypography> | null>(null);\n const substeps = ref<BentoStepperStepExposeState[]>([]);\n\n // Injects parent BentoStepper state data\n const stepper = inject(STEPPER_STATE);\n\n const buttonElement = computed(() => buttonComponent.value?.$el as HTMLButtonElement);\n const index = computed(() => stepper?.value.steps.indexOf(buttonElement.value));\n\n const stepContentValue = computed(() => stepContent.value?.$el.textContent);\n\n // Substep logic\n const substepsButtonElements = computed(() => substeps.value.map(({ buttonElement }) => buttonElement));\n\n const activeSubStepIndex = ref(props.substepIndex);\n const latestActiveSubStepIndex = ref(activeSubStepIndex.value);\n\n const navigateToSubstep = (value: number) => {\n if (value > latestActiveSubStepIndex.value) {\n latestActiveSubStepIndex.value = value;\n }\n\n activeSubStepIndex.value = value;\n };\n\n const registerSubstep = (stepState: BentoStepperStepExposeState) => {\n substeps.value.push({\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as BentoStepperStepExposeState[],\n });\n };\n\n const stepState: BentoStepperState = ref({\n activeStepIndex: activeSubStepIndex,\n latestActiveStep: latestActiveSubStepIndex,\n type: stepper.value.type,\n variant: stepper.value.variant,\n steps: substepsButtonElements,\n isParentStep: true,\n navigateToStep: navigateToSubstep,\n registerStep: registerSubstep,\n });\n\n provide(STEPPER_STATE, stepState);\n\n watch(() => props.substepIndex, navigateToSubstep);\n watch(activeSubStepIndex, value => {\n emit('update:substep-index', value);\n });\n\n onMounted(() => {\n if (!stepper) {\n throw new Error(\n 'BentoStep components should only be used inside BentoStepper or other BentoStep components.'\n );\n }\n\n stepper.value.registerStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n // Step states\n const isSubstep = computed(() => stepper.value.isParentStep);\n const isFocused = ref(false);\n const isActive = computed(() => stepper?.value.activeStepIndex === index.value);\n const isSubstepsVisible = computed(\n () =>\n isActive.value &&\n stepper.value.variant !== BentoStepperVariantOption.HORIZONTAL &&\n !isSubstep.value &&\n slots.substeps\n );\n const isCompleted = computed(() => {\n if (stepper?.value.type === BentoStepperTypeOption.NON_LINEAR) {\n return props.completed;\n }\n\n return stepper?.value.latestActiveStep > index.value;\n });\n const isDisabled = computed(\n () => stepper?.value.type === BentoStepperTypeOption.LINEAR && index.value > stepper?.value.latestActiveStep\n );\n\n const navigateToStep = () => {\n if (isDisabled.value) {\n return;\n }\n\n stepper.value.navigateToStep(index.value);\n };\n\n // Styling and a11y\n const ariaCurrentValue = computed(() => (isActive.value ? 'step' : ('false' as Booleanish)));\n const ariaDisabledValue = computed(() => isDisabled.value.toString() as Booleanish);\n const tabIndexValue = computed(() => (isFocused.value || (index.value === 0 && !isSubstep.value) ? '0' : '-1'));\n\n const conditionalClasses = computed(() => ({\n 'b-step--active': isActive.value,\n 'b-step--completed': isCompleted.value,\n 'b-step--substep': isSubstep.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steps are components placed inside BentoSteppers to break down complex processes\n *\n * @example\n * import { BentoStep } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep },\n * template: `\n * <bento-stepper>\n * <bento-step>Step 1</bento-step>\n * <bento-step>\n * Step 2\n * <template #substeps>\n * <bento-step>Substep 1</bento-step>\n * <bento-step>Substep 2</bento-step>\n * </template>\n * </bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n name: 'step',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./step.scss\" />\n"],"names":["useKeyboardNavigation","steps","focusOnStep","indexOffset","event","currentIndex","_a","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","useI18n","childrenSteps","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","step","registerStep","stepState","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","registerSubstep","stepState2","onMounted","isSubstep","isFocused","isActive","isSubstepsVisible","isCompleted","isDisabled","ariaCurrentValue","ariaDisabledValue","tabIndexValue"],"mappings":";;;;;;;;AAUa,MAAAA,KAAA,CAAAC,MAAA;AAET,WAAAC,EAAAC,GAAA;AACI,WAAA,CAAA,EAAA,QAAAC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EAAA,MAAA+C,EAAA,MAAA,SAAA,CAAA,GACAG,IAAAlD,EAAA,MAAA2C,EAAA,SAAA7C,EAAA,UAAA,KAAA,CAAA4C,EAAA,QAAA,MAAA,IAAA,GAEA9B,KAAAZ,EAAA,OAAA;AAAA,MAA2C,kBAAA4C,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[4]}
|
|
1
|
+
{"version":3,"file":"stepper.js","sources":["../../vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.ts","../../vue2/src/components/stepper/stepper.keys.ts","../../vue2/src/components/stepper/stepper.types.ts","../../vue2/src/components/stepper/stepper.vue","../../vue2/node_modules/@adyen/ui-assets-icons-16/dist/vue/dot.vue","../../vue2/src/components/stepper/components/step/step.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types';\n\n/**\n * Returns keyboard navigation's event handlers to navigate through the steps\n *\n * @param steps the list of bento-steps DOM elements to focus on the navigation\n * @returns\n */\nexport const useKeyboardNavigation = (steps: Ref<HTMLButtonElement[]>) => {\n // Returns the event handler that moves the focus on a given step offset\n function focusOnStep(indexOffset: number) {\n return ({ detail: event }) => {\n event.preventDefault();\n\n const currentIndex = steps.value.indexOf(document.activeElement as HTMLButtonElement);\n if (currentIndex < 0) {\n return;\n }\n\n steps.value[currentIndex + indexOffset]?.focus();\n };\n }\n\n const focusOnPreviousStep = focusOnStep(-1);\n const focusOnNextStep = focusOnStep(1);\n\n return {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: focusOnPreviousStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT]: focusOnPreviousStep,\n };\n};\n","import type { InjectionKey } from 'vue';\n\nimport type { BentoStepperState } from './stepper.types';\n\nexport const STEPPER_STATE = Symbol('stepper state') as InjectionKey<BentoStepperState>;\n","import type { ComputedRef, Ref } from 'vue';\n\nexport enum BentoStepperTypeOption {\n LINEAR = 'linear',\n NON_LINEAR = 'non-linear',\n}\n\nexport enum BentoStepperVariantOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoStepperStepExposeState {\n buttonElement: HTMLButtonElement | Ref<HTMLButtonElement>;\n substeps: BentoStepperStepExposeState[] | Ref<BentoStepperStepExposeState[]>;\n stepContent: string | ComputedRef<string>;\n}\n\nexport type BentoStepperState = Ref<{\n activeStepIndex: number;\n latestActiveStep: number;\n type: `${BentoStepperTypeOption}`;\n variant: `${BentoStepperVariantOption}`;\n steps: HTMLElement[];\n isParentStep?: boolean;\n navigateToStep: (index: number) => void;\n registerStep: (stepState: BentoStepperStepExposeState) => void;\n}>;\n","<template>\n <nav class=\"b-stepper\">\n <ol\n v-bento-keyboard-navigation-directive\n class=\"b-stepper__list\"\n :class=\"conditionalClasses\"\n v-on=\"keyboardNavigationListeners\"\n >\n <slot></slot>\n </ol>\n\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-stepper__text-stepper\"\n >{{\n t('step', { currentIndex: activeStepIndex + 1, totalSteps: stepsAmount, content: currentStepContent })\n }}\n </bento-typography>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n\n import { computed, PropType, provide, readonly, ref, watch } from 'vue';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import { useKeyboardNavigation } from './composables/useKeyboardNavigation/useKeyboardNavigation';\n import { useI18n } from '@/utils/ts/i18n';\n\n import { STEPPER_STATE } from './stepper.keys';\n import {\n BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from './stepper.types';\n\n import messages from './messages.json';\n\n const props = defineProps({\n /**\n * Type of stepper; defines how the stepper should behave. Default: linear\n * @values linear, non-linear\n */\n type: {\n type: String as PropType<`${BentoStepperTypeOption}`>,\n default: 'linear',\n },\n /**\n * Stepper variant; defines how the stepper should be displayed. Default: vertical\n * @values vertical, horizontal\n */\n variant: {\n type: String as PropType<`${BentoStepperVariantOption}`>,\n default: 'vertical',\n },\n /**\n * Active step index\n */\n index: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when step is updated by the stepper\n */\n (e: 'update:index', index: number): void;\n }>();\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<BentoStepperStepExposeState[]>([]);\n const activeStepIndex = ref(props.index);\n const latestActiveStep = ref(activeStepIndex.value);\n\n const navigateToStep = (index: number) => {\n // Stores latest active step index so users can navigate backwards and forwards on linear stepper\n if (index > latestActiveStep.value) {\n latestActiveStep.value = index;\n }\n activeStepIndex.value = index;\n };\n\n const currentStepContent = computed(() => childrenSteps.value[activeStepIndex.value]?.stepContent);\n const stepsAmount = computed(() => childrenSteps.value.length);\n const childrenStepsElements = computed(() => childrenSteps.value.map(({ buttonElement }) => buttonElement));\n const isHorizontalVariant = computed(() => props.variant === BentoStepperVariantOption.HORIZONTAL);\n\n // List of all visible steps nested on the stepper, including the substeps of the children steps\n // Flattening the steps on a single list makes the keyboard navigation easier to be handled\n const allVisibleStepsElements = computed(() =>\n childrenSteps.value\n .map(({ buttonElement, substeps }, index) => {\n const isStepActive = activeStepIndex.value === index;\n const isSubstepsVisible = !isHorizontalVariant.value && isStepActive;\n\n if (!isSubstepsVisible) {\n return [buttonElement];\n }\n\n return [buttonElement].concat(substeps.map(step => step.buttonElement));\n })\n .flat()\n );\n\n // Maps BentoStep children components whenever the DOM is updated to keep track of steps indexes\n const registerStep = (stepState: BentoStepperStepExposeState) => {\n childrenSteps.value.push({\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as BentoStepperStepExposeState[],\n });\n };\n\n const stepperState: BentoStepperState = ref({\n activeStepIndex,\n latestActiveStep,\n steps: childrenStepsElements,\n type: props.type,\n variant: props.variant,\n navigateToStep,\n registerStep,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-stepper__list--horizontal': isHorizontalVariant.value,\n }));\n\n watch(() => props.index, navigateToStep);\n watch(activeStepIndex, index => {\n emit('update:index', index);\n });\n\n const keyboardNavigationListeners = useKeyboardNavigation(allVisibleStepsElements);\n\n // Provides stepper state to BentoStep children components\n provide(STEPPER_STATE, readonly(stepperState));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steppers break down complex processes into manageable steps to guide users through a sequential or multi-step process.\n *\n * @example\n * import { BentoStep, BentoStepper } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep, BentoStepper },\n * template: `\n * <bento-stepper :index=\"1\">\n * <bento-step>Step 1</bento-step>\n * <bento-step>Step 2</bento-step>\n * <bento-step>Step 3</bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n i18n: { messages },\n name: 'stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.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><path fill=\"#00112C\" d=\"M8 5.25C6.48122 5.25 5.25 6.48122 5.25 8C5.25 9.51878 6.48122 10.75 8 10.75C9.51878 10.75 10.75 9.51878 10.75 8C10.75 6.48122 9.51878 5.25 8 5.25Z\"/></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 <li :class=\"conditionalClasses\" class=\"b-step\">\n <base-button\n ref=\"buttonComponent\"\n :aria-current=\"ariaCurrentValue\"\n :aria-disabled=\"ariaDisabledValue\"\n class=\"b-step__button\"\n type=\"button\"\n :tabindex=\"tabIndexValue\"\n :disabled=\"isDisabled\"\n @click=\"navigateToStep\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n >\n <template #iconLeft>\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-step__index\" aria-hidden=\"true\">\n <checkmark-small-icon v-if=\"isCompleted\" />\n <template v-else-if=\"!isSubstep\">{{ index + 1 }}</template>\n <dot-icon v-else />\n </bento-typography>\n </template>\n\n <bento-typography ref=\"stepContent\" el=\"span\" variant=\"body\" :stronger=\"isActive\" class=\"b-step__content\">\n <slot></slot>\n </bento-typography>\n </base-button>\n\n <ul v-show=\"isSubstepsVisible\" ref=\"substepList\" class=\"b-step__substep-list\">\n <slot name=\"substeps\"></slot>\n </ul>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onMounted, provide, ref, useSlots, watch } from 'vue';\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n\n import { STEPPER_STATE } from '../../stepper.keys';\n import {\n BentoStepperState,\n BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { Booleanish } from '@/types';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Completed status. Used on non-linear steppers to indicate if the step is completed.\n */\n completed: {\n type: Boolean,\n default: false,\n },\n /**\n * Active substep index\n */\n substepIndex: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event triggered when substep is updated by the parent step\n */\n (e: 'update:substep-index', index: number): void;\n }>();\n\n // Element refs\n const buttonComponent = ref<InstanceType<typeof BaseButton> | null>(null);\n const stepContent = ref<InstanceType<typeof BentoTypography> | null>(null);\n const substeps = ref<BentoStepperStepExposeState[]>([]);\n\n // Injects parent BentoStepper state data\n const stepper = inject(STEPPER_STATE);\n\n const buttonElement = computed(() => buttonComponent.value?.$el as HTMLButtonElement);\n const index = computed(() => stepper?.value.steps.indexOf(buttonElement.value));\n\n const stepContentValue = computed(() => stepContent.value?.$el.textContent);\n\n // Substep logic\n const substepsButtonElements = computed(() => substeps.value.map(({ buttonElement }) => buttonElement));\n\n const activeSubStepIndex = ref(props.substepIndex);\n const latestActiveSubStepIndex = ref(activeSubStepIndex.value);\n\n const navigateToSubstep = (value: number) => {\n if (value > latestActiveSubStepIndex.value) {\n latestActiveSubStepIndex.value = value;\n }\n\n activeSubStepIndex.value = value;\n };\n\n const registerSubstep = (stepState: BentoStepperStepExposeState) => {\n substeps.value.push({\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as BentoStepperStepExposeState[],\n });\n };\n\n const stepState: BentoStepperState = ref({\n activeStepIndex: activeSubStepIndex,\n latestActiveStep: latestActiveSubStepIndex,\n type: stepper.value.type,\n variant: stepper.value.variant,\n steps: substepsButtonElements,\n isParentStep: true,\n navigateToStep: navigateToSubstep,\n registerStep: registerSubstep,\n });\n\n provide(STEPPER_STATE, stepState);\n\n watch(() => props.substepIndex, navigateToSubstep);\n watch(activeSubStepIndex, value => {\n emit('update:substep-index', value);\n });\n\n onMounted(() => {\n if (!stepper) {\n throw new Error(\n 'BentoStep components should only be used inside BentoStepper or other BentoStep components.'\n );\n }\n\n stepper.value.registerStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n // Step states\n const isSubstep = computed(() => stepper.value.isParentStep);\n const isFocused = ref(false);\n const isActive = computed(() => stepper?.value.activeStepIndex === index.value);\n const isSubstepsVisible = computed(\n () =>\n isActive.value &&\n stepper.value.variant !== BentoStepperVariantOption.HORIZONTAL &&\n !isSubstep.value &&\n slots.substeps\n );\n const isCompleted = computed(() => {\n if (stepper?.value.type === BentoStepperTypeOption.NON_LINEAR) {\n return props.completed;\n }\n\n return stepper?.value.latestActiveStep > index.value;\n });\n const isDisabled = computed(\n () => stepper?.value.type === BentoStepperTypeOption.LINEAR && index.value > stepper?.value.latestActiveStep\n );\n\n const navigateToStep = () => {\n if (isDisabled.value) {\n return;\n }\n\n stepper.value.navigateToStep(index.value);\n };\n\n // Styling and a11y\n const ariaCurrentValue = computed(() => (isActive.value ? 'step' : ('false' as Booleanish)));\n const ariaDisabledValue = computed(() => isDisabled.value.toString() as Booleanish);\n const tabIndexValue = computed(() => (isFocused.value || (index.value === 0 && !isSubstep.value) ? '0' : '-1'));\n\n const conditionalClasses = computed(() => ({\n 'b-step--active': isActive.value,\n 'b-step--completed': isCompleted.value,\n 'b-step--substep': isSubstep.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steps are components placed inside BentoSteppers to break down complex processes\n *\n * @example\n * import { BentoStep } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep },\n * template: `\n * <bento-stepper>\n * <bento-step>Step 1</bento-step>\n * <bento-step>\n * Step 2\n * <template #substeps>\n * <bento-step>Substep 1</bento-step>\n * <bento-step>Substep 2</bento-step>\n * </template>\n * </bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n name: 'step',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./step.scss\" />\n"],"names":["useKeyboardNavigation","steps","focusOnStep","indexOffset","event","currentIndex","_a","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","useI18n","childrenSteps","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","step","registerStep","stepState","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","registerSubstep","stepState2","onMounted","isSubstep","isFocused","isActive","isSubstepsVisible","isCompleted","isDisabled","ariaCurrentValue","ariaDisabledValue","tabIndexValue"],"mappings":";;;;;;;;AAUa,MAAAA,KAAA,CAAAC,MAAA;AAET,WAAAC,EAAAC,GAAA;AACI,WAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;;AACI,MAAAA,EAAA,eAAA;AAEA,YAAAC,IAAAJ,EAAA,MAAA,QAAA,SAAA,aAAA;AACA,MAAAI,IAAA,MAIAC,IAAAL,EAAA,MAAAI,IAAAF,CAAA,MAAA,QAAAG,EAAA;AAAA,IAA+C;AAAA,EACnD;AAGJ,QAAAC,IAAAL,EAAA,EAAA,GACAM,IAAAN,EAAA,CAAA;AAEA,SAAA;AAAA,IAAO,CAAAO,EAAA,UAAA,GAAAD;AAAA,IAC+C,CAAAC,EAAA,WAAA,GAAAD;AAAA,IACC,CAAAC,EAAA,QAAA,GAAAF;AAAA,IACH,CAAAE,EAAA,UAAA,GAAAF;AAAA,EACE;AAE1D,GC9BaG,IAAA,OAAA,eAAA;ACFD,IAAAC,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,aAAA,cAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;gCC0JRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA5FA,EAAA,GAAAC,EAAA,IAAAC,GAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,EAAA,CAAA,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AAA,gBAAAA,EAAA,MAAA,oBAAAhC,EAAA,KAA+C,GAEnDiD,IAAA/C;AAAA,MAAmB,OAAA8B,KAAA,gBAAAA,EAAA,MAAA,UAAA9C,EAAA,UAAAc,EAAA,SAAAgC,KAAA,gBAAAA,EAAA,MAAA;AAAA,IAC6E,GAGhGjC,IAAA,MAAA;AACI,MAAAkD,EAAA,SAIAjB,EAAA,MAAA,eAAAhC,EAAA,KAAA;AAAA,IAAwC,GAI5CkD,IAAAhD,EAAA,MAAA4C,EAAA,QAAA,SAAA,OAAA,GACAK,IAAAjD,EAAA,MAAA+C,EAAA,MAAA,SAAA,CAAA,GACAG,IAAAlD,EAAA,MAAA2C,EAAA,SAAA7C,EAAA,UAAA,KAAA,CAAA4C,EAAA,QAAA,MAAA,IAAA,GAEA9B,KAAAZ,EAAA,OAAA;AAAA,MAA2C,kBAAA4C,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[4]}
|
package/dist/structured-list.js
CHANGED
package/dist/summary-grid.js
CHANGED
|
@@ -6,8 +6,8 @@ import { _ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
|
6
6
|
import { BentoInfoIcon as Y } from "./info-icon.js";
|
|
7
7
|
import { B as W, a as V } from "./chunks/index.75f3672e.js";
|
|
8
8
|
import { BentoTag as X, BentoTagVariant as L } from "./tag.js";
|
|
9
|
-
import { C as F } from "./chunks/copy.
|
|
10
|
-
import "./assets/
|
|
9
|
+
import { C as F } from "./chunks/copy.330d594e.js";
|
|
10
|
+
import "./assets/index28.css";
|
|
11
11
|
const H = S({
|
|
12
12
|
name: "bento-summary-grid",
|
|
13
13
|
components: { GridLayout: U },
|
package/dist/tabs.js
CHANGED
|
@@ -3,8 +3,8 @@ import { E as q, T as $, a as B } from "./chunks/tabs.keys.358742f2.js";
|
|
|
3
3
|
import { _ as K } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
4
4
|
import { B as z } from "./chunks/index.75f3672e.js";
|
|
5
5
|
import { g as P } from "./chunks/unique-id.a2a2b458.js";
|
|
6
|
-
import { F as H } from "./chunks/fixed-scroller.
|
|
7
|
-
import "./assets/
|
|
6
|
+
import { F as H } from "./chunks/fixed-scroller.bced60dd.js";
|
|
7
|
+
import "./assets/index29.css";
|
|
8
8
|
const M = w({
|
|
9
9
|
props: {
|
|
10
10
|
/**
|
package/dist/tag.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as d, computed as o, resolveComponent as p, resolveDirective as m, withDirectives as _, openBlock as b, createElementBlock as v, normalizeClass as f, createVNode as g, withCtx as h, createTextVNode as y, toDisplayString as E } from "vue";
|
|
2
2
|
import { B as C } from "./chunks/index.75f3672e.js";
|
|
3
|
-
import { b as S } from "./chunks/tooltip.
|
|
3
|
+
import { b as S } from "./chunks/tooltip.27c32d36.js";
|
|
4
4
|
import { u as x } from "./chunks/aria-label.ac9651a5.js";
|
|
5
5
|
import { g as c } from "./chunks/get-slot-text.bead058f.js";
|
|
6
6
|
import { _ as $ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
7
|
-
import "./assets/
|
|
7
|
+
import "./assets/index30.css";
|
|
8
8
|
var n = /* @__PURE__ */ ((e) => (e.GREY = "grey", e.BLUE = "blue", e.GREEN = "green", e.ORANGE = "orange", e.RED = "red", e.WHITE = "white", e))(n || {});
|
|
9
9
|
const w = d({
|
|
10
10
|
name: "bento-tag",
|