@adyen/bento-vue2 1.25.0 → 1.27.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.
Files changed (201) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +582 -237
  3. package/dist/accordion.js +2 -2
  4. package/dist/action-bar.js +61 -146
  5. package/dist/action-bar.js.map +1 -1
  6. package/dist/alert.js +3 -3
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/button-actions.css +1 -1
  9. package/dist/assets/button.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/dropdown.css +1 -1
  12. package/dist/assets/index.css +1 -1
  13. package/dist/assets/index10.css +1 -1
  14. package/dist/assets/index11.css +1 -1
  15. package/dist/assets/index12.css +1 -1
  16. package/dist/assets/index13.css +1 -1
  17. package/dist/assets/index14.css +1 -1
  18. package/dist/assets/index15.css +1 -1
  19. package/dist/assets/index17.css +1 -1
  20. package/dist/assets/index18.css +1 -1
  21. package/dist/assets/index19.css +1 -1
  22. package/dist/assets/index2.css +1 -1
  23. package/dist/assets/index20.css +1 -1
  24. package/dist/assets/index21.css +1 -1
  25. package/dist/assets/index22.css +1 -1
  26. package/dist/assets/index23.css +1 -1
  27. package/dist/assets/index24.css +1 -1
  28. package/dist/assets/index25.css +1 -1
  29. package/dist/assets/index26.css +1 -1
  30. package/dist/assets/index27.css +1 -1
  31. package/dist/assets/index28.css +1 -1
  32. package/dist/assets/index29.css +1 -1
  33. package/dist/assets/index3.css +1 -1
  34. package/dist/assets/index30.css +1 -1
  35. package/dist/assets/index31.css +1 -1
  36. package/dist/assets/index32.css +1 -1
  37. package/dist/assets/index33.css +1 -1
  38. package/dist/assets/index34.css +1 -1
  39. package/dist/assets/index35.css +1 -1
  40. package/dist/assets/index36.css +1 -1
  41. package/dist/assets/index37.css +1 -1
  42. package/dist/assets/index38.css +1 -1
  43. package/dist/assets/index39.css +1 -1
  44. package/dist/assets/index4.css +1 -1
  45. package/dist/assets/index40.css +1 -1
  46. package/dist/assets/index41.css +1 -1
  47. package/dist/assets/index42.css +1 -1
  48. package/dist/assets/index43.css +1 -1
  49. package/dist/assets/index44.css +1 -1
  50. package/dist/assets/index45.css +1 -1
  51. package/dist/assets/index46.css +1 -1
  52. package/dist/assets/index47.css +1 -1
  53. package/dist/assets/index48.css +1 -1
  54. package/dist/assets/index49.css +1 -0
  55. package/dist/assets/index5.css +1 -1
  56. package/dist/assets/index6.css +1 -1
  57. package/dist/assets/index7.css +1 -1
  58. package/dist/assets/index8.css +1 -1
  59. package/dist/assets/index9.css +1 -1
  60. package/dist/assets/use-cached-selected-values.css +1 -1
  61. package/dist/avatar-image.js +1 -1
  62. package/dist/badge.js +1 -1
  63. package/dist/button.js +5 -5
  64. package/dist/card.js +3 -3
  65. package/dist/checkbox.js +5 -5
  66. package/dist/chunks/{base-button.773343f6.js → base-button.852204dc.js} +2 -2
  67. package/dist/chunks/{base-button.773343f6.js.map → base-button.852204dc.js.map} +1 -1
  68. package/dist/chunks/{base-modal.2d596e6f.js → base-modal.4fb7528b.js} +6 -6
  69. package/dist/chunks/{base-modal.2d596e6f.js.map → base-modal.4fb7528b.js.map} +1 -1
  70. package/dist/chunks/{button-actions-with-menu.d08d2c51.js → button-actions-with-menu.bf968959.js} +4 -4
  71. package/dist/chunks/{button-actions-with-menu.d08d2c51.js.map → button-actions-with-menu.bf968959.js.map} +1 -1
  72. package/dist/chunks/{button-actions.a03a672f.js → button-actions.87e589e3.js} +31 -29
  73. package/dist/chunks/button-actions.87e589e3.js.map +1 -0
  74. package/dist/chunks/button.cb90b55c.js +101 -0
  75. package/dist/chunks/button.cb90b55c.js.map +1 -0
  76. package/dist/chunks/{calendar.7d3e2db0.js → calendar.f02e0a5a.js} +5 -5
  77. package/dist/chunks/{calendar.7d3e2db0.js.map → calendar.f02e0a5a.js.map} +1 -1
  78. package/dist/chunks/{checkbox.28578383.js → checkbox.9f9c978a.js} +3 -3
  79. package/dist/chunks/{checkbox.28578383.js.map → checkbox.9f9c978a.js.map} +1 -1
  80. package/dist/chunks/{controls-group.faa482b2.js → controls-group.121a307d.js} +3 -3
  81. package/dist/chunks/{controls-group.faa482b2.js.map → controls-group.121a307d.js.map} +1 -1
  82. package/dist/chunks/{copy.3c50b447.js → copy.6808b2dc.js} +4 -4
  83. package/dist/chunks/{copy.3c50b447.js.map → copy.6808b2dc.js.map} +1 -1
  84. package/dist/chunks/{dialog-page.286ead53.js → dialog-page.7fd7d006.js} +3 -3
  85. package/dist/chunks/{dialog-page.286ead53.js.map → dialog-page.7fd7d006.js.map} +1 -1
  86. package/dist/chunks/{dropdown-default-textbox.a1c0c0fb.js → dropdown-default-textbox.d0f17d96.js} +3 -3
  87. package/dist/chunks/{dropdown-default-textbox.a1c0c0fb.js.map → dropdown-default-textbox.d0f17d96.js.map} +1 -1
  88. package/dist/chunks/{dropdown.7d4a8dfc.js → dropdown.a8037bca.js} +192 -201
  89. package/dist/chunks/dropdown.a8037bca.js.map +1 -0
  90. package/dist/chunks/{error-message.db315e68.js → error-message.bdcc1020.js} +2 -2
  91. package/dist/chunks/{error-message.db315e68.js.map → error-message.bdcc1020.js.map} +1 -1
  92. package/dist/chunks/{events.58c00e6d.js → events.f14a214b.js} +5 -5
  93. package/dist/chunks/events.f14a214b.js.map +1 -0
  94. package/dist/chunks/{fixed-scroller.3135f86c.js → fixed-scroller.82ef6187.js} +2 -2
  95. package/dist/chunks/{fixed-scroller.3135f86c.js.map → fixed-scroller.82ef6187.js.map} +1 -1
  96. package/dist/chunks/{footer-actions.32891b25.js → footer-actions.58d14a16.js} +4 -4
  97. package/dist/chunks/{footer-actions.32891b25.js.map → footer-actions.58d14a16.js.map} +1 -1
  98. package/dist/chunks/{index.ec632d95.js → index.0a30d358.js} +6 -6
  99. package/dist/chunks/{index.ec632d95.js.map → index.0a30d358.js.map} +1 -1
  100. package/dist/chunks/{index.596c4d0a.js → index.1deef79e.js} +2 -2
  101. package/dist/chunks/{index.596c4d0a.js.map → index.1deef79e.js.map} +1 -1
  102. package/dist/chunks/index.3c69be27.js +85 -0
  103. package/dist/chunks/index.3c69be27.js.map +1 -0
  104. package/dist/chunks/index.561786f6.js +126 -0
  105. package/dist/chunks/index.561786f6.js.map +1 -0
  106. package/dist/chunks/{index.9e40ffeb.js → index.614a5138.js} +2 -2
  107. package/dist/chunks/{index.9e40ffeb.js.map → index.614a5138.js.map} +1 -1
  108. package/dist/chunks/{index.4b6211c7.js → index.854d6498.js} +27 -27
  109. package/dist/chunks/{index.4b6211c7.js.map → index.854d6498.js.map} +1 -1
  110. package/dist/chunks/{index.30948302.js → index.a48e7f99.js} +5 -5
  111. package/dist/chunks/{index.30948302.js.map → index.a48e7f99.js.map} +1 -1
  112. package/dist/chunks/{index.444d221f.js → index.bd1d28d0.js} +3 -3
  113. package/dist/chunks/{index.444d221f.js.map → index.bd1d28d0.js.map} +1 -1
  114. package/dist/chunks/{index.94acf214.js → index.c8621e8e.js} +3 -3
  115. package/dist/chunks/{index.94acf214.js.map → index.c8621e8e.js.map} +1 -1
  116. package/dist/chunks/{index.9536a077.js → index.ccc7e8d7.js} +3 -3
  117. package/dist/chunks/{index.9536a077.js.map → index.ccc7e8d7.js.map} +1 -1
  118. package/dist/chunks/{index.d97166c6.js → index.e29a6907.js} +3 -3
  119. package/dist/chunks/index.e29a6907.js.map +1 -0
  120. package/dist/chunks/{keyboard-navigation.ca47dfa8.js → keyboard-navigation.bbc3d15c.js} +2 -2
  121. package/dist/chunks/{keyboard-navigation.ca47dfa8.js.map → keyboard-navigation.bbc3d15c.js.map} +1 -1
  122. package/dist/chunks/{listbox-option-tag.95a65534.js → listbox-option-tag.8708be60.js} +3 -3
  123. package/dist/chunks/{listbox-option-tag.95a65534.js.map → listbox-option-tag.8708be60.js.map} +1 -1
  124. package/dist/chunks/{loading-button.e8060c04.js → loading-button.692dbdc8.js} +2 -2
  125. package/dist/chunks/{loading-button.e8060c04.js.map → loading-button.692dbdc8.js.map} +1 -1
  126. package/dist/chunks/{payment-method.564ed43a.js → payment-method.c55dd352.js} +2 -2
  127. package/dist/chunks/{payment-method.564ed43a.js.map → payment-method.c55dd352.js.map} +1 -1
  128. package/dist/chunks/{tooltip.e5deb137.js → tooltip.efddb5f3.js} +4 -4
  129. package/dist/chunks/{tooltip.e5deb137.js.map → tooltip.efddb5f3.js.map} +1 -1
  130. package/dist/chunks/{use-bento-toast-controller.8414d283.js → use-bento-toast-controller.5dac1f3c.js} +2 -2
  131. package/dist/chunks/{use-bento-toast-controller.8414d283.js.map → use-bento-toast-controller.5dac1f3c.js.map} +1 -1
  132. package/dist/chunks/{use-cached-selected-values.3772a679.js → use-cached-selected-values.98a9ed01.js} +225 -206
  133. package/dist/chunks/use-cached-selected-values.98a9ed01.js.map +1 -0
  134. package/dist/code-snippet.js +131 -129
  135. package/dist/code-snippet.js.map +1 -1
  136. package/dist/country.js +2 -2
  137. package/dist/currency.js +1 -1
  138. package/dist/dashboard-template.js +109 -0
  139. package/dist/dashboard-template.js.map +1 -0
  140. package/dist/data-grid-template.js +1 -1
  141. package/dist/data-grid.js +903 -866
  142. package/dist/data-grid.js.map +1 -1
  143. package/dist/date-picker.js +19 -19
  144. package/dist/date-range-picker.js +2 -2
  145. package/dist/date.js +1 -1
  146. package/dist/dropdown.js +7 -7
  147. package/dist/empty-state.js +3 -3
  148. package/dist/filter-bar.js +76 -74
  149. package/dist/filter-bar.js.map +1 -1
  150. package/dist/focus-trap.js +1 -1
  151. package/dist/form-layout.js +15 -14
  152. package/dist/form-layout.js.map +1 -1
  153. package/dist/header.js +4 -4
  154. package/dist/index.js +81 -78
  155. package/dist/index.js.map +1 -1
  156. package/dist/info-icon.js +3 -3
  157. package/dist/input-field.js +4 -4
  158. package/dist/internal.js +8 -8
  159. package/dist/link.js +1 -1
  160. package/dist/loading-indicator.js +1 -1
  161. package/dist/menu.js +1 -1
  162. package/dist/modal-fullscreen.js +6 -6
  163. package/dist/modal.js +6 -6
  164. package/dist/pagination.js +4 -4
  165. package/dist/payment-method.js +1 -1
  166. package/dist/popover.js +1 -1
  167. package/dist/popper-container.js +1 -1
  168. package/dist/radio-group.js +4 -4
  169. package/dist/search-bar.js +2 -2
  170. package/dist/secondary-nav.js +2 -2
  171. package/dist/segmented-control.js +40 -41
  172. package/dist/segmented-control.js.map +1 -1
  173. package/dist/selection-card.js +4 -4
  174. package/dist/sidepanel.js +6 -6
  175. package/dist/status.js +2 -2
  176. package/dist/stepper.js +4 -4
  177. package/dist/structured-list.js +1 -1
  178. package/dist/summary-grid.js +3 -3
  179. package/dist/tabs.js +72 -71
  180. package/dist/tabs.js.map +1 -1
  181. package/dist/tag.js +3 -3
  182. package/dist/textarea.js +4 -4
  183. package/dist/timeline.js +7 -7
  184. package/dist/toast.js +4 -4
  185. package/dist/toggle.js +2 -2
  186. package/dist/tutorial.js +123 -87
  187. package/dist/tutorial.js.map +1 -1
  188. package/dist/typography.js +1 -1
  189. package/dist/web-types.json +174 -77
  190. package/package.json +9 -6
  191. package/dist/chunks/button-actions.a03a672f.js.map +0 -1
  192. package/dist/chunks/button.e5f5638f.js +0 -100
  193. package/dist/chunks/button.e5f5638f.js.map +0 -1
  194. package/dist/chunks/checkmark.a6ed8f47.js +0 -26
  195. package/dist/chunks/checkmark.a6ed8f47.js.map +0 -1
  196. package/dist/chunks/dropdown.7d4a8dfc.js.map +0 -1
  197. package/dist/chunks/events.58c00e6d.js.map +0 -1
  198. package/dist/chunks/index.81e509f3.js +0 -147
  199. package/dist/chunks/index.81e509f3.js.map +0 -1
  200. package/dist/chunks/index.d97166c6.js.map +0 -1
  201. package/dist/chunks/use-cached-selected-values.3772a679.js.map +0 -1
package/dist/tutorial.js CHANGED
@@ -1,16 +1,16 @@
1
- import { defineComponent as g, ref as d, computed as a, isRef as R, watch as F, nextTick as $ } from "vue";
2
- import { B as I } from "./chunks/index.30948302.js";
3
- import { B as S, a as P } from "./chunks/index.ec632d95.js";
4
- import { B as k } from "./chunks/index.d97166c6.js";
5
- import { BentoImage as w } from "./image.js";
1
+ import { defineComponent as h, ref as d, computed as n, isRef as I, watch as g, nextTick as P } from "vue";
2
+ import { B as $ } from "./chunks/index.a48e7f99.js";
3
+ import { B as T, a as k } from "./chunks/index.0a30d358.js";
4
+ import { B as w } from "./chunks/index.e29a6907.js";
5
+ import { BentoImage as N } from "./image.js";
6
6
  import { u as A } from "./chunks/i18n.eb5b985b.js";
7
- import { R as N } from "./chunks/refresh.71a03998.js";
7
+ import { R as D } from "./chunks/refresh.71a03998.js";
8
8
  import { n as f } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
9
- import { a as T, h as D, o as M } from "./chunks/index.94acf214.js";
10
- import { B as V } from "./chunks/button-actions.a03a672f.js";
11
- import "./assets/index24.css";
12
- var E;
13
- const j = /* @__PURE__ */ g({
9
+ import { a as b, h as j, o as L } from "./chunks/index.c8621e8e.js";
10
+ import { B as M } from "./chunks/button-actions.87e589e3.js";
11
+ import "./assets/index45.css";
12
+ var B;
13
+ const V = /* @__PURE__ */ h({
14
14
  __name: "tutorial-indicator",
15
15
  props: {
16
16
  /**
@@ -18,11 +18,11 @@ const j = /* @__PURE__ */ g({
18
18
  * The indicator will position itself around the target element.
19
19
  */
20
20
  targetElement: {
21
- type: (E = T.props) == null ? void 0 : E.targetElement.type,
21
+ type: (B = b.props) == null ? void 0 : B.targetElement.type,
22
22
  required: !0
23
23
  }
24
24
  },
25
- setup(n) {
25
+ setup(a) {
26
26
  const e = d({
27
27
  width: "0",
28
28
  height: "0",
@@ -30,34 +30,34 @@ const j = /* @__PURE__ */ g({
30
30
  });
31
31
  function s(l) {
32
32
  try {
33
- const r = parseFloat(getComputedStyle(l).getPropertyValue("border-radius"));
34
- return Number.isNaN(r) ? "" : `${r + 2 * 2}px`;
33
+ const i = parseFloat(getComputedStyle(l).getPropertyValue("border-radius"));
34
+ return Number.isNaN(i) ? "" : `${i + 2 * 2}px`;
35
35
  } catch {
36
36
  return "";
37
37
  }
38
38
  }
39
39
  const o = [
40
- D(),
41
- M({
40
+ j(),
41
+ L({
42
42
  mainAxis: 2,
43
43
  alignmentAxis: -2
44
44
  }),
45
45
  {
46
46
  name: "updateIndicatorSize",
47
- fn: ({ x: l, y: r, elements: u }) => {
48
- const p = u.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: l, y: r };
47
+ fn: ({ x: l, y: i, elements: r }) => {
48
+ const p = r.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: l, y: i };
50
50
  }
51
51
  }
52
52
  ];
53
- return { __sfc: !0, BORDER_OFFSET: 2, computedStyles: e, getBorderRadius: s, middleware: o, PopperContainer: T };
53
+ return { __sfc: !0, BORDER_OFFSET: 2, computedStyles: e, getBorderRadius: s, middleware: o, PopperContainer: b };
54
54
  }
55
55
  });
56
56
  var q = function() {
57
57
  var t = this, e = t._self._c, s = t._self._setupProxy;
58
58
  return e(s.PopperContainer, { staticClass: "b-tutorial-indicator", attrs: { "target-element": t.targetElement, middleware: s.middleware, position: "top-start", "fixed-positioning": "", "disabled-focus-trap": "", "data-testid": "tutorial-indicator" } }, [e("div", { staticClass: "b-tutorial-indicator__highlight", style: s.computedStyles })]);
59
- }, K = [], L = /* @__PURE__ */ f(
60
- j,
59
+ }, K = [], Z = /* @__PURE__ */ f(
60
+ V,
61
61
  q,
62
62
  K,
63
63
  !1,
@@ -66,27 +66,27 @@ var q = function() {
66
66
  null,
67
67
  null
68
68
  );
69
- const Z = L.exports;
70
- let b = 0;
71
- const z = {
69
+ const z = Z.exports;
70
+ let x = 0;
71
+ const H = {
72
72
  beforeCreate() {
73
- this.uuid = b.toString(), b += 1;
73
+ this.uuid = x.toString(), x += 1;
74
74
  }
75
75
  };
76
- var H = function() {
76
+ var U = function() {
77
77
  var t = this, e = t._self._c;
78
78
  return e("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("g", { attrs: { "clip-path": "url(#uia-icons-16-blocked__a" + t.uuid + ")" } }, [e("path", { attrs: { 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" } })]), e("defs", [e("clipPath", { attrs: { id: "uia-icons-16-blocked__a" + t.uuid } }, [e("rect", { attrs: { width: "16", height: "16", fill: "#fff" } })])])]);
79
- }, U = [], W = /* @__PURE__ */ f(
80
- z,
79
+ }, W = [], X = /* @__PURE__ */ f(
81
80
  H,
82
81
  U,
82
+ W,
83
83
  !1,
84
84
  null,
85
85
  null,
86
86
  null,
87
87
  null
88
88
  );
89
- const X = W.exports, G = {
89
+ const G = X.exports, J = {
90
90
  "en-US": {
91
91
  finish: "Finish",
92
92
  next: "Next",
@@ -96,10 +96,10 @@ const X = W.exports, G = {
96
96
  startTour: "Start tour",
97
97
  stepsOfTotal: "{step} of {totalSteps}"
98
98
  }
99
- }, J = {
100
- i18n: { messages: G }
101
- }, Q = /* @__PURE__ */ g({
102
- ...J,
99
+ }, Q = {
100
+ i18n: { messages: J }
101
+ }, Y = /* @__PURE__ */ h({
102
+ ...Q,
103
103
  __name: "tutorial-popover",
104
104
  props: {
105
105
  /**
@@ -135,8 +135,17 @@ const X = W.exports, G = {
135
135
  */
136
136
  position: {
137
137
  type: String,
138
- default: S.BOTTOM_START,
139
- validator: (n) => Object.values(S).includes(n)
138
+ default: T.BOTTOM_START,
139
+ validator: (a) => Object.values(T).includes(a)
140
+ },
141
+ /**
142
+ * Options to control the scroll into view behavior.
143
+ * Takes the same options as the `scrollIntoView` function
144
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}
145
+ */
146
+ scrollOptions: {
147
+ type: [Boolean, Object],
148
+ default: null
140
149
  },
141
150
  /**
142
151
  * Indicates whether this popover is a single tutorial or a tour.
@@ -180,75 +189,84 @@ const X = W.exports, G = {
180
189
  }
181
190
  },
182
191
  emits: ["next", "finish", "restart"],
183
- setup(n, { emit: t }) {
184
- const e = n, { t: s } = A(), o = a(() => ({
185
- title: s("skipTour"),
192
+ setup(a, { emit: t }) {
193
+ const e = a, s = { behavior: "smooth" }, { t: o } = A(), l = n(() => ({
194
+ title: o("skipTour"),
186
195
  event: () => t("finish")
187
- })), l = a(() => ({
188
- title: s("startTour"),
196
+ })), i = n(() => ({
197
+ title: o("startTour"),
189
198
  event: () => t("next")
190
- })), r = a(() => ({
191
- title: s("next"),
199
+ })), r = n(() => ({
200
+ title: o("next"),
192
201
  event: () => t("next")
193
- })), u = a(() => ({
194
- title: s("finish"),
202
+ })), p = n(() => ({
203
+ title: o("finish"),
195
204
  event: () => t("finish")
196
- })), p = a(() => ({
197
- title: s("ok"),
205
+ })), y = n(() => ({
206
+ title: o("ok"),
198
207
  event: () => t("finish")
199
- })), h = d(!1), y = d(!1), v = a(() => {
200
- var i;
201
- return R(e.targetElement) ? ((i = e.targetElement.value) == null ? void 0 : i.$el) || e.targetElement.value : e.targetElement.$el || e.targetElement;
202
- }), _ = a(() => e.step === 0), m = a(() => e.step === e.totalSteps), O = a(() => !_.value), B = a(() => [
208
+ })), C = d(!1), O = d(!1), v = n(() => {
209
+ var u;
210
+ return I(e.targetElement) ? ((u = e.targetElement.value) == null ? void 0 : u.$el) || e.targetElement.value : e.targetElement.$el || e.targetElement;
211
+ }), _ = n(() => e.step === 0), m = n(() => e.step === e.totalSteps), E = n(() => !_.value), R = n(() => [
203
212
  {
204
- text: s("restartTour"),
213
+ text: o("restartTour"),
205
214
  handler: () => t("restart"),
206
- icon: N
215
+ icon: D
207
216
  },
208
217
  ...m.value ? [] : [
209
218
  {
210
219
  text: "Skip tour",
211
220
  handler: () => t("finish"),
212
- icon: X
221
+ icon: G
213
222
  }
214
223
  ]
215
- ]), x = a(() => {
216
- let i;
217
- _.value ? i = e.single ? p.value : l.value : m.value ? i = u.value : i = r.value;
218
- const c = [i];
219
- return _.value && !e.single ? c.push(o.value) : e.action && c.push(e.action), c;
224
+ ]), F = n(() => {
225
+ let u;
226
+ _.value ? u = e.single ? y.value : i.value : m.value ? u = p.value : u = r.value;
227
+ const c = [u];
228
+ return _.value && !e.single ? c.push(l.value) : e.action && c.push(e.action), c;
220
229
  });
221
- return F(
230
+ return g(
222
231
  () => e.active,
223
- async (i) => {
224
- var c, C;
225
- i && ((c = v.value) != null && c.scrollIntoView) && ((C = v.value) == null || C.scrollIntoView({ behavior: "smooth" }), await $()), h.value = i, y.value = i;
232
+ async (u) => {
233
+ var c, S;
234
+ u && ((c = v.value) != null && c.scrollIntoView) && ((S = v.value) == null || S.scrollIntoView(
235
+ e.scrollOptions != null ? e.scrollOptions : s
236
+ ), await P()), C.value = u, O.value = u;
226
237
  },
227
238
  { immediate: !0 }
228
- ), { __sfc: !0, props: e, t: s, emit: t, ACTION_SKIP: o, ACTION_START: l, ACTION_NEXT: r, ACTION_FINISH: u, ACTION_OK: p, isPopoverOpen: h, isIndicatorVisible: y, targetElement: v, isFirstStep: _, isLastStep: m, showSteps: O, menuData: B, computedActions: x, BentoMenu: I, BentoPopover: P, BentoTypography: k, BentoButtonActions: V, BentoImage: w, TutorialIndicator: Z };
239
+ ), { __sfc: !0, DEFAULT_SCROLL_OPTIONS: s, props: e, t: o, emit: t, ACTION_SKIP: l, ACTION_START: i, ACTION_NEXT: r, ACTION_FINISH: p, ACTION_OK: y, isPopoverOpen: C, isIndicatorVisible: O, targetElement: v, isFirstStep: _, isLastStep: m, showSteps: E, menuData: R, computedActions: F, BentoMenu: $, BentoPopover: k, BentoTypography: w, BentoButtonActions: M, BentoImage: N, TutorialIndicator: z };
229
240
  }
230
241
  });
231
- var Y = function() {
242
+ var tt = function() {
232
243
  var t = this, e = t._self._c, s = t._self._setupProxy;
233
244
  return t.active && s.targetElement ? e("div", [s.isIndicatorVisible && s.targetElement ? e(s.TutorialIndicator, { attrs: { "target-element": s.targetElement } }) : t._e(), e(s.BentoPopover, { staticClass: "b-tutorial-popover", attrs: { "target-element": s.targetElement, position: t.position, open: s.isPopoverOpen, "aria-label": t.title, "fixed-positioning": "" }, nativeOn: { keydown: function(o) {
234
245
  return !o.type.indexOf("key") && t._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : s.emit("finish");
235
246
  } }, scopedSlots: t._u([t.image ? { key: "image", fn: function() {
236
247
  return [e(s.BentoImage, t._b({ staticClass: "b-tutorial-popover__image", attrs: { "aspect-ratio": "landscape" } }, "bento-image", t.image, !1))];
237
248
  }, proxy: !0 } : null], null, !0) }, [e("div", { staticClass: "b-tutorial-popover__ripple", attrs: { "aria-hidden": "true" } }), e("div", { staticClass: "b-tutorial-popover__header" }, [e(s.BentoTypography, { attrs: { variant: "title", el: "span" } }, [t._v(" " + t._s(t.title) + " ")]), s.showSteps ? e(s.BentoTypography, { staticClass: "b-tutorial-popover__steps", attrs: { el: "span" } }, [t._v(" " + t._s(s.t("stepsOfTotal", { step: t.step, totalSteps: t.totalSteps })) + " ")]) : t._e()], 1), e(s.BentoTypography, [t._t("default")], 2), e("div", { staticClass: "b-tutorial-popover__footer" }, [s.isFirstStep ? t._e() : e(s.BentoMenu, { staticClass: "b-tutorial-popover__menu", attrs: { data: s.menuData, "data-testid": "menu-button" } }), e("div", { staticClass: "b-tutorial-popover__actions" }, [e(s.BentoButtonActions, { attrs: { actions: s.computedActions, layout: "buttons-end" } })], 1)], 1)], 1)], 1) : t._e();
238
- }, tt = [], et = /* @__PURE__ */ f(
239
- Q,
249
+ }, et = [], st = /* @__PURE__ */ f(
240
250
  Y,
241
251
  tt,
252
+ et,
242
253
  !1,
243
254
  null,
244
- "95dd3753",
255
+ "ac66e07d",
245
256
  null,
246
257
  null
247
258
  );
248
- const st = et.exports, rt = {}, ot = /* @__PURE__ */ g({
259
+ const ot = st.exports, rt = {}, nt = /* @__PURE__ */ h({
249
260
  ...rt,
250
261
  __name: "tutorial",
251
262
  props: {
263
+ /**
264
+ * The current step index. If provided, will start the tutorial in that step.
265
+ */
266
+ index: {
267
+ type: Number,
268
+ default: null
269
+ },
252
270
  /**
253
271
  * The steps configuration for the tutorial.
254
272
  *
@@ -256,52 +274,70 @@ const st = et.exports, rt = {}, ot = /* @__PURE__ */ g({
256
274
  steps: {
257
275
  type: Array,
258
276
  required: !0,
259
- validator: (n) => n.length > 0
277
+ validator: (a) => a.length > 0
278
+ },
279
+ /**
280
+ * Options to control the scroll into view behavior.
281
+ * Takes the same options as the `scrollIntoView` function
282
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}
283
+ */
284
+ scrollOptions: {
285
+ type: [Boolean, Object],
286
+ default: null
260
287
  }
261
288
  },
262
- setup(n) {
263
- const t = n, e = d(0), s = a(() => t.steps.length - 1), o = a(() => s.value === 0);
264
- function l(r, u) {
289
+ emits: ["update:index"],
290
+ setup(a, { emit: t }) {
291
+ const e = a, s = d(e.index || 0), o = n(() => e.steps.length - 1), l = n(() => o.value === 0);
292
+ function i(r, p) {
265
293
  return {
266
294
  // Visual
267
295
  targetElement: r.target,
268
296
  image: r.image,
269
297
  title: r.title,
270
- step: u,
271
- totalSteps: s.value,
298
+ step: p,
299
+ totalSteps: o.value,
272
300
  action: r.action,
301
+ scrollOptions: e.scrollOptions,
273
302
  // Config
274
- active: u === e.value,
275
- single: o.value,
303
+ active: p === s.value,
304
+ single: l.value,
276
305
  position: r.position
277
306
  };
278
307
  }
279
- return { __sfc: !0, props: t, currentStep: e, totalSteps: s, isSingleTutorial: o, getPopoverProps: l, TutorialPopover: st };
308
+ return g(s, (r) => {
309
+ t("update:index", r);
310
+ }), g(
311
+ () => e.index,
312
+ (r) => {
313
+ r >= -1 && r <= o.value && (s.value = r);
314
+ }
315
+ ), { __sfc: !0, props: e, emit: t, currentStep: s, totalSteps: o, isSingleTutorial: l, getPopoverProps: i, TutorialPopover: ot };
280
316
  }
281
317
  });
282
318
  var at = function() {
283
319
  var t = this, e = t._self._c, s = t._self._setupProxy;
284
320
  return e("div", { staticClass: "b-tutorial" }, t._l(t.steps, function(o, l) {
285
- return e(s.TutorialPopover, t._b({ key: o.title, on: { finish: function(r) {
321
+ return e(s.TutorialPopover, t._b({ key: o.title, on: { finish: function(i) {
286
322
  s.currentStep = -1;
287
- }, next: function(r) {
323
+ }, next: function(i) {
288
324
  s.currentStep += 1;
289
- }, restart: function(r) {
325
+ }, restart: function(i) {
290
326
  s.currentStep = 0;
291
327
  } } }, "tutorial-popover", s.getPopoverProps(o, l), !1), [t._v(" " + t._s(o.description) + " ")]);
292
328
  }), 1);
293
- }, nt = [], it = /* @__PURE__ */ f(
294
- ot,
295
- at,
329
+ }, it = [], lt = /* @__PURE__ */ f(
296
330
  nt,
331
+ at,
332
+ it,
297
333
  !1,
298
334
  null,
299
335
  null,
300
336
  null,
301
337
  null
302
338
  );
303
- const ht = it.exports;
339
+ const yt = lt.exports;
304
340
  export {
305
- ht as BentoTutorial
341
+ yt as BentoTutorial
306
342
  };
307
343
  //# sourceMappingURL=tutorial.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tutorial.js","sources":["../src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/blocked.vue","../src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../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","_sfc_main$2","__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,EAAA;AAAA,MACVC,EAAA;AAAA,QACE,UAAA;AAAA,QACO,eAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,GAAAC,GAAA,GAAAC,GAAA,UAAAC,EA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A,MAA2B;AAAA,MAC/B,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;uBC3KtBG,KAAA,CAAA;;;;;;;;;;;;;;;iBA1DAC,IAAA5C,EAAA,CAAA,GAEA6C,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":["../src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/blocked.vue","../src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../src/components/tutorial/tutorial.vue"],"sourcesContent":["<template>\n <popper-container\n :target-element=\"targetElement\"\n :middleware=\"middleware\"\n position=\"top-start\"\n fixed-positioning\n disabled-focus-trap\n class=\"b-tutorial-indicator\"\n data-testid=\"tutorial-indicator\"\n >\n <div class=\"b-tutorial-indicator__highlight\" :style=\"computedStyles\"></div>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { hide, type Middleware, offset } from '@floating-ui/vue';\n import { PopperContainer } from '@/components/popper-container';\n\n const BORDER_OFFSET = 2;\n\n defineProps({\n /**\n * Tutorial indicator's target element.\n * The indicator will position itself around the target element.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n });\n\n const computedStyles = ref({\n width: '0',\n height: '0',\n borderRadius: '0',\n });\n\n function getBorderRadius(element: HTMLElement) {\n try {\n const radius = parseFloat(getComputedStyle(element).getPropertyValue('border-radius'));\n return Number.isNaN(radius) ? '' : `${radius + 2 * BORDER_OFFSET}px`;\n } catch {\n return '';\n }\n }\n\n const middleware = [\n hide(),\n offset({\n mainAxis: BORDER_OFFSET,\n alignmentAxis: -BORDER_OFFSET,\n }),\n {\n name: 'updateIndicatorSize',\n fn: ({ x, y, elements }) => {\n const target = elements.reference as HTMLElement;\n computedStyles.value.width = `${target.offsetWidth + 4 * BORDER_OFFSET}px`;\n computedStyles.value.height = `${target.offsetHeight + 4 * BORDER_OFFSET}px`;\n computedStyles.value.borderRadius = getBorderRadius(target);\n return { x, y };\n },\n } as Middleware,\n ];\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-indicator.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-icons-16-blocked__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z\"/></g><defs><clipPath :id=\"'uia-icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div v-if=\"active && targetElement\">\n <tutorial-indicator v-if=\"isIndicatorVisible && targetElement\" :target-element=\"targetElement\" />\n\n <bento-popover\n :target-element=\"targetElement\"\n :position=\"position\"\n :open=\"isPopoverOpen\"\n :aria-label=\"title\"\n fixed-positioning\n class=\"b-tutorial-popover\"\n @keydown.esc.native=\"emit('finish')\"\n >\n <template v-if=\"image\" #image>\n <bento-image v-bind=\"image\" aspect-ratio=\"landscape\" class=\"b-tutorial-popover__image\" />\n </template>\n\n <div aria-hidden=\"true\" class=\"b-tutorial-popover__ripple\"></div>\n\n <div class=\"b-tutorial-popover__header\">\n <bento-typography variant=\"title\" el=\"span\"> {{ title }} </bento-typography>\n\n <bento-typography v-if=\"showSteps\" el=\"span\" class=\"b-tutorial-popover__steps\">\n {{ t('stepsOfTotal', { step, totalSteps }) }}\n </bento-typography>\n </div>\n\n <bento-typography>\n <slot />\n </bento-typography>\n\n <div class=\"b-tutorial-popover__footer\">\n <bento-menu\n v-if=\"!isFirstStep\"\n :data=\"menuData\"\n class=\"b-tutorial-popover__menu\"\n data-testid=\"menu-button\"\n />\n <div class=\"b-tutorial-popover__actions\">\n <bento-button-actions :actions=\"computedActions\" layout=\"buttons-end\" />\n </div>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, isRef, nextTick, PropType, ref, type default as Vue, watch } from 'vue';\n import { BentoMenu } from '@/components/menu';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { type BentoButtonActionObject, BentoButtonActions } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { TutorialIndicator } from './components/tutorial-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoMenuItem } from '@/components/menu/components';\n import type { VueNodeElement } from '@/types';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from '../../tutorial.types';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import BlockedIcon from '@adyen/ui-assets-icons-16/vue/blocked';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_SCROLL_OPTIONS: BentoTutorialScrollOptions = { behavior: 'smooth' };\n\n const props = defineProps({\n /**\n * Optional configuration for the secondary action.\n * In tour tutorials, this is ignored for the introductory step.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is the active step (and should be visible).\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional illustration to display at the top of the popover.\n */\n image: {\n type: Object as PropType<BentoTutorialStep['image']>,\n default: null,\n },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<`${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is a single tutorial or a tour.\n */\n single: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The tutorial step number.\n * In tour tutorials, `0` is the introductory step, and is displayed next\n * to the title.\n */\n step: {\n type: Number,\n default: null,\n },\n\n /**\n * Tutorial popover's target element.\n * The popover will position itself relatively to target element.\n */\n targetElement: {\n type: [Element, Object] as PropType<VueNodeElement>,\n required: true,\n },\n\n /**\n * The tutorial step title.\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Total count of steps.\n * In tour tutorials, this does not include the introductory step, and is\n * displayed next to the title.\n */\n totalSteps: {\n type: Number,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const emit = defineEmits<{\n /**\n * Emitted when the user clicks the primary action in popovers during introductory or intermediate steps of tour tutorials\n */\n (e: 'next'): void;\n\n /**\n * Emitted when the user clicks the primary action in a single tutorial, the last step of a tour, or skips the tutorial\n */\n (e: 'finish'): void;\n\n /**\n * Emitted when the user selects the restart tour option\n */\n (e: 'restart'): void;\n }>();\n\n const ACTION_SKIP = computed<BentoButtonActionObject>(() => ({\n title: t('skipTour') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_START = computed<BentoButtonActionObject>(() => ({\n title: t('startTour') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_NEXT = computed<BentoButtonActionObject>(() => ({\n title: t('next') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_FINISH = computed<BentoButtonActionObject>(() => ({\n title: t('finish') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_OK = computed<BentoButtonActionObject>(() => ({\n title: t('ok') as string,\n event: () => emit('finish'),\n }));\n\n const isPopoverOpen = ref(false);\n const isIndicatorVisible = ref(false);\n\n const targetElement = computed(() => {\n if (isRef(props.targetElement)) {\n return ((props.targetElement.value as Vue)?.$el || props.targetElement.value) as HTMLElement;\n }\n return ((props.targetElement as Vue).$el || props.targetElement) as HTMLElement;\n });\n\n const isFirstStep = computed(() => props.step === 0);\n const isLastStep = computed(() => props.step === props.totalSteps);\n\n const showSteps = computed(() => !isFirstStep.value);\n\n const menuData = computed<BentoMenuItem[]>(() => [\n {\n text: t('restartTour'),\n handler: () => emit('restart'),\n icon: RefreshIcon,\n },\n ...(isLastStep.value\n ? []\n : [\n {\n text: 'Skip tour',\n handler: () => emit('finish'),\n icon: BlockedIcon,\n },\n ]),\n ]);\n\n const computedActions = computed(() => {\n let primaryAction: BentoButtonActionObject;\n if (isFirstStep.value) {\n primaryAction = props.single ? ACTION_OK.value : ACTION_START.value;\n } else if (isLastStep.value) {\n primaryAction = ACTION_FINISH.value;\n } else {\n primaryAction = ACTION_NEXT.value;\n }\n\n const actions = [primaryAction];\n if (isFirstStep.value && !props.single) {\n actions.push(ACTION_SKIP.value);\n } else if (props.action) {\n actions.push(props.action);\n }\n\n return actions;\n });\n\n watch(\n () => props.active,\n async isActive => {\n if (isActive && targetElement.value?.scrollIntoView) {\n targetElement.value?.scrollIntoView(\n props.scrollOptions != null ? props.scrollOptions : DEFAULT_SCROLL_OPTIONS\n );\n\n // Skip to next tick to preserve popover appear animation\n await nextTick();\n }\n\n isPopoverOpen.value = isActive;\n isIndicatorVisible.value = isActive;\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-popover.scss\" />\n","<template>\n <div class=\"b-tutorial\">\n <tutorial-popover\n v-for=\"(step, i) in steps\"\n v-bind=\"getPopoverProps(step, i)\"\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, watch } from 'vue';\n import { TutorialPopover } from './components/tutorial-popover';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from './tutorial.types';\n\n const props = defineProps({\n /**\n * The current step index. If provided, will start the tutorial in that step.\n */\n index: {\n type: Number,\n default: null,\n },\n\n /**\n * The steps configuration for the tutorial.\n *\n */\n steps: {\n type: Array as PropType<BentoTutorialStep[]>,\n required: true,\n validator: (value: BentoTutorialStep[]) => value.length > 0,\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Fired every time the step index is changed. `-1` value means the tutorial is finished/skipped.\n */\n (e: 'update:index', value: number);\n }>();\n\n const currentStep = ref(props.index || 0);\n\n const totalSteps = computed(() => props.steps.length - 1);\n const isSingleTutorial = computed(() => totalSteps.value === 0);\n\n function getPopoverProps(step: BentoTutorialStep, index: number) {\n return {\n // Visual\n targetElement: step.target,\n image: step.image,\n title: step.title,\n step: index,\n totalSteps: totalSteps.value,\n action: step.action,\n scrollOptions: props.scrollOptions,\n\n // Config\n active: index === currentStep.value,\n single: isSingleTutorial.value,\n position: step.position,\n };\n }\n\n watch(currentStep, step => {\n emit('update:index', step);\n });\n\n watch(\n () => props.index,\n value => {\n if (value >= -1 && value <= totalSteps.value) {\n currentStep.value = value;\n }\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","_sfc_main$2","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","t","useI18n","ACTION_SKIP","computed","emit","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","props","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"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,EAAA;AAAA,MACVC,EAAA;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,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,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;uBClJtBG,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAxEAC,IAAA7C,EAAA6B,EAAA,SAAA,CAAA,GAEAiB,IAAA3B,EAAA,MAAAU,EAAA,MAAA,SAAA,CAAA,GACAkB,IAAA5B,EAAA,MAAA2B,EAAA,UAAA,CAAA;AAEA,aAAAE,EAAAC,GAAAC,GAAA;AACI,aAAA;AAAA;AAAA,QAAO,eAAAD,EAAA;AAAA,QAEiB,OAAAA,EAAA;AAAA,QACR,OAAAA,EAAA;AAAA,QACA,MAAAC;AAAA,QACN,YAAAJ,EAAA;AAAA,QACiB,QAAAG,EAAA;AAAA,QACV,eAAApB,EAAA;AAAA;AAAA,QACQ,QAAAqB,MAAAL,EAAA;AAAA,QAGS,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;AAGJ,WAAAT,EAAAK,GAAA,CAAAI,MAAA;AACI,MAAA7B,EAAA,gBAAA6B,CAAA;AAAA,IAAyB,CAAA,GAG7BT;AAAA,MAAA,MAAAX,EAAA;AAAA,MACgB,CAAAsB,MAAA;AAER,QAAAA,KAAA,MAAAA,KAAAL,EAAA,UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
@@ -1,4 +1,4 @@
1
- import { B as p, c as e, b as r, a as y } from "./chunks/index.d97166c6.js";
1
+ import { B as p, c as e, b as r, a as y } from "./chunks/index.e29a6907.js";
2
2
  export {
3
3
  p as BentoTypography,
4
4
  e as BentoTypographyElement,