@adyen/bento-vue2 1.83.1 → 1.84.1

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 (321) hide show
  1. package/README.md +5 -5
  2. package/dist/@types/index.d.ts +56 -5
  3. package/dist/action-bar.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/ai-button.css +1 -1
  8. package/dist/assets/alert.css +1 -1
  9. package/dist/assets/avatar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions-with-menu.css +1 -1
  12. package/dist/assets/button-actions.css +1 -1
  13. package/dist/assets/button.css +1 -1
  14. package/dist/assets/calendar.css +1 -1
  15. package/dist/assets/card.css +1 -1
  16. package/dist/assets/checkbox-group.css +1 -1
  17. package/dist/assets/checkbox-input.css +1 -1
  18. package/dist/assets/checkbox.css +1 -1
  19. package/dist/assets/chip.css +1 -1
  20. package/dist/assets/code-snippet.css +1 -1
  21. package/dist/assets/controls-group.css +1 -1
  22. package/dist/assets/country.css +1 -1
  23. package/dist/assets/currency.css +1 -1
  24. package/dist/assets/dashboard-section.css +1 -1
  25. package/dist/assets/dashed-underline.css +1 -1
  26. package/dist/assets/data-grid-template.css +1 -1
  27. package/dist/assets/data-grid.css +1 -1
  28. package/dist/assets/date-picker.css +1 -1
  29. package/dist/assets/date-range-picker.css +1 -1
  30. package/dist/assets/date.css +1 -1
  31. package/dist/assets/dialog-page.css +1 -1
  32. package/dist/assets/divider.css +1 -1
  33. package/dist/assets/dropdown-default-textbox.css +1 -1
  34. package/dist/assets/dropdown-tag.css +1 -1
  35. package/dist/assets/dropdown.css +1 -1
  36. package/dist/assets/empty-state.css +1 -1
  37. package/dist/assets/field-label.css +1 -1
  38. package/dist/assets/file-uploader.css +1 -1
  39. package/dist/assets/filter-bar.css +1 -1
  40. package/dist/assets/fixed-scroller.css +1 -1
  41. package/dist/assets/footer-actions.css +1 -1
  42. package/dist/assets/form-layout-title.css +1 -1
  43. package/dist/assets/grid-layout.css +1 -1
  44. package/dist/assets/header-meta.css +1 -1
  45. package/dist/assets/header-with-views.css +1 -1
  46. package/dist/assets/header.css +1 -1
  47. package/dist/assets/index.css +1 -1
  48. package/dist/assets/info-icon.css +1 -1
  49. package/dist/assets/input-field-password.css +1 -1
  50. package/dist/assets/input-field.css +1 -1
  51. package/dist/assets/inspector.css +1 -1
  52. package/dist/assets/layout-row.css +1 -1
  53. package/dist/assets/link.css +1 -1
  54. package/dist/assets/listbox-option-tag.css +1 -1
  55. package/dist/assets/loading-indicator.css +1 -1
  56. package/dist/assets/modal-fullscreen.css +1 -1
  57. package/dist/assets/pagination.css +1 -1
  58. package/dist/assets/payment-method.css +1 -1
  59. package/dist/assets/popper-container.css +1 -1
  60. package/dist/assets/promo-banner.css +1 -1
  61. package/dist/assets/radio-group.css +1 -1
  62. package/dist/assets/radio-input.css +1 -1
  63. package/dist/assets/rich-text-editor.css +1 -1
  64. package/dist/assets/secondary-nav.css +1 -1
  65. package/dist/assets/segmented-control.css +1 -1
  66. package/dist/assets/selection-card-group.css +1 -1
  67. package/dist/assets/sidepanel.css +1 -1
  68. package/dist/assets/status.css +1 -1
  69. package/dist/assets/step.css +1 -1
  70. package/dist/assets/structured-list-item.css +1 -1
  71. package/dist/assets/summary-grid.css +1 -1
  72. package/dist/assets/tab.css +1 -1
  73. package/dist/assets/tag.css +1 -1
  74. package/dist/assets/textarea.css +1 -1
  75. package/dist/assets/timeline-item.css +1 -1
  76. package/dist/assets/toast.css +1 -1
  77. package/dist/assets/toggle.css +1 -1
  78. package/dist/assets/tooltip.css +1 -1
  79. package/dist/assets/tutorial.css +1 -1
  80. package/dist/assets/use-cached-selected-values.css +1 -1
  81. package/dist/button.js +3 -3
  82. package/dist/card.js +1 -1
  83. package/dist/checkbox.js +2 -2
  84. package/dist/chunks/{action-bar.C2GnRugW.js → action-bar.y4tcdk7R.js} +8 -6
  85. package/dist/chunks/{action-bar.C2GnRugW.js.map → action-bar.y4tcdk7R.js.map} +1 -1
  86. package/dist/chunks/{ai-button.C9Uc6vBY.js → ai-button.BEy4Gly-.js} +2 -2
  87. package/dist/chunks/{ai-button.C9Uc6vBY.js.map → ai-button.BEy4Gly-.js.map} +1 -1
  88. package/dist/chunks/{alert.BlJBrD8c.js → alert.B3Pdp02a.js} +29 -21
  89. package/dist/chunks/{alert.BlJBrD8c.js.map → alert.B3Pdp02a.js.map} +1 -1
  90. package/dist/chunks/{base-modal.L39wmqVD.js → base-modal.KYkLKswF.js} +20 -18
  91. package/dist/chunks/{base-modal.L39wmqVD.js.map → base-modal.KYkLKswF.js.map} +1 -1
  92. package/dist/chunks/{button-actions-with-menu.CQlsQa_f.js → button-actions-with-menu.B5mKwc-F.js} +2 -2
  93. package/dist/chunks/{button-actions-with-menu.CQlsQa_f.js.map → button-actions-with-menu.B5mKwc-F.js.map} +1 -1
  94. package/dist/chunks/{button-actions.BWVq6OZQ.js → button-actions.D9n7MxWe.js} +270 -239
  95. package/dist/chunks/{button-actions.BWVq6OZQ.js.map → button-actions.D9n7MxWe.js.map} +1 -1
  96. package/dist/chunks/{button.C5GvPqe5.js → button.DIU6m9wD.js} +2 -2
  97. package/dist/chunks/{button.C5GvPqe5.js.map → button.DIU6m9wD.js.map} +1 -1
  98. package/dist/chunks/calendar.C8DpZ4Sr.js +1101 -0
  99. package/dist/chunks/calendar.C8DpZ4Sr.js.map +1 -0
  100. package/dist/chunks/{card.CktheSva.js → card.CLX0RGG6.js} +2 -2
  101. package/dist/chunks/{card.CktheSva.js.map → card.CLX0RGG6.js.map} +1 -1
  102. package/dist/chunks/{checkbox-group.BUXnMhO8.js → checkbox-group.BCnhjQie.js} +4 -4
  103. package/dist/chunks/{checkbox-group.BUXnMhO8.js.map → checkbox-group.BCnhjQie.js.map} +1 -1
  104. package/dist/chunks/{checkbox-input.B0NsfSNR.js → checkbox-input.08E9BNeF.js} +45 -40
  105. package/dist/chunks/checkbox-input.08E9BNeF.js.map +1 -0
  106. package/dist/chunks/{checkbox.DgPVHJnT.js → checkbox.CU5ierOq.js} +9 -9
  107. package/dist/chunks/{checkbox.DgPVHJnT.js.map → checkbox.CU5ierOq.js.map} +1 -1
  108. package/dist/chunks/{code-snippet.1_edHDaZ.js → code-snippet.9MwDHp50.js} +62 -60
  109. package/dist/chunks/code-snippet.9MwDHp50.js.map +1 -0
  110. package/dist/chunks/constructNow.DuaJst0D.js +8 -0
  111. package/dist/chunks/{constructNow.BhymNmy5.js.map → constructNow.DuaJst0D.js.map} +1 -1
  112. package/dist/chunks/{controls-group.BqPxnEl3.js → controls-group.D4eW9DtP.js} +2 -2
  113. package/dist/chunks/{controls-group.BqPxnEl3.js.map → controls-group.D4eW9DtP.js.map} +1 -1
  114. package/dist/chunks/{copy.I2GvwCvt.js → copy.C0q7xgXs.js} +19 -17
  115. package/dist/chunks/{copy.I2GvwCvt.js.map → copy.C0q7xgXs.js.map} +1 -1
  116. package/dist/chunks/{country.BPrh4fXO.js → country.DyrDj95W.js} +2 -2
  117. package/dist/chunks/{country.BPrh4fXO.js.map → country.DyrDj95W.js.map} +1 -1
  118. package/dist/chunks/country.types.DaVCMxk-.js +773 -0
  119. package/dist/chunks/{country.types.C0Q_hhgJ.js.map → country.types.DaVCMxk-.js.map} +1 -1
  120. package/dist/chunks/{dashboard-section.B4bHrFIl.js → dashboard-section.B83FdC0Z.js} +3 -3
  121. package/dist/chunks/{dashboard-section.B4bHrFIl.js.map → dashboard-section.B83FdC0Z.js.map} +1 -1
  122. package/dist/chunks/{dashed-underline.ByK3QxFJ.js → dashed-underline.DQGVy5T2.js} +2 -2
  123. package/dist/chunks/{dashed-underline.ByK3QxFJ.js.map → dashed-underline.DQGVy5T2.js.map} +1 -1
  124. package/dist/chunks/{data-grid-template.CvZbOkih.js → data-grid-template.BTEFoEwf.js} +4 -4
  125. package/dist/chunks/{data-grid-template.CvZbOkih.js.map → data-grid-template.BTEFoEwf.js.map} +1 -1
  126. package/dist/chunks/{data-grid.CsVqTwy0.js → data-grid.BPG1GPIl.js} +482 -398
  127. package/dist/chunks/{data-grid.CsVqTwy0.js.map → data-grid.BPG1GPIl.js.map} +1 -1
  128. package/dist/chunks/date-input.BbZqj10S.js +15 -0
  129. package/dist/chunks/date-input.BbZqj10S.js.map +1 -0
  130. package/dist/chunks/{date-picker.-a_TXwjx.js → date-picker.CnsC_UMG.js} +78 -74
  131. package/dist/chunks/date-picker.CnsC_UMG.js.map +1 -0
  132. package/dist/chunks/date-range-picker.B6GSRjjK.js +1693 -0
  133. package/dist/chunks/date-range-picker.B6GSRjjK.js.map +1 -0
  134. package/dist/chunks/de.DvtL0g75.js +478 -0
  135. package/dist/chunks/de.DvtL0g75.js.map +1 -0
  136. package/dist/chunks/{dialog-page.Dn-WbcxU.js → dialog-page.QpRiNPyx.js} +29 -23
  137. package/dist/chunks/{dialog-page.Dn-WbcxU.js.map → dialog-page.QpRiNPyx.js.map} +1 -1
  138. package/dist/chunks/differenceInMonths.DcFDl4eH.js +43 -0
  139. package/dist/chunks/differenceInMonths.DcFDl4eH.js.map +1 -0
  140. package/dist/chunks/{dropdown-tag.AYIB0ec5.js → dropdown-tag.HBM0wrEV.js} +4 -4
  141. package/dist/chunks/{dropdown-tag.AYIB0ec5.js.map → dropdown-tag.HBM0wrEV.js.map} +1 -1
  142. package/dist/chunks/{dropdown.Dt0_ZUBn.js → dropdown.C2pXf8Li.js} +85 -81
  143. package/dist/chunks/{dropdown.Dt0_ZUBn.js.map → dropdown.C2pXf8Li.js.map} +1 -1
  144. package/dist/chunks/{empty-state.jVTWhJW7.js → empty-state.DpBnqAxu.js} +2 -2
  145. package/dist/chunks/{empty-state.jVTWhJW7.js.map → empty-state.DpBnqAxu.js.map} +1 -1
  146. package/dist/chunks/en-GB.DCGuCmAv.js +46 -0
  147. package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -0
  148. package/dist/chunks/{getTimezoneOffsetInMilliseconds.B7sxiukN.js → en-US.BZii9jNW.js} +160 -196
  149. package/dist/chunks/en-US.BZii9jNW.js.map +1 -0
  150. package/dist/chunks/es.bz0mzkMq.js +374 -0
  151. package/dist/chunks/es.bz0mzkMq.js.map +1 -0
  152. package/dist/chunks/es6.C1DXQV6f.js +12 -0
  153. package/dist/chunks/es6.C1DXQV6f.js.map +1 -0
  154. package/dist/chunks/{field-label.BpeaR4Qc.js → field-label.CEkJnsiL.js} +5 -5
  155. package/dist/chunks/{field-label.BpeaR4Qc.js.map → field-label.CEkJnsiL.js.map} +1 -1
  156. package/dist/chunks/{file-uploader.G6mr6RuA.js → file-uploader.CnOqfuI-.js} +299 -253
  157. package/dist/chunks/{file-uploader.G6mr6RuA.js.map → file-uploader.CnOqfuI-.js.map} +1 -1
  158. package/dist/chunks/filter-bar.CnJAxz9B.js +2559 -0
  159. package/dist/chunks/filter-bar.CnJAxz9B.js.map +1 -0
  160. package/dist/chunks/fixed-scroller.Bp4-iO80.js +114 -0
  161. package/dist/chunks/{fixed-scroller.Ca1ujamx.js.map → fixed-scroller.Bp4-iO80.js.map} +1 -1
  162. package/dist/chunks/{footer-actions.3JdT8b0p.js → footer-actions.BOiN47Xd.js} +3 -3
  163. package/dist/chunks/{footer-actions.3JdT8b0p.js.map → footer-actions.BOiN47Xd.js.map} +1 -1
  164. package/dist/chunks/{form-layout-title.D9GJQfF9.js → form-layout-title.CdC1T4gs.js} +2 -2
  165. package/dist/chunks/{form-layout-title.D9GJQfF9.js.map → form-layout-title.CdC1T4gs.js.map} +1 -1
  166. package/dist/chunks/fr-CA.B1aPU8fp.js +48 -0
  167. package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -0
  168. package/dist/chunks/fr.Dj7wEToe.js +47 -0
  169. package/dist/chunks/fr.Dj7wEToe.js.map +1 -0
  170. package/dist/chunks/getTimezoneOffsetInMilliseconds.C-aIpRfB.js +51 -0
  171. package/dist/chunks/getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map +1 -0
  172. package/dist/chunks/header-meta.D_oAu2S9.js +212 -0
  173. package/dist/chunks/header-meta.D_oAu2S9.js.map +1 -0
  174. package/dist/chunks/{header-with-views.lzT3kGpo.js → header-with-views.Dc9LUYNY.js} +379 -315
  175. package/dist/chunks/{header-with-views.lzT3kGpo.js.map → header-with-views.Dc9LUYNY.js.map} +1 -1
  176. package/dist/chunks/{header.D76MKCdS.js → header.BmtlQmPs.js} +3 -3
  177. package/dist/chunks/{header.D76MKCdS.js.map → header.BmtlQmPs.js.map} +1 -1
  178. package/dist/chunks/{input-field-password.C7zjyp7f.js → input-field-password.D23H_RvO.js} +48 -42
  179. package/dist/chunks/{input-field-password.C7zjyp7f.js.map → input-field-password.D23H_RvO.js.map} +1 -1
  180. package/dist/chunks/{input-field-phone-number.DwuTziSU.js → input-field-phone-number.Bvk2Pvec.js} +9 -3
  181. package/dist/chunks/{input-field-phone-number.DwuTziSU.js.map → input-field-phone-number.Bvk2Pvec.js.map} +1 -1
  182. package/dist/chunks/{input-field.DsT4AWXC.js → input-field.hf0_ALq0.js} +37 -29
  183. package/dist/chunks/{input-field.DsT4AWXC.js.map → input-field.hf0_ALq0.js.map} +1 -1
  184. package/dist/chunks/{inspector.2A5vWUou.js → inspector.C0iAxxoz.js} +40 -34
  185. package/dist/chunks/{inspector.2A5vWUou.js.map → inspector.C0iAxxoz.js.map} +1 -1
  186. package/dist/chunks/isSameWeek.CUD7czUN.js +14 -0
  187. package/dist/chunks/isSameWeek.CUD7czUN.js.map +1 -0
  188. package/dist/chunks/it.Oaj6BklL.js +392 -0
  189. package/dist/chunks/it.Oaj6BklL.js.map +1 -0
  190. package/dist/chunks/ja.Cm9tJMi2.js +367 -0
  191. package/dist/chunks/ja.Cm9tJMi2.js.map +1 -0
  192. package/dist/chunks/ko.Ceaof6EP.js +348 -0
  193. package/dist/chunks/ko.Ceaof6EP.js.map +1 -0
  194. package/dist/chunks/{link.BoDUCYmM.js → link.PsTSQjK3.js} +27 -21
  195. package/dist/chunks/{link.BoDUCYmM.js.map → link.PsTSQjK3.js.map} +1 -1
  196. package/dist/chunks/match.CMBZxEs9.js +302 -0
  197. package/dist/chunks/match.CMBZxEs9.js.map +1 -0
  198. package/dist/chunks/{modal-fullscreen.CcvZBUoF.js → modal-fullscreen.B1gltlxA.js} +5 -5
  199. package/dist/chunks/{modal-fullscreen.CcvZBUoF.js.map → modal-fullscreen.B1gltlxA.js.map} +1 -1
  200. package/dist/chunks/{modal.6hFEbnZM.js → modal.e3EQ6Kex.js} +5 -5
  201. package/dist/chunks/{modal.6hFEbnZM.js.map → modal.e3EQ6Kex.js.map} +1 -1
  202. package/dist/chunks/nl.B6vCf2B9.js +327 -0
  203. package/dist/chunks/nl.B6vCf2B9.js.map +1 -0
  204. package/dist/chunks/{pagination.BSyshRGH.js → pagination.BcFt2FqK.js} +6 -6
  205. package/dist/chunks/{pagination.BSyshRGH.js.map → pagination.BcFt2FqK.js.map} +1 -1
  206. package/dist/chunks/{promo-banner.D3aG5wnp.js → promo-banner.yfBorKj7.js} +2 -2
  207. package/dist/chunks/{promo-banner.D3aG5wnp.js.map → promo-banner.yfBorKj7.js.map} +1 -1
  208. package/dist/chunks/pt-BR.CiGdfP45.js +380 -0
  209. package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -0
  210. package/dist/chunks/{radio-group.DTZwsfwW.js → radio-group.CtTnfkYg.js} +3 -3
  211. package/dist/chunks/{radio-group.DTZwsfwW.js.map → radio-group.CtTnfkYg.js.map} +1 -1
  212. package/dist/chunks/{rich-text-editor.B0ivi3UG.js → rich-text-editor.Dq2CFGOu.js} +5 -5
  213. package/dist/chunks/{rich-text-editor.B0ivi3UG.js.map → rich-text-editor.Dq2CFGOu.js.map} +1 -1
  214. package/dist/chunks/{search-bar.Bpk-PuYT.js → search-bar.B0SdQBnY.js} +3 -3
  215. package/dist/chunks/{search-bar.Bpk-PuYT.js.map → search-bar.B0SdQBnY.js.map} +1 -1
  216. package/dist/chunks/{secondary-nav.BGOYJrsB.js → secondary-nav.BPGpxd0p.js} +35 -29
  217. package/dist/chunks/{secondary-nav.BGOYJrsB.js.map → secondary-nav.BPGpxd0p.js.map} +1 -1
  218. package/dist/chunks/{selection-card-group.CLqWoLSN.js → selection-card-group.BryV14qP.js} +5 -5
  219. package/dist/chunks/{selection-card-group.CLqWoLSN.js.map → selection-card-group.BryV14qP.js.map} +1 -1
  220. package/dist/chunks/{sidepanel.C5SvJNMR.js → sidepanel.NFyZGE57.js} +5 -5
  221. package/dist/chunks/{sidepanel.C5SvJNMR.js.map → sidepanel.NFyZGE57.js.map} +1 -1
  222. package/dist/chunks/startOfWeek.Dxw2MhGp.js +10 -0
  223. package/dist/chunks/startOfWeek.Dxw2MhGp.js.map +1 -0
  224. package/dist/chunks/step.BLFXvHL6.js +223 -0
  225. package/dist/chunks/step.BLFXvHL6.js.map +1 -0
  226. package/dist/chunks/{structured-list-item.CbXDKwsF.js → structured-list-item.CptOCpHP.js} +3 -3
  227. package/dist/chunks/{structured-list-item.CbXDKwsF.js.map → structured-list-item.CptOCpHP.js.map} +1 -1
  228. package/dist/chunks/{summary-grid.types.haWi7oaf.js → summary-grid.types.B1T8_k1m.js} +3 -3
  229. package/dist/chunks/{summary-grid.types.haWi7oaf.js.map → summary-grid.types.B1T8_k1m.js.map} +1 -1
  230. package/dist/chunks/sv.f8EfZjMZ.js +377 -0
  231. package/dist/chunks/sv.f8EfZjMZ.js.map +1 -0
  232. package/dist/chunks/{tab.ZQfGp_FP.js → tab.FUMpPsBP.js} +2 -2
  233. package/dist/chunks/{tab.ZQfGp_FP.js.map → tab.FUMpPsBP.js.map} +1 -1
  234. package/dist/chunks/{textarea.DfR2o1lz.js → textarea.riUt0BiI.js} +31 -31
  235. package/dist/chunks/textarea.riUt0BiI.js.map +1 -0
  236. package/dist/chunks/{timeline-item.rLqeBsyz.js → timeline-item.CFfW1DoD.js} +16 -15
  237. package/dist/chunks/{timeline-item.rLqeBsyz.js.map → timeline-item.CFfW1DoD.js.map} +1 -1
  238. package/dist/chunks/{toast.C7lu_NsX.js → toast.Csv6tMyT.js} +2 -2
  239. package/dist/chunks/{toast.C7lu_NsX.js.map → toast.Csv6tMyT.js.map} +1 -1
  240. package/dist/chunks/{tutorial.DA775wec.js → tutorial.D18LwXVy.js} +2 -2
  241. package/dist/chunks/{tutorial.DA775wec.js.map → tutorial.D18LwXVy.js.map} +1 -1
  242. package/dist/chunks/{use-cached-selected-values.DIKJ8yNE.js → use-cached-selected-values.gDWGi5Nk.js} +240 -231
  243. package/dist/chunks/{use-cached-selected-values.DIKJ8yNE.js.map → use-cached-selected-values.gDWGi5Nk.js.map} +1 -1
  244. package/dist/chunks/{use-country-items.B3Cd3Tdo.js → use-country-items.ClS_So5N.js} +2 -2
  245. package/dist/chunks/{use-country-items.B3Cd3Tdo.js.map → use-country-items.ClS_So5N.js.map} +1 -1
  246. package/dist/chunks/zh-CN.BzH0fIXr.js +389 -0
  247. package/dist/chunks/zh-CN.BzH0fIXr.js.map +1 -0
  248. package/dist/code-snippet.js +1 -1
  249. package/dist/country.js +2 -2
  250. package/dist/dashboard-template.js +1 -1
  251. package/dist/dashed-underline.js +1 -1
  252. package/dist/data-grid-template.js +1 -1
  253. package/dist/data-grid.js +1 -1
  254. package/dist/date-picker.js +2 -2
  255. package/dist/date-range-picker.js +2 -2
  256. package/dist/dropdown.js +3 -3
  257. package/dist/empty-state.js +1 -1
  258. package/dist/file-uploader.js +1 -1
  259. package/dist/filter-bar.js +1 -1
  260. package/dist/form-layout.js +1 -1
  261. package/dist/header-with-views.js +1 -1
  262. package/dist/header.js +1 -1
  263. package/dist/index.js +250 -251
  264. package/dist/index.js.map +1 -1
  265. package/dist/input-field-password.js +1 -1
  266. package/dist/input-field-phone-number.js +1 -1
  267. package/dist/input-field.js +1 -1
  268. package/dist/inspector.js +1 -1
  269. package/dist/internal.js +10 -10
  270. package/dist/link.js +1 -1
  271. package/dist/menu.js +1 -1
  272. package/dist/modal-fullscreen.js +1 -1
  273. package/dist/modal.js +2 -2
  274. package/dist/pagination.js +1 -1
  275. package/dist/popover.js +1 -1
  276. package/dist/promo-banner.js +1 -1
  277. package/dist/radio-group.js +1 -1
  278. package/dist/rich-text-editor.js +1 -1
  279. package/dist/search-bar.js +2 -2
  280. package/dist/secondary-nav.js +1 -1
  281. package/dist/selection-card.js +1 -1
  282. package/dist/sidepanel.js +1 -1
  283. package/dist/stepper.js +1 -1
  284. package/dist/structured-list.js +1 -1
  285. package/dist/styles/bento-dark.css +0 -1829
  286. package/dist/styles/bento-light.css +0 -1829
  287. package/dist/styles/bento.css +0 -1829
  288. package/dist/styles/legacy.css +0 -1829
  289. package/dist/styles/styleguide.css +0 -1829
  290. package/dist/summary-grid.js +1 -1
  291. package/dist/tabs.js +1 -1
  292. package/dist/textarea.js +1 -1
  293. package/dist/timeline.js +1 -1
  294. package/dist/toast.js +1 -1
  295. package/dist/tutorial.js +1 -1
  296. package/dist/web-types.json +119 -2
  297. package/package.json +14 -25
  298. package/dist/chunks/calendar.DCLyThOl.js +0 -1832
  299. package/dist/chunks/calendar.DCLyThOl.js.map +0 -1
  300. package/dist/chunks/checkbox-input.B0NsfSNR.js.map +0 -1
  301. package/dist/chunks/code-snippet.1_edHDaZ.js.map +0 -1
  302. package/dist/chunks/constructNow.BhymNmy5.js +0 -8
  303. package/dist/chunks/country.types.C0Q_hhgJ.js +0 -269
  304. package/dist/chunks/date-format.B8RU7D42.js +0 -17
  305. package/dist/chunks/date-format.B8RU7D42.js.map +0 -1
  306. package/dist/chunks/date-picker.-a_TXwjx.js.map +0 -1
  307. package/dist/chunks/date-range-picker.Bw1yPTu-.js +0 -906
  308. package/dist/chunks/date-range-picker.Bw1yPTu-.js.map +0 -1
  309. package/dist/chunks/differenceInMonths.Cab3nOsb.js +0 -1590
  310. package/dist/chunks/differenceInMonths.Cab3nOsb.js.map +0 -1
  311. package/dist/chunks/es6.MoTTyETW.js +0 -12
  312. package/dist/chunks/es6.MoTTyETW.js.map +0 -1
  313. package/dist/chunks/filter-bar.DNA9QblV.js +0 -2472
  314. package/dist/chunks/filter-bar.DNA9QblV.js.map +0 -1
  315. package/dist/chunks/fixed-scroller.Ca1ujamx.js +0 -106
  316. package/dist/chunks/getTimezoneOffsetInMilliseconds.B7sxiukN.js.map +0 -1
  317. package/dist/chunks/header-meta.C8_W0j_p.js +0 -170
  318. package/dist/chunks/header-meta.C8_W0j_p.js.map +0 -1
  319. package/dist/chunks/step.mqn8E6dm.js +0 -217
  320. package/dist/chunks/step.mqn8E6dm.js.map +0 -1
  321. package/dist/chunks/textarea.DfR2o1lz.js.map +0 -1
@@ -0,0 +1,114 @@
1
+ import { ref as a, onMounted as S, computed as f, defineComponent as L } from "vue";
2
+ import { B as x } from "./button.DIU6m9wD.js";
3
+ import { u as C } from "./index.B6WW_F-J.js";
4
+ import { C as b, a as y } from "./chevron-left.BS24hEFa.js";
5
+ import { o as g } from "./resize.Bqks3WUm.js";
6
+ import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
+ import "../assets/fixed-scroller.css";
8
+ const w = 1, m = 40, F = ({
9
+ contentRef: d,
10
+ containerRef: e,
11
+ leftButtonRef: l,
12
+ rightButtonRef: t
13
+ }) => {
14
+ const s = a(0), o = a(0), c = a(0), n = a(0);
15
+ S(() => {
16
+ g(e.value, () => {
17
+ e.value && (n.value = e.value.offsetWidth, o.value = 0, s.value = 0);
18
+ }), g(d.value, () => {
19
+ var r;
20
+ c.value = (r = d.value) == null ? void 0 : r.scrollWidth, c.value < n.value && (o.value = 0, s.value = 0);
21
+ });
22
+ });
23
+ const _ = f(() => {
24
+ var u, h;
25
+ const r = (u = l.value) != null && u.scrollWidth ? l.value.scrollWidth + m : 0, p = (h = t.value) != null && h.scrollWidth ? t.value.scrollWidth + m : 0;
26
+ return r + p;
27
+ }), i = f(() => Math.ceil(c.value / n.value) ?? 0), v = f(() => {
28
+ const r = new Array(i.value).fill(0);
29
+ return r.forEach((p, u) => {
30
+ if (u === 0)
31
+ return;
32
+ if (u === i.value - 1) {
33
+ r[r.length - 1] = -(c.value - n.value + w);
34
+ return;
35
+ }
36
+ const h = r[u - 1];
37
+ r[u] = -(n.value + Math.abs(h) - _.value);
38
+ }), r;
39
+ }), R = f(() => o.value !== 0), B = f(
40
+ () => s.value >= -(c.value - n.value - 1)
41
+ );
42
+ return {
43
+ offset: s,
44
+ shouldShowLeftButton: R,
45
+ shouldShowRightButton: B,
46
+ // Methods
47
+ scrollLeft: () => {
48
+ o.value !== 0 && (o.value -= 1, s.value = v.value[o.value]);
49
+ },
50
+ scrollRight: () => {
51
+ o.value !== i.value - 1 && (o.value += 1, s.value = v.value[o.value]);
52
+ }
53
+ };
54
+ }, I = {
55
+ "en-US": {
56
+ scrollLeft: "Scroll left",
57
+ scrollRight: "Scroll right"
58
+ },
59
+ "ja-JP": {
60
+ scrollLeft: "左にスクロール",
61
+ scrollRight: "右にスクロール"
62
+ },
63
+ "pt-BR": {
64
+ scrollLeft: "Deslizar para esquerda",
65
+ scrollRight: "Rolar à direita"
66
+ }
67
+ }, O = {
68
+ i18n: { messages: I }
69
+ }, k = /* @__PURE__ */ L({
70
+ ...O,
71
+ __name: "fixed-scroller",
72
+ props: {
73
+ /**
74
+ * Applies the condensed style to the buttons
75
+ */
76
+ condensed: { type: Boolean, default: !1 },
77
+ /**
78
+ * Padding to be applied to the top of the scroller container
79
+ */
80
+ extraPaddingTop: { type: Number, default: 0 }
81
+ },
82
+ setup(d) {
83
+ const { t: e } = C(), l = a(null), t = a(null), s = a(null), o = a(null), { offset: c, shouldShowLeftButton: n, shouldShowRightButton: _, scrollLeft: i, scrollRight: v } = F({
84
+ contentRef: l,
85
+ containerRef: t,
86
+ leftButtonRef: s,
87
+ rightButtonRef: o
88
+ });
89
+ return { __sfc: !0, t: e, contentRef: l, fixedScrollerRef: t, leftButtonRef: s, rightButtonRef: o, offset: c, shouldShowLeftButton: n, shouldShowRightButton: _, scrollLeft: i, scrollRight: v, BentoButton: x, ChevronLeftIcon: y, ChevronRightIcon: b };
90
+ }
91
+ });
92
+ var E = function() {
93
+ var e = this, l = e._self._c, t = e._self._setupProxy;
94
+ return l("div", { ref: "fixedScrollerRef", staticClass: "b-fixed-scroller" }, [l("div", { staticClass: "b-fixed-scroller__container" }, [l("div", { ref: "contentRef", staticClass: "b-fixed-scroller__content", style: {
95
+ transform: `translateX(${t.offset}px)`,
96
+ paddingTop: t.shouldShowLeftButton || t.shouldShowRightButton ? `${e.extraPaddingTop}px` : null
97
+ } }, [e._t("default")], 2)]), t.shouldShowLeftButton ? l("div", { ref: "leftButtonRef", staticClass: "b-fixed-scroller__left" }, [l(t.BentoButton, { attrs: { variant: "secondary", "aria-label": t.t("scrollLeft"), condensed: e.condensed }, on: { click: t.scrollLeft }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
98
+ return [l(t.ChevronLeftIcon, { attrs: { "svg-title": "checked", "aria-hidden": "true" } })];
99
+ }, proxy: !0 }], null, !1, 1728943899) })], 1) : e._e(), t.shouldShowRightButton ? l("div", { ref: "rightButtonRef", staticClass: "b-fixed-scroller__right" }, [l(t.BentoButton, { attrs: { variant: "secondary", "aria-label": t.t("scrollRight"), condensed: e.condensed }, on: { click: t.scrollRight }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
100
+ return [l(t.ChevronRightIcon, { attrs: { "svg-title": "checked", "aria-hidden": "true" } })];
101
+ }, proxy: !0 }], null, !1, 29940896) })], 1) : e._e()]);
102
+ }, T = [], P = /* @__PURE__ */ W(
103
+ k,
104
+ E,
105
+ T,
106
+ !1,
107
+ null,
108
+ "0a2c2ec6"
109
+ );
110
+ const q = P.exports;
111
+ export {
112
+ q as F
113
+ };
114
+ //# sourceMappingURL=fixed-scroller.Bp4-iO80.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixed-scroller.Ca1ujamx.js","sources":["../../src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref, UnwrapRef } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n containerRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n leftButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n rightButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param props - All the necessary references to calculate the scroll\n * @param props.containerRef - Reference to the container, this defines the visible space width\n * @param props.contentRef - Reference to the content itself, this defines the total content width\n * @param props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns response - Values used in the view to show the buttons and to change the view right or left\n * @returns response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns response.scrollLeft - Used to shift the view to the left\n * @returns response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n\n if (totalContentWidth.value < visibleSpaceWidth.value) {\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA,aAEAJ,EAAA,QAAAC,EAAA,UAEIF,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA;AAAA,EACH,CAAA;AAKL,QAAAQ,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC,IAAAb,EAAA,UAAA,QAAAa,EAAA,cAAAb,EAAA,MAAA,cAAAL,IAAA;AAIA,WAAAgB,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAJ,EAAA,MAAA,KAAA,KAAAN,EAAA,QAAAC,EAAA,KAAA,KAAA,CAAA,GAIAU,IAAAL,EAAA,MAAA;AACI,UAAAM,IAAA,IAAA,MAAAF,EAAA,KAAA,EAAA,KAAA,CAAA;AAEA,WAAAE,EAAA,QAAA,CAAAC,GAAAC,MAAA;AAEI,UAAAA,MAAA;AACI;AAIJ,UAAAA,MAAAJ,EAAA,QAAA,GAAA;AACI,QAAAE,EAAAA,EAAA,SAAA,CAAA,IAAA,EAAAZ,EAAA,QAAAC,EAAA,QAAAX;AAMA;AAAA,MAAA;AAIJ,YAAAyB,IAAAH,EAAAE,IAAA,CAAA;AACA,MAAAF,EAAAE,CAAA,IAAA,EAAAb,EAAA,QAAA,KAAA,IAAAc,CAAA,IAAAV,EAAA;AAAA,IAAkG,CAAA,GAGtGO;AAAA,EAAO,CAAA,GAIXI,IAAAV,EAAA,MAAAP,EAAA,UAAA,CAAA,GAEAkB,IAAAX;AAAA,IAA8B,MAAAT,EAAA,SAAA,EAAAG,EAAA,QAAAC,EAAA,QAAA;AAAA,EACkD;AA6BhF,SAAA;AAAA,IAAO,QAAAJ;AAAA,IACH,sBAAAmB;AAAA,IACA,uBAAAC;AAAA;AAAA,IACA,YA1BJ,MAAA;AAEI,MAAAlB,EAAA,UAAA,MAIAA,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,IAsBlD,aAhBJ,MAAA;AAEI,MAAAA,EAAA,UAAAW,EAAA,QAAA,MAIAX,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,EAUlD;AAER;;;;;GCxEImB,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA9CA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEA5B,IAAAK,EAAA,IAAA,GACAwB,IAAAxB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fixed-scroller.Bp4-iO80.js","sources":["../../src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref, UnwrapRef } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n containerRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n leftButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n rightButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param props - All the necessary references to calculate the scroll\n * @param props.containerRef - Reference to the container, this defines the visible space width\n * @param props.contentRef - Reference to the content itself, this defines the total content width\n * @param props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns response - Values used in the view to show the buttons and to change the view right or left\n * @returns response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns response.scrollLeft - Used to shift the view to the left\n * @returns response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n\n if (totalContentWidth.value < visibleSpaceWidth.value) {\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA,aAEAJ,EAAA,QAAAC,EAAA,UAEIF,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA;AAAA,EACH,CAAA;AAKL,QAAAQ,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC,IAAAb,EAAA,UAAA,QAAAa,EAAA,cAAAb,EAAA,MAAA,cAAAL,IAAA;AAIA,WAAAgB,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAJ,EAAA,MAAA,KAAA,KAAAN,EAAA,QAAAC,EAAA,KAAA,KAAA,CAAA,GAIAU,IAAAL,EAAA,MAAA;AACI,UAAAM,IAAA,IAAA,MAAAF,EAAA,KAAA,EAAA,KAAA,CAAA;AAEA,WAAAE,EAAA,QAAA,CAAAC,GAAAC,MAAA;AAEI,UAAAA,MAAA;AACI;AAIJ,UAAAA,MAAAJ,EAAA,QAAA,GAAA;AACI,QAAAE,EAAAA,EAAA,SAAA,CAAA,IAAA,EAAAZ,EAAA,QAAAC,EAAA,QAAAX;AAMA;AAAA,MAAA;AAIJ,YAAAyB,IAAAH,EAAAE,IAAA,CAAA;AACA,MAAAF,EAAAE,CAAA,IAAA,EAAAb,EAAA,QAAA,KAAA,IAAAc,CAAA,IAAAV,EAAA;AAAA,IAAkG,CAAA,GAGtGO;AAAA,EAAO,CAAA,GAIXI,IAAAV,EAAA,MAAAP,EAAA,UAAA,CAAA,GAEAkB,IAAAX;AAAA,IAA8B,MAAAT,EAAA,SAAA,EAAAG,EAAA,QAAAC,EAAA,QAAA;AAAA,EACkD;AA6BhF,SAAA;AAAA,IAAO,QAAAJ;AAAA,IACH,sBAAAmB;AAAA,IACA,uBAAAC;AAAA;AAAA,IACA,YA1BJ,MAAA;AAEI,MAAAlB,EAAA,UAAA,MAIAA,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,IAsBlD,aAhBJ,MAAA;AAEI,MAAAA,EAAA,UAAAW,EAAA,QAAA,MAIAX,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,EAUlD;AAER;;;;;;;;;;;;;GCxEImB,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA9CA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEA5B,IAAAK,EAAA,IAAA,GACAwB,IAAAxB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as i, toRefs as r, computed as l, onMounted as c } from "vue";
2
2
  import { B as u } from "./typography.Bq-EGj9y.js";
3
- import { a as _ } from "./button.C5GvPqe5.js";
4
- import { B as d } from "./button-actions.BWVq6OZQ.js";
3
+ import { a as _ } from "./button.DIU6m9wD.js";
4
+ import { B as d } from "./button-actions.D9n7MxWe.js";
5
5
  import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import "../assets/footer-actions.css";
7
7
  const p = {}, g = /* @__PURE__ */ i({
@@ -93,4 +93,4 @@ const w = b.exports;
93
93
  export {
94
94
  w as F
95
95
  };
96
- //# sourceMappingURL=footer-actions.3JdT8b0p.js.map
96
+ //# sourceMappingURL=footer-actions.BOiN47Xd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer-actions.3JdT8b0p.js","sources":["../../src/components/internal/footer-actions/footer-actions.vue"],"sourcesContent":["<template>\n <div class=\"b-footer-actions\">\n <div class=\"b-footer-actions__wrapper\">\n <bento-typography v-if=\"actionsLabel\" class=\"b-footer-actions__label\" el=\"span\" variant=\"body\" stronger>\n {{ actionsLabel }}\n </bento-typography>\n\n <bento-button-actions\n v-if=\"alignedActions.leftAligned\"\n class=\"b-footer-actions__left-group\"\n :actions=\"alignedActions.leftAligned\"\n layout=\"buttons-start\"\n ></bento-button-actions>\n\n <bento-button-actions\n class=\"b-footer-actions__right-group\"\n :actions=\"alignedActions.rightAligned\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { computed, onMounted, type PropType, toRefs } from 'vue';\n import { BentoButtonActions, type BentoButtonActionsList, BentoButtonVariant } from '@/components/button';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n });\n\n const { actions, destructiveActions } = toRefs(props);\n\n const alignedActions = computed(() => {\n const rightAlignedButtons =\n actions.value.length < 3 ? actions.value : actions.value.slice(0, actions.value.length - 1);\n\n // Add red color to the 1-st Action button\n rightAlignedButtons[0].critical = destructiveActions.value || rightAlignedButtons[0].critical;\n\n return {\n leftAligned:\n actions.value.length === 3\n ? [\n {\n ...actions.value[actions.value.length - 1],\n variant: BentoButtonVariant.SECONDARY,\n },\n ]\n : null,\n rightAligned: [...rightAlignedButtons],\n };\n });\n\n onMounted(() => {\n if (props.actions && props.actions.length > 3) {\n throw new Error('Not more than 3 action buttons may be provided to Bento Modal default variant');\n }\n\n if (props.actionsLabel && props.actions && props.actions.length > 2) {\n throw new Error(\n 'Not more than 2 action buttons may be provided with actions label to Bento Modal default variant'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the logic of displaying actions in default Modal and Sidepanel\n\n * @example\n * import { FooterActions } from '@/components/internal/footer-actions';\n *\n * export default {\n * components: { FooterActions },\n * template: `\n * <footer-actions :actions=\"BentoButtonActionsList\" actions-label=\"Label\" :destructive-actions=\"true\" />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./footer-actions.scss\" />\n"],"names":["__default__","actions","destructiveActions","toRefs","props","alignedActions","computed","rightAlignedButtons","BentoButtonVariant","onMounted"],"mappings":";;;;;;AA+HI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDA,EAAA,SAAAC,GAAA,oBAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAN,EAAA,MAAA,SAAA,IAAAA,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAA,EAAA,MAAA,SAAA,CAAA;AAIA,aAAAM,EAAA,CAAA,EAAA,WAAAL,EAAA,SAAAK,EAAA,CAAA,EAAA,UAEA;AAAA,QAAO,aAAAN,EAAA,MAAA,WAAA,IAAA;AAAA,UAGO;AAAA,YACI,GAAAA,EAAA,MAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,YAC6C,SAAAO,EAAA;AAAA,UACb;AAAA,QAChC,IAAA;AAAA,QAEJ,cAAA,CAAA,GAAAD,CAAA;AAAA,MAC2B;AAAA,IACzC,CAAA;AAGJ,WAAAE,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,+EAAA;AAGJ,UAAAA,EAAA,gBAAAA,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"footer-actions.BOiN47Xd.js","sources":["../../src/components/internal/footer-actions/footer-actions.vue"],"sourcesContent":["<template>\n <div class=\"b-footer-actions\">\n <div class=\"b-footer-actions__wrapper\">\n <bento-typography v-if=\"actionsLabel\" class=\"b-footer-actions__label\" el=\"span\" variant=\"body\" stronger>\n {{ actionsLabel }}\n </bento-typography>\n\n <bento-button-actions\n v-if=\"alignedActions.leftAligned\"\n class=\"b-footer-actions__left-group\"\n :actions=\"alignedActions.leftAligned\"\n layout=\"buttons-start\"\n ></bento-button-actions>\n\n <bento-button-actions\n class=\"b-footer-actions__right-group\"\n :actions=\"alignedActions.rightAligned\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { computed, onMounted, type PropType, toRefs } from 'vue';\n import { BentoButtonActions, type BentoButtonActionsList, BentoButtonVariant } from '@/components/button';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n });\n\n const { actions, destructiveActions } = toRefs(props);\n\n const alignedActions = computed(() => {\n const rightAlignedButtons =\n actions.value.length < 3 ? actions.value : actions.value.slice(0, actions.value.length - 1);\n\n // Add red color to the 1-st Action button\n rightAlignedButtons[0].critical = destructiveActions.value || rightAlignedButtons[0].critical;\n\n return {\n leftAligned:\n actions.value.length === 3\n ? [\n {\n ...actions.value[actions.value.length - 1],\n variant: BentoButtonVariant.SECONDARY,\n },\n ]\n : null,\n rightAligned: [...rightAlignedButtons],\n };\n });\n\n onMounted(() => {\n if (props.actions && props.actions.length > 3) {\n throw new Error('Not more than 3 action buttons may be provided to Bento Modal default variant');\n }\n\n if (props.actionsLabel && props.actions && props.actions.length > 2) {\n throw new Error(\n 'Not more than 2 action buttons may be provided with actions label to Bento Modal default variant'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the logic of displaying actions in default Modal and Sidepanel\n\n * @example\n * import { FooterActions } from '@/components/internal/footer-actions';\n *\n * export default {\n * components: { FooterActions },\n * template: `\n * <footer-actions :actions=\"BentoButtonActionsList\" actions-label=\"Label\" :destructive-actions=\"true\" />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./footer-actions.scss\" />\n"],"names":["__default__","actions","destructiveActions","toRefs","props","alignedActions","computed","rightAlignedButtons","BentoButtonVariant","onMounted"],"mappings":";;;;;;AA+HI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDA,EAAA,SAAAC,GAAA,oBAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAN,EAAA,MAAA,SAAA,IAAAA,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAA,EAAA,MAAA,SAAA,CAAA;AAIA,aAAAM,EAAA,CAAA,EAAA,WAAAL,EAAA,SAAAK,EAAA,CAAA,EAAA,UAEA;AAAA,QAAO,aAAAN,EAAA,MAAA,WAAA,IAAA;AAAA,UAGO;AAAA,YACI,GAAAA,EAAA,MAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,YAC6C,SAAAO,EAAA;AAAA,UACb;AAAA,QAChC,IAAA;AAAA,QAEJ,cAAA,CAAA,GAAAD,CAAA;AAAA,MAC2B;AAAA,IACzC,CAAA;AAGJ,WAAAE,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,+EAAA;AAGJ,UAAAA,EAAA,gBAAAA,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as n, useSlots as c, computed as a, provide as d, toRef as y } from "vue";
2
- import { B as f } from "./alert.BlJBrD8c.js";
2
+ import { B as f } from "./alert.B3Pdp02a.js";
3
3
  import { u } from "./use-has-slot.C9lQZ6nz.js";
4
4
  import { F as v } from "./form-layout.types.bZW9iR6_.js";
5
5
  import { n as l } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
@@ -194,4 +194,4 @@ export {
194
194
  M as c,
195
195
  J as f
196
196
  };
197
- //# sourceMappingURL=form-layout-title.D9GJQfF9.js.map
197
+ //# sourceMappingURL=form-layout-title.CdC1T4gs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-layout-title.D9GJQfF9.js","sources":["../../src/components/form-layout/form-layout.vue","../../src/components/form-layout/components/form-layout-field-tip/form-layout-tip.types.ts","../../src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../../src/components/form-layout/components/form-layout-group/form-layout-group.types.ts","../../src/components/form-layout/components/form-layout-group/form-layout-group.vue","../../src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\" @submit=\"emit('submit', $event)\">\n <bento-alert v-if=\"hasSlot('error-message')\" class=\"b-form-layout__error-message\" type=\"critical\">\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"submit\"]);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","import { type BentoAlertTypeOption } from '@/components/alert/alert.types';\n\nexport type BentoFormLayoutFieldTipTypeOption = `${BentoAlertTypeOption}`;\nexport const BentoFormLayoutFieldTipTypeOptions = ['warning', 'critical', 'highlight', 'success'];\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert v-if=\"hasSlot('message')\" :id=\"id\" variant=\"tip\" :type=\"type\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { type PropType, useSlots } from 'vue';\n import {\n type BentoFormLayoutFieldTipTypeOption,\n BentoFormLayoutFieldTipTypeOptions,\n } from './form-layout-tip.types';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n\n defineProps({\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values highlight, success, critical, warning\n */\n type: {\n type: String as PropType<BentoFormLayoutFieldTipTypeOption>,\n default: 'highlight',\n validator: (value: BentoFormLayoutFieldTipTypeOption) => BentoFormLayoutFieldTipTypeOptions.includes(value),\n },\n /**\n * Unique identifier to the form field. Used for accessibility.\n */\n id: {\n type: String,\n default: undefined,\n },\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","export type BentoLayoutGroupProportions =\n | '33-33-33'\n | '50-50'\n | '25-75'\n | '75-25'\n | '33-66'\n | '66-33'\n | '25'\n | '33'\n | '50'\n | '100';\n\nexport const BentoLayoutGroupProportions = [\n '100',\n '50',\n '33',\n '25',\n '66-33',\n '33-66',\n '75-25',\n '25-75',\n '50-50',\n '33-33-33',\n];\n","<template>\n <div class=\"b-form-layout-group\" :class=\"conditionalClasses\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType } from 'vue';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n // Default proportion\n const DEFAULT_PROPORTION = 100;\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '33-33-33'\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n validator: (value: BentoLayoutGroupProportions) => BentoLayoutGroupProportions.includes(value),\n },\n });\n\n // Sets DEFAULT_PROPORTION by default if `layout` is not in the list\n const computedLayout = computed(() =>\n BentoLayoutGroupProportions.includes(props.layout) ? props.layout : DEFAULT_PROPORTION\n );\n\n const conditionalClasses = computed(() => ({\n // Transform into column if the layout is unsupported\n 'b-form-layout-group--column': !BentoLayoutGroupProportions.includes(props.layout),\n // Assings the correct layout class\n [`b-form-layout-group--${computedLayout.value}`]: true,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" variant=\"title\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-form-layout-title__description\" el=\"span\" wide>\n <slot name=\"description\" />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organise related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * One of the values provided in @see BentoTypographyElement must always be provided as a string\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection el=\"h2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","BentoFormLayoutFieldTipTypeOptions","__default__$2","BentoLayoutGroupProportions","__default__$1","DEFAULT_PROPORTION","computedLayout","conditionalClasses","__default__","isSection"],"mappings":";;;;;;;AAwFI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;iBA5DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAiBAI,IAAAC,EAAA,MAAAC,EAAA,OAAA,SAAA,KAAA,GACAC,IAAAF,EAAA,MAAAH,EAAA,cAAA,KAAAA,EAAA,eAAA,CAAA;AAEA,WAAAM,EAAAC,GAAAC,EAAAJ,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;qBC9CGK,IAAA,CAAA,WAAA,YAAA,aAAA,SAAA,GC+DHC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;AA3BA,UAAAZ,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;qBC5BGa,IAAA;AAAA,EAAoC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAEJ,GCuDIC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAnEAC,IAAA,KAkCAC,IAAAX;AAAA,MAAuB,MAAAQ,EAAA,SAAAP,EAAA,MAAA,IAAAA,EAAA,SAAAS;AAAA,IACiD,GAGxEE,IAAAZ,EAAA,OAAA;AAAA;AAAA,MAA2C,+BAAA,CAAAQ,EAAA,SAAAP,EAAA,MAAA;AAAA;AAAA,MAE0C,CAAA,wBAAAU,EAAA,KAAA,EAAA,GAAA;AAAA,IAE/B,EAAA;;;;;;;;;;;;;;;qBCmBtDE,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBAvDAlB,IAAAC,EAAA,GAyBAkB,IAAAd,EAAA,MAAA,CAAAC,EAAA,UAAA,GACAJ,IAAAC,EAAAH,CAAA,GACAiB,IAAAZ,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"form-layout-title.CdC1T4gs.js","sources":["../../src/components/form-layout/form-layout.vue","../../src/components/form-layout/components/form-layout-field-tip/form-layout-tip.types.ts","../../src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../../src/components/form-layout/components/form-layout-group/form-layout-group.types.ts","../../src/components/form-layout/components/form-layout-group/form-layout-group.vue","../../src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\" @submit=\"emit('submit', $event)\">\n <bento-alert v-if=\"hasSlot('error-message')\" class=\"b-form-layout__error-message\" type=\"critical\">\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"submit\"]);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","import { type BentoAlertTypeOption } from '@/components/alert/alert.types';\n\nexport type BentoFormLayoutFieldTipTypeOption = `${BentoAlertTypeOption}`;\nexport const BentoFormLayoutFieldTipTypeOptions = ['warning', 'critical', 'highlight', 'success'];\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert v-if=\"hasSlot('message')\" :id=\"id\" variant=\"tip\" :type=\"type\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { type PropType, useSlots } from 'vue';\n import {\n type BentoFormLayoutFieldTipTypeOption,\n BentoFormLayoutFieldTipTypeOptions,\n } from './form-layout-tip.types';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n\n defineProps({\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values highlight, success, critical, warning\n */\n type: {\n type: String as PropType<BentoFormLayoutFieldTipTypeOption>,\n default: 'highlight',\n validator: (value: BentoFormLayoutFieldTipTypeOption) => BentoFormLayoutFieldTipTypeOptions.includes(value),\n },\n /**\n * Unique identifier to the form field. Used for accessibility.\n */\n id: {\n type: String,\n default: undefined,\n },\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","export type BentoLayoutGroupProportions =\n | '33-33-33'\n | '50-50'\n | '25-75'\n | '75-25'\n | '33-66'\n | '66-33'\n | '25'\n | '33'\n | '50'\n | '100';\n\nexport const BentoLayoutGroupProportions = [\n '100',\n '50',\n '33',\n '25',\n '66-33',\n '33-66',\n '75-25',\n '25-75',\n '50-50',\n '33-33-33',\n];\n","<template>\n <div class=\"b-form-layout-group\" :class=\"conditionalClasses\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType } from 'vue';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n // Default proportion\n const DEFAULT_PROPORTION = 100;\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '33-33-33'\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n validator: (value: BentoLayoutGroupProportions) => BentoLayoutGroupProportions.includes(value),\n },\n });\n\n // Sets DEFAULT_PROPORTION by default if `layout` is not in the list\n const computedLayout = computed(() =>\n BentoLayoutGroupProportions.includes(props.layout) ? props.layout : DEFAULT_PROPORTION\n );\n\n const conditionalClasses = computed(() => ({\n // Transform into column if the layout is unsupported\n 'b-form-layout-group--column': !BentoLayoutGroupProportions.includes(props.layout),\n // Assings the correct layout class\n [`b-form-layout-group--${computedLayout.value}`]: true,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" variant=\"title\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-form-layout-title__description\" el=\"span\" wide>\n <slot name=\"description\" />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organise related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * One of the values provided in @see BentoTypographyElement must always be provided as a string\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection el=\"h2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","BentoFormLayoutFieldTipTypeOptions","__default__$2","BentoLayoutGroupProportions","__default__$1","DEFAULT_PROPORTION","computedLayout","conditionalClasses","__default__","isSection"],"mappings":";;;;;;;AAwFI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;iBA5DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAiBAI,IAAAC,EAAA,MAAAC,EAAA,OAAA,SAAA,KAAA,GACAC,IAAAF,EAAA,MAAAH,EAAA,cAAA,KAAAA,EAAA,eAAA,CAAA;AAEA,WAAAM,EAAAC,GAAAC,EAAAJ,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;qBC9CGK,IAAA,CAAA,WAAA,YAAA,aAAA,SAAA,GC+DHC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;AA3BA,UAAAZ,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA;;;;;;;;;;;;;;;;;qBC5BGa,IAAA;AAAA,EAAoC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAEJ,GCuDIC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAnEAC,IAAA,KAkCAC,IAAAX;AAAA,MAAuB,MAAAQ,EAAA,SAAAP,EAAA,MAAA,IAAAA,EAAA,SAAAS;AAAA,IACiD,GAGxEE,IAAAZ,EAAA,OAAA;AAAA;AAAA,MAA2C,+BAAA,CAAAQ,EAAA,SAAAP,EAAA,MAAA;AAAA;AAAA,MAE0C,CAAA,wBAAAU,EAAA,KAAA,EAAA,GAAA;AAAA,IAE/B,EAAA;;;;;;;;;;;;;;;qBCmBtDE,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBAvDAlB,IAAAC,EAAA,GAyBAkB,IAAAd,EAAA,MAAA,CAAAC,EAAA,UAAA,GACAJ,IAAAC,EAAAH,CAAA,GACAiB,IAAAZ,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,48 @@
1
+ import { m as a, l as m, f as e, a as o } from "./match.CMBZxEs9.js";
2
+ import { b as t } from "./en-US.BZii9jNW.js";
3
+ const s = {
4
+ full: "EEEE d MMMM y",
5
+ long: "d MMMM y",
6
+ medium: "d MMM y",
7
+ short: "yy-MM-dd"
8
+ }, l = {
9
+ full: "HH:mm:ss zzzz",
10
+ long: "HH:mm:ss z",
11
+ medium: "HH:mm:ss",
12
+ short: "HH:mm"
13
+ }, i = {
14
+ full: "{{date}} 'à' {{time}}",
15
+ long: "{{date}} 'à' {{time}}",
16
+ medium: "{{date}}, {{time}}",
17
+ short: "{{date}}, {{time}}"
18
+ }, d = {
19
+ date: t({
20
+ formats: s,
21
+ defaultWidth: "full"
22
+ }),
23
+ time: t({
24
+ formats: l,
25
+ defaultWidth: "full"
26
+ }),
27
+ dateTime: t({
28
+ formats: i,
29
+ defaultWidth: "full"
30
+ })
31
+ }, n = {
32
+ code: "fr-CA",
33
+ formatDistance: o,
34
+ formatLong: d,
35
+ formatRelative: e,
36
+ localize: m,
37
+ match: a,
38
+ // Unique for fr-CA
39
+ options: {
40
+ weekStartsOn: 0,
41
+ firstWeekContainsDate: 1
42
+ }
43
+ };
44
+ export {
45
+ n as default,
46
+ n as frCA
47
+ };
48
+ //# sourceMappingURL=fr-CA.B1aPU8fp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-CA.B1aPU8fp.js","sources":["../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr-CA/_lib/formatLong.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr-CA.js"],"sourcesContent":["import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE d MMMM y\",\n long: \"d MMMM y\",\n medium: \"d MMM y\",\n short: \"yy-MM-dd\",\n};\n\nconst timeFormats = {\n full: \"HH:mm:ss zzzz\",\n long: \"HH:mm:ss z\",\n medium: \"HH:mm:ss\",\n short: \"HH:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'à' {{time}}\",\n long: \"{{date}} 'à' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","// Same as fr\nimport { formatDistance } from \"./fr/_lib/formatDistance.js\";\nimport { formatRelative } from \"./fr/_lib/formatRelative.js\";\nimport { localize } from \"./fr/_lib/localize.js\";\nimport { match } from \"./fr/_lib/match.js\";\n\n// Unique for fr-CA\nimport { formatLong } from \"./fr-CA/_lib/formatLong.js\";\n\n/**\n * @category Locales\n * @summary French locale (Canada).\n * @language French\n * @iso-639-2 fra\n * @author Jean Dupouy [@izeau](https://github.com/izeau)\n * @author François B [@fbonzon](https://github.com/fbonzon)\n * @author Gabriele Petrioli [@gpetrioli](https://github.com/gpetrioli)\n */\nexport const frCA = {\n code: \"fr-CA\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n\n // Unique for fr-CA\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default frCA;\n"],"names":["dateFormats","timeFormats","dateTimeFormats","formatLong","buildFormatLongFn","frCA","formatDistance","formatRelative","localize","match"],"mappings":";;AAEA,MAAMA,IAAc;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAc;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAEaC,IAAa;AAAA,EACxB,MAAMC,EAAkB;AAAA,IACtB,SAASJ;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AAAA,EAED,MAAMI,EAAkB;AAAA,IACtB,SAASH;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AAAA,EAED,UAAUG,EAAkB;AAAA,IAC1B,SAASF;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AACH,GCpBaG,IAAO;AAAA,EAClB,MAAM;AAAA,EACN,gBAAgBC;AAAA,EAChB,YAAYH;AAAA,EACZ,gBAAgBI;AAAA,EAChB,UAAUC;AAAA,EACV,OAAOC;AAAA;AAAA,EAGP,SAAS;AAAA,IACP,cAAc;AAAA,IACd,uBAAuB;AAAA,EACxB;AACH;","x_google_ignoreList":[0,1]}
@@ -0,0 +1,47 @@
1
+ import { m as a, l as m, f as e, a as o } from "./match.CMBZxEs9.js";
2
+ import { b as t } from "./en-US.BZii9jNW.js";
3
+ const s = {
4
+ full: "EEEE d MMMM y",
5
+ long: "d MMMM y",
6
+ medium: "d MMM y",
7
+ short: "dd/MM/y"
8
+ }, l = {
9
+ full: "HH:mm:ss zzzz",
10
+ long: "HH:mm:ss z",
11
+ medium: "HH:mm:ss",
12
+ short: "HH:mm"
13
+ }, i = {
14
+ full: "{{date}} 'à' {{time}}",
15
+ long: "{{date}} 'à' {{time}}",
16
+ medium: "{{date}}, {{time}}",
17
+ short: "{{date}}, {{time}}"
18
+ }, d = {
19
+ date: t({
20
+ formats: s,
21
+ defaultWidth: "full"
22
+ }),
23
+ time: t({
24
+ formats: l,
25
+ defaultWidth: "full"
26
+ }),
27
+ dateTime: t({
28
+ formats: i,
29
+ defaultWidth: "full"
30
+ })
31
+ }, n = {
32
+ code: "fr",
33
+ formatDistance: o,
34
+ formatLong: d,
35
+ formatRelative: e,
36
+ localize: m,
37
+ match: a,
38
+ options: {
39
+ weekStartsOn: 1,
40
+ firstWeekContainsDate: 4
41
+ }
42
+ };
43
+ export {
44
+ n as default,
45
+ n as fr
46
+ };
47
+ //# sourceMappingURL=fr.Dj7wEToe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.Dj7wEToe.js","sources":["../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js"],"sourcesContent":["import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE d MMMM y\",\n long: \"d MMMM y\",\n medium: \"d MMM y\",\n short: \"dd/MM/y\",\n};\n\nconst timeFormats = {\n full: \"HH:mm:ss zzzz\",\n long: \"HH:mm:ss z\",\n medium: \"HH:mm:ss\",\n short: \"HH:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'à' {{time}}\",\n long: \"{{date}} 'à' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","import { formatDistance } from \"./fr/_lib/formatDistance.js\";\nimport { formatLong } from \"./fr/_lib/formatLong.js\";\nimport { formatRelative } from \"./fr/_lib/formatRelative.js\";\nimport { localize } from \"./fr/_lib/localize.js\";\nimport { match } from \"./fr/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary French locale.\n * @language French\n * @iso-639-2 fra\n * @author Jean Dupouy [@izeau](https://github.com/izeau)\n * @author François B [@fbonzon](https://github.com/fbonzon)\n */\nexport const fr = {\n code: \"fr\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1 /* Monday */,\n firstWeekContainsDate: 4,\n },\n};\n\n// Fallback for modularized imports:\nexport default fr;\n"],"names":["dateFormats","timeFormats","dateTimeFormats","formatLong","buildFormatLongFn","fr","formatDistance","formatRelative","localize","match"],"mappings":";;AAEA,MAAMA,IAAc;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAc;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAkB;AAAA,EACtB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAEaC,IAAa;AAAA,EACxB,MAAMC,EAAkB;AAAA,IACtB,SAASJ;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AAAA,EAED,MAAMI,EAAkB;AAAA,IACtB,SAASH;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AAAA,EAED,UAAUG,EAAkB;AAAA,IAC1B,SAASF;AAAA,IACT,cAAc;AAAA,EAClB,CAAG;AACH,GCxBaG,IAAK;AAAA,EAChB,MAAM;AAAA,EACN,gBAAgBC;AAAA,EAChB,YAAYH;AAAA,EACZ,gBAAgBI;AAAA,EAChB,UAAUC;AAAA,EACV,OAAOC;AAAA,EACP,SAAS;AAAA,IACP,cAAc;AAAA,IACd,uBAAuB;AAAA,EACxB;AACH;","x_google_ignoreList":[0,1]}
@@ -0,0 +1,51 @@
1
+ const u = 6048e5, f = 864e5, a = 6e4, l = 525600, m = 43200, D = 1440, s = /* @__PURE__ */ Symbol.for("constructDateFrom");
2
+ function c(t, n) {
3
+ return typeof t == "function" ? t(n) : t && typeof t == "object" && s in t ? t[s](n) : t instanceof Date ? new t.constructor(n) : new Date(n);
4
+ }
5
+ function o(t, n) {
6
+ return c(n || t, t);
7
+ }
8
+ function g(t, ...n) {
9
+ const e = c.bind(
10
+ null,
11
+ t || n.find((r) => typeof r == "object")
12
+ );
13
+ return n.map(e);
14
+ }
15
+ function p(t, n) {
16
+ const e = +o(t) - +o(n);
17
+ return e < 0 ? -1 : e > 0 ? 1 : e;
18
+ }
19
+ let i = {};
20
+ function y() {
21
+ return i;
22
+ }
23
+ function I(t) {
24
+ const n = o(t), e = new Date(
25
+ Date.UTC(
26
+ n.getFullYear(),
27
+ n.getMonth(),
28
+ n.getDate(),
29
+ n.getHours(),
30
+ n.getMinutes(),
31
+ n.getSeconds(),
32
+ n.getMilliseconds()
33
+ )
34
+ );
35
+ return e.setUTCFullYear(n.getFullYear()), +t - +e;
36
+ }
37
+ export {
38
+ p as a,
39
+ I as b,
40
+ c,
41
+ m as d,
42
+ l as e,
43
+ a as f,
44
+ y as g,
45
+ u as h,
46
+ f as i,
47
+ D as m,
48
+ g as n,
49
+ o as t
50
+ };
51
+ //# sourceMappingURL=getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTimezoneOffsetInMilliseconds.C-aIpRfB.js","sources":["../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/compareAsc.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js"],"sourcesContent":["/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const diff = +toDate(dateLeft) - +toDate(dateRight);\n\n if (diff < 0) return -1;\n else if (diff > 0) return 1;\n\n // Return 0 if diff is 0; return NaN if diff is NaN\n return diff;\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n"],"names":["millisecondsInWeek","millisecondsInDay","millisecondsInMinute","minutesInYear","minutesInMonth","minutesInDay","constructFromSymbol","constructFrom","date","value","toDate","argument","context","normalizeDates","dates","normalize","compareAsc","dateLeft","dateRight","diff","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","_date","utcDate"],"mappings":"AA4EY,MAACA,IAAqB,QAOrBC,IAAoB,OAOpBC,IAAuB,KAqBvBC,IAAgB,QAOhBC,IAAiB,OAOjBC,IAAe,MA0FfC,IAAsB,uBAAO,IAAI,mBAAmB;AClL1D,SAASC,EAAcC,GAAMC,GAAO;AACzC,SAAI,OAAOD,KAAS,aAAmBA,EAAKC,CAAK,IAE7CD,KAAQ,OAAOA,KAAS,YAAYF,KAAuBE,IACtDA,EAAKF,CAAmB,EAAEG,CAAK,IAEpCD,aAAgB,OAAa,IAAIA,EAAK,YAAYC,CAAK,IAEpD,IAAI,KAAKA,CAAK;AACvB;ACNO,SAASC,EAAOC,GAAUC,GAAS;AAExC,SAAOL,EAAcK,KAAWD,GAAUA,CAAQ;AACpD;ACzCO,SAASE,EAAeD,MAAYE,GAAO;AAChD,QAAMC,IAAYR,EAAc;AAAA,IAC9B;AAAA,IACAK,KAAWE,EAAM,KAAK,CAACN,MAAS,OAAOA,KAAS,QAAQ;AAAA,EACzD;AACD,SAAOM,EAAM,IAAIC,CAAS;AAC5B;AC0BO,SAASC,EAAWC,GAAUC,GAAW;AAC9C,QAAMC,IAAO,CAACT,EAAOO,CAAQ,IAAI,CAACP,EAAOQ,CAAS;AAElD,SAAIC,IAAO,IAAU,KACZA,IAAO,IAAU,IAGnBA;AACT;AC1CA,IAAIC,IAAiB,CAAE;AAEhB,SAASC,IAAoB;AAClC,SAAOD;AACT;ACSO,SAASE,EAAgCd,GAAM;AACpD,QAAMe,IAAQb,EAAOF,CAAI,GACnBgB,IAAU,IAAI;AAAA,IAClB,KAAK;AAAA,MACHD,EAAM,YAAa;AAAA,MACnBA,EAAM,SAAU;AAAA,MAChBA,EAAM,QAAS;AAAA,MACfA,EAAM,SAAU;AAAA,MAChBA,EAAM,WAAY;AAAA,MAClBA,EAAM,WAAY;AAAA,MAClBA,EAAM,gBAAiB;AAAA,IACxB;AAAA,EACF;AACD,SAAAC,EAAQ,eAAeD,EAAM,aAAa,GACnC,CAACf,IAAO,CAACgB;AAClB;","x_google_ignoreList":[0,1,2,3,4,5,6]}