@adyen/bento-vue3 1.56.2 → 1.57.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 (227) hide show
  1. package/dist/@types/index.d.ts +20 -1
  2. package/dist/action-bar.js +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/checkbox-input.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/error-message.css +1 -1
  12. package/dist/assets/file-uploader.css +1 -1
  13. package/dist/assets/inspector.css +1 -1
  14. package/dist/assets/link.css +1 -1
  15. package/dist/assets/menu.css +1 -1
  16. package/dist/assets/modal-fullscreen.css +1 -1
  17. package/dist/assets/pagination.css +1 -1
  18. package/dist/assets/popover.css +1 -1
  19. package/dist/assets/rich-text-editor.css +1 -0
  20. package/dist/assets/sidepanel.css +1 -1
  21. package/dist/button.js +3 -3
  22. package/dist/card.js +1 -1
  23. package/dist/checkbox.js +3 -3
  24. package/dist/chunks/_commonjsHelpers.C6fGbg64.js +7 -0
  25. package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +1 -0
  26. package/dist/chunks/{action-bar.CD5FQjE9.js → action-bar.BOCrfaHz.js} +6 -6
  27. package/dist/chunks/{action-bar.CD5FQjE9.js.map → action-bar.BOCrfaHz.js.map} +1 -1
  28. package/dist/chunks/{alert.CFb4Sejw.js → alert.CjegN2iG.js} +2 -2
  29. package/dist/chunks/{alert.CFb4Sejw.js.map → alert.CjegN2iG.js.map} +1 -1
  30. package/dist/chunks/{base-modal.qhldLovE.js → base-modal.DhzWPnD5.js} +29 -30
  31. package/dist/chunks/base-modal.DhzWPnD5.js.map +1 -0
  32. package/dist/chunks/{button-actions-with-menu.CxB1fVvx.js → button-actions-with-menu.CkyIwzNi.js} +5 -5
  33. package/dist/chunks/{button-actions-with-menu.CxB1fVvx.js.map → button-actions-with-menu.CkyIwzNi.js.map} +1 -1
  34. package/dist/chunks/{button-actions.ODJKaCW7.js → button-actions.DWGBFisz.js} +2 -2
  35. package/dist/chunks/{button-actions.ODJKaCW7.js.map → button-actions.DWGBFisz.js.map} +1 -1
  36. package/dist/chunks/{button.BHZgsGkp.js → button.CVZJTZv0.js} +2 -2
  37. package/dist/chunks/{button.BHZgsGkp.js.map → button.CVZJTZv0.js.map} +1 -1
  38. package/dist/chunks/{calendar.Dymq4e0Y.js → calendar.D61aBwg1.js} +87 -90
  39. package/dist/chunks/{calendar.Dymq4e0Y.js.map → calendar.D61aBwg1.js.map} +1 -1
  40. package/dist/chunks/{card.DQ6g6hqK.js → card.DguoAMcm.js} +2 -2
  41. package/dist/chunks/{card.DQ6g6hqK.js.map → card.DguoAMcm.js.map} +1 -1
  42. package/dist/chunks/{checkbox-group.CiYObaZV.js → checkbox-group.CZ-J707C.js} +4 -4
  43. package/dist/chunks/{checkbox-group.CiYObaZV.js.map → checkbox-group.CZ-J707C.js.map} +1 -1
  44. package/dist/chunks/checkbox-input.DVayucaL.js +168 -0
  45. package/dist/chunks/checkbox-input.DVayucaL.js.map +1 -0
  46. package/dist/chunks/{checkbox.CWfZNdfT.js → checkbox.CMuObeL7.js} +4 -4
  47. package/dist/chunks/{checkbox.CWfZNdfT.js.map → checkbox.CMuObeL7.js.map} +1 -1
  48. package/dist/chunks/{code-snippet.CG00Tb5k.js → code-snippet.WgKhySvn.js} +5 -5
  49. package/dist/chunks/{code-snippet.CG00Tb5k.js.map → code-snippet.WgKhySvn.js.map} +1 -1
  50. package/dist/chunks/{controls-group.DgrzEh4C.js → controls-group.DsGEDyTw.js} +2 -2
  51. package/dist/chunks/{controls-group.DgrzEh4C.js.map → controls-group.DsGEDyTw.js.map} +1 -1
  52. package/dist/chunks/{copy.CfFh4b_c.js → copy.QuF9bDfT.js} +3 -3
  53. package/dist/chunks/{copy.CfFh4b_c.js.map → copy.QuF9bDfT.js.map} +1 -1
  54. package/dist/chunks/{dashboard-section.tza4iYcv.js → dashboard-section.fZiEAres.js} +4 -4
  55. package/dist/chunks/{dashboard-section.tza4iYcv.js.map → dashboard-section.fZiEAres.js.map} +1 -1
  56. package/dist/chunks/{dashed-underline.B2cIJkg_.js → dashed-underline.BZ_oZeHs.js} +3 -3
  57. package/dist/chunks/{dashed-underline.B2cIJkg_.js.map → dashed-underline.BZ_oZeHs.js.map} +1 -1
  58. package/dist/chunks/{data-grid-template.PGPytWvk.js → data-grid-template.Cw-0-al0.js} +3 -3
  59. package/dist/chunks/{data-grid-template.PGPytWvk.js.map → data-grid-template.Cw-0-al0.js.map} +1 -1
  60. package/dist/chunks/{data-grid.DW_9jlLU.js → data-grid.BVcmZ1X_.js} +19 -19
  61. package/dist/chunks/{data-grid.DW_9jlLU.js.map → data-grid.BVcmZ1X_.js.map} +1 -1
  62. package/dist/chunks/{date-picker.8jgg3MJm.js → date-picker.CWGFy7Hb.js} +17 -17
  63. package/dist/chunks/{date-picker.8jgg3MJm.js.map → date-picker.CWGFy7Hb.js.map} +1 -1
  64. package/dist/chunks/{date-range-picker.BxmkXpEh.js → date-range-picker.RzinIKLS.js} +26 -26
  65. package/dist/chunks/{date-range-picker.BxmkXpEh.js.map → date-range-picker.RzinIKLS.js.map} +1 -1
  66. package/dist/chunks/dialog-page.C72BX6So.js +175 -0
  67. package/dist/chunks/dialog-page.C72BX6So.js.map +1 -0
  68. package/dist/chunks/{dropdown-tag.Bv1togfI.js → dropdown-tag.DCat3Pd2.js} +3 -3
  69. package/dist/chunks/{dropdown-tag.Bv1togfI.js.map → dropdown-tag.DCat3Pd2.js.map} +1 -1
  70. package/dist/chunks/{dropdown.CDNzhFMK.js → dropdown.D4lL2ytb.js} +30 -30
  71. package/dist/chunks/{dropdown.CDNzhFMK.js.map → dropdown.D4lL2ytb.js.map} +1 -1
  72. package/dist/chunks/{empty-state.DiXLZmQJ.js → empty-state.BGWjUH6G.js} +2 -2
  73. package/dist/chunks/{empty-state.DiXLZmQJ.js.map → empty-state.BGWjUH6G.js.map} +1 -1
  74. package/dist/chunks/{error-message.CPw3y44N.js → error-message.CjdvgIAh.js} +3 -3
  75. package/dist/chunks/error-message.CjdvgIAh.js.map +1 -0
  76. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  77. package/dist/chunks/{file-uploader.Dv4sh1IO.js → file-uploader.faOTOytJ.js} +6 -6
  78. package/dist/chunks/{file-uploader.Dv4sh1IO.js.map → file-uploader.faOTOytJ.js.map} +1 -1
  79. package/dist/chunks/{filter-bar.D1tyv0cU.js → filter-bar.BbLKMSsn.js} +18 -18
  80. package/dist/chunks/{filter-bar.D1tyv0cU.js.map → filter-bar.BbLKMSsn.js.map} +1 -1
  81. package/dist/chunks/{fixed-scroller.DsTyshyt.js → fixed-scroller.BjxA_R63.js} +2 -2
  82. package/dist/chunks/{fixed-scroller.DsTyshyt.js.map → fixed-scroller.BjxA_R63.js.map} +1 -1
  83. package/dist/chunks/{focus-trap.D9cfQpl7.js → focus-trap.DY5E-2JV.js} +2 -2
  84. package/dist/chunks/{focus-trap.D9cfQpl7.js.map → focus-trap.DY5E-2JV.js.map} +1 -1
  85. package/dist/chunks/{footer-actions.C00o4tuW.js → footer-actions.CQARYj4Q.js} +3 -3
  86. package/dist/chunks/{footer-actions.C00o4tuW.js.map → footer-actions.CQARYj4Q.js.map} +1 -1
  87. package/dist/chunks/{form-layout-title.dcT8eXwc.js → form-layout-title.CsmjzAje.js} +2 -2
  88. package/dist/chunks/{form-layout-title.dcT8eXwc.js.map → form-layout-title.CsmjzAje.js.map} +1 -1
  89. package/dist/chunks/{header-with-views.DNAQIhC5.js → header-with-views.WANsHlGK.js} +13 -13
  90. package/dist/chunks/{header-with-views.DNAQIhC5.js.map → header-with-views.WANsHlGK.js.map} +1 -1
  91. package/dist/chunks/{header.hDkWwQuQ.js → header.DAuIurUM.js} +4 -4
  92. package/dist/chunks/{header.hDkWwQuQ.js.map → header.DAuIurUM.js.map} +1 -1
  93. package/dist/chunks/index.CVpo3mlK.js +528 -0
  94. package/dist/chunks/{index.BzJQl-2M.js.map → index.CVpo3mlK.js.map} +1 -1
  95. package/dist/chunks/{info-icon-with-popover.COJrCw_o.js → info-icon-with-popover.J10ERGQ2.js} +2 -2
  96. package/dist/chunks/{info-icon-with-popover.COJrCw_o.js.map → info-icon-with-popover.J10ERGQ2.js.map} +1 -1
  97. package/dist/chunks/{info-icon.7uhGVIn5.js → info-icon.71yYfuEc.js} +2 -2
  98. package/dist/chunks/{info-icon.7uhGVIn5.js.map → info-icon.71yYfuEc.js.map} +1 -1
  99. package/dist/chunks/{input-field-password.DqbZ7U6j.js → input-field-password.Bv_0ulNg.js} +7 -7
  100. package/dist/chunks/{input-field-password.DqbZ7U6j.js.map → input-field-password.Bv_0ulNg.js.map} +1 -1
  101. package/dist/chunks/{input-field-phone-number.gKckf5Oi.js → input-field-phone-number.DPNOepAt.js} +3 -3
  102. package/dist/chunks/{input-field-phone-number.gKckf5Oi.js.map → input-field-phone-number.DPNOepAt.js.map} +1 -1
  103. package/dist/chunks/{input-field.DM-gguGX.js → input-field.CtV60WoD.js} +3 -3
  104. package/dist/chunks/{input-field.DM-gguGX.js.map → input-field.CtV60WoD.js.map} +1 -1
  105. package/dist/chunks/inspector.types.Df-LngxJ.js +187 -0
  106. package/dist/chunks/inspector.types.Df-LngxJ.js.map +1 -0
  107. package/dist/chunks/{layout-row.BC3Z1mQx.js → layout-row.CRRLYA03.js} +2 -2
  108. package/dist/chunks/{layout-row.BC3Z1mQx.js.map → layout-row.CRRLYA03.js.map} +1 -1
  109. package/dist/chunks/link.CTH1xj0i.js +116 -0
  110. package/dist/chunks/link.CTH1xj0i.js.map +1 -0
  111. package/dist/chunks/{listbox-option-tag.BJh2kEN1.js → listbox-option-tag.DsnH9Q9j.js} +2 -2
  112. package/dist/chunks/{listbox-option-tag.BJh2kEN1.js.map → listbox-option-tag.DsnH9Q9j.js.map} +1 -1
  113. package/dist/chunks/{menu.B0q9q97N.js → menu.BOj630ue.js} +3 -3
  114. package/dist/chunks/{menu.B0q9q97N.js.map → menu.BOj630ue.js.map} +1 -1
  115. package/dist/chunks/{modal-fullscreen.BgqNc9jE.js → modal-fullscreen.D1hncuS7.js} +5 -5
  116. package/dist/chunks/{modal-fullscreen.BgqNc9jE.js.map → modal-fullscreen.D1hncuS7.js.map} +1 -1
  117. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Dr847POU.js → modal.vue_vue_type_script_setup_true_lang.y7pMBxB0.js} +5 -5
  118. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Dr847POU.js.map → modal.vue_vue_type_script_setup_true_lang.y7pMBxB0.js.map} +1 -1
  119. package/dist/chunks/pagination.fwhC8tEq.js +445 -0
  120. package/dist/chunks/pagination.fwhC8tEq.js.map +1 -0
  121. package/dist/chunks/{popover.R5OM_tFu.js → popover.BzzdIK19.js} +4 -4
  122. package/dist/chunks/{popover.R5OM_tFu.js.map → popover.BzzdIK19.js.map} +1 -1
  123. package/dist/chunks/{popper-container.CDsbQiOS.js → popper-container.B_sb3SNK.js} +2 -2
  124. package/dist/chunks/{popper-container.CDsbQiOS.js.map → popper-container.B_sb3SNK.js.map} +1 -1
  125. package/dist/chunks/{promo-banner.DFt2dVxk.js → promo-banner.CoB1tBCC.js} +3 -3
  126. package/dist/chunks/{promo-banner.DFt2dVxk.js.map → promo-banner.CoB1tBCC.js.map} +1 -1
  127. package/dist/chunks/{radio-group.muZVaVEm.js → radio-group.seLW9WC9.js} +4 -4
  128. package/dist/chunks/{radio-group.muZVaVEm.js.map → radio-group.seLW9WC9.js.map} +1 -1
  129. package/dist/chunks/{search-bar.BOFC4r8H.js → search-bar.DgDUdcot.js} +3 -3
  130. package/dist/chunks/{search-bar.BOFC4r8H.js.map → search-bar.DgDUdcot.js.map} +1 -1
  131. package/dist/chunks/{secondary-nav.DLHeCwuz.js → secondary-nav.C3TEPrCq.js} +3 -3
  132. package/dist/chunks/{secondary-nav.DLHeCwuz.js.map → secondary-nav.C3TEPrCq.js.map} +1 -1
  133. package/dist/chunks/{segmented-control.Dg_ktsiS.js → segmented-control.B2cS73wG.js} +2 -2
  134. package/dist/chunks/{segmented-control.Dg_ktsiS.js.map → segmented-control.B2cS73wG.js.map} +1 -1
  135. package/dist/chunks/{selection-card-group.DGv7fjPp.js → selection-card-group.gd66OMqI.js} +5 -5
  136. package/dist/chunks/{selection-card-group.DGv7fjPp.js.map → selection-card-group.gd66OMqI.js.map} +1 -1
  137. package/dist/chunks/{sidepanel.BjR0Ab22.js → sidepanel.9wJbIvIS.js} +5 -5
  138. package/dist/chunks/{sidepanel.BjR0Ab22.js.map → sidepanel.9wJbIvIS.js.map} +1 -1
  139. package/dist/chunks/{structured-list-item.BMsATRrU.js → structured-list-item.CzzWSj5s.js} +5 -5
  140. package/dist/chunks/{structured-list-item.BMsATRrU.js.map → structured-list-item.CzzWSj5s.js.map} +1 -1
  141. package/dist/chunks/{summary-grid.types.lGX16F4w.js → summary-grid.types.IZdK-Mvh.js} +5 -5
  142. package/dist/chunks/{summary-grid.types.lGX16F4w.js.map → summary-grid.types.IZdK-Mvh.js.map} +1 -1
  143. package/dist/chunks/{tabs.BVuOvNxx.js → tabs.Bn4YIjoy.js} +2 -2
  144. package/dist/chunks/{tabs.BVuOvNxx.js.map → tabs.Bn4YIjoy.js.map} +1 -1
  145. package/dist/chunks/{tag.CmYkknFj.js → tag.iiCQSgG9.js} +2 -2
  146. package/dist/chunks/{tag.CmYkknFj.js.map → tag.iiCQSgG9.js.map} +1 -1
  147. package/dist/chunks/{textarea.CAc_VYFm.js → textarea.DY0kNx0r.js} +3 -3
  148. package/dist/chunks/{textarea.CAc_VYFm.js.map → textarea.DY0kNx0r.js.map} +1 -1
  149. package/dist/chunks/{timeline-item.BQ4qiBii.js → timeline-item.dleRa6Yu.js} +7 -7
  150. package/dist/chunks/{timeline-item.BQ4qiBii.js.map → timeline-item.dleRa6Yu.js.map} +1 -1
  151. package/dist/chunks/{toast.BOpWHAfu.js → toast.Ae5ZoWHb.js} +2 -2
  152. package/dist/chunks/{toast.BOpWHAfu.js.map → toast.Ae5ZoWHb.js.map} +1 -1
  153. package/dist/chunks/{toggle-button.E0VQtyEX.js → toggle-button.Dv1t15yj.js} +2 -2
  154. package/dist/chunks/{toggle-button.E0VQtyEX.js.map → toggle-button.Dv1t15yj.js.map} +1 -1
  155. package/dist/chunks/{tooltip.BkBDReK0.js → tooltip.Di6i0aTd.js} +35 -33
  156. package/dist/chunks/{tooltip.BkBDReK0.js.map → tooltip.Di6i0aTd.js.map} +1 -1
  157. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js → tutorial.vue_vue_type_script_setup_true_lang.A0Wcwr8f.js} +5 -5
  158. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js.map → tutorial.vue_vue_type_script_setup_true_lang.A0Wcwr8f.js.map} +1 -1
  159. package/dist/chunks/{use-cached-selected-values.BTVoaWFj.js → use-cached-selected-values.BgoZ5uGq.js} +4 -4
  160. package/dist/chunks/{use-cached-selected-values.BTVoaWFj.js.map → use-cached-selected-values.BgoZ5uGq.js.map} +1 -1
  161. package/dist/code-snippet.js +1 -1
  162. package/dist/dashboard-template.js +1 -1
  163. package/dist/dashed-underline.js +1 -1
  164. package/dist/data-grid-template.js +1 -1
  165. package/dist/data-grid.js +1 -1
  166. package/dist/date-picker.js +2 -2
  167. package/dist/date-range-picker.js +2 -2
  168. package/dist/dropdown.js +3 -3
  169. package/dist/empty-state.js +1 -1
  170. package/dist/file-uploader.js +1 -1
  171. package/dist/filter-bar.js +1 -1
  172. package/dist/focus-trap.js +1 -1
  173. package/dist/form-layout.js +1 -1
  174. package/dist/header-with-views.js +1 -1
  175. package/dist/header.js +1 -1
  176. package/dist/index.js +55 -55
  177. package/dist/info-icon.js +1 -1
  178. package/dist/input-field-password.js +1 -1
  179. package/dist/input-field-phone-number.js +1 -1
  180. package/dist/input-field.js +1 -1
  181. package/dist/inspector.js +1 -1
  182. package/dist/internal.js +12 -12
  183. package/dist/layout.js +1 -1
  184. package/dist/link.js +1 -1
  185. package/dist/menu.js +1 -1
  186. package/dist/modal-fullscreen.js +1 -1
  187. package/dist/modal.js +2 -2
  188. package/dist/pagination.js +1 -1
  189. package/dist/popover.js +1 -1
  190. package/dist/popper-container.js +1 -1
  191. package/dist/promo-banner.js +1 -1
  192. package/dist/radio-group.js +1 -1
  193. package/dist/rich-text-editor.js +6221 -0
  194. package/dist/rich-text-editor.js.map +1 -0
  195. package/dist/search-bar.js +2 -2
  196. package/dist/secondary-nav.js +1 -1
  197. package/dist/segmented-control.js +1 -1
  198. package/dist/selection-card.js +1 -1
  199. package/dist/sidepanel.js +1 -1
  200. package/dist/structured-list.js +1 -1
  201. package/dist/styles/bento-dark.css +22 -1
  202. package/dist/styles/bento-light.css +22 -1
  203. package/dist/styles/bento.css +22 -1
  204. package/dist/styles/legacy.css +22 -1
  205. package/dist/styles/styleguide.css +22 -1
  206. package/dist/summary-grid.js +1 -1
  207. package/dist/tabs.js +1 -1
  208. package/dist/tag.js +1 -1
  209. package/dist/textarea.js +1 -1
  210. package/dist/timeline.js +1 -1
  211. package/dist/toast.js +1 -1
  212. package/dist/tutorial.js +1 -1
  213. package/dist/web-types.json +1 -1
  214. package/package.json +10 -5
  215. package/dist/chunks/base-modal.qhldLovE.js.map +0 -1
  216. package/dist/chunks/checkbox-input.CgbJsFXD.js +0 -157
  217. package/dist/chunks/checkbox-input.CgbJsFXD.js.map +0 -1
  218. package/dist/chunks/dialog-page.MLFdqTcL.js +0 -173
  219. package/dist/chunks/dialog-page.MLFdqTcL.js.map +0 -1
  220. package/dist/chunks/error-message.CPw3y44N.js.map +0 -1
  221. package/dist/chunks/index.BzJQl-2M.js +0 -386
  222. package/dist/chunks/inspector.types.D5QBC3-G.js +0 -188
  223. package/dist/chunks/inspector.types.D5QBC3-G.js.map +0 -1
  224. package/dist/chunks/link.D3Fq5tt_.js +0 -109
  225. package/dist/chunks/link.D3Fq5tt_.js.map +0 -1
  226. package/dist/chunks/pagination.Ca8itKj2.js +0 -470
  227. package/dist/chunks/pagination.Ca8itKj2.js.map +0 -1
@@ -1,157 +0,0 @@
1
- import { createElementBlock as f, openBlock as s, mergeProps as D, createCommentVNode as x, createElementVNode as $, toDisplayString as O, defineComponent as S, computed as l, useAttrs as U, toRefs as H, normalizeClass as I, createBlock as E, unref as i } from "vue";
2
- import { C as P } from "./checkmark-small.D7l69yBf.js";
3
- /* empty css */
4
- import { _ as A } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
- import "../assets/checkbox-input.css";
6
- var r = /* @__PURE__ */ ((e) => (e.UNCHECKED = "unchecked", e.DISABLED = "disabled", e.ERROR = "error", e.READONLY = "readonly", e))(r || {}), m = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e))(m || {});
7
- let g = 0;
8
- const T = {
9
- beforeCreate() {
10
- this.uuid = g.toString(), g += 1;
11
- }
12
- }, Y = { key: 0 };
13
- function K(e, o, a, p, h, b) {
14
- return s(), f("svg", D({ role: "img" }, e.$attrs, {
15
- class: "ui-assets-icons-16",
16
- xmlns: "http://www.w3.org/2000/svg",
17
- width: "16",
18
- height: "16",
19
- fill: "none"
20
- }), [
21
- e.$attrs["svg-title"] ? (s(), f("title", Y, O(e.$attrs["svg-title"]), 1)) : x("", !0),
22
- o[0] || (o[0] = $("path", {
23
- fill: "#00112C",
24
- d: "M4.25 7.25H11.75V8.75H4.25V7.25Z"
25
- }, null, -1))
26
- ], 16);
27
- }
28
- const z = /* @__PURE__ */ A(T, [["render", K]]), G = ["id", "aria-label", "aria-checked", "aria-describedby", "aria-invalid", "checked", "disabled", ".indeterminate", "value", "aria-readonly"], M = {
29
- name: "checkbox-input",
30
- inheritAttrs: !1
31
- }, Z = /* @__PURE__ */ S({
32
- ...M,
33
- props: {
34
- /**
35
- * The aria label associated to the input checkbox.
36
- */
37
- ariaLabel: { type: String, default: "" },
38
- /**
39
- * An additional string that serves as description for the input checkbox (useful if the component shows a description).
40
- */
41
- ariaDescribedby: { type: String, default: "" },
42
- /**
43
- * Setting this property to true will disable the checkbox in your form.
44
- */
45
- disabled: { type: Boolean, default: !1 },
46
- /**
47
- * Setting this property to true will show the checkbox in error state.
48
- */
49
- hasError: { type: Boolean, default: !1 },
50
- /**
51
- * Sets the id of the checkbox. Required for accessibility purposes
52
- */
53
- id: { type: String, default: null },
54
- /**
55
- * The :indeterminate CSS pseudo-class represents any form element
56
- * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute
57
- * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,
58
- * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate
59
- * This property lets you control the input.indeterminate native property.
60
- */
61
- indeterminate: { type: Boolean, default: !1 },
62
- /**
63
- * When handling a single checkbox with a singular state, use a boolean.
64
- *
65
- * When handling multiple checkboxes, use an array of keys.
66
- * These keys exist as a set "value" prop for each checkbox.
67
- */
68
- modelValue: {
69
- type: [Boolean, Array],
70
- default: !1
71
- },
72
- /**
73
- * Setting this property to true will set the checkbox to read only state.
74
- */
75
- readonly: { type: Boolean, default: !1 },
76
- /**
77
- * The value of the component. The DOM API casts this to a string.
78
- * The browser uses "on" as the default value.
79
- *
80
- * In the case of multiple checkboxes this value is used as a unique key.
81
- */
82
- value: { type: [String, Number], default: null }
83
- },
84
- emits: ["update:model-value"],
85
- setup(e, { emit: o }) {
86
- const a = e, p = o, h = l(() => {
87
- {
88
- const { class: t, style: v, ...n } = U();
89
- return n;
90
- }
91
- }), { disabled: b, indeterminate: y, modelValue: c, readonly: k, value: d } = H(a), R = l(() => ({
92
- [`b-checkbox-input--${r.DISABLED}`]: a.disabled,
93
- [`b-checkbox-input--${r.READONLY}`]: a.readonly
94
- })), B = l(() => ({
95
- [`b-checkbox-input__outline--${r.UNCHECKED}`]: !u.value && !a.indeterminate,
96
- [`b-checkbox-input__outline--${r.ERROR}`]: a.hasError,
97
- [`b-checkbox-input__outline--${r.READONLY}`]: a.readonly
98
- })), _ = l(() => Array.isArray(c.value)), u = l(() => _.value ? c.value.some((t) => t === d.value) : c.value), N = l(
99
- () => a.indeterminate ? "mixed" : `${!!u.value}`
100
- ), L = l(
101
- () => a.hasError && !a.disabled && !a.readonly
102
- ), V = (t) => {
103
- if (k.value) {
104
- t.preventDefault();
105
- return;
106
- }
107
- }, w = (t) => {
108
- if (b.value)
109
- return;
110
- const v = t.target.checked;
111
- if (_.value) {
112
- const n = [...c.value], C = n.indexOf(d.value);
113
- C === -1 ? n.push(d.value) : n.splice(C, 1), p(m.UPDATE, n);
114
- } else
115
- p(m.UPDATE, v);
116
- };
117
- return (t, v) => (s(), f("div", {
118
- class: I(["b-checkbox-input", R.value])
119
- }, [
120
- i(y) ? (s(), E(i(z), {
121
- key: 0,
122
- class: "b-checkbox-input__icon",
123
- "svg-title": "",
124
- "aria-hidden": "true"
125
- })) : u.value ? (s(), E(i(P), {
126
- key: 1,
127
- class: "b-checkbox-input__icon",
128
- "svg-title": "",
129
- "aria-hidden": "true"
130
- })) : x("", !0),
131
- $("input", D({
132
- id: e.id,
133
- ref: "inputRef"
134
- }, h.value, {
135
- type: "checkbox",
136
- class: ["b-checkbox-input__outline", B.value],
137
- "aria-label": e.ariaLabel,
138
- "aria-checked": N.value,
139
- "aria-describedby": e.ariaDescribedby,
140
- "aria-invalid": L.value,
141
- checked: u.value,
142
- disabled: i(b),
143
- ".indeterminate": i(y),
144
- value: i(d),
145
- "aria-readonly": i(k),
146
- onClick: V,
147
- onChange: w
148
- }), null, 48, G)
149
- ], 2));
150
- }
151
- }), Q = /* @__PURE__ */ A(Z, [["__scopeId", "data-v-b1e7648e"]]);
152
- export {
153
- r as C,
154
- z as N,
155
- Q as a
156
- };
157
- //# sourceMappingURL=checkbox-input.CgbJsFXD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox-input.CgbJsFXD.js","sources":["../../../core/src/components/internal/checkbox-input/checkbox-input.types.ts","../../../ui-assets/icons-16/dist/vue/minus-small.vue","../../../vue2/src/components/internal/checkbox-input/checkbox-input.vue"],"sourcesContent":["export type MultiCheckboxInputType = Array<string | number>;\nexport type CheckboxInputType = boolean | MultiCheckboxInputType;\n\nexport enum CheckboxInputState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum CheckboxInputEvent {\n UPDATE = 'update:model-value',\n}\n\ninterface CheckboxInputGroupItem {\n value: string | number;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n}\n\nexport type CheckboxInputGroupItems = Array<CheckboxInputGroupItem>;\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M4.25 7.25H11.75V8.75H4.25V7.25Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-checkbox-input\" :class=\"conditionalClasses\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <minus-small-icon v-if=\"indeterminate\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <checkmark-small-icon v-else-if=\"isChecked\" class=\"b-checkbox-input__icon\" svg-title=\"\" aria-hidden=\"true\" />\n <input\n :id=\"id\"\n ref=\"inputRef\"\n v-bind=\"attrs\"\n type=\"checkbox\"\n class=\"b-checkbox-input__outline\"\n :class=\"outlineConditionalClasses\"\n :aria-label=\"ariaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedby\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"indeterminate\"\n :value=\"value\"\n :aria-readonly=\"readonly\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, HTMLAttributes, PropType, toRefs, useAttrs } from 'vue';\n import {\n CheckboxInputEvent,\n CheckboxInputGroupItems,\n CheckboxInputState,\n CheckboxInputType,\n MultiCheckboxInputType,\n } from '@/core/components/internal/checkbox-input/checkbox-input.types';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import { isVue3 } from 'vue-demi';\n\n const props = defineProps({\n /**\n * The aria label associated to the input checkbox.\n */\n ariaLabel: { type: String, default: '' },\n\n /**\n * An additional string that serves as description for the input checkbox (useful if the component shows a description).\n */\n ariaDescribedby: { type: String, default: '' },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Sets the id of the checkbox. Required for accessibility purposes\n */\n id: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<CheckboxInputType | CheckboxInputGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n });\n\n const emit = defineEmits<{\n /**\n * Emit that emits the input value\n */\n (e: 'update:model-value', value: boolean | Array<string | number>): void;\n }>();\n\n // filter out style classes because in vue3 they are also part of attrs\n const attrs = computed(() => {\n if (isVue3) {\n const { class: _class, style: _style, ...rest } = useAttrs();\n return rest;\n } else {\n return useAttrs();\n }\n });\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-input--${CheckboxInputState.DISABLED}`]: props.disabled,\n [`b-checkbox-input--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const outlineConditionalClasses = computed(() => ({\n [`b-checkbox-input__outline--${CheckboxInputState.UNCHECKED}`]: !isChecked.value && !props.indeterminate,\n [`b-checkbox-input__outline--${CheckboxInputState.ERROR}`]: props.hasError,\n [`b-checkbox-input__outline--${CheckboxInputState.READONLY}`]: props.readonly,\n }));\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as MultiCheckboxInputType).some(item => item === value.value);\n });\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n props.indeterminate ? 'mixed' : `${!!isChecked.value}`\n );\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(\n () => props.hasError && !props.disabled && !props.readonly\n );\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n return;\n }\n };\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as MultiCheckboxInputType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(CheckboxInputEvent.UPDATE, newCheckedList);\n } else {\n emit(CheckboxInputEvent.UPDATE, newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component that renders a checkbox input (without label)\n *\n * @example\n * import { BentoCheckboxInput } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckboxInput },\n * template: `\n * <label for=\"checkbox-id\">Your label</label>\n * <span id=\"description-id\">Description</span>\n * <bento-checkbox-input id=\"checkbox-id\" aria=label=\"Your label\" aria-describedby=\"description-id\" />\n * `\n * }\n */\n export default {\n name: 'checkbox-input',\n inheritAttrs: false,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/checkbox-input/checkbox-input.scss\" />\n"],"names":["CheckboxInputState","CheckboxInputState2","CheckboxInputEvent","CheckboxInputEvent2","uuid","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","props","__props","emit","__emit","attrs","computed","_class","_style","rest","useAttrs","disabled","indeterminate","modelValue","readonly","value","toRefs","conditionalClasses","outlineConditionalClasses","isChecked","isCheckboxGroup","item","ariaChecked","ariaInvalid","onClick","event","onChange","newValue","newCheckedList","index"],"mappings":";;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBADQA,IAAAD,KAAA,CAAA,CAAA;ACHR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;;AAVR,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;gFAFzHC,EAAA,IAAA,EAAA;AAAA;MAE8M,MA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AC,MAAA;AACI,UAAAX,EAAA,OAAA;AACI,QAAAW,EAAA,eAAA;AACA;AAAA,MAAA;AAAA,IACJ,GAEJC,IAAA,CAAAD,MAAA;AACI,UAAAd,EAAA;AACI;AAGJ,YAAAgB,IAAAF,EAAA,OAAA;AAEA,UAAAL,EAAA,OAAA;AACI,cAAAQ,IAAA,CAAA,GAAAf,EAAA,KAAA,GACAgB,IAAAD,EAAA,QAAAb,EAAA,KAAA;AAEA,QAAAc,MAAA,KACID,EAAA,KAAAb,EAAA,KAAA,IAEAa,EAAA,OAAAC,GAAA,CAAA,GAEJ1B,EAAAX,EAAA,QAAAoC,CAAA;AAAA,MAA8C;AAE9C,QAAAzB,EAAAX,EAAA,QAAAmC,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,173 +0,0 @@
1
- import { createElementBlock as u, openBlock as n, mergeProps as Q, createCommentVNode as c, createElementVNode as W, toDisplayString as X, defineComponent as ee, useSlots as te, ref as m, computed as r, inject as N, watch as E, nextTick as y, onUnmounted as ae, createBlock as oe, Transition as le, unref as s, withCtx as B, normalizeClass as C, renderSlot as S, normalizeStyle as se, createVNode as $ } from "vue";
2
- import { B as ne } from "./button.BHZgsGkp.js";
3
- /* empty css */
4
- import { _ as R } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
- import { u as ie } from "./use-has-slot.B7eQSabc.js";
6
- import { u as re } from "./i18n.B6g5VX0q.js";
7
- import { i as ue } from "./typography.DN5eC5ch.js";
8
- import "../assets/dialog-page.css";
9
- let O = 0;
10
- const ce = {
11
- beforeCreate() {
12
- this.uuid = O.toString(), O += 1;
13
- }
14
- }, ve = { key: 0 };
15
- function de(e, d, i, I, L, g) {
16
- return n(), u("svg", Q({ role: "img" }, e.$attrs, {
17
- class: "ui-assets-icons-16",
18
- xmlns: "http://www.w3.org/2000/svg",
19
- width: "16",
20
- height: "16",
21
- fill: "none"
22
- }), [
23
- e.$attrs["svg-title"] ? (n(), u("title", ve, X(e.$attrs["svg-title"]), 1)) : c("", !0),
24
- d[0] || (d[0] = W("path", {
25
- fill: "#00112C",
26
- d: "M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z"
27
- }, null, -1))
28
- ], 16);
29
- }
30
- const ge = /* @__PURE__ */ R(ce, [["render", de]]);
31
- var b = /* @__PURE__ */ ((e) => (e.TRANSITION_LEVEL_DEEPER = "b-dialog-page__animation--level-deeper", e.TRANSITION_LEVEL_UPPER = "b-dialog-page__animation--level-upper", e))(b || {});
32
- const pe = Symbol("dialog registerPage injection key"), me = Symbol("dialog page config data injection key"), G = {
33
- "en-US": {
34
- goToPreviousPage: "Go to previous page"
35
- }
36
- }, fe = {
37
- key: 0,
38
- class: "b-dialog-page"
39
- }, _e = {
40
- i18n: { messages: G }
41
- }, he = /* @__PURE__ */ ee({
42
- ..._e,
43
- __name: "dialog-page",
44
- props: {
45
- /**
46
- * Identifier of the page, used with activePage prop to handle navigation
47
- */
48
- pageId: {
49
- type: String,
50
- default: void 0
51
- },
52
- /**
53
- * Show header and actions border
54
- */
55
- alwaysShowBorder: {
56
- type: Boolean,
57
- default: !1
58
- },
59
- /**
60
- * Pass custom styling to the back button to position it correctly with the header slot
61
- */
62
- backButtonStyling: { type: Object, default: null },
63
- /**
64
- * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior
65
- * Used when the back button should not take the user to the natural previous page
66
- * Set to `null` to hide back button in the page
67
- */
68
- previousPage: {
69
- type: String,
70
- default: void 0
71
- }
72
- },
73
- emits: ["animationend"],
74
- setup(e, { emit: d }) {
75
- const i = e, I = d, L = te(), g = ie(L), { t: V } = re({ messages: G }), a = m(null), f = m(!1), w = m(!0), T = m(!1), _ = r(() => l.value ? l.value === i.pageId : !0), D = r(() => ({
76
- "b-dialog-page__header--with-border": i.alwaysShowBorder || f.value && !w.value
77
- })), H = r(() => ({
78
- "b-dialog-page__footer--with-border": i.alwaysShowBorder || f.value && !T.value
79
- })), j = () => {
80
- a.value && (w.value = a.value.scrollTop === 0, T.value = a.value.scrollHeight - a.value.clientHeight === a.value.scrollTop);
81
- }, k = async (t) => {
82
- t && (await y(), f.value = a.value && a.value.scrollHeight > a.value.clientHeight);
83
- }, { activePage: l, animation: h, isAnimationActive: p, isOpen: P, pages: U, previousPages: o, updatePage: x } = N(me);
84
- E(() => P.value, k, { immediate: !0 }), E(() => _.value, k, { immediate: !0 });
85
- const z = r(() => i.previousPage ? !0 : i.previousPage === null ? !1 : Y.value && _.value), J = () => {
86
- h.value = b.TRANSITION_LEVEL_DEEPER, p && (p.value = !1), I("animationend");
87
- }, K = () => {
88
- p && (p.value = !0);
89
- }, Y = r(() => o.value.length > 1), A = r(() => o.value[o.value.length - 1]), F = r(() => U.value.some((t) => t === l.value)), M = async (t) => {
90
- if (t) {
91
- const v = o.value.indexOf(t);
92
- v !== -1 ? o.value = o.value.slice(0, v + 1) : o.value = [t];
93
- } else
94
- o.value.pop();
95
- h.value = b.TRANSITION_LEVEL_UPPER, await y(), x(A.value);
96
- };
97
- E(
98
- () => l.value,
99
- async () => {
100
- if (await y(), !!P.value) {
101
- if (l.value && !F.value && ue) {
102
- console.error(
103
- `The activePage passed "${l.value}" does not match the id of any of the pages`
104
- );
105
- return;
106
- }
107
- l.value !== A.value && o.value.push(l.value);
108
- }
109
- },
110
- { immediate: !0 }
111
- );
112
- const Z = N(pe), { unregisterPage: q } = Z(i.pageId);
113
- return ae(() => q()), (t, v) => (n(), oe(le, {
114
- name: s(h),
115
- mode: "out-in",
116
- onAfterLeave: J,
117
- onLeave: K
118
- }, {
119
- default: B(() => [
120
- s(P) && _.value ? (n(), u("div", fe, [
121
- s(g)("header") ? (n(), u("div", {
122
- key: 0,
123
- class: C(["b-dialog-page__header", D.value])
124
- }, [
125
- z.value ? (n(), u("div", {
126
- key: 0,
127
- class: "b-dialog-page__back-button",
128
- style: se(e.backButtonStyling),
129
- "data-testid": "back-button"
130
- }, [
131
- $(s(ne), {
132
- variant: "tertiary",
133
- onClick: v[0] || (v[0] = (Pe) => M(e.previousPage))
134
- }, {
135
- default: B(() => [
136
- $(s(ge), {
137
- "svg-title": s(V)("goToPreviousPage")
138
- }, null, 8, ["svg-title"])
139
- ]),
140
- _: 1
141
- })
142
- ], 4)) : c("", !0),
143
- S(t.$slots, "header", {}, void 0, !0)
144
- ], 2)) : c("", !0),
145
- s(g)("content") ? (n(), u("div", {
146
- key: 1,
147
- ref_key: "contentElement",
148
- ref: a,
149
- class: "b-dialog-page__content",
150
- onScroll: j
151
- }, [
152
- S(t.$slots, "content", {}, void 0, !0)
153
- ], 544)) : c("", !0),
154
- s(g)("footer") ? (n(), u("div", {
155
- key: 2,
156
- class: C(["b-dialog-page__footer", H.value])
157
- }, [
158
- S(t.$slots, "footer", {}, void 0, !0)
159
- ], 2)) : c("", !0)
160
- ])) : c("", !0)
161
- ]),
162
- _: 3
163
- }, 8, ["name"]));
164
- }
165
- }), Te = /* @__PURE__ */ R(he, [["__scopeId", "data-v-3d5f9da9"]]);
166
- export {
167
- ge as A,
168
- b as B,
169
- Te as D,
170
- pe as a,
171
- me as b
172
- };
173
- //# sourceMappingURL=dialog-page.MLFdqTcL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog-page.MLFdqTcL.js","sources":["../../../ui-assets/icons-16/dist/vue/arrow-left.vue","../../../vue2/src/components/internal/dialog-page/dialog-page.types.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.keys.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","import { Ref } from 'vue';\n\nexport enum BentoDialogPageAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-dialog-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-dialog-page__animation--level-upper',\n}\n\nexport interface BentoDialogPageConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n isAnimationActive?: Ref<boolean>;\n isOpen: Ref<boolean>;\n pages: Ref<string[]>;\n previousPages: Ref<string[]>;\n updatePage: (page: string) => void;\n}\n\nexport type BentoDialogPageRegisterPage = (pageId: string) => { unregisterPage: () => void };\n","export const DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY = Symbol('dialog registerPage injection key');\nexport const DIALOG_PAGE_CONFIG_INJECTION_KEY = Symbol('dialog page config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\" @leave=\"startAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div v-if=\"hasSlot('content')\" ref=\"contentElement\" class=\"b-dialog-page__content\" @scroll=\"onScroll\">\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx.d.ts';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Fires when the animation ends\n */\n (e: 'animationend'): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtTop.value),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtBottom.value),\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isAnimationActive, isOpen, pages, previousPages, updatePage } =\n inject<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY);\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n if (isAnimationActive) {\n isAnimationActive.value = false;\n }\n\n emit('animationend');\n };\n\n const startAnimation = () => {\n if (isAnimationActive) {\n isAnimationActive.value = true;\n }\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["uuid","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","BentoDialogPageAnimation","BentoDialogPageAnimation2","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","DIALOG_PAGE_CONFIG_INJECTION_KEY","__default__","messages","props","__props","emit","__emit","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","showPage","computed","activePage","headerConditionalClasses","footerConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","animation","isAnimationActive","isOpen","pages","previousPages","updatePage","inject","watch","showBackButton","hasPreviousPages","updateAnimation","startAnimation","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopment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AGJ,MAAAJ,EAAA,QAAA9B,EAAA,wBACA,MAAA6B,EAAA,GACAM,EAAAO,EAAA,KAAA;AAAA,IAAyB;AAI7B,IAAAL;AAAA,MAAA,MAAAd,EAAA;AAAA,MACqB,YAAA;AAGb,YADA,MAAAM,EAAA,GACA,EAAAG,EAAA,OAIA;AAAA,cAAAT,EAAA,SAAA,CAAAoB,EAAA,SACII,IAAA;AAEI,oBAAA;AAAA,cAAQ,0BAAAxB,EAAA,KAAA;AAAA,YACsC;AAE9C;AAAA,UAAA;AAIR,UAAAA,EAAA,UAAAmB,EAAA,SACIR,EAAA,MAAA,KAAAX,EAAA,KAAA;AAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAyB,IAAAZ,EAAAlC,EAAA,GACA,EAAA,gBAAA+C,EAAA,IAAAD,EAAA1C,EAAA,MAAA;AAGA,WAAA4C,GAAA,MAAAD,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-message.CPw3y44N.js","sources":["../../../vue2/src/components/internal/field-label/field-label.vue","../../../vue2/src/components/internal/error-message/error-message.vue"],"sourcesContent":["<template>\n <label class=\"b-field-label\" :class=\"conditionalClasses\">\n <bento-typography el=\"span\" stronger>\n <template v-if=\"label\"> {{ label }}</template>\n <template v-else><slot></slot></template>\n </bento-typography>\n <bento-typography v-if=\"!!tooltipText\" el=\"span\" class=\"b-field-label__tooltip-wrapper\">\n <bento-info-icon :tooltip-text=\"tooltipText\" class=\"b-field-label__tooltip\" />\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-field-label__requirement\" el=\"span\"\n >({{ t('required') }})</bento-typography\n >\n <bento-typography v-else-if=\"optional\" class=\"b-field-label__requirement\" el=\"span\"\n >({{ t('optional') }})</bento-typography\n >\n </label>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { computed } from 'vue';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n /**\n * Field label\n */\n label: {\n type: String,\n default: null,\n },\n /**\n * Sets the field as optional\n */\n optional: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the field as required\n */\n required: {\n type: Boolean,\n default: false,\n },\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: {\n type: String,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const conditionalClasses = computed(() => ({ 'b-field-label--condensed': props.condensed }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the labels for all field components\n\n * @example\n * import { FieldLabel } from '@/components/internal/field-label';\n *\n * export default {\n * components: { FieldLabel },\n * template: `\n * <field-label label=\"Label\" tooltip-text=\"Tooltip info\" required />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/field-label/field-label.scss\" />\n","<template>\n <bento-typography :id=\"$attrs.id\" class=\"b-error-message\" el=\"span\" aria-live=\"polite\">\n <div class=\"b-error-message__icon\">\n <cross-circle-icon :svg-title=\"t('error')\" />\n </div>\n {{ errorMessage }}\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import CrossCircleIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An error message component should be used whenever it is necessary to add an error message to a component.\n * If adding to a form component, the proper accessibility measures should be taken when necessary\n * (ex. associating an element with this one using aria-describedby).\n\n * @example\n * import { ErrorMessage } from '@/components/internal/error-message';\n *\n * export default {\n * components: { ErrorMessage },\n * template: `\n * <error-message :error-message=\"errorMessage\" />\n * `\n * }\n */\n\n defineProps({\n /**\n * The rendered error message\n */\n errorMessage: {\n type: String,\n required: true,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'error-message',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/internal/error-message/error-message.scss\" />\n"],"names":["__default__$1","messages$1","props","__props","t","useI18n","conditionalClasses","computed","__default__","messages"],"mappings":";;;;;;;;;;;;;;;;;;;;GAmFIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAxDA,UAAAC,IAAAC,GAmCA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAJ,EAAA,CAAA,GAEAK,IAAAC,EAAA,OAAA,EAAA,4BAAAL,EAAA,UAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CCnBAM,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;AAPA,UAAA,EAAA,GAAAL,EAAA,IAAAC,EAAA,EAAA,UAAAI,EAAA,CAAA;;;;;;;;;;;;;;;;;;;"}