@adyen/bento-vue2 1.65.0 → 1.67.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 (229) hide show
  1. package/dist/@types/index.d.ts +473 -253
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions-with-menu.css +1 -1
  7. package/dist/assets/button-actions.css +1 -1
  8. package/dist/assets/card.css +1 -1
  9. package/dist/assets/copy.css +1 -1
  10. package/dist/assets/data-grid-template.css +1 -1
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/date-range-picker.css +1 -1
  13. package/dist/assets/date.css +1 -1
  14. package/dist/assets/dialog-page.css +1 -1
  15. package/dist/assets/dropdown-default-textbox.css +1 -1
  16. package/dist/assets/dropdown.css +1 -1
  17. package/dist/assets/file-uploader.css +1 -1
  18. package/dist/assets/filter-bar.css +1 -1
  19. package/dist/assets/footer-actions.css +1 -1
  20. package/dist/assets/header-with-views.css +1 -1
  21. package/dist/assets/header.css +1 -1
  22. package/dist/assets/info-icon.css +1 -1
  23. package/dist/assets/input-field-password.css +1 -1
  24. package/dist/assets/input-field.css +1 -1
  25. package/dist/assets/inspector.css +1 -1
  26. package/dist/assets/menu.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/pagination.css +1 -1
  29. package/dist/assets/popover.css +1 -1
  30. package/dist/assets/sidepanel.css +1 -1
  31. package/dist/assets/step.css +1 -1
  32. package/dist/assets/summary-grid.css +1 -1
  33. package/dist/assets/tab.css +1 -0
  34. package/dist/assets/textarea.css +1 -1
  35. package/dist/assets/use-cached-selected-values.css +1 -1
  36. package/dist/button.js +1 -1
  37. package/dist/card.js +1 -1
  38. package/dist/checkbox.js +2 -2
  39. package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.BxX3I27_.js} +31 -31
  40. package/dist/chunks/action-bar.BxX3I27_.js.map +1 -0
  41. package/dist/chunks/{base-modal.3OptY7u_.js → base-modal.QGDM_kjG.js} +2 -2
  42. package/dist/chunks/{base-modal.3OptY7u_.js.map → base-modal.QGDM_kjG.js.map} +1 -1
  43. package/dist/chunks/button-actions-with-menu.itkbcqzk.js +83 -0
  44. package/dist/chunks/button-actions-with-menu.itkbcqzk.js.map +1 -0
  45. package/dist/chunks/{button-actions._OIvTdKt.js → button-actions.BKdI_ooV.js} +2 -2
  46. package/dist/chunks/button-actions.BKdI_ooV.js.map +1 -0
  47. package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
  48. package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
  49. package/dist/chunks/{card.CypgT0Ji.js → card.BktfAMv5.js} +2 -2
  50. package/dist/chunks/{card.CypgT0Ji.js.map → card.BktfAMv5.js.map} +1 -1
  51. package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
  52. package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
  53. package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
  54. package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
  55. package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.DDiQ9R3o.js} +4 -4
  56. package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.DDiQ9R3o.js.map} +1 -1
  57. package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
  58. package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
  59. package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
  60. package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
  61. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.Beep1lY8.js} +3 -3
  62. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.Beep1lY8.js.map} +1 -1
  63. package/dist/chunks/{dashed-underline.CEaAmjDa.js → dashed-underline.BQwLgzz6.js} +2 -2
  64. package/dist/chunks/{dashed-underline.CEaAmjDa.js.map → dashed-underline.BQwLgzz6.js.map} +1 -1
  65. package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.nkx0pCMA.js} +16 -14
  66. package/dist/chunks/data-grid-template.nkx0pCMA.js.map +1 -0
  67. package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.CkwZVy3a.js} +190 -188
  68. package/dist/chunks/data-grid.CkwZVy3a.js.map +1 -0
  69. package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.BLBXaDHv.js} +8 -9
  70. package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.BLBXaDHv.js.map} +1 -1
  71. package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.am63DgMj.js} +409 -393
  72. package/dist/chunks/date-range-picker.am63DgMj.js.map +1 -0
  73. package/dist/chunks/date.BfyWX2PY.js +160 -0
  74. package/dist/chunks/date.BfyWX2PY.js.map +1 -0
  75. package/dist/chunks/{dropdown-default-textbox.BNuuA4ES.js → dropdown-default-textbox.94q6opSD.js} +3 -3
  76. package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +1 -0
  77. package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYIkCBa6.js} +2 -2
  78. package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYIkCBa6.js.map} +1 -1
  79. package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.HA6ISg2h.js} +265 -270
  80. package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.HA6ISg2h.js.map} +1 -1
  81. package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
  82. package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
  83. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  84. package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
  85. package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
  86. package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.DbqsoAI1.js} +667 -652
  87. package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.DbqsoAI1.js.map} +1 -1
  88. package/dist/chunks/{footer-actions.DyuSTjC5.js → footer-actions.BUfQFz7J.js} +2 -2
  89. package/dist/chunks/{footer-actions.DyuSTjC5.js.map → footer-actions.BUfQFz7J.js.map} +1 -1
  90. package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
  91. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
  92. package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.JllLR2nW.js} +341 -327
  93. package/dist/chunks/header-with-views.JllLR2nW.js.map +1 -0
  94. package/dist/chunks/{header.Cb644uAi.js → header.04Y0unpy.js} +27 -26
  95. package/dist/chunks/{header.Cb644uAi.js.map → header.04Y0unpy.js.map} +1 -1
  96. package/dist/chunks/index.BrH1t1iu.js +407 -0
  97. package/dist/chunks/index.BrH1t1iu.js.map +1 -0
  98. package/dist/chunks/{info-icon-with-popover.COq40yTq.js → info-icon-with-popover.B1DnkW4B.js} +2 -2
  99. package/dist/chunks/{info-icon-with-popover.COq40yTq.js.map → info-icon-with-popover.B1DnkW4B.js.map} +1 -1
  100. package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
  101. package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
  102. package/dist/chunks/{input-field-password.Bloa-rqx.js → input-field-password.BtOdV0gF.js} +124 -123
  103. package/dist/chunks/input-field-password.BtOdV0gF.js.map +1 -0
  104. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Dq-LnGag.js} +3 -3
  105. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Dq-LnGag.js.map} +1 -1
  106. package/dist/chunks/input-field.Bg77qHT2.js +157 -0
  107. package/dist/chunks/input-field.Bg77qHT2.js.map +1 -0
  108. package/dist/chunks/{menu.BCD4FW54.js → menu.EgYjFAku.js} +2 -2
  109. package/dist/chunks/{menu.BCD4FW54.js.map → menu.EgYjFAku.js.map} +1 -1
  110. package/dist/chunks/{modal-fullscreen.1OdCgyca.js → modal-fullscreen.BNTUOC7o.js} +2 -2
  111. package/dist/chunks/{modal-fullscreen.1OdCgyca.js.map → modal-fullscreen.BNTUOC7o.js.map} +1 -1
  112. package/dist/chunks/{modal.xY5aFhAO.js → modal.OvB4kEGR.js} +4 -4
  113. package/dist/chunks/{modal.xY5aFhAO.js.map → modal.OvB4kEGR.js.map} +1 -1
  114. package/dist/chunks/{pagination.Cl7SzoId.js → pagination.Dw153NzQ.js} +115 -115
  115. package/dist/chunks/pagination.Dw153NzQ.js.map +1 -0
  116. package/dist/chunks/{popover.B05xkQ4e.js → popover.BGHbPUOr.js} +2 -2
  117. package/dist/chunks/{popover.B05xkQ4e.js.map → popover.BGHbPUOr.js.map} +1 -1
  118. package/dist/chunks/promo-banner.Bbc2U3S3.js.map +1 -1
  119. package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
  120. package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
  121. package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.CRJRvfJn.js} +5 -7
  122. package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.CRJRvfJn.js.map} +1 -1
  123. package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.BTZSePJh.js} +3 -3
  124. package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.BTZSePJh.js.map} +1 -1
  125. package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.BBhSBNn7.js} +2 -2
  126. package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.BBhSBNn7.js.map} +1 -1
  127. package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
  128. package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
  129. package/dist/chunks/{sidepanel.CI8fu1Q3.js → sidepanel.Dt-BnFzN.js} +2 -2
  130. package/dist/chunks/{sidepanel.CI8fu1Q3.js.map → sidepanel.Dt-BnFzN.js.map} +1 -1
  131. package/dist/chunks/step.DMMofD4B.js +217 -0
  132. package/dist/chunks/step.DMMofD4B.js.map +1 -0
  133. package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
  134. package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
  135. package/dist/chunks/summary-grid.types.DsvtLg3D.js +337 -0
  136. package/dist/chunks/summary-grid.types.DsvtLg3D.js.map +1 -0
  137. package/dist/chunks/tab.BhWPBxcB.js +192 -0
  138. package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
  139. package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
  140. package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
  141. package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
  142. package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
  143. package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.Dz66luo5.js} +11 -12
  144. package/dist/chunks/timeline-item.Dz66luo5.js.map +1 -0
  145. package/dist/chunks/{tutorial.DJ_Cwp9i.js → tutorial.DAKO-fKz.js} +4 -4
  146. package/dist/chunks/{tutorial.DJ_Cwp9i.js.map → tutorial.DAKO-fKz.js.map} +1 -1
  147. package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.DQPABFfG.js} +538 -498
  148. package/dist/chunks/use-cached-selected-values.DQPABFfG.js.map +1 -0
  149. package/dist/code-snippet.js +1 -1
  150. package/dist/dashboard-template.js +1 -1
  151. package/dist/dashed-underline.js +1 -1
  152. package/dist/data-grid-template.js +1 -1
  153. package/dist/data-grid.js +1 -1
  154. package/dist/date-picker.js +2 -2
  155. package/dist/date-range-picker.js +2 -2
  156. package/dist/date.js +1 -1
  157. package/dist/dropdown.js +4 -4
  158. package/dist/file-uploader.js +1 -1
  159. package/dist/filter-bar.js +1 -1
  160. package/dist/header-with-views.js +1 -1
  161. package/dist/header.js +1 -1
  162. package/dist/index.js +45 -45
  163. package/dist/info-icon.js +1 -1
  164. package/dist/input-field-password.js +1 -1
  165. package/dist/input-field-phone-number.js +1 -1
  166. package/dist/input-field.js +1 -1
  167. package/dist/internal.js +8 -8
  168. package/dist/menu.js +1 -1
  169. package/dist/modal-fullscreen.js +1 -1
  170. package/dist/modal.js +2 -2
  171. package/dist/pagination.js +1 -1
  172. package/dist/popover.js +1 -1
  173. package/dist/radio-group.js +1 -1
  174. package/dist/rich-text-editor.js +1 -1
  175. package/dist/search-bar.js +2 -2
  176. package/dist/secondary-nav.js +1 -1
  177. package/dist/selection-card.js +1 -1
  178. package/dist/sidepanel.js +1 -1
  179. package/dist/stepper.js +1 -1
  180. package/dist/structured-list.js +1 -1
  181. package/dist/styles/bento-dark.css +1 -0
  182. package/dist/styles/bento-light.css +1 -0
  183. package/dist/styles/bento.css +1 -0
  184. package/dist/styles/legacy.css +1 -0
  185. package/dist/styles/styleguide.css +1 -0
  186. package/dist/summary-grid.js +1 -1
  187. package/dist/tabs.js +1 -1
  188. package/dist/textarea.js +1 -1
  189. package/dist/timeline.js +1 -1
  190. package/dist/tutorial.js +1 -1
  191. package/dist/web-types.json +261 -81
  192. package/package.json +6 -6
  193. package/dist/assets/tabs.css +0 -1
  194. package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
  195. package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
  196. package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
  197. package/dist/chunks/button-actions._OIvTdKt.js.map +0 -1
  198. package/dist/chunks/calendar.DbTC35rM.js +0 -1167
  199. package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
  200. package/dist/chunks/copy.CXeLbvUP.js +0 -129
  201. package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
  202. package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
  203. package/dist/chunks/data-grid.D4oeTUhn.js.map +0 -1
  204. package/dist/chunks/date-range-picker.D9lyIoO-.js.map +0 -1
  205. package/dist/chunks/date.dYFFEunA.js +0 -987
  206. package/dist/chunks/date.dYFFEunA.js.map +0 -1
  207. package/dist/chunks/dropdown-default-textbox.BNuuA4ES.js.map +0 -1
  208. package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
  209. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
  210. package/dist/chunks/header-with-views.Ds9mcwmp.js.map +0 -1
  211. package/dist/chunks/index.BDuTpjD8.js +0 -40
  212. package/dist/chunks/index.BDuTpjD8.js.map +0 -1
  213. package/dist/chunks/index.DD7TppDb.js +0 -10
  214. package/dist/chunks/index.DD7TppDb.js.map +0 -1
  215. package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
  216. package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
  217. package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
  218. package/dist/chunks/input-field.B_3nZFYz.js +0 -152
  219. package/dist/chunks/input-field.B_3nZFYz.js.map +0 -1
  220. package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
  221. package/dist/chunks/step.dNTg2rtW.js +0 -217
  222. package/dist/chunks/step.dNTg2rtW.js.map +0 -1
  223. package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
  224. package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
  225. package/dist/chunks/tabs.Dx6teJGW.js +0 -205
  226. package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
  227. package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
  228. package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
  229. package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
@@ -1,217 +0,0 @@
1
- import { defineComponent as V, ref as p, computed as o, watch as N, provide as L, readonly as W, useSlots as z, inject as U, onMounted as Z, onBeforeUnmount as j } from "vue";
2
- import { B as D } from "./typography.J1v_SPG3.js";
3
- import { u as G } from "./i18n.BQkEbtPM.js";
4
- import { B as A, a as M } from "./keyboard-navigation.pB8weElW.js";
5
- import { n as k } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
- import { B as q } from "./base-button.-gx_u8Bd.js";
7
- import { C as J } from "./checkmark-small.DVDtD4HQ.js";
8
- import { D as Q } from "./dot.BW9SneIk.js";
9
- import "../assets/step.css";
10
- const X = (a) => {
11
- function n(i) {
12
- return ({ detail: c }) => {
13
- var t;
14
- c.preventDefault();
15
- const l = a.value.indexOf(document.activeElement);
16
- l < 0 || (t = a.value[l + i]) == null || t.focus();
17
- };
18
- }
19
- const s = n(-1), e = n(1);
20
- return {
21
- [A.ARROW_DOWN]: e,
22
- [A.ARROW_RIGHT]: e,
23
- [A.ARROW_UP]: s,
24
- [A.ARROW_LEFT]: s
25
- };
26
- }, Y = (a) => {
27
- const n = a.buttonElement.value.parentElement, s = n.parentElement;
28
- return Array.from(s.children).indexOf(n);
29
- }, P = (a) => ({ registerStep: (e) => {
30
- const i = Y(e);
31
- a.value.splice(i, 0, {
32
- stepContent: e.stepContent,
33
- buttonElement: e.buttonElement,
34
- substeps: e.substeps
35
- });
36
- }, removeStep: (e) => {
37
- a.value.splice(
38
- a.value.findIndex((i) => i.buttonElement === e.buttonElement.value),
39
- 1
40
- );
41
- } }), B = Symbol("stepper state");
42
- var T = /* @__PURE__ */ ((a) => (a.LINEAR = "linear", a.NON_LINEAR = "non-linear", a))(T || {}), O = /* @__PURE__ */ ((a) => (a.HORIZONTAL = "horizontal", a.VERTICAL = "vertical", a))(O || {});
43
- const ee = {
44
- "en-US": {
45
- step: "Step {currentIndex}/{totalSteps} {content}"
46
- }
47
- }, te = {
48
- i18n: { messages: ee },
49
- name: "stepper"
50
- }, se = /* @__PURE__ */ V({
51
- ...te,
52
- props: {
53
- /**
54
- * Type of stepper; defines how the stepper should behave. Default: linear
55
- * @values linear, non-linear
56
- */
57
- type: {
58
- type: String,
59
- default: "linear"
60
- },
61
- /**
62
- * Stepper variant; defines how the stepper should be displayed. Default: vertical
63
- * @values vertical, horizontal
64
- */
65
- variant: {
66
- type: String,
67
- default: "vertical"
68
- },
69
- /**
70
- * Active step index
71
- */
72
- index: {
73
- type: Number,
74
- default: 0
75
- }
76
- },
77
- emits: ["update:index"],
78
- setup(a, { emit: n }) {
79
- const s = a, { t: e } = G(), i = p([]), c = p(s.index), l = p(c.value), t = (r) => {
80
- r > l.value && (l.value = r), c.value = r;
81
- }, m = o(() => {
82
- var r;
83
- return (r = i.value[c.value]) == null ? void 0 : r.stepContent;
84
- }), v = o(() => i.value.length), _ = o(() => i.value.map(({ buttonElement: r }) => r)), f = o(() => s.variant === O.HORIZONTAL), d = o(
85
- () => i.value.map(({ buttonElement: r, substeps: E }, y) => {
86
- const R = c.value === y;
87
- return !f.value && R ? [r].concat(E.map((C) => C.buttonElement)) : [r];
88
- }).flat()
89
- ), { registerStep: b, removeStep: S } = P(i), x = p({
90
- activeStepIndex: c,
91
- latestActiveStep: l,
92
- steps: _,
93
- type: s.type,
94
- variant: s.variant,
95
- navigateToStep: t,
96
- registerStep: b,
97
- removeStep: S
98
- }), g = o(() => ({
99
- "b-stepper__list--horizontal": f.value
100
- }));
101
- N(() => s.index, t), N(c, (r) => {
102
- n("update:index", r);
103
- });
104
- const I = X(d);
105
- return L(B, W(x)), { __sfc: !0, props: s, emit: n, t: e, childrenSteps: i, activeStepIndex: c, latestActiveStep: l, navigateToStep: t, currentStepContent: m, stepsAmount: v, childrenStepsElements: _, isHorizontalVariant: f, allVisibleStepsElements: d, registerStep: b, removeStep: S, stepperState: x, conditionalClasses: g, keyboardNavigationListeners: I, BentoTypography: D, vBentoKeyboardNavigationDirective: M };
106
- }
107
- });
108
- var ne = function() {
109
- var n = this, s = n._self._c, e = n._self._setupProxy;
110
- return s("nav", { staticClass: "b-stepper" }, [s("ol", n._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-stepper__list", class: e.conditionalClasses }, e.keyboardNavigationListeners), [n._t("default")], 2), s(e.BentoTypography, { staticClass: "b-stepper__text-stepper", attrs: { el: "span", variant: "body", stronger: "" } }, [n._v(n._s(e.t("step", { currentIndex: e.activeStepIndex + 1, totalSteps: e.stepsAmount, content: e.currentStepContent })) + " ")])], 1);
111
- }, ae = [], oe = /* @__PURE__ */ k(
112
- se,
113
- ne,
114
- ae,
115
- !1,
116
- null,
117
- "8dd6f794"
118
- );
119
- const ye = oe.exports, re = {
120
- name: "step"
121
- }, ie = /* @__PURE__ */ V({
122
- ...re,
123
- props: {
124
- /**
125
- * Completed status. Used on non-linear steppers to indicate if the step is completed.
126
- */
127
- completed: {
128
- type: Boolean,
129
- default: !1
130
- },
131
- /**
132
- * Active substep index
133
- */
134
- substepIndex: {
135
- type: Number,
136
- default: 0
137
- }
138
- },
139
- emits: ["update:substep-index"],
140
- setup(a, { emit: n }) {
141
- const s = a, e = z(), i = p(null), c = p(null), l = p([]), t = U(B), m = o(() => {
142
- var u;
143
- return (u = i.value) == null ? void 0 : u.$el;
144
- }), v = o(() => t == null ? void 0 : t.value.steps.indexOf(m.value)), _ = o(() => {
145
- var u;
146
- return (u = c.value) == null ? void 0 : u.$el.textContent;
147
- }), f = o(() => l.value.map(({ buttonElement: u }) => u)), d = p(s.substepIndex), b = p(d.value), S = (u) => {
148
- u > b.value && (b.value = u), d.value = u;
149
- }, { registerStep: x, removeStep: g } = P(l), I = p({
150
- activeStepIndex: d,
151
- latestActiveStep: b,
152
- type: t.value.type,
153
- variant: t.value.variant,
154
- steps: f,
155
- isParentStep: !0,
156
- navigateToStep: S,
157
- registerStep: x,
158
- removeStep: g
159
- });
160
- L(B, I), N(() => s.substepIndex, S), N(d, (u) => {
161
- n("update:substep-index", u);
162
- }), Z(() => {
163
- if (!t)
164
- throw new Error(
165
- "BentoStep components should only be used inside BentoStepper or other BentoStep components."
166
- );
167
- t.value.registerStep({
168
- buttonElement: m,
169
- stepContent: _,
170
- substeps: l
171
- });
172
- }), j(() => {
173
- t.value.removeStep({
174
- buttonElement: m,
175
- stepContent: _,
176
- substeps: l
177
- });
178
- });
179
- const r = o(() => t.value.isParentStep), E = p(!1), y = o(() => (t == null ? void 0 : t.value.activeStepIndex) === v.value), R = o(
180
- () => y.value && t.value.variant !== O.HORIZONTAL && !r.value && e.substeps
181
- ), h = o(() => (t == null ? void 0 : t.value.type) === T.NON_LINEAR ? s.completed : (t == null ? void 0 : t.value.latestActiveStep) > v.value), C = o(
182
- () => (t == null ? void 0 : t.value.type) === T.LINEAR && v.value > (t == null ? void 0 : t.value.latestActiveStep)
183
- ), $ = () => {
184
- C.value || t.value.navigateToStep(v.value);
185
- }, w = o(() => y.value ? "step" : "false"), F = o(() => C.value.toString()), H = o(() => E.value || v.value === 0 && !r.value ? "0" : "-1"), K = o(() => ({
186
- "b-step--active": y.value,
187
- "b-step--completed": h.value,
188
- "b-step--substep": r.value
189
- }));
190
- return { __sfc: !0, slots: e, props: s, emit: n, buttonComponent: i, stepContent: c, substeps: l, stepper: t, buttonElement: m, index: v, stepContentValue: _, substepsButtonElements: f, activeSubStepIndex: d, latestActiveSubStepIndex: b, navigateToSubstep: S, registerStep: x, removeStep: g, stepState: I, isSubstep: r, isFocused: E, isActive: y, isSubstepsVisible: R, isCompleted: h, isDisabled: C, navigateToStep: $, ariaCurrentValue: w, ariaDisabledValue: F, tabIndexValue: H, conditionalClasses: K, BaseButton: q, BentoTypography: D, CheckmarkSmallIcon: J, DotIcon: Q };
191
- }
192
- });
193
- var le = function() {
194
- var n = this, s = n._self._c, e = n._self._setupProxy;
195
- return s("li", { staticClass: "b-step", class: e.conditionalClasses }, [s(e.BaseButton, { ref: "buttonComponent", staticClass: "b-step__button", attrs: { "aria-current": e.ariaCurrentValue, "aria-disabled": e.ariaDisabledValue, type: "button", tabindex: e.tabIndexValue, disabled: e.isDisabled }, on: { click: e.navigateToStep, focus: function(i) {
196
- e.isFocused = !0;
197
- }, blur: function(i) {
198
- e.isFocused = !1;
199
- } }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
200
- return [s(e.BentoTypography, { staticClass: "b-step__index", attrs: { el: "span", variant: "body", stronger: "", "aria-hidden": "true" } }, [e.isCompleted ? s(e.CheckmarkSmallIcon) : e.isSubstep ? s(e.DotIcon) : [n._v(n._s(e.index + 1))]], 2)];
201
- }, proxy: !0 }]) }, [s(e.BentoTypography, { ref: "stepContent", staticClass: "b-step__content", attrs: { el: "span", variant: "body", stronger: e.isActive } }, [n._t("default")], 2)], 1), s("ul", { directives: [{ name: "show", rawName: "v-show", value: e.isSubstepsVisible, expression: "isSubstepsVisible" }], ref: "substepList", staticClass: "b-step__substep-list" }, [n._t("substeps")], 2)], 1);
202
- }, ue = [], ce = /* @__PURE__ */ k(
203
- ie,
204
- le,
205
- ue,
206
- !1,
207
- null,
208
- "1941e86b"
209
- );
210
- const xe = ce.exports;
211
- export {
212
- T as B,
213
- xe as a,
214
- O as b,
215
- ye as s
216
- };
217
- //# sourceMappingURL=step.dNTg2rtW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"step.dNTg2rtW.js","sources":["../../src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../src/components/stepper/composables/use-step-register/use-step-register.ts","../../src/components/stepper/stepper.keys.ts","../../src/components/stepper/stepper.types.ts","../../src/components/stepper/stepper.vue","../../src/components/stepper/components/step/step.vue"],"sourcesContent":["import { Ref, UnwrapRef } 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<UnwrapRef<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 { Ref, UnwrapRef } from 'vue';\nimport type { BentoStepperStepExposeState } from '../../stepper.types';\n\n/**\n * Gets the position of a `bento-step` element within its `bento-stepper` parent.\n * @param stepState The `bento-step` state.\n * @returns The index of the element.\n */\nconst getStepPosition = (stepState: BentoStepperStepExposeState) => {\n // Button is wrapped by <li> element\n const listItemElement = (stepState.buttonElement as Ref<UnwrapRef<HTMLButtonElement>>).value.parentElement;\n const listElement = listItemElement.parentElement;\n return Array.from(listElement.children).indexOf(listItemElement);\n};\n\n/**\n * Provides methods to register/unregister `bento-step` elements to/from the `bento-stepper` step state.\n * These methods allow for tracking the child step elements, including their position in the DOM tree.\n * @param childrenSteps The `bento-stepper` (or `bento-step` if substeps) step state.\n */\nexport const useStepRegister = (childrenSteps: Ref<BentoStepperStepExposeState[]>) => {\n /**\n * Registers a step's HTML element in the stepper state.\n * Should be called by a `bento-step` when it is mounted.\n * @param stepState The `bento-step` state.\n */\n const registerStep = (stepState: BentoStepperStepExposeState) => {\n const position = getStepPosition(stepState);\n childrenSteps.value.splice(position, 0, {\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as BentoStepperStepExposeState[],\n });\n };\n\n /**\n * Unregisters a step's HTML element in the stepper state.\n * Should be called by a `bento-step` before it is unmounted.\n * @param stepState The `bento-step` state.\n */\n const removeStep = (stepState: BentoStepperStepExposeState) => {\n childrenSteps.value.splice(\n childrenSteps.value.findIndex(step => step.buttonElement === stepState.buttonElement.value),\n 1\n );\n };\n\n return { registerStep, removeStep };\n};\n","export const STEPPER_STATE = Symbol('stepper state');\n","import type { ComputedRef, Ref, UnwrapRef } 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<UnwrapRef<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 removeStep: (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, type DeepReadonly, PropType, provide, readonly, ref, watch } from 'vue';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import { useKeyboardNavigation, useStepRegister } from './composables';\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([\"update:index\"]);\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 const { registerStep, removeStep } = useStepRegister(childrenSteps);\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 removeStep,\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<DeepReadonly<BentoStepperState>>(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","<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, onBeforeUnmount, 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 { useStepRegister } from '../../composables';\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([\"update:substep-index\"]);\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<BentoStepperState>(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 { registerStep, removeStep } = useStepRegister(substeps);\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,\n removeStep,\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 onBeforeUnmount(() => {\n stepper.value.removeStep({\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","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","useI18n","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","onMounted","onBeforeUnmount","isSubstep","isFocused","isActive","isSubstepsVisible","isCompleted","isDisabled","ariaCurrentValue","ariaDisabledValue","tabIndexValue"],"mappings":";;;;;;;;;AAUa,MAAAA,IAAA,C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AC6E,GAGhGzB,IAAA,MAAA;AACI,MAAAyC,EAAA,SAIAhB,EAAA,MAAA,eAAAxB,EAAA,KAAA;AAAA,IAAwC,GAI5CyC,IAAAvC,EAAA,MAAAmC,EAAA,QAAA,SAAA,OAAA,GACAK,IAAAxC,EAAA,MAAAsC,EAAA,MAAA,SAAA,CAAA,GACAG,IAAAzC,EAAA,MAAAkC,EAAA,SAAApC,EAAA,UAAA,KAAA,CAAAmC,EAAA,QAAA,MAAA,IAAA,GAEAtB,IAAAX,EAAA,OAAA;AAAA,MAA2C,kBAAAmC,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,301 +0,0 @@
1
- import { defineComponent as i, useSlots as a, onMounted as I, provide as h, toRef as z, toRefs as P, inject as B, ref as D, computed as s } from "vue";
2
- import { u } from "./use-has-slot.C9lQZ6nz.js";
3
- import { S as R, a as x } from "./summary-grid.keys.CxTf_FOc.js";
4
- import { G } from "./grid-layout.HvTAa4to.js";
5
- import { n as d } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
- import { B as M } from "./dashed-underline.CEaAmjDa.js";
7
- import { B as k } from "./info-icon.B9aTl1nU.js";
8
- import { B as w } from "./typography.J1v_SPG3.js";
9
- import { B as L } from "./tag.CGkclKVL.js";
10
- import { C as E } from "./copy.CXeLbvUP.js";
11
- import "../assets/summary-grid.css";
12
- const A = {}, U = /* @__PURE__ */ i({
13
- ...A,
14
- __name: "summary-grid",
15
- props: {
16
- columnWidth: { default: null },
17
- slashedZero: { type: Boolean, default: !1 }
18
- },
19
- setup(r) {
20
- var _, c;
21
- const e = r, n = a(), t = u(n);
22
- let o = 1;
23
- if (n) {
24
- const y = (c = (_ = Object.keys(n)) == null ? void 0 : _.filter((p) => p.includes("cell-"))) == null ? void 0 : c.map((p) => {
25
- var f;
26
- return parseInt((f = p.split("-")) == null ? void 0 : f[1], 10);
27
- });
28
- o = Math.max(...y);
29
- }
30
- I(() => {
31
- if (o > 3)
32
- throw new Error(
33
- "BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information."
34
- );
35
- });
36
- const l = () => ({ isSummaryGridLayout: !0 });
37
- return h(R, l), h(x, z(e, "slashedZero")), { __sfc: !0, props: e, slots: n, hasSlot: t, numberOfRows: o, registerComponentsInSummaryGrid: l, GridLayout: G };
38
- }
39
- });
40
- var F = function() {
41
- var e = this, n = e._self._c, t = e._self._setupProxy;
42
- return n("div", { staticClass: "b-summary-grid" }, e._l(t.numberOfRows, function(o) {
43
- var l;
44
- return n(t.GridLayout, { key: `summary-grid-row-${o}`, attrs: { "data-testid": `summary-grid-row-${o}`, "column-width": (l = e.columnWidth) == null ? void 0 : l[`row${o}`] }, scopedSlots: e._u([t.hasSlot(`cell-${o}-1`) ? { key: "col-1", fn: function() {
45
- return [e._t(`cell-${o}-1`)];
46
- }, proxy: !0 } : null, t.hasSlot(`cell-${o}-2`) ? { key: "col-2", fn: function() {
47
- return [e._t(`cell-${o}-2`)];
48
- }, proxy: !0 } : null, t.hasSlot(`cell-${o}-3`) ? { key: "col-3", fn: function() {
49
- return [e._t(`cell-${o}-3`)];
50
- }, proxy: !0 } : null, t.hasSlot(`cell-${o}-4`) ? { key: "col-4", fn: function() {
51
- return [e._t(`cell-${o}-4`)];
52
- }, proxy: !0 } : null, t.hasSlot(`cell-${o}-5`) ? { key: "col-5", fn: function() {
53
- return [e._t(`cell-${o}-5`)];
54
- }, proxy: !0 } : null, t.hasSlot(`cell-${o}-6`) ? { key: "col-6", fn: function() {
55
- return [e._t(`cell-${o}-6`)];
56
- }, proxy: !0 } : null], null, !0) });
57
- }), 1);
58
- }, O = [], V = /* @__PURE__ */ d(
59
- U,
60
- F,
61
- O,
62
- !1,
63
- null,
64
- "397e4d9c"
65
- );
66
- const Re = V.exports, N = {}, Y = /* @__PURE__ */ i({
67
- ...N,
68
- __name: "summary-grid-item",
69
- props: {
70
- copy: { default: void 0 },
71
- fitContent: { type: Boolean, default: !1 },
72
- infoIconTooltipText: { default: null },
73
- size: { default: "small" },
74
- title: null,
75
- trend: { default: null },
76
- trendDirection: { default: "positive" },
77
- secondaryTrend: { default: null },
78
- secondaryTrendDirection: { default: "positive" },
79
- underlinePopoverSize: { default: "fit-content" },
80
- underlineTooltipText: { default: null },
81
- itemType: { default: "custom" }
82
- },
83
- setup(r) {
84
- const e = r, { trendDirection: n, secondaryTrendDirection: t, itemType: o, size: l } = P(e), _ = B(x, D(!1)), c = (C) => {
85
- switch (C) {
86
- case "positive":
87
- return "green";
88
- case "negative":
89
- return "red";
90
- default:
91
- return "blue";
92
- }
93
- }, y = s(() => c(n.value)), p = s(() => c(t.value)), f = s(() => l.value === "small" ? "body" : o.value !== "text" ? "title" : null), S = s(() => ({
94
- medium: l.value === "large",
95
- strongest: l.value === "small",
96
- wide: l.value === "small",
97
- variant: f.value
98
- })), g = s(() => e.fitContent ? { width: "fit-content" } : {}), $ = s(() => ({ "b-summary-grid-item--slashed-zero": _.value })), v = a(), T = u(v), b = s(() => e.underlineTooltipText || T("dashed-underline"));
99
- return { __sfc: !0, props: e, trendDirection: n, secondaryTrendDirection: t, itemType: o, size: l, hasSlashedZero: _, tagVariantColor: c, trendVariant: y, secondaryTrendVariant: p, typographyContentElement: f, typographyProps: S, computedStyles: g, conditionalClasses: $, slots: v, hasSlot: T, withUnderline: b, BentoDashedUnderline: M, BentoInfoIcon: k, BentoTypography: w, BentoTag: L, Copy: E };
100
- }
101
- });
102
- var Z = function() {
103
- var e = this, n = e._self._c, t = e._self._setupProxy;
104
- return n("div", { staticClass: "b-summary-grid-item", class: t.conditionalClasses, style: t.computedStyles }, [n("div", { staticClass: "b-summary-grid-item__header" }, [n(t.BentoTypography, { staticClass: "b-summary-grid-item__title", attrs: { el: "span", variant: "body" } }, [t.withUnderline ? n(t.BentoDashedUnderline, { attrs: { "tooltip-text": e.underlineTooltipText, "popover-size": e.underlinePopoverSize }, scopedSlots: e._u([t.hasSlot("dashed-underline") ? { key: "popover-content", fn: function() {
105
- return [e._t("dashed-underline")];
106
- }, proxy: !0 } : null], null, !0) }, [e._v(" " + e._s(e.title) + " ")]) : [e._v(" " + e._s(e.title) + " ")]], 2), n("div", { staticClass: "b-summary-grid-item__title-icons" }, [e.copy ? n(t.Copy, { staticClass: "b-structured-list__icon", attrs: { text: e.copy } }) : e._e(), e.infoIconTooltipText ? n(t.BentoInfoIcon, { staticClass: "b-summary-grid-item__title-tooltip", attrs: { "tooltip-text": e.infoIconTooltipText, "tooltip-position": "top" } }) : e._e()], 1)], 1), n(t.BentoTypography, e._b({ staticClass: "b-summary-grid-item__title", attrs: { "data-testid": "summary-grid-item-content-typography", el: "span" } }, "bento-typography", t.typographyProps, !1), [e._t("default"), e.trend && t.itemType !== "text" ? n(t.BentoTag, { staticClass: "b-summary-grid-item__content-trend", attrs: { variant: t.trendVariant, label: e.trend } }) : e._e()], 2), t.hasSlot("secondary") ? n(t.BentoTypography, { staticClass: "b-summary-grid-item__title", attrs: { "data-testid": "summary-grid-item-secondary-metric-typography", el: "span", variant: "caption", stronger: "" } }, [e._t("secondary"), e.secondaryTrend ? n(t.BentoTag, { staticClass: "b-summary-grid-item__content-trend", attrs: { variant: t.secondaryTrendVariant, label: e.secondaryTrend } }) : e._e()], 2) : e._e()], 1);
107
- }, j = [], H = /* @__PURE__ */ d(
108
- Y,
109
- Z,
110
- j,
111
- !1,
112
- null,
113
- "16193401"
114
- );
115
- const m = H.exports, W = {}, J = /* @__PURE__ */ i({
116
- ...W,
117
- __name: "summary-grid-item-amount",
118
- props: {
119
- copy: { default: void 0 },
120
- fitContent: { type: Boolean, default: !1 },
121
- infoIconTooltipText: { default: null },
122
- size: { default: "small" },
123
- title: null,
124
- trend: { default: null },
125
- trendDirection: { default: "positive" },
126
- secondaryTrend: { default: null },
127
- secondaryTrendDirection: { default: "positive" },
128
- underlinePopoverSize: { default: "fit-content" },
129
- underlineTooltipText: { default: null },
130
- label: null,
131
- secondaryLabel: { default: null },
132
- secondaryMetric: { default: null }
133
- },
134
- setup(r) {
135
- const e = a(), n = u(e);
136
- return { __sfc: !0, slots: e, hasSlot: n, SummaryGridItem: m };
137
- }
138
- });
139
- var K = function() {
140
- var e = this, n = e._self._c, t = e._self._setupProxy;
141
- return n(t.SummaryGridItem, { staticClass: "b-summary-grid-item-amount", attrs: { "item-type": "amount", "info-icon-tooltip-text": e.infoIconTooltipText, title: e.title, copy: e.copy, "fit-content": e.fitContent, size: e.size, trend: e.trend, "trend-direction": e.trendDirection, "secondary-trend": e.secondaryTrend, "secondary-trend-direction": e.secondaryTrendDirection, "underline-popover-size": e.underlinePopoverSize, "underline-tooltip-text": e.underlineTooltipText }, scopedSlots: e._u([t.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
142
- return [e._t("dashed-underline")];
143
- }, proxy: !0 } : null, e.secondaryMetric ? { key: "secondary", fn: function() {
144
- return [e._v(" " + e._s(e.secondaryMetric) + " ")];
145
- }, proxy: !0 } : null], null, !0) }, [n("div", { staticClass: "b-summary-grid-item-amount__content" }, [n("div", [e._v(e._s(e.label))]), e.secondaryLabel ? n("div", { staticClass: "b-summary-grid-item-amount__secondary-label" }, [e._v(e._s(e.secondaryLabel))]) : e._e()])]);
146
- }, q = [], Q = /* @__PURE__ */ d(
147
- J,
148
- K,
149
- q,
150
- !1,
151
- null,
152
- "36b6a7a6"
153
- );
154
- const Ge = Q.exports, X = {}, ee = /* @__PURE__ */ i({
155
- ...X,
156
- __name: "summary-grid-item-numeric",
157
- props: {
158
- copy: { default: void 0 },
159
- fitContent: { type: Boolean, default: !1 },
160
- infoIconTooltipText: { default: null },
161
- size: { default: "small" },
162
- title: null,
163
- trend: { default: null },
164
- trendDirection: { default: "positive" },
165
- secondaryTrend: { default: null },
166
- secondaryTrendDirection: { default: "positive" },
167
- underlinePopoverSize: { default: "fit-content" },
168
- underlineTooltipText: { default: null },
169
- label: null,
170
- secondaryMetric: { default: null }
171
- },
172
- setup(r) {
173
- const e = a(), n = u(e);
174
- return { __sfc: !0, slots: e, hasSlot: n, SummaryGridItem: m };
175
- }
176
- });
177
- var te = function() {
178
- var e = this, n = e._self._c, t = e._self._setupProxy;
179
- return n(t.SummaryGridItem, { staticClass: "b-summary-grid-item-numeric", attrs: { "item-type": "numeric", "info-icon-tooltip-text": e.infoIconTooltipText, title: e.title, copy: e.copy, "fit-content": e.fitContent, size: e.size, trend: e.trend, "trend-direction": e.trendDirection, "secondary-trend": e.secondaryTrend, "secondary-trend-direction": e.secondaryTrendDirection, "underline-popover-size": e.underlinePopoverSize, "underline-tooltip-text": e.underlineTooltipText }, scopedSlots: e._u([t.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
180
- return [e._t("dashed-underline")];
181
- }, proxy: !0 } : null, e.secondaryMetric ? { key: "secondary", fn: function() {
182
- return [e._v(" " + e._s(e.secondaryMetric) + " ")];
183
- }, proxy: !0 } : null], null, !0) }, [e._v(" " + e._s(e.label) + " ")]);
184
- }, ne = [], re = /* @__PURE__ */ d(
185
- ee,
186
- te,
187
- ne,
188
- !1,
189
- null,
190
- null
191
- );
192
- const Me = re.exports, oe = {}, le = /* @__PURE__ */ i({
193
- ...oe,
194
- __name: "summary-grid-item-percentage",
195
- props: {
196
- copy: { default: void 0 },
197
- fitContent: { type: Boolean, default: !1 },
198
- infoIconTooltipText: { default: null },
199
- size: { default: "small" },
200
- title: null,
201
- trend: { default: null },
202
- trendDirection: { default: "positive" },
203
- secondaryTrend: { default: null },
204
- secondaryTrendDirection: { default: "positive" },
205
- underlinePopoverSize: { default: "fit-content" },
206
- underlineTooltipText: { default: null },
207
- label: null,
208
- secondaryMetric: { default: null }
209
- },
210
- setup(r) {
211
- const e = a(), n = u(e);
212
- return { __sfc: !0, slots: e, hasSlot: n, SummaryGridItem: m };
213
- }
214
- });
215
- var se = function() {
216
- var e = this, n = e._self._c, t = e._self._setupProxy;
217
- return n(t.SummaryGridItem, { staticClass: "b-summary-grid-item-percentage", attrs: { "item-type": "percentage", "info-icon-tooltip-text": e.infoIconTooltipText, title: e.title, copy: e.copy, "fit-content": e.fitContent, size: e.size, trend: e.trend, "trend-direction": e.trendDirection, "secondary-trend": e.secondaryTrend, "secondary-trend-direction": e.secondaryTrendDirection, "underline-popover-size": e.underlinePopoverSize, "underline-tooltip-text": e.underlineTooltipText }, scopedSlots: e._u([t.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
218
- return [e._t("dashed-underline")];
219
- }, proxy: !0 } : null, e.secondaryMetric ? { key: "secondary", fn: function() {
220
- return [e._v(" " + e._s(e.secondaryMetric) + "% ")];
221
- }, proxy: !0 } : null], null, !0) }, [e._v(" " + e._s(e.label) + "% ")]);
222
- }, ie = [], ae = /* @__PURE__ */ d(
223
- le,
224
- se,
225
- ie,
226
- !1,
227
- null,
228
- null
229
- );
230
- const ke = ae.exports, ue = {}, de = /* @__PURE__ */ i({
231
- ...ue,
232
- __name: "summary-grid-item-text",
233
- props: {
234
- copy: { default: void 0 },
235
- fitContent: { type: Boolean, default: !1 },
236
- infoIconTooltipText: { default: null },
237
- label: null,
238
- title: null,
239
- underlinePopoverSize: { default: "fit-content" },
240
- underlineTooltipText: { default: null }
241
- },
242
- setup(r) {
243
- const e = a(), n = u(e);
244
- return { __sfc: !0, slots: e, hasSlot: n, SummaryGridItem: m };
245
- }
246
- });
247
- var ce = function() {
248
- var e = this, n = e._self._c, t = e._self._setupProxy;
249
- return n(t.SummaryGridItem, { staticClass: "b-summary-grid-item-text", attrs: { "item-type": "text", "info-icon-tooltip-text": e.infoIconTooltipText, title: e.title, copy: e.copy, "fit-content": e.fitContent, "underline-popover-size": e.underlinePopoverSize, "underline-tooltip-text": e.underlineTooltipText }, scopedSlots: e._u([t.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
250
- return [e._t("dashed-underline")];
251
- }, proxy: !0 } : null], null, !0) }, [e._v(" " + e._s(e.label) + " ")]);
252
- }, _e = [], pe = /* @__PURE__ */ d(
253
- de,
254
- ce,
255
- _e,
256
- !1,
257
- null,
258
- null
259
- );
260
- const we = pe.exports, fe = {}, me = /* @__PURE__ */ i({
261
- ...fe,
262
- __name: "summary-grid-item-custom",
263
- props: {
264
- copy: { default: void 0 },
265
- infoIconTooltipText: { default: null },
266
- title: null,
267
- fitContent: { type: Boolean, default: !1 },
268
- underlinePopoverSize: { default: "fit-content" },
269
- underlineTooltipText: { default: null }
270
- },
271
- setup(r) {
272
- const e = a(), n = u(e);
273
- return { __sfc: !0, slots: e, hasSlot: n, SummaryGridItem: m };
274
- }
275
- });
276
- var ye = function() {
277
- var e = this, n = e._self._c, t = e._self._setupProxy;
278
- return n(t.SummaryGridItem, { attrs: { title: e.title, "info-icon-tooltip-text": e.infoIconTooltipText, copy: e.copy, "fit-content": e.fitContent, "underline-popover-size": e.underlinePopoverSize, "underline-tooltip-text": e.underlineTooltipText }, scopedSlots: e._u([t.hasSlot("dashed-underline") ? { key: "dashed-underline", fn: function() {
279
- return [e._t("dashed-underline")];
280
- }, proxy: !0 } : null], null, !0) }, [e._t("default")], 2);
281
- }, ve = [], Te = /* @__PURE__ */ d(
282
- me,
283
- ye,
284
- ve,
285
- !1,
286
- null,
287
- null
288
- );
289
- const Le = Te.exports;
290
- var he = /* @__PURE__ */ ((r) => (r.SMALL = "small", r.MEDIUM = "medium", r.LARGE = "large", r))(he || {}), xe = /* @__PURE__ */ ((r) => (r.POSITIVE = "positive", r.NEGATIVE = "negative", r.NEUTRAL = "neutral", r))(xe || {});
291
- export {
292
- he as B,
293
- Ge as a,
294
- Me as b,
295
- ke as c,
296
- we as d,
297
- Le as e,
298
- xe as f,
299
- Re as s
300
- };
301
- //# sourceMappingURL=summary-grid.types.CkUIw703.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"summary-grid.types.CkUIw703.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../src/components/summary-grid/summary-grid.types.ts"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, provide, toRef, useSlots } from 'vue';\n import type { BentoSummaryGridLayout, BentoSummaryGridProps } from './summary-grid.types';\n import { GridLayout } from '@/components/internal';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n const props = defineProps({\n columnWidth: { default: null },\n slashedZero: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n }\n\n onMounted(() => {\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n });\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n <bento-dashed-underline\n v-if=\"withUnderline\"\n :tooltip-text=\"underlineTooltipText\"\n :popover-size=\"underlinePopoverSize\"\n >\n {{ title }}\n <template v-if=\"hasSlot('dashed-underline')\" #popover-content>\n <slot name=\"dashed-underline\"></slot>\n </template>\n </bento-dashed-underline>\n <template v-else>\n {{ title }}\n </template>\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, toRefs, useSlots } from 'vue';\n\n // Components\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import type { BentoSummaryGridItemTrendDirection } from '@/components/summary-grid/summary-grid.types';\n import type { BentoSummaryGridItemProps } from './summary-grid-item.types';\n\n const props = defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n itemType: { default: 'custom' }\n});\n\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = (direction: `${BentoSummaryGridItemTrendDirection}`): `${BentoTagVariant}` => {\n switch (direction) {\n case 'positive':\n return 'green';\n case 'negative':\n return 'red';\n default:\n return 'blue';\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed<`${BentoTypographyVariant}`>(() => {\n if (size.value === 'small') {\n return 'body';\n }\n if (itemType.value !== 'text') {\n return 'title';\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === 'large',\n strongest: size.value === 'small',\n wide: size.value === 'small',\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const withUnderline = computed(() => props.underlineTooltipText || hasSlot('dashed-underline'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-amount\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <div v-if=\"secondaryLabel\" class=\"b-summary-grid-item-amount__secondary-label\">{{ secondaryLabel }}</div>\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemAmountProps } from './summary-grid-item-amount.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryLabel: { default: null },\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-numeric\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemNumericProps } from './summary-grid-item-numeric.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-percentage\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}%\n <template v-if=\"secondaryMetric\" #secondary> {{ secondaryMetric }}% </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemPercentageProps } from './summary-grid-item-percentage.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n size: { default: 'small' },\n title: null,\n trend: { default: null },\n trendDirection: { default: 'positive' },\n secondaryTrend: { default: null },\n secondaryTrendDirection: { default: 'positive' },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null },\n label: null,\n secondaryMetric: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-text\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n\n import type { BentoSummaryGridItemTextProps } from './summary-grid-item-text.types';\n\n defineProps({\n copy: { default: undefined },\n fitContent: { type: Boolean, default: false },\n infoIconTooltipText: { default: null },\n label: null,\n title: null,\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-popover-size=\"underlinePopoverSize\"\n :underline-tooltip-text=\"underlineTooltipText\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <slot />\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import SummaryGridItem from '../summary-grid-item/summary-grid-item.vue';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemCustomProps } from './summary-grid-item-custom.types';\n\n defineProps({\n copy: { default: undefined },\n infoIconTooltipText: { default: null },\n title: null,\n fitContent: { type: Boolean, default: false },\n underlinePopoverSize: { default: 'fit-content' },\n underlineTooltipText: { default: null }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n","import { GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n\nexport interface BentoSummaryGridProps {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth?: BentoSummaryGridColumnWidth;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n}\n"],"names":["__default__$6","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","_b","_a","slotName","onMounted","registerComponentsInSummaryGrid","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","props","__default__$5","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","trendVariant","computed","secondaryTrendVariant","typographyContentElement","typographyProps","computedStyles","conditionalClasses","withUnderline","__default__$4","__default__$3","__default__$2","__default__$1","__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