@adyen/bento-vue3 1.3.0 → 1.4.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 (364) hide show
  1. package/dist/@types/components.d.ts +8 -4
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +8 -0
  3. package/dist/@types/packages/vue2/src/components/accordion/accordion.keys.d.ts +1 -1
  4. package/dist/@types/packages/vue2/src/components/accordion/accordion.types.d.ts +1 -24
  5. package/dist/@types/packages/vue2/src/components/accordion/accordion.vue.d.ts +17 -57
  6. package/dist/@types/packages/vue2/src/components/accordion/components/accordion-item.vue.d.ts +27 -29
  7. package/dist/@types/packages/vue2/src/components/accordion/index.d.ts +2 -3
  8. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +0 -4
  9. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -4
  10. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +136 -128
  11. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +3 -5
  12. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +3 -3
  13. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +46 -15
  15. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +2 -1
  16. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +6 -7
  17. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +4 -3
  18. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.types.d.ts +2 -1
  19. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +37 -11
  20. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +0 -2
  21. package/dist/@types/packages/vue2/src/components/currency/currency.vue.d.ts +0 -3
  22. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +3 -22
  23. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/components/data-grid-config-settings-column-row/data-grid-config-settings-column-row.vue.d.ts +0 -5
  24. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +0 -24
  25. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -0
  26. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +277 -16
  27. package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +2 -5
  28. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +0 -20
  29. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +0 -2
  30. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +0 -20
  31. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -6
  32. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +3 -3
  33. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +164 -104
  34. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
  35. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.types.d.ts +1 -1
  36. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +0 -2
  37. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types.d.ts +1 -1
  39. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.types.d.ts +1 -1
  40. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +7 -9
  41. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +27 -0
  42. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +76 -0
  43. package/dist/@types/packages/vue2/src/components/empty-state/index.d.ts +2 -0
  44. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +19 -25
  45. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +1 -1
  46. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -27
  47. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -4
  48. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-filter/date-filter.vue.d.ts +1 -1
  49. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -11
  50. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +53 -0
  51. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/index.d.ts +1 -0
  52. package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +1 -0
  53. package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +0 -2
  54. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +1 -1
  55. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +0 -2
  56. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +0 -2
  57. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +0 -2
  58. package/dist/@types/packages/vue2/src/components/focus-trap/focus-trap.vue.d.ts +7 -0
  59. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +0 -2
  60. package/dist/@types/packages/vue2/src/components/image/const.d.ts +1 -0
  61. package/dist/@types/packages/vue2/src/components/image/image.types.d.ts +19 -0
  62. package/dist/@types/packages/vue2/src/components/image/image.vue.d.ts +50 -0
  63. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  64. package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
  65. package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -0
  66. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +61 -58
  67. package/dist/@types/packages/vue2/src/components/internal/avatar/avatar.vue.d.ts +0 -3
  68. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +1 -4
  69. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +0 -5
  70. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue.d.ts +2 -2
  71. package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +0 -2
  72. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +0 -2
  73. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +0 -2
  74. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +0 -2
  75. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue.d.ts +0 -2
  76. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts +0 -2
  77. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -7
  78. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +4 -0
  79. package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +2 -5
  80. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +6 -31
  81. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -5
  82. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +14 -9
  83. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
  84. package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +4 -14
  85. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +7 -6
  86. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +0 -2
  87. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue.d.ts +0 -2
  88. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue.d.ts +0 -2
  89. package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +2 -1
  90. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +0 -2
  91. package/dist/@types/packages/vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue.d.ts +0 -2
  92. package/dist/@types/packages/vue2/src/components/popover/components/popover-title/popover-title.vue.d.ts +1 -2
  93. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +9 -9
  94. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -14
  95. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -6
  96. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.types.d.ts +2 -1
  97. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +4 -3
  98. package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +19 -390
  99. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +0 -3
  100. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +1 -0
  101. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +3 -1
  102. package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +2 -5
  103. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +0 -2
  104. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +2 -23
  105. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +2 -5
  106. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +2 -5
  107. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +2 -5
  108. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue.d.ts +1 -4
  109. package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +3 -1
  110. package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +1 -0
  111. package/dist/@types/packages/vue2/src/components/tabs/tabs.keys.d.ts +1 -0
  112. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +6 -2
  113. package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +4 -9
  114. package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +6 -9
  115. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +6 -10
  116. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +4 -10
  117. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +1 -0
  118. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +0 -5
  119. package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +4 -6
  120. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +24 -40
  121. package/dist/@types/packages/vue2/src/composables/use-default-slot-validator/use-default-slot-validator.d.ts +2 -1
  122. package/dist/@types/packages/vue2/src/composables/use-has-slot/use-has-slot.d.ts +8 -1
  123. package/dist/@types/packages/vue2/src/index.d.ts +3 -0
  124. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +9 -0
  125. package/dist/@types/packages/vue2/src/utils/ts/get-slot-text/get-slot-text.d.ts +1 -1
  126. package/dist/@types/packages/vue2/src/utils/ts/print-development-warning.d.ts +1 -0
  127. package/dist/accordion.js +104 -254
  128. package/dist/accordion.js.map +1 -1
  129. package/dist/alert.js +61 -64
  130. package/dist/alert.js.map +1 -1
  131. package/dist/assets/base-button.css +1 -1
  132. package/dist/assets/base-modal.css +1 -0
  133. package/dist/assets/button.css +1 -1
  134. package/dist/assets/calendar.css +1 -1
  135. package/dist/assets/checkbox.css +1 -1
  136. package/dist/assets/chevron-up.css +1 -0
  137. package/dist/assets/controls-group.css +1 -1
  138. package/dist/assets/copy.css +1 -1
  139. package/dist/assets/dropdown-default-textbox.css +1 -1
  140. package/dist/assets/dropdown.css +1 -1
  141. package/dist/assets/error-message.css +1 -1
  142. package/dist/assets/footer-actions.css +1 -1
  143. package/dist/assets/index.css +1 -1
  144. package/dist/assets/index10.css +1 -1
  145. package/dist/assets/index11.css +1 -1
  146. package/dist/assets/index12.css +1 -1
  147. package/dist/assets/index13.css +1 -1
  148. package/dist/assets/index14.css +1 -1
  149. package/dist/assets/index15.css +1 -1
  150. package/dist/assets/index16.css +1 -1
  151. package/dist/assets/index17.css +1 -1
  152. package/dist/assets/index18.css +1 -1
  153. package/dist/assets/index19.css +1 -1
  154. package/dist/assets/index2.css +1 -1
  155. package/dist/assets/index20.css +1 -1
  156. package/dist/assets/index21.css +1 -1
  157. package/dist/assets/index22.css +1 -1
  158. package/dist/assets/index24.css +1 -1
  159. package/dist/assets/index25.css +1 -1
  160. package/dist/assets/index26.css +1 -1
  161. package/dist/assets/index27.css +1 -1
  162. package/dist/assets/index28.css +1 -1
  163. package/dist/assets/index29.css +1 -1
  164. package/dist/assets/index3.css +1 -1
  165. package/dist/assets/index30.css +1 -1
  166. package/dist/assets/index31.css +1 -1
  167. package/dist/assets/index32.css +1 -1
  168. package/dist/assets/index33.css +1 -1
  169. package/dist/assets/index34.css +1 -1
  170. package/dist/assets/index35.css +1 -1
  171. package/dist/assets/index36.css +1 -1
  172. package/dist/assets/index37.css +1 -1
  173. package/dist/assets/index38.css +1 -1
  174. package/dist/assets/index39.css +1 -1
  175. package/dist/assets/index4.css +1 -1
  176. package/dist/assets/index40.css +1 -1
  177. package/dist/assets/index41.css +1 -1
  178. package/dist/assets/index42.css +1 -1
  179. package/dist/assets/index43.css +1 -0
  180. package/dist/assets/index5.css +1 -1
  181. package/dist/assets/index6.css +1 -1
  182. package/dist/assets/index7.css +1 -1
  183. package/dist/assets/index8.css +1 -1
  184. package/dist/assets/index9.css +1 -1
  185. package/dist/assets/listbox-option-tag.css +1 -1
  186. package/dist/assets/listbox.css +1 -1
  187. package/dist/assets/loading-button.css +1 -1
  188. package/dist/assets/tooltip.css +1 -1
  189. package/dist/avatar-image.js +1 -1
  190. package/dist/badge.js +2 -2
  191. package/dist/button.js +143 -12
  192. package/dist/button.js.map +1 -1
  193. package/dist/card.js +99 -94
  194. package/dist/card.js.map +1 -1
  195. package/dist/checkbox.js +40 -39
  196. package/dist/checkbox.js.map +1 -1
  197. package/dist/chunks/base-button.6d2843c2.js +108 -0
  198. package/dist/chunks/base-button.6d2843c2.js.map +1 -0
  199. package/dist/chunks/base-modal.3ccb9eb5.js +291 -0
  200. package/dist/chunks/base-modal.3ccb9eb5.js.map +1 -0
  201. package/dist/chunks/{button.e1c39f66.js → button.a8462029.js} +39 -42
  202. package/dist/chunks/button.a8462029.js.map +1 -0
  203. package/dist/chunks/{calendar.09b683b3.js → calendar.3f930683.js} +237 -240
  204. package/dist/chunks/calendar.3f930683.js.map +1 -0
  205. package/dist/chunks/checkbox.5e1e05ae.js +235 -0
  206. package/dist/chunks/checkbox.5e1e05ae.js.map +1 -0
  207. package/dist/chunks/{chevron-down.69bedf14.js → chevron-up.c03b58f8.js} +8 -8
  208. package/dist/chunks/chevron-up.c03b58f8.js.map +1 -0
  209. package/dist/chunks/controls-group.3b0dfb94.js +136 -0
  210. package/dist/chunks/controls-group.3b0dfb94.js.map +1 -0
  211. package/dist/chunks/{copy.2cf5e6c3.js → copy.1d14b783.js} +49 -50
  212. package/dist/chunks/copy.1d14b783.js.map +1 -0
  213. package/dist/chunks/{dropdown-default-textbox.203e747f.js → dropdown-default-textbox.a90e84f9.js} +88 -90
  214. package/dist/chunks/dropdown-default-textbox.a90e84f9.js.map +1 -0
  215. package/dist/chunks/{dropdown.8b415aac.js → dropdown.b798a82e.js} +348 -330
  216. package/dist/chunks/dropdown.b798a82e.js.map +1 -0
  217. package/dist/chunks/{error-message.ddfe8ea5.js → error-message.9acead25.js} +16 -16
  218. package/dist/chunks/error-message.9acead25.js.map +1 -0
  219. package/dist/chunks/footer-actions.9537d0df.js +111 -0
  220. package/dist/chunks/footer-actions.9537d0df.js.map +1 -0
  221. package/dist/chunks/get-slot-text.bead058f.js +9 -0
  222. package/dist/chunks/get-slot-text.bead058f.js.map +1 -0
  223. package/dist/chunks/{grid-layout.a30855ff.js → grid-layout.984317d7.js} +2 -2
  224. package/dist/chunks/{grid-layout.a30855ff.js.map → grid-layout.984317d7.js.map} +1 -1
  225. package/dist/chunks/index.228ecda0.js +101 -0
  226. package/dist/chunks/index.228ecda0.js.map +1 -0
  227. package/dist/chunks/index.89b00b94.js +124 -0
  228. package/dist/chunks/index.89b00b94.js.map +1 -0
  229. package/dist/chunks/{index.3da90517.js → index.9d8273fc.js} +38 -40
  230. package/dist/chunks/index.9d8273fc.js.map +1 -0
  231. package/dist/chunks/{index.c9225c3b.js → index.c2a80208.js} +195 -201
  232. package/dist/chunks/index.c2a80208.js.map +1 -0
  233. package/dist/chunks/{index.13949709.js → index.d26fdf71.js} +116 -113
  234. package/dist/chunks/{index.13949709.js.map → index.d26fdf71.js.map} +1 -1
  235. package/dist/chunks/{index.d27367cd.js → index.e84dbeae.js} +80 -83
  236. package/dist/chunks/{index.d27367cd.js.map → index.e84dbeae.js.map} +1 -1
  237. package/dist/chunks/listbox-option-tag.0c9c571e.js +129 -0
  238. package/dist/chunks/listbox-option-tag.0c9c571e.js.map +1 -0
  239. package/dist/chunks/{listbox.0c7c4e5e.js → listbox.6b52af1a.js} +315 -334
  240. package/dist/chunks/listbox.6b52af1a.js.map +1 -0
  241. package/dist/chunks/{loading-button.61d8ebe5.js → loading-button.081adbf3.js} +33 -33
  242. package/dist/chunks/loading-button.081adbf3.js.map +1 -0
  243. package/dist/chunks/tabs.keys.358742f2.js +7 -0
  244. package/dist/chunks/tabs.keys.358742f2.js.map +1 -0
  245. package/dist/chunks/{tooltip.835d9b52.js → tooltip.e4e34b86.js} +56 -59
  246. package/dist/chunks/tooltip.e4e34b86.js.map +1 -0
  247. package/dist/chunks/use-default-slot-validator.1169c221.js +16 -0
  248. package/dist/chunks/use-default-slot-validator.1169c221.js.map +1 -0
  249. package/dist/chunks/use-has-slot.9fac7123.js +16 -0
  250. package/dist/chunks/use-has-slot.9fac7123.js.map +1 -0
  251. package/dist/code-snippet.js +548 -463
  252. package/dist/code-snippet.js.map +1 -1
  253. package/dist/country.js +501 -505
  254. package/dist/country.js.map +1 -1
  255. package/dist/currency.js +38 -41
  256. package/dist/currency.js.map +1 -1
  257. package/dist/data-grid.js +837 -833
  258. package/dist/data-grid.js.map +1 -1
  259. package/dist/date-picker.js +83 -87
  260. package/dist/date-picker.js.map +1 -1
  261. package/dist/date-range-picker.js +2 -2
  262. package/dist/date.js +1 -1
  263. package/dist/dropdown.js +30 -32
  264. package/dist/dropdown.js.map +1 -1
  265. package/dist/empty-state.js +166 -0
  266. package/dist/empty-state.js.map +1 -0
  267. package/dist/filter-bar.js +986 -935
  268. package/dist/filter-bar.js.map +1 -1
  269. package/dist/focus-trap.js +1 -1
  270. package/dist/form-layout.js +72 -72
  271. package/dist/form-layout.js.map +1 -1
  272. package/dist/header.js +50 -52
  273. package/dist/header.js.map +1 -1
  274. package/dist/image.js +76 -0
  275. package/dist/image.js.map +1 -0
  276. package/dist/index.js +239 -232
  277. package/dist/index.js.map +1 -1
  278. package/dist/info-icon.js +2 -2
  279. package/dist/input-field.js +241 -269
  280. package/dist/input-field.js.map +1 -1
  281. package/dist/internal.js +7 -7
  282. package/dist/link.js +38 -36
  283. package/dist/link.js.map +1 -1
  284. package/dist/loading-indicator.js +1 -1
  285. package/dist/menu.js +131 -139
  286. package/dist/menu.js.map +1 -1
  287. package/dist/modal.js +121 -356
  288. package/dist/modal.js.map +1 -1
  289. package/dist/pagination.js +182 -185
  290. package/dist/pagination.js.map +1 -1
  291. package/dist/payment-method.js +19 -23
  292. package/dist/payment-method.js.map +1 -1
  293. package/dist/popover.js +56 -52
  294. package/dist/popover.js.map +1 -1
  295. package/dist/popper-container.js +36 -41
  296. package/dist/popper-container.js.map +1 -1
  297. package/dist/radio-group.js +112 -113
  298. package/dist/radio-group.js.map +1 -1
  299. package/dist/search-bar.js +77 -91
  300. package/dist/search-bar.js.map +1 -1
  301. package/dist/segmented-control.js +88 -75
  302. package/dist/segmented-control.js.map +1 -1
  303. package/dist/sidepanel.js +122 -121
  304. package/dist/sidepanel.js.map +1 -1
  305. package/dist/status.js +18 -21
  306. package/dist/status.js.map +1 -1
  307. package/dist/structured-list.js +1 -1
  308. package/dist/summary-grid.js +129 -162
  309. package/dist/summary-grid.js.map +1 -1
  310. package/dist/tabs.js +83 -75
  311. package/dist/tabs.js.map +1 -1
  312. package/dist/tag.js +32 -35
  313. package/dist/tag.js.map +1 -1
  314. package/dist/textarea.js +156 -155
  315. package/dist/textarea.js.map +1 -1
  316. package/dist/timeline.js +212 -213
  317. package/dist/timeline.js.map +1 -1
  318. package/dist/toast.js +68 -72
  319. package/dist/toast.js.map +1 -1
  320. package/dist/toggle.js +75 -73
  321. package/dist/toggle.js.map +1 -1
  322. package/dist/typography.js +1 -1
  323. package/dist/web-types.json +1 -1
  324. package/package.json +11 -10
  325. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.d.ts +0 -2
  326. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.types.d.ts +0 -8
  327. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/filter-bar-filter-button/filter-bar-filter-button.vue.d.ts +0 -58
  328. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/index.d.ts +0 -1
  329. package/dist/assets/button-actions.css +0 -1
  330. package/dist/assets/chevron-down.css +0 -1
  331. package/dist/chunks/base-button.20be08da.js +0 -111
  332. package/dist/chunks/base-button.20be08da.js.map +0 -1
  333. package/dist/chunks/button-actions.54e28e75.js +0 -124
  334. package/dist/chunks/button-actions.54e28e75.js.map +0 -1
  335. package/dist/chunks/button.e1c39f66.js.map +0 -1
  336. package/dist/chunks/calendar.09b683b3.js.map +0 -1
  337. package/dist/chunks/checkbox.a404069b.js +0 -226
  338. package/dist/chunks/checkbox.a404069b.js.map +0 -1
  339. package/dist/chunks/chevron-down.69bedf14.js.map +0 -1
  340. package/dist/chunks/controls-group.60fb2a86.js +0 -136
  341. package/dist/chunks/controls-group.60fb2a86.js.map +0 -1
  342. package/dist/chunks/copy.2cf5e6c3.js.map +0 -1
  343. package/dist/chunks/dropdown-default-textbox.203e747f.js.map +0 -1
  344. package/dist/chunks/dropdown.8b415aac.js.map +0 -1
  345. package/dist/chunks/error-message.ddfe8ea5.js.map +0 -1
  346. package/dist/chunks/footer-actions.0f640f87.js +0 -106
  347. package/dist/chunks/footer-actions.0f640f87.js.map +0 -1
  348. package/dist/chunks/get-slot-text.2db867f8.js +0 -9
  349. package/dist/chunks/get-slot-text.2db867f8.js.map +0 -1
  350. package/dist/chunks/index.222d29b0.js +0 -120
  351. package/dist/chunks/index.222d29b0.js.map +0 -1
  352. package/dist/chunks/index.3da90517.js.map +0 -1
  353. package/dist/chunks/index.aa34e363.js +0 -104
  354. package/dist/chunks/index.aa34e363.js.map +0 -1
  355. package/dist/chunks/index.c9225c3b.js.map +0 -1
  356. package/dist/chunks/listbox-option-tag.5ae8b79b.js +0 -133
  357. package/dist/chunks/listbox-option-tag.5ae8b79b.js.map +0 -1
  358. package/dist/chunks/listbox.0c7c4e5e.js.map +0 -1
  359. package/dist/chunks/loading-button.61d8ebe5.js.map +0 -1
  360. package/dist/chunks/tooltip.835d9b52.js.map +0 -1
  361. package/dist/chunks/use-default-slot-validator.83d977a1.js +0 -11
  362. package/dist/chunks/use-default-slot-validator.83d977a1.js.map +0 -1
  363. package/dist/chunks/use-has-slot.068222e6.js +0 -5
  364. package/dist/chunks/use-has-slot.068222e6.js.map +0 -1
@@ -1,33 +1,33 @@
1
- import { ref as g, computed as I, defineComponent as X, toRef as _, watch as Z, nextTick as A, resolveComponent as v, resolveDirective as x, withDirectives as ee, openBlock as l, createElementBlock as U, withKeys as M, createVNode as S, withCtx as y, createTextVNode as C, toDisplayString as B, createBlock as c, createCommentVNode as u, createElementVNode as ae, normalizeClass as te } from "vue";
1
+ import { ref as I, computed as g, defineComponent as X, toRef as U, watch as Z, nextTick as M, resolveComponent as v, resolveDirective as x, withDirectives as ee, openBlock as l, createElementBlock as $, withKeys as h, createVNode as T, withCtx as y, createTextVNode as P, toDisplayString as E, createBlock as c, createCommentVNode as u, createElementVNode as ae, normalizeClass as te } from "vue";
2
2
  import { B as re } from "./chunks/directive.0408e565.js";
3
- import { BentoPopover as oe, BentoPopoverPositions as ne } from "./popover.js";
3
+ import { BentoPopover as ne } from "./popover.js";
4
4
  import { g as k } from "./chunks/unique-id.a2a2b458.js";
5
- import { B as le, a as ie, b as se } from "./chunks/index.222d29b0.js";
5
+ import { B as oe } from "./chunks/index.89b00b94.js";
6
6
  import { u as K } from "./chunks/i18n.6c402773.js";
7
- import { D as $, v as de, f as ue } from "./chunks/date-input.9186a0bf.js";
8
- import { f as q } from "./chunks/index.d27367cd.js";
9
- import { e as w, d as pe, f as ce } from "./chunks/index.f55fdc32.js";
10
- import { d as fe } from "./chunks/debounce.f8d92e44.js";
11
- import { u as De } from "./chunks/use-form-layout-loading.d03e5d48.js";
12
- import { C as N } from "./chunks/calendar.09b683b3.js";
13
- import { b as je } from "./chunks/calendar.09b683b3.js";
14
- import { c as me } from "./chunks/dropdown-default-textbox.203e747f.js";
15
- import { E as be } from "./chunks/error-message.ddfe8ea5.js";
16
- import { _ as ve } from "./chunks/_plugin-vue_export-helper.dad06003.js";
17
- import "./assets/index27.css";
7
+ import { D as A, v as le, f as ie } from "./chunks/date-input.9186a0bf.js";
8
+ import { f as q } from "./chunks/index.e84dbeae.js";
9
+ import { e as S, d as se, f as de } from "./chunks/index.f55fdc32.js";
10
+ import { d as ue } from "./chunks/debounce.f8d92e44.js";
11
+ import { u as pe } from "./chunks/use-form-layout-loading.d03e5d48.js";
12
+ import { C as _ } from "./chunks/calendar.3f930683.js";
13
+ import { b as Le } from "./chunks/calendar.3f930683.js";
14
+ import { c as ce } from "./chunks/dropdown-default-textbox.a90e84f9.js";
15
+ import { E as fe } from "./chunks/error-message.9acead25.js";
16
+ import { _ as De } from "./chunks/_plugin-vue_export-helper.dad06003.js";
17
+ import "./assets/index24.css";
18
18
  var p = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(p || {});
19
- const ye = ({ datePickerValue: e, isDateIncorrect: t }) => {
20
- const { locale: i, t: f } = K(), D = { de: pe, enUS: w, fr: ce }, s = g(null);
19
+ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
20
+ const { locale: i, t: f } = K(), D = { de: se, enUS: S, fr: de }, s = I(null);
21
21
  return {
22
22
  // Values
23
- dateDisplayValue: I(() => t.value ? s.value : e.value ? q(e.value, $.FULL_DATE, {
24
- locale: D[i.value.substring(0, 2)] || w
23
+ dateDisplayValue: g(() => t.value ? s.value : e.value ? q(e.value, A.FULL_DATE, {
24
+ locale: D[i.value.substring(0, 2)] || S
25
25
  }) : f("selectDate")),
26
26
  textInputValue: s,
27
27
  // Methods
28
28
  formatTextInputDisplayValue: (d = e.value) => {
29
- t.value || (s.value = d ? q(d, $.NUMERIC_DATE_YEAR_FIRST, {
30
- locale: D[i.value.substring(0, 2)] || w
29
+ t.value || (s.value = d ? q(d, A.NUMERIC_DATE_YEAR_FIRST, {
30
+ locale: D[i.value.substring(0, 2)] || S
31
31
  }) : null);
32
32
  }
33
33
  };
@@ -41,15 +41,15 @@ const ye = ({ datePickerValue: e, isDateIncorrect: t }) => {
41
41
  selectedDateIsNotAvailable: "Selected date is not available",
42
42
  datePicker: "Date picker"
43
43
  }
44
- }, ke = 1e3, ge = X({
44
+ }, be = 1e3, ve = X({
45
45
  i18n: { messages: F },
46
46
  name: "bento-date-picker",
47
47
  components: {
48
- BentoTypography: le,
49
- BentoPopover: oe,
50
- Calendar: N,
51
- ErrorMessage: be,
52
- DropdownInputDefault: me
48
+ BentoTypography: oe,
49
+ BentoPopover: ne,
50
+ Calendar: _,
51
+ ErrorMessage: fe,
52
+ DropdownInputDefault: ce
53
53
  },
54
54
  directives: { BentoClickOutsideDirective: re },
55
55
  props: {
@@ -68,11 +68,11 @@ const ye = ({ datePickerValue: e, isDateIncorrect: t }) => {
68
68
  /**
69
69
  * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
70
70
  */
71
- firstDayOfWeek: N.props.firstDayOfWeek,
71
+ firstDayOfWeek: _.props.firstDayOfWeek,
72
72
  /**
73
73
  * Indicate if a date should be disabled or not
74
74
  */
75
- isDateDisabled: N.props.isDateDisabled,
75
+ isDateDisabled: _.props.isDateDisabled,
76
76
  /**
77
77
  * Text that is displayed as a label above the element.
78
78
  */
@@ -96,122 +96,118 @@ const ye = ({ datePickerValue: e, isDateIncorrect: t }) => {
96
96
  },
97
97
  emits: [p.INPUT],
98
98
  setup(e, { emit: t }) {
99
- const { t: i } = K({ messages: F }), f = k("bento-date-picker-container"), D = k("bento-date-picker-label"), s = k("bento-date-picker-description"), n = k("bento-date-picker-error"), m = k("bento-date-picker-date-error"), d = I(() => e.label || i("datePicker", { name: f })), P = g(null), E = g(null), r = g(!1), o = g(!1), { isReadOnly: L } = De(_(e, "readonly"));
99
+ const { t: i } = K({ messages: F }), f = k("bento-date-picker-container"), D = k("bento-date-picker-label"), s = k("bento-date-picker-description"), o = k("bento-date-picker-error"), m = k("bento-date-picker-date-error"), d = g(() => e.label || i("datePicker", { name: f })), C = I(null), B = I(null), r = I(!1), n = I(!1), { isReadOnly: L } = pe(U(e, "readonly"));
100
100
  Z(
101
101
  () => e.disabled,
102
102
  (a) => {
103
- a && o.value && (o.value = !1);
103
+ a && n.value && (n.value = !1);
104
104
  }
105
105
  );
106
- const { dateDisplayValue: Y, textInputValue: b, formatTextInputDisplayValue: V } = ye({
107
- datePickerValue: _(e, "value"),
106
+ const { dateDisplayValue: Y, textInputValue: b, formatTextInputDisplayValue: V } = me({
107
+ datePickerValue: U(e, "value"),
108
108
  isDateIncorrect: r
109
- }), T = I(() => e.isDateDisabled && e.isDateDisabled(new Date(b.value)) ? i("selectedDateIsNotAvailable") : r.value ? i("provideDateInAFormat") : null), W = I(() => ({
110
- "b-date-picker__description--error": e.errorMessage || T.value
111
- })), j = I(
112
- () => `${e.description ? s : ""} ${e.errorMessage ? n : ""} ${T.value ? m : ""}`.trim() || null
109
+ }), O = g(() => e.isDateDisabled && e.isDateDisabled(new Date(b.value)) ? i("selectedDateIsNotAvailable") : r.value ? i("provideDateInAFormat") : null), W = g(() => ({
110
+ "b-date-picker__description--error": e.errorMessage || O.value
111
+ })), j = g(
112
+ () => `${e.description ? s : ""} ${e.errorMessage ? o : ""} ${O.value ? m : ""}`.trim() || null
113
113
  ), z = (a) => e.isDateDisabled ? !e.isDateDisabled(a) : !0, R = () => {
114
- o.value = !1;
115
- }, h = () => {
116
- o.value = !0, V();
114
+ n.value = !1;
115
+ }, N = () => {
116
+ n.value = !0, V();
117
117
  }, G = (a) => {
118
118
  r.value = !1, R(), t(p.INPUT, a);
119
119
  }, H = async () => {
120
120
  r.value && (r.value = !1, b.value = null), t(p.INPUT, null);
121
121
  }, J = (a) => {
122
- de(a);
123
- }, Q = fe((a) => {
122
+ le(a);
123
+ }, Q = ue((a) => {
124
124
  if (a.length < 10)
125
125
  return;
126
126
  /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && z(new Date(a)) ? (r.value = !1, t(p.INPUT, new Date(a))) : a && (r.value = !0, t(p.INPUT, null));
127
- }, ke);
127
+ }, be);
128
128
  return {
129
129
  // Refs
130
- inputContainerRef: E,
131
- calendarContainerRef: P,
130
+ inputContainerRef: B,
131
+ calendarContainerRef: C,
132
132
  // Values,
133
133
  dateDisplayValue: Y,
134
134
  datePickerContainerId: f,
135
135
  descriptionConditionalClasses: W,
136
136
  isDateIncorrect: r,
137
- isDatePickerOpen: o,
137
+ isDatePickerOpen: n,
138
138
  isReadOnly: L,
139
- dateErrorText: T,
139
+ dateErrorText: O,
140
140
  labelId: D,
141
141
  descriptionId: s,
142
- errorId: n,
142
+ errorId: o,
143
143
  dateErrorId: m,
144
144
  popoverAriaLabel: d,
145
145
  ariaDescribedBy: j,
146
146
  textInputValue: b,
147
- // Enums
148
- BentoTypographyElement: ie,
149
- BentoTypographyVariant: se,
150
- BentoPopoverPositions: ne,
151
147
  // Events
152
148
  closeDatePicker: R,
153
149
  clearDatePickerValue: H,
154
150
  onDateSelected: G,
155
- openDatePicker: h,
151
+ openDatePicker: N,
156
152
  onDateKeyDown: J,
157
153
  onDateInputChange: (a) => {
158
- b.value = ue(a), Q(b.value);
154
+ b.value = ie(a), Q(b.value);
159
155
  },
160
156
  // Keyboard navigation
161
157
  onSpaceBarOrEnter: async (a) => {
162
- var O;
163
- o.value || (a.preventDefault(), h(), await A(), e.value || (V(/* @__PURE__ */ new Date()), t(p.INPUT, /* @__PURE__ */ new Date()), await A()), (O = P.value) == null || O.$refs.calendarRef[0].focusOnDate(e.value));
158
+ var w;
159
+ n.value || (a.preventDefault(), N(), await M(), e.value || (V(/* @__PURE__ */ new Date()), t(p.INPUT, /* @__PURE__ */ new Date()), await M()), (w = C.value) == null || w.$refs.calendarRef[0].focusOnDate(e.value));
164
160
  }
165
161
  };
166
162
  }
167
163
  });
168
- const Ie = ["id"];
169
- function Pe(e, t, i, f, D, s) {
170
- const n = v("bento-typography"), m = v("dropdown-input-default"), d = v("error-message"), P = v("calendar"), E = v("bento-popover"), r = x("bento-click-outside-directive");
171
- return ee((l(), U("div", {
164
+ const ye = ["id"];
165
+ function ke(e, t, i, f, D, s) {
166
+ const o = v("bento-typography"), m = v("dropdown-input-default"), d = v("error-message"), C = v("calendar"), B = v("bento-popover"), r = x("bento-click-outside-directive");
167
+ return ee((l(), $("div", {
172
168
  class: "b-date-picker",
173
169
  onKeydownCapture: [
174
- t[0] || (t[0] = M((...o) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...o), ["space"])),
175
- t[1] || (t[1] = M((...o) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...o), ["enter"]))
170
+ t[0] || (t[0] = h((...n) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...n), ["space"])),
171
+ t[1] || (t[1] = h((...n) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...n), ["enter"]))
176
172
  ]
177
173
  }, [
178
- e.label ? (l(), U("div", {
174
+ e.label ? (l(), $("div", {
179
175
  key: 0,
180
176
  id: e.labelId,
181
177
  class: "b-date-picker__label"
182
178
  }, [
183
- S(n, {
184
- el: e.BentoTypographyElement.SPAN,
179
+ T(o, {
180
+ el: "span",
185
181
  stronger: ""
186
182
  }, {
187
183
  default: y(() => [
188
- C(B(e.label), 1)
184
+ P(E(e.label), 1)
189
185
  ]),
190
186
  _: 1
191
- }, 8, ["el"]),
192
- e.optional ? (l(), c(n, {
187
+ }),
188
+ e.optional ? (l(), c(o, {
193
189
  key: 0,
194
190
  class: "b-date-picker__label-requirement",
195
- el: e.BentoTypographyElement.SPAN
191
+ el: "span"
196
192
  }, {
197
193
  default: y(() => [
198
- C(" (" + B(e.$t("optional")) + ") ", 1)
194
+ P(" (" + E(e.$t("optional")) + ") ", 1)
199
195
  ]),
200
196
  _: 1
201
- }, 8, ["el"])) : u("", !0),
202
- e.required ? (l(), c(n, {
197
+ })) : u("", !0),
198
+ e.required ? (l(), c(o, {
203
199
  key: 1,
204
200
  class: "b-date-picker__label-requirement",
205
- el: e.BentoTypographyElement.SPAN
201
+ el: "span"
206
202
  }, {
207
203
  default: y(() => [
208
- C(" (" + B(e.$t("required")) + ") ", 1)
204
+ P(" (" + E(e.$t("required")) + ") ", 1)
209
205
  ]),
210
206
  _: 1
211
- }, 8, ["el"])) : u("", !0)
212
- ], 8, Ie)) : u("", !0),
207
+ })) : u("", !0)
208
+ ], 8, ye)) : u("", !0),
213
209
  ae("div", null, [
214
- S(m, {
210
+ T(m, {
215
211
  ref: "inputContainerRef",
216
212
  ariaControls: e.datePickerContainerId,
217
213
  ariaExpanded: e.isDatePickerOpen,
@@ -244,17 +240,17 @@ function Pe(e, t, i, f, D, s) {
244
240
  "error-message": e.errorMessage,
245
241
  class: "b-date-picker__error-message"
246
242
  }, null, 8, ["id", "error-message"])) : u("", !0),
247
- e.description ? (l(), c(n, {
243
+ e.description ? (l(), c(o, {
248
244
  key: 3,
249
245
  class: te(["b-date-picker__description", e.descriptionConditionalClasses]),
250
- el: e.BentoTypographyElement.SPAN
246
+ el: "span"
251
247
  }, {
252
248
  default: y(() => [
253
- C(B(e.description), 1)
249
+ P(E(e.description), 1)
254
250
  ]),
255
251
  _: 1
256
- }, 8, ["class", "el"])) : u("", !0),
257
- e.inputContainerRef ? (l(), c(E, {
252
+ }, 8, ["class"])) : u("", !0),
253
+ e.inputContainerRef ? (l(), c(B, {
258
254
  key: 4,
259
255
  id: e.datePickerContainerId,
260
256
  class: "b-date-picker__container",
@@ -264,11 +260,11 @@ function Pe(e, t, i, f, D, s) {
264
260
  "disable-focus-trap": !0,
265
261
  "aria-label": e.popoverAriaLabel,
266
262
  "aria-modal": !0,
267
- position: e.BentoPopoverPositions.BOTTOM_START,
263
+ position: "bottom-start",
268
264
  "fit-content": ""
269
265
  }, {
270
266
  default: y(() => [
271
- S(P, {
267
+ T(C, {
272
268
  ref: "calendarContainerRef",
273
269
  "first-day-of-week": e.firstDayOfWeek,
274
270
  "is-date-disabled": e.isDateDisabled,
@@ -278,15 +274,15 @@ function Pe(e, t, i, f, D, s) {
278
274
  }, null, 8, ["first-day-of-week", "is-date-disabled", "value", "onInput"])
279
275
  ]),
280
276
  _: 1
281
- }, 8, ["id", "open", "target-element", "aria-label", "position"])) : u("", !0)
277
+ }, 8, ["id", "open", "target-element", "aria-label"])) : u("", !0)
282
278
  ], 32)), [
283
279
  [r, e.closeDatePicker]
284
280
  ]);
285
281
  }
286
- const Ke = /* @__PURE__ */ ve(ge, [["render", Pe], ["__scopeId", "data-v-58b84747"]]);
282
+ const Ae = /* @__PURE__ */ De(ve, [["render", ke], ["__scopeId", "data-v-5947eaf2"]]);
287
283
  export {
288
- Ke as BentoDatePicker,
284
+ Ae as BentoDatePicker,
289
285
  p as BentoDatePickerEvent,
290
- je as BentoDatePickerFirstDayOfWeek
286
+ Le as BentoDatePickerFirstDayOfWeek
291
287
  };
292
288
  //# sourceMappingURL=date-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["export { CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n CalendarSingleDateValue as BentoDatePickerValue,\n} from '@/internal';\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n","import { computed, ref } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport format from 'date-fns/format';\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({ datePickerValue, isDateIncorrect }) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const textInputValue = ref(null);\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return t('selectDate') as string;\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" if there's a valid date selected\n return format(datePickerValue.value as Date, DateFormat.FULL_DATE, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {DATE} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n textInputValue.value = dateToFormat\n ? format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <div v-if=\"label\" :id=\"labelId\" class=\"b-date-picker__label\">\n <bento-typography :el=\"BentoTypographyElement.SPAN\" stronger>{{ label }}</bento-typography>\n <bento-typography\n v-if=\"optional\"\n class=\"b-date-picker__label-requirement\"\n :el=\"BentoTypographyElement.SPAN\"\n >\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography\n v-if=\"required\"\n class=\"b-date-picker__label-requirement\"\n :el=\"BentoTypographyElement.SPAN\"\n >\n ({{ $t('required') }})\n </bento-typography>\n </div>\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n :el=\"BentoTypographyElement.SPAN\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n :position=\"BentoPopoverPositions.BOTTOM_START\"\n fit-content\n >\n <calendar\n ref=\"calendarContainerRef\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, Ref, ref, toRef, watch } from 'vue';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\n import { Calendar, ErrorMessage } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '../typography';\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-picker',\n components: {\n BentoTypography,\n BentoPopover,\n Calendar,\n ErrorMessage,\n DropdownInputDefault,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, 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: Calendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Selected date\n */\n value: { type: [Date, Object] as PropType<BentoDatePickerValue>, default: null },\n },\n emits: [BentoDatePickerEvent.INPUT],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n });\n\n const dateErrorText = computed(() => {\n if (props.isDateDisabled && props.isDateDisabled(new Date(textInputValue.value))) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = debounce((stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n }, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n validateDate(textInputValue.value);\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n\n // Wait for new value to be set with the emit\n await nextTick();\n }\n\n // Focus on date\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(props.value);\n };\n\n return {\n // Refs\n inputContainerRef,\n calendarContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDatePickerOpen,\n isReadOnly,\n dateErrorText,\n labelId,\n descriptionId,\n errorId,\n dateErrorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputValue,\n\n // Enums\n BentoTypographyElement,\n BentoTypographyVariant,\n BentoPopoverPositions,\n\n // Events\n closeDatePicker,\n clearDatePickerValue,\n onDateSelected,\n openDatePicker,\n onDateKeyDown,\n onDateInputChange,\n\n // Keyboard navigation\n onSpaceBarOrEnter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["BentoDatePickerEvent","BentoDatePickerEvent2","useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","de","enUS","fr","textInputValue","ref","computed","format","DateFormat","dateToFormat","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","BentoClickOutsideDirective","props","emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","date","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","debounce","stringDate","BentoTypographyElement","BentoTypographyVariant","BentoPopoverPositions","formatDateInputValue","nextTick","_a","_ctx","createCommentVNode","openBlock","createBlock","_component_bento_typography","_hoisted_1","createElementVNode","createVNode","_component_dropdown_input_default","_component_error_message","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,QAAA,SADQA,IAAAD,KAAA,CAAA,CAAA;ACML,MAAAE,KAAA,CAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,MAAA;AACH,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAA,EAAA,IAAAC,IAAA,MAAAC,GAAA,IAAAC,GAAA,GAEAC,IAAAC,EAAA,IAAA;AAoCA,SAAA;AAAA;AAAA,IAAO,kBAlCPC,EAAA,MAEIV,EAAA,QACIQ,EAAA,QAIJT,EAAA,QAKAY,EAAAZ,EAAA,OAAAa,EAAA,WAAA;AAAA,MAAmE,QAAAR,EAAAH,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAK;AAAA,IACd,CAAA,IALjDJ,EAAA,YAAA,CAMH;AAAA,IAsBD,gBAAAM;AAAA;AAAA,IACA,6BAhBJ,CAAAK,IAAAd,EAAA,UAAA;AAEI,MAAAC,EAAA,UAIAQ,EAAA,QAAAK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M,GAAA;AAAA,UACgB,KAAA;AAAA,UACnB,qBAAAb,EAAA;AAAA,UACmB,oBAAAA,EAAA;AAAA,UACP,oBAAA;AAAA,UACL,OAAAA,EAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["export { CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n CalendarSingleDateValue as BentoDatePickerValue,\n} from '@/internal';\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n","import { computed, ref } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport format from 'date-fns/format';\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({ datePickerValue, isDateIncorrect }) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const textInputValue = ref(null);\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return t('selectDate') as string;\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" if there's a valid date selected\n return format(datePickerValue.value as Date, DateFormat.FULL_DATE, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {DATE} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n textInputValue.value = dateToFormat\n ? format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <div v-if=\"label\" :id=\"labelId\" class=\"b-date-picker__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n >\n <calendar\n ref=\"calendarContainerRef\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, Ref, ref, toRef, watch } from 'vue';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\n import { Calendar, ErrorMessage } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { BentoPopover } from '@/components/popover';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoTypography } from '../typography';\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-picker',\n components: {\n BentoTypography,\n BentoPopover,\n Calendar,\n ErrorMessage,\n DropdownInputDefault,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, 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: Calendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Selected date\n */\n value: { type: [Date, Object] as PropType<BentoDatePickerValue>, default: null },\n },\n emits: [BentoDatePickerEvent.INPUT],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n });\n\n const dateErrorText = computed(() => {\n if (props.isDateDisabled && props.isDateDisabled(new Date(textInputValue.value))) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = debounce((stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n }, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n validateDate(textInputValue.value);\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n\n // Wait for new value to be set with the emit\n await nextTick();\n }\n\n // Focus on date\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(props.value);\n };\n\n return {\n // Refs\n inputContainerRef,\n calendarContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDatePickerOpen,\n isReadOnly,\n dateErrorText,\n labelId,\n descriptionId,\n errorId,\n dateErrorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputValue,\n\n // Events\n closeDatePicker,\n clearDatePickerValue,\n onDateSelected,\n openDatePicker,\n onDateKeyDown,\n onDateInputChange,\n\n // Keyboard navigation\n onSpaceBarOrEnter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["BentoDatePickerEvent","BentoDatePickerEvent2","useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","de","enUS","fr","textInputValue","ref","computed","format","DateFormat","dateToFormat","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","BentoClickOutsideDirective","props","emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","date","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","debounce","stringDate","formatDateInputValue","nextTick","_a","_ctx","createCommentVNode","openBlock","createBlock","_component_bento_typography","_hoisted_1","createElementVNode","createVNode","_component_dropdown_input_default","_component_error_message","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,QAAA,SADQA,IAAAD,KAAA,CAAA,CAAA;ACML,MAAAE,KAAA,CAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,MAAA;AACH,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAA,EAAA,IAAAC,IAAA,MAAAC,GAAA,IAAAC,GAAA,GAEAC,IAAAC,EAAA,IAAA;AAoCA,SAAA;AAAA;AAAA,IAAO,kBAlCPC,EAAA,MAEIV,EAAA,QACIQ,EAAA,QAIJT,EAAA,QAKAY,EAAAZ,EAAA,OAAAa,EAAA,WAAA;AAAA,MAAmE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AAA,UACP,oBAAA;AAAA,UACL,OAAAA,EAAA;AAAA;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import { B as t, a as r } from "./chunks/index.c9225c3b.js";
2
- import { b as o } from "./chunks/calendar.09b683b3.js";
1
+ import { B as t, a as r } from "./chunks/index.c2a80208.js";
2
+ import { b as o } from "./chunks/calendar.3f930683.js";
3
3
  export {
4
4
  t as BentoDateRangePicker,
5
5
  r as BentoDateRangePickerEvent,
package/dist/date.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as e, a as o } from "./chunks/index.d27367cd.js";
1
+ import { B as e, a as o } from "./chunks/index.e84dbeae.js";
2
2
  export {
3
3
  e as BentoDate,
4
4
  o as BentoDateFormat
package/dist/dropdown.js CHANGED
@@ -1,17 +1,17 @@
1
- import { B as d } from "./chunks/dropdown.8b415aac.js";
2
- import { defineComponent as _, computed as I, resolveComponent as u, openBlock as l, createElementBlock as $, createVNode as m, mergeProps as f, withCtx as y, toRefs as g, provide as C, createBlock as v } from "vue";
3
- import { B as h, L as B } from "./chunks/listbox-option-tag.5ae8b79b.js";
1
+ import { B as d } from "./chunks/dropdown.b798a82e.js";
2
+ import { defineComponent as _, computed as I, resolveComponent as u, openBlock as l, createElementBlock as b, createVNode as m, mergeProps as f, withCtx as y, toRefs as g, provide as h, createBlock as v } from "vue";
3
+ import { B as C, L as B } from "./chunks/listbox-option-tag.0c9c571e.js";
4
4
  import { _ as w } from "./chunks/_plugin-vue_export-helper.dad06003.js";
5
- import { BentoCountry as D, BentoCountryVariant as b } from "./country.js";
5
+ import { BentoCountry as D, BentoCountryVariant as $ } from "./country.js";
6
6
  import { u as A } from "./chunks/useCountryItems.e83ef8f0.js";
7
- import { d as M } from "./chunks/index.222d29b0.js";
8
- import { BentoPaymentMethod as T } from "./payment-method.js";
9
- import "./assets/index31.css";
10
- const k = _({
7
+ import { d as k } from "./chunks/index.89b00b94.js";
8
+ import { BentoPaymentMethod as M } from "./payment-method.js";
9
+ import "./assets/index12.css";
10
+ const T = _({
11
11
  name: "bento-dropdown-avatar",
12
12
  components: {
13
13
  BentoDropdown: d,
14
- BentoAvatar: h
14
+ BentoAvatar: C
15
15
  },
16
16
  props: {
17
17
  ...d.props,
@@ -42,7 +42,7 @@ const k = _({
42
42
  });
43
43
  function O(o, e, p, r, t, a) {
44
44
  const n = u("bento-avatar"), s = u("bento-dropdown");
45
- return l(), $("div", null, [
45
+ return l(), b("div", null, [
46
46
  m(s, f(o.$props, {
47
47
  items: o.dropdownItems,
48
48
  onInput: o.onInput
@@ -57,7 +57,7 @@ function O(o, e, p, r, t, a) {
57
57
  }, 16, ["items", "onInput"])
58
58
  ]);
59
59
  }
60
- const K = /* @__PURE__ */ w(k, [["render", O]]), P = _({
60
+ const K = /* @__PURE__ */ w(T, [["render", O]]), P = _({
61
61
  name: "b-dropdown-country",
62
62
  components: {
63
63
  BentoDropdown: d,
@@ -69,7 +69,7 @@ const K = /* @__PURE__ */ w(k, [["render", O]]), P = _({
69
69
  * The option elements to populate the country dropdown with.
70
70
  * It must be an array of {@see BentoCountryListboxOptions }
71
71
  * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels
72
- * * @property {BentoCountryCode} value.value - Country code of the option
72
+ * * @property {BentoCountryCode | string} value.value - Country code of the option
73
73
  */
74
74
  items: {
75
75
  type: Array,
@@ -81,14 +81,14 @@ const K = /* @__PURE__ */ w(k, [["render", O]]), P = _({
81
81
  */
82
82
  variant: {
83
83
  type: String,
84
- default: b.CUSTOM,
85
- validator: (o) => Object.values(b).includes(o)
84
+ default: $.CUSTOM,
85
+ validator: (o) => Object.values($).includes(o)
86
86
  }
87
87
  },
88
88
  emits: ["input"],
89
89
  setup(o, { emit: e }) {
90
90
  const { variant: p, items: r } = g(o), t = (n) => e("input", n), a = A(p, r);
91
- return C("skipBentoCountryDeprecateMessage", !0), (p.value === "custom" || r.value.some((n) => n.label)) && M(
91
+ return h("skipBentoCountryDeprecateMessage", !0), (p.value === "custom" || r.value.some((n) => n.label)) && k(
92
92
  'BentoDropdownCountry "custom" variant and "items" prop "label" key',
93
93
  "Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels",
94
94
  "2.0.0"
@@ -96,15 +96,13 @@ const K = /* @__PURE__ */ w(k, [["render", O]]), P = _({
96
96
  // Values
97
97
  countryItems: a,
98
98
  // Methods
99
- onInput: t,
100
- // Enums
101
- BentoCountryVariant: b
99
+ onInput: t
102
100
  };
103
101
  }
104
102
  });
105
- function S(o, e, p, r, t, a) {
103
+ function L(o, e, p, r, t, a) {
106
104
  const n = u("bento-country"), s = u("bento-dropdown");
107
- return l(), $("div", null, [
105
+ return l(), b("div", null, [
108
106
  m(s, f(o.$props, {
109
107
  items: o.countryItems,
110
108
  onInput: o.onInput
@@ -113,14 +111,14 @@ function S(o, e, p, r, t, a) {
113
111
  m(n, {
114
112
  code: c,
115
113
  label: i,
116
- variant: o.BentoCountryVariant.CUSTOM
117
- }, null, 8, ["code", "label", "variant"])
114
+ variant: "custom"
115
+ }, null, 8, ["code", "label"])
118
116
  ]),
119
117
  _: 1
120
118
  }, 16, ["items", "onInput"])
121
119
  ]);
122
120
  }
123
- const Q = /* @__PURE__ */ w(P, [["render", S]]), U = _({
121
+ const Q = /* @__PURE__ */ w(P, [["render", L]]), R = _({
124
122
  name: "b-dropdown-currency",
125
123
  components: {
126
124
  BentoDropdown: d,
@@ -147,7 +145,7 @@ const Q = /* @__PURE__ */ w(P, [["render", S]]), U = _({
147
145
  };
148
146
  }
149
147
  });
150
- function V(o, e, p, r, t, a) {
148
+ function S(o, e, p, r, t, a) {
151
149
  const n = u("listbox-option-tag"), s = u("bento-dropdown");
152
150
  return l(), v(s, f(o.$props, { onInput: o.onInput }), {
153
151
  default: y((c) => [
@@ -156,11 +154,11 @@ function V(o, e, p, r, t, a) {
156
154
  _: 1
157
155
  }, 16, ["onInput"]);
158
156
  }
159
- const W = /* @__PURE__ */ w(U, [["render", V]]), L = _({
157
+ const W = /* @__PURE__ */ w(R, [["render", S]]), U = _({
160
158
  name: "bento-dropdown-payment-method",
161
159
  components: {
162
160
  BentoDropdown: d,
163
- BentoPaymentMethod: T
161
+ BentoPaymentMethod: M
164
162
  },
165
163
  props: {
166
164
  ...d.props,
@@ -183,9 +181,9 @@ const W = /* @__PURE__ */ w(U, [["render", V]]), L = _({
183
181
  };
184
182
  }
185
183
  });
186
- function R(o, e, p, r, t, a) {
184
+ function V(o, e, p, r, t, a) {
187
185
  const n = u("bento-payment-method"), s = u("bento-dropdown");
188
- return l(), $("div", null, [
186
+ return l(), b("div", null, [
189
187
  m(s, f(o.$props, { onInput: o.onInput }), {
190
188
  default: y(({ value: c, label: i }) => [
191
189
  m(n, {
@@ -197,7 +195,7 @@ function R(o, e, p, r, t, a) {
197
195
  }, 16, ["onInput"])
198
196
  ]);
199
197
  }
200
- const X = /* @__PURE__ */ w(L, [["render", R]]), j = _({
198
+ const X = /* @__PURE__ */ w(U, [["render", V]]), j = _({
201
199
  name: "bento-dropdown-tag",
202
200
  components: {
203
201
  BentoDropdown: d,
@@ -210,7 +208,7 @@ const X = /* @__PURE__ */ w(L, [["render", R]]), j = _({
210
208
  * It must be an array of {@see BentoTagListboxOptions }
211
209
  * * @property {string} value.label - Text to be displayed in the option
212
210
  * * @property {string,number} value.value - Value of the option
213
- * * @property {BentoTagVariant} value.variant - The BentTag variant shown for the option.
211
+ * * @property {string} value.variant - The BentTag variant shown for the option.
214
212
  */
215
213
  items: {
216
214
  type: Array,
@@ -233,7 +231,7 @@ const X = /* @__PURE__ */ w(L, [["render", R]]), j = _({
233
231
  };
234
232
  }
235
233
  });
236
- function E(o, e, p, r, t, a) {
234
+ function x(o, e, p, r, t, a) {
237
235
  const n = u("listbox-option-tag"), s = u("bento-dropdown");
238
236
  return l(), v(s, f(o.$props, {
239
237
  class: "b-dropdown-tag",
@@ -249,7 +247,7 @@ function E(o, e, p, r, t, a) {
249
247
  _: 1
250
248
  }, 16, ["items", "onInput"]);
251
249
  }
252
- const Y = /* @__PURE__ */ w(j, [["render", E], ["__scopeId", "data-v-9d48599c"]]);
250
+ const Y = /* @__PURE__ */ w(j, [["render", x], ["__scopeId", "data-v-c5f7c077"]]);
253
251
  export {
254
252
  d as BentoDropdown,
255
253
  K as BentoDropdownAvatar,