@adyen/bento-vue2 1.34.0 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/@types/index.d.ts +2 -2
  2. package/dist/accordion.js +1 -1
  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/alert.css +1 -1
  8. package/dist/assets/avatar.css +1 -1
  9. package/dist/assets/base-modal.css +1 -1
  10. package/dist/assets/calendar.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/checkbox-input.css +1 -1
  13. package/dist/assets/checkbox.css +1 -1
  14. package/dist/assets/code-snippet.css +1 -1
  15. package/dist/assets/copy.css +1 -1
  16. package/dist/assets/currency.css +1 -0
  17. package/dist/assets/data-grid.css +1 -1
  18. package/dist/assets/date-range-picker.css +1 -1
  19. package/dist/assets/dialog-page.css +1 -1
  20. package/dist/assets/dropdown.css +1 -1
  21. package/dist/assets/error-message.css +1 -1
  22. package/dist/assets/filter-bar.css +1 -1
  23. package/dist/assets/header.css +1 -1
  24. package/dist/assets/inspector.css +1 -1
  25. package/dist/assets/link.css +1 -1
  26. package/dist/assets/loading-button.css +1 -1
  27. package/dist/assets/menu.css +1 -1
  28. package/dist/assets/modal-fullscreen.css +1 -1
  29. package/dist/assets/pagination.css +1 -1
  30. package/dist/assets/popover.css +1 -1
  31. package/dist/assets/sidepanel.css +1 -1
  32. package/dist/assets/step.css +1 -1
  33. package/dist/assets/structured-list-item.css +1 -1
  34. package/dist/assets/timeline-item.css +1 -1
  35. package/dist/assets/tutorial.css +1 -1
  36. package/dist/assets/use-cached-selected-values.css +1 -1
  37. package/dist/avatar.js +1 -1
  38. package/dist/button.js +4 -4
  39. package/dist/card.js +1 -1
  40. package/dist/checkbox.js +3 -3
  41. package/dist/chunks/accordion-item.C0EeQmpM.js +116 -0
  42. package/dist/chunks/accordion-item.C0EeQmpM.js.map +1 -0
  43. package/dist/chunks/{action-bar.CsRmYQ-k.js → action-bar.CTS-sRPZ.js} +52 -38
  44. package/dist/chunks/{action-bar.CsRmYQ-k.js.map → action-bar.CTS-sRPZ.js.map} +1 -1
  45. package/dist/chunks/{alert.DtT7BRdr.js → alert.BOAVcKqt.js} +30 -23
  46. package/dist/chunks/alert.BOAVcKqt.js.map +1 -0
  47. package/dist/chunks/{avatar.0ffdL8i0.js → avatar.qcWk9clF.js} +9 -9
  48. package/dist/chunks/avatar.qcWk9clF.js.map +1 -0
  49. package/dist/chunks/{base-modal.zHjXVjwU.js → base-modal.HSuNJt-7.js} +18 -12
  50. package/dist/chunks/{base-modal.zHjXVjwU.js.map → base-modal.HSuNJt-7.js.map} +1 -1
  51. package/dist/chunks/{button-actions-with-menu.B6Nb6Ohu.js → button-actions-with-menu.GyJNwaZ5.js} +4 -4
  52. package/dist/chunks/{button-actions-with-menu.B6Nb6Ohu.js.map → button-actions-with-menu.GyJNwaZ5.js.map} +1 -1
  53. package/dist/chunks/{button-actions.BQHr68sA.js → button-actions.fnn5w4Jz.js} +3 -3
  54. package/dist/chunks/{button-actions.BQHr68sA.js.map → button-actions.fnn5w4Jz.js.map} +1 -1
  55. package/dist/chunks/{button.79klAcOK.js → button.B1JELmx-.js} +2 -2
  56. package/dist/chunks/{button.79klAcOK.js.map → button.B1JELmx-.js.map} +1 -1
  57. package/dist/chunks/{calendar.CaTMWZUM.js → calendar.BBQUZ8xu.js} +230 -230
  58. package/dist/chunks/calendar.BBQUZ8xu.js.map +1 -0
  59. package/dist/chunks/card.DqxilNhb.js +123 -0
  60. package/dist/chunks/card.DqxilNhb.js.map +1 -0
  61. package/dist/chunks/{checkbox-group.D_mCZMPr.js → checkbox-group.CdMkjLu1.js} +4 -4
  62. package/dist/chunks/{checkbox-group.D_mCZMPr.js.map → checkbox-group.CdMkjLu1.js.map} +1 -1
  63. package/dist/chunks/{checkbox-input.BH7MGdMj.js → checkbox-input.Ce0AY_e_.js} +14 -13
  64. package/dist/chunks/checkbox-input.Ce0AY_e_.js.map +1 -0
  65. package/dist/chunks/{checkbox.CaX67eM_.js → checkbox.CVSzcaHk.js} +38 -28
  66. package/dist/chunks/{checkbox.CaX67eM_.js.map → checkbox.CVSzcaHk.js.map} +1 -1
  67. package/dist/chunks/{checkmark-circle-fill.DVl6QSwm.js → checkmark-circle-fill.By9RNf5T.js} +4 -4
  68. package/dist/chunks/{checkmark-circle-fill.DVl6QSwm.js.map → checkmark-circle-fill.By9RNf5T.js.map} +1 -1
  69. package/dist/chunks/{checkmark-small.BtF8b2gE.js → checkmark-small.C8T8ISN6.js} +4 -4
  70. package/dist/chunks/checkmark-small.C8T8ISN6.js.map +1 -0
  71. package/dist/chunks/{chevron-left.CtnrsqUy.js → chevron-left.CvIsaXjZ.js} +6 -6
  72. package/dist/chunks/chevron-left.CvIsaXjZ.js.map +1 -0
  73. package/dist/chunks/{chevron-up.B2uWhZf7.js → chevron-up.DqJmLciO.js} +6 -6
  74. package/dist/chunks/chevron-up.DqJmLciO.js.map +1 -0
  75. package/dist/chunks/{code-snippet.DgKK7fE8.js → code-snippet.BcZJFqdH.js} +45 -36
  76. package/dist/chunks/code-snippet.BcZJFqdH.js.map +1 -0
  77. package/dist/chunks/{controls-group.6aTaRWFI.js → controls-group.BES2y5Y7.js} +2 -2
  78. package/dist/chunks/{controls-group.6aTaRWFI.js.map → controls-group.BES2y5Y7.js.map} +1 -1
  79. package/dist/chunks/{copy.B1DYKX_q.js → copy.qAUSogPB.js} +35 -26
  80. package/dist/chunks/copy.qAUSogPB.js.map +1 -0
  81. package/dist/chunks/{cross-circle-fill-small.Oj6lPaDy.js → cross-circle-fill-small.YhLgeipP.js} +4 -4
  82. package/dist/chunks/cross-circle-fill-small.YhLgeipP.js.map +1 -0
  83. package/dist/chunks/{cross-circle-fill.CnYH4R_h.js → cross-circle-fill.BawVYNw7.js} +4 -4
  84. package/dist/chunks/{cross-circle-fill.CnYH4R_h.js.map → cross-circle-fill.BawVYNw7.js.map} +1 -1
  85. package/dist/chunks/{cross-small.BLUwtRB-.js → cross-small.CZqsjZDz.js} +4 -4
  86. package/dist/chunks/cross-small.CZqsjZDz.js.map +1 -0
  87. package/dist/chunks/{cross.CsUPDmaA.js → cross.CJ5EEL2c.js} +4 -4
  88. package/dist/chunks/{cross.CsUPDmaA.js.map → cross.CJ5EEL2c.js.map} +1 -1
  89. package/dist/chunks/{currency.D_2CN1OJ.js → currency.CbZqZrBz.js} +9 -8
  90. package/dist/chunks/{currency.D_2CN1OJ.js.map → currency.CbZqZrBz.js.map} +1 -1
  91. package/dist/chunks/{dashboard-section.DWfQGGwS.js → dashboard-section.QTsJqS-s.js} +3 -3
  92. package/dist/chunks/{dashboard-section.DWfQGGwS.js.map → dashboard-section.QTsJqS-s.js.map} +1 -1
  93. package/dist/chunks/{dashed-underline.C7gLtEqx.js → dashed-underline.BnBP41jp.js} +2 -2
  94. package/dist/chunks/{dashed-underline.C7gLtEqx.js.map → dashed-underline.BnBP41jp.js.map} +1 -1
  95. package/dist/chunks/{data-grid-template.2xocKVqX.js → data-grid-template.CY3uHWRY.js} +3 -3
  96. package/dist/chunks/{data-grid-template.2xocKVqX.js.map → data-grid-template.CY3uHWRY.js.map} +1 -1
  97. package/dist/chunks/{data-grid.CUn6MrZz.js → data-grid.CZjS7HUz.js} +483 -436
  98. package/dist/chunks/data-grid.CZjS7HUz.js.map +1 -0
  99. package/dist/chunks/{date-picker.C6_KbCYT.js → date-picker.C5uid7SP.js} +91 -83
  100. package/dist/chunks/date-picker.C5uid7SP.js.map +1 -0
  101. package/dist/chunks/{date-range-picker.DaTgBXP1.js → date-range-picker.R5v1ZX-X.js} +265 -243
  102. package/dist/chunks/date-range-picker.R5v1ZX-X.js.map +1 -0
  103. package/dist/chunks/{date.DaiTzNEZ.js → date.C0uwNQjg.js} +80 -80
  104. package/dist/chunks/{date.DaiTzNEZ.js.map → date.C0uwNQjg.js.map} +1 -1
  105. package/dist/chunks/{dialog-page.bmDDYmn9.js → dialog-page.j_L6c9ZP.js} +5 -4
  106. package/dist/chunks/dialog-page.j_L6c9ZP.js.map +1 -0
  107. package/dist/chunks/{dropdown-default-textbox.kQ3pHsZe.js → dropdown-default-textbox.BFx4TF5u.js} +4 -4
  108. package/dist/chunks/{dropdown-default-textbox.kQ3pHsZe.js.map → dropdown-default-textbox.BFx4TF5u.js.map} +1 -1
  109. package/dist/chunks/{dropdown-tag.pJ_sQbJN.js → dropdown-tag.B8A03Cck.js} +3 -3
  110. package/dist/chunks/{dropdown-tag.pJ_sQbJN.js.map → dropdown-tag.B8A03Cck.js.map} +1 -1
  111. package/dist/chunks/{dropdown.DpsQPLy-.js → dropdown.h_j0DsN2.js} +159 -139
  112. package/dist/chunks/dropdown.h_j0DsN2.js.map +1 -0
  113. package/dist/chunks/{empty-state.C2ba_wDp.js → empty-state.CaQuZx7L.js} +2 -2
  114. package/dist/chunks/{empty-state.C2ba_wDp.js.map → empty-state.CaQuZx7L.js.map} +1 -1
  115. package/dist/chunks/{error-message.BnFyGbR7.js → error-message.3tVTq0sW.js} +28 -14
  116. package/dist/chunks/{error-message.BnFyGbR7.js.map → error-message.3tVTq0sW.js.map} +1 -1
  117. package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
  118. package/dist/chunks/{expand.CwwKq7Uc.js → expand.C263WARj.js} +4 -4
  119. package/dist/chunks/{expand.CwwKq7Uc.js.map → expand.C263WARj.js.map} +1 -1
  120. package/dist/chunks/{filter-bar.DGBvcKsz.js → filter-bar.DgiUmFql.js} +605 -589
  121. package/dist/chunks/filter-bar.DgiUmFql.js.map +1 -0
  122. package/dist/chunks/{fixed-scroller.CQWDnydO.js → fixed-scroller.DcdAycgk.js} +3 -3
  123. package/dist/chunks/{fixed-scroller.CQWDnydO.js.map → fixed-scroller.DcdAycgk.js.map} +1 -1
  124. package/dist/chunks/{footer-actions.CwHY2-Ap.js → footer-actions.C1TgWA9J.js} +3 -3
  125. package/dist/chunks/{footer-actions.CwHY2-Ap.js.map → footer-actions.C1TgWA9J.js.map} +1 -1
  126. package/dist/chunks/{form-layout-title.CRsR3o2x.js → form-layout-title.DW8y285m.js} +2 -2
  127. package/dist/chunks/{form-layout-title.CRsR3o2x.js.map → form-layout-title.DW8y285m.js.map} +1 -1
  128. package/dist/chunks/{index.B_UZQ6qF.js → get-date-locale.BN8xEjY0.js} +855 -204
  129. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +1 -0
  130. package/dist/chunks/{header.BmNDoXio.js → header.Nh_SoSJP.js} +80 -74
  131. package/dist/chunks/{header.BmNDoXio.js.map → header.Nh_SoSJP.js.map} +1 -1
  132. package/dist/chunks/{index.Z84QE0E2.js → index.CrhTVr5J.js} +2 -2
  133. package/dist/chunks/{index.Z84QE0E2.js.map → index.CrhTVr5J.js.map} +1 -1
  134. package/dist/chunks/{index.xqFSZOAb.js → index.DDnf1O9p.js} +2 -2
  135. package/dist/chunks/{index.xqFSZOAb.js.map → index.DDnf1O9p.js.map} +1 -1
  136. package/dist/chunks/{index.B_EJflcs.js → index.DPafeRJa.js} +2 -2
  137. package/dist/chunks/{index.B_EJflcs.js.map → index.DPafeRJa.js.map} +1 -1
  138. package/dist/chunks/{info-icon.DNn4oZsB.js → info-icon.bQl_RleE.js} +2 -2
  139. package/dist/chunks/{info-icon.DNn4oZsB.js.map → info-icon.bQl_RleE.js.map} +1 -1
  140. package/dist/chunks/{info.CyeBsLgt.js → info.D4SG-AIm.js} +4 -4
  141. package/dist/chunks/{info.CyeBsLgt.js.map → info.D4SG-AIm.js.map} +1 -1
  142. package/dist/chunks/{input-field.S5HIZtYA.js → input-field.nBUtoYwF.js} +3 -3
  143. package/dist/chunks/{input-field.S5HIZtYA.js.map → input-field.nBUtoYwF.js.map} +1 -1
  144. package/dist/chunks/{inspector.types.D6kCCKNk.js → inspector.types.DJTWyZ9x.js} +19 -11
  145. package/dist/chunks/{inspector.types.D6kCCKNk.js.map → inspector.types.DJTWyZ9x.js.map} +1 -1
  146. package/dist/chunks/{link.Xce4kDGy.js → link.BKxmPIV5.js} +4 -3
  147. package/dist/chunks/link.BKxmPIV5.js.map +1 -0
  148. package/dist/chunks/{loading-button.DDPZYO6r.js → loading-button.CsaWlmzb.js} +40 -26
  149. package/dist/chunks/loading-button.CsaWlmzb.js.map +1 -0
  150. package/dist/chunks/{menu.DSOJEn4v.js → menu.BhT5t7Ev.js} +7 -6
  151. package/dist/chunks/{menu.DSOJEn4v.js.map → menu.BhT5t7Ev.js.map} +1 -1
  152. package/dist/chunks/{modal-fullscreen.BQKE0bm0.js → modal-fullscreen.BlqMgvmn.js} +27 -21
  153. package/dist/chunks/{modal-fullscreen.BQKE0bm0.js.map → modal-fullscreen.BlqMgvmn.js.map} +1 -1
  154. package/dist/chunks/{modal.ClqkmzVZ.js → modal.DCtgRb44.js} +26 -20
  155. package/dist/chunks/modal.DCtgRb44.js.map +1 -0
  156. package/dist/chunks/{pagination.he0lQGAV.js → pagination.CM_9J0dZ.js} +6 -5
  157. package/dist/chunks/pagination.CM_9J0dZ.js.map +1 -0
  158. package/dist/chunks/{popover.UmNw_M-C.js → popover.DFWeWyxd.js} +4 -4
  159. package/dist/chunks/{popover.UmNw_M-C.js.map → popover.DFWeWyxd.js.map} +1 -1
  160. package/dist/chunks/{radio-group.D7cuMKzV.js → radio-group.o2Kroy4O.js} +3 -3
  161. package/dist/chunks/{radio-group.D7cuMKzV.js.map → radio-group.o2Kroy4O.js.map} +1 -1
  162. package/dist/chunks/{refresh.BKI9WwKh.js → refresh.Bc9FzGjJ.js} +4 -4
  163. package/dist/chunks/{refresh.BKI9WwKh.js.map → refresh.Bc9FzGjJ.js.map} +1 -1
  164. package/dist/chunks/{search-bar.BPyYb0WB.js → search-bar.BRlauT9L.js} +16 -8
  165. package/dist/chunks/{search-bar.BPyYb0WB.js.map → search-bar.BRlauT9L.js.map} +1 -1
  166. package/dist/chunks/{search.CBKhp7zB.js → search.pVu-JVAN.js} +4 -4
  167. package/dist/chunks/{search.CBKhp7zB.js.map → search.pVu-JVAN.js.map} +1 -1
  168. package/dist/chunks/{secondary-nav.CMUfpgQf.js → secondary-nav.lWetIbb8.js} +2 -2
  169. package/dist/chunks/{secondary-nav.CMUfpgQf.js.map → secondary-nav.lWetIbb8.js.map} +1 -1
  170. package/dist/chunks/{selection-card-group.DbMfzyTG.js → selection-card-group.BWZOX7l7.js} +4 -4
  171. package/dist/chunks/{selection-card-group.DbMfzyTG.js.map → selection-card-group.BWZOX7l7.js.map} +1 -1
  172. package/dist/chunks/{sidepanel.Ck6Ts9RR.js → sidepanel.B5CKqH1u.js} +25 -19
  173. package/dist/chunks/{sidepanel.Ck6Ts9RR.js.map → sidepanel.B5CKqH1u.js.map} +1 -1
  174. package/dist/chunks/{step.CjJtlBk6.js → step.vF0pNW-K.js} +7 -6
  175. package/dist/chunks/step.vF0pNW-K.js.map +1 -0
  176. package/dist/chunks/{structured-list-item.DpLscUX4.js → structured-list-item.IElHaBHs.js} +24 -18
  177. package/dist/chunks/{structured-list-item.DpLscUX4.js.map → structured-list-item.IElHaBHs.js.map} +1 -1
  178. package/dist/chunks/{summary-grid-item-custom.B7Re6OCf.js → summary-grid-item-custom.CMsS1kro.js} +3 -3
  179. package/dist/chunks/{summary-grid-item-custom.B7Re6OCf.js.map → summary-grid-item-custom.CMsS1kro.js.map} +1 -1
  180. package/dist/chunks/{tabs.D4ORafqH.js → tabs.D8Ni3Zfb.js} +2 -2
  181. package/dist/chunks/{tabs.D4ORafqH.js.map → tabs.D8Ni3Zfb.js.map} +1 -1
  182. package/dist/chunks/{textarea.BRMpTWKS.js → textarea.2RrKj5Mr.js} +4 -4
  183. package/dist/chunks/{textarea.BRMpTWKS.js.map → textarea.2RrKj5Mr.js.map} +1 -1
  184. package/dist/chunks/{timeline-item.jh7UnviR.js → timeline-item.fF0fFDb9.js} +58 -51
  185. package/dist/chunks/timeline-item.fF0fFDb9.js.map +1 -0
  186. package/dist/chunks/{toast.3LxCDPiT.js → toast.CMdDpqMg.js} +3 -3
  187. package/dist/chunks/{toast.3LxCDPiT.js.map → toast.CMdDpqMg.js.map} +1 -1
  188. package/dist/chunks/{toggle-button.bt3zBzdC.js → toggle-button.CGvkVs_H.js} +2 -2
  189. package/dist/chunks/{toggle-button.bt3zBzdC.js.map → toggle-button.CGvkVs_H.js.map} +1 -1
  190. package/dist/chunks/{toggle.CLgGH4Jr.js → toggle.yiNF7ndg.js} +2 -2
  191. package/dist/chunks/{toggle.CLgGH4Jr.js.map → toggle.yiNF7ndg.js.map} +1 -1
  192. package/dist/chunks/{tutorial.DERGsCkg.js → tutorial.D2msGkwn.js} +86 -73
  193. package/dist/chunks/tutorial.D2msGkwn.js.map +1 -0
  194. package/dist/chunks/{use-cached-selected-values.B39-iEp4.js → use-cached-selected-values.it4ENg3q.js} +62 -47
  195. package/dist/chunks/use-cached-selected-values.it4ENg3q.js.map +1 -0
  196. package/dist/chunks/{warning-filled.CLKRzGMT.js → warning-filled.Cd0kVWwa.js} +4 -4
  197. package/dist/chunks/{warning-filled.CLKRzGMT.js.map → warning-filled.Cd0kVWwa.js.map} +1 -1
  198. package/dist/code-snippet.js +1 -1
  199. package/dist/currency.js +1 -1
  200. package/dist/dashboard-template.js +1 -1
  201. package/dist/dashed-underline.js +1 -1
  202. package/dist/data-grid-template.js +1 -1
  203. package/dist/data-grid.js +1 -1
  204. package/dist/date-picker.js +2 -2
  205. package/dist/date-range-picker.js +2 -2
  206. package/dist/date.js +1 -1
  207. package/dist/dropdown.js +4 -4
  208. package/dist/empty-state.js +1 -1
  209. package/dist/filter-bar.js +1 -1
  210. package/dist/form-layout.js +1 -1
  211. package/dist/header.js +1 -1
  212. package/dist/index.js +54 -54
  213. package/dist/info-icon.js +1 -1
  214. package/dist/input-field.js +1 -1
  215. package/dist/inspector.js +1 -1
  216. package/dist/internal.js +7 -7
  217. package/dist/link.js +1 -1
  218. package/dist/menu.js +1 -1
  219. package/dist/modal-fullscreen.js +1 -1
  220. package/dist/modal.js +2 -2
  221. package/dist/pagination.js +1 -1
  222. package/dist/popover.js +1 -1
  223. package/dist/radio-group.js +1 -1
  224. package/dist/search-bar.js +2 -2
  225. package/dist/secondary-nav.js +1 -1
  226. package/dist/selection-card.js +1 -1
  227. package/dist/sidepanel.js +1 -1
  228. package/dist/stepper.js +1 -1
  229. package/dist/structured-list.js +1 -1
  230. package/dist/styles/bento.css +3 -0
  231. package/dist/styles/legacy.css +3 -0
  232. package/dist/styles/styleguide.css +3 -0
  233. package/dist/summary-grid.js +1 -1
  234. package/dist/tabs.js +1 -1
  235. package/dist/textarea.js +1 -1
  236. package/dist/timeline.js +1 -1
  237. package/dist/toast.js +1 -1
  238. package/dist/toggle.js +1 -1
  239. package/dist/tutorial.js +1 -1
  240. package/dist/web-types.json +1 -1
  241. package/package.json +4 -4
  242. package/dist/chunks/accordion-item.IMlV_Vik.js +0 -100
  243. package/dist/chunks/accordion-item.IMlV_Vik.js.map +0 -1
  244. package/dist/chunks/alert.DtT7BRdr.js.map +0 -1
  245. package/dist/chunks/avatar.0ffdL8i0.js.map +0 -1
  246. package/dist/chunks/calendar.CaTMWZUM.js.map +0 -1
  247. package/dist/chunks/card.ignL7-CH.js +0 -115
  248. package/dist/chunks/card.ignL7-CH.js.map +0 -1
  249. package/dist/chunks/checkbox-input.BH7MGdMj.js.map +0 -1
  250. package/dist/chunks/checkmark-small.BtF8b2gE.js.map +0 -1
  251. package/dist/chunks/chevron-left.CtnrsqUy.js.map +0 -1
  252. package/dist/chunks/chevron-up.B2uWhZf7.js.map +0 -1
  253. package/dist/chunks/code-snippet.DgKK7fE8.js.map +0 -1
  254. package/dist/chunks/copy.B1DYKX_q.js.map +0 -1
  255. package/dist/chunks/cross-circle-fill-small.Oj6lPaDy.js.map +0 -1
  256. package/dist/chunks/cross-small.BLUwtRB-.js.map +0 -1
  257. package/dist/chunks/data-grid.CUn6MrZz.js.map +0 -1
  258. package/dist/chunks/date-picker.C6_KbCYT.js.map +0 -1
  259. package/dist/chunks/date-range-picker.DaTgBXP1.js.map +0 -1
  260. package/dist/chunks/dialog-page.bmDDYmn9.js.map +0 -1
  261. package/dist/chunks/dropdown.DpsQPLy-.js.map +0 -1
  262. package/dist/chunks/filter-bar.DGBvcKsz.js.map +0 -1
  263. package/dist/chunks/index.B_UZQ6qF.js.map +0 -1
  264. package/dist/chunks/link.Xce4kDGy.js.map +0 -1
  265. package/dist/chunks/loading-button.DDPZYO6r.js.map +0 -1
  266. package/dist/chunks/modal.ClqkmzVZ.js.map +0 -1
  267. package/dist/chunks/pagination.he0lQGAV.js.map +0 -1
  268. package/dist/chunks/step.CjJtlBk6.js.map +0 -1
  269. package/dist/chunks/timeline-item.jh7UnviR.js.map +0 -1
  270. package/dist/chunks/tutorial.DERGsCkg.js.map +0 -1
  271. package/dist/chunks/use-cached-selected-values.B39-iEp4.js.map +0 -1
  272. /package/dist/assets/{cross.css → main.css} +0 -0
@@ -1,100 +0,0 @@
1
- import { defineComponent as p, provide as C, toRef as h, ref as d, inject as g, computed as x, watch as _ } from "vue";
2
- import { n as u } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
3
- import { B as y } from "./typography.CqQaHXhq.js";
4
- import { C as O, a as T } from "./chevron-up.B2uWhZf7.js";
5
- import { g as l } from "./unique-id.XFfoKuc2.js";
6
- import { o as E } from "./resize.Bqks3WUm.js";
7
- import { u as N } from "./use-expandable-content-height.GkjjbmPy.js";
8
- import "../assets/accordion-item.css";
9
- const m = Symbol("accordion title size injection key"), S = {}, z = /* @__PURE__ */ p({
10
- ...S,
11
- __name: "accordion",
12
- props: {
13
- /**
14
- * Controls accordion title size.
15
- * @values default, small
16
- */
17
- titleSize: {
18
- type: String,
19
- default: "default"
20
- }
21
- },
22
- setup(i) {
23
- const e = i;
24
- return C(m, h(e, "titleSize")), { __sfc: !0, props: e };
25
- }
26
- });
27
- var $ = function() {
28
- var e = this, n = e._self._c;
29
- return e._self._setupProxy, n("div", { staticClass: "b-accordion" }, [e._t("default")], 2);
30
- }, R = [], A = /* @__PURE__ */ u(
31
- z,
32
- $,
33
- R,
34
- !1,
35
- null,
36
- "fb182a1c"
37
- );
38
- const K = A.exports, B = {}, D = /* @__PURE__ */ p({
39
- ...B,
40
- __name: "accordion-item",
41
- props: {
42
- /**
43
- * Sets the title of the accordion item.
44
- */
45
- title: {
46
- type: String,
47
- required: !0
48
- },
49
- /**
50
- * Controls if the content is visible or hidden.
51
- */
52
- isExpanded: {
53
- type: Boolean,
54
- default: !1
55
- }
56
- },
57
- emits: ["update:is-expanded"],
58
- setup(i, { emit: e }) {
59
- const n = i, t = "b-accordion-item__animation--content", o = d(null), s = d(n.isExpanded), f = l("accordionItemButton"), v = l("accordionItemContent"), b = g(m, "default"), { updateContentHeight: r, contentHeight: c } = N(o, s), I = x(() => c.value ? { "max-height": c.value } : {});
60
- return _(
61
- () => n.isExpanded,
62
- (a) => {
63
- s.value = a;
64
- }
65
- ), _(
66
- () => o.value,
67
- () => {
68
- let a = null;
69
- !a && o.value && (a = E(o.value, () => {
70
- o.value && r();
71
- }));
72
- }
73
- ), _(
74
- s,
75
- (a) => {
76
- e("update:is-expanded", a), r();
77
- },
78
- { immediate: !0 }
79
- ), { __sfc: !0, CONTENT_TRANSITION_NAME: t, props: n, emit: e, contentDiv: o, isOpen: s, buttonId: f, contentId: v, titleSize: b, updateContentHeight: r, contentHeight: c, contentMaxHeight: I, BentoTypography: y, ChevronDownIcon: O, ChevronUpIcon: T };
80
- }
81
- });
82
- var H = function() {
83
- var e = this, n = e._self._c, t = e._self._setupProxy;
84
- return n("div", { staticClass: "b-accordion-item" }, [n(t.BentoTypography, { attrs: { el: "h3", variant: t.titleSize === "small" ? "body" : "title", strongest: t.titleSize === "small" } }, [n("button", { staticClass: "b-accordion-item__button", attrs: { id: t.buttonId, "aria-controls": t.contentId, "aria-expanded": `${t.isOpen}`, type: "button" }, on: { click: function(o) {
85
- t.isOpen = !t.isOpen;
86
- } } }, [t.isOpen ? n(t.ChevronUpIcon, { staticClass: "b-accordion-item__icon", attrs: { "svg-title": "collapse", "aria-hidden": "true" } }) : n(t.ChevronDownIcon, { staticClass: "b-accordion-item__icon", attrs: { "svg-title": "expand", "aria-hidden": "true" } }), e._v(" " + e._s(e.title) + " ")], 1)]), n("Transition", { attrs: { name: t.CONTENT_TRANSITION_NAME } }, [t.isOpen ? n("div", { style: t.contentMaxHeight, attrs: { id: t.contentId, "aria-labelledby": t.buttonId, role: "region" } }, [n("div", { ref: "contentDiv", staticClass: "b-accordion-item__content" }, [e._t("default")], 2)]) : e._e()])], 1);
87
- }, M = [], w = /* @__PURE__ */ u(
88
- D,
89
- H,
90
- M,
91
- !1,
92
- null,
93
- "5bdadca2"
94
- );
95
- const L = w.exports;
96
- export {
97
- K as a,
98
- L as b
99
- };
100
- //# sourceMappingURL=accordion-item.IMlV_Vik.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accordion-item.IMlV_Vik.js","sources":["../../src/components/accordion/accordion.keys.ts","../../src/components/accordion/accordion.vue","../../src/components/accordion/components/accordion-item.vue"],"sourcesContent":["export const ACCORDION_TITLE_SIZE_INJECTION_KEY = Symbol('accordion title size injection key');\n","<template>\n <div class=\"b-accordion\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType, provide, toRef } from 'vue';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from './accordion.keys';\n\n import type { BentoAccordionTitleSize } from './accordion.types';\n\n const props = defineProps({\n /**\n * Controls accordion title size.\n * @values default, small\n */\n titleSize: {\n type: String as PropType<BentoAccordionTitleSize>,\n default: 'default',\n },\n });\n\n provide(ACCORDION_TITLE_SIZE_INJECTION_KEY, toRef(props, 'titleSize'));\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion is a vertical stack of interactive headers used to reveal or hide\n * sections of content associated with these headers.\n *\n * This component must only have `BentoAccordionItem` components in its default slot.\n *\n * Accordion items should be collapsed by default.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion.scss\" />\n","<template>\n <div class=\"b-accordion-item\">\n <bento-typography\n el=\"h3\"\n :variant=\"titleSize === 'small' ? 'body' : 'title'\"\n :strongest=\"titleSize === 'small'\"\n >\n <button\n :id=\"buttonId\"\n :aria-controls=\"contentId\"\n :aria-expanded=\"`${isOpen}`\"\n type=\"button\"\n class=\"b-accordion-item__button\"\n @click=\"isOpen = !isOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" class=\"b-accordion-item__icon\" svg-title=\"collapse\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-accordion-item__icon\" svg-title=\"expand\" aria-hidden=\"true\" />\n {{ title }}\n </button>\n </bento-typography>\n\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"isOpen\" :id=\"contentId\" :aria-labelledby=\"buttonId\" role=\"region\" :style=\"contentMaxHeight\">\n <div ref=\"contentDiv\" class=\"b-accordion-item__content\">\n <slot />\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, watch } from 'vue';\n\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n import { generateUid } from '@/utils/ts/unique-id';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from '../accordion.keys';\n\n import type { BentoAccordionTitleSize } from '../accordion.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n const CONTENT_TRANSITION_NAME = 'b-accordion-item__animation--content';\n\n const props = defineProps({\n /**\n * Sets the title of the accordion item.\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Controls if the content is visible or hidden.\n */\n isExpanded: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits([\"update:is-expanded\"]);\n\n // Refs\n const contentDiv = ref<HTMLDivElement>(null);\n const isOpen = ref(props.isExpanded);\n\n // Generating IDs\n const buttonId = generateUid('accordionItemButton');\n const contentId = generateUid('accordionItemContent');\n\n // Injecting prop from parent\n const titleSize = inject<`${BentoAccordionTitleSize}`>(ACCORDION_TITLE_SIZE_INJECTION_KEY, 'default');\n\n // Getting and setting the item height to be able to handle height animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n watch(\n () => props.isExpanded,\n value => {\n isOpen.value = value;\n }\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n watch(\n isOpen,\n value => {\n // Enable two-way data binding for `isExpanded`\n emit('update:is-expanded', value);\n\n updateContentHeight();\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion item is an interactive header used to reveal or hide a\n * section of content associated with this header.\n *\n * This component must always be wrapped by a `BentoAccordion` component.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion-item.scss\" />\n"],"names":["ACCORDION_TITLE_SIZE_INJECTION_KEY","__default__$1","provide","toRef","props","__default__","CONTENT_TRANSITION_NAME","contentDiv","ref","isOpen","buttonId","generateUid","contentId","titleSize","inject","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","computed","watch","value","observer","observeSizeOfElement","emit"],"mappings":";;;;;;;;AAAa,MAAAA,IAAA,OAAA,oCAAA,GCqDTC,IAAA,CAAA;;;;;;;;;;;;;;;AA7BA,WAAAC,EAAAF,GAAAG,EAAAC,GAAA,WAAA,CAAA;;;;;;;;;;;;;;qBCoHAC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;iBA9FAC,IAAA,wCAsBAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAAJ,EAAA,UAAA,GAGAM,IAAAC,EAAA,qBAAA,GACAC,IAAAD,EAAA,sBAAA,GAGAE,IAAAC,EAAAd,GAAA,SAAA,GAGA,EAAA,qBAAAe,GAAA,eAAAC,EAAA,IAAAC,EAAAV,GAAAE,CAAA,GAEAS,IAAAC,EAAA,MAAAH,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA,CAAA;AAEA,WAAAI;AAAA,MAAA,MAAAhB,EAAA;AAAA,MACgB,CAAAiB,MAAA;AAER,QAAAZ,EAAA,QAAAY;AAAA,MAAe;AAAA,IACnB,GAGJD;AAAA,MAAA,MAAAb,EAAA;AAAA,MACqB,MAAA;AAEb,YAAAe,IAAA;AACA,QAAA,CAAAA,KAAAf,EAAA,UACIe,IAAAC,EAAAhB,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIQ,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ,GAGJK;AAAA,MAAAX;AAAA,MACI,CAAAY,MAAA;AAGI,QAAAG,EAAA,sBAAAH,CAAA,GAEAN,EAAA;AAAA,MAAoB;AAAA,MACxB,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"alert.DtT7BRdr.js","sources":["../../src/components/alert/alert.types.ts","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/info-filled.vue","../../src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M5.0342 0.839937C6.45033 0.253358 8.00859 0.0998821 9.51195 0.398918C11.0153 0.697953 12.3962 1.43607 13.4801 2.51993C14.5639 3.60378 15.3021 4.9847 15.6011 6.48805C15.9001 7.99141 15.7466 9.54967 15.1601 10.9658C14.5735 12.3819 13.5801 13.5923 12.3057 14.4439C11.0312 15.2955 9.53281 15.75 8 15.75C5.94457 15.75 3.97333 14.9335 2.51992 13.4801C1.06652 12.0267 0.25 10.0554 0.25 8C0.25 6.4672 0.704529 4.96881 1.55611 3.69433C2.40769 2.41985 3.61808 1.42652 5.0342 0.839937ZM8.75 4.5C8.75 4.23478 8.64464 3.98043 8.45711 3.79289C8.26957 3.60536 8.01522 3.5 7.75 3.5C7.55222 3.5 7.35888 3.55865 7.19443 3.66853C7.02998 3.77841 6.90181 3.93459 6.82612 4.11732C6.75043 4.30004 6.73063 4.50111 6.76921 4.69509C6.8078 4.88907 6.90304 5.06725 7.04289 5.20711C7.18275 5.34696 7.36093 5.4422 7.55491 5.48079C7.74889 5.51937 7.94996 5.49957 8.13268 5.42388C8.31541 5.34819 8.47159 5.22002 8.58147 5.05557C8.69135 4.89112 8.75 4.69778 8.75 4.5ZM8.75 6.25H6.25V7.75H7.25V10.25H6.25V11.75H9.75V10.25H8.75V6.25Z\"/></g><defs><clipPath :id=\"'uia-icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"close-alert\"]);\n\n const props = defineProps({\n closeButton: { type: Boolean, default: false },\n type: { default: BentoAlertTypeOption.HIGHLIGHT },\n variant: { default: BentoAlertVariant.DEFAULT }\n});\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_sfc_main$1","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","isTipVariant","computed","props","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkIcon","WarningIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","emit","onMounted"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;AChBZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;GCgIIE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;iBA3EAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAUA,EAAA,GAAAI,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,MAAAC,EAAA,YAAAlB,EAAA,GAAA,GAEAmB,IAAAF,EAAA,OAAA;AAAA,MAAgD,CAAA,YAAAC,EAAA,IAAA,EAAA,GAAAA,EAAA;AAAA,MACV,CAAA,YAAAlB,EAAA,GAAA,EAAA,GAAAgB,EAAA;AAAA,IACkB,EAAA,GAGxDI,IAAAH,EAAA,MAAAH,EAAA,GAAAI,EAAA,IAAA,MAAA,CAAA,GAEAG,IAAAJ,EAAA,MAAA;AACI,cAAAC,EAAA,MAAA;AAAA,QAAoB,KAAAhB,EAAA;AAEZ,iBAAAoB;AAAA,QAAO,KAAApB,EAAA;AAEP,iBAAAqB;AAAA,QAAO,KAAArB,EAAA;AAEP,iBAAAsB;AAAA,QAAO,KAAAtB,EAAA;AAAA,QACe;AAEtB,iBAAAuB;AAAA,MAAO;AAAA,IACf,CAAA,GAGJC,IAAAT,EAAA,OAAA;AAAA,MAA8C,IAAAU,EAAA;AAAA,MACf,SAAAX,EAAA,QAAAY,EAAA,UAAAA,EAAA;AAAA,MAC2D,MAAA;AAAA,IAChF,EAAA,GAGVC,IAAAZ,EAAA,MAAAC,EAAA,SAAAhB,EAAA,YAAA,WAAA,OAAA,GAEA4B,IAAA,MAAA;AACI,MAAAC,EAAA3B,EAAA,WAAA;AAAA,IAAgC;AAGpC,WAAA4B,EAAA,MAAA;AACI,UAAA,CAAAtB,EAAA,WAAA,CAAAA,EAAA;AACI,cAAA,IAAA,MAAA,mDAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"avatar.0ffdL8i0.js","sources":["../../src/composables/initials.ts","../../src/components/avatar/components/avatar-image/avatar-image.types.ts","../../src/components/avatar/components/avatar-image/avatar-image.vue","../../src/components/avatar/avatar.vue"],"sourcesContent":["import { computed, ComputedRef, ref } from 'vue';\nimport { MaybeRef } from '@/types';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"Profile picture\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = defineProps({\n color: { default: BentoAvatarImageColor.YELLOW },\n src: { default: null },\n username: { default: null },\n variant: { default: BentoAvatarImageVariant.LARGE }\n});\n\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Image used as user profile inside bento-avatar.\n *\n * @example\n * import { AvatarImage } from './components/avatar-image';\n *\n * export default {\n * components: { AvatarImage },\n * template: `<avatar-image :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n","<template>\n <div class=\"b-avatar\" :aria-label=\"computedAriaLabel\">\n <avatar-image\n :src=\"src\"\n :username=\"computedUsername\"\n :variant=\"BentoAvatarImageVariant.SMALL\"\n :color=\"avatarColor\"\n />\n <bento-typography v-if=\"!iconOnly\" class=\"b-avatar__label\" el=\"span\" variant=\"body\">\n {{ username }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { AvatarImage, BentoAvatarImageColor, BentoAvatarImageVariant } from './components/avatar-image';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = defineProps({\n iconOnly: { type: Boolean, default: false },\n src: { default: null },\n username: null\n});\n\n const { username } = toRefs(props);\n\n const computedAriaLabel = computed(() => (props.iconOnly ? props.username : null));\n const computedUsername = computed(() => (!props.src ? props.username : null));\n const initials = useInitials(username);\n\n // Returns the UTF-16 char code\n const charCode = computed(() => (initials.value ? initials.value.charCodeAt(0) - 65 : null));\n\n // Returns a computed color based on the letter passed\n const avatarColor = computed(() => {\n const numberOfAlphabetLetters = 26;\n const numberOfColors = Object.keys(BentoAvatarImageColor).length;\n const rangeStep = numberOfAlphabetLetters / numberOfColors;\n\n if (charCode.value <= rangeStep) {\n return BentoAvatarImageColor.YELLOW;\n }\n if (charCode.value <= rangeStep * 2) {\n return BentoAvatarImageColor.BLUE;\n }\n if (charCode.value <= rangeStep * 3) {\n return BentoAvatarImageColor.GREEN;\n }\n return BentoAvatarImageColor.RED;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Displays an user profile including an avatar and optionally a label.\n *\n * @example\n * import { BentoAvatar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAvatar },\n * template: `<bento-avatar :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {\n name: 'bento-avatar',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","__default__$1","toRefs","props","initials","conditionalClasses","__default__","computedAriaLabel","charCode","avatarColor","rangeStep"],"mappings":";;;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAAC,IAAAC,EAAAF,CAAA;AACA,SAAAG,EAAA,MAAAF,EAAA,QAAAA,EAAA,MAAA,KAAA,EAAA,OAAA,CAAA,EAAA,YAAA,IAAA,IAAA;AACJ;ACbY,IAAAG,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,MAAA,OACAA,EAAA,SAAA,UAJQA,IAAAD,KAAA,CAAA,CAAA;ACwCR,MAAAE,IAAA,CAAA;;;;;;;;;;iBArBA,EAAA,UAAAR,EAAA,IAAAS,EAAAC,CAAA,GACAC,IAAAZ,EAAAC,CAAA,GAEAY,IAAAT,EAAA,OAAA;AAAA,MAA2C,CAAA,mBAAAC,EAAA,KAAA,EAAA,GAAAM,EAAA,YAAAN,EAAA;AAAA,MACyD,CAAA,mBAAAM,EAAA,KAAA,EAAA,GAAAA,EAAA;AAAA,IACtD,EAAA;;;;;;;;;;;;;;;qBCqC9CG,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;iBA1CA,EAAA,UAAAb,EAAA,IAAAS,EAAAC,CAAA,GAEAI,IAAAX,EAAA,MAAAO,EAAA,WAAAA,EAAA,WAAA,IAAA,GACAT,IAAAE,EAAA,MAAAO,EAAA,MAAA,OAAAA,EAAA,QAAA,GACAC,IAAAZ,EAAAC,CAAA,GAGAe,IAAAZ,EAAA,MAAAQ,EAAA,QAAAA,EAAA,MAAA,WAAA,CAAA,IAAA,KAAA,IAAA,GAGAK,IAAAb,EAAA,MAAA;AAGI,YAAAc,IAAA,KADA,OAAA,KAAAX,CAAA,EAAA;AAGA,aAAAS,EAAA,SAAAE,IACIX,EAAA,SAEJS,EAAA,SAAAE,IAAA,IACIX,EAAA,OAEJS,EAAA,SAAAE,IAAA,IACIX,EAAA,QAEJA,EAAA;AAAA,IAA6B,CAAA;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"calendar.CaTMWZUM.js","sources":["../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addDays/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMonths/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfWeek/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfDay/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInCalendarDays/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isSameDay/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInDays/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfMonth/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/endOfWeek/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subDays/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMonths/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isAfter/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isBefore/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isWithinInterval/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setDay/index.js","../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.types.ts","../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.props.ts","../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue","../../src/components/internal/calendar/components/calendar-month/calendar-month.types.ts","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/_lib/toInteger/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/_lib/requiredArgs/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/toDate/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/addDays/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/subDays/index.js","../../src/components/internal/calendar/components/calendar-month/composables/move-calendar-date.ts","../../src/components/internal/calendar/components/calendar-month/calendar-month.vue","../../src/components/internal/calendar/calendar.types.ts","../../src/components/internal/calendar/composables/use-single-pane.ts","../../src/components/internal/calendar/composables/use-granularity-adjustments.ts","../../src/components/internal/calendar/composables/use-range-pane.ts","../../src/components/internal/calendar/calendar.vue"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\n\nexport default function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var startOfDayLeft = startOfDay(dirtyDateLeft);\n var startOfDayRight = startOfDay(dirtyDateRight);\n var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight); // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day (and year and month)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n * \n * @example\n * // Are 4 September and 4 October in the same day?\n * var result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n * \n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\n\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarDays from \"../differenceInCalendarDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\n\nfunction compareLocalAsc(dateLeft, dateRight) {\n var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full days according to the local timezone\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n//=> 92\n */\n\n\nexport default function differenceInDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareLocalAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));\n dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);\n var result = sign * (difference - isLastDayNotFull); // Prevent negative zero\n\n return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport default function endOfWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n date.setDate(date.getDate() + diff);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\n\nexport default function subDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addDays(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name isWithinInterval\n * @category Interval Helpers\n * @summary Is the given date within the interval?\n *\n * @description\n * Is the given date within the interval? (Including start and end.)\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `isWithinRange` to `isWithinInterval`.\n * This change was made to mirror the use of the word \"interval\" in standard ISO 8601:2004 terminology:\n *\n * ```\n * 2.1.3\n * time interval\n * part of the time axis limited by two instants\n * ```\n *\n * Also, this function now accepts an object with `start` and `end` properties\n * instead of two arguments as an interval.\n * This function now throws `RangeError` if the start of the interval is after its end\n * or if any date in the interval is `Invalid Date`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * isWithinRange(\n * new Date(2014, 0, 3),\n * new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n *\n * // v2.0.0 onward\n *\n * isWithinInterval(\n * new Date(2014, 0, 3),\n * { start: new Date(2014, 0, 1), end: new Date(2014, 0, 7) }\n * )\n * ```\n *\n * @param {Date|Number} date - the date to check\n * @param {Interval} interval - the interval to check\n * @returns {Boolean} the date is within the interval\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // For the date within the interval:\n * isWithinInterval(new Date(2014, 0, 3), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> true\n *\n * @example\n * // For the date outside of the interval:\n * isWithinInterval(new Date(2014, 0, 10), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> false\n *\n * @example\n * // For date equal to interval start:\n * isWithinInterval(date, { start, end: date }) // => true\n *\n * @example\n * // For date equal to interval end:\n * isWithinInterval(date, { start: date, end }) // => true\n */\nexport default function isWithinInterval(dirtyDate, interval) {\n requiredArgs(2, arguments);\n var time = toDate(dirtyDate).getTime();\n var startTime = toDate(interval.start).getTime();\n var endTime = toDate(interval.end).getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n if (!(startTime <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n\n return time >= startTime && time <= endTime;\n}","import addDays from \"../addDays/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name setDay\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} day - the day of the week of the new date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the new date with the day of the week set\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // Set week day to Sunday, with the default weekStartsOn of Sunday:\n * var result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Set week day to Sunday, with a weekStartsOn of Monday:\n * var result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport default function setDay(dirtyDate, dirtyDay, dirtyOptions) {\n requiredArgs(2, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = toInteger(dirtyDay);\n var currentDay = date.getDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var delta = 7 - weekStartsOn;\n var diff = day < 0 || day > 6 ? day - (currentDay + delta) % 7 : (dayIndex + delta) % 7 - (currentDay + delta) % 7;\n return addDays(date, diff);\n}","export enum CalendarMonthDayVariant {\n SINGLE = 'single',\n MIDDLE = 'middle',\n BEGINNING = 'beginning',\n END = 'end',\n}\n\nexport enum CalendarMonthDayClass {\n // Variant\n SINGLE = CalendarMonthDayVariant.SINGLE,\n MIDDLE = CalendarMonthDayVariant.MIDDLE,\n BEGINNING = CalendarMonthDayVariant.BEGINNING,\n END = CalendarMonthDayVariant.END,\n\n // Selected\n SELECTED = 'selected',\n UNSELECTED = 'unselected',\n\n // Current day\n CURRENT_DAY = 'current-day',\n\n // Disabled\n DISABLED = 'disabled',\n}\n\nexport enum CalendarMonthDayEvent {\n CLICK = 'click',\n MOUSE_OVER = 'mouseover',\n}\n","import { PropType } from 'vue';\nimport { CalendarMonthDayVariant } from './calendar-month-day.types';\n\nexport const CalendarMonthDateProps = {\n /**\n * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)\n */\n day: { type: Date, required: true },\n\n /**\n * Indicate if a date should be disabled or not\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Changes the state of the calendar day to selected.\n */\n selected: { type: Boolean, default: false },\n\n /**\n * When the day is selected, this indicates if the selection is a single date or part of a range.\n * If it's a range it can be at the beginning, middle or end of the selection.\n */\n variant: {\n type: String as PropType<CalendarMonthDayVariant>,\n default: CalendarMonthDayVariant.SINGLE,\n validator: (value: CalendarMonthDayVariant) => Object.values(CalendarMonthDayVariant).includes(value),\n },\n};\n","<template>\n <td\n class=\"b-calendar-month-day\"\n :class=\"conditionalClasses\"\n :tabindex=\"selected ? '0' : '-1'\"\n :aria-selected=\"selected ? selected : undefined\"\n @click=\"e => onClick(e, day)\"\n @mouseover=\"$emit(CalendarMonthDayEvent.MOUSE_OVER)\"\n @keydown.space.enter=\"e => onClick(e, day)\"\n >\n <div class=\"b-calendar-month-day__wrapper\">\n <bento-date class=\"b-calendar-month-day__label\" :date=\"day\" :format=\"BentoDateFormat.DAY_OF_MONTH\" />\n </div>\n </td>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoDate, BentoDateFormat } from '@/components/date';\n import { CalendarMonthDayClass, CalendarMonthDayEvent, CalendarMonthDayVariant } from './calendar-month-day.types';\n import { CalendarMonthDateProps } from './calendar-month-day.props';\n\n /**\n * Handles the styles and states of the individual dates of the calendar.\n *\n * @example\n * import { CalendarMonthDay, CalendarMonthDayVariant } from './calendar-day';\n *\n * export default {\n * components: { CalendarMonthDay },\n * template: `\n * <table>\n * <tbody>\n * <tr>\n * <calendar-day\n * :day=\"new Date()\"\n * disabled\n * selected\n * :variant=\"CalendarMonthDayVariant.MIDDLE\"\n * />\n * </tr>\n * </tbody>\n * </table>\n * `\n * }\n */\n export default defineComponent({\n name: 'calendar-month-day',\n components: { BentoDate },\n inheritAttrs: true,\n props: CalendarMonthDateProps,\n emits: [CalendarMonthDayEvent.CLICK, CalendarMonthDayEvent.MOUSE_OVER],\n setup(props, { emit }) {\n const isCurrentDay = computed(() => {\n const today = new Date();\n return (\n props.day.getDate() === today.getDate() &&\n props.day.getMonth() === today.getMonth() &&\n props.day.getFullYear() === today.getFullYear()\n );\n });\n\n const conditionalClasses = computed(() => ({\n // Variants\n [`b-calendar-month-day--${CalendarMonthDayClass.BEGINNING}`]:\n props.variant === CalendarMonthDayVariant.BEGINNING,\n [`b-calendar-month-day--${CalendarMonthDayClass.MIDDLE}`]:\n props.variant === CalendarMonthDayVariant.MIDDLE,\n [`b-calendar-month-day--${CalendarMonthDayClass.END}`]: props.variant === CalendarMonthDayVariant.END,\n [`b-calendar-month-day--${CalendarMonthDayClass.SINGLE}`]:\n props.variant === CalendarMonthDayVariant.SINGLE,\n\n // Selected\n [`b-calendar-month-day--${CalendarMonthDayClass.UNSELECTED}`]: !props.selected,\n [`b-calendar-month-day--${CalendarMonthDayClass.SELECTED}`]: props.selected,\n\n // Current Day\n [`b-calendar-month-day--${CalendarMonthDayClass.CURRENT_DAY}`]: isCurrentDay.value,\n\n // Disabled\n [`b-calendar-month-day--${CalendarMonthDayClass.DISABLED}`]: props.disabled,\n }));\n\n const onClick = (e: MouseEvent | KeyboardEvent, selectedDay: Date) => {\n if (!props.disabled) {\n emit(CalendarMonthDayEvent.CLICK, selectedDay, props.day);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n return {\n // Values\n conditionalClasses,\n\n // Enums\n BentoDateFormat,\n CalendarMonthDayEvent,\n\n // Events\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-month-day.scss\" />\n","export enum CalendarMonthEvent {\n INPUT = 'input',\n MOUSE_OVER = 'mouseover',\n NEXT_MONTH = 'nextMonth',\n PREVIOUS_MONTH = 'previousMonth',\n}\n\nexport enum CalendarMonthPosition {\n FIRST = 'first',\n LAST = 'last',\n MIDDLE = 'middle',\n UNIQUE = 'unique',\n}\n\nexport enum CalendarMonthFirstDayOfWeek {\n MONDAY = 1,\n SATURDAY = 6,\n SUNDAY = 0,\n}\n\nexport type CalendarMonthIsDateDisabled = (date: Date) => boolean;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toInteger;\n\nfunction toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = requiredArgs;\n\nfunction requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toDate;\n\nvar _index = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\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 */\nfunction toDate(argument) {\n (0, _index.default)(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addDays;\n\nvar _index = _interopRequireDefault(require(\"../_lib/toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../toDate/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nfunction addDays(dirtyDate, dirtyAmount) {\n (0, _index3.default)(2, arguments);\n var date = (0, _index2.default)(dirtyDate);\n var amount = (0, _index.default)(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = subDays;\n\nvar _index = _interopRequireDefault(require(\"../_lib/toInteger/index.js\"));\n\nvar _index2 = _interopRequireDefault(require(\"../addDays/index.js\"));\n\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nfunction subDays(dirtyDate, dirtyAmount) {\n (0, _index3.default)(2, arguments);\n var amount = (0, _index.default)(dirtyAmount);\n return (0, _index2.default)(dirtyDate, -amount);\n}\n\nmodule.exports = exports.default;","import { nextTick, Ref, ref, watch } from 'vue';\nimport { CalendarMonthEvent, CalendarMonthFirstDayOfWeek } from '../calendar-month.types';\nimport type { SetupContext } from 'vue/types/v3-setup-context';\nimport addMonths from 'date-fns/addMonths';\nimport subMonths from 'date-fns/subMonths';\nimport addDays from 'date-fns/addDays';\nimport subDays from 'date-fns/subDays/index';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport endOfWeek from 'date-fns/endOfWeek';\n\ninterface UseMoveCalendarDate {\n currentSelectedDate: Ref<Date>;\n month: Ref<Date>;\n isDateDisabled?: (currentDate: Date) => boolean;\n firstDayOfWeek?:\n | CalendarMonthFirstDayOfWeek.MONDAY\n | CalendarMonthFirstDayOfWeek.SATURDAY\n | CalendarMonthFirstDayOfWeek.SUNDAY;\n}\n\nexport const useMoveCalendarDate = (\n { currentSelectedDate, month, isDateDisabled, firstDayOfWeek }: UseMoveCalendarDate,\n emit: SetupContext['emit']\n) => {\n // Use a duplicate of \"month\" to move back and\n // forth with the arrows. Maintained in sync with the prop\n const baseDate = ref(new Date(month.value));\n watch(\n month,\n () => {\n baseDate.value = month.value;\n },\n { immediate: true }\n );\n\n /**\n * Internal date used to actvate the dates through keyboard without\n * selecting it. This allows to easily move around the dates.\n */\n const internalDate = ref(new Date(currentSelectedDate.value));\n watch(currentSelectedDate, () => {\n internalDate.value = new Date(currentSelectedDate.value);\n });\n\n // Refs for calendar days\n const calendarRef = ref({});\n /**\n * High order function that maps each day in the calendar to their resopective Vue element ref.\n * Adds a day reference into \"calendarRef\" to be allow calendar navigation.\n * Each item is a key-value pair, where the key is the date in string form and\n * the value is the ref to the element.\n *\n *\n * @param {Date} day - Date to be added to the ref\n * @returns {Function} Maps the element ref to a date\n */\n const addDayRef = (day: Date) => enteringRef => {\n calendarRef.value[day.toDateString()] = enteringRef;\n };\n\n /**\n * Reset calendar references of each day of the month\n */\n const clearCalendarRefs = () => {\n calendarRef.value = {};\n };\n\n /**\n * Calculates what the next month's date will be and clears the calendar refs\n * @param {Number} amountOfMonths - Number of months that will be added\n */\n const showNextMonth = (amountOfMonths = 1) => {\n baseDate.value = addMonths(baseDate.value, amountOfMonths);\n emit(CalendarMonthEvent.NEXT_MONTH, amountOfMonths);\n clearCalendarRefs();\n };\n\n /**\n * Calculates what the previous month's date will be and clears the calendar refs\n * @param {Number} amountOfMonths - Number of months that will be added\n */\n const showPreviousMonth = (amountOfMonths = 1) => {\n baseDate.value = subMonths(baseDate.value, amountOfMonths);\n emit(CalendarMonthEvent.PREVIOUS_MONTH, amountOfMonths);\n clearCalendarRefs();\n };\n\n /**\n * Changes focus to the indicated date.\n * Exposed to the component to set the initial focused date, which can also be null.\n * @param {Date} dateToBeFocusedOn - Date to be focused on\n */\n const focusOnDate = (dateToBeFocusedOn: Date) => {\n const dateExistsInCalendar = !!calendarRef.value[dateToBeFocusedOn?.toDateString()];\n\n // Focus only if the date exists\n if (dateToBeFocusedOn && dateExistsInCalendar) {\n calendarRef.value[dateToBeFocusedOn.toDateString()].$el.focus();\n }\n };\n\n /**\n * Prevents the event from bubbling\n * @param {Event} event - Triggered event\n */\n const stopPropagation = (event: Event) => {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n };\n\n // Keyboard Navigation events\n interface ChangeDate {\n nextDate: Date;\n isIncreasingDays: boolean;\n amountOfMonths?: number;\n isCalendarButtonsNav?: boolean;\n }\n /**\n * Activates the date passed in \"nextDate\".\n * Doesn't trigger the emit event to select the date, given this is only done\n * when the \"Enter\" key is pressed.\n *\n * The date passed is evaluated to check if it's the same month and year,\n * if not then a new month is rendered through {@see showNextMonth} or {@see showPreviousMonth}.\n *\n * If the date passed is disabled no action is taken.\n *\n * @param {Date} nextDate - Date to be processed and if it's not disabled it should make it active.\n * @param {Boolean} isIncreasinDays - Indicates if the date before or after the currently selected date.\n * @param {Number} amountOfMonths - Amount of months it's increasing or decreasing. Used to calculate the month to be rendered\n */\n const changeDate = ({ nextDate, isIncreasingDays, amountOfMonths, isCalendarButtonsNav }: ChangeDate) => {\n // Do not change date if nextDay is disabled\n if (!isCalendarButtonsNav && isDateDisabled && isDateDisabled(nextDate)) {\n return;\n }\n\n const isNextDaySameMonthAndYear =\n nextDate.getMonth() === internalDate.value.getMonth() &&\n nextDate.getFullYear() === internalDate.value.getFullYear();\n // If it's in the same month, make \"nextDate\" the active date (not selected)\n if (isNextDaySameMonthAndYear) {\n internalDate.value = nextDate;\n focusOnDate(nextDate);\n } else {\n // Show next/previous month\n // and waits for the refs to be re-populated\n // eslint-disable-next-line no-unused-expressions\n isIncreasingDays ? showNextMonth(amountOfMonths) : showPreviousMonth(amountOfMonths);\n nextTick(() => {\n const isNextDateInTheDisplayedMonthAndYear =\n nextDate.getMonth() === baseDate.value.getMonth() &&\n nextDate.getFullYear() === baseDate.value.getFullYear();\n if ((isDateDisabled && isDateDisabled(nextDate)) || !isNextDateInTheDisplayedMonthAndYear) {\n return;\n }\n\n if (!isCalendarButtonsNav) {\n internalDate.value = nextDate;\n focusOnDate(nextDate);\n }\n });\n }\n };\n\n /**\n * Move the current date to the next calendar day\n * @param {Event} event - Triggered event\n */\n const moveToNextDay = (event: Event) => {\n stopPropagation(event);\n\n const daysToAdd = 1;\n changeDate({ nextDate: addDays(internalDate.value, daysToAdd), isIncreasingDays: true });\n };\n\n /**\n * Move the current date to the previous calendar day\n * @param {Event} event - Triggered event\n */\n const moveToPreviousDay = (event: Event) => {\n stopPropagation(event);\n\n const daysToSubstract = 1;\n changeDate({ nextDate: subDays(internalDate.value, daysToSubstract), isIncreasingDays: false });\n };\n\n /**\n * Move the current date to the same week day in the previous week\n * @param {Event} event - Triggered event\n */\n const moveToPreviousWeek = (event: Event) => {\n stopPropagation(event);\n\n const daysToSubstract = 7;\n changeDate({ nextDate: subDays(internalDate.value, daysToSubstract), isIncreasingDays: false });\n };\n\n /**\n * Move the current date to the same week day in the next week\n * @param {Event} event - Triggered event\n */\n const moveToNextWeek = (event: Event) => {\n stopPropagation(event);\n\n const daysToAdd = 7;\n changeDate({ nextDate: addDays(internalDate.value, daysToAdd), isIncreasingDays: true });\n };\n\n /**\n * Move the current date to the first day of the week\n * @param {Event} event - Triggered event\n */\n const moveToFirstDayOfWeek = (event: Event) => {\n stopPropagation(event);\n\n changeDate({\n nextDate: startOfWeek(internalDate.value, { weekStartsOn: firstDayOfWeek }),\n isIncreasingDays: false,\n });\n };\n\n /**\n * Move the current date to the last day of the week\n * @param {Event} event - Triggered event\n */\n const moveToLastDayOfWeek = (event: Event) => {\n stopPropagation(event);\n\n changeDate({\n nextDate: endOfWeek(internalDate.value, { weekStartsOn: firstDayOfWeek }),\n isIncreasingDays: true,\n });\n };\n\n /**\n * Move the current date to the same day in the previous year\n * @param {Event} event - Triggered event\n */\n const moveToPreviousYear = (event: Event) => {\n stopPropagation(event);\n\n const monthsToSubstract = 12;\n changeDate({\n nextDate: subMonths(internalDate.value, monthsToSubstract),\n isIncreasingDays: false,\n amountOfMonths: monthsToSubstract,\n });\n };\n\n /**\n * Move the current date to the same day in the previous month.\n * If the date doesn't exists, moves to the last day of th month.\n * @param {Event} event - Triggered event\n */\n const moveToPreviousMonth = (event: Event, isCalendarButtonsNav = false) => {\n stopPropagation(event);\n\n const monthsToSubstract = 1;\n\n changeDate({\n nextDate: subMonths(internalDate.value, monthsToSubstract),\n isIncreasingDays: false,\n amountOfMonths: monthsToSubstract,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the same day in the next year\n * @param {Event} event - Triggered event\n */\n const moveToNextYear = (event: Event) => {\n stopPropagation(event);\n\n const monthsToAdd = 12;\n changeDate({\n nextDate: addMonths(internalDate.value, monthsToAdd),\n isIncreasingDays: true,\n amountOfMonths: monthsToAdd,\n });\n };\n\n /**\n * Move the current date to the same day in the next month.\n * @param {Event} event - Triggered event\n */\n const moveToNextMonth = (event: Event, isCalendarButtonsNav = false) => {\n stopPropagation(event);\n\n const monthsToAdd = 1;\n changeDate({\n nextDate: addMonths(internalDate.value, monthsToAdd),\n isIncreasingDays: true,\n amountOfMonths: monthsToAdd,\n isCalendarButtonsNav,\n });\n };\n\n return {\n // Calendar days ref\n calendarRef,\n addDayRef,\n\n /**\n * Month navigation\n */\n showNextMonth,\n showPreviousMonth,\n\n /**\n * Focus method\n */\n focusOnDate,\n\n /**\n * Day navigation\n */\n\n // ArrowRight\n moveToNextDay,\n // ArrowLeft\n moveToPreviousDay,\n // ArrowUp\n moveToPreviousWeek,\n // ArrowDown\n moveToNextWeek,\n // Home\n moveToFirstDayOfWeek,\n // End\n moveToLastDayOfWeek,\n // PageUp\n moveToPreviousMonth,\n // Shift+PageUp\n moveToPreviousYear,\n // PageDown\n moveToNextMonth,\n // Shift-PageDown\n moveToNextYear,\n\n // Values\n internalDate,\n baseDate,\n };\n};\n","<template>\n <div v-bento-keyboard-navigation-directive class=\"b-calendar-month\" v-on=\"listeners\">\n <div class=\"b-calendar-month__month-selector\">\n <!-- go to previous month -->\n <div class=\"b-calendar-month__previous\">\n <bento-button\n v-if=\"shouldShowPreviousMonthButton\"\n variant=\"tertiary\"\n @click=\"moveToPreviousMonth($event, true)\"\n >\n <template #iconLeft>\n <chevron-left-icon :svg-title=\"t('previousMonth')\" />\n </template>\n </bento-button>\n </div>\n\n <!-- month's name -->\n <bento-typography :id=\"monthLabelId\" el=\"h2\" variant=\"title\" aria-live=\"polite\">\n {{ formattedMonthDate }}\n </bento-typography>\n\n <!-- go to next month -->\n <div class=\"b-calendar-month__next\">\n <bento-button\n v-if=\"shouldShowNextMonthButton\"\n variant=\"tertiary\"\n @click=\"moveToNextMonth($event, true)\"\n >\n <template #iconLeft>\n <chevron-right-icon :svg-title=\"t('nextMonth')\" />\n </template>\n </bento-button>\n </div>\n </div>\n\n <table class=\"b-calendar-month__month-container\" role=\"grid\" :aria-labelledby=\"monthLabelId\">\n <thead>\n <tr class=\"b-calendar-month__week-header\">\n <th\n v-for=\"(dayOfWeekFormatted, index) in daysOfWeek\"\n :key=\"index\"\n class=\"b-calendar-month__day-of-week\"\n >\n <bento-typography class=\"b-calendar-month__day-of-week-font\" el=\"span\" variant=\"caption\">\n {{ dayOfWeekFormatted }}\n </bento-typography>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"(week, index) in weeksOfMonth\" :key=\"index\">\n <td v-if=\"index === 0 && week.length < 7\" :colspan=\"7 - week.length\"> </td>\n <calendar-month-day\n v-for=\"(day, dayIndex) in week\"\n :ref=\"addDayRef(day)\"\n :key=\"`calendar-day-${dayIndex}`\"\n :day=\"day\"\n :disabled=\"computedIsDateDisabled(day)\"\n :selected=\"isSelectedDate(day)\"\n :variant=\"dayVariant(day)\"\n @click=\"onDayClicked\"\n @mouseover=\"$emit(CalendarMonthEvent.MOUSE_OVER, day)\"\n />\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRef } from 'vue';\n import { BentoButton } from '@/components/button';\n import { CalendarMonthDay, CalendarMonthDayVariant } from './components/calendar-month-day';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { de, enUS, fr } from 'date-fns/locale';\n import {\n CalendarMonthEvent,\n CalendarMonthFirstDayOfWeek,\n CalendarMonthIsDateDisabled,\n CalendarMonthPosition,\n } from './calendar-month.types';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { useMoveCalendarDate } from './composables/move-calendar-date';\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 import setDay from 'date-fns/setDay';\n import startOfMonth from 'date-fns/startOfMonth';\n import startOfDay from 'date-fns/startOfDay';\n import format from 'date-fns/format';\n import isSameDay from 'date-fns/isSameDay';\n import isWithinInterval from 'date-fns/isWithinInterval';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * CalendarMonth that displays all the days of a given month and allows\n * to move back and forth the visible month with the Next and Previous buttons\n *\n * @example\n * import { CalendarMonthMonth, CalendarMonthFirstDayOfWeek, CalendarMonthPosition } from '@/internal/calendar';\n *\n * export default {\n * components: { CalendarMonthMonth },\n * template: `\n * <calendar\n * :first-day-of-week=\"CalendarMonthFirstDayOfWeek.SUNDAY\"\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :month=\"new Date()\"\n * :position=\"CalendarMonthPosition.LAST\"\n * is-range\n * :start-date=\"new Date()\"\n * :end-date=\"new Date()\"\n * @input=\"(selectedDate: Date) => void\"\n * @mouseover=\"(event: Event) => void\"\n * @nextMonth=\"() => void\"\n * @previousMonth=\"() => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'calendar-month',\n components: {\n BentoButton,\n BentoTypography,\n CalendarMonthDay,\n ChevronLeftIcon,\n ChevronRightIcon,\n },\n directives: { BentoKeyboardNavigationDirective },\n props: {\n /**\n * end of the selected range\n */\n endDate: { type: Date, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: {\n type: Number as PropType<CalendarMonthFirstDayOfWeek>,\n default: CalendarMonthFirstDayOfWeek.MONDAY,\n validator: (value: CalendarMonthFirstDayOfWeek) =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(value),\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: { type: Function as PropType<CalendarMonthIsDateDisabled>, default: undefined },\n\n /**\n * Indicates if the calendar is part of a range date picker or a sigle date picker\n */\n isRange: { type: Boolean, default: false },\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: { type: Date, default: null },\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: { type: Date, default: null },\n\n /**\n * Month of the year to be displayed in the calendar\n */\n month: { type: Date, required: true },\n\n /**\n * When rendering multiple calendars, this property allows to render the\n * Next and Previous calendar buttons to the right, left or not at all\n * depending on the position: Unique (only 1), First, Middle or Last\n */\n position: {\n type: String as PropType<CalendarMonthPosition>,\n default: CalendarMonthPosition.UNIQUE,\n validator: (value: CalendarMonthPosition) => Object.values(CalendarMonthPosition).includes(value),\n },\n\n /**\n * start of the selected range\n */\n startDate: { type: Date, default: null }, // can be undefined, eslint complains without default\n },\n emits: [\n CalendarMonthEvent.INPUT,\n CalendarMonthEvent.NEXT_MONTH,\n CalendarMonthEvent.PREVIOUS_MONTH,\n CalendarMonthEvent.MOUSE_OVER,\n ],\n setup(props, { emit }) {\n // Date formatter locale options\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = { de, enUS, fr };\n const monthLabelId = generateUid('bento-date-picker-month-label');\n\n const computedIsDateDisabled = computed(\n () => (date: Date) =>\n (props.min && date < props.min) || (props.max && date > props.max) || props.isDateDisabled?.(date)\n );\n\n const {\n internalDate,\n baseDate,\n // Calendar refs\n addDayRef,\n // Month navigation\n showNextMonth,\n showPreviousMonth,\n // Day navigation\n moveToNextDay,\n moveToPreviousDay,\n moveToPreviousWeek,\n moveToNextWeek,\n moveToFirstDayOfWeek,\n moveToLastDayOfWeek,\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n focusOnDate,\n } = useMoveCalendarDate(\n {\n currentSelectedDate: toRef(props, 'startDate'),\n month: toRef(props, 'month'),\n isDateDisabled: computedIsDateDisabled.value,\n firstDayOfWeek: props.firstDayOfWeek,\n },\n emit\n );\n\n /**\n * Default to Monday if the value passed in is not part of the defined Enum\n */\n const fallbackFirstDayOfWeek = computed(() =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(props.firstDayOfWeek)\n ? props.firstDayOfWeek\n : CalendarMonthFirstDayOfWeek.MONDAY\n );\n\n /**\n * Renders the previous month button if it's Unique or First calendar\n */\n const shouldShowPreviousMonthButton = computed(() =>\n [CalendarMonthPosition.FIRST, CalendarMonthPosition.UNIQUE].includes(props.position)\n );\n\n /**\n * Renders the next month button if it's Unique or Last calendar\n */\n const shouldShowNextMonthButton = computed(() =>\n [CalendarMonthPosition.LAST, CalendarMonthPosition.UNIQUE].includes(props.position)\n );\n\n /**\n * Formats the month date to the name of the month and the year\n */\n const formattedMonthDate = computed(() =>\n format(baseDate.value, 'MMMM yyyy', {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n })\n );\n\n /**\n * Formats all the days of the week to their day name\n */\n const daysOfWeek = computed(() =>\n new Array(7).fill(new Date()).map((date, index) => {\n const dayOfWeekDate = setDay(date, fallbackFirstDayOfWeek.value + index);\n\n return format(dayOfWeekDate, 'EEE', {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n })\n );\n\n /**\n * Calculates all the weeks of the current \"props.month\"\n * and adds the respective day number to each column and week\n */\n const weeksOfMonth = computed(() => {\n const weeks = [];\n const date = startOfMonth(props.month);\n let week = weeks[weeks.push([]) - 1];\n\n while (date.getMonth() === props.month.getMonth()) {\n if (date.getDay() - fallbackFirstDayOfWeek.value === 0 && week.length > 0) {\n week = weeks[weeks.push([]) - 1];\n }\n\n week.push(startOfDay(date));\n date.setDate(date.getDate() + 1);\n }\n\n return weeks;\n });\n\n const onDayClicked = (selectedDate: Date) => {\n emit(CalendarMonthEvent.INPUT, selectedDate);\n };\n\n /**\n * Calculates the variation of the days selected.\n * For single select it's always SINGLE\n * For ranges:\n * - Start & End is the same: SINGLE\n * - Start: BEGINNING\n * - End: END\n * - Within the range: MIDDLE\n * @param {Date} day Current day\n */\n // eslint-disable-next-line consistent-return\n const dayVariant = (day: Date) => {\n if (!props.isRange || isSameDay(props.startDate, props.endDate)) {\n return CalendarMonthDayVariant.SINGLE;\n }\n\n if (props.startDate && isSameDay(props.startDate, day)) {\n return CalendarMonthDayVariant.BEGINNING;\n }\n if (props.endDate && isSameDay(props.endDate, day)) {\n return CalendarMonthDayVariant.END;\n }\n if (\n props.startDate &&\n props.endDate &&\n isWithinInterval(day, { start: props.startDate, end: props.endDate })\n ) {\n return CalendarMonthDayVariant.MIDDLE;\n }\n };\n\n /**\n * Checks every date in the calendar to see if it's selected.\n * @param day Current day in the calendar\n */\n const isSelectedDate = (day: Date) => {\n // Single selection\n if (internalDate.value && isSameDay(internalDate.value, day)) {\n return true;\n }\n\n // Range\n return (\n props.startDate &&\n props.endDate &&\n isWithinInterval(day, { start: props.startDate, end: props.endDate })\n );\n };\n\n const confirmNavigationDate = () => {\n emit(CalendarMonthEvent.INPUT, internalDate);\n };\n\n const listeners = !props.isRange\n ? {\n 'keydown:arrow-right': moveToNextDay,\n 'keydown:arrow-left': moveToPreviousDay,\n 'keydown:arrow-up': moveToPreviousWeek,\n 'keydown:arrow-down': moveToNextWeek,\n 'keydown:home': moveToFirstDayOfWeek,\n 'keydown:end': moveToLastDayOfWeek,\n 'keydown:page-up': moveToPreviousMonth,\n 'keydown:shift-page-up': moveToPreviousYear,\n 'keydown:page-down': moveToNextMonth,\n 'keydown:shift-page-down': moveToNextYear,\n }\n : {};\n\n return {\n // Refs\n addDayRef,\n\n // Values\n computedIsDateDisabled,\n daysOfWeek,\n weeksOfMonth,\n formattedMonthDate,\n shouldShowNextMonthButton,\n shouldShowPreviousMonthButton,\n monthLabelId,\n\n // Enums\n CalendarMonthEvent,\n\n // Functions\n isSelectedDate,\n showNextMonth,\n showPreviousMonth,\n dayVariant,\n confirmNavigationDate,\n\n // Events\n onDayClicked,\n listeners,\n\n // Exposed methods\n focusOnDate,\n moveToNextDay,\n moveToPreviousDay,\n moveToPreviousWeek,\n moveToNextWeek,\n moveToFirstDayOfWeek,\n moveToLastDayOfWeek,\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-month.scss\" />\n","import { Ref, UnwrapNestedRefs } from 'vue';\nimport type { Day } from 'date-fns';\n\nexport { CalendarMonthFirstDayOfWeek as CalendarFirstDayOfWeek } from './components/calendar-month/index';\nexport type { CalendarMonthIsDateDisabled as CalendarIsDateDisabled } from './components/calendar-month/index';\n\nexport type CalendarGranularityType = 'daily' | 'weekly' | 'monthly';\n\nexport interface CalendarGranularityConfig<T extends CalendarGranularityType = CalendarGranularityType> {\n type: T;\n earliest?: Date;\n latest?: Date;\n disabled?: boolean;\n}\n\nexport interface CalendarRangeDateValue {\n startDate: Date;\n endDate: Date;\n granularity?: CalendarGranularityType;\n range?: string;\n}\n\nexport type CalendarSingleDateValue = Date;\nexport type CalendarValue = CalendarSingleDateValue | CalendarRangeDateValue;\n\ninterface UseCalendarPaneProps {\n isDateDisabled?: (date: Date) => boolean;\n maxRange?: Ref<number>;\n selectedDate: Ref<CalendarValue>;\n granularity?: Ref<CalendarGranularityConfig>;\n firstDayOfWeek: Day;\n min?: Ref<Date>;\n max?: Ref<Date>;\n}\n\nexport type UseCalendarPane = (\n propRefs: UseCalendarPaneProps,\n emit\n) => {\n internalValue: UnwrapNestedRefs<CalendarRangeDateValue>;\n onDateInput: (date: Date) => void;\n onMouseOver: (date: Date) => void;\n};\n\nexport enum CalendarEvent {\n INPUT = 'input',\n START_DATE_SELECTED = 'start-date-selected',\n END_DATE_SELECTED = 'end-date-selected',\n}\n","import { reactive, watch } from 'vue';\nimport { CalendarEvent, UseCalendarPane } from '../calendar.types';\n\nexport const useSinglePane: UseCalendarPane = ({ selectedDate }, emit) => {\n /**\n * Internal date manipulation.\n */\n const internalValue = reactive({\n startDate: null,\n endDate: null,\n });\n\n /**\n * Set \"internalValue\" to the initial date and kept in sync for when\n * the date is changed outside of the component while the component is mounted\n */\n watch(\n () => selectedDate.value,\n () => {\n internalValue.startDate = selectedDate.value;\n internalValue.endDate = undefined;\n },\n { immediate: true }\n );\n\n /**\n * Called when a date is selected.\n *\n * Emits the selected date\n *\n * @param date - Date clicked\n */\n const onDateInput = (date: Date) => {\n emit(CalendarEvent.INPUT, date);\n };\n\n return {\n internalValue,\n\n onDateInput,\n // Empty function to prevent the listeners from throwing a warning\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onMouseOver: () => {},\n };\n};\n","import endOfMonth from 'date-fns/endOfMonth';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport startOfMonth from 'date-fns/startOfMonth';\nimport startOfWeek from 'date-fns/startOfWeek';\n\nimport type { UseGranularityAdjustments } from './use-granularity-adjustments.types';\n\n/**\n * Provides utility function to adjust date range selections according to the selected granularity.\n * @param firstDayOfWeek The day a week starts on\n * @param min Minimum selectable date\n * @param max Maximum selectable date\n * @returns A set of functions to adjust date range objects and date strings to a specific granularity.\n */\nexport const useGranularityAdjustments: UseGranularityAdjustments = firstDayOfWeek => {\n /**\n * Adjusts a given date or date range to the weekly granularity.\n * Always returns full weeks.\n */\n const adjustDateForWeekly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfWeek(date, { weekStartsOn: firstDayOfWeek });\n let end = endOfWeek(endDate || date, { weekStartsOn: firstDayOfWeek });\n\n const isStartOutOfBounds = min && start < min;\n const isEndOutOfBounds = max && end > max;\n\n if (isStartOutOfBounds) {\n start = startOfWeek(min, { weekStartsOn: firstDayOfWeek });\n }\n\n if (isEndOutOfBounds) {\n end = endOfWeek(max, { weekStartsOn: firstDayOfWeek });\n }\n\n // If min/max adjustments caused invalid range, set to first/last available full week\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfWeek(start, { weekStartsOn: firstDayOfWeek });\n } else {\n start = startOfWeek(end, { weekStartsOn: firstDayOfWeek });\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a given date or date range to the monthly granularity.\n * Always returns full months.\n */\n const adjustDateForMonthly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfMonth(date);\n let end = endOfMonth(endDate || date);\n\n const isStartOutOfBounds = start < min;\n const isEndOutOfBounds = end > max;\n\n if (isStartOutOfBounds) {\n start = startOfMonth(min);\n }\n\n if (isEndOutOfBounds) {\n end = endOfMonth(max);\n }\n\n // If min/max adjustments caused invalid range, set to first/last available full month\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfMonth(start);\n } else {\n start = startOfMonth(end);\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a text start date for weekly granularity (start of that week)\n */\n const adjustStartDateInputForWeekly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForWeekly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for weekly granularity (end of that week)\n */\n const adjustEndDateInputForWeekly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForWeekly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n /**\n * Adjusts a text start date for monthly granularity (start of that month)\n */\n const adjustStartDateInputForMonthly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForMonthly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for monthly granularity (end of that month)\n */\n const adjustEndDateInputForMonthly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForMonthly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n return {\n adjustDateForWeekly,\n adjustDateForMonthly,\n adjustStartDateInputForWeekly,\n adjustEndDateInputForWeekly,\n adjustStartDateInputForMonthly,\n adjustEndDateInputForMonthly,\n };\n};\n","import { reactive, ref, watch } from 'vue';\nimport { CalendarEvent, CalendarRangeDateValue, UseCalendarPane } from '../calendar.types';\nimport isBefore from 'date-fns/isBefore';\nimport startOfDay from 'date-fns/startOfDay';\nimport isAfter from 'date-fns/isAfter';\nimport addDays from 'date-fns/addDays';\nimport differenceInDays from 'date-fns/differenceInDays';\nimport subDays from 'date-fns/subDays';\n\nimport { useGranularityAdjustments } from './use-granularity-adjustments';\n\n/**\n * Provides event handler logic to correctly display date range selection, as a user clicks calendar dates.\n * @param props Calendar properties and current date selection\n * @param emit The Vue event `emit` function\n * @returns A date range internal value, and a set of handlers for date mouse input.\n */\nexport const useRangePane: UseCalendarPane = (\n { selectedDate, isDateDisabled, maxRange, granularity, firstDayOfWeek, min, max },\n emit\n) => {\n const backwardsDirection = -1;\n const forwardDirection = 1;\n\n const { adjustDateForWeekly, adjustDateForMonthly } = useGranularityAdjustments(firstDayOfWeek);\n\n /**\n * Internal date manipulation.\n * This allows to change the dates with the form.\n */\n const internalValue = reactive<CalendarRangeDateValue>({\n startDate: null,\n endDate: null,\n });\n\n /**\n * First clicked date to calculate the ranges with\n */\n const clickedDate = ref<Date | null>(null);\n\n /**\n * Set \"internalValue\" to the initial date and kept in sync for when\n * the date is changed outside of the component while the component is mounted\n */\n watch(\n () => selectedDate.value,\n () => {\n let { startDate = null, endDate = null } = (selectedDate.value as CalendarRangeDateValue) || {};\n\n if (startDate) {\n startDate = startOfDay(startDate);\n }\n\n if (endDate) {\n endDate = startOfDay(endDate);\n }\n\n if (\n (startDate && isDateDisabled && isDateDisabled(startDate)) ||\n (endDate && isDateDisabled && isDateDisabled(endDate)) ||\n (startDate && endDate && isAfter(startDate, endDate))\n ) {\n // Disabled dates do nothing\n return;\n }\n\n internalValue.startDate = startDate;\n internalValue.endDate = endDate;\n },\n { immediate: true, deep: true }\n );\n\n const setDates = (startDate: Date, endDate: Date, direction?: number) => {\n // Set new initial dates to internal state\n // For the form manual input to be registered, null values are allowed\n internalValue.startDate = startDate;\n internalValue.endDate = endDate;\n\n // Selects a range of dates not bigger than the maxRange value\n if (maxRange.value) {\n const difference = differenceInDays(endDate, startDate) - maxRange.value;\n if (difference > 0) {\n if (direction < 1) {\n internalValue.startDate = startDate;\n internalValue.endDate = subDays(endDate, difference);\n } else {\n internalValue.startDate = addDays(startDate, difference);\n internalValue.endDate = endDate;\n }\n }\n }\n\n emit(CalendarEvent.START_DATE_SELECTED, internalValue.startDate);\n emit(CalendarEvent.END_DATE_SELECTED, internalValue.endDate);\n };\n\n /**\n * When the mouse moves over the days it recalculates the\n * range and moves it to the next range.\n *\n * If it's before the intial date it switches the range (start becomes end and vice versa)\n * If it's after it sets the new end date.\n * @param date - Hovered date\n */\n const onMouseOver = (date: Date) => {\n if (!clickedDate.value || (isDateDisabled && isDateDisabled(date))) {\n return;\n }\n\n if (isBefore(date, clickedDate.value)) {\n // For weekly granularity, set date selection to the respective full week\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n // For monthly granularity, set date selection to the respective full month\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n setDates(date, clickedDate.value, backwardsDirection);\n } else {\n // For weekly granularity, set date selection to the respective full week\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n // For monthly granularity, set date selection to the respective full month\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n setDates(clickedDate.value, date, forwardDirection);\n }\n };\n\n /**\n * Called when a date is selected.\n *\n * - Initial click: Sets the selected date\n * - Second click: Selects the date range. Emits the Start date & End date\n *\n * @param date - Date clicked\n */\n const onDateInput = (date: Date) => {\n // Second click\n if (clickedDate.value) {\n // Reset clicked date after second click\n clickedDate.value = null;\n\n // Set the end date in our internal value which will be emitted\n // Emit when the second date (endDate) is selected\n emit(CalendarEvent.INPUT, internalValue);\n } else {\n // First click\n let correctedDate = date;\n\n // Correct the selected date to the start of the respective week and apply it\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // Correct the selected date to the start of the respective month and apply it\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // For daily, manually trigger `onMouseOver` so that the full behavior is\n // replicated if the user clicks the same day twice\n clickedDate.value = correctedDate;\n onMouseOver(correctedDate);\n }\n };\n\n return {\n internalValue,\n\n onDateInput,\n onMouseOver,\n };\n};\n","<template>\n <div class=\"b-calendar\" :class=\"conditionalClasses\">\n <calendar-month\n v-for=\"(_, index) in numberOfMonths\"\n :ref=\"numberOfMonths === 1 ? 'calendarRef' : null\"\n :key=\"`calendar-${index}`\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :month=\"calculateOffsetMonth(index)\"\n :position=\"calendarPosition(index)\"\n :min=\"min\"\n :max=\"max\"\n :is-range=\"isRange\"\n :start-date=\"internalValue.startDate\"\n :end-date=\"internalValue.endDate\"\n :granularity=\"granularity\"\n @input=\"onDateInput\"\n @mouseover=\"onMouseOver\"\n @nextMonth=\"calculateNextMonths\"\n @previousMonth=\"calculatePreviousMonths\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { CalendarMonth, CalendarMonthPosition } from './components/calendar-month';\n import { CalendarEvent, CalendarGranularityConfig, CalendarRangeDateValue, CalendarValue } from './calendar.types';\n import { useSinglePane } from './composables/use-single-pane';\n import { useRangePane } from './composables/use-range-pane';\n import addMonths from 'date-fns/addMonths';\n import subMonths from 'date-fns/subMonths';\n\n /**\n * Handles the calendar logic to change visible months for Single calendar\n * and Range calendar, as well as the selection logic for range.\n * All the processing necessary for the calendar to select dates\n *\n * @example\n * import { Calendar } from '@/internal/bento-vue2';\n *\n * export default {\n * components: { Calendar },\n * template: `\n * <calendar\n * :value=\"value\"\n * :first-day-of-week=\"CalendarFirstDayOfWeek.Monday\"\n * :is-date-disabled=\"(day: Date) => boolean\"\n * :number-of-months=\"2\"\n * is-range\n * @input=\"(selectedDate) => void\"\n * @start-date-selected=\"(startDate: Date) => void\"\n * @end-date-selected=\"(endDate: Date) => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'calendar',\n components: { CalendarMonth },\n props: {\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: CalendarMonth.props.firstDayOfWeek,\n\n /**\n * The selected granularity configuration\n */\n granularity: {\n type: Object as PropType<CalendarGranularityConfig>,\n default: null,\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: CalendarMonth.props.isDateDisabled,\n\n /**\n * Enables the Date Range calendar\n */\n isRange: CalendarMonth.props.isRange,\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: { type: Number, default: null, validator: (value: number) => !value || value > 0 },\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: CalendarMonth.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: CalendarMonth.props.max,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: {\n type: Number,\n default: 3,\n validator: (n: number) => n >= 1,\n },\n\n /**\n * Upon opening date range picker, end date's month will be pre-selected.\n */\n showEndDateOnOpen: { type: Boolean, default: false },\n\n /**\n * Selected date. Can be a single Date or a CalendarRangeDate\n * instance that contains startDate and endDate attributes.\n */\n value: { type: [Date, Object] as PropType<CalendarValue>, default: undefined },\n },\n emit: [CalendarEvent.INPUT, CalendarEvent.START_DATE_SELECTED, CalendarEvent.END_DATE_SELECTED],\n setup(props, { emit }) {\n // Single date calendar ref\n const calendarRef = ref(null);\n // Use a duplicate of \"month\" to move back and\n // forth with the arrows. Maintained in sync with the prop \"value\"\n const baseDate = ref();\n watch(\n () => props.value,\n () => {\n if (props.isRange) {\n baseDate.value =\n props?.showEndDateOnOpen && (props.value as CalendarRangeDateValue)?.endDate\n ? (props.value as CalendarRangeDateValue)?.endDate\n : (props.value as CalendarRangeDateValue)?.startDate || new Date();\n } else {\n baseDate.value = (props.value as Date) || new Date();\n }\n },\n { immediate: true }\n );\n\n const conditionalClasses = computed(() => ({\n 'b-calendar__range': props.isRange,\n }));\n\n const {\n internalValue,\n\n onDateInput,\n onMouseOver,\n } = props.isRange\n ? useRangePane(\n {\n selectedDate: toRef(props, 'value'),\n isDateDisabled: props.isDateDisabled as (date: Date) => boolean,\n maxRange: toRef(props, 'maxRange'),\n granularity: toRef(props, 'granularity'),\n firstDayOfWeek: props.firstDayOfWeek,\n min: toRef(props, 'min'),\n max: toRef(props, 'max'),\n },\n emit\n )\n : useSinglePane(\n {\n selectedDate: toRef(props, 'value'),\n firstDayOfWeek: props.firstDayOfWeek,\n },\n emit\n );\n\n /**\n * Calculate the current month calendar.\n * This is used to render/hide the Previous & Next buttons on each calendar.\n * @param {number} calendarIndex - Number to offset the calendar position\n */\n const calendarPosition = (calendarIndex: number) => {\n if (props.numberOfMonths === 1) {\n return CalendarMonthPosition.UNIQUE;\n }\n\n if (calendarIndex === 0) {\n return CalendarMonthPosition.FIRST;\n }\n\n return calendarIndex === props.numberOfMonths - 1\n ? CalendarMonthPosition.LAST\n : CalendarMonthPosition.MIDDLE;\n };\n\n /**\n * Calculates in relation to the amount of months defined in \"numberOfMonths\"\n * which calendar month should be render starting from the first (leftmost)\n * rendered calendar.\n * If showEndDateOnOpen is set to true, the last pane should be the baseDate month i.e. the end date\n * @param offsetMonth - Amount of months to add after the first month was rendered\n */\n const calculateOffsetMonth = computed(() => (offsetMonth: number) => {\n const monthOffset =\n props?.showEndDateOnOpen && props.isRange\n ? subMonths(baseDate.value, props.numberOfMonths - 1)\n : baseDate.value;\n\n return addMonths(monthOffset, offsetMonth);\n });\n\n /**\n * By default shows the following month\n * Can skip multiple months by passing an additional param\n * Used for keyboard nav to be able to skip a year\n */\n const calculateNextMonths = (amountOfMonths = 1) => {\n baseDate.value = addMonths(baseDate.value, amountOfMonths);\n };\n\n /**\n * By default shows the previous month\n * Can skip multiple months by passing an additional param\n * Used for keyboard nav to be able to go back a year\n */\n const calculatePreviousMonths = (amountOfMonths = 1) => {\n baseDate.value = subMonths(baseDate.value, amountOfMonths);\n };\n\n return {\n // Refs\n calendarRef,\n\n // Values\n baseDate,\n conditionalClasses,\n internalValue,\n\n // Methods\n calculateOffsetMonth,\n calendarPosition,\n\n // Events\n onDateInput,\n onMouseOver,\n calculateNextMonths,\n calculatePreviousMonths,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar.scss\" />\n"],"names":["addDays$1","dirtyDate","dirtyAmount","requiredArgs$1","date","toDate$1","amount","toInteger$1","addMonths","dayOfMonth","endOfDesiredMonth","daysInMonth","startOfWeek","dirtyOptions","options","locale","localeWeekStartsOn","defaultWeekStartsOn","weekStartsOn","day","diff","startOfDay","MILLISECONDS_IN_DAY","differenceInCalendarDays","dirtyDateLeft","dirtyDateRight","startOfDayLeft","startOfDayRight","timestampLeft","getTimezoneOffsetInMilliseconds","timestampRight","isSameDay","dateLeftStartOfDay","dateRightStartOfDay","compareLocalAsc","dateLeft","dateRight","differenceInDays","sign","difference","isLastDayNotFull","result","startOfMonth","endOfWeek","subDays$2","subMonths","isAfter","dirtyDateToCompare","dateToCompare","isBefore","isWithinInterval","interval","time","startTime","endTime","setDay","dirtyDay","currentDay","remainder","dayIndex","delta","CalendarMonthDayVariant","CalendarMonthDayVariant2","CalendarMonthDayClass","CalendarMonthDayClass2","CalendarMonthDayEvent","CalendarMonthDayEvent2","CalendarMonthDateProps","value","_sfc_main$2","defineComponent","BentoDate","props","emit","isCurrentDay","computed","today","BentoDateFormat","e","selectedDay","CalendarMonthEvent","CalendarMonthEvent2","CalendarMonthPosition","CalendarMonthPosition2","CalendarMonthFirstDayOfWeek","CalendarMonthFirstDayOfWeek2","exports","toInteger","dirtyNumber","number","requiredArgs","required","args","toDate","_index","_interopRequireDefault","requiredArgsExports","argStr","argument","addDays","toIntegerExports","_index2","toDateExports","_index3","subDays","addDaysExports","useMoveCalendarDate","currentSelectedDate","month","isDateDisabled","firstDayOfWeek","baseDate","ref","watch","internalDate","calendarRef","addDayRef","enteringRef","clearCalendarRefs","showNextMonth","amountOfMonths","showPreviousMonth","focusOnDate","dateToBeFocusedOn","dateExistsInCalendar","stopPropagation","event","changeDate","nextDate","isIncreasingDays","isCalendarButtonsNav","nextTick","isNextDateInTheDisplayedMonthAndYear","monthsToSubstract","monthsToAdd","_sfc_main$1","messages","BentoButton","BentoTypography","CalendarMonthDay","ChevronLeftIcon","ChevronRightIcon","BentoKeyboardNavigationDirective","locale$3","t","useI18n","locales","locale$1","locale$2","monthLabelId","generateUid","computedIsDateDisabled","_a","moveToNextDay","moveToPreviousDay","moveToPreviousWeek","moveToNextWeek","moveToFirstDayOfWeek","moveToLastDayOfWeek","moveToPreviousMonth","moveToPreviousYear","moveToNextMonth","moveToNextYear","toRef","fallbackFirstDayOfWeek","shouldShowPreviousMonthButton","shouldShowNextMonthButton","formattedMonthDate","format","daysOfWeek","index","dayOfWeekDate","weeksOfMonth","weeks","week","onDayClicked","selectedDate","dayVariant","isSelectedDate","confirmNavigationDate","listeners","CalendarEvent","CalendarEvent2","useSinglePane","internalValue","reactive","useGranularityAdjustments","adjustDateForWeekly","endDate","min","max","start","end","isStartOutOfBounds","isEndOutOfBounds","adjustDateForMonthly","endOfMonth","formatDate","startDate","useRangePane","maxRange","granularity","clickedDate","setDates","direction","onMouseOver","_b","_c","_d","correctedDate","_sfc_main","CalendarMonth","n","conditionalClasses","onDateInput","calendarPosition","calendarIndex","calculateOffsetMonth","offsetMonth","monthOffset"],"mappings":";;;;;;;;;;;;AA0Be,SAAAA,EAAAC,GAAAC,GAAA;AACf,EAAAC,EAAA,GAAA,SAAA;AACA,MAAAC,IAAAC,EAAAJ,CAAA,GACAK,IAAAC,EAAAL,CAAA;AAEA,SAAA,MAAAI,CAAA,IACA,oBAAA,KAAA,GAAA,KAGAA,KAKAF,EAAA,QAAAA,EAAA,QAAA,IAAAE,CAAA,GACAF;AACA;AChBe,SAAAI,EAAAP,GAAAC,GAAA;AACf,EAAAC,EAAA,GAAA,SAAA;AACA,MAAAC,IAAAC,EAAAJ,CAAA,GACAK,IAAAC,EAAAL,CAAA;AAEA,MAAA,MAAAI,CAAA;AACA,WAAA,oBAAA,KAAA,GAAA;AAGA,MAAA,CAAAA;AAEA,WAAAF;AAGA,MAAAK,IAAAL,EAAA,QAAA,GASAM,IA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;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,19,20,21,22,23]}
@@ -1,115 +0,0 @@
1
- import { defineComponent as T, useSlots as I, ref as C, watch as h, computed as n } from "vue";
2
- import { B as H } from "./typography.CqQaHXhq.js";
3
- import { C as D, a as M } from "./chevron-up.B2uWhZf7.js";
4
- import { u as U } from "./use-expandable-content-height.GkjjbmPy.js";
5
- import { u as z } from "./use-has-slot.C9lQZ6nz.js";
6
- import { g as R } from "./unique-id.XFfoKuc2.js";
7
- import { u as O } from "./i18n.BQkEbtPM.js";
8
- import { o as W } from "./resize.Bqks3WUm.js";
9
- import { c as F, B as N } from "./button-actions.BQHr68sA.js";
10
- import { n as P } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
11
- import "../assets/card.css";
12
- var f = /* @__PURE__ */ ((o) => (o.PRIMARY = "primary", o.SECONDARY = "secondary", o))(f || {}), c = /* @__PURE__ */ ((o) => (o.DEFAULT = "default", o.SMALL = "small", o))(c || {});
13
- const Y = {
14
- "en-US": {
15
- showCardContent: "Show card content",
16
- hideCardContent: "Hide card content"
17
- }
18
- }, j = {
19
- i18n: { messages: Y },
20
- name: "bento-card"
21
- }, q = /* @__PURE__ */ T({
22
- ...j,
23
- props: {
24
- actions: { default: null },
25
- actionsLayout: { default: F.BUTTONS_END },
26
- background: { default: f.PRIMARY },
27
- closed: { type: Boolean, default: !1 },
28
- disabled: { type: Boolean, default: !1 },
29
- expandable: { type: Boolean, default: !1 },
30
- titleSize: { default: c.DEFAULT }
31
- },
32
- emits: ["click", "expanded"],
33
- setup(o, { emit: t }) {
34
- const a = o, { t: e } = O(), s = I(), d = z(s), i = C(null), x = R("card"), r = C(!a.closed);
35
- h(
36
- () => a.closed,
37
- (l) => {
38
- r.value = !l;
39
- }
40
- );
41
- const p = n(() => d("default") || d("description") || d("header")), g = n(() => d("default") || d("header")), b = n(
42
- () => {
43
- var l;
44
- return (d("content") || ((l = a.actions) == null ? void 0 : l.length)) && (!a.expandable || a.expandable && r.value);
45
- }
46
- ), y = n(() => a.expandable && !a.disabled ? 0 : -1), v = n(() => ({
47
- [`b-card--${a.background}`]: a.background,
48
- "b-card--expandable": a.expandable,
49
- "b-card--disabled": a.expandable && a.disabled
50
- })), m = n(() => ({
51
- "b-card__header--expandable": a.expandable,
52
- "b-card__header--without-body": !a.expandable && !b.value
53
- })), w = n(() => ({
54
- "b-card__toggle--small-text": a.titleSize === c.SMALL
55
- })), S = n(() => ({
56
- "b-card__body--expandable": a.expandable && d("content"),
57
- "b-card__body--without-header": !a.expandable && !p.value
58
- })), k = n(() => ({
59
- "b-card__content--without-header": !a.expandable && !p.value,
60
- "b-card__content--expandable": a.expandable
61
- })), B = n(() => {
62
- const l = !a.expandable && a.actions && !d("content");
63
- return {
64
- "b-card__actions--without-content": l,
65
- "b-card__actions--without-content-and-with-header": l && p.value
66
- };
67
- }), A = n(() => ({
68
- "b-card__title-wrapper--truncated": d("header")
69
- })), E = n(
70
- () => ({
71
- el: "div",
72
- variant: a.titleSize === c.DEFAULT ? "title" : "body",
73
- strongest: a.titleSize === c.SMALL,
74
- wide: a.titleSize === c.SMALL
75
- })
76
- ), { updateContentHeight: _, contentHeight: u } = U(i, r), L = n(
77
- () => a.expandable && u.value ? { "max-height": u.value } : {}
78
- );
79
- return h(
80
- () => i.value,
81
- () => {
82
- let l = null;
83
- !l && i.value && (l = W(i.value, () => {
84
- i.value && _();
85
- }));
86
- }
87
- ), { __sfc: !0, t: e, slots: s, hasSlot: d, props: a, emit: t, contentDiv: i, cardId: x, showContent: r, showHeader: p, showTitleWrapper: g, showCardBody: b, tabIndex: y, cardConditionalClasses: v, cardHeaderConditionalClasses: m, cardToggleConditionalClasses: w, cardBodyConditionalClasses: S, cardContentConditionalClasses: k, cardActionsConditionalClasses: B, cardTitleWrapperConditionalClasses: A, typography: E, updateContentHeight: _, contentHeight: u, contentMaxHeight: L, toggleExpansion: () => {
88
- !a.disabled && a.expandable && (r.value = !r.value, t("expanded", r.value), _());
89
- }, onClick: () => {
90
- a.disabled || t("click");
91
- }, BentoTypography: H, BentoButtonActions: N, ChevronDownIcon: D, ChevronUpIcon: M };
92
- }
93
- });
94
- var G = function() {
95
- var t = this, a = t._self._c, e = t._self._setupProxy;
96
- return a("div", { staticClass: "b-card", class: e.cardConditionalClasses, attrs: { "data-testid": "card" }, on: { click: e.onClick } }, [e.hasSlot("image") ? a("div", { staticClass: "b-card__image" }, [t._t("image")], 2) : t._e(), e.showHeader ? a("div", { staticClass: "b-card__header", class: e.cardHeaderConditionalClasses, attrs: { tabindex: e.tabIndex, "aria-controls": t.expandable ? e.cardId : null, "aria-expanded": t.expandable ? `${e.showContent}` : null, role: t.expandable ? "button" : null }, on: { click: e.toggleExpansion, keypress: [function(s) {
97
- return !s.type.indexOf("key") && t._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.toggleExpansion.apply(null, arguments);
98
- }, function(s) {
99
- return !s.type.indexOf("key") && t._k(s.keyCode, "space", 32, s.key, [" ", "Spacebar"]) ? null : e.toggleExpansion.apply(null, arguments);
100
- }] } }, [a("div", { staticClass: "b-card__header-wrapper" }, [e.showTitleWrapper ? a("div", { staticClass: "b-card__header-slot-wrapper" }, [a("div", { staticClass: "b-card__title-wrapper", class: e.cardTitleWrapperConditionalClasses }, [t.expandable ? a("div", { staticClass: "b-card__toggle", class: e.cardToggleConditionalClasses }, [e.showContent ? a(e.ChevronUpIcon, { attrs: { "svg-title": e.t("hideCardContent"), "aria-hidden": "true" } }) : a(e.ChevronDownIcon, { attrs: { "svg-title": e.t("showCardContent"), "aria-hidden": "true" } })], 1) : t._e(), e.hasSlot("default") ? a(e.BentoTypography, t._b({ staticClass: "b-card__title" }, "bento-typography", e.typography, !1), [t._t("default")], 2) : t._e()], 1), e.hasSlot("header") ? [t._t("header")] : t._e()], 2) : t._e(), e.hasSlot("description") ? a(e.BentoTypography, { staticClass: "b-card__description", attrs: { el: "div", variant: "body" } }, [t._t("description")], 2) : t._e()], 1)]) : t._e(), a("Transition", { attrs: { name: "b-card__animation" } }, [e.showCardBody ? a("div", { staticClass: "b-card__wrapper", style: e.contentMaxHeight }, [a("div", { ref: "contentDiv", staticClass: "b-card__body", class: e.cardBodyConditionalClasses, attrs: { id: t.expandable ? e.cardId : null } }, [e.hasSlot("content") ? a("div", { staticClass: "b-card__content", class: e.cardContentConditionalClasses }, [t._t("content")], 2) : t._e(), t.actions ? a("div", { staticClass: "b-card__actions", class: e.cardActionsConditionalClasses }, [a(e.BentoButtonActions, { attrs: { actions: t.actions, layout: t.actionsLayout } })], 1) : t._e()])]) : t._e()])], 1);
101
- }, J = [], K = /* @__PURE__ */ P(
102
- q,
103
- G,
104
- J,
105
- !1,
106
- null,
107
- "584546ff"
108
- );
109
- const la = K.exports;
110
- export {
111
- f as B,
112
- c as a,
113
- la as c
114
- };
115
- //# sourceMappingURL=card.ignL7-CH.js.map